diff options
Diffstat (limited to 'WebKit/chromium')
546 files changed, 0 insertions, 103293 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog deleted file mode 100644 index 54ca8ce..0000000 --- a/WebKit/chromium/ChangeLog +++ /dev/null @@ -1,27492 +0,0 @@ -2011-01-07 Adam Barth <abarth@webkit.org> - - Rubber-stamped by Eric Seidel. - - Move WebCore to Source - https://bugs.webkit.org/show_bug.cgi?id=52050 - - Update references to WebCore. - - * WebKit.grd: - * WebKit.gyp: - -2011-01-07 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Scrollbar code cleanup - https://bugs.webkit.org/show_bug.cgi?id=52073 - - Scrollbar code cleanup: - - Fix typo in Linux scrollbar enum name - - * public/linux/WebThemeEngine.h: - * src/ChromiumBridge.cpp: - (WebCore::WebThemePart): - (WebCore::GetWebThemeExtraParams): - -2011-01-07 James Robinson <jamesr@chromium.org> - - Revert "Implement mozilla's animationTime property" - https://bugs.webkit.org/show_bug.cgi?id=51952 - - This approach isn't quite right. - - * public/WebWidget.h: - * src/WebPopupMenuImpl.cpp: - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - -2011-01-05 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Define GC3D types to match GL types and use them in GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=45557 - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::bindAttribLocation): - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - (WebCore::GraphicsContext3DInternal::getActiveAttrib): - (WebCore::GraphicsContext3DInternal::getActiveUniform): - (WebCore::GraphicsContext3DInternal::getAttribLocation): - (WebCore::GraphicsContext3DInternal::getString): - (WebCore::GraphicsContext3DInternal::getUniformLocation): - (WebCore::GraphicsContext3DInternal::texImage2D): - (WebCore::GraphicsContext3DInternal::texSubImage2D): - (WebCore::GraphicsContext3DInternal::uniform1fv): - (WebCore::GraphicsContext3DInternal::uniform1iv): - (WebCore::GraphicsContext3DInternal::uniform2fv): - (WebCore::GraphicsContext3DInternal::uniform2iv): - (WebCore::GraphicsContext3DInternal::uniform3fv): - (WebCore::GraphicsContext3DInternal::uniform3iv): - (WebCore::GraphicsContext3DInternal::uniform4fv): - (WebCore::GraphicsContext3DInternal::uniform4iv): - (WebCore::GraphicsContext3DInternal::uniformMatrix2fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix3fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix4fv): - * src/GraphicsContext3DInternal.h: - -2011-01-06 James Simonsen <simonjam@chromium.org> - - Reviewed by Darin Fisher. - - [Web Timing] Remove vendor prefix - https://bugs.webkit.org/show_bug.cgi?id=48922 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::performance): Rename to performance. - -2011-01-06 James Robinson <jamesr@chromium.org> - - Reviewed by Simon Fraser. - - Implement mozilla's animationTime property - https://bugs.webkit.org/show_bug.cgi?id=51952 - - WebKit API support for webkitAnimationTime. - - * public/WebWidget.h: - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime): - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::clearCurrentAnimationTime): - * src/WebViewImpl.h: - -2010-12-29 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add a WebAutoFillClient interface that moves some functions from WebViewClient - https://bugs.webkit.org/show_bug.cgi?id=51710 - - * WebKit.gyp: - * public/WebAutoFillClient.h: Added. - (WebKit::WebAutoFillClient::didAcceptAutoFillSuggestion): - (WebKit::WebAutoFillClient::didSelectAutoFillSuggestion): - (WebKit::WebAutoFillClient::didClearAutoFillSelection): - (WebKit::WebAutoFillClient::removeAutocompleteSugestion): - (WebKit::WebAutoFillClient::didAcceptAutocompleteSuggestion): - (WebKit::WebAutoFillClient::textFieldDidBeginEditing): - (WebKit::WebAutoFillClient::textFieldDidEndEditing): - (WebKit::WebAutoFillClient::textFieldDidChange): - (WebKit::WebAutoFillClient::textFieldDidReceiveKeyDown): - (WebKit::WebAutoFillClient::~WebAutoFillClient): - -2011-01-05 Chris Rogers <crogers@google.com> - - Reviewed by Darin Fisher. - - Add WebKitClient::createAudioDevice() for Chromium port of web audio API - https://bugs.webkit.org/show_bug.cgi?id=51424 - - * WebKit.gyp: - * public/WebAudioDevice.h: Added. - (WebKit::WebAudioDevice::RenderCallback::~RenderCallback): - (WebKit::WebAudioDevice::~WebAudioDevice): - * public/WebKitClient.h: - (WebKit::WebKitClient::createAudioDevice): - * src/AudioDestinationChromium.cpp: Added. - (WebCore::AudioDestination::create): - (WebCore::AudioDestinationChromium::AudioDestinationChromium): - (WebCore::AudioDestinationChromium::~AudioDestinationChromium): - (WebCore::AudioDestinationChromium::start): - (WebCore::AudioDestinationChromium::stop): - (WebCore::AudioDestination::hardwareSampleRate): - (WebCore::AudioDestinationChromium::render): - * src/AudioDestinationChromium.h: Added. - (WebCore::AudioDestinationChromium::isPlaying): - (WebCore::AudioDestinationChromium::sampleRate): - -2011-01-05 David Levin <levin@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] WEBKIT_API and styling fixes for the chromium api. - https://bugs.webkit.org/show_bug.cgi?id=51863 - - Removed some incorrect uses of WEBKIT_API. - Fixed some abbreviations by making them whole words. - - * public/WebAnimationController.h: Removed WEBKIT_API from virtual functions. - * public/WebFormElement.h: Removed WEBKIT_API from inline functions - and fixed some abbreviations. - (WebKit::WebFormElement::WebFormElement): - (WebKit::WebFormElement::operator=): - (WebKit::WebFormElement::assign): - * public/WebIDBDatabaseError.h: Ditto. - (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): - (WebKit::WebIDBDatabaseError::operator=): - * public/WebInputElement.h: Ditto. - (WebKit::WebInputElement::WebInputElement): - (WebKit::WebInputElement::operator=): - (WebKit::WebInputElement::assign): - * public/WebLabelElement.h: Ditto. - (WebKit::WebLabelElement::WebLabelElement): - (WebKit::WebLabelElement::operator=): - (WebKit::WebLabelElement::assign): - * public/WebOptionElement.h: Ditto. - (WebKit::WebOptionElement::WebOptionElement): - (WebKit::WebOptionElement::operator=): - (WebKit::WebOptionElement::assign): - * public/WebSelectElement.h: Ditto (and minor spacing cleanup). - (WebKit::WebSelectElement::WebSelectElement): - (WebKit::WebSelectElement::operator=): - (WebKit::WebSelectElement::assign): - -2011-01-05 Hans Wennborg <hans@chromium.org> - - Reviewed by David Levin. - - [Chromium] WebIDBKey clean-up - https://bugs.webkit.org/show_bug.cgi?id=51925 - - Remove constructors that are no longer used since the - Chromium side has been updated. - - * public/WebIDBKey.h: - -2011-01-04 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - Update README file with a description of the WEBKIT_API macro and - guidelines for its usage. Also document the various WEBKIT_USING_* - macros. - - https://bugs.webkit.org/show_bug.cgi?id=51880 - - * README: - -2011-01-04 Evan Martin <evan@chromium.org> - - Reviewed by Tony Chang. - - [chromium] depend on harfbuzz explicitly - https://bugs.webkit.org/show_bug.cgi?id=51895 - - Update Chromium DEPS to pick up newer Chromium version - that simplifies expressing the Harfbuzz dependency. - - * DEPS: - -2011-01-04 Zhe Su <suzhe@chromium.org> - - Reviewed by Kenneth Russell. - - Changes: - 1. Add WebKit::WebWidget::confirmComposition(const WebString& text) - This new method corresponds to Editor::confirmComposition(text) and - Editor::insertText(text). It'll be used by both DumpRenderTree's - TextInputController and chromium browser. - 2. Fix WebFrameImpl::insertText - It should call Editor::confirmComposition(text) rather than - Editor::insertText(text) if there is an ongoing composition. - It matches the behavior of WebKit Mac port. - 3. Fix WebFrameImpl::setMarkedText - Editor::confirmComposition(text) shouldn't be called in this - method, which incorrectly inserts the text. - - https://bugs.webkit.org/show_bug.cgi?id=51693 - - * public/WebWidget.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::insertText): - (WebKit::WebFrameImpl::setMarkedText): - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::confirmComposition): - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::confirmComposition): - * src/WebViewImpl.h: - * tests/PopupMenuTest.cpp: - (WebKit::TestWebWidget::confirmComposition): - -2011-01-03 Daniel Bates <dbates@rim.com> - - Attempt to fix the Chromium Linux Release build after changeset 74895 <http://trac.webkit.org/changeset/74895>. - - The portion of the patch in <https://bugs.webkit.org/show_bug.cgi?id=51791> that modified the - file src/WebSearchableFormData.cpp was not landed (why?). Although the change log entry - associated with this change was landed. - - * src/WebSearchableFormData.cpp: - (HTMLNames::IsInDefaultState): - -2011-01-02 Dirk Schulze <krit@webkit.org> - - Reviewed by Simon Fraser. - - Clarify ImageBuffer and ImageData relationship - https://bugs.webkit.org/show_bug.cgi?id=51297 - - Use ByteArray instead of ImageData. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::doPixelReadbackToCanvas): - -2011-01-01 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Move JavaScriptCore to Source - https://bugs.webkit.org/show_bug.cgi?id=51604 - - * WebKit.gyp: - - Point to JavaScriptCore in its new location. - -2010-12-30 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Kent Tamura. - - [Chromium] Add WebThemeEngineDRTMac so that Chromium DRT scrollbar rendering can match the Mac port's - https://bugs.webkit.org/show_bug.cgi?id=51728 - - Roll DEPS to pick up WebThemeEngine changes. - - * DEPS: - -2010-12-29 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r74735. - http://trac.webkit.org/changeset/74735 - https://bugs.webkit.org/show_bug.cgi?id=51715 - - assert failures on fast/forms/input-maxlength-ime- - completed.html (Requested by mihaip on #webkit). - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::setMarkedText): - -2010-12-29 Zhe Su <suzhe@chromium.org> - - Reviewed by Eric Seidel. - - Fix editing/input/ime-composition-clearpreedit.html test in chromium - by removing the line "editor->confirmComposition(text);" from - WebFrameImpl::setMarkedText() method, because that line will insert the - text into the focused node, which is apparently wrong. - - https://bugs.webkit.org/show_bug.cgi?id=51693 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::setMarkedText): - -2010-12-23 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Initialize to 0 for undefined values in CopyTexImage2D - https://bugs.webkit.org/show_bug.cgi?id=51421 - - * src/GraphicsContext3DChromium.cpp: Implement getInternalFramebufferSize(). - (WebCore::GraphicsContext3DInternal::getInternalFramebufferSize): - * src/GraphicsContext3DInternal.h: - -2010-12-23 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r74561. - http://trac.webkit.org/changeset/74561 - https://bugs.webkit.org/show_bug.cgi?id=51565 - - "Broke Chromium UI tests on Vista" (Requested by kbr_google on - #webkit). - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - -2010-12-23 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Kent Tamura. - - [Chromium] Add WebThemeEngine for Mac to allow scrollbar rendering to be overridden for the DRT - https://bugs.webkit.org/show_bug.cgi?id=51507 - - Adds WebThemeEngine for the Mac (it already has parallel definitions for - Windows and Linux) so that scrollbar thumb rendering can be overridden - for the DRT (to be consistent with the NSScroller-based rendering - used by the Mac port). - - * public/mac/WebThemeEngine.h: Added. - (WebKit::WebThemeEngine::paintScrollbarThumb): - * src/AssertMatchingEnums.cpp: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::paintScrollbarThumb): - -2010-12-23 Sam Weinig <sam@webkit.org> - - Fix build. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::didSaveToPageCache): - (WebKit::FrameLoaderClientImpl::didRestoreFromPageCache): - -2010-12-22 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - WebKit2 needs to mirror the frame tree in the UIProcess - https://bugs.webkit.org/show_bug.cgi?id=51546 - - - Add client functions to notify that a frame has been added or - removed from the page cache. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::WebFrameLoaderClientImpl::didSaveToPageCache): - (WebKit::WebFrameLoaderClientImpl::didRestoreFromPageCache): - * src/FrameLoaderClientImpl.h: - -2010-12-20 Adrienne Walker <enne@google.com> - - Reviewed by Kenneth Russell. - - [chromium] Tile root layer of the compositor. - https://bugs.webkit.org/show_bug.cgi?id=49947 - - Refactor root layer logic out of WebViewImpl and into - LayerTilerChromium. The painting is now done through an interface - rather than directly in WebViewImpl. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImplTilePaintInterface::WebViewImplTilePaintInterface): - (WebKit::WebViewImplTilePaintInterface::paint): - (WebKit::WebViewImplScrollbarPaintInterface::WebViewImplScrollbarPaintInterface): - (WebKit::WebViewImplScrollbarPaintInterface::paint): - (WebKit::WebViewImpl::doComposite): - * src/WebViewImpl.h: - -2010-12-22 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Eric Seidel. - - Editor.h doesn't need to include SelectionController.h - https://bugs.webkit.org/show_bug.cgi?id=51441 - - Renamed SelectionController::EDirection to SelectionDirection. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeCommand): - -2010-12-23 W. James MacLean <wjmaclean@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Add asserts to test for contiguous-pixel Skia bitmaps. - https://bugs.webkit.org/show_bug.cgi?id=51186 - - Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated. - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - -2010-12-22 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r74503. - http://trac.webkit.org/changeset/74503 - https://bugs.webkit.org/show_bug.cgi?id=51513 - - breaks chromium mac debug compile (Requested by tonyg-cr on - #webkit). - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - -2010-12-22 W. James MacLean <wjmaclean@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Add asserts to test for contiguous-pixel Skia bitmaps. - https://bugs.webkit.org/show_bug.cgi?id=51186 - - Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated. - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - -2010-12-21 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - WebGLRenderingContext needs to zero textures and renderbuffers - https://bugs.webkit.org/show_bug.cgi?id=49355 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::texImage2D): Generate an INVALID_VALUE if pixels==null is passed in. - -2010-12-20 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBCursor::delete is not implemented. - https://bugs.webkit.org/show_bug.cgi?id=51110 - - * public/WebIDBCursor.h: - (WebKit::WebIDBCursor::remove): - (WebKit::WebIDBCursor::deleteFunction): - * src/IDBCursorBackendProxy.cpp: - (WebCore::IDBCursorBackendProxy::deleteFunction): - * src/IDBCursorBackendProxy.h: - * src/WebIDBCursorImpl.cpp: - (WebKit::WebIDBCursorImpl::deleteFunction): - * src/WebIDBCursorImpl.h: - -2010-12-18 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Laszlo Gombos. - - [Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End} - https://bugs.webkit.org/show_bug.cgi?id=50943 - - Exposes all dom* times to the chromium port. I'm particularly interested in - domContentLoadedEventEnd as it compares to the FinishDoc metric. - - * public/WebPerformance.h: - * src/WebPerformance.cpp: - (WebKit::WebPerformance::domLoading): - (WebKit::WebPerformance::domInteractive): - (WebKit::WebPerformance::domContentLoadedEventStart): - (WebKit::WebPerformance::domContentLoadedEventEnd): - (WebKit::WebPerformance::domComplete): - -2010-12-17 Tony Gentilcore <tonyg@chromium.org> - - Unreviewed, build fix. - - Add WebKitTools -> Tools rename that got missed. - - * WebKit.gyp: - -2010-12-17 Dirk Pranke <dpranke@chromium.org> - - Unreviewed, build fix. - - Add WebKitTools -> Tools rename that got missed. - - * WebKit.gyp: - -2010-12-17 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Jeremy Orlow. - - Fix test failures where NULL GeolocationClient is provided - https://bugs.webkit.org/show_bug.cgi?id=51256 - - * src/GeolocationClientProxy.cpp: - (WebKit::GeolocationClientProxy::geolocationDestroyed): - -2010-12-17 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: Support Date objects as keys. - https://bugs.webkit.org/show_bug.cgi?id=51193 - - Update to match the underlying WebCore IDBKey class: - add the DateType, add create() functions for each type, - deprecate the public constructors (will be removed once - Chromium side is updated). - - * public/WebIDBKey.h: - (WebKit::WebIDBKey::WebIDBKey): - * src/AssertMatchingEnums.cpp: - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::createString): - (WebKit::WebIDBKey::createDate): - (WebKit::WebIDBKey::createNumber): - (WebKit::WebIDBKey::assignNull): - (WebKit::WebIDBKey::assignString): - (WebKit::WebIDBKey::assignDate): - (WebKit::WebIDBKey::assignNumber): - (WebKit::WebIDBKey::date): - -2010-12-17 James Simonsen <simonjam@chromium.org> - - Reviewed by Darin Fisher. - - [Web Timing] Navigation type enums should begin with TYPE_ - https://bugs.webkit.org/show_bug.cgi?id=51200 - - * src/WebPerformance.cpp: - (WebKit::WebPerformance::navigationType): Added TYPE_ to navigation types. - -2010-12-16 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Jeremy Orlow. - - Enable client-based geolocation in Chromium - https://bugs.webkit.org/show_bug.cgi?id=50562 - - * features.gypi: - -2010-12-16 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: Fix IDBDatabaseError code offset bug - https://bugs.webkit.org/show_bug.cgi?id=51177 - - WebIDBDatabaseError must use the - IDBDatabaseError::createWithoutOffset() function. - - * src/WebIDBDatabaseError.cpp: - (WebKit::WebIDBDatabaseError::assign): - -2010-12-15 Chris Guillory <chris.guillory@google.com> - - Reviewed by Darin Fisher. - - Expose AccessibilityObject::url() to Chromium - https://bugs.webkit.org/show_bug.cgi?id=51046 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::url): - -2010-12-14 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] AssociatedURLLoader leaks m_realLoader to its WebURLLoaderClient. - https://bugs.webkit.org/show_bug.cgi?id=51062 - - * src/AssociatedURLLoader.cpp: Intercept WebURLLoaderClient methods and - forward |this| as the WebURLLoader parameter. - (WebKit::AssociatedURLLoader::AssociatedURLLoader): - (WebKit::AssociatedURLLoader::loadSynchronously): - (WebKit::AssociatedURLLoader::loadAsynchronously): - (WebKit::AssociatedURLLoader::willSendRequest): - (WebKit::AssociatedURLLoader::didSendData): - (WebKit::AssociatedURLLoader::didReceiveResponse): - (WebKit::AssociatedURLLoader::didDownloadData): - (WebKit::AssociatedURLLoader::didReceiveData): - (WebKit::AssociatedURLLoader::didReceiveCachedMetadata): - (WebKit::AssociatedURLLoader::didFinishLoading): - (WebKit::AssociatedURLLoader::didFail): - * src/AssociatedURLLoader.h: - -2010-12-14 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Dimitri Glazkov. - - Move asynchronous event dispatching out of Document - https://bugs.webkit.org/show_bug.cgi?id=49785 - - Change enqueueEvent callsite. - - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::storageEvent): - -2010-12-13 Mike Lawther <mikelawther@chromium.org> - - Reviewed by James Robinson. - - Update chromium DEPS to pull in latest Skia - https://bugs.webkit.org/show_bug.cgi?id=50984 - - Roll to revision that pulled in Skia r632 (http://src.chromium.org/viewvc/chrome?view=rev&revision=68558) - - * DEPS: - -2010-12-13 David Holloway <dhollowa@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] Removes deprecated logic following the consolidation of AutoFill and - Autocomplete popup menu handling (https://bugs.webkit.org/show_bug.cgi?id=41236). - Filling of the form fields is now handled completely on the Chromium side, for - both AutoFill and Autocomplete. - - https://bugs.webkit.org/show_bug.cgi?id=41822 - - * public/WebView.h: - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient): - (WebKit::AutoFillPopupMenuClient::valueChanged): - * src/AutoFillPopupMenuClient.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::applyAutoFillSuggestions): - * src/WebViewImpl.h: - -2010-12-13 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921. - - REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit). - https://bugs.webkit.org/show_bug.cgi?id=50950 - - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject): - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask): - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask): - -2010-12-13 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions. - - Debugger and Resources related notification functions of Inspector.idl were - marked as such with help of "domain" attribute. The other changes in js files - are reflecting this change. Some wrappers in WebInspector namespace were dropped, - the others were moved to DebuggerModel class. - - https://bugs.webkit.org/show_bug.cgi?id=50906 - - * src/js/Tests.js: - (.TestSuite.prototype._waitForScriptPause): - (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts): - (.TestSuite.prototype._waitUntilScriptsAreParsed): - -2010-12-13 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Adam Barth. - - WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown - https://bugs.webkit.org/show_bug.cgi?id=8519 - - Uncaught exceptions are propagated to window.onerror hander if one is present. - The handler is expected to be a function accepting three arguments: error message, - resource url and line number where the exception occured. - - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask): - -2010-12-13 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r73898. - http://trac.webkit.org/changeset/73898 - https://bugs.webkit.org/show_bug.cgi?id=50919 - - FileSystem and Database API's were broken (Requested by loislo - on #webkit). - - * src/js/Tests.js: - (.TestSuite.prototype._waitForScriptPause): - -2010-12-13 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions. - - Debugger and Resources related notification functions of Inspector.idl were - marked as such with help of "domain" attribute. The other changes in js files - are reflecting this change. Some wrappers in WebInspector namespace were dropped, - the others were moved to DebuggerModel class. - - https://bugs.webkit.org/show_bug.cgi?id=50906 - - * src/js/Tests.js: - (.TestSuite.prototype._waitForScriptPause): - -2010-10-28 MORITA Hajime <morrita@google.com> - - Reviewed by Ojan Vafai. - - spellcheck does not check pasted text - https://bugs.webkit.org/show_bug.cgi?id=40092 - - Added a stub implememntation. - - * src/EditorClientImpl.h: - (WebKit::EditorClientImpl::requestCheckingOfString): - -2010-12-10 Chris Fleizach <cfleizach@apple.com> - - Reviewed by Darin Adler. - - AX: refactor AccessibilityRenderObject::doAccessibilityHitTest - https://bugs.webkit.org/show_bug.cgi?id=50574 - - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::hitTest): - -2010-12-10 Zhenyao Mo <zmo@google.com> - - Reviewed by Adam Barth. - - Use enums instead of booleans in ImageSource/ImageDecoder constructors - https://bugs.webkit.org/show_bug.cgi?id=50818 - - * src/WebImageDecoder.cpp: - (WebKit::WebImageDecoder::init): Use enums instead of boolean in ImageDecoder constructor. - -2010-12-10 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Implement extension entry points and remove EXTENSIONS enum - https://bugs.webkit.org/show_bug.cgi?id=40316 - - Added support for ensuring that a particular OpenGL extension is - enabled. - - * public/WebGraphicsContext3D.h: - * src/Extensions3DChromium.cpp: - (WebCore::Extensions3DChromium::ensureEnabled): - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::initializeExtensions): - (WebCore::GraphicsContext3DInternal::supportsExtension): - (WebCore::GraphicsContext3DInternal::ensureExtensionEnabled): - * src/GraphicsContext3DInternal.h: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::getRequestableExtensionsCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::requestExtensionCHROMIUM): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-12-10 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Steve Block. - - [Chromium] Implement mocks for client-based geolocation - https://bugs.webkit.org/show_bug.cgi?id=46895 - - * WebKit.gyp: - * public/WebGeolocationClientMock.h: Added. - (WebKit::WebGeolocationClientMock::~WebGeolocationClientMock): - (WebKit::WebGeolocationClientMock::WebGeolocationClientMock): - * src/WebGeolocationClientMock.cpp: Added. - (WebKit::WebGeolocationClientMock::create): - (WebKit::WebGeolocationClientMock::initialize): - (WebKit::WebGeolocationClientMock::reset): - (WebKit::WebGeolocationClientMock::setMockGeolocationPosition): - (WebKit::WebGeolocationClientMock::setMockGeolocationError): - (WebKit::WebGeolocationClientMock::setMockGeolocationPermission): - (WebKit::WebGeolocationClientMock::resetMock): - (WebKit::WebGeolocationClientMock::startUpdating): - (WebKit::WebGeolocationClientMock::stopUpdating): - (WebKit::WebGeolocationClientMock::setEnableHighAccuracy): - (WebKit::WebGeolocationClientMock::geolocationDestroyed): - (WebKit::WebGeolocationClientMock::setController): - (WebKit::WebGeolocationClientMock::lastPosition): - (WebKit::WebGeolocationClientMock::requestPermission): - (WebKit::WebGeolocationClientMock::cancelPermissionRequest): - * src/WebGeolocationServiceMock.cpp: - -2010-12-10 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Steve Block. - - [chromium] Implement client based geolocation bindings - https://bugs.webkit.org/show_bug.cgi?id=45752 - - Implements the necessary plumbing to expose client-based geolocation in Chromium - webkit. The plan is to remove the non-client-based geolocation code (GeolocationService*) - in the future. - - * WebKit.gyp: - * public/WebGeolocationClient.h: Added. - (WebKit::WebGeolocationClient::~WebGeolocationClient): - * public/WebGeolocationController.h: Added. - (WebKit::WebGeolocationController::WebGeolocationController): - (WebKit::WebGeolocationController::reset): - * public/WebGeolocationError.h: - * public/WebGeolocationPermissionRequest.h: Added. - (WebKit::WebGeolocationPermissionRequest::WebGeolocationPermissionRequest): - (WebKit::WebGeolocationPermissionRequest::geolocation): - * public/WebGeolocationPermissionRequestManager.h: Added. - (WebKit::WebGeolocationPermissionRequestManager::WebGeolocationPermissionRequestManager): - (WebKit::WebGeolocationPermissionRequestManager::~WebGeolocationPermissionRequestManager): - * public/WebGeolocationPosition.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::geolocationClient): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): - (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): - * src/GeolocationClientProxy.cpp: Added. - (WebKit::GeolocationClientProxy::GeolocationClientProxy): - (WebKit::GeolocationClientProxy::~GeolocationClientProxy): - (WebKit::GeolocationClientProxy::setController): - (WebKit::GeolocationClientProxy::geolocationDestroyed): - (WebKit::GeolocationClientProxy::startUpdating): - (WebKit::GeolocationClientProxy::stopUpdating): - (WebKit::GeolocationClientProxy::setEnableHighAccuracy): - (WebKit::GeolocationClientProxy::lastPosition): - (WebKit::GeolocationClientProxy::requestPermission): - (WebKit::GeolocationClientProxy::cancelPermissionRequest): - * src/GeolocationClientProxy.h: Added. - * src/WebGeolocationController.cpp: Added. - (WebKit::WebGeolocationController::positionChanged): - (WebKit::WebGeolocationController::errorOccurred): - (WebKit::WebGeolocationController::controller): - * src/WebGeolocationPermissionRequest.cpp: Added. - (WebKit::WebGeolocationPermissionRequest::securityOrigin): - (WebKit::WebGeolocationPermissionRequest::setIsAllowed): - * src/WebGeolocationPermissionRequestManager.cpp: Added. - (WebGeolocationPermissionRequestManager::add): - (WebGeolocationPermissionRequestManager::remove): - (WebGeolocationPermissionRequestManager::init): - (WebGeolocationPermissionRequestManager::reset): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-12-10 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: Numeric keys are floats. - https://bugs.webkit.org/show_bug.cgi?id=50674 - - Represent numeric keys as floating point values. - - * public/WebIDBKey.h: - (WebKit::WebIDBKey::WebIDBKey): - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::assign): - (WebKit::WebIDBKey::number): - -2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r73616. - http://trac.webkit.org/changeset/73616 - https://bugs.webkit.org/show_bug.cgi?id=50772 - - Breaks chromium win build (Requested by hwennborg on #webkit). - - * public/WebIDBKey.h: - (WebKit::WebIDBKey::WebIDBKey): - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::assign): - (WebKit::WebIDBKey::number): - -2010-12-09 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: Numeric keys are floats. - https://bugs.webkit.org/show_bug.cgi?id=50674 - - Represent numeric keys as floating point values. - - * public/WebIDBKey.h: - (WebKit::WebIDBKey::WebIDBKey): - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::assign): - (WebKit::WebIDBKey::number): - -2010-12-07 Brian Weinstein <bweinstein@apple.com> - - Reviewed by John Sullivan. - - Layering Violation in ContextMenu - member variable of type HitTestResult - https://bugs.webkit.org/show_bug.cgi?id=50586 - - Update users of ContextMenu and ContextMenuController to match where the new functions - are located. - - * src/ContextMenuClientImpl.cpp: - (WebKit::selectMisspelledWord): - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - -2010-12-06 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Pass security origin to make local file decision correctly - https://bugs.webkit.org/show_bug.cgi?id=48603 - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::selectCacheWithManifest): Pass security origin. - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchCreatePage): Ditto. - (WebKit::FrameLoaderClientImpl::createFrame): Ditto. - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::loadFrameRequest): Ditto. - -2010-12-07 Martin Robinson <mrobinson@igalia.com> - - Unreviewed, rolling out r73392. - http://trac.webkit.org/changeset/73392 - https://bugs.webkit.org/show_bug.cgi?id=50489 - - This commit caused crashes on the GTK+ bots - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::finishedLoading): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::loadJavaScriptURL): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebSearchableFormData.cpp: - (WebCore::GetFormEncoding): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::pageEncoding): - -2010-12-07 Kenichi Ishibashi <bashi@google.com> - - Reviewed by Kent Tamura. - - Let HTMLObjectElement be a form associated element - https://bugs.webkit.org/show_bug.cgi?id=48821 - - Modified to use FormAssociatedElement instead of HTMLFormControlElement. - - * src/WebFormElement.cpp: - (WebKit::WebFormElement::getFormControlElements): Modified to use - FormAssociatedElement instead of HTMLFormControlElement. - * src/WebPasswordFormUtils.cpp: - (WebKit::findPasswordFormFields): Ditto. - * src/WebSearchableFormData.cpp: - (WebCore::GetButtonToActivate): Ditto. - (WebCore::HasSuitableTextElement): Ditto. - -2010-12-06 Nate Chapin <japhet@chromium.org> - - Reviewed by Adam Barth. - - Update calls to DocumentWriter. - https://bugs.webkit.org/show_bug.cgi?id=50489 - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::finishedLoading): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::loadJavaScriptURL): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebSearchableFormData.cpp: - (WebCore::GetFormEncoding): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::pageEncoding): - -2010-12-03 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r73302. - http://trac.webkit.org/changeset/73302 - https://bugs.webkit.org/show_bug.cgi?id=50499 - - Causes crashes in debug LayoutTests (Requested by xan_ on - #webkit). - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::parentObject): - -2010-12-01 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Inspector protocol cleanup task. - - The patch has just small renames and adjustments for the protocol things. - 'handler' keyword in idl file was replaced with 'domain'. - 'domain' property was assigned for the each backend to frontend messages. - At the next step WebInspector wrapper functions will be removed and 'agents' will be called directly. - - https://bugs.webkit.org/show_bug.cgi?id=50337 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend): - -2010-12-03 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Include the FrameView widget of a RenderWidget in the accessibility tree. - https://bugs.webkit.org/show_bug.cgi?id=49106 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::equals): - (WebKit::WebAccessibilityObject::parentObject): - -2010-11-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Clean up IndexedDB 2 sided roll bits - https://bugs.webkit.org/show_bug.cgi?id=50160 - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::version): - (WebKit::WebIDBDatabase::objectStoreNames): - (WebKit::WebIDBDatabase::deleteObjectStore): - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * public/WebIDBKeyRange.h: - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::deleteFunction): - * src/IDBDatabaseProxy.cpp: - * src/IDBDatabaseProxy.h: - * src/WebIDBKeyRange.cpp: - -2010-12-02 Chris Rogers <crogers@google.com> - - Reviewed by Darin Fisher. - - Fine-tune chromium WebKit API for loading audio resources - https://bugs.webkit.org/show_bug.cgi?id=50406 - - * public/WebAudioBus.h: - (WebKit::WebAudioBus::~WebAudioBus): - * public/WebKitClient.h: - (WebKit::WebKitClient::loadAudioResource): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::decodeAudioFileData): - * src/WebAudioBus.cpp: - (WebKit::WebAudioBus::reset): - -2010-12-02 Darin Fisher <darin@chromium.org> - - Fix the Windows multi-dll build. Do not export functions that are - implemented inline! - - * public/WebFormControlElement.h: - (WebKit::WebFormControlElement::assign): - -2010-12-02 Tony Chang <tony@chromium.org> - - Unreviewed, roll chromium deps to r67980. - - * DEPS: - -2010-12-01 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: [Resources panel] [HAR] Need a way to save timing data. - Enable resource export to HAR for Chromium. - https://bugs.webkit.org/show_bug.cgi?id=45663 - - * src/js/DevTools.js: Preferences.resourceExportEnabled = true - -2010-12-02 Vincent Scheib <scheib@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] histograms api updated in WebKitClient/ChromiumBridge and histogram "GPU.setIsAcceleratedCompositingActive" added. - https://bugs.webkit.org/show_bug.cgi?id=50285 - - Test by loading "about:histograms" after navigating to accelerated pages. - - * public/WebKitClient.h: - (WebKit::WebKitClient::histogramCustomCounts): api update. - (WebKit::WebKitClient::histogramEnumeration): api update. - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::histogramCustomCounts): api update. - (WebCore::ChromiumBridge::histogramEnumeration): api update. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): "GPU.setIsAcceleratedCompositingActive" added. - -2010-12-01 Jia Pu <jpu@apple.com> - - Reviewed by Darin Adler. - - Support multiple correction candidates panel for misspelled word on Mac OS X. - https://bugs.webkit.org/show_bug.cgi?id=50137 - <rdar://problem/8568059> - - Adopted new function signature defined in base class. - - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::getGuessesForWord): - * src/EditorClientImpl.h: - -2010-12-01 Alexey Marinichev <amarinichev@chromium.org> - - Reviewed by James Robinson. - - [chromium] renderer does not realize hardware compositing is disabled and crashes - https://bugs.webkit.org/show_bug.cgi?id=50264 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setRootGraphicsLayer): repaint always - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): null check - (WebKit::WebViewImpl::reallocateRenderer): - -2010-11-30 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - Get the value of the accelerated compositing triggers from the Settings - class. This allows setting the triggers via command line flags. - https://bugs.webkit.org/show_bug.cgi?id=50301 - - * public/WebSettings.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::allowedCompositingTriggers): - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled): - (WebKit::WebSettingsImpl::setAcceleratedCompositingForVideoEnabled): - (WebKit::WebSettingsImpl::setAcceleratedCompositingForPluginsEnabled): - (WebKit::WebSettingsImpl::setAcceleratedCompositingForCanvasEnabled): - (WebKit::WebSettingsImpl::setAcceleratedCompositingForAnimationEnabled): - * src/WebSettingsImpl.h: - -2010-12-01 Tony Chang <tony@chromium.org> - - Unreviewed, rolling chromium deps to r67811. - - * DEPS: - -2010-12-01 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: disable cookies tab in network resource view by default, enable for chromium - https://bugs.webkit.org/show_bug.cgi?id=50249 - - * src/js/DevTools.js: - -2010-11-30 Ojan Vafai <ojan@chromium.org> - - Revert r72876. It caused a ~30% perf regression in chromium's bloat-http test - https://bugs.webkit.org/show_bug.cgi?id=50288 - - 2010-11-29 Adam Barth <abarth@webkit.org (:abarth) (r)> - Reviewed by Darin Adler. - Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs - https://bugs.webkit.org/show_bug.cgi?id=50182 - A display-isolated URL can only be displayed (e.g., put in an iframe, - hyperlinked to) by documents from that scheme. In a sense, this is a - generalization of some of the protections we give file URLs, but - instead of lumping them all together into one "local" bucket, this - patch creates a separate bucket for each scheme. - For a while, I tried using a separate bucket for each origin. That - would have played nicely with what Blob URLs are trying to do, but some - "chrome" URL pages rely on being able to display other chrome URL - pages, even in different origins. For example, the New Tab Page shows - thumbnails from the "thumbnail" host. - This patch also removes a bunch of unused code. I've also propagated - the "deprecated" status of deprecatedCanDisplay to - deprecatedShouldTreatURLAsLocal because that method has no other - callers and is really asking for uppercase/lowercase bugs. I dream of - someday removing these functions. - 2010-11-29 Adam Barth <abarth@webkit.org (:abarth) (r)> - Reviewed by Darin Adler. - Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs - https://bugs.webkit.org/show_bug.cgi?id=50182 - This patch adds a Chromium API for registering schemes as - display-isolated. In a subsequent patch, I'll change the "chrome" - scheme in Chrome to be display isolated instead of local. That will - prevent file URLs from linking to chrome URLs. - - * public/WebSecurityPolicy.h: - * src/WebSecurityPolicy.cpp: - -2010-11-30 James Robinson <jamesr@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Update yasm entry in DEPS to match downstream - https://bugs.webkit.org/show_bug.cgi?id=50274 - - http://src.chromium.org/viewvc/chrome?view=rev&revision=67540 changed the downstream DEPS rule - for yasm to pull unconditionally rather than pulling in each deps_os. This changes the WebKit - chromium DEPS to match. - - * DEPS: - -2010-11-29 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Simon Fraser. - - Provide more fine grained control to ports over when to turn on accelerated - compositing. - https://bugs.webkit.org/show_bug.cgi?id=49998 - - As part of this change, the old hasAcceleratedCompositing method on the ChromeClient - has now been replaced by allowedCompositingTriggers which returns a bitfield of - all the features which can trigger the compositor. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::allowedCompositingTriggers): - * src/ChromeClientImpl.h: - -2010-11-30 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] pass webframe to web frame client's cookieJar - https://bugs.webkit.org/show_bug.cgi?id=50148 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::cookieJar): - * src/ChromiumBridge.cpp: - (WebCore::getCookieJar): - -2010-11-30 Jochen Eisinger <jochen@chromium.org> - - Unreviewed. Roll chromium 67532:67541. - - * DEPS: - -2010-11-29 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Adler. - - Introduce the notion of a "display-isolated" URL scheme for use by Chrome-internal URLs - https://bugs.webkit.org/show_bug.cgi?id=50182 - - This patch adds a Chromium API for registering schemes as - display-isolated. In a subsequent patch, I'll change the "chrome" - scheme in Chrome to be display isolated instead of local. That will - prevent file URLs from linking to chrome URLs. - - * public/WebSecurityPolicy.h: - * src/WebSecurityPolicy.cpp: - (WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated): - -2010-11-29 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add substitution parameters to WebKitClient::queryLocalizedString() - https://bugs.webkit.org/show_bug.cgi?id=50053 - - * public/WebKitClient.h: - (WebKit::WebKitClient::queryLocalizedString): Add overload functions with - substitution string parameters, and remove the integer parameter overload. - * src/LocalizedStrings.cpp: - (WebCore::query): Add string parameter overloads, and remove the integer parameter overload. - (WebCore::multipleFileUploadText): Call the string parameter query(). - (WebCore::validationMessageTooLongText): Pass the parameters to query(). - (WebCore::validationMessageRangeUnderflowText): ditto. - (WebCore::validationMessageRangeOverflowText): ditto. - (WebCore::validationMessageStepMismatchText): ditto. - -2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> - - Remove Build directory that was erroneously added in r72103. - - * Build: Removed. - -2010-11-29 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Darin Fisher. - - Web Inspector: [Chromium] Expose extension API to select a node in WebInspector - Added WebDevToolsAgent::inspect() - https://bugs.webkit.org/show_bug.cgi?id=49727 - - * public/WebDevToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::inspectNode): - * src/WebDevToolsAgentImpl.h: - -2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> - - [Chromium] Remove python_24 dependency, because it is no longer necessary. - - * DEPS: Removed python_24 dependency. - -2010-11-29 Bernhard Bauer <bauerb@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove databaseFileName from WebIDBFactory - https://bugs.webkit.org/show_bug.cgi?id=50150 - - * WebKit.gyp: - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * src/WebIDBFactory.cpp: Removed. - -2010-11-26 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBDatabase and IDBObjectStore remove* methods should be renamed to delete* - https://bugs.webkit.org/show_bug.cgi?id=50113 - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::deleteObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::deleteFunction): - (WebKit::WebIDBObjectStore::deleteIndex): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::deleteObjectStore): - * src/IDBDatabaseProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::deleteFunction): - (WebCore::IDBObjectStoreProxy::deleteIndex): - * src/IDBObjectStoreProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::deleteObjectStore): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::deleteFunction): - (WebKit::WebIDBObjectStoreImpl::deleteIndex): - * src/WebIDBObjectStoreImpl.h: - -2010-11-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Make IDBKeyRange match the spec - https://bugs.webkit.org/show_bug.cgi?id=50105 - - Remove flags and instead add two booleans for being open. - Change left to lower and right to upper everywhere. - - * public/WebIDBKeyRange.h: - (WebKit::WebIDBKeyRange::WebIDBKeyRange): - * src/WebIDBKeyRange.cpp: - (WebKit::WebIDBKeyRange::assign): - (WebKit::WebIDBKeyRange::left): - (WebKit::WebIDBKeyRange::right): - (WebKit::WebIDBKeyRange::lower): - (WebKit::WebIDBKeyRange::upper): - (WebKit::WebIDBKeyRange::lowerOpen): - (WebKit::WebIDBKeyRange::upperOpen): - (WebKit::WebIDBKeyRange::flags): - -2010-11-25 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Clean up IDBDatabase.transaction and add checks to IDBTransaction.objectStore - https://bugs.webkit.org/show_bug.cgi?id=50081 - - Plumb IDBTransaction.objectStore's exception code. - - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::objectStore): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::transaction): - * src/IDBTransactionBackendProxy.cpp: - (WebCore::IDBTransactionBackendProxy::objectStore): - * src/IDBTransactionBackendProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::transaction): - * src/WebIDBTransactionImpl.cpp: - (WebKit::WebIDBTransactionImpl::objectStore): - * src/WebIDBTransactionImpl.h: - -2010-11-26 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: Rename IDBDatabase.objectStores to objectStoreNames - https://bugs.webkit.org/show_bug.cgi?id=50102 - - Rename as per the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#database-interface - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::objectStores): - (WebKit::WebIDBDatabase::objectStoreNames): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::objectStoreNames): - * src/IDBDatabaseProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::objectStoreNames): - * src/WebIDBDatabaseImpl.h: - -2010-11-26 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBFactory::open should not have a description argument. - https://bugs.webkit.org/show_bug.cgi?id=50087 - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::description): - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * src/IDBFactoryBackendProxy.cpp: - (WebCore::IDBFactoryBackendProxy::open): - * src/IDBFactoryBackendProxy.h: - * src/WebIDBDatabaseImpl.cpp: - * src/WebIDBDatabaseImpl.h: - * src/WebIDBFactory.cpp: - * src/WebIDBFactoryImpl.cpp: - (WebKit::WebIDBFactoryImpl::open): - * src/WebIDBFactoryImpl.h: - -2010-11-25 Ilya Tikhonovsky <loislo@chromium.org> - - Unreviewed. Roll chromium 67004:67404. - - * DEPS: - -2010-11-25 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Add exception code to WebIDBTransaction::objectStore - https://bugs.webkit.org/show_bug.cgi?id=50030 - - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::objectStore): - -2010-11-24 MORITA Hajime <morrita@google.com> - - Reviewed by Kent Tamura. - - [Chromium][Windows] TestShell flakily crashes with EventSender.contextClick() - https://bugs.webkit.org/show_bug.cgi?id=50052 - - makeStringArrayImpl() assumed wtf::StringImpl data is - null-terminated. But it is not. - Changed the code to pass the string length explicitly instead of - making it computed by v8::String::New(). - - * src/WebBindings.cpp: - (WebKit::makeStringArrayImpl): - -2010-11-24 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - [Chromium] Implement FileWriterSync - https://bugs.webkit.org/show_bug.cgi?id=49940 - - Added waitForOperationToComplete, delegating to the bridge. - * src/WorkerAsyncFileWriterChromium.cpp: - * src/WorkerAsyncFileWriterChromium.h: - - Added waitForOperationToComplete and some debug-only code to make sure it's working properly. - * src/WorkerFileWriterCallbacksBridge.cpp: - (WebKit::WorkerFileWriterCallbacksBridge::postWriteToMainThread): - (WebKit::WorkerFileWriterCallbacksBridge::postTruncateToMainThread): - (WebKit::WorkerFileWriterCallbacksBridge::postAbortToMainThread): - (WebKit::WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge): - (WebKit::WorkerFileWriterCallbacksBridge::didWriteOnWorkerThread): - (WebKit::WorkerFileWriterCallbacksBridge::didFailOnWorkerThread): - (WebKit::WorkerFileWriterCallbacksBridge::didTruncateOnWorkerThread): - (WebKit::WorkerFileWriterCallbacksBridge::waitForOperationToComplete): - * src/WorkerFileWriterCallbacksBridge.h: - -2010-11-24 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - [chromium] Disable antialiasing for compositor - https://bugs.webkit.org/show_bug.cgi?id=50039 - - * src/WebViewImpl.cpp: - (WebCore::getCompositorContextAttributes): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::graphicsContext3D): - -2010-11-24 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Remove API migration code which is no longer used. - https://bugs.webkit.org/show_bug.cgi?id=50013 - - * public/WebSpeechInputControllerMock.h: - -2010-11-23 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r72628. - http://trac.webkit.org/changeset/72628 - https://bugs.webkit.org/show_bug.cgi?id=49994 - - This patch is causing layout-test failtures on GTK Linux - 64-bit Debug (Requested by ctguil on #webkit). - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::parentObject): - -2010-11-23 Chris Guillory <chris.guillory@google.com> - - Reviewed by Dimitri Glazkov. - - Include the FrameView widget of a RenderWidget in the accessibility tree. - https://bugs.webkit.org/show_bug.cgi?id=49106 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::equals): - (WebKit::WebAccessibilityObject::parentObject): - -2010-11-23 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Introduce wrapper types for WebCore::GeolocationError, WebCore::GeolocationPosition. - https://bugs.webkit.org/show_bug.cgi?id=49735 - - Introduce WebKit API types so that the browser implementation can feed - position and error updates to the WebCore::GeolocationController. - - * WebKit.gyp: - * public/WebGeolocationError.h: Added. - (WebKit::WebGeolocationError::WebGeolocationError): - (WebKit::WebGeolocationError::~WebGeolocationError): - * public/WebGeolocationPosition.h: Added. - (WebKit::WebGeolocationPosition::WebGeolocationPosition): - (WebKit::WebGeolocationPosition::~WebGeolocationPosition): - * src/WebGeolocationError.cpp: Added. - (WebKit::WebGeolocationError::assign): - (WebKit::WebGeolocationError::reset): - (WebKit::WebGeolocationError::WebGeolocationError): - (WebKit::WebGeolocationError::operator=): - (WebKit::WebGeolocationError::operator WTF::PassRefPtr<WebCore::GeolocationError>): - * src/WebGeolocationPosition.cpp: Added. - (WebKit::WebGeolocationPosition::assign): - (WebKit::WebGeolocationPosition::reset): - (WebKit::WebGeolocationPosition::operator=): - (WebKit::WebGeolocationPosition::operator PassRefPtr<WebCore::GeolocationPosition>): - -2010-11-23 Jonathan Backer <backer@chromium.org> - - Reviewed by Kenneth Russell. - - Renderer is resizing IOSurfaces when accelerated compositing is disabled. - https://bugs.webkit.org/show_bug.cgi?id=49827 - - - IOSurfaces are only presented when accelerated compositing is enabled. - - Slight performance increase (and clean-up for using this path for Linux and Windows). - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - -2010-11-23 Grace Kloba <klobag@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Accumulated scroll damage rect should be in the content space - https://bugs.webkit.org/show_bug.cgi?id=49842 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::scrollRootLayerRect): Adjust the previous scroll damage with the scroll delta before union it with the new damage rect. - -2010-11-18 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - Add a mechanism for creating a WebURLLoader that is associated with a - particular WebFrame. - https://bugs.webkit.org/show_bug.cgi?id=49764 - - This will be used by code that calls webKitClient()->createURLLoader() - from within the Chromium source tree. - - An associated WebURLLoader should be treated like a subresource of the - WebFrame's document. - - * WebKit.gyp: - * public/WebFrame.h: - * src/AssociatedURLLoader.cpp: Added. - (WebKit::AssociatedURLLoader::AssociatedURLLoader): - (WebKit::AssociatedURLLoader::~AssociatedURLLoader): - (WebKit::AssociatedURLLoader::loadSynchronously): - (WebKit::AssociatedURLLoader::loadAsynchronously): - (WebKit::AssociatedURLLoader::cancel): - (WebKit::AssociatedURLLoader::setDefersLoading): - (WebKit::AssociatedURLLoader::PrepareRequest): - * src/AssociatedURLLoader.h: Added. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::createAssociatedURLLoader): - * src/WebFrameImpl.h: - -2010-11-23 Satish Sampath <satish@chromium.org> - - Unreviewed, chromium build fix. - - * public/WebSpeechInputControllerMock.h: - (WebKit::WebSpeechInputControllerMock::setMockRecognitionResult): - -2010-11-18 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - For speech input event, send an event object containing all the recognition results and metadata. - https://bugs.webkit.org/show_bug.cgi?id=49736 - - Updated mock object's method to new signature. - - * public/WebSpeechInputControllerMock.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::addMockRecognitionResult): - * src/WebSpeechInputControllerMockImpl.h: - -2010-11-22 Alexey Marinichev <amarinichev@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Implement Extensions3DChromium::getGraphicsResetStatusARB - https://bugs.webkit.org/show_bug.cgi?id=49946 - - * public/WebGraphicsContext3D.h: added isContextLost() - * src/Extensions3DChromium.cpp: - (WebCore::Extensions3DChromium::getGraphicsResetStatusARB): - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::isContextLost): - * src/GraphicsContext3DInternal.h: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::isContextLost): - * src/WebGraphicsContext3DDefaultImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::reallocateRenderer): ensure root layer repaining - -2010-11-22 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - Don't create an external popup menu when there are no items to show. - https://bugs.webkit.org/show_bug.cgi?id=49937 - - * src/ExternalPopupMenu.cpp: - (WebKit::ExternalPopupMenu::show): - -2010-11-22 Nat Duca <nduca@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Send didActivateAcceleratedCompositing when compositor - initializes but does not create the shared context3d. - https://bugs.webkit.org/show_bug.cgi?id=49930 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-11-22 Tony Chang <tony@chromium.org> - - Unreviewed, roll Chromium DEPS to r67004. - - * DEPS: - -2010-11-22 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Partially roll out r72282. - It should not have modified devtools files. - - * src/js/devTools.css: - -2010-11-19 Ilya Sherman <isherman@chromium.org> - - Reviewed by Darin Fisher. - - Expose default value of maxLength in Chromium API - https://bugs.webkit.org/show_bug.cgi?id=49723 - - * public/WebInputElement.h: Added constant defaultMaximumLength - * src/WebInputElement.cpp: - -2010-11-18 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - GraphicsContext3D::reshape is clearing using current clear color instead of transparent - https://bugs.webkit.org/show_bug.cgi?id=44064 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): Use 0 as clear values. - -2010-11-19 Tony Chang <tony@chromium.org> - - Unreviewed, updating Chromium DEPS to try and fix the chromium win build. - - * DEPS: r66792 - -2010-11-19 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] Enable webkit's TestNetscapePlugIn for DRT on win and linux - https://bugs.webkit.org/show_bug.cgi?id=49706 - - It is enabled simply by copying the plugin into - {Debug,Release}/plugins. This change also rolls in a version of - Chromium that disables the old plugin. - - * WebKit.gyp: - -2010-11-19 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r72399. - http://trac.webkit.org/changeset/72399 - https://bugs.webkit.org/show_bug.cgi?id=49805 - - Broke Chromium build (Requested by antonm_ on #webkit). - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - * src/ChromeClientImpl.h: - -2010-11-19 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - Removing unused code to show popup externally on Mac. - https://bugs.webkit.org/show_bug.cgi?id=49747 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - * src/ChromeClientImpl.h: - -2010-11-19 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: flip chromium version to mitigate two-sided patch impact. - - * DEPS: - -2010-11-18 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: provide response code and status text as a part - of raw headers data. - https://bugs.webkit.org/show_bug.cgi?id=49668 - - * WebKit.gyp: - * public/WebHTTPLoadInfo.h: Renamed from WebKit/chromium/public/WebResourceRawHeaders.h. - (WebKit::WebHTTPLoadInfo::WebHTTPLoadInfo): - (WebKit::WebHTTPLoadInfo::~WebHTTPLoadInfo): - (WebKit::WebHTTPLoadInfo::operator =): - * public/WebURLResponse.h: - * src/WebHTTPLoadInfo.cpp: Renamed from WebKit/chromium/src/WebResourceRawHeaders.cpp. - (WebKit::WebHTTPLoadInfo::initialize): - (WebKit::WebHTTPLoadInfo::reset): - (WebKit::WebHTTPLoadInfo::assign): - (WebKit::WebHTTPLoadInfo::WebHTTPLoadInfo): - (WebKit::WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>): - (WebKit::WebHTTPLoadInfo::responseCode): - (WebKit::WebHTTPLoadInfo::setResponseCode): - (WebKit::WebHTTPLoadInfo::statusText): - (WebKit::WebHTTPLoadInfo::setStatusText): - (WebKit::addHeader): - (WebKit::WebHTTPLoadInfo::addRequestHeader): - (WebKit::WebHTTPLoadInfo::addResponseHeader): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::httpLoadInfo): - (WebKit::WebURLResponse::setHTTPLoadInfo): - -2010-11-18 Kent Tamura <tkent@chromium.org> - - Reviewed by Tony Chang. - - Add more validation message functions - https://bugs.webkit.org/show_bug.cgi?id=49716 - - Add implementations of new functions and symbols for new messages. - - * public/WebLocalizedString.h: - * src/LocalizedStrings.cpp: - (WebCore::validationMessageValueMissingForCheckboxText): - (WebCore::validationMessageValueMissingForFileText): - (WebCore::validationMessageValueMissingForMultipleFileText): - (WebCore::validationMessageValueMissingForRadioText): - (WebCore::validationMessageValueMissingForSelectText): - -2010-11-18 Tony Chang <tony@chromium.org> - - Unreviewed, fix chromium compile. We need ipc and openssl now. - - * DEPS: - -2010-11-18 James Robinson <jamesr@chromium.org> - - Reviewed by David Levin. - - [chromium] Update chromium DEPS to r66658 to pick up skia roll - https://bugs.webkit.org/show_bug.cgi?id=49754 - - * DEPS: - -2010-11-18 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] IndexedDB API cleanup - https://bugs.webkit.org/show_bug.cgi?id=49733 - - Make it so that you can't directly instantiate our "interface" - classes. Remove some code for 2 sided merges. - - * public/WebIDBCursor.h: - (WebKit::WebIDBCursor::WebIDBCursor): - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::WebIDBDatabase): - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::WebIDBIndex): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::WebIDBObjectStore): - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::WebIDBTransaction): - * src/IDBTransactionBackendProxy.cpp: - (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy): - -2010-11-18 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chrome DevTools: minify front-end JavaScript. - https://bugs.webkit.org/show_bug.cgi?id=49657 - - * scripts/concatenate_js_files.py: - * scripts/jsmin.py: Added. - -2010-11-18 Chris Rogers <crogers@google.com> - - Reviewed by Dimitri Glazkov. - - Add loadPlatformAudioResource() and decodeAudioFileData() to ChromiumBridge - https://bugs.webkit.org/show_bug.cgi?id=49557 - - * WebKit.gyp: - * public/WebAudioBus.h: Added. - (WebKit::WebAudioBus::WebAudioBus): - * public/WebKitClient.h: - (WebKit::WebKitClient::decodeAudioFileData): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::loadPlatformAudioResource): - (WebCore::ChromiumBridge::decodeAudioFileData): - * src/WebAudioBus.cpp: Added. - (WebKit::WebAudioBus::~WebAudioBus): - (WebKit::WebAudioBus::initialize): - (WebKit::WebAudioBus::numberOfChannels): - (WebKit::WebAudioBus::length): - (WebKit::WebAudioBus::sampleRate): - (WebKit::WebAudioBus::channelData): - (WebKit::WebAudioBus::release): - -2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r72228. - http://trac.webkit.org/changeset/72228 - https://bugs.webkit.org/show_bug.cgi?id=49712 - - Caused many >10 regressions on Win and Linux gpu layout test - runs. (Requested by dave_levin on #webkit). - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::bytesPerComponent): - (WebKit::componentsPerPixel): - (WebKit::imageSizeInBytes): - (WebKit::WebGraphicsContext3DDefaultImpl::texImage2D): - -2010-11-17 Dimitri Glazkov <dglazkov@chromium.org> - - Reviewed by Darin Adler. - - Converge means of querying a parent node into one way, which is Node::parentNode. - https://bugs.webkit.org/show_bug.cgi?id=49686 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::insertStyleText): Changed to use parentNode. - (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection): Ditto. - -2010-11-16 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - WebGLRenderingContext needs to zero textures and renderbuffers - https://bugs.webkit.org/show_bug.cgi?id=49355 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Don't deal with texture initialization at this level. - -2010-11-17 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Clear the speech input mock explicitly before each test. - https://bugs.webkit.org/show_bug.cgi?id=49660 - - * public/WebSpeechInputControllerMock.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::clearResults): Added method to clear results. - * src/WebSpeechInputControllerMockImpl.h: - -2010-11-17 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - [Chromium] implementation of async FileWriter for workers - https://bugs.webkit.org/show_bug.cgi?id=47681 - - Tests are in a separate changelist. - - Added new files. - * WebKit.gyp: - - * src/WorkerAsyncFileSystemChromium.cpp: Added WorkerAsyncFileWriterChromium construction. - * src/WorkerAsyncFileWriterChromium.cpp: Added. - * src/WorkerAsyncFileWriterChromium.h: Added. - - This class bridges between the context and main threads for the WorkerAsyncFileWriterChromium. - * src/WorkerFileWriterCallbacksBridge.cpp: Added. - * src/WorkerFileWriterCallbacksBridge.h: Added. - -2010-11-17 John Mellor <johnme@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Expose frame flattening setting in WebSettings. - https://bugs.webkit.org/show_bug.cgi?id=49621 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setFrameFlatteningEnabled): - * src/WebSettingsImpl.h: - -2010-11-17 Jonathan Backer <backer@chromium.org> - - Reviewed by Kenneth Russell. - - [Chromium] Resize initiated by renderer. - https://bugs.webkit.org/show_bug.cgi?id=49617 - - To address synchronization issues with resizing, make resize work like DARWIN. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - -2010-11-17 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by Dimitri Glazkov. - - Fix click count for mouse-up events. - - clickCount for mouse up was lost in conversion from NSEvent - - clickCount was also lost when disptaching events through the - plugin mouse capture event codepath. - - https://bugs.webkit.org/show_bug.cgi?id=49290 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleInputEvent): - * src/mac/WebInputEventFactory.mm: - (WebKit::WebInputEventFactory::mouseEvent): - -2010-11-11 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Implement UNPACK_COLORSPACE_CONVERSION_WEBGL - https://bugs.webkit.org/show_bug.cgi?id=47196 - - * src/WebImageDecoder.cpp: - (WebKit::WebImageDecoder::init): Add ignoreGammaAndColorProfile parameter. - -2010-11-12 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Refactor GL backend flags - https://bugs.webkit.org/show_bug.cgi?id=49460 - - * public/WebGraphicsContext3D.h: Remove GL flag queries at this level. - * src/GraphicsContext3DChromium.cpp: Ditto. - * src/GraphicsContext3DInternal.h: Ditto. - * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto. - * src/WebGraphicsContext3DDefaultImpl.h: Ditto. - -2010-11-16 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Chromium build fix. - - * WebKit.gyp: - * scripts/concatenate_css_files.py: Renamed from WebKit/chromium/Build/concatenate_css_files.py. - * scripts/concatenate_js_files.py: Renamed from WebKit/chromium/Build/concatenate_js_files.py. - * scripts/generate_devtools_html.py: Renamed from WebKit/chromium/Build/generate_devtools_html.py. - -2010-11-16 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chrome DevTools: concatenate CSS files, do not link - missing JS files in release mode. - https://bugs.webkit.org/show_bug.cgi?id=49586 - - * Build/concatenate_css_files.py: Added. - * Build/concatenate_js_files.py: Added. - * Build/generate_devtools_html.py: Added. - * WebKit.gyp: - -2010-11-15 Nat Duca <nduca@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Make WebWidget actively notify client when compositing enables. - https://bugs.webkit.org/show_bug.cgi?id=49396 - - * public/WebWidgetClient.h: - (WebKit::WebWidgetClient::didAcceleratedCompositingEnable): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::setRootLayerNeedsDisplay): - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-11-15 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Remove assumption that GL functions are function pointers - https://bugs.webkit.org/show_bug.cgi?id=49486 - - Added appropriate extension queries and no longer assume that GL - function names are function pointers which can be tested. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::generateMipmap): - (WebKit::WebGraphicsContext3DDefaultImpl::getString): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-11-15 Ilya Sherman <isherman@chromium.org> - - Reviewed by Kent Tamura. - - Add capability for displaying warnings to autofill popup - Warnings are displayed in dark gray italic. - https://bugs.webkit.org/show_bug.cgi?id=49291 - http://code.google.com/p/chromium/issues/detail?id=58509 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::canRemoveSuggestionAtIndex): - Updated logic -- can only remove Autocomplete suggestions, which have unique ID 0. - (WebKit::AutoFillPopupMenuClient::itemIsEnabled): False for warnings. - (WebKit::AutoFillPopupMenuClient::itemStyle): Dark gray italic for warnings. - (WebKit::AutoFillPopupMenuClient::menuStyle): Variable name changed. - (WebKit::AutoFillPopupMenuClient::itemIsWarning): True for unique ID < 0. - (WebKit::AutoFillPopupMenuClient::initialize): Updated cached styles (see above). - * src/AutoFillPopupMenuClient.h: Added itemIsEnabled(), variable to cache warning style. - * src/WebViewImpl.cpp: Minor cleanup. - (WebKit::WebViewImpl::applyAutoFillSuggestions): - -2010-11-14 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - Improve API for form validation message strings - https://bugs.webkit.org/show_bug.cgi?id=34945 - - * public/WebLocalizedString.h: - * src/LocalizedStrings.cpp: - (WebCore::validationMessageTypeMismatchForEmailText): - (WebCore::validationMessageTypeMismatchForMultipleEmailText): - (WebCore::validationMessageTypeMismatchForURLText): - (WebCore::validationMessageTooLongText): - (WebCore::validationMessageRangeUnderflowText): - (WebCore::validationMessageRangeOverflowText): - (WebCore::validationMessageStepMismatchText): - -2010-11-13 Shinichiro Hamaji <hamaji@chromium.org> - - Reviewed by Kent Tamura. - - [Chromium] print doesn't work on http://nodejs.org/api.html - https://bugs.webkit.org/show_bug.cgi?id=49304 - - * src/WebFrameImpl.cpp: - (WebKit::ChromePrintContext::begin): - (WebKit::WebFrameImpl::printBegin): - -2010-11-12 James Simonsen <simonjam@chromium.org> - - Reviewed by Darin Fisher. - - [Web Timing] Rename interfaces: - - Navigation -> PerformanceNavigation - - Timing -> PerformanceTiming - https://bugs.webkit.org/show_bug.cgi?id=48919 - - * src/WebPerformance.cpp: - (WebKit::WebPerformance::navigationType): - -2010-11-12 Zhenyao Mo <zmo@google.com> - - Reviewed by James Robinson. - - WebGraphicsContext3DDefaultImpl does not run on top of OpenGL ES 2.0 implementations - https://bugs.webkit.org/show_bug.cgi?id=48282 - - Simple fix for a regression introduced in r71793. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - -2010-11-12 Ilya Sherman <isherman@chromium.org> - - Reviewed by Eric Seidel. - - Remove some trailing whitespace - https://bugs.webkit.org/show_bug.cgi?id=49433 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createPopupMenu): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - -2010-11-11 MORITA Hajime <morrita@google.com> - - Unreviewed another attempt to fx windows build. - - * src/WebBindings.cpp: - (WebKit::makeStringArrayImpl): - -2010-11-11 MORITA Hajime <morrita@google.com> - - Unreviewed attempt to fx windows build. - - * src/WebBindings.cpp: - (WebKit::makeStringArrayImpl): - -2010-11-11 MORITA Hajime <morrita@google.com> - - Reviewed by Kent Tamura. - - editing/selection/context-menu-on-text.html fails on chromium - https://bugs.webkit.org/show_bug.cgi?id=45898 - - Added makeStringArray(), that is used by DumpRenderTree. - - * public/WebBindings.h: - * src/WebBindings.cpp: - (WebKit::makeStringArrayImpl): Added. - (WebKit::WebBindings::makeStringArray): Added. - -2010-11-11 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Nate Chapin. - - [chromium] Convert WebPerformance doubles to seconds - https://bugs.webkit.org/show_bug.cgi?id=49232 - - This makes them suitable for passing to Time::FromDoubleT(). - - * src/WebPerformance.cpp: - (WebKit::millisecondsToSeconds): - (WebKit::WebPerformance::navigationStart): - (WebKit::WebPerformance::unloadEventEnd): - (WebKit::WebPerformance::redirectStart): - (WebKit::WebPerformance::redirectEnd): - (WebKit::WebPerformance::fetchStart): - (WebKit::WebPerformance::domainLookupStart): - (WebKit::WebPerformance::domainLookupEnd): - (WebKit::WebPerformance::connectStart): - (WebKit::WebPerformance::connectEnd): - (WebKit::WebPerformance::requestStart): - (WebKit::WebPerformance::requestEnd): - (WebKit::WebPerformance::responseStart): - (WebKit::WebPerformance::responseEnd): - (WebKit::WebPerformance::loadEventStart): - (WebKit::WebPerformance::loadEventEnd): - -2010-11-11 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: signal IDBFactoryBackendInterface destruction to embedder - https://bugs.webkit.org/show_bug.cgi?id=49313 - - Implement ChromiumBridge::idbShutdown(), passing through to the - WebKitClient. - - * public/WebKitClient.h: - (WebKit::WebKitClient::idbShutdown): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::idbShutdown): - -2010-11-10 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Clean up gfx::GetGLImplementation calls in WebGraphicsContext3DDefaultImpl - https://bugs.webkit.org/show_bug.cgi?id=49336 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): - -2010-11-10 Evan Stade <estade@chromium.org> - - Reviewed by Tony Chang. - - [chromium] menu key doesn't work when capslock or numslock is on - https://bugs.webkit.org/show_bug.cgi?id=49289 - - Add a special bitmask for the "input" modifier keys (shift, alt, crtl, meta). The Modifier - enum has grown to something that might be better termed State, but changing the nomenclature - now is difficult. The bitmask gets its name from the related function getWebInputModifiers. - - * public/WebInputEvent.h: add InputModifiers mask for true modifier keys - * src/WebViewImpl.cpp: disregard non-modifier keys - (WebKit::WebViewImpl::keyEvent): - -2010-11-10 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by David Hyatt. - - HTML5 Ruby support should be mandatory feature - https://bugs.webkit.org/show_bug.cgi?id=49272 - - Remove Ruby as optional feature. - - * features.gypi: - -2010-11-10 Tony Chang <tony@chromium.org> - - Unreviewed, add libvpx as a chromium dependency. - - This should fix the chromium linux build. - - * DEPS: - -2010-11-10 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Replaces script line number with TextPosition structure. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - -2010-11-09 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - WebGraphicsContext3DDefaultImpl does not run on top of OpenGL ES 2.0 implementations - https://bugs.webkit.org/show_bug.cgi?id=48282 - - Fixed assumptions in WebGraphicsContext3DDefaultImpl that it was - running on top of desktop GL. - - Tested various WebGL demos on Windows with ANGLE and - --in-process-webgl --disable-accelerated-compositing; all are now - working. Verified that --use-gl=desktop continues to work in the - same configuration. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2Compliant): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): - (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-11-09 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Add form validation message support to WebLocalizedString.h - https://bugs.webkit.org/show_bug.cgi?id=49239 - - * DEPS: Roll Chromium revision to r65502 to have crrev.com/65502 - * public/WebLocalizedString.h: Add new symbols - * src/LocalizedStrings.cpp: Call query() with the new symbols in the following functions. - (WebCore::validationMessageValueMissingText): - (WebCore::validationMessageTypeMismatchText): - (WebCore::validationMessagePatternMismatchText): - (WebCore::validationMessageTooLongText): - (WebCore::validationMessageRangeUnderflowText): - (WebCore::validationMessageRangeOverflowText): - (WebCore::validationMessageStepMismatchText): - -2010-11-09 Tony Chang <tony@chromium.org> - - Unreviewed, rolling chromium DEPS. - - * DEPS: Roll to r65462. - -2010-11-09 Mihai Parparita <mihaip@chromium.org> - - Unreviewed Chromium Windows build fix. - - Add isDisplayNone to the PopupMenuStyle constructor call in - PopupMenuTest (necessary after r71618). - - * tests/PopupMenuTest.cpp: - (WebKit::TestPopupMenuClient::itemStyle): - -2010-11-09 Shinichiro Hamaji <hamaji@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] display:none has no effect on <option> element - https://bugs.webkit.org/show_bug.cgi?id=49169 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::initialize): - -2010-11-09 James Simonsen <simonjam@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Web Timing] Remove requestEnd - https://bugs.webkit.org/show_bug.cgi?id=48924 - - * public/WebPerformance.h: - * src/WebPerformance.cpp: - -2010-11-08 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Steve Block. - - Convert to and from DOMTimeStamp with converter functions - https://bugs.webkit.org/show_bug.cgi?id=49066 - - * src/WebDataSourceImpl.cpp: - (WebKit::WebDataSourceImpl::triggeringEventTime): - - -2010-11-08 Pierre-Antoine LaFayette <pierre.lafayette@gmail.com> - - Reviewed by Darin Fisher. - - [chromium] Adding hasUserGesture flag to the ResourceRequest - https://bugs.webkit.org/show_bug.cgi?id=37057 - - This flag is to be used on the browser side to indicate when a - download has been user initiated. - - * public/WebURLRequest.h: - * src/WebURLRequest.cpp: - (WebKit::WebURLRequest::hasUserGesture): - (WebKit::WebURLRequest::setHasUserGesture): - -2010-11-08 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Add an API to WebViewClient that report the load progress for a frame. - https://bugs.webkit.org/show_bug.cgi?id=49137 - - * public/WebViewClient.h: - (WebKit::WebViewClient::didChangeLoadProgress): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::postProgressEstimateChangedNotification): - - 2010-11-08 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=48685 - Notify UI process about focused frame - - Added an empty implementation of the new ChromeClient method. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedFrameChanged): - * src/ChromeClientImpl.h: - -2010-11-08 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Only call WebInspector_syncDispatch if it's actually a function. - https://bugs.webkit.org/show_bug.cgi?id=49180 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend): - * src/WebDevToolsFrontendImpl.h: - -2010-11-07 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Rename Cache to MemoryCache - https://bugs.webkit.org/show_bug.cgi?id=49159 - - * public/WebCache.h: - * src/WebCache.cpp: - (WebKit::ToResourceTypeStat): - (WebKit::WebCache::setCapacities): - (WebKit::WebCache::clear): - (WebKit::WebCache::getUsageStats): - (WebKit::WebCache::getResourceTypeStats): - -2010-11-07 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Kent Tamura. - - Fixing a crasher with the select popup on Mac that happens when a - page removes the select node when the select changes. - https://bugs.webkit.org/show_bug.cgi?id=49108 - - * src/ExternalPopupMenu.cpp: - (WebKit::ExternalPopupMenu::didAcceptIndex): - (WebKit::ExternalPopupMenu::didCancel): - -2010-11-06 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Chromium DevTools: disable filesystem inspection - until polished. - https://bugs.webkit.org/show_bug.cgi?id=48963 - - * src/js/DevTools.js: - -2010-11-05 Ilya Sherman <isherman@chromium.org> - - Reviewed by Simon Fraser. - - Querying selection start and end should be const - https://bugs.webkit.org/show_bug.cgi?id=48786 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::selectionStart): - (WebKit::WebInputElement::selectionEnd): - -2010-11-05 Chris Marrin <cmarrin@apple.com> - - Reviewed by Simon Fraser. - - Move resumeAnimations/suspendAnimations from Frame to AnimationController. - https://bugs.webkit.org/show_bug.cgi?id=49073 - - * src/WebAnimationControllerImpl.cpp: - (WebKit::WebAnimationControllerImpl::suspendAnimations): - (WebKit::WebAnimationControllerImpl::resumeAnimations): - -2010-11-04 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Need to simulate DEPTH_STENCIL in framebufferRenderbuffer / getFramebufferAttachmentParameter - https://bugs.webkit.org/show_bug.cgi?id=49020 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Remove DEPTH_STENCIL_ATTACHMENT emulation at this level. - -2010-11-05 Darin Fisher <darin@chromium.org> - - Pull chromium@65229 to fix the build. - - * DEPS: - -2010-11-05 Darin Fisher <darin@chromium.org> - - Reviewed by Nate Chapin. - - Replace deprecated TargetIsSub{Frame,Resource} with TargetIsSub{frame,resource}. - https://bugs.webkit.org/show_bug.cgi?id=49074 - - * public/WebURLRequest.h: - * src/FrameLoaderClientImpl.cpp: - -2010-11-05 Charlie Reis <creis@chromium.org> - - Reviewed by Darin Fisher. - - WebFrame::previousHistoryItem() should return last committed item. - https://bugs.webkit.org/show_bug.cgi?id=48809 - - * src/WebFrameImpl.cpp: - -2010-10-27 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Clean up IDBTransactionBackend/Coordinator - https://bugs.webkit.org/show_bug.cgi?id=48425 - - Remove obsolete ::id() method. - - * public/WebIDBTransaction.h: - * src/IDBTransactionBackendProxy.cpp: - * src/IDBTransactionBackendProxy.h: - * src/WebIDBTransactionImpl.cpp: - * src/WebIDBTransactionImpl.h: - -2010-11-04 usaini <usaini08@gmail.com> - - Reviewed by Antonio Gomes. - - WebWindowFeatures has a faulty constructor for WebCore::WindowFeatures - https://bugs.webkit.org/show_bug.cgi?id=48035 - - * public/WebWindowFeatures.h: - (WebKit::WebWindowFeatures::WebWindowFeatures): updated the constructor - that takes in a WebCore::WindowFeature and had it copy all the variables - over properly so that after calling the constructor WebWindowFeatures is - always in a valid state. Before, the x,y,width,height booleans may be true, but - the corresponding int values would not be updated. - -2010-11-04 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Remove IMPLEMENTATION_COLOR_READ_FORMAT and TYPE - https://bugs.webkit.org/show_bug.cgi?id=48938 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): - -2010-11-04 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Adam Barth. - - Web Inspector: Enable files ystem UI for chromium - https://bugs.webkit.org/show_bug.cgi?id=48963 - - * src/js/DevTools.js: - -2010-11-03 Adam Barth <abarth@webkit.org> - - Roll Chromium DEPS - https://bugs.webkit.org/show_bug.cgi?id=48978 - - * DEPS: - -2010-11-03 Vincent Scheib <scheib@chromium.org> - - Reviewed by James Robinson. - - [chromium] GraphicsContext3D creation attributes include canRecoverFromContextLoss option - https://bugs.webkit.org/show_bug.cgi?id=48850 - - Implementations of GraphicsContext3D may respect the creation attribute - canRecoverFromContextLoss being false, and then only succeeding initialization if - the context can satisfy that request of never being lost. DX9 on XP can not satisfy - such a request. - - Test by use of accelerated canvas 2d in Chromium with ANGLE on XP machines. - - * public/WebGraphicsContext3D.h: - (WebKit::WebGraphicsContext3D::Attributes::Attributes): - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - -2010-11-03 Jenn Braithwaite <jennb@chromium.org> - - Reviewed by Dmitry Titov. - - Chromium: Update resource tracking when moving a frame between documents - https://bugs.webkit.org/show_bug.cgi?id=48363 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::removeIdentifierForRequest): - Added - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::transferLoadingResourceFromPage): - Notify current WebFrameClient of the resource and remove from - former WebFrameClient. - -2010-11-03 Adam Barth <abarth@webkit.org> - - Roll Chromium DEPs - https://bugs.webkit.org/show_bug.cgi?id=48959 - - * DEPS: - -2010-11-03 Kenneth Russell <kbr@google.com> - - Reviewed by Chris Marrin. - - Redesign extension mechanism in GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=46894 - - Upon request, factored out extension support from GraphicsContext3D - into a new Extensions3D class. (The plural was chosen because the - class and subclasses hold multiple extensions.) - - Unlike GraphicsContext3D, Extensions3D contains only pure virtual - methods. This was done because Extensions3D's inheritance diagram - and usage pattern is very different from that of GraphicsContext3D, - and the concrete subclasses need to decide how to implement the - various entry points. Requiring them to be placed at the - Extensions3D level will cause implementation details to leak into - the base class, which is highly undesirable. Any virtual call - overhead to these entry points will be negligible. - - Changed call sites utilizing these extensions to call through the - Extensions3D object or its subclasses. - - Tested: - - Chromium on Linux with accelerated 2D canvas and HTML5 video - - Chromium on Mac OS X with WebGL and CSS 3D content - - Safari on Mac OS X with WebGL and CSS 3D content - - No new tests. Covered by existing tests. - - * WebKit.gyp: - * public/WebGraphicsContext3D.h: - * src/Extensions3DChromium.cpp: Added. - (WebCore::Extensions3DChromium::Extensions3DChromium): - (WebCore::Extensions3DChromium::~Extensions3DChromium): - (WebCore::Extensions3DChromium::supports): - (WebCore::Extensions3DChromium::getGraphicsResetStatusARB): - (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM): - (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM): - (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM): - (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM): - (WebCore::Extensions3DChromium::copyTextureToParentTextureCHROMIUM): - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::getExtensions): - (WebCore::GraphicsContext3DInternal::supportsExtension): - * src/GraphicsContext3DInternal.h: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::copyTextureToParentTextureCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::getString): - * src/WebGraphicsContext3DDefaultImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::composite): - -2010-11-03 Daniel Bates <dbates@rim.com> - - For unnamed frames, window.name returns a generated name - https://bugs.webkit.org/show_bug.cgi?id=6751 - - Part 1 of 2. - - Substitute FrameTree::uniqueName() for FrameTree::name() in the Chromium port. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::name): - -2010-11-02 Al Patrick <apatrick@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Plugin instances can propagate the ID of the OpenGL texture they render to. - - https://bugs.webkit.org/show_bug.cgi?id=48032 - - * public/WebPlugin.h: - (WebKit::WebPlugin::getBackingTextureId): - * public/WebPluginContainer.h: - (WebKit::WebPluginContainer::commitBackingTexture): - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::commitBackingTexture): - (WebKit::WebPluginContainerImpl::platformLayer): - (WebKit::WebPluginContainerImpl::WebPluginContainerImpl): - * src/WebPluginContainerImpl.h: - -2010-11-02 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Dumitru Daniliuc. - - [FileSystem] Support not creating directories when queried by inspector. - https://bugs.webkit.org/show_bug.cgi?id=48169 - - * src/LocalFileSystemChromium.cpp: - (WebCore::LocalFileSystem::readFileSystem): - (WebCore::LocalFileSystem::requestFileSystem): - -2010-11-02 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Chromium: Propagate a document value changed notification on scroll. - https://bugs.webkit.org/show_bug.cgi?id=48817 - - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::boundingBoxRect): - -2010-10-29 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium]: Allow plugins to use optimized scrolling - https://bugs.webkit.org/show_bug.cgi?id=48660 - - * public/WebPluginContainer.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::scrollRect): - * src/WebPluginContainerImpl.h: - -2010-11-02 Marc-Antoine Ruel <maruel@chromium.org> - - Reviewed by Dimitri Glazkov. - - Disable incremental linking for webkit_unit_test and DumpRenderTRee on x86 Windows on chromium build. - https://bugs.webkit.org/show_bug.cgi?id=48836 - - It fails to link otherwise due to lack of virtual address space. - - * WebKit.gyp: - -2010-11-02 Ilya Sherman <isherman@chromium.org> - - Reviewed by Kent Tamura. - - Expose the sendChangeEvent parameter in WebInputElement::setValue() API, - primarily so that chromium form autofill can fire the onChange event. - https://bugs.webkit.org/show_bug.cgi?id=48177 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::setValue): - -2010-11-02 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: make properties and event listeners look consistent with the styles section. - https://bugs.webkit.org/show_bug.cgi?id=48827 - - * src/js/devTools.css: - -2010-11-01 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] Compile TestNetscapePlugin on chromium win - https://bugs.webkit.org/show_bug.cgi?id=48802 - - It creates npTestNetscapePlugin.dll in the build directory, so - it's not yet loaded by DRT or test_shell. - - * WebKit.gyp: - -2010-11-01 Brady Eidson <beidson@apple.com> - - Reviewed by Anders Carlsson. - - <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699 - Context menu support for WebKit 2. - - * src/ChromeClientImpl.h: - (WebKit::ChromeClientImpl::showContextMenu): - -2010-11-01 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: Chromium build fix. - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::WebDevToolsAgentImpl): - -2010-11-01 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: remove old resources panel. - https://bugs.webkit.org/show_bug.cgi?id=45657 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - * src/WebDevToolsAgentImpl.h: - -2010-11-01 Leandro Gracia Gil <leandrogracia@google.com> - - Reviewed by Jeremy Orlow. - - This is the last part of a 4-sided patch for the language attribute - in speech text buttons. This patch removes what now is dead code - and re-enables the layout test introduced by bug 47089. - https://bugs.webkit.org/show_bug.cgi?id=47420 - - * public/WebSpeechInputControllerMock.h: - * src/WebSpeechInputControllerMockImpl.cpp: - * src/WebSpeechInputControllerMockImpl.h: - -2010-10-31 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: unhide new network and resources panels. - https://bugs.webkit.org/show_bug.cgi?id=48725 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - -2010-10-29 Daniel Bates <dbates@rim.com> - - No review, rolling out 70971. - http://trac.webkit.org/changeset/70971 - https://bugs.webkit.org/show_bug.cgi?id=6751 - - Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since - it caused layout test failures on all bots. In particular, the - child count in a generated frame name differs after this patch. We need - to look into this further. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::name): - -2010-10-28 Antonio Gomes <agomes@rim.com> - - Reviewed by Ojan Vafai. - - Needs a "LinuxEditingBehavior", perhaps with a better name - https://bugs.webkit.org/show_bug.cgi?id=36627 - - Added the corresponding Chromium setting to WebCore's EditingUnixBehavior: EditingBehaviorUnix. - - * public/WebSettings.h: - * src/AssertMatchingEnums.cpp: - -2010-10-29 Daniel Bates <dbates@rim.com> - - Reviewed by Adam Barth. - - For unnamed frames, window.name returns a generated name - https://bugs.webkit.org/show_bug.cgi?id=6751 - - Modified Chromium-port to use FrameTree::uniqueName(). - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::name): - -2010-10-29 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: FileSystem integration - https://bugs.webkit.org/show_bug.cgi?id=45982 - - * public/WebFileUtilities.h: - (WebKit::WebFileUtilities::revealFolderInOS): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::revealFolderInOS): - - -2010-10-29 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - Change BackForwardList clients to use BackForwardListImpl to prepare for further refactoring - https://bugs.webkit.org/show_bug.cgi?id=48574 - - * src/BackForwardListClientImpl.h: Use BackForwardListImpl.h. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): Cast to BackForwardList* before calling setClient. - -2010-10-28 Michael Nordman <michaeln@google.com> - - Reviewed by ap. - - [Chrome] Fix an appcache regression introduced in r69226 - https://bugs.webkit.org/show_bug.cgi?id=48592 - Provide a noop method body ApplicationCacheHost::maybeLoadMainResourceForRedirect. - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::maybeLoadMainResourceForRedirect): - -2010-10-29 Aaron Colwell <acolwell@chromium.org> - - Reviewed by James Robinson. - - Fix globalAlpha support when using drawImage() to copy a video frame - to a 2D canvas context. - https://bugs.webkit.org/show_bug.cgi?id=48094 - - This fix applies the globalAlpha value to the canvas before passing it - down to the lower layers that don't have access to the graphics - context. This makes sure that any drawing on the canvas will have the - proper global alpha value applied. - - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::paint): - -2010-10-29 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=48576 - Let WebKit2 client know when a frame is a frameset - - Added a blank implementation of the new FrameLoaderClient method. - - * src/FrameLoaderClientImpl.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidBecomeFrameset): - -2010-10-29 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: add close button to network view, make tests pass - for resource manager on all ports. - https://bugs.webkit.org/show_bug.cgi?id=48628 - - * src/js/Tests.js: - -2010-10-29 Csaba Osztrogonác <ossy@webkit.org> - - Reviewed by Adam Roben and David Kilzer. - - Fix and cleanup of build systems - https://bugs.webkit.org/show_bug.cgi?id=48342 - - * features.gypi: Remove unnecessary ENABLE_SANDBOX. - -2010-10-29 Leandro Gracia Gil <leandrogracia@google.com> - - Reviewed by Jeremy Orlow. - - Patch the current speech input implementation to use the nearest - language tag. The language is now passed to the startRecognition - methods so that language-specific recognition could be used. Also added - a second parameter to setMockSpeechInputResult for the language used in - speech recognition. - https://bugs.webkit.org/show_bug.cgi?id=47089 - - This is the 2nd of a 4-sided patch in Chromium and WebKit. For more - details see http://codereview.chromium.org/3615005/show, - http://codereview.chromium.org/3595018/show and - https://bugs.webkit.org/show_bug.cgi?id=47420. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::create): - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-28 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel, Peter Kasting, and Darin Fisher. - (Eric reviewed the CoreGraphics interactions, Peter reviewed the image - decoder interaction, and Darin Fisher SGTMed the policy decision.) - - [chromium] Chromium Mac should use WebKit's image decoders - https://bugs.webkit.org/show_bug.cgi?id=47974 - - Enable WebKit's image decoders. - - * features.gypi: - -2010-10-28 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Darin Adler. - - [Chromium] History related tests REGRESSED after r70723 - https://bugs.webkit.org/show_bug.cgi?id=48513 - - Since r70723 made BackForwardList::currentItem no longer be virtual, - we were not reaching the implementation in Chromium's - BackForwardListClientImpl, and for Chromium currentItem is not the same - as itemAtIndex(0). - - The fix is to make itemAtIndex(0) have the currentItem() behavior, which - lets us keep currentItem as non-virtual (and remove its implementation - from the Chromium side). - - This also switches Chromium to use the default implementation of - backItem() and forwardItem() (vs. the old stubs that just had - ASSERT_NOT_REACHED) since they're actually reacheable with Chromium - code thanks to the calls in FrameLoader::checkDidPerformFirstNavigation. - - * src/BackForwardListClientImpl.cpp: - (WebKit::BackForwardListClientImpl::itemAtIndex): - * src/BackForwardListClientImpl.h: - -2010-10-28 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by David Levin. - - [Chromium] Support FileSystem in chromium DRT - https://bugs.webkit.org/show_bug.cgi?id=47643 - Update the chromium DEPS to pick up corresponding webkit_support change. - Also add a temporary glue implementation with FIXME comment to - WebFrameClient::openFileSystem. - - * DEPS: - * public/WebFrameClient.h: - (WebKit::WebFrameClient::openFileSystem): - -2010-10-28 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Remove obsolete public/API methods in chromium port - https://bugs.webkit.org/show_bug.cgi?id=48504 - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - -2010-10-27 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - [Chromium] Metadata queries should return full file info, not just modification time - https://bugs.webkit.org/show_bug.cgi?id=48098 - - * src/AssertMatchingEnums.cpp: Ensure WebFileInfo and FileMetadata use the same values for file/directory indicators. - * src/WebFileSystemCallbacksImpl.cpp: - (WebKit::WebFileSystemCallbacksImpl::didReadMetadata): Pass through the new information. - -2010-10-27 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - [chromium] WebGL does not work with the compositor in test_shell - https://bugs.webkit.org/show_bug.cgi?id=48470 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer): - - Properly restore the draw framebuffer after resolving. - (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture): - - Make the context current before calling resolveMultisampledFramebuffer. - -2010-10-27 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by David Levin. - - Include caps lock state when converting NSEvent modifiers to - WebInputEvent - - https://bugs.webkit.org/show_bug.cgi?id=47917 - - * src/mac/WebInputEventFactory.mm: - (WebKit::modifiersFromEvent): - -2010-10-27 Chris Rogers <crogers@google.com> - - Reviewed by James Robinson. - - Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) for Chromium - https://bugs.webkit.org/show_bug.cgi?id=48465 - - * features.gypi: - -2010-10-25 Tony Chang <tony@chromium.org> - - Reviewed by Anders Carlsson. - - compile TestNetscapePlugIn on chromium linux - https://bugs.webkit.org/show_bug.cgi?id=48274 - - * WebKit.gyp: Enable compilation of TestNetscapePlugIn on Linux. - -2010-10-27 Satish Sampath <satish@chromium.org> - - Unreviewed, rolling out r70665. - http://trac.webkit.org/changeset/70665 - https://bugs.webkit.org/show_bug.cgi?id=47089 - - Need to address Alexey's review comments. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-27 ZHenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Must enable GL_POINT_SPRITE in GraphicsContext3D implementations - https://bugs.webkit.org/show_bug.cgi?id=45908 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Enable for chromium --in-process-webgl port. - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - -2010-10-27 Leandro Gracia Gil <leandrogracia@google.com> - - Reviewed by Jeremy Orlow. - - Patch the current speech input implementation to use the nearest - language tag. The language is now passed to the startRecognition - methods so that language-specific recognition could be used. Also added - a second parameter to setMockSpeechInputResult for the language used in - speech recognition. - https://bugs.webkit.org/show_bug.cgi?id=47089 - - This is the 2nd of a 4-sided patch in Chromium and WebKit. For more - details see http://codereview.chromium.org/3615005/show and - http://codereview.chromium.org/3595018/show. The last of the 4 patches - depends also on the language tag validation provided by this patch: - https://bugs.webkit.org/show_bug.cgi?id=48225. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::create): - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-26 Victoria Kirst <vrk@google.com> - - Reviewed by David Levin. - - Fix compile when ACCELERATED_COMPOSITING flag is not set - https://bugs.webkit.org/show_bug.cgi?id=48373 - - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl): - (WebKit::WebMediaPlayerClientImpl::readyStateChanged): - (WebKit::WebMediaPlayerClientImpl::load): - * src/WebMediaPlayerClientImpl.h: - -2010-10-26 MORITA Hajime <morrita@google.com> - - Reviewed by Tony Chang. - - Rolling in r70512 again. - - spellcheck='' should be the same as spellcheck="true" - https://bugs.webkit.org/show_bug.cgi?id=25539 - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::shouldSpellcheckByDefault): - -2010-10-26 Jenn Braithwaite <jennb@chromium.org> - - Reviewed by Dmitry Titov. - - Resource tracking failure when trying to move a frame between documents - https://bugs.webkit.org/show_bug.cgi?id=44713 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::transferLoadingResourceFromPage): - Empty method. - * src/FrameLoaderClientImpl.h: - -2010-10-26 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Add a 'grammar' attribute for speech input. - https://bugs.webkit.org/show_bug.cgi?id=48339 - - To differentiate between various types of speech input, we add a 'x-webkit-grammar' attribute to a - speech enabled input element. This is passed without validation to the speech recognizer. Typical values - could be "builtin:search", "builtin:dictation" and even an externally hosted SRGS grammar XML file URI. - It is up to the recognizer to interpret the value and use it as an aid in recognition. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - -2010-10-26 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - IndexedDB: update stale comments referring to WebIndexedDatabase. - https://bugs.webkit.org/show_bug.cgi?id=48325 - - WebIndexedDatabase was renamed to WebIDBFactory in - http://trac.webkit.org/changeset/64344, but some comments referring to - it were left unchanged. - - * public/WebIDBCursor.h: - * public/WebIDBDatabase.h: - * public/WebIDBDatabaseError.h: - * public/WebIDBIndex.h: - * public/WebIDBObjectStore.h: - * public/WebIDBTransaction.h: - * src/WebIDBDatabaseImpl.h: - -2010-10-22 Stephen White <senorblanco@chromium.org> - - Reviewed by Kenneth Russell. - - Implement copy-texture-to-parent-texture API for WebGraphicsContext3DDefaultImpl. - https://bugs.webkit.org/show_bug.cgi?id=48152 - - This allows the in-process implementation to do accelerated canvas and - accelerated compositing together. It requires some changes landed - in chromium 63528, so this patch also rolls chromium DEPS to 63722 - (current LKGR). - - Covered by fast/canvas/arc360.html, and many more when run with - --accelerated-compositing and --accelerated-2d-canvas. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - Add member vars to save the currently-bound texture and for the - texture-to-texture FBO. - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - Delete the texture-to-texture FBO on destruction. - - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - Generate the texture-to-texture FBO. - (WebKit::WebGraphicsContext3DDefaultImpl::supportsCopyTextureToParentTextureCHROMIUM): - Check for support of the glGetTexLevelParameteriv function (required - for this implementation). - (WebKit::WebGraphicsContext3DDefaultImpl::copyTextureToParentTextureCHROMIUM): - Implement the extension: bind the FBO, bind the child texture, then - do a glCopyTexImage2D() into the parent texture. - (WebKit::WebGraphicsContext3DDefaultImpl::bindTexture): - Record the newly-bound texture in m_boundTexture. - * src/WebGraphicsContext3DDefaultImpl.h: - Add the two new member variables. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::graphicsContext3D): - Make sure the graphics context is reshaped to the correct size on all - platforms. - -2010-10-26 Alexey Marinichev <amarinichev@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Check getGraphicsResetStatusARB and reinitialize the - renderer in an error is returned. - https://bugs.webkit.org/show_bug.cgi?id=47848 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::composite): added getGraphicsResetStatusARB check - (WebKit::WebViewImpl::reallocateRenderer): added - * src/WebViewImpl.h: - -2010-10-26 Kenneth Russell <kbr@google.com> - - Reviewed by Andreas Kling. - - Valgrind failure in GraphicsContext3DInternal::reshape - https://bugs.webkit.org/show_bug.cgi?id=48284 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - -2010-10-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Fix IndexedDB crashes - https://bugs.webkit.org/show_bug.cgi?id=48266 - - Make WebIDBObjectStoreImpl match the way that WebIDBIndexImpl passes - in cursor parameters (which is the correct way). KeyRange knows how - to convert itself to a WebCore type--even if the value is null. - - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::openCursor): - -2010-10-26 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Remove obsolete public/API methods in chromium port. - https://bugs.webkit.org/show_bug.cgi?id=48330 - - * public/WebSpeechInputListener.h: - -2010-10-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Quota for IndexedDB should be per origin not per database - https://bugs.webkit.org/show_bug.cgi?id=48064 - - * public/WebIDBFactory.h: - * public/WebSecurityOrigin.h: - * src/WebIDBFactory.cpp: - (WebKit::WebIDBFactory::databaseFileName): - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::get): - -2010-10-26 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70512. - http://trac.webkit.org/changeset/70512 - https://bugs.webkit.org/show_bug.cgi?id=48314 - - crashes many tests (Requested by inferno-sec on #webkit). - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::shouldSpellcheckByDefault): - -2010-10-25 MORITA Hajime <morrita@google.com> - - Reviewed by Tony Chang. - - spellcheck='' should be the same as spellcheck="true" - https://bugs.webkit.org/show_bug.cgi?id=25539 - - Followed API rename in WebCore. - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::shouldSpellcheckByDefault): - -2010-10-25 Satish Sampath <satish@chromium.org> - - Unreviewed, fix for a build break caused by my earlier patch. - - * public/WebSpeechInputListener.h: - (WebKit::WebSpeechInputListener::setRecognitionResult): Explicitly invoking the correct constructor. - -2010-10-21 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Allow embedder to pass on all the speech recognition results to the input element. - https://bugs.webkit.org/show_bug.cgi?id=48068 - - * WebKit.gyp: Added new files - * public/WebSpeechInputListener.h: - * public/WebSpeechInputResult.h: Added, wrapper around WebCore::SpeechInputResult - (WebKit::WebSpeechInputResult::WebSpeechInputResult): - (WebKit::WebSpeechInputResult::~WebSpeechInputResult): - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::setRecognitionResult): Accepts an array instead of a single string. - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setRecognitionResult): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebSpeechInputResult.cpp: Added. - (WebKit::WebSpeechInputResult::reset): - (WebKit::WebSpeechInputResult::WebSpeechInputResult): - (WebKit::WebSpeechInputResult::set): - (WebKit::WebSpeechInputResult::operator PassRefPtr<WebCore::SpeechInputResult>): - -2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70451. - http://trac.webkit.org/changeset/70451 - https://bugs.webkit.org/show_bug.cgi?id=48249 - - Broke set-unloaded-frame-location.html under Qt (Requested by - caseq on #webkit). - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - -2010-10-25 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Replaces script line number with TextPosition structure. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - -2010-10-20 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - Renumber FileError/FileException error codes per latest File API spec changes - https://bugs.webkit.org/show_bug.cgi?id=47936 - - * public/WebFileError.h: - * src/AssertMatchingEnums.cpp: - * src/AsyncFileWriterChromium.cpp: - (WebCore::AsyncFileWriterChromium::didFail): - -2010-10-24 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70361. - http://trac.webkit.org/changeset/70361 - https://bugs.webkit.org/show_bug.cgi?id=48217 - - Chromium tests NoInitialAutocompleteForReadOnly and - InitialAutocomplete don't complete (Requested by yuzo on - #webkit). - - * public/WebDocument.h: - -2010-10-22 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - Turning on the Autocomplete implementation on the Chromium side. - https://bugs.webkit.org/show_bug.cgi?id=41283 - - * public/WebDocument.h: - -2010-10-22 Sam Weinig <sam@webkit.org> - - Reviewed by Anders Carlsson. - - WebKit2 needs to pass the current event modifier flags when requesting a new window - https://bugs.webkit.org/show_bug.cgi?id=48140 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - * src/ChromeClientImpl.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchCreatePage): - * src/FrameLoaderClientImpl.h: - Add NavigationAction parameter. - -2010-10-22 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70301. - http://trac.webkit.org/changeset/70301 - https://bugs.webkit.org/show_bug.cgi?id=48126 - - "Lang attribute layout tests failing" (Requested by satish on - #webkit). - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-22 Leandro Gracia Gil <leandrogracia@google.com> - - Reviewed by Jeremy Orlow. - - Patch the current speech input implementation to use and validate the - nearest language tag. The language is now passed to the startRecognition - methods so that language-specific recognition could be used. Also added - a second parameter to setMockSpeechInputResult for the language used in - speech recognition. - https://bugs.webkit.org/show_bug.cgi?id=47089 - - This is the 2nd of a 4-sided patch in Chromium and WebKit. For more - details see http://codereview.chromium.org/3615005/show and - http://codereview.chromium.org/3595018/show. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::create): - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-21 Yuzo Fujishima <yuzo@google.com> - - Unreviewed build fix attempt for Chromium Linux Debug Clang - - * public/WebExternalPopupMenu.h: - -2010-10-21 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] roll chromium DEPS to include forwarding headers refactor - https://bugs.webkit.org/show_bug.cgi?id=48097 - - * DEPS: Roll chromium forward to include new forwarding headers script - * WebKit.gyp: This dependency always existed, it's just exposed now - that the header files are in a different include dir. - -2010-10-21 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium: use dedicated event listener type in EventListenerWrapper. - https://bugs.webkit.org/show_bug.cgi?id=48059 - - * src/EventListenerWrapper.cpp: - (WebKit::EventListenerWrapper::EventListenerWrapper): - -2010-10-21 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Adding an API that allows external - popup menus, without the use of WebCore::PopupMenuChromium. - Once this is hooked up in Chromium, the plan is to remove - entirely the external case from PopupMenuChromium. - https://bugs.webkit.org/show_bug.cgi?id=46016 - - * WebKit.gyp: - * public/WebExternalPopupMenu.h: Added. - * public/WebExternalPopupMenuClient.h: Added. - * public/WebMenuItemInfo.h: - (WebKit::WebMenuItemInfo::WebMenuItemInfo): - * public/WebView.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::createExternalPopupMenu): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createPopupMenu): - * src/ExternalPopupMenu.cpp: Added. - * src/ExternalPopupMenu.h: Added. - * src/WebViewImpl.cpp: - (WebKit::WebView::setUseExternalPopupMenus): - (WebKit::WebViewImpl::useExternalPopupMenus): - * src/WebViewImpl.h: - -2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70165. - http://trac.webkit.org/changeset/70165 - https://bugs.webkit.org/show_bug.cgi?id=48007 - - It broke tests on Qt bot (Requested by Ossy on #webkit). - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - -2010-10-20 Peter Rybin <peter.rybin@gmail.com> - - Reviewed by Adam Barth. - - HTML parser should provide script column position within HTML document to JavaScript engine - https://bugs.webkit.org/show_bug.cgi?id=45271 - - Replaces script line number with TextPosition structure. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - -2010-10-20 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Fix crash when mousing over scrollview - https://bugs.webkit.org/show_bug.cgi?id=47956 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::mouseDidMoveOverElement): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::pluginScriptableObject): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::redirectDataToPlugin): - * src/WebPluginContainerImpl.h: - (WebKit::WebPluginContainerImpl::isPluginContainer): - -2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r70149. - http://trac.webkit.org/changeset/70149 - https://bugs.webkit.org/show_bug.cgi?id=47989 - - "Build breaks in mac and win" (Requested by satish on - #webkit). - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-20 Leandro Gracia Gil <leandrogracia@google.com> - - Reviewed by Jeremy Orlow. - - Patch the current speech input implementation to use and validate the - nearest language tag. The language is now passed to the startRecognition - methods so that language-specific recognition could be used. Also added - a second parameter to setMockSpeechInputResult for the language used in - speech recognition. - https://bugs.webkit.org/show_bug.cgi?id=47089 - - This is the 2nd of a 4-sided patch in Chromium and WebKit. For more - details see http://codereview.chromium.org/3615005/show and - http://codereview.chromium.org/3595018/show. - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - * public/WebSpeechInputControllerMock.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::create): - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-10-20 Dirk Schulze <krit@webkit.org> - - Unreviewed Chromium win build fix. - - * tests/TransparencyWinTest.cpp: - (WebCore::TEST): - -2010-10-20 Dirk Schulze <krit@webkit.org> - - Reviewed by Nikolas Zimmermann. - - Merge ColorSpace and ImageColorSpace enums - https://bugs.webkit.org/show_bug.cgi?id=47922 - - Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB - to follow webkit style rules. - - * src/WebFontImpl.cpp: - (WebKit::WebFontImpl::drawText): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::paintWithContext): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::doPixelReadbackToCanvas): - * tests/TransparencyWinTest.cpp: - (WebCore::TEST): - -2010-10-19 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: expose request/response cookies in HAR - https://bugs.webkit.org/show_bug.cgi?id=47894 - - * src/WebResourceRawHeaders.cpp: - (WebKit::addHeader): paste coalescent headers using "\n: as a separator instead of ", " - -2010-10-19 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] Use webkit's TestNetscapePlugIn in DRT mac - https://bugs.webkit.org/show_bug.cgi?id=47850 - - * WebKit.gyp: Copy WebKitTestPlugIn into plugins and add - GCC_SYMBOLS_PRIVATE_EXTERN: NO to export the symbols. - -2010-10-19 Tony Chang <tony@chromium.org> - - Unreviewed. Rolling chromium DEPS to 63057 to pick up mac plugin - loading in DRT. - - * DEPS: bump chromium DEPS to 63057. - -2010-10-19 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] DumpRenderTree shouldn't put '.' in include path - https://bugs.webkit.org/show_bug.cgi?id=47877 - - * WebKit.gyp: Replace '.' with <(chromium_src_dir) and add public - -2010-10-18 Adrienne Walker <enne@google.com> - - Reviewed by Kenneth Russell. - - Turn off antialiasing when using Mesa during testing. - https://bugs.webkit.org/show_bug.cgi?id=47697 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - -2010-10-18 James Robinson <jamesr@chromium.org> - - Update the chromium DEPS from 62399 to 62813 to pick up skia fixes - - * DEPS: - -2010-10-17 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Introduce InspectorResourceAgent.h/cpp and ResourceManager.js to - fill network panel with data. - https://bugs.webkit.org/show_bug.cgi?id=47779 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::didReceiveResponse): - -2010-10-17 Pascal Massimino <pascal.massimino@gmail.com> - - Reviewed by Adam Barth. - - Add support for WebP image decoding in ImageDecoder - using library libwebp-decode library available from - http://www.webmproject.org/code/ - - https://bugs.webkit.org/show_bug.cgi?id=47512 - - Tests: fast/images/webp-image-decoding.html - - * CMakeLists.txt: - add platform/image-decoders/webp files and directory - * GNUmakefile.am: - add platform/image-decoders/webp directory - * WebCore.gyp/WebCore.gyp: - add platform/image-decoders/webp directory - * WebCore.gypi: - add platform/image-decoders/webp directory - * features.gypi: - add WTF_USE_WEBP=1 - * platform/image-decoders/ImageDecoder.cpp: - (WebCore::ImageDecoder::create): - instantiate webp decoder for file starting with 'RIFF????WEBP' - * platform/image-decoders/webp: Added. - * platform/image-decoders/webp/WEBPImageDecoder.cpp: Added. - (WebCore::WEBPImageDecoder::WEBPImageDecoder): - (WebCore::WEBPImageDecoder::~WEBPImageDecoder): - (WebCore::WEBPImageDecoder::isSizeAvailable): - (WebCore::WEBPImageDecoder::frameBufferAtIndex): - (WebCore::WEBPImageDecoder::decode): - sub-class handling decoding of webp images - * platform/image-decoders/webp/WEBPImageDecoder.h: Added. - (WebCore::WEBPImageDecoder::filenameExtension): - (WebCore::WEBPImageDecoder::supportsAlpha): - header for webp-decoder sub-class - -2010-10-15 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] compile TestNetscapePlugIn on Chromium mac - https://bugs.webkit.org/show_bug.cgi?id=47633 - - * WebKit.gyp: Add a mac specific target for compiling TestNetscapePlugIn - Fix an include dir so we can compile in a chromium checkout. - -2010-10-15 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r69809. - http://trac.webkit.org/changeset/69809 - https://bugs.webkit.org/show_bug.cgi?id=47725 - - Broke chromium mac compile (Requested by japhet on #webkit). - - * WebKit.gyp: - -2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Dirk Schulze. - - Replace some String::format() usages by StringConcatenate in WebKit - https://bugs.webkit.org/show_bug.cgi?id=47714 - - * src/BackForwardListClientImpl.cpp: - (WebKit::BackForwardListClientImpl::itemAtIndex): - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::debugDetach): - * src/LocalizedStrings.cpp: - (WebCore::imageTitle): - * src/WebPageSerializer.cpp: - (WebKit::WebPageSerializer::generateMetaCharsetDeclaration): - (WebKit::WebPageSerializer::generateBaseTagDeclaration): - -2010-10-14 Wei Jia <wjia@chromium.org> - - Reviewed by Darin Fisher. - - Retrieve info of lock keys from stashed currentInputEvent which - is stored by chromium when it passes input event to WebCore. - Retrieving only when stashed event is a keyboard event, which - means synthetic KeyboardEvent inherits lock key state from real - keyboard event. - https://bugs.webkit.org/show_bug.cgi?id=46518 - - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - -2010-10-14 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Tony Chang. - - [chromium] null check the widget before sending it data as calling didReceiveData might delete it - https://bugs.webkit.org/show_bug.cgi?id=47708 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::committedLoad): - -2010-10-14 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] compile TestNetscapePlugIn on Chromium mac - https://bugs.webkit.org/show_bug.cgi?id=47633 - - * WebKit.gyp: Add a mac specific target for compiling TestNetscapePlugIn - -2010-10-13 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - [Chromium] Enable FILE_SYSTEM by default for chromium - https://bugs.webkit.org/show_bug.cgi?id=47639 - - * features.gypi: Add FILE_SYSTEM=1. Also remove FILE_READER=1 - as it seems to be not used anymore. - -2010-10-13 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - IndexedDB should fire some errors synchronously - https://bugs.webkit.org/show_bug.cgi?id=47530 - - * public/WebIDBCursor.h: - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::transaction): - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * public/WebIDBObjectStore.h: - * public/WebIDBTransactionCallbacks.h: - * src/IDBCursorBackendProxy.cpp: - (WebCore::IDBCursorBackendProxy::update): - (WebCore::IDBCursorBackendProxy::continueFunction): - (WebCore::IDBCursorBackendProxy::remove): - * src/IDBCursorBackendProxy.h: - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::createObjectStore): - (WebCore::IDBDatabaseProxy::removeObjectStore): - (WebCore::IDBDatabaseProxy::setVersion): - (WebCore::IDBDatabaseProxy::transaction): - * src/IDBDatabaseProxy.h: - * src/IDBIndexBackendProxy.cpp: - (WebCore::IDBIndexBackendProxy::openCursor): - (WebCore::IDBIndexBackendProxy::openKeyCursor): - (WebCore::IDBIndexBackendProxy::get): - (WebCore::IDBIndexBackendProxy::getKey): - * src/IDBIndexBackendProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::get): - (WebCore::IDBObjectStoreProxy::put): - (WebCore::IDBObjectStoreProxy::remove): - (WebCore::IDBObjectStoreProxy::createIndex): - (WebCore::IDBObjectStoreProxy::index): - (WebCore::IDBObjectStoreProxy::removeIndex): - (WebCore::IDBObjectStoreProxy::openCursor): - * src/IDBObjectStoreProxy.h: - * src/WebIDBCursorImpl.cpp: - (WebKit::WebIDBCursorImpl::update): - (WebKit::WebIDBCursorImpl::continueFunction): - (WebKit::WebIDBCursorImpl::remove): - * src/WebIDBCursorImpl.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::removeObjectStore): - (WebKit::WebIDBDatabaseImpl::setVersion): - (WebKit::WebIDBDatabaseImpl::transaction): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::openKeyCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::getKey): - * src/WebIDBIndexImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::get): - (WebKit::WebIDBObjectStoreImpl::put): - (WebKit::WebIDBObjectStoreImpl::remove): - (WebKit::WebIDBObjectStoreImpl::createIndex): - (WebKit::WebIDBObjectStoreImpl::index): - (WebKit::WebIDBObjectStoreImpl::removeIndex): - (WebKit::WebIDBObjectStoreImpl::openCursor): - * src/WebIDBObjectStoreImpl.h: - -2010-10-13 Brett Wilson <brettw@chromium.org> - - Reviewed by Darin Fisher. - - Save and restore the GraphicsContext around setting the clip rect for - drawing text. - https://bugs.webkit.org/show_bug.cgi?id=47634 - - * src/WebFontImpl.cpp: - (WebKit::WebFontImpl::drawText): - -2010-10-13 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Revert changes to WebViewImpl in r69633 - https://bugs.webkit.org/show_bug.cgi?id=47610 - - Revert change to WebViewImpl.cpp in - http://trac.webkit.org/changeset/69633 which incorrectly used - PassRefPtr for a local variable instead of RefPtr. This was a fix - for changes in http://trac.webkit.org/changeset/69619 and - http://trac.webkit.org/changeset/69624 . - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-10-13 Gavin Barraclough <barraclough@apple.com> - - Reviewed by Oliver Hunt. - - Bug 43987 - Downloading using XHR is much slower than before - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer): - -2010-10-13 Adam Barth <abarth@webkit.org> - - Reviewed by Tony Chang. - - [Chromium] Clean up WebPageSerializerImpl::serialize - https://bugs.webkit.org/show_bug.cgi?id=47577 - - This patch shouldn't have any behavior change. I'm just trying to - understand what this code does. - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer): - (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebPageSerializerImpl.h: - -2010-10-13 John Knottenbelt <jknotten@chromium.org> - - Reviewed by Steve Block. - - First step towards client-based Geolocation in Chromium. Build - fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define. - https://bugs.webkit.org/show_bug.cgi?id=47586 - - * WebKit.gyp: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): - (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): - * src/ChromiumBridge.cpp: - * src/WebGeolocationServiceMock.cpp: - (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock): - (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission): - (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition): - (WebKit::WebGeolocationServiceMock::setMockGeolocationError): - -2010-10-11 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [Chromium] Cleanup WebIDBFactory::open once the Chromium plumbing has landed. - https://bugs.webkit.org/show_bug.cgi?id=47531 - - Remove the temporary open() method since the appropriate Chromium plumbing was - added in http://codereview.chromium.org/3729003/ - - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - -2010-10-13 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Fisher. - - [Chromium] Clean up SerializeDomParam - https://bugs.webkit.org/show_bug.cgi?id=47580 - - This patch just renames a bunch of the members of this struct to be - more sensible. No behavior change, well, except for one struct member - that wasn't initialized. I didn't trace through this code to see if - the uninitialized value was used anywhere, but initializing all the - values seems like a good idea. - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam): - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag): - (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag): - (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer): - (WebKit::WebPageSerializerImpl::openTagToString): - (WebKit::WebPageSerializerImpl::endTagToString): - (WebKit::WebPageSerializerImpl::buildContentForNode): - * src/WebPageSerializerImpl.h: - -2010-10-13 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: stack information is inconsistent between console.trace and runtime errors. - https://bugs.webkit.org/show_bug.cgi?id=47252 - - * DEPS: bump up V8 revision - -2010-10-12 Kenneth Russell <kbr@google.com> - - Unreviewed. Fixes for all WebGL content causing assertion failures - in Chromium after http://trac.webkit.org/changeset/69619 and - http://trac.webkit.org/changeset/69624 . - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3D::create): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-10-12 Alok priyadarshi <alokp@chromium.org> - - Reviewed by Kenneth Russell. - - Remove support for ANGLE SH_VERSION <= 100 - https://bugs.webkit.org/show_bug.cgi?id=47307 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers): - (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource): - -2010-10-12 James Robinson <jamesr@chromium.org> - - Unreviewed chromium compile fixes for http://trac.webkit.org/changeset/69619. - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3D::create): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - * src/WebViewImpl.h: - -2010-10-12 Jian Li <jianli@chromium.org> - - Unreviewed. Bump up revision in order to pick up fix. - - * DEPS: - -2010-10-12 Jian Li <jianli@chromium.org> - - Unreview. Build fix for chromium. - - * public/WebBlobRegistry.h: - -2010-10-12 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Update WebBlobData to adapt to BlobData change in terms of - handling string data item. - https://bugs.webkit.org/show_bug.cgi?id=47423 - - Also remove unneeded methods in WebBlobData. WebBlobStorageData.* are - also removed since they're not longer needed. - - * WebKit.gyp: - * public/WebBlobData.h: - * public/WebBlobRegistry.h: - * public/WebBlobStorageData.h: Removed. - * public/WebThreadSafeData.h: Added. - * src/WebBlobData.cpp: - * src/WebBlobStorageData.cpp: Removed. - * src/WebThreadSafeData.cpp: Added. - -2010-10-12 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Dumitru Daniliuc. - - [FileSystem] Add ability to pass a bool to create or not create root path while opening filesystem. - https://bugs.webkit.org/show_bug.cgi?id=47519 - - * public/WebCommonWorkerClient.h: - (WebKit::WebCommonWorkerClient::openFileSystem): - * public/WebFrameClient.h: - (WebKit::WebFrameClient::openFileSystem): - -2010-10-12 James Robinson <jamesr@chromium.org> - - Reviewed by Nate Chapin (in person). - - Fix chromium compile. - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::WebPageSerializerImpl): - (WebKit::WebPageSerializerImpl::serialize): - -2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com> - - Reviewed by Gavin Barraclough. - - Unify JSC::StringBuilder & WebCore::StringBuilder - https://bugs.webkit.org/show_bug.cgi?id=47538 - - * src/LocalizedStrings.cpp: - (WebCore::imageTitle): Use WTF::StringBuilder. - * src/WebEntities.cpp: - (WebKit::WebEntities::convertEntitiesInString): Ditto. - * src/WebPageSerializerImpl.cpp: Remove useless includes. - (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer): - * src/WebPageSerializerImpl.h: Use WTF::StringBuilder. - -2010-10-07 Stephen White <senorblanco@chromium.org> - - Reviewed by James Robinson. - - [chromium] Zero-out all textures created via WebGraphicsContext3DDefaultImpl::texImage2D(). - https://bugs.webkit.org/show_bug.cgi?id=47178 - - Covered by fast/canvas/toDataURL-alpha.html, when run with --accelerated-2d-canvas. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::bytesPerComponent): - (WebKit::componentsPerPixel): - (WebKit::imageSizeInBytes): - (WebKit::WebGraphicsContext3DDefaultImpl::texImage2D): - -2010-10-12 Dave Moore <davemoore@chromium.org> - - Reviewed by Tony Chang. - - Use new WebThemeEngine api on chromium / linux to draw scrollbars. - https://bugs.webkit.org/show_bug.cgi?id=47473 - - * public/WebThemeEngine.h: Removed. - * chromium/src/ChromiumBridge.cpp: - -2010-10-11 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Prepare Clipboard/DragData for transition to new drag-and-drop interface. - https://bugs.webkit.org/show_bug.cgi?id=44992 - - Add a new entry point for drag in to allow a graceful transition - from the legacy drag and drop model, where all data is copied in at the - beginning of a drag, to a model where data is retrieved on demand via - IPCs. The rationale for this is when we begin supporting arbitrary MIME - types in dataTransfer, we don't want to be copying aribtrary amounts of - data over for each start drag IPC. - - * public/WebView.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::initialize): Use the legacy data object. - (WebKit::WebDragData::ensureMutable): Change the if to an ASSERT. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::dragTargetDragEnterNew): New entry point. - * src/WebViewImpl.h: - -2010-10-11 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - [Chromium] Add plumbing for synchronous indexedDB exceptions - https://bugs.webkit.org/show_bug.cgi?id=47511 - - Add a WebExceptionCode file (already run by fishd) and add versions of - each applicable method that take such a parameter. A follow up patch - will be posted with the meat. - - * WebKit.gyp: - * public/WebExceptionCode.h: Added. - * public/WebIDBCursor.h: - (WebKit::WebIDBCursor::update): - (WebKit::WebIDBCursor::continueFunction): - (WebKit::WebIDBCursor::remove): - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::objectStore): - (WebKit::WebIDBDatabase::createObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - (WebKit::WebIDBDatabase::setVersion): - (WebKit::WebIDBDatabase::transaction): - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::openObjectCursor): - (WebKit::WebIDBIndex::openKeyCursor): - (WebKit::WebIDBIndex::getObject): - (WebKit::WebIDBIndex::getKey): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::get): - (WebKit::WebIDBObjectStore::put): - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::index): - (WebKit::WebIDBObjectStore::removeIndex): - (WebKit::WebIDBObjectStore::openCursor): - -2010-10-11 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - The names of IndexedDB-specific attributes of DOMWindow should be prefixed with 'webkit'. - https://bugs.webkit.org/show_bug.cgi?id=47508 - - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableIndexedDatabase): - (WebKit::WebRuntimeFeatures::isIndexedDatabaseEnabled): - -2010-10-11 Tony Chang <tony@chromium.org> - - Unreviewed, roll chromium DEPS to pick up Dave's fix for - scrollbar painting. This will be needed by an upcoming patch. - - * DEPS: - -2010-10-11 Kinuko Yasuda <kinuko@google.com> - - Reviewed by David Levin. - - Support DirectoryEntry.removeRecursively for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=47400 - - * src/AsyncFileSystemChromium.cpp: - (WebCore::AsyncFileSystemChromium::removeRecursively): Added. - * src/AsyncFileSystemChromium.h: - * src/WorkerAsyncFileSystemChromium.cpp: - (WebCore::WorkerAsyncFileSystemChromium::removeRecursively): Added. - * src/WorkerAsyncFileSystemChromium.h: - * src/WorkerFileSystemCallbacksBridge.cpp: - (WebKit::WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread): Added. - (WebKit::WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread): Added. - * src/WorkerFileSystemCallbacksBridge.h: - -2010-10-09 Varun Jain <varunjain@chromium.org> - - Reviewed by Darin Fisher. - - Adding one method to the WebView interface: method to inform the - renderer to scroll the currently focused element into view, for - instance, when it is hidden due to window resizing. - Also adding methods to WebNode and WebElement to expose more - features of the underlying WebCore::Node. - https://bugs.webkit.org/show_bug.cgi?id=46296 - - * public/WebElement.h: - * public/WebNode.h: - * public/WebView.h: - * src/WebElement.h: - (WebKit::WebElement::isTextFormControlElement): - * src/WebNode.cpp: - (WebKit::WebNode::isContentEditable): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::scrollFocusedNodeIntoView): - * src/WebViewImpl.h: - -2010-10-08 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [Chromium] IDBFactory::open only works in single process mode. - https://bugs.webkit.org/show_bug.cgi?id=47444 - - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - -2010-10-08 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IndexedDB does not have a quota mechanism. - https://bugs.webkit.org/show_bug.cgi?id=47389 - - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * src/IDBFactoryBackendProxy.cpp: - (WebCore::IDBFactoryBackendProxy::open): - * src/IDBFactoryBackendProxy.h: - * src/WebIDBFactoryImpl.cpp: - (WebKit::WebIDBFactoryImpl::open): - * src/WebIDBFactoryImpl.h: - -2010-10-07 Zhenyao Mo <zmo@google.com> - - Unreviewed, roll chromium to r61902. - - * DEPS: - -2010-10-07 Zhenyao Mo <zmo@google.com> - - Reviewed by Tony Chang. - - Copy mesa lib into DumpRenderTree bundle in Mac - https://bugs.webkit.org/show_bug.cgi?id=47385 - - * WebKit.gyp: - -2010-10-07 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Minor naming cleanup in WebDragData, part 2 - https://bugs.webkit.org/show_bug.cgi?id=47227 - - Chromium no longer uses the deprecated methods, so delete them. - - * DEPS: - * public/WebDragData.h: - * src/WebDragData.cpp: - -2010-10-07 Dave Moore <davemoore@chromium.org> - - Reviewed by Kent Tamura. - - Add WebThemeEngine api for chromium/linux - https://bugs.webkit.org/show_bug.cgi?id=47278 - Create new linux specific version of WinThemeEngine.h and move - existing windows specific one to win directory. Keep old top - level file until chromium is updated to use the new ones. - - * WebKit.gyp: - * public/WebThemeEngine.h: - * src/ChromiumBridge.cpp: - -2010-10-07 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium multi-dll build broken due to WebResourceRawHeaders methods lacking WEBKIT_API decl spec - https://bugs.webkit.org/show_bug.cgi?id=47329 - - * public/WebResourceRawHeaders.h: - (WebKit::WebResourceRawHeaders::WebResourceRawHeaders): - (WebKit::WebResourceRawHeaders::~WebResourceRawHeaders): - (WebKit::WebResourceRawHeaders::operator =): - * src/WebResourceRawHeaders.cpp: - (WebKit::WebResourceRawHeaders::initialize): - (WebKit::WebResourceRawHeaders::reset): - (WebKit::WebResourceRawHeaders::assign): - -2010-10-06 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Remove unused accessibility functions from webkit. - https://bugs.webkit.org/attachment.cgi?bugid=46707 - - * public/WebAccessibilityCache.h: - * public/WebViewClient.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedNodeChanged): - * src/WebAccessibilityCacheImpl.cpp: - * src/WebAccessibilityCacheImpl.h: - -2010-10-06 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by David Levin. - - Add FileSystemSync implementation for Worker - https://bugs.webkit.org/show_bug.cgi?id=47044 - - * src/LocalFileSystemChromium.cpp: - (WebCore::LocalFileSystem::requestFileSystem): Added a new parameter - for synchronous mode. - * src/WebFileSystemCallbacksImpl.cpp: - (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): Added - a parameter for synchronous mode. - (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem): Changed to - creates WorkerAsyncFileSystemChromium with synchronous flag. - * src/WebFileSystemCallbacksImpl.h: - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::openFileSystem): Added a parameter for - synchronous mode. - * src/WebWorkerBase.h: - * src/WorkerAsyncFileSystemChromium.cpp: - (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium): - (WebCore::WorkerAsyncFileSystemChromium::waitForOperationToComplete): - Added. - (WebCore::WorkerAsyncFileSystemChromium::move): - (WebCore::WorkerAsyncFileSystemChromium::copy): - (WebCore::WorkerAsyncFileSystemChromium::remove): - (WebCore::WorkerAsyncFileSystemChromium::readMetadata): - (WebCore::WorkerAsyncFileSystemChromium::createFile): - (WebCore::WorkerAsyncFileSystemChromium::createDirectory): - (WebCore::WorkerAsyncFileSystemChromium::fileExists): - (WebCore::WorkerAsyncFileSystemChromium::directoryExists): - (WebCore::WorkerAsyncFileSystemChromium::readDirectory): - (WebCore::WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge): - Updated to store the created bridge in a member variable so that - we can call bridge->stop() later when the RunLoop is terminating. - * src/WorkerAsyncFileSystemChromium.h: - (WebCore::WorkerAsyncFileSystemChromium::create): Added a new - parameter for synchronous mode. - -2010-10-06 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBDatabase and IDBObjectStore metadata is not recovered correctly when the setVersion transactions aborts. - https://bugs.webkit.org/show_bug.cgi?id=47245 - - * src/IDBTransactionBackendProxy.cpp: - (WebCore::IDBTransactionBackendProxy::scheduleTask): - * src/IDBTransactionBackendProxy.h: - -2010-10-06 Victor Wang <victorw@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add webkit unit tests to chromium multi-dll build. - - In chromium multi-dll build mode, compile the webkit unit tests - code in webkit.dll and export an api that runs the tests. - - https://bugs.webkit.org/show_bug.cgi?id=46907 - - * WebKit.gyp: - * WebKit.gypi: - * tests/RunAllTests.cpp: - (main): - * tests/WebUnitTests.cpp: Added. - (WebKit::RunAllUnitTests): - * tests/WebUnitTests.h: Added. - -2010-10-05 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - [Chromium] WebIDBKeyRange should handle null left/right pointers - https://bugs.webkit.org/show_bug.cgi?id=47247 - - * src/WebIDBKeyRange.cpp: - (WebKit::WebIDBKeyRange::assign): - (WebKit::WebIDBKeyRange::left): - (WebKit::WebIDBKeyRange::right): - (WebKit::WebIDBKeyRange::flags): - -2010-10-06 Tony Chang <tony@chromium.org> - - Unreviewed, rolling out r69202. - http://trac.webkit.org/changeset/69202 - https://bugs.webkit.org/show_bug.cgi?id=46937 - - Broke compile of test_shell - - * DEPS: - * public/WebDragData.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::hasFileNames): - (WebKit::WebDragData::fileNames): - (WebKit::WebDragData::setFileNames): - (WebKit::WebDragData::appendToFileNames): - (WebKit::WebDragData::fileContentFileName): - (WebKit::WebDragData::setFileContentFileName): - -2010-10-06 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Minor naming cleanup in WebDragData, part 2 - https://bugs.webkit.org/show_bug.cgi?id=46937 - - Chromium no longer uses the deprecated methods, so delete them. - - * DEPS: - * public/WebDragData.h: - * src/WebDragData.cpp: - -2010-09-29 Alpha Lam <hclam@chromium.org> - - Reviewed by James Robinson. - - Render textures in video frame directly. - https://bugs.webkit.org/show_bug.cgi?id=46765 - - Add getter for accessing textures stored in VideoFrameChromium and WebVideoFrame. - Also explicitly instruct VideoLayerChromium to release video frame when the owner - of video frame is going away. - - * public/WebVideoFrame.h: - * src/AssertMatchingEnums.cpp: - * src/VideoFrameChromiumImpl.cpp: - (WebKit::VideoFrameChromiumImpl::texture): - * src/VideoFrameChromiumImpl.h: - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl): - (WebKit::WebMediaPlayerClientImpl::load): - * src/WebMediaPlayerClientImpl.h: - -2010-10-05 Nat Duca <nduca@chromium.org> - - Reviewed by James Robinson. - - [chromium] Handle composited root layer invalidations in screenspace, - fixing the disappearing scrollbar problem. - https://bugs.webkit.org/show_bug.cgi?id=46864 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::composite): - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - (WebKit::WebViewImpl::doComposite): - -2010-10-05 Kenneth Russell <kbr@google.com> - - Unreviewed, follow up to 47216. Add newline above "protected:". - - * public/WebFrame.h: - -2010-10-05 Kenneth Russell <kbr@google.com> - - Reviewed by Tony Chang. - - [chromium] Implement layerTreeAsText in DumpRenderTree - https://bugs.webkit.org/show_bug.cgi?id=47216 - - Plumbed Frame::layerTreeAsText through Chromium's WebKit API to - make it callable from DumpRenderTree. - - No new tests; verified with existing compositor layout tests. - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::layerTreeAsText): - * src/WebFrameImpl.h: - -2010-10-05 Andrew Wilson <atwilson@chromium.org> - - Reviewed by Andreas Kling. - - Notification onclick() events don't act like user gestures - https://bugs.webkit.org/show_bug.cgi?id=47137 - - * src/WebNotification.cpp: - (WebKit::WebNotification::dispatchClickEvent): - Use UserGestureIndicator to make sure click events are treated like user gestures. - -2010-10-05 Alok Priyadarshi <alokp@chromium.org> - - Reviewed by Kenneth Russell. - - Supported ANGLE SH_VERSION > 100 - https://bugs.webkit.org/show_bug.cgi?id=47024 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers): - (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource): - -2010-10-04 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - Rename get* and open*Cursor per the spec on IDBIndex - https://bugs.webkit.org/show_bug.cgi?id=46906 - - The spec changed so that: - IDBIndex.get -> getKey - IDBIndex.getObject -> get - IDBIndex.openCursor -> openKeyCursor - IDBIndex.openObjectCursor -> openCursor - - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::openCursor): - (WebKit::WebIDBIndex::openKeyCursor): - (WebKit::WebIDBIndex::get): - (WebKit::WebIDBIndex::getKey): - * src/IDBIndexBackendProxy.cpp: - (WebCore::IDBIndexBackendProxy::openCursor): - (WebCore::IDBIndexBackendProxy::openKeyCursor): - (WebCore::IDBIndexBackendProxy::get): - (WebCore::IDBIndexBackendProxy::getKey): - * src/IDBIndexBackendProxy.h: - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::openKeyCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::getKey): - * src/WebIDBIndexImpl.h: - -2010-10-04 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBDatabase::createObjectStore/removeObjectStore and IDBObjectStore::createIndex/removeIndex should be synchronous. - https://bugs.webkit.org/show_bug.cgi?id=46883 - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::createObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::removeIndex): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::createObjectStore): - (WebCore::IDBDatabaseProxy::removeObjectStore): - * src/IDBDatabaseProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::createIndex): - (WebCore::IDBObjectStoreProxy::removeIndex): - * src/IDBObjectStoreProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::removeObjectStore): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::createIndex): - (WebKit::WebIDBObjectStoreImpl::removeIndex): - * src/WebIDBObjectStoreImpl.h: - -2010-10-04 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: [Chromium][Extension API] provide tab id of inspected tab in extension API - https://bugs.webkit.org/show_bug.cgi?id=47080 - - * src/js/DevTools.js: Added a way for extension to get tabId of inspected window. - (WebInspector.platformExtensionAPI): - (WebInspector.buildPlatformExtensionAPI): - (WebInspector.setInspectedTabId): - -2010-10-04 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Properly clear WebKit cache when chromium cache is cleared - https://bugs.webkit.org/show_bug.cgi?id=47119 - - Contributed by Ricardo Vargas. - - See: http://code.google.com/p/chromium/issues/detail?id=54336 - - * src/WebCache.cpp: - (WebKit::WebCache::clear): - -2010-10-04 Nico Weber <thakis@chromium.org> - - Reviewed by Kenneth Russell. - - Fix broken C++ in PODInterval and PODIntervalTree - https://bugs.webkit.org/show_bug.cgi?id=47063 - - Change functions to be template specializations, like it's now required - by PODIntervalTree and friends. - - * tests/PODIntervalTreeTest.cpp: - -2010-10-04 Matt Mueller <mattm@chromium.org> - - Reviewed by Darin Fisher. - - When building under chromium, build libwebkit as the same type (shared - or static) as chromium. Fixes problems with multiple calls to global - initializers/finalizers in shared chromium build. - https://bugs.webkit.org/show_bug.cgi?id=46762 - - * WebKit.gyp: - -2010-10-04 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - Remove a function declaration. - - * src/ChromeClientImpl.h: - -2010-10-04 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - https://bugs.webkit.org/show_bug.cgi?id=47135 - Add a stub method to make the build happy. - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::stopLoadingInFrame): - -2010-10-04 Chris Marrin <cmarrin@apple.com> - - Reviewed by James Robinson. - - Move SharedGraphicsContext3D from ChromeClient to Page - https://bugs.webkit.org/show_bug.cgi?id=47113 - - * src/ChromeClientImpl.cpp: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - -2010-10-04 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - Implement IndexedDB's oncomplete and ontimeout. - https://bugs.webkit.org/show_bug.cgi?id=47106 - - * public/WebIDBTransactionCallbacks.h: - (WebKit::WebIDBTransactionCallbacks::id): - (WebKit::WebIDBTransactionCallbacks::onAbort): - (WebKit::WebIDBTransactionCallbacks::onComplete): - (WebKit::WebIDBTransactionCallbacks::onTimeout): - * src/IDBTransactionCallbacksProxy.cpp: - (WebCore::IDBTransactionCallbacksProxy::onComplete): - (WebCore::IDBTransactionCallbacksProxy::onTimeout): - * src/IDBTransactionCallbacksProxy.h: - * src/WebIDBTransactionCallbacksImpl.cpp: - (WebCore::WebIDBTransactionCallbacksImpl::onComplete): - (WebCore::WebIDBTransactionCallbacksImpl::onTimeout): - * src/WebIDBTransactionCallbacksImpl.h: - -2010-10-04 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Adler. - - Rename RedirectScheduler to NavigationScheduler - https://bugs.webkit.org/show_bug.cgi?id=47037 - - Update for name change. - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::selectCacheWithManifest): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::loadJavaScriptURL): - -2010-10-01 Victoria Kirst <vrk@google.com> - - Reviewed by James Robinson. - - Fixing crash when audio media player is destructed - https://bugs.webkit.org/show_bug.cgi?id=47020 - - Creates the VideoLayerChromium layer only if the media player contains - a video. - - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::readyStateChanged): - (WebKit::WebMediaPlayerClientImpl::create): - -2010-10-01 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Nate Chapin. - - [Chromium] Remove WebURLLoaderClient::didFinishLoading(WebURLLoader*) - https://bugs.webkit.org/show_bug.cgi?id=47008 - - Now that WebURLLoaderClient::didFinishLoading(WebURLLoader*) has no - more callers, it can be removed (requires a Chromium roll to - http://crrev.com/61206, which actually removed the last usage). - - * DEPS: - * public/WebURLLoaderClient.h: - -2010-10-01 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Minor naming cleanup in WebDragData - https://bugs.webkit.org/show_bug.cgi?id=46937 - - This is a two-part patch--one to add the new methods with normalized - names that follow general WebKit convention, and a followup patch to - remove the original methods once Chromium is updated. - - * public/WebDragData.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::hasFileNames): renamed to containsFilenames - (WebKit::WebDragData::fileNames): renamed to filenames - (WebKit::WebDragData::setFileNames): renamed to setFilenames - (WebKit::WebDragData::appendToFileNames): renamed to appendToFilenames - (WebKit::WebDragData::containsFilenames): - (WebKit::WebDragData::filenames): - (WebKit::WebDragData::setFilenames): - (WebKit::WebDragData::appendToFilenames): - (WebKit::WebDragData::fileContentFileName): renamed to fileContentFilename - (WebKit::WebDragData::setFileContentFileName): renamed to setFileContentFilename - (WebKit::WebDragData::fileContentFilename): - (WebKit::WebDragData::setFileContentFilename): - -2010-10-01 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] add an identifier method to WebFrame. The identifier can be used to identify - a given frame of a view over time. Using a pointer to the WebFrame object is fragile, - since a new frame might have been allocated at the same address as an old, deleted frame. - https://bugs.webkit.org/show_bug.cgi?id=46884 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::generateFrameIdentifier): - (WebKit::WebFrameImpl::identifier): - (WebKit::WebFrameImpl::WebFrameImpl): - * src/WebFrameImpl.h: - -2010-09-29 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Changes to consolidate plugin zoom - https://bugs.webkit.org/show_bug.cgi?id=46550 - - * public/WebPlugin.h: - (WebKit::WebPlugin::setZoomLevel): - * public/WebPluginContainer.h: - * public/WebView.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::zoomLimitsChanged): - (WebKit::WebViewClient::zoomLevelChanged): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::loadFrameRequest): - (WebKit::WebPluginContainerImpl::zoomChanged): - (WebKit::WebPluginContainerImpl::zoomLimitsChanged): - * src/WebPluginContainerImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::zoomLevel): - (WebKit::WebViewImpl::setZoomLevel): - (WebKit::WebViewImpl::zoomLimitsChanged): - (WebKit::WebViewImpl::fullFramePluginZoomLevelChanged): - (WebKit::WebView::zoomLevelToZoomFactor): - (WebKit::WebView::zoomFactorToZoomLevel): - * src/WebViewImpl.h: - -2010-09-30 MORITA Hajime <morrita@google.com> - - Reviewed by James Robinson. - - [Chromium] build fails unless ACCELERATED_2D_CANVAS defined - https://bugs.webkit.org/show_bug.cgi?id=46955 - - Added ifdef guard around SharedGraphicsContext3D. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::getSharedGraphicsContext3D): - * src/WebViewImpl.h: - -2010-09-30 Alexey Marinichev <amarinichev@chromium.org> - - Reviewed by Chris Marrin. - - Add GetGraphicsResetStatusARB entry point from ARB_robustness - extension to GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=46850 - - Added a stub for GraphicsContext3D::getGraphicsResetStatusARB. - - * src/GraphicsContext3DChromium.cpp: - (WebCore::GraphicsContext3D::getGraphicsResetStatusARB): - -2010-09-30 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Remove WebHTTPBody::appendFileRange(..., const WebFileInfo&). - - * public/WebHTTPBody.h: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - -2010-09-30 Nico Weber <thakis@chromium.org> - - Reviewed by Adam Barth. - - [chromium] Fix clang error in KURLTest.cpp - https://bugs.webkit.org/show_bug.cgi?id=46861 - - * tests/KURLTest.cpp: - (WTF::operator<<): - -2010-09-30 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Refactor ChromiumDataObject to use getters/setters. - https://bugs.webkit.org/show_bug.cgi?id=46559 - - This is an intermediate step to converting ChromiumDataObject to use - callbacks to the browser to retrieve data. - - * public/WebDragData.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::initialize): - (WebKit::WebDragData::url): - (WebKit::WebDragData::setURL): - (WebKit::WebDragData::urlTitle): - (WebKit::WebDragData::setURLTitle): - (WebKit::WebDragData::downloadMetadata): - (WebKit::WebDragData::setDownloadMetadata): - (WebKit::WebDragData::fileExtension): - (WebKit::WebDragData::setFileExtension): - (WebKit::WebDragData::hasFileNames): - (WebKit::WebDragData::fileNames): - (WebKit::WebDragData::setFileNames): - (WebKit::WebDragData::appendToFileNames): - (WebKit::WebDragData::plainText): - (WebKit::WebDragData::setPlainText): - (WebKit::WebDragData::htmlText): - (WebKit::WebDragData::setHTMLText): - (WebKit::WebDragData::htmlBaseURL): - (WebKit::WebDragData::setHTMLBaseURL): - (WebKit::WebDragData::fileContentFileName): - (WebKit::WebDragData::setFileContentFileName): - (WebKit::WebDragData::fileContent): - (WebKit::WebDragData::setFileContent): - -2010-09-29 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - glsl-conformance.html on khronos will crash chromium --in-process-webgl - https://bugs.webkit.org/show_bug.cgi?id=46863 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Make ShaderSourceMap as <ShaderID, ShaderSourceEntry*>, so map resizing will be efficient and we don't need to worry about pointer copying. - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::compileShader): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderiv): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::createShader): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): - * src/WebGraphicsContext3DDefaultImpl.h: Ditto. - (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::ShaderSourceEntry): - -2010-09-30 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [Chromium] WebIDBDatabase and WebIDBObjectStore are missing methods called from Chromium land. - https://bugs.webkit.org/show_bug.cgi?id=46922 - - The missing functions were removed in r68795. - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::createObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::removeIndex): - -2010-09-29 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - [chromium] Add accelerated compositing support to DumpRenderTree and test_shell - https://bugs.webkit.org/show_bug.cgi?id=46849 - - Added offscreen code path for WebGraphicsContext3DDefaultImpl which - works with the compositor integration in both DumpRenderTree and - test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint - and thereby trigger the compositor's readback code path. Added support - for --enable-accelerated-compositing to DumpRenderTree. - - Tested in both test_shell and DumpRenderTree on Linux, the latter by - modifying a compositing layout test, dumping the pixels and verifying - that they matched the output when the compositor was active. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId): - (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D): - (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-09-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Finished IDBTransaction for IndexedDB - https://bugs.webkit.org/show_bug.cgi?id=46823 - - Plumbing. - - * public/WebIDBCallbacks.h: - (WebKit::WebIDBCallbacks::onSuccess): - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::createObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - (WebKit::WebIDBDatabase::close): - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::openObjectCursor): - (WebKit::WebIDBIndex::openCursor): - (WebKit::WebIDBIndex::getObject): - (WebKit::WebIDBIndex::get): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::get): - (WebKit::WebIDBObjectStore::put): - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::removeIndex): - (WebKit::WebIDBObjectStore::openCursor): - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::id): - (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface): - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::createObjectStore): - (WebCore::IDBDatabaseProxy::removeObjectStore): - (WebCore::IDBDatabaseProxy::close): - * src/IDBDatabaseProxy.h: - * src/IDBIndexBackendProxy.cpp: - (WebCore::IDBIndexBackendProxy::openObjectCursor): - (WebCore::IDBIndexBackendProxy::openCursor): - (WebCore::IDBIndexBackendProxy::getObject): - (WebCore::IDBIndexBackendProxy::get): - * src/IDBIndexBackendProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::put): - (WebCore::IDBObjectStoreProxy::remove): - (WebCore::IDBObjectStoreProxy::createIndex): - (WebCore::IDBObjectStoreProxy::removeIndex): - (WebCore::IDBObjectStoreProxy::openCursor): - * src/IDBObjectStoreProxy.h: - * src/IDBTransactionBackendProxy.cpp: - (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy): - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::removeObjectStore): - (WebKit::WebIDBDatabaseImpl::close): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::openCursor): - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::get): - * src/WebIDBIndexImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::put): - (WebKit::WebIDBObjectStoreImpl::remove): - (WebKit::WebIDBObjectStoreImpl::createIndex): - (WebKit::WebIDBObjectStoreImpl::removeIndex): - (WebKit::WebIDBObjectStoreImpl::openCursor): - * src/WebIDBObjectStoreImpl.h: - -2010-09-29 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: display headers actually used by network stack in Resources tab - Added plumbing for raw headers flag and response field between chromium and WebCore. - https://bugs.webkit.org/show_bug.cgi?id=46092 - - * WebKit.gyp: - * public/WebResourceRawHeaders.h: Added. - * public/WebURLRequest.h: - * public/WebURLResponse.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::willSendRequest): - * src/WebResourceRawHeaders.cpp: Added. - (WebKit::WebResourceRawHeaders::WebResourceRawHeaders): - (WebKit::WebResourceRawHeaders::~WebResourceRawHeaders): - (WebKit::WebResourceRawHeaders::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>): - (WebKit::addHeader): - (WebKit::WebResourceRawHeaders::addRequestHeader): - (WebKit::WebResourceRawHeaders::addResponseHeader): - * src/WebURLRequest.cpp: - (WebKit::WebURLRequest::setReportRawHeaders): - (WebKit::WebURLRequest::reportRawHeaders): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::resourceRawHeaders): - (WebKit::WebURLResponse::setResourceRawHeaders): - * src/WebURLResponsePrivate.h: - -2010-09-30 Avi Drissman <avi@google.com> - - Reviewed by Kenneth Russell. - - [Chromium] Tabbing into page doesn't always select the first element - https://bugs.webkit.org/show_bug.cgi?id=46856 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setInitialFocus): - -2010-09-30 Alexey Marinichev <amarinichev@chromium.org> - - Reviewed by Kenneth Russell. - - Rename chromium's GraphicsContext3D.cpp to match others. - https://bugs.webkit.org/show_bug.cgi?id=46771 - - * WebKit.gyp: - * src/GraphicsContext3DChromium.cpp: Renamed from WebKit/chromium/src/GraphicsContext3D.cpp. - -2010-09-29 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - Refactor HTMLInputElement: Make DeprecatedInputType private. - https://bugs.webkit.org/show_bug.cgi?id=46791 - - * src/WebPasswordFormUtils.cpp: - (WebKit::findPasswordFormFields): - Accept any text field types as a username field. - * src/WebSearchableFormData.cpp: - (WebCore::HasSuitableTextElement): - Accept any text field types as a search query field. - -2010-09-29 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Dumitru Daniliuc. - - Add removeRecursively to WebKit WebFileSystem API - https://bugs.webkit.org/show_bug.cgi?id=46842 - - * public/WebFileSystem.h: - (WebKit::WebFileSystem::removeRecursively): Added. - -2010-09-29 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by David Levin. - - Fix DirectoryReader's behavior to trigger only one EntriesCallback per readEntries - https://bugs.webkit.org/show_bug.cgi?id=46563 - - * src/WebFileSystemCallbacksImpl.cpp: - (WebKit::WebFileSystemCallbacksImpl::didReadDirectory): - -2010-09-29 Tony Chang <tony@chromium.org> - - Reviewed by James Robinson. - - [chromium] enable -Werror for DRT and webkit_unit_tests on Linux - https://bugs.webkit.org/show_bug.cgi?id=46829 - - * WebKit.gyp: - * tests/ArenaTestHelpers.h: - (WebCore::ArenaTestHelpers::TrackedAllocator::free): - * tests/IDBKeyPathTest.cpp: - (WebCore::checkKeyPath): - -2010-09-29 Tony Chang <tony@chromium.org> - - Reviewed by James Robinson. - - [chromium] enable -Werror on chromium linux webkit - https://bugs.webkit.org/show_bug.cgi?id=46821 - - * WebKit.gyp: - * src/gtk/WebInputEventFactory.cpp: - -2010-09-29 Mihai Parparita <mihaip@chromium.org> - - Unreviewed removal of unused #define from WebHistory.h. - Chromium usage of WEBKIT_BUG_40451_IS_FIXED was removed with - http://crrev.com/50642. - - * public/WebHistoryItem.h: - -2010-09-29 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed, adding one more missing change from the last patch. - https://bugs.webkit.org/show_bug.cgi?id=46524 - - * WebKit.gyp: - -2010-09-29 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed, adding the new files that were supposed to be added - but I missed to include in my previous patch. - https://bugs.webkit.org/show_bug.cgi?id=46524 - - * src/WorkerAsyncFileSystemChromium.cpp: Added. - * src/WorkerAsyncFileSystemChromium.h: Added. - -2010-09-29 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by David Levin. - - Bridge all FileSystem operations on Workers to the MainThread - https://bugs.webkit.org/show_bug.cgi?id=46524 - - * src/LocalFileSystemChromium.cpp: - (WebCore::LocalFileSystem::requestFileSystem): Changed the worker case - code to create WebFileSystemCallbacksImpl with the current - ScriptExecutionContext (WorkerContext). - * src/WebFileSystemCallbacksImpl.cpp: - (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): Added - a new constructor that takes ScriptExecutionContext (WorkerContext) - for workers. - (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem): Added the - code for workers that creates WorkerAsyncFileSystemChromium. - * src/WebFileSystemCallbacksImpl.h: - * src/WorkerAsyncFileSystemChromium.cpp: Added. - * src/WorkerAsyncFileSystemChromium.h: Added. - * src/WorkerFileSystemCallbacksBridge.cpp: Added methods for regular - file system operations to proxy them to the main thread. - (WebKit::WorkerFileSystemCallbacksBridge::createForOpenFileSystem): - (WebKit::WorkerFileSystemCallbacksBridge::createForMove): - (WebKit::WorkerFileSystemCallbacksBridge::createForCopy): - (WebKit::WorkerFileSystemCallbacksBridge::createForRemove): - (WebKit::WorkerFileSystemCallbacksBridge::createForReadMetadata): - (WebKit::WorkerFileSystemCallbacksBridge::createForCreateFile): - (WebKit::WorkerFileSystemCallbacksBridge::createForCreateDirectory): - (WebKit::WorkerFileSystemCallbacksBridge::createForFileExists): - (WebKit::WorkerFileSystemCallbacksBridge::createForDirectoryExists): - (WebKit::WorkerFileSystemCallbacksBridge::createForReadDirectory): - (WebKit::MainThreadFileSystemCallbacks::didSucceed): - (WebKit::MainThreadFileSystemCallbacks::didReadMetadata): - (WebKit::MainThreadFileSystemCallbacks::didReadDirectory): - (WebKit::WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::moveOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::copyOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::removeOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::readMetadataOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::createFileOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::fileExistsOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::didSucceedOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::didReadMetadataOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::didReadDirectoryOnMainThread): - (WebKit::WorkerFileSystemCallbacksBridge::didSucceedOnWorkerThread): - (WebKit::WorkerFileSystemCallbacksBridge::didReadMetadataOnWorkerThread): - (WebKit::WorkerFileSystemCallbacksBridge::didReadDirectoryOnWorkerThread): - (WebKit::WorkerFileSystemCallbacksBridge::derefIfWorkerIsStopped): - * src/WorkerFileSystemCallbacksBridge.h: - -2010-09-29 Matt Perry <mpcomplete@chromium.org> - - Reviewed by Darin Fisher. - - Remove obsolete registerExtension variants from chromium port. - https://bugs.webkit.org/show_bug.cgi?id=46683 - - * public/WebScriptController.h: - * src/WebScriptController.cpp: - -2010-09-29 Chris Guillory <chris.guillory@google.com> - - Reviewed by Dimitri Glazkov. - - Add method which checks if a WebAccessibilityObject is in the cache. - https://bugs.webkit.org/show_bug.cgi?id=46605 - - * public/WebAccessibilityCache.h: - * src/WebAccessibilityCacheImpl.cpp: - (WebKit::WebAccessibilityCacheImpl::isCached): - * src/WebAccessibilityCacheImpl.h: - -2010-09-29 Anantanarayanan G Iyengar <ananta@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Honor z-index specified by a plugin - https://bugs.webkit.org/show_bug.cgi?id=46223 - - The Chromium plugin code which implements the iframe shim technique - for overlaying a windowed plugin with content on the page should - honor the z-index specified on the plugin widget. If the z-index - here is greater than the enclosing iframe shim then the plugin - should be displayed over the iframe. Updated the layout test to test - for this case. Skipped the plugins/iframe-shims.html layout test on - platforms which don't support it. - - * src/WebPluginContainerImpl.cpp: - -2010-09-28 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Keep the accelerated compositor around even after a page is - done using it to avoid startup costs in pages that frequently switch - the compositor on and off. - https://bugs.webkit.org/show_bug.cgi?id=45845 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-09-28 Nat Duca <nduca@chromium.org> - - Reviewed by James Robinson. - - [chromium] invalidateRootLayerRect needs to schedule compositor - https://bugs.webkit.org/show_bug.cgi?id=46219 - - Make sure setRootLayerNedsDisplay is called by root invalidation. - To avoid confusion about root-layer versus non-root-layer - behavior, move the root layer damage state to the WebView. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setRootLayerNeedsDisplay): - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - (WebKit::WebViewImpl::doComposite): - * src/WebViewImpl.h: - -2010-09-28 Jenn Braithwaite <jennb@chromium.org> - - Reviewed by Dmitry Titov. - - Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument. - https://bugs.webkit.org/show_bug.cgi?id=46663 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::didTransferChildFrameToNewDocument): - * src/FrameLoaderClientImpl.h: - -2010-09-28 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [Chromium] Linking error due to wrong guard in WebIDBTransaction.h - https://bugs.webkit.org/show_bug.cgi?id=46710 - - Remove the wrong guard. - - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface): - -2010-09-27 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - Use if instead of switch to avoid compilation error. - - * src/VideoFrameChromiumImpl.cpp: - (WebKit::VideoFrameChromiumImpl::requiredTextureSize): - -2010-09-27 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - Remove constant definitions from this file. - - * src/VideoFrameChromiumImpl.cpp: - -2010-09-27 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - Fix warnings again. - - * src/VideoFrameChromiumImpl.cpp: - (WebKit::VideoFrameChromiumImpl::requiredTextureSize): - -2010-09-27 Alpha Lam <hclam@chromium.org> - - Build fix. Not reviewed. - - Add a default for unhandled cases for switch statement. - - * src/VideoFrameChromiumImpl.cpp: - (WebKit::VideoFrameChromiumImpl::requiredTextureSize): - -2010-09-27 Victoria Kirst <vrk@google.com> - - Reviewed by James Robinson. - - Fixing constants in VideoFrameChromiumImpl so that it overloads the - VideoFrameChromium const declarations. Also adding logic such that a - VideoFrameChromium understands what size its texture should be based - on frame format. - https://bugs.webkit.org/show_bug.cgi?id=45069 - - * src/VideoFrameChromiumImpl.cpp: - -2010-09-27 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by James Robinson. - - [chromium] WebViewImpl now holds a ref counted pointer to the LayerRendererChromium - to ensure that the compositor does not get destroyed before the layers used - by it do. This was done to ensure that layers properly clean up their texture - resources on destruction. - https://bugs.webkit.org/show_bug.cgi?id=46139 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - * src/WebViewImpl.h: - -2010-09-24 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Hook up ANGLE with chromium --in-process-webgl port - https://bugs.webkit.org/show_bug.cgi?id=44309 - - * WebKit.gyp: Add angle dependency. - * src/WebGraphicsContext3DDefaultImpl.cpp: Using angle for shader validation and translation. - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::compileShader): - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Using defined const instead. - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderiv): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::createShader): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): - (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers): - (WebKit::WebGraphicsContext3DDefaultImpl::angleDestroyCompilers): - (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource): - * src/WebGraphicsContext3DDefaultImpl.h: Add necessary data and functions for angle stuff. - (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::ShaderSourceEntry): - (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::~ShaderSourceEntry): - -2010-09-27 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Adam Barth. - - [Cleanup] Add create method to FileSystemCallbacks to get rid of naked new's - https://bugs.webkit.org/show_bug.cgi?id=46561 - - Also cleanup the callbacks layering to pass AsyncFileSystemCallbacks - object to LocalFileSystem::requestFileSystem (rather than - FileSystemCallback and ErrorCallback) so that all the callbacks class - we pass from WebCore to WebKit/chromium/src will be - AsyncFileSystemCallbacks. - - * src/LocalFileSystemChromium.cpp: - (WebCore::LocalFileSystem::requestFileSystem): Changed to take - AsyncFileSystemCallbacks as (a) callback argument(s). - -2010-09-24 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] remove unused gtk WebScreenInfoFactory - https://bugs.webkit.org/show_bug.cgi?id=46526 - - AFAICT these files aren't referenced in code or by gyp. - - * WebKit.gyp: Remove duplicate filename. - * public/gtk/WebScreenInfoFactory.h: Removed. - * src/gtk/WebScreenInfoFactory.cpp: Removed. - -2010-09-26 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Adam Barth. - - [Chromium] Remove no longer used WebView member functions - https://bugs.webkit.org/show_bug.cgi?id=46515 - - With http://crrev.com/60526 there's no longer any Chromium code calling - the non-static versions of addUserScript and addUserStyleSheet. - - * public/WebView.h: - -2010-09-25 Nicolas Weber <thakis@chromium.org> - - Reviewed by James Robinson. - - [chromium] Fix clang warning/error. - https://bugs.webkit.org/show_bug.cgi?id=46552 - - * src/WorkerFileSystemCallbacksBridge.h: - -2010-09-24 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Unnecessary blob dependency in WebKit.gyp - https://bugs.webkit.org/show_bug.cgi?id=46488 - - r66322 shouldn't have added a blob dependency by hand to targets in - WebKit.gyp, instead blob should be a dependency of webkit_support. - http://crrev.com/59406 did that, so we can now remove these deps. - - * WebKit.gyp: - -2010-09-24 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Tony Chang. - - [chromium] Implement TextInputController::firstRectForCharacterRange - https://bugs.webkit.org/show_bug.cgi?id=38100 - - Implemented TextInputController::firstRectForCharacterRange for chromium platform. - Because the function needs to return an array of integers, added makeIntArray to WebBindings. - makeIntArray does not take Vector because WebBindings.h is included in plugin glue code - where it cannot find wtf/Vector.h. - - No new tests are added since we need to implement the same feature in chromium side - in order to enable any tests that uses this function. - - * public/WebBindings.h: - * public/WebFrame.h: - * src/WebBindings.cpp: - (WebKit::makeIntArrayImpl): Added. - (WebKit::WebBindings::makeIntArray): Added. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::firstRectForCharacterRange): Added. - * src/WebFrameImpl.h: - -2010-09-24 Tony Chang <tony@chromium.org> - - Unreviewed, fix chromium compile after r68276 which renamed - Render*::minPrefWidth to minPreferredLogicalWidth. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::contentsPreferredWidth): - -2010-09-24 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - Remove unnecessary parameter from AsyncFileWriterClient::didTruncate - https://bugs.webkit.org/show_bug.cgi?id=46390 - - * public/WebFileWriterClient.h: - * src/AsyncFileWriterChromium.cpp: - * src/AsyncFileWriterChromium.h: - -2010-09-24 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Send webkit accessibility notifications to Chromium. - https://bugs.webkit.org/show_bug.cgi?id=45156 - - * public/WebAccessibilityCache.h: - * public/WebViewClient.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedNodeChanged): - (WebKit::ChromeClientImpl::getPopupMenuInfo): - * src/ChromeClientImpl.h: - * src/WebAccessibilityCache.cpp: - (WebKit::WebAccessibilityCache::accessibilityEnabled): - -2010-09-23 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Fix some IndexedDB tests for DRT - https://bugs.webkit.org/show_bug.cgi?id=46444 - - * DEPS: Roll Chromium revision to 60394, which added - WebKitClient::createIDBKeysFromSerializedValuesAndKeyPath() implementation. - -2010-09-23 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed, another attempt to fix build. The code didn't have proper if-defs. - - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::openFileSystem): - * src/WebWorkerBase.h: - * src/WorkerFileSystemCallbacksBridge.h: - -2010-09-23 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed; build fix attempt. - - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::openFileSystem): - * src/WorkerFileSystemCallbacksBridge.h: - -2010-09-23 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by David Levin. - - Add Worker support for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=45808 - - Added WebWorkerBase::openFileSystem and WebCommonWorkerClient:: - openFileSystem to call in to the browser via Worker stub/proxy - in the chromium. - - Also added WorkerFileSystemCallbacksBridge class that proxies - requests and callbacks between from/to worker thread to/from the - main thread. - - * public/WebCommonWorkerClient.h: - (WebKit::WebCommonWorkerClient::openFileSystem): Added. - * src/LocalFileSystemChromium.cpp: - (WebCore::LocalFileSystem::localFileSystem): Added. - (WebCore::LocalFileSystem::requestFileSystem): Added implementation - for workers. In worker case this calls WebWorkerBase::openFileSystem. - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::openFileSystem): Added. This is called from - LocalFileSystem::requestFileSystem on the worker thread and creates - a bridge to call WebCommonWorkerClient::openFileSystem on the main - thread. - * src/WebWorkerBase.h: - * src/WebWorkerClientImpl.h: - (WebKit::WebWorkerClientImpl::openFileSystem): Added. - * src/WorkerFileSystemCallbacksBridge.cpp: Added. - * src/WorkerFileSystemCallbacksBridge.h: Added. - -2010-09-23 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] implement layoutTestController.sampleSVGAnimationForElementAtTime - https://bugs.webkit.org/show_bug.cgi?id=46426 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::pauseSVGAnimation): - * src/WebFrameImpl.h: - -2010-09-23 Tony Chang <tony@chromium.org> - - Reviewed by David Levin. - - [chromium] add caretBrowsingEnabled to WebSettings and DRT - https://bugs.webkit.org/show_bug.cgi?id=46388 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setCaretBrowsingEnabled): - * src/WebSettingsImpl.h: - -2010-09-23 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - Rename FileWriterClient to AsyncFileWriterClient. - https://bugs.webkit.org/show_bug.cgi?id=46325 - - * src/AsyncFileSystemChromium.cpp: - * src/AsyncFileSystemChromium.h: - * src/AsyncFileWriterChromium.cpp: - * src/AsyncFileWriterChromium.h: - -2010-09-23 Nate Chapin <japhet@chromium.org> - - Reviewed by Darin Fisher. - - Add hyperlink auditing settings (i.e., <a ping>). - https://bugs.webkit.org/show_bug.cgi?id=30458 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setHyperlinkAuditingEnabled): - * src/WebSettingsImpl.h: - -2010-09-23 Andrey Kosyakov <caseq@chromium.org> - - Unreviewed build fix ("WTF/" -> "wtf/" in include, broke Arm build) - - * src/AsyncFileWriterChromium.h: - -2010-09-08 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add chromium port API for accessing Web Timing information - https://bugs.webkit.org/show_bug.cgi?id=45428 - - * WebKit.gyp: - * public/WebFrame.h: - * public/WebPerformance.h: Added. - (WebKit::WebPerformance::WebPerformance): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::performance): - * src/WebFrameImpl.h: - * src/WebPerformance.cpp: Added. - (WebKit::WebPerformance::WebPerformance): - (WebKit::WebPerformance::~WebPerformance): - (WebKit::WebPerformance::operator=): - (WebKit::WebPerformance::navigationType): - (WebKit::WebPerformance::navigationStart): - (WebKit::WebPerformance::unloadEventEnd): - (WebKit::WebPerformance::redirectStart): - (WebKit::WebPerformance::redirectEnd): - (WebKit::WebPerformance::redirectCount): - (WebKit::WebPerformance::fetchStart): - (WebKit::WebPerformance::domainLookupStart): - (WebKit::WebPerformance::domainLookupEnd): - (WebKit::WebPerformance::connectStart): - (WebKit::WebPerformance::connectEnd): - (WebKit::WebPerformance::requestStart): - (WebKit::WebPerformance::requestEnd): - (WebKit::WebPerformance::responseStart): - (WebKit::WebPerformance::responseEnd): - (WebKit::WebPerformance::loadEventStart): - (WebKit::WebPerformance::loadEventEnd): - (WebKit::WebPerformance::operator PassRefPtr<Performance>): - -2010-09-23 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - IDBObjectStore::get should run in a transaction. - https://bugs.webkit.org/show_bug.cgi?id=44700 - - * public/WebIDBFactory.h: - * public/WebIDBObjectStore.h: - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::didCompleteTaskEvents): - (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface): - * src/IDBDatabaseProxy.h: - * src/IDBFactoryBackendProxy.cpp: - * src/IDBFactoryBackendProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::get): - * src/IDBObjectStoreProxy.h: - * src/IDBTransactionBackendProxy.cpp: - (WebCore::IDBTransactionBackendProxy::scheduleTask): - (WebCore::IDBTransactionBackendProxy::didCompleteTaskEvents): - * src/IDBTransactionBackendProxy.h: - (WebCore::IDBTransactionBackendProxy::getWebIDBTransaction): - * src/WebIDBFactoryImpl.cpp: - * src/WebIDBFactoryImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::get): - * src/WebIDBObjectStoreImpl.h: - * src/WebIDBTransactionImpl.cpp: - (WebKit::WebIDBTransactionImpl::didCompleteTaskEvents): - (WebKit::WebIDBTransactionImpl::getIDBTransactionBackendInterface): - * src/WebIDBTransactionImpl.h: - -2010-09-23 Jeremy Orlow <jorlow@chromium.org> - - Unreviewed small fix for my last patch. - - * public/WebIDBTransaction.h: - (WebKit::WebIDBTransaction::id): - -2010-09-22 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] User style layout tests don't pass on Chromium - https://bugs.webkit.org/show_bug.cgi?id=46069 - - Expose UserStyleInjectionTime in WebView. - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebView::addUserStyleSheet): - -2010-09-22 James Robinson <jamesr@chromium.org> - - [chromium] Re-synchronizes features.gypi with upstream feature_overrides.gypi. - - * features.gypi: - -2010-09-22 Ruben <chromium@hybridsource.org> - - Reviewed by Tony Chang. - - [chromium] added ifdefs for FreeBSD support - https://bugs.webkit.org/show_bug.cgi?id=46316 - - * WebKit.gyp: - * features.gypi: - * src/ChromiumBridge.cpp: - * src/WebFrameImpl.cpp: - (WebKit::ChromePrintContext::spoolPage): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::mouseUp): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::setScrollbarColors): - (WebKit::WebViewImpl::setSelectionColors): - -2010-09-22 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Dumitru Daniliuc. - - Add Chromium implementation for FileWriter - https://bugs.webkit.org/show_bug.cgi?id=44361 - - No new tests; the implementation's not yet far enough along for that. - - This makes a chain of construction-and-linking-up for various sorts of - FileWriter interfaces to call through to Chromium, and for various - sorts of FileWriterClients to call back, with object ownership always - pointing towards the Chromium API. That is, the DOM object owns an - AsyncFileWriter, which owns its implementation object, and the reverse - (client) direction is raw pointers. - - File metadata is looked up before the FileWriter is returned, so that - we know the file exists and can cache its length. - - The WebKit/chromium interface here is modeled after that of the - FileSystem. - - * public/WebFileInfo.h: - (WebKit::WebFileInfo::WebFileInfo): - * src/AsyncFileSystemChromium.cpp: - (WebCore::FileWriterHelperCallbacks::FileWriterHelperCallbacks): - (WebCore::FileWriterHelperCallbacks::didSucceed): - (WebCore::FileWriterHelperCallbacks::didReadMetadata): - (WebCore::FileWriterHelperCallbacks::didReadDirectory): - (WebCore::FileWriterHelperCallbacks::didOpenFileSystem): - (WebCore::FileWriterHelperCallbacks::didCreateFileWriter): - (WebCore::FileWriterHelperCallbacks::didFail): - (WebCore::AsyncFileSystemChromium::createWriter): - * src/AsyncFileSystemChromium.h: - * src/AsyncFileWriterChromium.cpp: - (WebCore::AsyncFileWriterChromium::setWebFileWriter): - (WebCore::AsyncFileWriterChromium::write): - (WebCore::AsyncFileWriterChromium::didFail): - * src/AsyncFileWriterChromium.h: - * src/WebFileSystemCallbacksImpl.h: - -2010-09-22 Kenneth Russell <kbr@google.com> - - Unreviewed, Chromium build fix. Fix build when accelerated - compositing is not enabled at compile time. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - -2010-09-22 Matt Perry <mpcomplete@chromium.org> - - Reviewed by Darin Fisher. - - Trying to reland a version of r67749: - Have V8DOMWindowShell ask the embedder whether to run a V8 extension - in a particular script context. - https://bugs.webkit.org/show_bug.cgi?id=45721 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowScriptExtension): - * public/WebScriptController.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::allowScriptExtension): - * src/FrameLoaderClientImpl.h: - * src/WebScriptController.cpp: - (WebKit::WebScriptController::registerExtension): - -2010-09-22 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Change WebKit API for IDBTransaciton to new style - https://bugs.webkit.org/show_bug.cgi?id=46263 - - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::openObjectCursor): - (WebKit::WebIDBIndex::openCursor): - (WebKit::WebIDBIndex::getObject): - (WebKit::WebIDBIndex::get): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::get): - (WebKit::WebIDBObjectStore::put): - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::openCursor): - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::openCursor): - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::get): - * src/WebIDBIndexImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::get): - (WebKit::WebIDBObjectStoreImpl::put): - (WebKit::WebIDBObjectStoreImpl::remove): - (WebKit::WebIDBObjectStoreImpl::openCursor): - * src/WebIDBObjectStoreImpl.h: - -2010-09-22 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: implement pausing on XHR - https://bugs.webkit.org/show_bug.cgi?id=46086 - - * src/js/DevTools.js: - (): - -2010-09-21 Brett Wilson <brettw@chromium.org> - - Reviewed by Darin Fisher. - - Add caps log and num lock toggle state to WebInputEvent. - https://bugs.webkit.org/show_bug.cgi?id=46229 - - * public/WebInputEvent.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleInputEvent): - * src/WebViewImpl.h: - * src/gtk/WebInputEventFactory.cpp: - (WebKit::gdkStateToWebEventModifiers): - * src/win/WebInputEventFactory.cpp: - (WebKit::SetToggleKeyState): - (WebKit::WebInputEventFactory::keyboardEvent): - (WebKit::WebInputEventFactory::mouseEvent): - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2010-09-21 James Robinson <jamesr@chromium.org> - - Reviewed by Kenneth Russell. - - [chromium] Check if the acceleratedCompositingEnabled setting is active in WebViewImpl::graphicsContext3D() - https://bugs.webkit.org/show_bug.cgi?id=46239 - - This adds a check for whether acceleratedCompositingEnabled is true on the Page's Settings - object before creating and vending a GraphicsContext3D object. This is needed because when - an offscreen WebGraphicsContext3DCommandBufferImpl is initialized it first asks the WebViewImpl - for the compositor context. WebGraphicsContext3DCommandBufferImpl::initialize checks if the - disable accelerated compositing command line switch is set, but this is insufficient as sometimes - the Setting object does not agree exactly with the command line switches. For example, - we explicitly toggle accelerated compositing for some chrome UI URLs regardless of what the - flag says. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::graphicsContext3D): - -2010-09-21 Kent Tamura <tkent@chromium.org> - - Reviewed by David Levin. - - [Chromium] Remove WebInputElement::InputType and inputType() - https://bugs.webkit.org/show_bug.cgi?id=46238 - - * DEPS: Roll Chromium revision to 60132, which removed all usage of inputType(). - * public/WebInputElement.h: Remove InputType and inputType(). - * src/AssertMatchingEnums.cpp: Remove WebInputElement::InputType - - HTMLInputElement::InputType matching tests. - * src/WebInputElement.cpp: Remove inputType(). - -2010-09-21 Andrew Wilson <atwilson@chromium.org> - - Unreviewed, rolling out r67982. - http://trac.webkit.org/changeset/67982 - https://bugs.webkit.org/show_bug.cgi?id=45156 - - Causes crashes on chromium testshell - - * public/WebAccessibilityCache.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::didChangeAccessibilityObjectState): - (WebKit::WebViewClient::didChangeAccessibilityObjectChildren): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedNodeChanged): - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState): - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren): - * src/ChromeClientImpl.h: - * src/WebAccessibilityCache.cpp: - -2010-09-21 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Remove GLES2Context and WebGLES2Context - https://bugs.webkit.org/show_bug.cgi?id=46131 - - Removed now-obsolete GLES2Context and WebGLES2Context classes, and - dependency on command buffer client code from WebCore. Built and - tested 3D CSS and WebGL content on Mac OS X to test. - - * WebKit.gyp: - * public/WebGLES2Context.h: Removed. - * public/WebGraphicsContext3D.h: - * public/WebKitClient.h: - * public/WebView.h: - * src/ChromeClientImpl.cpp: - * src/GLES2Context.cpp: Removed. - * src/GLES2ContextInternal.cpp: Removed. - * src/GLES2ContextInternal.h: Removed. - * src/WebGraphicsContext3DDefaultImpl.cpp: - * src/WebGraphicsContext3DDefaultImpl.h: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - -2010-09-21 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Roll forward Chromium DEPS to pick up removal of WebGLES2Context dependencies - https://bugs.webkit.org/show_bug.cgi?id=46231 - - Ran build-webkit --chromium --debug on Mac OS X to test the roll-forward. - - * DEPS: - -2010-09-21 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - [Chromium] Plumb the IDBTransansaction's id - https://bugs.webkit.org/show_bug.cgi?id=46197 - - Next step, add the plumbing to Chromium. Then we add code to WebKit - that uses it (and take out the default IDBTransaction param). - - * public/WebIDBCursor.h: - (WebKit::WebIDBCursor::key): - (WebKit::WebIDBCursor::value): - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::openObjectCursor): - (WebKit::WebIDBIndex::openCursor): - (WebKit::WebIDBIndex::getObject): - (WebKit::WebIDBIndex::get): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::get): - (WebKit::WebIDBObjectStore::put): - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::removeIndex): - (WebKit::WebIDBObjectStore::openCursor): - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::openCursor): - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::get): - * src/WebIDBIndexImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::get): - (WebKit::WebIDBObjectStoreImpl::put): - (WebKit::WebIDBObjectStoreImpl::remove): - (WebKit::WebIDBObjectStoreImpl::openCursor): - * src/WebIDBObjectStoreImpl.h: - -2010-09-21 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Send webkit accessibility notifications to Chromium. - https://bugs.webkit.org/show_bug.cgi?id=45156 - - * public/WebAccessibilityCache.h: - * public/WebViewClient.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedNodeChanged): - (WebKit::ChromeClientImpl::getPopupMenuInfo): - * src/ChromeClientImpl.h: - * src/WebAccessibilityCache.cpp: - (WebKit::WebAccessibilityCache::accessibilityEnabled): - -2010-09-21 Steve Block <steveblock@google.com> - - Reviewed by Jeremy Orlow. - - DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods - https://bugs.webkit.org/show_bug.cgi?id=45891 - - Implements DeviceOrientationClientProxy::deviceOrientationControllerDestroyed() as a no-op, - as the client's lifetime is determined by the WebViewImpl. - - * src/DeviceOrientationClientProxy.cpp: - (WebKit::DeviceOrientationClientProxy::deviceOrientationControllerDestroyed): - * src/DeviceOrientationClientProxy.h: - -2010-09-21 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Jeremy Orlow. - - [chromium] expose the filename used for a given indexed DB - https://bugs.webkit.org/show_bug.cgi?id=46090 - - * WebKit.gyp: - * public/WebIDBFactory.h: - * src/WebIDBFactory.cpp: - (WebKit::WebIDBFactory::databaseFileName): - -2010-09-20 Philippe Normand <pnormand@igalia.com> - - Reviewed by Eric Carlson. - - [GTK] enhanced context menu for media elements - https://bugs.webkit.org/show_bug.cgi?id=45021 - - New localized strings for the media element context-menu. - - * src/LocalizedStrings.cpp: - (WebCore::contextMenuItemTagOpenVideoInNewWindow): - (WebCore::contextMenuItemTagOpenAudioInNewWindow): - (WebCore::contextMenuItemTagCopyVideoLinkToClipboard): - (WebCore::contextMenuItemTagCopyAudioLinkToClipboard): - (WebCore::contextMenuItemTagToggleMediaControls): - (WebCore::contextMenuItemTagToggleMediaLoop): - (WebCore::contextMenuItemTagEnterVideoFullscreen): - (WebCore::contextMenuItemTagMediaPlay): - (WebCore::contextMenuItemTagMediaPause): - (WebCore::contextMenuItemTagMediaMute): - -2010-09-20 Nico Weber <thakis@chromium.org> - - Reviewed by James Robinson. - - [chromium] Trivial clang warning fix - https://bugs.webkit.org/show_bug.cgi?id=46143 - - * src/WebFileSystemCallbacksImpl.h: - -2010-09-20 Darin Adler <darin@apple.com> - - Reviewed by James Robinson. - - Deprecate the inputType function on HTMLInputElement - https://bugs.webkit.org/show_bug.cgi?id=46023 - - * src/WebInputElement.cpp: - (WebKit::WebInputElement::inputType): - * src/WebPasswordFormUtils.cpp: - (WebKit::findPasswordFormFields): - * src/WebSearchableFormData.cpp: - (WebCore::HasSuitableTextElement): - Use deprecatedInputType instead of inputType. - -2010-09-20 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Change compositor to use GraphicsContext3D rather than GLES2Context - https://bugs.webkit.org/show_bug.cgi?id=45912 - - Switched Chromium's compositor to use GraphicsContext3D to issue - its OpenGL rendering calls rather than the Chromium-specific - GLES2Context and command buffer OpenGL implementation. - - The in-process software rendering path for GraphicsContext3D does - not yet work with the compositor, at least not on Mac OS X. This - will be worked on in subsequent bugs. - - Tested manually with 3D CSS, WebGL and video content on Mac OS X - and Linux. No new tests. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::extractWebGraphicsContext3D): - (WebCore::GraphicsContext3D::create): - * src/GraphicsContext3DInternal.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::gles2Context): - (WebKit::WebViewImpl::graphicsContext3D): - * src/WebViewImpl.h: - -2010-09-20 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - [chromium] Roll forward Chromium DEPS to pick up WebGraphicsContext3D implementation changes - https://bugs.webkit.org/show_bug.cgi?id=46115 - - * DEPS: - -2010-09-20 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: merge Inspector client runtime events into the serialized inspector state object. - - Drive-by rename getBackendSettings -> getInspectorState to better reflect the nature of the data. - - https://bugs.webkit.org/show_bug.cgi?id=45974 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::updateInspectorStateCookie): - * src/InspectorClientImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setRuntimeProperty): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - (WebKit::WebDevToolsAgentImpl::updateInspectorStateCookie): - * src/WebDevToolsAgentImpl.h: - -2010-09-19 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r67749. - http://trac.webkit.org/changeset/67749 - https://bugs.webkit.org/show_bug.cgi?id=46068 - - breaking ToT chromium canary build (Requested by shans on - #webkit). - - * public/WebFrameClient.h: - * public/WebScriptController.h: - * src/FrameLoaderClientImpl.cpp: - * src/FrameLoaderClientImpl.h: - * src/WebScriptController.cpp: - (WebKit::WebScriptController::registerExtension): - -2010-09-19 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Add is<input type>() functions to WebInputElement - https://bugs.webkit.org/show_bug.cgi?id=46035 - - We're going to stop exposing HTMLInputElemnt::InputType. So, add - isFoo() functions in order to remove WebInputElement::InputType. - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::isTextField): - (WebKit::WebInputElement::isText): - (WebKit::WebInputElement::isPasswordField): - (WebKit::WebInputElement::isImageButton): - -2010-09-17 Darin Adler <darin@apple.com> - - Reviewed by Sam Weinig. - - REGRESSION (r60104): Zoom level is unexpectedly reset on page reload - https://bugs.webkit.org/show_bug.cgi?id=42863 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - Call functions on Frame instead of FrameView. - -2010-09-17 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Roll forward Chromium DEPS to pick up Mesa DRT changes - https://bugs.webkit.org/show_bug.cgi?id=46006 - - * DEPS: - -2010-09-17 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - [chromium] Add mesa as DumpRenderTree dependency - https://bugs.webkit.org/show_bug.cgi?id=46001 - - * WebKit.gyp: - -2010-09-13 Matt Perry <mpcomplete@chromium.org> - - Reviewed by Darin Fisher. - - Have V8DOMWindowShell ask the embedder whether to run a V8 extension - in a particular script context. - https://bugs.webkit.org/show_bug.cgi?id=45721 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowScriptExtension): - * public/WebScriptController.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::allowScriptExtension): - * src/FrameLoaderClientImpl.h: - * src/WebScriptController.cpp: - (WebKit::WebScriptController::registerExtension): - -2010-09-17 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - Remove unimplemented destructor declaration to fix Chromium build. - https://bugs.webkit.org/show_bug.cgi?id=45987 - - * src/AsyncFileWriterChromium.h: - -2010-09-16 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r67693. - http://trac.webkit.org/changeset/67693 - https://bugs.webkit.org/show_bug.cgi?id=45946 - - "Need to pick up a chromium change first" (Requested by dumi - on #webkit). - - * public/WebHTTPBody.h: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendFileRange): - -2010-09-15 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Remove WebHTTPBody::appendFileRange(..., const WebFileInfo&). - - * public/WebHTTPBody.h: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - -2010-09-16 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Add entry points to GraphicsContext3D needed for Chromium compositor port - https://bugs.webkit.org/show_bug.cgi?id=45939 - - Added entry points for two Chromium-specific extensions, and added - a flag to the GraphicsContext3D constructor, currently unsupported - by all ports (including Chromium), indicating whether the context - should render directly to the passed HostWindow or off-screen per - the current semantics. The switch to use GraphicsContext3D in - Chromium's compositor will follow in a subsequent patch. - - No new tests; functionality is unchanged. Built and tested - Chromium and WebKit on Mac OS X. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::create): - * src/GraphicsContext3DInternal.h: - -2010-09-16 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Add needed entry points to WebGraphicsContext3D for compositor - https://bugs.webkit.org/show_bug.cgi?id=45921 - - * public/WebGraphicsContext3D.h: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::supportsMapSubCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::mapBufferSubDataCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::unmapBufferSubDataCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::mapTexSubImage2DCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::unmapTexSubImage2DCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::supportsCopyTextureToParentTextureCHROMIUM): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTextureToParentTextureCHROMIUM): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-09-15 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [Chromium] Needs DRT queueLoadHTMLString and setDeferMainResourceLoad-implementations - https://bugs.webkit.org/show_bug.cgi?id=42151 - - * public/WebDataSource.h: - * src/WebDataSourceImpl.cpp: - (WebKit::WebDataSourceImpl::applicationCacheHost): - (WebKit::WebDataSourceImpl::setDeferMainResourceDataLoad): Added so DRT can set this flag before a load. - * src/WebDataSourceImpl.h: - -2010-09-16 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Roll forward Chromium DEPS to r59706 - https://bugs.webkit.org/show_bug.cgi?id=45916 - - * DEPS: - -2010-09-16 Darin Adler <darin@apple.com> - - Reviewed by Andreas Kling. - - Reduce use of HTMLInputElement::inputType so we can remove it later - https://bugs.webkit.org/show_bug.cgi?id=45903 - - * src/DOMUtilitiesPrivate.cpp: - (WebKit::elementHasLegalLinkAttribute): Use isImageButton. - * src/WebPasswordFormUtils.cpp: - (WebKit::findPasswordFormFields): Use isPasswordField. - * src/WebSearchableFormData.cpp: - (WebCore::IsInDefaultState): Use isCheckbox and isRadioButton. - (WebCore::HasSuitableTextElement): Use isFileUpload and isPasswordField. - -2010-09-16 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Expose separate GraphicsContext3DInternal.h - https://bugs.webkit.org/show_bug.cgi?id=45914 - - * WebKit.gyp: - * src/GraphicsContext3D.cpp: - * src/GraphicsContext3DInternal.h: Added. - -2010-09-16 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - [chromium] Add WebGraphicsContext3D accessor to WebView - https://bugs.webkit.org/show_bug.cgi?id=45913 - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::graphicsContext3D): - * src/WebViewImpl.h: - -2010-09-16 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: move resourceTracking flag under control of BackendSettings. - - Four Inspector API methods about resourceTracking flag were removed. - Actual state of the flag is transfered as the response of setResourceTracking request. - Initial state of the flag on the frontend side is obtained from settings.backend. - - https://bugs.webkit.org/show_bug.cgi?id=45887 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setRuntimeProperty): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - -2010-09-16 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: [REGRESSION] Scripts disappear from scripts panel after navigation - https://bugs.webkit.org/show_bug.cgi?id=45890 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setRuntimeProperty): make sure debugger and profiler - are initialized when inspected page navigation leads to renderer process change. - -2010-09-16 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Jian Li. - - Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM. - https://bugs.webkit.org/show_bug.cgi?id=45798 - - * src/AsyncFileWriterChromium.h: - * src/AsyncFileWriterChromium.cpp: - -2010-09-16 Nat Duca <nduca@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Make compositor obey finish flag - https://bugs.webkit.org/show_bug.cgi?id=45552 - - The compositor should obey the finish flag on doComposite. This - flag causes the compositor to finish rendering before returning, - which is needed when resizing the window to avoid flashes of green. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::composite): - -2010-09-15 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Allow the embedder to specify the base path for IndexedDB. - https://bugs.webkit.org/show_bug.cgi?id=45815 - - Need to add the extra .open() parameter to make this all work. - - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::open): - * src/IDBFactoryBackendProxy.cpp: - (WebCore::IDBFactoryBackendProxy::open): - * src/IDBFactoryBackendProxy.h: - * src/WebIDBFactoryImpl.cpp: - (WebKit::WebIDBFactoryImpl::open): - * src/WebIDBFactoryImpl.h: - -2010-09-16 Jeremy Orlow <jorlow@chromium.org> - - Speculative build fix. - - * src/IDBIndexBackendProxy.cpp: - -2010-09-08 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Complete index support for IndexedDB - https://bugs.webkit.org/show_bug.cgi?id=45386 - - * public/WebIDBCursor.h: - (WebKit::WebIDBCursor::direction): - (WebKit::WebIDBCursor::key): - (WebKit::WebIDBCursor::value): - (WebKit::WebIDBCursor::update): - (WebKit::WebIDBCursor::continueFunction): - (WebKit::WebIDBCursor::remove): - * public/WebIDBIndex.h: - (WebKit::WebIDBIndex::storeName): - (WebKit::WebIDBIndex::openObjectCursor): - (WebKit::WebIDBIndex::openCursor): - (WebKit::WebIDBIndex::getObject): - (WebKit::WebIDBIndex::get): - * public/WebIDBKey.h: - * src/IDBCursorBackendProxy.cpp: - (WebCore::IDBCursorBackendProxy::value): - * src/IDBCursorBackendProxy.h: - * src/IDBIndexBackendProxy.cpp: - (WebCore::IDBIndexBackendProxy::storeName): - (WebCore::IDBIndexBackendProxy::openObjectCursor): - (WebCore::IDBIndexBackendProxy::openCursor): - (WebCore::IDBIndexBackendProxy::getObject): - (WebCore::IDBIndexBackendProxy::get): - * src/IDBIndexBackendProxy.h: - * src/WebIDBCursorImpl.cpp: - (WebKit::WebIDBCursorImpl::value): - * src/WebIDBCursorImpl.h: - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::storeName): - (WebKit::WebIDBIndexImpl::openCursor): - (WebKit::WebIDBIndexImpl::openObjectCursor): - (WebKit::WebIDBIndexImpl::getObject): - (WebKit::WebIDBIndexImpl::get): - * src/WebIDBIndexImpl.h: - -2010-09-15 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Overload WebHTTPBody::appendFileRange() to take a double modification time argument. - https://bugs.webkit.org/show_bug.cgi?id=45829 - - The plan is to change all callers of - WebHTTPBody::appendFileRange(..., const WebFileInfo&) to use the - new method, and then remove it. - - * public/WebHTTPBody.h: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendFileRange): - -2010-09-14 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Provide network-based load timing. - Before this change, inspector used timers taken from - within WebCore notifications (that are by definition - synchronous and serialized). As a result, timing was - affected by the routines running on the main thread - (JavaScript and such). - https://bugs.webkit.org/show_bug.cgi?id=45664 - - * public/WebURLLoadTiming.h: - * public/WebURLLoaderClient.h: - (WebKit::WebURLLoaderClient::didFinishLoading): - * src/ResourceHandle.cpp: - (WebCore::ResourceHandleInternal::didFinishLoading): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::didFinishLoading): - * src/WebURLLoadTiming.cpp: - (WebKit::WebURLLoadTiming::receiveHeadersStart): - (WebKit::WebURLLoadTiming::setReceiveHeadersStart): - -2010-09-15 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r67551. - http://trac.webkit.org/changeset/67551 - https://bugs.webkit.org/show_bug.cgi?id=45816 - - "Plugin tests fail" (Requested by yurys on #webkit). - - * public/WebURLLoaderClient.h: - (WebKit::WebURLLoaderClient::didFinishLoading): - * src/ResourceHandle.cpp: - (WebCore::ResourceHandleInternal::didFinishLoading): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::didFinishLoading): - -2010-09-14 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Provide network-based load timing. - Before this change, inspector used timers taken from - within WebCore notifications (that are by definition - synchronous and serialized). As a result, timing was - affected by the routines running on the main thread - (JavaScript and such). - https://bugs.webkit.org/show_bug.cgi?id=45664 - - * public/WebURLLoadTiming.h: - * public/WebURLLoaderClient.h: - (WebKit::WebURLLoaderClient::didFinishLoading): - * src/ResourceHandle.cpp: - (WebCore::ResourceHandleInternal::didFinishLoading): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::didFinishLoading): - * src/WebURLLoadTiming.cpp: - (WebKit::WebURLLoadTiming::receiveHeadersStart): - (WebKit::WebURLLoadTiming::setReceiveHeadersStart): - -2010-09-14 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r67503. - http://trac.webkit.org/changeset/67503 - https://bugs.webkit.org/show_bug.cgi?id=45802 - - This patch broke GTK builds (Requested by jianli_ on #webkit). - - * src/ResourceHandle.cpp: - -2010-09-14 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Links from "Profiles" don't lead to "Scripts" - https://bugs.webkit.org/show_bug.cgi?id=45756 - - * src/js/DevTools.js: remove obsolete code - -2010-09-14 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] fix http/tests/security/local-user-CSS-from-remote.html - https://bugs.webkit.org/show_bug.cgi?id=45788 - - * DEPS: Include webkit_support::LocalFileToDataURL - -2010-09-14 Tony Chang <tony@chromium.org> - - Reviewed by Ojan Vafai. - - [chromium] Remove WebKit::areLayoutTestImagesOpaque since it's no longer needed - https://bugs.webkit.org/show_bug.cgi?id=45768 - - * public/WebKit.h: - * src/WebKit.cpp: - -2010-09-14 Mihai Parparita <mihaip@chromium.org> - - Reviewed by Tony Chang. - - blob: URL scheme does not work with Chromium DRT - https://bugs.webkit.org/show_bug.cgi?id=45772 - - Roll Chromium forward to r59406, which registers the blob - URL scheme for the Chromium DRT too. - - * DEPS: - -2010-09-14 Jian Li <jianli@chromium.org> - - Reviewed by David Levin. - - fast/files/apply-blob-url-to-img.html timeout on Leopard - https://bugs.webkit.org/show_bug.cgi?id=45576 - - * src/ResourceHandle.cpp: Remove the no longer applicable static comment. - -2010-09-14 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Send all accessibility notifications to Chromium. - https://bugs.webkit.org/show_bug.cgi?id=45156 - - Use postAccessibilityNotification to pass accessibility notifications - to chromium. - - * WebKit.gyp: - * public/WebAccessibilityNotification.h: Added. - * public/WebViewClient.h: - (WebKit::WebViewClient::postAccessibilityNotification): - * src/AssertMatchingEnums.h: Added. - * src/ChromeClientImpl.cpp: - (WebKit::toWebAccessibilityNotification): - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren): - (WebKit::ChromeClientImpl::postAccessibilityNotification): - * src/ChromeClientImpl.h: - -2010-09-14 Tony Chang <tony@chromium.org> - - Unreviewed, fix chromium win compile. - - * public/WebView.h: - -2010-09-14 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] implement layoutTestController.setDomainRelaxationForbiddenForURLScheme - https://bugs.webkit.org/show_bug.cgi?id=45762 - - * public/WebView.h: add WebView::setDomainRelaxationForbidden - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setDomainRelaxationForbidden): - * src/WebViewImpl.h: - -2010-09-14 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Andreas Kling. - - Move DebuggerScript.js from WebKit/chromium/src/js to WebCore/bindings/v8 - https://bugs.webkit.org/show_bug.cgi?id=45739 - - * WebKit.grd: - * WebKit.gypi: - * src/js/DebuggerScript.js: Removed. - * src/js/DevToolsHostStub.js: Removed. - -2010-09-14 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - Make WebDeviceOrientationClientMock constructor private. - https://bugs.webkit.org/show_bug.cgi?id=45743 - - Clients should use the create member function instead. DumpRenderTree - and the Chromium test_shell have previously been updated to call create. - - * public/WebDeviceOrientationClientMock.h: - (WebKit::WebDeviceOrientationClientMock::WebDeviceOrientationClientMock): - -2010-09-13 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Darin Fisher. - - Add Chromium API for FileWriter - https://bugs.webkit.org/show_bug.cgi?id=44360 - - Build file changes. - * WebKit.gyp: - - Added a way to get a WebFileWriter. - * public/WebFileSystem.h: - (WebKit::WebFileSystem::createFileWriter): - - WebFileWriter writes and truncates files. - * public/WebFileWriter.h: Added. - - WebFileWriterClient reports success/failure and progress events. - * public/WebFileWriterClient.h: Added. - - AsyncFileWriterChromium is a connector that links FileWriter and WebFileWriter, FileWriterClient and WebFileWriterClient. - * src/AsyncFileWriterChromium.cpp: Added. - * src/AsyncFileWriterChromium.h: Added. - -2010-09-13 W. James MacLean <wjmaclean@google.com> - - Reviewed by Darin Fisher. - - [chromium] Thumbnails not generated for GPU Rendered Pages - https://bugs.webkit.org/show_bug.cgi?id=44127 - - Modified WebViewImpl::paint() to detect non-null canvas pointers when - accelerated compositing is active, and instead fills the pixel buffer - from the GPU framebuffer. Includes re-scaling support when provided - canvas does not match size of current render layer. Limits pixel - readback to rect passed to paint(), clipped by size of rootLayerTexture. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::doPixelReadbackToCanvas): - (WebKit::WebViewImpl::paint): - * src/WebViewImpl.h: - -2010-09-13 James Robinson <jamesr@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Return NULL from getSharedGraphicsContext3D if we couldn't initialize - https://bugs.webkit.org/show_bug.cgi?id=45731 - - If we can't create a GraphicsContext3D, return NULL from getSharedGraphicsContext3D rather - than an object with NULL internal pointers. Callers know how to handle a null return value - but not one that has inconsistent internal state. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::getSharedGraphicsContext3D): - -2010-09-13 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - WebAccessibilityCacheImpl needs to handle invalid accessibility object ids. - https://bugs.webkit.org/show_bug.cgi?id=45572 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityCacheImpl.cpp: - (WebKit::WebAccessibilityCacheImpl::addOrGetId): - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::isAxObjectIdValid): - -2010-09-13 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] fix broken dependency in ImageDiff - https://bugs.webkit.org/show_bug.cgi?id=45684 - - * WebKit.gyp: - -2010-09-13 Enrica Casucci <enrica@apple.com> - - Reviewed by Sam Weinig. - - Paste should be implemented in WebCore like Copy and Cut for Mac also. - https://bugs.webkit.org/show_bug.cgi?id=45494 - <rdar://problem/7660537> - - On the Mac platform, the implementation of the paste operation is all done - at the WebKit level. In order to support it on WebKit2 it is necessary to - refactor the code and move this functionality at the level of WebCore like - we already have on Windows. - The original code relies on some in AppKit functions that call back into - WebKit causing problems in WebKit2. All this functionality has been moved - at the level of the editor client where it can be dealt with appropriately. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::canShowMIMETypeAsHTML): Added stub. - * src/FrameLoaderClientImpl.h: - -2010-09-13 Jonathan Dixon <joth@chromium.org> - - Reviewed by Steve Block. - - [chromium] Port test shell geolocation fixes to DRT - https://bugs.webkit.org/show_bug.cgi?id=45313 - - Ports over fixes from test shell: - - http://codereview.chromium.org/3294007 - - http://codereview.chromium.org/333800 - - Resets state between service instances, which fixes delayed-permission-allowed-for-multiple-requests.html - - Also re-apply rolled out patch http://trac.webkit.org/changeset/66886 :- - Access to out-of-scope WebGeolocationServiceBridgeImpl - https://bugs.webkit.org/show_bug.cgi?id=45112 - - Keep the WebGeolocationService pointer for lifetime of the bridge, to - ensure it can be detached reliably - - Includes follow-up review comment to rename onWebGeolocationServiceDestroyed to didDestroyGeolocationService - - * public/WebGeolocationService.h: - (WebKit::WebGeolocationService::~WebGeolocationService): - * public/WebGeolocationServiceBridge.h: - (WebKit::WebGeolocationServiceBridge::onWebGeolocationServiceDestroyed): - * public/WebGeolocationServiceMock.h: - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::startUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::suspend): - (WebKit::WebGeolocationServiceBridgeImpl::resume): - (WebKit::WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded): - (WebKit::WebGeolocationServiceBridgeImpl::setIsAllowed): - (WebKit::WebGeolocationServiceBridgeImpl::setLastPosition): - (WebKit::WebGeolocationServiceBridgeImpl::setLastError): - (WebKit::WebGeolocationServiceBridgeImpl::didDestroyGeolocationService): - (WebKit::WebGeolocationServiceBridgeImpl::isAttached): - * src/WebGeolocationServiceMock.cpp: - (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission): - (WebKit::WebGeolocationServiceMockImpl::WebGeolocationServiceMockImpl): - (WebKit::WebGeolocationServiceMockImpl::~WebGeolocationServiceMockImpl): - (WebKit::WebGeolocationServiceMockImpl::setMockGeolocationPermission): - (WebKit::WebGeolocationServiceMockImpl::requestPermissionForFrame): - (WebKit::WebGeolocationServiceMockImpl::notifyPendingPermissions): - -2010-09-13 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: upstream testExpandScope debugger test - https://bugs.webkit.org/show_bug.cgi?id=45260 - - * src/js/DebuggerScript.js: copy scope variables into a new object, but for global scope object, - with statement parameter and catch block exception variable pass the object itself to the injected - script. - * src/js/Tests.js: moved testExpandScope to LayoutTests - -2010-09-13 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - Add WebDeviceOrientationClientMock::create() and use it from DRT. - https://bugs.webkit.org/show_bug.cgi?id=45650 - - Since the virtual member functions of WebDeviceOrientationClientMock - are not exported from the DLL, construction of the object must be done inside - the DLL, or else the linker will complain (because the vtable cannot - be set up). Clients should use the create() member function, and the constructor - will be made private in a subsequent patch. - - * public/WebDeviceOrientationClientMock.h: - (WebKit::WebDeviceOrientationClientMock::WebDeviceOrientationClientMock): - * src/WebDeviceOrientationClientMock.cpp: - (WebKit::WebDeviceOrientationClientMock::create): - -2010-09-12 Kent Tamura <tkent@chromium.org> - - Reviewed by Tony Chang. - - [DRT/Chromium] Remove dependency to base/string16.h and gfx/codec/png_codec.h - https://bugs.webkit.org/show_bug.cgi?id=45517 - - * DEPS: Roll Chromium revision to r59033 to have webkit_support_gfx.h. - * WebKit.gyp: - -2010-09-10 MORITA Hajime <morrita@google.com> - - Reviewed by Tony Chang. - - [Chromium] Implement textInputController.hasSpellingMarker() for Chromium - https://bugs.webkit.org/show_bug.cgi?id=45441 - - Exported Frame::selectionStartHasSpellingMarkerFor() for DRT use. - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectionStartHasSpellingMarkerFor): - * src/WebFrameImpl.h: - -2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> - - Reviewed by Darin Adler. - - Add NetworkingContext to avoid layer violations - https://bugs.webkit.org/show_bug.cgi?id=42292 - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::create): - (WebCore::ResourceHandle::start): - (WebCore::ResourceHandle::loadResourceSynchronously): - -2010-09-10 Sam Weinig <sam@webkit.org> - - Fix chromium build. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-09-10 Ryosuke Niwa <rniwa@webkit.org> - - Unreviewed, speculative chromium build fix. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-09-10 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom. - Precursor to <rdar://problem/7660657> - https://bugs.webkit.org/show_bug.cgi?id=45522 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::setZoomLevel): - * src/WebViewImpl.h: - (WebKit::WebViewImpl::zoomTextOnly): - Move tracking of text only zoom here from WebCore. - -2010-09-10 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Fisher. - - Move code from WebKit-layer to DocumentLoader - https://bugs.webkit.org/show_bug.cgi?id=45569 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::committedLoad): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::commitDocumentData): - -2010-09-10 Tony Chang <tony@chromium.org> - - Unreviewed, fix chromium compile after r67238. - - shouldChangeSelection was removed from Frame. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectWordAroundPosition): - -2010-09-10 Nat Duca <nduca@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Accelerated Compositing: screen garbage when scrolling - https://bugs.webkit.org/show_bug.cgi?id=45092 - - Introduce a new API on WebWidget for painting with accelerated - compositing that allows the compositor to properly distingiush - scrolling, invalidation and repainting from one another. The key - change is that in accelerated rendering case, invalidates and - scrolling pass directly to the compositor, rather than passing up - to the client as was the case in the software path. For - accelerated rendering, the previous paint() method is replaced by - composite(). - - * public/WebWidget.h: - * public/WebWidgetClient.h: - (WebKit::WebWidgetClient::scheduleComposite): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::invalidateContentsAndWindow): - (WebKit::ChromeClientImpl::scroll): - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::themeChanged): - (WebKit::WebPopupMenuImpl::composite): - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::themeChanged): - (WebKit::WebViewImpl::composite): - (WebKit::WebViewImpl::setRootGraphicsLayer): - (WebKit::WebViewImpl::setRootLayerNeedsDisplay): - (WebKit::WebViewImpl::scrollRootLayerRect): - (WebKit::WebViewImpl::invalidateRootLayerRect): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::updateRootLayerContents): - (WebKit::WebViewImpl::doComposite): - * src/WebViewImpl.h: - * tests/PopupMenuTest.cpp: - (WebKit::TestWebWidget::themeChanged): - (WebKit::TestWebWidget::composite): - -2010-09-10 David Holloway <dhollowa@chromium.org> - - Reviewed by Adam Barth. - - Change WebKit::WebFormElement::wasUserSubmitted to use WebCore::HTMLFormElement::submittedByUserGesture - instead of WebCore::HTMLFormElement::submissionTrigger. - Chromium AutoFill feature semantics changed with respect to what we mean by "user submitted" form. A - more accurate measure of the user manually submitting a form is via user gesture. - https://bugs.webkit.org/show_bug.cgi?id=45128 - - * src/WebFormElement.cpp: - (WebKit::WebFormElement::wasUserSubmitted): - -2010-09-09 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Move functions from Frame to SelectionController as planned - https://bugs.webkit.org/show_bug.cgi?id=45508 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectionBoundsRect): - Call functions on selection(). - -2010-09-10 Adam Barth <abarth@webkit.org> - - Chromium build fix (one hopes!) - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::commitDocumentData): - -2010-09-10 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Main resource bytes shouldn't bounce through FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=45496 - - Now return the bytes to the DocumentLoader. - - Also, removed comment about wrong code in the Mac port. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::commitDocumentData): - -2010-09-08 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Move functions from Frame to Editor as planned - https://bugs.webkit.org/show_bug.cgi?id=45218 - - * src/ContextMenuClientImpl.cpp: - (WebKit::selectMisspelledWord): - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::find): - (WebKit::WebFrameImpl::stopFinding): - (WebKit::WebFrameImpl::scopeStringMatches): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::caretOrSelectionBounds): - Changed call sites to use editor(). - -2010-09-09 Kenneth Russell <kbr@google.com> - - Reviewed by James Robinson. - - Memory leak in red/black tree - https://bugs.webkit.org/show_bug.cgi?id=45472 - - Fixed memory leak in red/black tree where it was using operator - new directly to allocate its internal nodes rather than the arena - with which it was configured. Added allocateObject variant to - arena supporting single-argument constructors. Added test to - red/black tree unit tests to cover this functionality, and - refactored TrackedAllocator into helper file to share between - arena and red/black tree tests. - - * WebKit.gyp: - * tests/ArenaTestHelpers.h: Added. - (WebCore::ArenaTestHelpers::TrackedAllocator::create): - (WebCore::ArenaTestHelpers::TrackedAllocator::allocate): - (WebCore::ArenaTestHelpers::TrackedAllocator::free): - (WebCore::ArenaTestHelpers::TrackedAllocator::isEmpty): - (WebCore::ArenaTestHelpers::TrackedAllocator::numRegions): - (WebCore::ArenaTestHelpers::TrackedAllocator::TrackedAllocator): - * tests/PODArenaTest.cpp: - * tests/PODRedBlackTreeTest.cpp: - (WebCore::TEST): - -2010-09-09 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] make linux checksums computed from pngs to match windows - https://bugs.webkit.org/show_bug.cgi?id=45465 - - * src/WebKit.cpp: - (WebKit::areLayoutTestImagesOpaque): Make linux match windows. - -2010-09-10 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Add the destructor to WebDOMEvent to prevent a leak. - https://bugs.webkit.org/show_bug.cgi?id=45287 - - * public/WebDOMEvent.h: - (WebKit::WebDOMEvent::~WebDOMEvent): - -2010-09-09 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Add methods used to determine accessibility state. - https://bugs.webkit.org/show_bug.cgi?id=45434 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::canSetSelectedAttribute): - (WebKit::WebAccessibilityObject::isCollapsed): - (WebKit::WebAccessibilityObject::isLinked): - (WebKit::WebAccessibilityObject::isReadOnly): - (WebKit::WebAccessibilityObject::isVisible): - -2010-09-08 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: add a sanity test for DOM storage view in the storage panel - https://bugs.webkit.org/show_bug.cgi?id=45294 - - * src/js/Tests.js: removed testStoragePanel which was superseded by inspector layout tests. - -2010-09-08 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: test that debugger won't pause on syntax errors - https://bugs.webkit.org/show_bug.cgi?id=45388 - - * src/js/Tests.js: removed testAutoContinueOnSyntaxError which is now covered by - inspector/debugger-autocontinue-on-syntax-error.html layout test - -2010-09-08 Peter Kasting <pkasting@google.com> - - Reviewed by David Hyatt. - - Add smooth scrolling framework, and a Windows implementation. - https://bugs.webkit.org/show_bug.cgi?id=32356 - - * src/WebScrollbarImpl.cpp: Plumb new ScrollbarClient functions. Allow wheel scrolls to be animated. - (WebKit::WebScrollbarImpl::setLocation): - (WebKit::WebScrollbarImpl::setValue): - (WebKit::WebScrollbarImpl::scroll): - (WebKit::WebScrollbarImpl::onMouseWheel): - (WebKit::WebScrollbarImpl::onKeyDown): - (WebKit::WebScrollbarImpl::setScrollOffsetFromAnimation): - * src/WebScrollbarImpl.h: Plumb new ScrollbarClient functions. - * src/win/WebInputEventFactory.cpp: Update comments now that we have smooth scrolling. - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2010-09-08 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: remove some obsolete interactive tests - https://bugs.webkit.org/show_bug.cgi?id=45371 - - * src/js/Tests.js: - -2010-09-08 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - Plug leak in WebDeviceOrientationClientMock - https://bugs.webkit.org/show_bug.cgi?id=45305 - - WebDeviceOrientationClientMock is responsible for destroying the - WebDeviceOrientationController object pointed to by the argument - passed to the setController() member function. - - Also use the new WebPrivateOnwPtr for m_clientMock. - - * public/WebDeviceOrientationClientMock.h: - * src/WebDeviceOrientationClientMock.cpp: - (WebKit::WebDeviceOrientationClientMock::setController): - (WebKit::WebDeviceOrientationClientMock::initialize): - (WebKit::WebDeviceOrientationClientMock::reset): - -2010-09-07 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Make a public flag for how DRT generates bitmaps on Linux - https://bugs.webkit.org/show_bug.cgi?id=45133 - - This is so it's possible for me to fix - http://code.google.com/p/chromium/issues/detail?id=21386 . - - * public/WebKit.h: Add areLayoutTestImagesOpaque() - * src/WebKit.cpp: - (WebKit::areLayoutTestImagesOpaque): - -2010-09-07 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, rolling out r66886. - http://trac.webkit.org/changeset/66886 - https://bugs.webkit.org/show_bug.cgi?id=45112 - - Made - - * public/WebGeolocationService.h: - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::startUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::suspend): - (WebKit::WebGeolocationServiceBridgeImpl::resume): - (WebKit::WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded): - (WebKit::WebGeolocationServiceBridgeImpl::setIsAllowed): - (WebKit::WebGeolocationServiceBridgeImpl::setLastPosition): - (WebKit::WebGeolocationServiceBridgeImpl::setLastError): - (WebKit::WebGeolocationServiceBridgeImpl::getWebViewClient): - (WebKit::WebGeolocationServiceBridgeImpl::onWebGeolocationServiceDestroyed): - * src/WebGeolocationServiceMock.cpp: - -2010-09-07 Jonathan Dixon <joth@chromium.org> - - Reviewed by Jeremy Orlow. - - Access to out-of-scope WebGeolocationServiceBridgeImpl - https://bugs.webkit.org/show_bug.cgi?id=45112 - - Keep the WebGeolocationService pointer for lifetime of the bridge, to - ensure it can be detached reliably - - * public/WebGeolocationServiceBridge.h: - (WebKit::WebGeolocationServiceBridge::~WebGeolocationServiceBridge): - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::startUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::suspend): - (WebKit::WebGeolocationServiceBridgeImpl::resume): - (WebKit::WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded): - -2010-09-07 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: upstream two debugger tests - https://bugs.webkit.org/show_bug.cgi?id=45262 - - * src/js/Tests.js: - -2010-09-06 Jonathan Dixon <joth@chromium.org> - - Reviewed by Jeremy Orlow. - - Add new interface and empty impl. as precursor to bug 45112 - https://bugs.webkit.org/show_bug.cgi?id=45257 - - * public/WebGeolocationServiceBridge.h: - (WebKit::WebGeolocationServiceBridge::~WebGeolocationServiceBridge): - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::onWebGeolocationServiceDestroyed): - -2010-09-06 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: fix chromium devtools tests - https://bugs.webkit.org/show_bug.cgi?id=45258 - - * src/js/Tests.js: - (.TestSuite.prototype._waitForScriptPause): - -2010-08-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Add index insertion support to IndexedDB. - https://bugs.webkit.org/show_bug.cgi?id=44695 - - Add asserts on the [] operator. - - * public/WebVector.h: - (WebKit::WebVector::operator[]): - -2010-09-06 Anton Muhin <antonm@chromium.org> - - Reviewed by Adam Barth. - - [v8] bypass caches when query memory usage from post GC and in crash handler. - https://bugs.webkit.org/show_bug.cgi?id=45036 - - Add Chromium-specific API to query actual memory usage which bypasses any caches. - - * public/WebKitClient.h: - (WebKit::WebKitClient::actualMemoryUsageMB): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::actualMemoryUsageMB): - -2010-09-05 Peter Kasting <pkasting@google.com> - - Reviewed by Adam Barth. - - Make Chromium/Mac generate continuous mousewheel events with the same wheelDelta values as Safari/Mac. - https://bugs.webkit.org/show_bug.cgi?id=45155 - - * src/mac/WebInputEventFactory.mm: - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2010-09-05 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: remove WebDevToolsAgentClient::forceRepaint which is not used - https://bugs.webkit.org/show_bug.cgi?id=45179 - - * public/WebDevToolsAgentClient.h: - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::debuggerOutput): - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsAgentImpl.h: - -2010-09-05 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Add unit tests for interval tree - https://bugs.webkit.org/show_bug.cgi?id=45161 - - * WebKit.gyp: - * tests/PODIntervalTreeTest.cpp: Added. - (WebCore::valueToString): - (WebCore::TEST): - (WebCore::UserData1::valueToString): - (WebCore::EndpointType1::valueToString): - -2010-09-05 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Add unit tests for red-black tree and (POD) arena - https://bugs.webkit.org/show_bug.cgi?id=45060 - - * WebKit.gyp: - * tests/PODArenaTest.cpp: Added. - (WebCore::TestClass1::TestClass2::TestClass2): - (WebCore::TEST_F): - * tests/PODRedBlackTreeTest.cpp: Added. - (WebCore::TEST): - * tests/TreeTestHelpers.cpp: Added. - (WebCore::TreeTestHelpers::generateSeed): - (WebCore::TreeTestHelpers::initRandom): - (WebCore::TreeTestHelpers::nextRandom): - * tests/TreeTestHelpers.h: Added. - -2010-09-03 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> - - Reviewed by Darin Adler. - - Add NetworkingContext to avoid layer violations - https://bugs.webkit.org/show_bug.cgi?id=42292 - - Add Chromium's implementation of NetworkingContext. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createNetworkingContext): - * src/FrameLoaderClientImpl.h: - -2010-09-02 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Revert to software compositing if the accelerated - compositor fails to initialize. If we tried to initialize the compositor - for this WebView and failed, next time the associated chrome client is - asked whether it can do accelerated compositing it will return false. - https://bugs.webkit.org/show_bug.cgi?id=45124 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::allowsAcceleratedCompositing): - * src/ChromeClientImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::allowsAcceleratedCompositing): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::getOnscreenGLES2Context): - * src/WebViewImpl.h: - -2010-09-03 James Robinson <jamesr@chromium.org> - - [chromium] Add one more include to fix the mac compile. - - * src/GraphicsContext3D.cpp: - -2010-09-03 James Robinson <jamesr@chromium.org> - - [chromium] Compile fixes for 66746. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - -2010-09-03 Tony Chang <tony@chromium.org> - - Unreviewed, remove svn:executable flag from images and css files. - - * src/js/Images/segmentChromium.png: Removed property svn:executable. - * src/js/Images/segmentHoverChromium.png: Removed property svn:executable. - * src/js/Images/segmentHoverEndChromium.png: Removed property svn:executable. - * src/js/Images/segmentSelectedChromium.png: Removed property svn:executable. - * src/js/Images/segmentSelectedEndChromium.png: Removed property svn:executable. - * src/js/Images/statusbarBackgroundChromium.png: Removed property svn:executable. - * src/js/Images/statusbarBottomBackgroundChromium.png: Removed property svn:executable. - * src/js/Images/statusbarButtonsChromium.png: Removed property svn:executable. - * src/js/Images/statusbarMenuButtonChromium.png: Removed property svn:executable. - * src/js/Images/statusbarMenuButtonSelectedChromium.png: Removed property svn:executable. - * src/js/devTools.css: Removed property svn:executable. - -2010-09-03 James Robinson <jamesr@chromium.org> - - Reviewed by Chris Marrin. - - Multiple accelerated 2D canvases should be able to use the same GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=44926 - - Adds a SharedContext3D to WebViewImpl. The SharedContext3D has to live on WebViewImpl to be - tied to the lifetime of the compositor context. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::getSharedGraphicsContext3D): - * src/ChromeClientImpl.h: - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::platformLayer): - (WebCore::GraphicsContext3D::platformLayer): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::getSharedGraphicsContext3D): - * src/WebViewImpl.h: - -2010-08-31 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - IDBCursor.continue() should reuse the .openCursor's IDBRequest object - https://bugs.webkit.org/show_bug.cgi?id=44953 - - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onError): - (WebCore::WebIDBCallbacksImpl::onSuccess): - -2010-09-02 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector - https://bugs.webkit.org/show_bug.cgi?id=44230 - - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::disconnectFromBackend): - * src/InspectorFrontendClientImpl.h: - -2010-09-02 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove obsolete public/API methods in chromium port - https://bugs.webkit.org/show_bug.cgi?id=45108 - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - -2010-09-02 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Remove dependency to base/task.h and base/timer.h - https://bugs.webkit.org/show_bug.cgi?id=45091 - - * DEPS: Roll Chromium revision to 58277 in order to have - webkit_support::PostDelayedTask(). - -2010-09-02 Ilya Sherman <isherman@google.com> - - Reviewed by Eric Seidel. - - Exposing computing an element's inherited language, per the DOM, in the - Chromium API -- primarily for use with autofill i18n. - https://bugs.webkit.org/show_bug.cgi?id=44803 - - * public/WebElement.h: - * src/WebElement.cpp: - (WebKit::WebElement::computeInheritedLanguage): - -2010-09-01 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Remove dependency on JS files for V8 logs processing. - - https://bugs.webkit.org/show_bug.cgi?id=45045 - - * WebKit.gyp: - -2010-09-01 Kent Tamura <tkent@chromium.org> - - Unreviewed, rolling out r66576. - http://trac.webkit.org/changeset/66576 - https://bugs.webkit.org/show_bug.cgi?id=45016 - - This change is not needed. - - * public/WebKitClient.h: - -2010-08-31 Dave Hyatt <hyatt@apple.com> - - Reviewed by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that - the former can occur in more places without having to do the latter. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::layout): - -2010-08-31 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Add WebKitClient::callOnMainThreadWithDelay() - https://bugs.webkit.org/show_bug.cgi?id=45016 - - It is required to remove base/task.h and base/timer.h dependency - from DRT/Chromium. - - * public/WebKitClient.h: - (WebKit::WebKitClient::callOnMainThreadWithDelay): Added. - -2010-08-31 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - Add LocalFileSystem.requestFileSystem interface to DOMWindow - https://bugs.webkit.org/show_bug.cgi?id=44734 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableFileSystem): - (WebKit::WebRuntimeFeatures::isFileSystemEnabled): - -2010-08-24 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Implement the rest of IDBCursors + make them persistent - https://bugs.webkit.org/show_bug.cgi?id=44546 - - * src/IDBCursorBackendProxy.cpp: - (WebCore::IDBCursorBackendProxy::value): - * src/IDBCursorBackendProxy.h: - * src/WebIDBCursorImpl.cpp: - (WebKit::WebIDBCursorImpl::value): - -2010-08-27 John Gregg <johnnyg@google.com> - - Reviewed by David Levin. - - Notifications should support a click event - https://bugs.webkit.org/show_bug.cgi?id=44800 - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::dispatchClickEvent): - -2010-08-31 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - Switch the Blob implementation to using the blob data registration model - https://bugs.webkit.org/show_bug.cgi?id=44389 - - * src/WebSearchableFormData.cpp: - (WebCore::HasSuitableTextElement): - -2010-08-30 Nat Duca <nduca@chromium.org> - - Reviewed by Adam Barth. - - [chromium] Accelerated Compositing: Artifacts/blink when enabling compositor. - https://bugs.webkit.org/show_bug.cgi?id=44196 - - If accelerated compositing enables after a page loads, the dirtied - portion of the screen will be only a subset of the full screen, - leading to artefacts. Avoid these artefacts by invalidating the - visible content rect on compositor initialization. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - -2010-08-30 Kinuko Yasuda <kinuko@chromium.osrc> - - Reviewed by Darin Fisher. - - Add DOMFileSystem implementation to support Entry manipulation operations - https://bugs.webkit.org/show_bug.cgi?id=44732 - - Fixed virtual-path / platform-path conversion timing. (The conversion needs to be done before calling AsyncFileSystem methods to support cross-filesystem operations.) - - * src/AsyncFileSystemChromium.cpp: - (WebCore::AsyncFileSystemChromium::move): - (WebCore::AsyncFileSystemChromium::copy): - (WebCore::AsyncFileSystemChromium::remove): - (WebCore::AsyncFileSystemChromium::readMetadata): - (WebCore::AsyncFileSystemChromium::createFile): - (WebCore::AsyncFileSystemChromium::createDirectory): - (WebCore::AsyncFileSystemChromium::fileExists): - (WebCore::AsyncFileSystemChromium::directoryExists): - (WebCore::AsyncFileSystemChromium::readDirectory): - -2010-08-30 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r66198. - http://trac.webkit.org/changeset/66198 - https://bugs.webkit.org/show_bug.cgi?id=44856 - - It made tests crash on Qt bot (Requested by Ossy_ on #webkit). - - * src/InspectorFrontendClientImpl.cpp: - * src/InspectorFrontendClientImpl.h: - -2010-08-29 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Adler. - - Introduce isValidValue(const String&) of HTMLInputElement and HTMLTextAreaElement - https://bugs.webkit.org/show_bug.cgi?id=43537 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::isValidValue): - -2010-08-29 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Remove dependency to base/keyboard_codes.h - https://bugs.webkit.org/show_bug.cgi?id=44847 - - * DEPS: Roll Chromium revision to 57823 to have a webkit_support change. - -2010-08-28 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add webkit_support.gyp:blob to WebKit.gyp - https://bugs.webkit.org/show_bug.cgi?id=44829 - - Also bump up chromium revision in DEPS in order to pick up - the revision that contains blob change. - - * DEPS: - * WebKit.gyp: - -2010-08-28 Chris Guillory <chris.guillory@google.com> - - Reviewed by Chris Fleizach. - - Add AX notification for childrenChanged - https://bugs.webkit.org/show_bug.cgi?id=44472 - - * public/WebViewClient.h: - (WebKit::WebViewClient::didChangeAccessibilityObjectChildren): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren): - * src/ChromeClientImpl.h: - -2010-08-27 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Tony Chang. - - [chromium] Add new WebClipboard method for setting generic data in copy/cut handlers. - https://bugs.webkit.org/show_bug.cgi?id=42121 - - * public/WebClipboard.h: - (WebKit::WebClipboard::writeData): - (WebKit::WebClipboard::readFilenames): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::clipboardWriteData): - -2010-08-27 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Dumitru Daniliuc. - - [chromium] Add chromium-side of AsyncFileSystem implementation - https://bugs.webkit.org/show_bug.cgi?id=44434 - - * WebKit.gyp: - * src/AssertMatchingEnums.cpp: Added assertions. - * src/AsyncFileSystemChromium.cpp: Added. - * src/AsyncFileSystemChromium.h: Added. - * src/LocalFileSystemChromium.cpp: Added. - * src/WebFileSystemCallbacksImpl.cpp: - (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): - * src/WebFileSystemCallbacksImpl.h: - -2010-08-27 Michael Nordman <michaeln@google.com> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=44133 - WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob. - - * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB. - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableXHRResponseBlob): - (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled): - -2010-08-25 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Add setVersion to IndexedDB - https://bugs.webkit.org/show_bug.cgi?id=44630 - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::createObjectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - (WebKit::WebIDBDatabase::setVersion): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::setVersion): - * src/IDBDatabaseProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::setVersion): - * src/WebIDBDatabaseImpl.h: - -2010-08-27 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector - https://bugs.webkit.org/show_bug.cgi?id=44230 - - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::disconnectFromBackend): - * src/InspectorFrontendClientImpl.h: - -2010-08-27 Kent Tamura <tkent@chromium.org> - - Reviewed by Pavel Feldman. - - [DRT/Chromium] Fix inspector test failures - https://bugs.webkit.org/show_bug.cgi?id=44748 - - * DEPS: Update Chromium revision to 57605 to have a webkit_support change. - -2010-08-26 Dumitru Daniliuc <dumi@chromium.org> - - Unreviewed, Chromium build fix. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::markerTextForListItem): - -2010-08-26 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Add support for markerTextForListItem() to Chromium's LayoutTestController. - https://bugs.webkit.org/show_bug.cgi?id=44724 - - * public/WebBindings.h: - * public/WebFrame.h: - * src/WebBindings.cpp: - (WebKit::getElementImpl): - (WebKit::WebBindings::getElement): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::markerTextForListItem): - * src/WebFrameImpl.h: - -2010-08-26 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Remove the USE(GLES2_RENDERING) define and associated code - https://bugs.webkit.org/show_bug.cgi?id=43761 - - Removes API support to grab a GLES2Context from within WebCore. The compositor - has a special codepath to grab its GLES2Context and no other codepaths - need access to a raw context. Accelerated drawing elsewhere will go through - GraphicsContext3D. - - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - -2010-08-26 Ryosuke Niwa <rniwa@webkit.org> - - Reviewed by Eric Seidel. - - [chromium] WebEntities is broken - https://bugs.webkit.org/show_bug.cgi?id=44708 - - For serialization purposes, we don't need to convert all entity references. - This patch modifies WebEntities::WebEntities to use hard-coded entity lists for both HTML and XML, - and deletes populateMapFromXMLEntities and populateMapFromHTMLEntityTable. - - No tests are added since the code is tested in DomSerializerTests - - * src/WebEntities.cpp: - (WebKit::): - (WebKit::WebEntities::WebEntities): - -2010-08-26 Peter Kasting <pkasting@google.com> - - Reviewed by Dimitri Glazkov. - - Misc. cleanup split off from bug 32356. - https://bugs.webkit.org/show_bug.cgi?id=44696 - - * src/WebScrollbarImpl.cpp: - (WebKit::WebScrollbarImpl::setLocation): - (WebKit::WebScrollbarImpl::onMouseWheel): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::propagateScroll): - * src/win/WebInputEventFactory.cpp: - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2010-08-26 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Store heap snapshots in InspectorProfilerAgent. - - Change the way heap snapshots are transported to Inspector - to be aligned with CPU profiles. As a result, the Heap snapshots - view of Profiles panel was upstreamed into WebCore. - - https://bugs.webkit.org/show_bug.cgi?id=44531 - - * DEPS: - * WebKit.gypi: - * src/js/DevTools.js: - (): - * src/js/HeapProfilerPanel.js: Removed. - * src/js/ProfilerAgent.js: Removed. - * src/js/ProfilerProcessor.js: Removed. - * src/js/devTools.css: - -2010-08-26 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Revert r66103 since Qt tests are failing. - - * src/InspectorFrontendClientImpl.cpp: - * src/InspectorFrontendClientImpl.h: - -2010-08-26 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector - https://bugs.webkit.org/show_bug.cgi?id=44230 - - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::disconnectFromBackend): - * src/InspectorFrontendClientImpl.h: - -2010-08-26 Kent Tamura <tkent@chromium.org> - - Reviewed by Tony Chang. - - [DRT/Chromium] Enable DEVICE_ORIENTATION - https://bugs.webkit.org/show_bug.cgi?id=44587 - - * features.gypi: - -2010-08-25 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - WebInspector: as far as we have 'seq' property in the each inspector message - it would be better to remove explicit callId argument from Inspector.idl functions - declarations. - https://bugs.webkit.org/show_bug.cgi?id=44617 - - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent.prototype._getNextLogLines.else.delayedRequest): - (devtools.ProfilerAgent.prototype._getNextLogLines): - -2010-08-25 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r66074. - http://trac.webkit.org/changeset/66074 - https://bugs.webkit.org/show_bug.cgi?id=44660 - - Chromium canary turned red (Requested by yuzo on #webkit). - - * features.gypi: - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - -2010-08-25 Michael Nordman <michaeln@google.com> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=44133 - WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob. - - * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB. - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableXHRResponseBlob): - (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled): - -2010-08-24 Victoria Kirst <vrk@google.com> - - Reviewed by Darin Fisher. - - Adding a way to communicate video frames between Chromium and WebKit. - The WebKit side acts as a middleman between Chromium and WebCore. - The VideoFrameChromiumImpl is not being used by WebCore yet, as there - still needs to be an implementation of WebVideoFrame in Chromium - -- coming soon in a subsequent patch. - - API changes for Video Frame sharing between WebKit and Chromium - https://bugs.webkit.org/show_bug.cgi?id=44539 - - * WebKit.gyp: - * public/WebMediaPlayer.h: - (WebKit::WebMediaPlayer::getCurrentFrame): - (WebKit::WebMediaPlayer::putCurrentFrame): - * public/WebVideoFrame.h: Added. - * src/VideoFrameChromiumImpl.cpp: Added. - (WebKit::VideoFrameChromiumImpl::toWebVideoFrame): - (WebKit::VideoFrameChromiumImpl::VideoFrameChromiumImpl): - (WebKit::VideoFrameChromiumImpl::type): - (WebKit::VideoFrameChromiumImpl::format): - (WebKit::VideoFrameChromiumImpl::width): - (WebKit::VideoFrameChromiumImpl::height): - (WebKit::VideoFrameChromiumImpl::planes): - (WebKit::VideoFrameChromiumImpl::stride): - (WebKit::VideoFrameChromiumImpl::data): - * src/VideoFrameChromiumImpl.h: Added. - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::getCurrentFrame): - (WebKit::WebMediaPlayerClientImpl::putCurrentFrame): - (WebKit::WebMediaPlayerClientImpl::create): - * src/WebMediaPlayerClientImpl.h: - -2010-08-25 Eric Seidel <eric@webkit.org> - - Unreviewed. Build fix. - - Make Chromiums Broken WebPageSerializerImpl compile again - https://bugs.webkit.org/show_bug.cgi?id=44652 - - Make it compile again. This code is still horribly wrong. - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::endTagToString): - -2010-08-20 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - WebGL must enforce restrictions even if running on OpenGL ES 2.0 - https://bugs.webkit.org/show_bug.cgi?id=42908 - - * public/WebGraphicsContext3D.h: Add two new flags. - * src/GraphicsContext3D.cpp: Ditto. - (WebCore::GraphicsContext3DInternal::isGLES2NPOTStrict): - (WebCore::GraphicsContext3DInternal::isErrorGeneratedOnOutOfBoundsAccesses): - (WebCore::GraphicsContext3D::isGLES2NPOTStrict): - (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses): - * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto. - (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2NPOTStrict): - (WebKit::WebGraphicsContext3DDefaultImpl::isErrorGeneratedOnOutOfBoundsAccesses): - * src/WebGraphicsContext3DDefaultImpl.h: Ditto. - -2010-08-24 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia) - https://bugs.webkit.org/show_bug.cgi?id=38282 - - * src/WebImageDecoder.cpp: - (WebKit::WebImageDecoder::init): Add premultiplyAlpha flag. - -2010-08-25 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Pass the element's bounds to embedder during speech recognition. - https://bugs.webkit.org/show_bug.cgi?id=44427 - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - (WebKit::WebSpeechInputController::cancelRecognition): - (WebKit::WebSpeechInputController::stopRecording): - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::startRecognition): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - * src/WebSpeechInputControllerMockImpl.h: - -2010-08-25 Pawel Hajdan <phajdan.jr@chromium.org> - - Reviewed by Darin Fisher. - - Add an assertion to prevent re-initializing WebKit. - https://bugs.webkit.org/show_bug.cgi?id=44545 - - This will help prevent crashes like: - - http://code.google.com/p/chromium/issues/detail?id=52731 - - http://code.google.com/p/chromium/issues/detail?id=52643 - - * src/WebKit.cpp: - (WebKit::initialize): - -2010-08-25 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Dimitri Glazkov. - - Adding missing test files and reenabling the WebFrame unit-test. - https://bugs.webkit.org/show_bug.cgi?id=44492 - - * tests/WebFrameTest.cpp: - (WebKit::TEST_F): - * tests/data/iframes_test.html: Added. - * tests/data/invisible_iframe.html: Added. - * tests/data/visible_iframe.html: Added. - * tests/data/zero_sized_iframe.html: Added. - -2010-08-25 Kent Tamura <tkent@chromium.org> - - Unreviewed, build fix. - - * DEPS: Roll Chromium revision to 57298 to fix upstream build. - -2010-08-24 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Adam Barth. - - Build fix: Remove setHTML5ParserEnabled(), it's no longer used. - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - * src/WebSettingsImpl.h: - -2010-08-24 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] WebBlobRegistry cleanup. - https://bugs.webkit.org/show_bug.cgi?id=44571 - - Remove unneeded method from WebBlobRegistry interface. - Also remove unneeded WebBlobRegistryImpl.* files. They're already - excluded from gyp files. - - * public/WebBlobRegistry.h: - * src/WebBlobRegistryImpl.cpp: Removed. - * src/WebBlobRegistryImpl.h: Removed. - -2010-08-24 Adam Barth <abarth@webkit.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Hulu popups are blocked - https://bugs.webkit.org/show_bug.cgi?id=44572 - - We were blocking popups created by Flash Player because we were never - setting the UserGestureIndicator for events. Most WebKit ports handle - events through EventHandler, but Chromium is special (for some unknown - reason) and dispatches events directly. That means Chromium misses out - on some of the work done by EventHandler, including setting the - UserGestureIndicator. - - I suspect this is covered by an existing LayoutTest, but I don't have - the ability to run the Chromium LayoutTests on this machine. :( - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleInputEvent): - -2010-08-24 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Update WebBlobData. - https://bugs.webkit.org/show_bug.cgi?id=44481 - - Some changes to WebBlobData to match with chromium implementation. - 1) Change to use WebCString for data, instead of WebData. - 2) Separate path from URL. - - * public/WebBlobData.h: - * src/WebBlobData.cpp: - (WebKit::WebBlobData::itemAt): - (WebKit::WebBlobData::appendData): - (WebKit::WebBlobData::appendBlob): - * src/WebBlobStorageData.cpp: - (WebKit::WebBlobStorageData::itemAt): - -2010-08-24 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Hooks IDBKeyPath with IDBObjectStorage::put. - https://bugs.webkit.org/show_bug.cgi?id=44275 - - Adds a mechanism to extract an IDBKey from SerializedScriptValue using IDBKeyPath - during IDBObjectStorage::put. - - * public/WebIDBKey.h: - (WebKit::WebIDBKey::WebIDBKey): - * public/WebKitClient.h: - (WebKit::WebKitClient::createIDBKeysFromSerializedValuesAndKeyPath): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath): - -2010-08-24 Kent Tamura <tkent@chromium.org> - - Reviewed by Jeremy Orlow. - - [DRT/Chromium] Support for IndexedDB tests - https://bugs.webkit.org/show_bug.cgi?id=44490 - - * DEPS: Roll Chromium to r57145 to have a webkit_support change. - -2010-08-24 Roland Steiner <rolandsteiner@chromium.org> - - Unreviewed build fix. - - put the "DISABLED_" in front of the right identifier. - - * tests/WebFrameTest.cpp: - (WebKit::TEST_F): - -2010-08-23 Roland Steiner <rolandsteiner@chromium.org> - - Reviewed by Tamura Kent. - - Disable failing test - https://bugs.webkit.org/show_bug.cgi?id=44492 - - * tests/WebFrameTest.cpp: - (WebKit::TEST_F): - -2010-08-23 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Made WebFrame not report the text from hidden frames. - (some pages contain hidden frames with garbage text that - should not be indexed or used to detect the page's language). - https://bugs.webkit.org/show_bug.cgi?id=39456 - - * WebKit.gyp: - * public/WebCString.h: - (WebKit::operator<): - * public/WebURL.h: - (WebKit::operator<): - * src/WebCString.cpp: - (WebKit::WebCString::compare): - * src/WebFrameImpl.cpp: - (WebKit::frameContentAsPlainText): - * tests/RunAllTests.cpp: - (main): - * tests/WebFrameTest.cpp: Added. - -2010-08-23 Kent Tamura <tkent@chromium.org> - - Unreviewed, build fix for r65852. - - * src/WebNode.cpp: - (WebKit::WebNode::parentNode): - -2010-08-23 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Remove references to ArrayBuffer and ArrayBufferView from GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=44455 - - Updated Safari, Qt and Chromium WebGL ports to avoid referencing - ArrayBuffer and ArrayBufferView types from GraphicsContext3D. - - Ran all WebGL layout tests; no new regressions. Built and tested - WebKit on Mac OS X; built Chromium on Mac OS X and Linux. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - -2010-08-23 Jian Li <jianli@chromium.org> - - Reviewed by David Levin. - - Remove unneeded BlobRegistryImpl.* and WebBlobRegistryImpl.* from - chromium project files. - https://bugs.webkit.org/show_bug.cgi?id=44442 - - * WebKit.gyp: - -2010-08-23 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove obsolete public/API methods in chromium port - https://bugs.webkit.org/show_bug.cgi?id=44421 - - * public/WebSpeechInputController.h: - (WebKit::WebSpeechInputController::startRecognition): - (WebKit::WebSpeechInputController::cancelRecognition): - (WebKit::WebSpeechInputController::stopRecording): - * public/WebSpeechInputListener.h: - -2010-08-22 Daniel Bates <dbates@rim.com> - - Reviewed by Eric Seidel. - - Encapsulate document marker management into DocumentMarkerController - https://bugs.webkit.org/show_bug.cgi?id=44383 - - Modify call sites in the Chromium port to use DocumentMarkerController. - - No functionality was changed, so no new tests. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::stopFinding): - (WebKit::WebFrameImpl::addMarker): - (WebKit::WebFrameImpl::setMarkerActive): - -2010-08-22 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - Add the blob URL member to FormData. - https://bugs.webkit.org/show_bug.cgi?id=44387 - - As the result of adding the blob URL member to the FormData, we need - to update the corresponding WebKit API for chromium. - - * public/WebHTTPBody.h: - (WebKit::WebHTTPBody::Element::): - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendBlob): - -2010-08-20 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed; build fix for chromium (and remove duplicated ChangeLog entry). - -2010-08-20 James Robinson <jamesr@chromium.org> - - Synchronize default of use_accelerated_compositing gyp variable with downstream. Unreviewed. - - * features.gypi: - -2010-08-20 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add chromium-side callback implementation for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=44350 - - Add WebFileSystemCallbacks that calls back the WebCore's implementation. - - * WebKit.gyp: - * src/WebFileSystemCallbacksImpl.cpp: Added. - * src/WebFileSystemCallbacksImpl.h: Added. - -2010-08-20 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] fix a null pointer crash when dispatching JS keyboard events - https://bugs.webkit.org/show_bug.cgi?id=44313 - - * src/WebInputEventConversion.cpp: - (WebKit::WebKeyboardEventBuilder::WebKeyboardEventBuilder): - -2010-08-20 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Removing the deprecated class WebEvent and friends. - https://bugs.webkit.org/show_bug.cgi?id=44296 - - * WebKit.gyp: - * public/WebEvent.h: Removed. - * public/WebEventListener.h: Removed. - * public/WebMutationEvent.h: Removed. - * public/WebNode.h: - * src/EventListenerWrapper.cpp: - (WebKit::EventListenerWrapper::webDOMEventListenerDeleted): - * src/EventListenerWrapper.h: - * src/WebEvent.cpp: Removed. - * src/WebEventListener.cpp: Removed. - * src/WebEventListenerPrivate.cpp: Removed. - * src/WebEventListenerPrivate.h: Removed. - * src/WebNode.cpp: - (WebKit::WebNode::removeEventListener): - -2010-08-19 Zhenyao Mo <zmo@google.com> - - Reviewed by Kenneth Russell. - - Fix failing WebGL tests in Chromium in-process-webgl port - https://bugs.webkit.org/show_bug.cgi?id=44305 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): Add implementation. - -2010-08-19 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: enable DOM breakpoints for chromium - https://bugs.webkit.org/show_bug.cgi?id=42886 - - * src/js/DevTools.js: - (WebInspector.loaded): - -2010-08-19 Vincent Scheib <scheib@chromium.org> - - Reviewed by David Levin. - - [chromium] TilingData::tilePositionY has typo of X where Y should be used - https://bugs.webkit.org/show_bug.cgi?id=44195 - - Unit tests added for tileSize and tilePosition. - - * tests/TilingDataTest.cpp: - (WebCore::TEST): - -2010-08-19 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Darin Fisher. - - Add WebKit API for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=43151 - - Add asynchronous FileSystem interface to WebKit API for - FileSystem API. - http://dev.w3.org/2009/dap/file-system/file-dir-sys.html - - * WebKit.gyp: - * public/WebFileError.h: Added. - * public/WebFileSystem.h: Added. - * public/WebFileSystemEntry.h: Added. - * public/WebFileSystemCallbacks.h: Added. - * public/WebKitClient.h: - (WebKit::WebKitClient::fileSystem): - * public/WebFrameClient.h: - (WebKit::WebFrameClient::openFileSystem): - -2010-08-19 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - [Chromium] Rolls Chromium DEPS forward to 56564 - https://bugs.webkit.org/show_bug.cgi?id=44281 - - Roll Chromium DEPS forward to 56564 to include WebFileSystem - implementation changes. - - * DEPS: - -2010-08-19 Vincent Scheib <scheib@chromium.org> - - Reviewed by David Levin. - - Fixing previous Mac only build breakage with TilingDataTest.cpp - https://bugs.webkit.org/show_bug.cgi?id=44223 - - TilingDataTest.cpp included the wrong header, which had a compile - option around the definition of the WebCore namespace. Without the - namespace defined, error. Fixed by correctly including TilingData.h, - which has no conditional compilation. - - * WebKit.gyp: - * tests/TilingDataTest.cpp: - -2010-08-19 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Pavel Feldman. - - concatenated_devtools_js should depend on inspector_protocol_sources - https://bugs.webkit.org/show_bug.cgi?id=44255 - - * WebKit.gyp: - -2010-08-19 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: activate/deactivate breakpoints using v8 debugger flag. - https://bugs.webkit.org/show_bug.cgi?id=44112 - - * src/js/DebuggerScript.js: - (): - -2010-08-19 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] Abort idle IDBTransactions when the JS context they were created in finishes execution. - https://bugs.webkit.org/show_bug.cgi?id=44101 - - * WebKit.gyp: - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::transaction): - * public/WebIDBFactory.h: - (WebKit::WebIDBFactory::abortPendingTransactions): - * public/WebIDBTransaction.h: Added. - (WebKit::WebIDBTransaction::~WebIDBTransaction): - (WebKit::WebIDBTransaction::mode): - (WebKit::WebIDBTransaction::objectStore): - (WebKit::WebIDBTransaction::abort): - (WebKit::WebIDBTransaction::id): - (WebKit::WebIDBTransaction::setCallbacks): - * public/WebIDBTransactionCallbacks.h: Added. - (WebKit::WebIDBTransactionCallbacks::~WebIDBTransactionCallbacks): - (WebKit::WebIDBTransactionCallbacks::onAbort): - (WebKit::WebIDBTransactionCallbacks::id): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::transaction): - * src/IDBFactoryBackendProxy.cpp: - (WebCore::IDBFactoryBackendProxy::abortPendingTransactions): - * src/IDBFactoryBackendProxy.h: - * src/IDBTransactionBackendProxy.cpp: Added. - (WebCore::IDBTransactionBackendProxy::create): - (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy): - (WebCore::IDBTransactionBackendProxy::~IDBTransactionBackendProxy): - (WebCore::IDBTransactionBackendProxy::objectStore): - (WebCore::IDBTransactionBackendProxy::mode): - (WebCore::IDBTransactionBackendProxy::abort): - (WebCore::IDBTransactionBackendProxy::scheduleTask): - (WebCore::IDBTransactionBackendProxy::sqliteDatabase): - (WebCore::IDBTransactionBackendProxy::id): - (WebCore::IDBTransactionBackendProxy::setCallbacks): - * src/IDBTransactionBackendProxy.h: Added. - * src/IDBTransactionCallbacksProxy.cpp: Added. - (WebCore::IDBTransactionCallbacksProxy::create): - (WebCore::IDBTransactionCallbacksProxy::IDBTransactionCallbacksProxy): - (WebCore::IDBTransactionCallbacksProxy::~IDBTransactionCallbacksProxy): - (WebCore::IDBTransactionCallbacksProxy::onAbort): - (WebCore::IDBTransactionCallbacksProxy::id): - * src/IDBTransactionCallbacksProxy.h: Added. - * src/WebDOMStringList.cpp: - (WebKit::WebDOMStringList::length): - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::transaction): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBFactoryImpl.cpp: - (WebKit::WebIDBFactoryImpl::abortPendingTransactions): - * src/WebIDBFactoryImpl.h: - * src/WebIDBTransactionCallbacksImpl.cpp: Added. - (WebCore::WebIDBTransactionCallbacksImpl::WebIDBTransactionCallbacksImpl): - (WebCore::WebIDBTransactionCallbacksImpl::~WebIDBTransactionCallbacksImpl): - (WebCore::WebIDBTransactionCallbacksImpl::onAbort): - (WebCore::WebIDBTransactionCallbacksImpl::id): - * src/WebIDBTransactionCallbacksImpl.h: Added. - * src/WebIDBTransactionImpl.cpp: Added. - (WebKit::WebIDBTransactionImpl::WebIDBTransactionImpl): - (WebKit::WebIDBTransactionImpl::~WebIDBTransactionImpl): - (WebKit::WebIDBTransactionImpl::mode): - (WebKit::WebIDBTransactionImpl::objectStore): - (WebKit::WebIDBTransactionImpl::abort): - (WebKit::WebIDBTransactionImpl::id): - (WebKit::WebIDBTransactionImpl::setCallbacks): - * src/WebIDBTransactionImpl.h: Added. - (WebKit::): - -2010-08-19 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium DevTools: There is no need in resource-based InjectedScript.js source. - Now that we populate front-end after its onload handler, I don't think we need - to install injected script early. - https://bugs.webkit.org/show_bug.cgi?id=44029 - - * public/WebDevToolsAgentClient.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - -2010-08-19 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium DevTools: remove setRuntimeFeatureEnabled API method that - is no longer used. - https://bugs.webkit.org/show_bug.cgi?id=44237 - - * public/WebDevToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsAgentImpl.h: - -2010-08-18 Jian Li <jianli@chromium.org> - - Fix layout test crashes in chromium. - - * src/BlobRegistryProxy.cpp: - (WebCore::BlobRegistryProxy::registerBlobURL): - (WebCore::BlobRegistryProxy::unregisterBlobURL): - -2010-08-18 Jian Li <jianli@chromium.org> - - Fix chromium build break. - - * src/WebBlobStorageData.cpp: - (WebKit::WebBlobStorageData::itemAt): - -2010-08-18 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Chromium side implementation of blob data and blob registry. - https://bugs.webkit.org/show_bug.cgi?id=43871 - - * WebKit.gyp: - * public/WebBlobData.h: Added. - * public/WebBlobRegistry.h: Added. - * public/WebBlobStorageData.h: Added. - * public/WebKitClient.h: - (WebKit::WebKitClient::blobRegistry): - * src/BlobRegistryProxy.cpp: Added. - * src/BlobRegistryProxy.h: Added. - * src/WebBlobData.cpp: Added. - * src/WebBlobRegistryImpl.cpp: Added. - * src/WebBlobRegistryImpl.h: Added. - * src/WebBlobStorageData.cpp: Added. - -2010-08-18 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Propagate the m_downloadFilePath correctly. - https://bugs.webkit.org/show_bug.cgi?id=44198 - - * src/WebURLRequest.cpp: - (WebKit::WebURLRequestPrivateImpl::WebURLRequestPrivateImpl): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponsePrivateImpl::WebURLResponsePrivateImpl): - -2010-08-18 Victor Wang <victorw@chromium.org> - - Unreviewed. Fix chromium multi dll build. - - * public/WebIDBKeyPath.h: - -2010-08-18 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Renaming the WebEvent to WebDOMEvent and adding a new event class - for mouse events so that the event listener API can be used to listen - to them. The renaming is needed as there already is a WebMouseEvent class. - https://bugs.webkit.org/show_bug.cgi?id=43453 - - * WebKit.gyp: - * public/WebDOMEvent.h: Added. - * public/WebDOMEventListener.h: Added. - * public/WebDOMMouseEvent.h: Added. - * public/WebDOMMutationEvent.h: Added. - * public/WebNode.h: - * src/EventListenerWrapper.cpp: - * src/EventListenerWrapper.h: - * src/WebDOMEvent.cpp: Added. - * src/WebDOMEventListener.cpp: Added. - * src/WebDOMEventListenerPrivate.cpp: Added. - * src/WebDOMEventListenerPrivate.h: Added. - * src/WebDOMMouseEvent.cpp: Added. - * src/WebDOMMutationEvent.cpp: Added. - * src/WebNode.cpp: - (WebKit::WebNode::isElementNode): - (WebKit::WebNode::addDOMEventListener): - (WebKit::WebNode::removeDOMEventListener): - -2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: replace hand written InspectorBackendStub.js with generated one. - https://bugs.webkit.org/show_bug.cgi?id=43791 - - * WebKit.gyp: - -2010-08-18 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65238. - http://trac.webkit.org/changeset/65238 - https://bugs.webkit.org/show_bug.cgi?id=44168 - - Check if clobbering chromium bot fixes the layout test - failures (Requested by hamaji on #webkit). - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::frameDetached): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-08-18 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65595. - http://trac.webkit.org/changeset/65595 - https://bugs.webkit.org/show_bug.cgi?id=44161 - - qt build failed (Requested by loislo on #webkit). - - * WebKit.gyp: - -2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: replace hand written InspectorBackendStub.js by generated one. - https://bugs.webkit.org/show_bug.cgi?id=43791 - - * WebKit.gyp: - -2010-08-17 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium DevTools: Support runtime property name/value pairs - instead of feature names as navigation state. - https://bugs.webkit.org/show_bug.cgi?id=44054 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::runtimePropertyChanged): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setRuntimeProperty): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - * src/WebDevToolsAgentImpl.h: - -2010-08-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> - - Reviewed by Darin Adler. - - Add NetworkingContext to avoid layer violations - https://bugs.webkit.org/show_bug.cgi?id=42292 - - Preparation: Just add the files to the build system. - - * WebKit.gyp: Added new files. - * src/FrameNetworkingContextImpl.h: Added. - Placeholder with tentative code that might be changed when landing - the rest of it. - -2010-08-17 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65516. - http://trac.webkit.org/changeset/65516 - https://bugs.webkit.org/show_bug.cgi?id=44126 - - broke chromium unit tests on mac and linux (Requested by - johnny_g on #webkit). - - * WebKit.gyp: - * src/WebFrameImpl.cpp: - (WebKit::frameContentAsPlainText): - * tests/RunAllTests.cpp: - (main): - * tests/WebFrameTest.cpp: Removed. - -2010-08-17 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Made WebFrame not report the text from hidden frames. - (some pages contain hidden frames with garbage text that - should not be indexed or used to detect the page's language). - https://bugs.webkit.org/show_bug.cgi?id=39456 - - * WebKit.gyp: - * public/WebCString.h: - (WebKit::operator<): - * public/WebURL.h: - (WebKit::operator<): - * src/WebCString.cpp: - (WebKit::WebCString::compare): - * src/WebFrameImpl.cpp: - (WebKit::frameContentAsPlainText): - * tests/RunAllTests.cpp: - (main): - * tests/WebFrameTest.cpp: Added. - -2010-08-17 Kelly Norton <knorton@google.com> - - Reviewed by Pavel Feldman. - - Web Inspector: Fixes a crash in addTimelineRecord when InspectorTimelineAgent - is enabled through WebDevToolsAgentImpl::setApuEnabled. - https://bugs.webkit.org/show_bug.cgi?id=44105 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - -2010-08-17 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: upstream Chromium debugger step tests - https://bugs.webkit.org/show_bug.cgi?id=44106 - - * src/js/Tests.js: - -2010-08-17 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65500. - http://trac.webkit.org/changeset/65500 - https://bugs.webkit.org/show_bug.cgi?id=44108 - - Qt bots failed to compile. (Requested by loislo on #webkit). - - * WebKit.gyp: - -2010-08-17 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: replace hand written InspectorBackendStub.js by generated one. - https://bugs.webkit.org/show_bug.cgi?id=43791 - - * WebKit.gyp: - -2010-08-17 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: upstream Chromium console tests and remove a couple - of tests that have already been covered with layout tests. - https://bugs.webkit.org/show_bug.cgi?id=44057 - - * src/js/Tests.js: - (.TestSuite.prototype.testConsoleEval): - (.TestSuite.prototype.testConsoleLog): - (.TestSuite.prototype.testEvalGlobal): - -2010-08-16 Kinuko Yasuda <kinuko@chromium.org> - - Unreviewed; attempt to fix Chromium Windows build. - - * public/WebFileUtilities.h: - -2010-08-16 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - [chromium] Prepare to rename WebFileSystem interface to WebFileUtilities - https://bugs.webkit.org/show_bug.cgi?id=44077 - - We are going to have an implementation for HTML5 FileSystem API and - it would probably be less confusing to use the name "WebFileSystem" - for an WebKit API for the HTML5 API. - - This patch adds WebFileUtilities interface that is meant to replace - the existing WebFileSystem. - - * WebKit.gyp: - * public/WebFileSystem.h: - * public/WebFileUtilities.h: Added. - * public/WebKitClient.h: - (WebKit::WebKitClient::fileUtilities): Added. - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::fileExists): - (WebCore::ChromiumBridge::deleteFile): - (WebCore::ChromiumBridge::deleteEmptyDirectory): - (WebCore::ChromiumBridge::getFileSize): - (WebCore::ChromiumBridge::getFileModificationTime): - (WebCore::ChromiumBridge::directoryName): - (WebCore::ChromiumBridge::pathByAppendingComponent): - (WebCore::ChromiumBridge::makeAllDirectories): - (WebCore::ChromiumBridge::getAbsolutePath): - (WebCore::ChromiumBridge::isDirectory): - (WebCore::ChromiumBridge::filePathToURL): - (WebCore::ChromiumBridge::openFile): - (WebCore::ChromiumBridge::closeFile): - (WebCore::ChromiumBridge::seekFile): - (WebCore::ChromiumBridge::truncateFile): - (WebCore::ChromiumBridge::readFromFile): - (WebCore::ChromiumBridge::writeToFile): - -2010-08-16 Nate Chapin <japhet@chromium.org> - - Unreviewed, build fix. - - Don't include TilingDataTest.cpp, since it doesn't - compile on mac. - - * WebKit.gyp: - -2010-08-16 James Robinson <jamesr@chromium.org> - - Compile fix. Fix up paintsIntoCanvasBuffer impl. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): - -2010-08-16 Vincent Scheib <scheib@chromium.org> - - Reviewed by Dimitri Glazkov. - - Canvas2D does not support images larger than system's GPU max texture size - https://bugs.webkit.org/show_bug.cgi?id=43864 - - Unit tests for TilingData class. - - * WebKit.gyp: - * tests/TilingDataTest.cpp: Added. - (WebCore::TEST): - -2010-08-16 Alex Milowski <alex@milowski.com> - - Reviewed by David Levin. - - Added the ENABLE_MATHML=1 to the feature_defines. - - * features.gypi: - -2010-08-16 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Implements IDBKeyPath extractor. - https://bugs.webkit.org/show_bug.cgi?id=43276 - - Unit-test IDBKeyPathExtractorTest.cpp. - LayoutTests will arrive as IndexedDB infrastructure is fleshed out. - - - * WebKit.gyp: - * public/WebIDBKey.h: - * public/WebIDBKeyPath.h: Added. - (WebKit::WebIDBKeyPath::WebIDBKeyPath): - (WebKit::WebIDBKeyPath::~WebIDBKeyPath): - * public/WebPrivateOwnPtr.h: Added. - (WebKit::WebPrivateOwnPtr::WebPrivateOwnPtr): - (WebKit::WebPrivateOwnPtr::~WebPrivateOwnPtr): - (WebKit::WebPrivateOwnPtr::reset): - (WebKit::WebPrivateOwnPtr::get): - (WebKit::WebPrivateOwnPtr::operator->): - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::createFromValueAndKeyPath): - * src/WebIDBKeyPath.cpp: Added. - (WebKit::WebIDBKeyPath::create): - (WebKit::WebIDBKeyPath::WebIDBKeyPath): - (WebKit::WebIDBKeyPath::parseError): - (WebKit::WebIDBKeyPath::assign): - (WebKit::WebIDBKeyPath::reset): - (WebKit::WebIDBKeyPath::operator const WTF::Vector<WebCore::IDBKeyPathElement, 0>&): - * tests/IDBBindingUtilitiesTest.cpp: Added. - (WebCore::LocalContext::LocalContext): - (WebCore::LocalContext::~LocalContext): - (WebCore::checkKeyFromValueAndKeyPathInternal): - (WebCore::checkKeyPathNullValue): - (WebCore::checkKeyPathStringValue): - (WebCore::checkKeyPathNumberValue): - (WebCore::TEST): - -2010-07-28 Marcus Bulach <bulach@chromium.org> - - Reviewed by Adam Barth. - - Implement IDBKeyPath parser. - https://bugs.webkit.org/show_bug.cgi?id=42976 - - IDBKeyPath is an internal class, exposed only for unit tests for now. - It'll allow indexed database implementation to traverse a given key path and obtain the corresponding properties - from a SerializedScriptValue. - - * WebKit.gyp: - * tests/IDBKeyPathTest.cpp: Added. - (WebCore::ExpectedToken::ExpectedToken): - (WebCore::checkKeyPath): - (WebCore::TEST): - -2010-08-16 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: upstream frontend-side WebSocket transport. - https://bugs.webkit.org/show_bug.cgi?id=43970 - - Chromium already has an alternate WebSocket-based communication channel with - the backend. Upstreaming it in this change. We will agree on the URI - of the remote service as the protocol matures. - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend): - * src/js/DevTools.js: - (WebInspector.loaded): - (devtools.domContentLoaded): - -2010-08-16 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: remove utility context related code from debugger agent - https://bugs.webkit.org/show_bug.cgi?id=44049 - - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::onV8DebugMessage): - (WebKit::DebuggerAgentManager::pauseScript): - * src/DebuggerAgentManager.h: - -2010-08-16 Yuta Kitamura <yutak@chromium.org> - - Reviewed by Shinichiro Hamaji. - - Attempt to fix Chromium's test_shell_tests. - - Port Chromium's WebEntities to HTMLEntityTable - https://bugs.webkit.org/show_bug.cgi?id=44036 - - * src/WebEntities.cpp: - (WebKit::): - -2010-08-15 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Port Chromium's WebEntities to HTMLEntityTable - https://bugs.webkit.org/show_bug.cgi?id=44036 - - This code is wrong and needs to be removed. However, at least after - this patch, it will compile. - - * src/WebEntities.cpp: - (WebKit::): - (WebKit::WebEntities::WebEntities): - * src/WebEntities.h: - -2010-08-13 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Support for multiple speech enabled elements in same page. - https://bugs.webkit.org/show_bug.cgi?id=43922 - - * public/WebSpeechInputController.h: Bubbles up the requestId given by webcore to the embedder. - (WebKit::WebSpeechInputController::startRecognition): - (WebKit::WebSpeechInputController::cancelRecognition): - (WebKit::WebSpeechInputController::stopRecording): - * public/WebSpeechInputListener.h: Passes down the requestId given by embedder to webcore. - (WebKit::WebSpeechInputListener::didCompleteRecording): - (WebKit::WebSpeechInputListener::setRecognitionResult): - (WebKit::WebSpeechInputListener::didCompleteRecognition): - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::setListener): - (WebKit::SpeechInputClientImpl::startRecognition): - (WebKit::SpeechInputClientImpl::stopRecording): - (WebKit::SpeechInputClientImpl::cancelRecognition): - (WebKit::SpeechInputClientImpl::didCompleteRecording): - (WebKit::SpeechInputClientImpl::didCompleteRecognition): - (WebKit::SpeechInputClientImpl::setRecognitionResult): - * src/SpeechInputClientImpl.h: - * src/WebSpeechInputControllerMockImpl.cpp: - (WebKit::WebSpeechInputControllerMockImpl::WebSpeechInputControllerMockImpl): - (WebKit::WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl): - (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecording): - (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecognition): - (WebKit::WebSpeechInputControllerMockImpl::setRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - (WebKit::WebSpeechInputControllerMockImpl::cancelRecognition): - (WebKit::WebSpeechInputControllerMockImpl::stopRecording): - * src/WebSpeechInputControllerMockImpl.h: - -2010-08-12 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: allow interrupting long running JS to execute inspector command - https://bugs.webkit.org/show_bug.cgi?id=43900 - - * public/WebDevToolsAgent.h: - (WebKit::WebDevToolsAgent::MessageDescriptor::~MessageDescriptor): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgent::interruptAndDispatch): - (WebKit::WebDevToolsAgent::shouldInterruptForMessage): - (WebKit::WebDevToolsAgent::processPendingMessages): - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - * src/WebDevToolsFrontendImpl.h: - * src/js/DevTools.js: - -2010-08-12 Aaron Boodman <aa@chromium.org> - - Reviewed by David Hyatt. - - Make the cascade level of "user" styles configurable - https://bugs.webkit.org/show_bug.cgi?id=43457 - - * src/WebViewImpl.cpp: - (WebKit::WebView::addUserStyleSheet): - -2010-08-12 John Gregg <johnnyg@google.com> - - Reviewed by Kent Tamura. - - [chromium] Add Notification::detachPresenter to the WebKit API. - https://bugs.webkit.org/show_bug.cgi?id=43659 - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::detachPresenter): - -2010-08-11 Stephen White <senorblanco@chromium.org> - - Reviewed by David Levin. - - Add support for BGRA pixel format to GraphicsContext3D. - https://bugs.webkit.org/show_bug.cgi?id=43858 - - Although this has been standard in desktop GL since 1.2, it's an - extension in GL ES 2.0, so a query function is provided to check - for support. The DefaultImpl returns false, since it does not yet - implement the TexImage2D internalFormat quirks. - - * public/WebGraphicsContext3D.h: - (WebKit::WebGraphicsContext3D::supportsBGRA): - * src/GraphicsContext3D.cpp: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::supportsBGRA): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65181. - http://trac.webkit.org/changeset/65181 - https://bugs.webkit.org/show_bug.cgi?id=43909 - - It broke 35 layout tests fail on chromium-win (Requested by - hamaji on #webkit). - - * public/WebFrameClient.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-08-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r65221. - http://trac.webkit.org/changeset/65221 - https://bugs.webkit.org/show_bug.cgi?id=43896 - - Broke snow leopard build. (Requested by dave_levin on - #webkit). - - * public/WebGraphicsContext3D.h: - * src/GraphicsContext3D.cpp: - * src/WebGraphicsContext3DDefaultImpl.cpp: - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-08-11 Stephen White <senorblanco@chromium.org> - - Reviewed by David Levin. - - Add support for BGRA pixel format to GraphicsContext3D. - https://bugs.webkit.org/show_bug.cgi?id=43858 - - Although this has been standard in desktop GL since 1.2, it's an - extension in GL ES 2.0, so a query function is provided to check - for support. The DefaultImpl returns false, since it does not yet - implement the TexImage2D internalFormat quirks. - - * public/WebGraphicsContext3D.h: - (WebKit::WebGraphicsContext3D::supportsBGRA): - * src/GraphicsContext3D.cpp: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::supportsBGRA): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-08-11 James Hawkins <jhawkins@chromium.org> - - Reviewed by Dmitry Titov. - - [Chromium] Notify the WebFrameClient when the frame is detached from - the view. This is used to clear the cached frame in the FormManager. - Eventually this will be removed once handling forms is moved into - WebCore. - https://bugs.webkit.org/show_bug.cgi?id=43648 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::frameDetached): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-08-11 Dimitri Glazkov <dglazkov@chromium.org> - - Build fix, turn off yet-unbaked DEVICE_ORIENTATION stuff. - - * features.gypi: Turned it off. - -2010-08-11 Evan Stade <estade@chromium.org> - - Reviewed by David Levin. - - [chromium] linux chromium sends double clicks too often - https://bugs.webkit.org/show_bug.cgi?id=43096 - - * WebKit.gyp: add the test - * src/gtk/WebInputEventFactory.cpp: - (WebKit::WebInputEventFactory::mouseEvent): check the x/y coordinates of the - potential double click event - * tests/WebInputEventFactoryTestGtk.cpp: Added. - -2010-08-11 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Inform a plugin about the zoom level when it's created - https://bugs.webkit.org/show_bug.cgi?id=42268 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - -2010-08-11 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Fix Chromium compilation. - - * DEPS: - -2010-08-11 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Chromium build fix. - - * DEPS: bump up Chromium revision. - -2010-08-11 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: remove InjectDispatch.js - https://bugs.webkit.org/show_bug.cgi?id=43835 - - * WebKit.grd: - * src/js/InjectDispatch.js: Removed. - -2010-08-10 Kent Tamura <tkent@chromium.org> - - Unreviewed, build fix. - - Chromium build fix for r65107. - - * src/WebAnimationControllerImpl.cpp: - (WebKit::WebAnimationControllerImpl::suspendAnimations): - (WebKit::WebAnimationControllerImpl::resumeAnimations): - -2010-08-10 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Roll forward Chromium DEPS to r55584 - https://bugs.webkit.org/show_bug.cgi?id=43811 - - * DEPS: - -2010-08-10 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: Support appcache status change for Chrome - https://bugs.webkit.org/show_bug.cgi?id=43531 - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): - -2010-08-10 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Use Chromium OpenGL bindings rather than GLEW in WebGraphicsContextDefaultImpl - https://bugs.webkit.org/show_bug.cgi?id=43754 - - Deleted per-platform OpenGL context management code, now - abstracted via GLContext. Built and tested in Chromium with - --in-process-webgl flag. - - * WebKit.gyp: - * src/GraphicsContext3D.cpp: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D): - (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): - (WebKit::WebGraphicsContext3DDefaultImpl::createBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteBuffer): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-08-10 Jian Li <jianli@chromium.org> - - Another chromium build fix. - - * src/AssertMatchingEnums.cpp: - -2010-08-10 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - Bug 43786 - Move AtomicStringHash from WebCore to WTF - Also remove deprecated string headers from WebCore/platform/text. - - * src/WebKit.cpp: - * src/WebPageSerializerImpl.h: - * src/WebString.cpp: - -2010-08-10 James Robinson <jamesr@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Feature defines are out of sync between features.gypi and downstream feature_overrides.gypi - https://bugs.webkit.org/show_bug.cgi?id=43756 - - This synchronizes the feature defines to what's currently downstream (at r55468). - The difference between the build.webkit.org bots and the chromium bots has - caused strange compilation failures lately. - - * features.gypi: - -2010-08-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: get rid of utility context - https://bugs.webkit.org/show_bug.cgi?id=43787 - - * public/WebDevToolsAgentClient.h: - * src/DebuggerAgentImpl.cpp: - * src/DebuggerAgentImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::~WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::detach): - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - (WebKit::WebDevToolsAgentImpl::setRuntimeFeatureEnabled): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - * src/WebDevToolsAgentImpl.h: - -2010-08-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector, Chromium: reloading of inspected page hits assert in InspectorController::enableDebuggerFromFrontend() - https://bugs.webkit.org/show_bug.cgi?id=43780 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setRuntimeFeatureEnabled): - -2010-08-10 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - Implement chromium WebDeviceOrientationClient wrapper and have WebViewImpl get it from WebViewClient. - https://bugs.webkit.org/show_bug.cgi?id=43258 - - Provide a DeviceOrientationClient to Page by means of a - DeviceOrientationClientProxy that proxies calls to - a WebDeviceOrientationClient, an interface that can be implemented - in the WebKit or Chromium layer. An implementation to be used for - layout tests, wrapping DeviceOrientationClientMock, is provided. - - - * WebKit.gyp: - * public/WebDeviceOrientation.h: Added. - (WebKit::WebDeviceOrientation::WebDeviceOrientation): - * public/WebDeviceOrientationClient.h: Added. - (WebKit::WebDeviceOrientationClient::~WebDeviceOrientationClient): - * public/WebDeviceOrientationClientMock.h: Added. - (WebKit::WebDeviceOrientationClientMock::WebDeviceOrientationClientMock): - (WebKit::WebDeviceOrientationClientMock::~WebDeviceOrientationClientMock): - * public/WebDeviceOrientationController.h: Added. - (WebKit::WebDeviceOrientationController::WebDeviceOrientationController): - * public/WebViewClient.h: - (WebKit::WebViewClient::deviceOrientationClient): - * src/DeviceOrientationClientProxy.cpp: Added. - (WebKit::DeviceOrientationClientProxy::setController): - (WebKit::DeviceOrientationClientProxy::startUpdating): - (WebKit::DeviceOrientationClientProxy::stopUpdating): - (WebKit::DeviceOrientationClientProxy::lastOrientation): - * src/DeviceOrientationClientProxy.h: Added. - (WebKit::DeviceOrientationClientProxy::DeviceOrientationClientProxy): - * src/WebDeviceOrientation.cpp: Added. - (WebKit::WebDeviceOrientation::WebDeviceOrientation): - (WebKit::WebDeviceOrientation::operator=): - (WebKit::WebDeviceOrientation::operator PassRefPtr<WebCore::DeviceOrientation>): - * src/WebDeviceOrientationClientMock.cpp: Added. - (WebKit::WebDeviceOrientationClientMock::setController): - (WebKit::WebDeviceOrientationClientMock::startUpdating): - (WebKit::WebDeviceOrientationClientMock::stopUpdating): - (WebKit::WebDeviceOrientationClientMock::lastOrientation): - (WebKit::WebDeviceOrientationClientMock::setOrientation): - (WebKit::WebDeviceOrientationClientMock::initialize): - (WebKit::WebDeviceOrientationClientMock::reset): - * src/WebDeviceOrientationController.cpp: Added. - (WebKit::WebDeviceOrientationController::didChangeDeviceOrientation): - (WebKit::WebDeviceOrientationController::controller): - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-08-10 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64988. - http://trac.webkit.org/changeset/64988 - https://bugs.webkit.org/show_bug.cgi?id=43775 - - "It seems to break chromium's ui_tests" (Requested by hamaji - on #webkit). - - * public/WebFrameClient.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-08-10 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Remove references to deleted header InspectorFrontend.h - - * src/WebDevToolsAgentImpl.cpp: - -2010-08-10 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Fix Chromium compilation. - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Speculative chromium build fix V. - - * tests/KURLTest.cpp: - (ComponentCase::TEST): - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Speculative chromium build fix IV. - - * src/WebPageSerializerImpl.h: - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Speculative chromium build fix II. - - * src/AssertMatchingEnums.cpp: - -2010-08-09 Gavin Barraclough <barraclough@apple.com> - - Speculative chromium build fix. - - * public/WebCString.h: - -2010-08-06 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Bug 43594 - Add string forwards to Forward.h - This allows us to remove forward declarations for these classes from - WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - - * public/WebCString.h: - * public/WebString.h: - * src/DOMUtilitiesPrivate.h: - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.h: - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.h: - * src/WebPageSerializerImpl.h: - -2010-08-09 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Skip the slow software rendering path of GraphicsContext3D if accelerated - compositing is active. This fixes an issue with WebGL and the compositor - in which the software rendering of WebGL would cause the current GL context - to change while the compositor was processing layers. Tested by running - several WebGL samples both with the compositor enabled and disabled. - https://bugs.webkit.org/show_bug.cgi?id=43644 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::beginPaint): - -2010-08-06 James Hawkins <jhawkins@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Notify the WebFrameClient when the frame is detached from - the view. This is used to clear the cached frame in the FormManager. - Eventually this will be removed once handling forms is moved into - WebCore. - https://bugs.webkit.org/show_bug.cgi?id=43648 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::frameDetached): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-08-09 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: Chromium tests fix. - - Chromium: provisional interactive ui tests fix. - - * src/js/Tests.js: - (.TestSuite.prototype.testShowStoragePanel.this): - (.TestSuite.prototype.testShowStoragePanel): - -2010-08-09 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Chromium tests fix. - - Disable runtime switch for device motion in chromium. - https://bugs.webkit.org/show_bug.cgi?id=43717 - - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - -2010-08-09 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium: Remove temporary device motion fix. - - https://bugs.webkit.org/show_bug.cgi?id=43713 - - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDeviceOrientation): - -2010-08-07 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Eric Seidel. - - Removed unecessary focus code. - https://bugs.webkit.org/show_bug.cgi?id=43542 - - * src/ChromiumBridge.cpp: - -2010-08-06 Victor Wang <victorw@chromium.org> - - Reviewed by Kent Tamura. - - [Chromium] Add dllimport/dllexport to WebSpeechInputControllerMock::create - so it works for windows dll build. - - https://bugs.webkit.org/show_bug.cgi?id=43627 - - * public/WebSpeechInputControllerMock.h: - -2010-08-06 James Robinson <jamesr@chromium.org> - - Reviewed by Simon Fraser. - - Composited canvas should be treated the same by the compositor and not be WebGL specific - https://bugs.webkit.org/show_bug.cgi?id=43589 - - Initializes the platformLayer as a CanvasLayerChromium, not a WebGLLayerChromium. - The layer itself isn't WebGL-specific. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::platformLayer): - (WebCore::GraphicsContext3D::platformLayer): - -2010-08-06 Jessie Berlin <jberlin@apple.com> - - Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build. - Unreviewed. - - * public/WebCString.h: - * public/WebString.h: - * src/DOMUtilitiesPrivate.h: - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.h: - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.h: - * src/WebPageSerializerImpl.h: - -2010-08-06 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium: disable device motion by default. - - https://bugs.webkit.org/show_bug.cgi?id=43623 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDeviceMotion): - (WebKit::WebRuntimeFeatures::isDeviceMotionEnabled): - (WebKit::WebRuntimeFeatures::enableDeviceOrientation): - -2010-08-06 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: Remove "Online/Offline" icon for Chrome's appcache devtools UI. - https://bugs.webkit.org/show_bug.cgi?id=43450 - - * src/js/DevTools.js: - (WebInspector.loaded): - -2010-08-05 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Initial bindings and plumbing for IDBCursor. - https://bugs.webkit.org/show_bug.cgi?id=41888 - - Test: storage/indexeddb/idb-opencursor.html - - * WebKit.gyp: - * public/WebIDBCallbacks.h: - (WebKit::WebIDBCallbacks::onSuccess): - * public/WebIDBCursor.h: Added. - (WebKit::WebIDBCursor::~WebIDBCursor): - (WebKit::WebIDBCursor::direction): - (WebKit::WebIDBCursor::key): - (WebKit::WebIDBCursor::value): - (WebKit::WebIDBCursor::update): - (WebKit::WebIDBCursor::continueFunction): - (WebKit::WebIDBCursor::remove): - * public/WebIDBKeyRange.h: Added. - (WebKit::WebIDBKeyRange::~WebIDBKeyRange): - (WebKit::WebIDBKeyRange::WebIDBKeyRange): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::openCursor): - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBCursorBackendProxy.cpp: Added. - (WebCore::IDBCursorBackendProxy::create): - (WebCore::IDBCursorBackendProxy::IDBCursorBackendProxy): - (WebCore::IDBCursorBackendProxy::~IDBCursorBackendProxy): - (WebCore::IDBCursorBackendProxy::direction): - (WebCore::IDBCursorBackendProxy::key): - (WebCore::IDBCursorBackendProxy::value): - (WebCore::IDBCursorBackendProxy::update): - (WebCore::IDBCursorBackendProxy::continueFunction): - (WebCore::IDBCursorBackendProxy::remove): - * src/IDBCursorBackendProxy.h: Added. - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::openCursor): - * src/IDBObjectStoreProxy.h: - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: - * src/WebIDBCursorImpl.cpp: Added. - (WebKit::WebIDBCursorImpl::WebIDBCursorImpl): - (WebKit::WebIDBCursorImpl::~WebIDBCursorImpl): - (WebKit::WebIDBCursorImpl::direction): - (WebKit::WebIDBCursorImpl::key): - (WebKit::WebIDBCursorImpl::value): - (WebKit::WebIDBCursorImpl::update): - (WebKit::WebIDBCursorImpl::continueFunction): - (WebKit::WebIDBCursorImpl::remove): - * src/WebIDBCursorImpl.h: Added. - * src/WebIDBKeyRange.cpp: Added. - (WebKit::WebIDBKeyRange::WebIDBKeyRange): - (WebKit::WebIDBKeyRange::assign): - (WebKit::WebIDBKeyRange::reset): - (WebKit::WebIDBKeyRange::left): - (WebKit::WebIDBKeyRange::right): - (WebKit::WebIDBKeyRange::flags): - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::openCursor): - * src/WebIDBObjectStoreImpl.h: - -2010-08-05 Andrei Popescu <andreip@dhcp-172-16-14-12.lon.corp.google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] IndexedDB is missing the Transaction interface. - https://bugs.webkit.org/show_bug.cgi?id=42970 - - Add IDBTransaction boilerplate. - - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::transaction): - * src/IDBDatabaseProxy.h: - -2010-08-05 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig - - Bug 43594 - Add string forwards to Forward.h - This allows us to remove forward declarations for these classes from - WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). - - * public/WebCString.h: - * public/WebString.h: - * src/DOMUtilitiesPrivate.h: - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.h: - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.h: - * src/WebPageSerializerImpl.h: - -2010-08-05 Brett Wilson <brettw@chromium.org> - - Reviewed by Nate Chapin. - - Make the webkit unit tests depend on test_support_base - https://bugs.webkit.org/show_bug.cgi?id=43584 - - * WebKit.gyp: - -2010-08-04 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Style cleanups in WebGL - https://bugs.webkit.org/show_bug.cgi?id=38761 - - Cleaned up all style violations in WebGL-related files reported by - check-webkit-style. No logic or other changes. Built WebKit and - Chromium and ran WebGL layout tests. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - * src/WebGraphicsContext3DDefaultImpl.cpp: - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-08-05 Jian Li <jianli@chromium.org> - - Reviewed by David Levin. - - Unify blob related feature defines to ENABLE(BLOB). - https://bugs.webkit.org/show_bug.cgi?id=43081 - - * features.gypi: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendFileRange): - -2010-08-05 Nico Weber <thakis@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove useless const on return-by-value (fixes a clang warning) - https://bugs.webkit.org/show_bug.cgi?id=43491 - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformKeyboardEventType): - -2010-08-05 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Add speech input controller mock in WebKit and a layout test. - https://bugs.webkit.org/show_bug.cgi?id=43477 - - * WebKit.gyp: - * public/WebSpeechInputControllerMock.h: Added WebKit speech input controller mock interface. - * src/WebSpeechInputControllerMockImpl.cpp: Added implementation of the above mock. - (WebKit::WebSpeechInputControllerMockImpl::WebSpeechInputControllerMockImpl): - (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecording): - (WebKit::WebSpeechInputControllerMockImpl::didCompleteRecognition): - (WebKit::WebSpeechInputControllerMockImpl::setRecognitionResult): - (WebKit::WebSpeechInputControllerMockImpl::startRecognition): - (WebKit::WebSpeechInputControllerMockImpl::cancelRecognition): - (WebKit::WebSpeechInputControllerMockImpl::stopRecording): - (WebKit::WebSpeechInputControllerMock::create): - -2010-08-05 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium DevTools: [REGRESSION] Frame navigation is not handled in devtools. - - https://bugs.webkit.org/show_bug.cgi?id=43556 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::detach): - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - (WebKit::WebDevToolsAgentImpl::setRuntimeFeatureEnabled): - -2010-08-05 John Gregg <johnnyg@google.com> - - Reviewed by Darin Fisher. - - [chromium] WebFileChooserParams should have default constructor - https://bugs.webkit.org/show_bug.cgi?id=43435 - - * public/WebFileChooserParams.h: - (WebKit::WebFileChooserParams::WebFileChooserParams): - -2010-08-05 Victoria Kirst <vrk@google.com> - - Reviewed by David Levin. - - Added a repaint request so that VideoLayerChromium does not have - a flickering problem when playing video. - https://bugs.webkit.org/show_bug.cgi?id=43101 - - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::repaint): - -2010-08-05 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - DevTools: get rid of delayed command dispatching on front-end side. - - https://bugs.webkit.org/show_bug.cgi?id=43479 - - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::sendFrontendLoaded): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend): - (WebKit::WebDevToolsFrontendImpl::frontendLoaded): - * src/WebDevToolsFrontendImpl.h: - * src/js/DevTools.js: - (WebInspector.doLoadedDone): - * src/js/Tests.js: - (.uiTests.runTest): - (.): - -2010-08-02 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Port Chromium's accelerated compositing to Mac OS X - https://bugs.webkit.org/show_bug.cgi?id=43398 - - * public/WebGLES2Context.h: - - Added resizeOnscreenContent, needed on Mac OS X to report - window size changes. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::resize): - - Send resize notification to the WebGLES2Context. - (WebKit::WebViewImpl::updateRootLayerContents): - - Ported to Core Graphics. - (WebKit::WebViewImpl::gles2Context): - - Added initial size notification upon context creation. - -2010-08-04 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - DevTools: get rid of delayed command dispatching on front-end side. - - https://bugs.webkit.org/show_bug.cgi?id=43479 - - * public/WebDevToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::frontendLoaded): - * src/WebDevToolsAgentImpl.h: - -2010-08-03 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - Move WebGL-specific code out of GraphicsContext3D so that G3D can be used as a generic accelerated drawing API - https://bugs.webkit.org/show_bug.cgi?id=43221 - - Implements functions in term of Platform3DObjects instead of WebGL types. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::bindAttribLocation): - (WebCore::GraphicsContext3DInternal::getActiveAttrib): - (WebCore::GraphicsContext3DInternal::getActiveUniform): - (WebCore::GraphicsContext3DInternal::getAttribLocation): - (WebCore::GraphicsContext3DInternal::getProgramInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderSource): - (WebCore::GraphicsContext3DInternal::getUniformLocation): - (WebCore::GraphicsContext3DInternal::shaderSource): - -2010-08-03 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - Roll chromium to 54723 to unbreak the builds. - - * DEPS: - -2010-08-03 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] IDBObjectStoreRequest should be called IDBObjectStore - https://bugs.webkit.org/show_bug.cgi?id=43420 - - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::objectStore): - * src/IDBDatabaseProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::create): - * src/IDBObjectStoreProxy.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::WebIDBObjectStoreImpl): - * src/WebIDBObjectStoreImpl.h: - -2010-08-03 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Fix Chromium interactive UI tests. - - * src/js/Tests.js: - (.TestSuite.prototype.testResourceHeaders): - -2010-07-30 Andrei Popescu <andreip@dhcp-172-16-14-12.lon.corp.google.com> - - Reviewed by Jeremy Orlow. - - Rename IDBDatabaseRequest to IDBDatabase - https://bugs.webkit.org/show_bug.cgi?id=43250 - - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::create): - * src/IDBDatabaseProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl): - (WebKit::WebIDBDatabaseImpl::name): - (WebKit::WebIDBDatabaseImpl::description): - (WebKit::WebIDBDatabaseImpl::version): - (WebKit::WebIDBDatabaseImpl::objectStores): - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::objectStore): - (WebKit::WebIDBDatabaseImpl::removeObjectStore): - * src/WebIDBDatabaseImpl.h: - -2010-08-02 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium DevTools: Get rid of DevTools RPC. - - https://bugs.webkit.org/show_bug.cgi?id=43335 - - * WebKit.gyp: - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::sendMessageToInspectorFrontend): - (WebKit::WebDevToolsAgentClient::sendDebuggerOutput): - (WebKit::WebDevToolsAgentClient::sendDispatchToAPU): - * public/WebDevToolsFrontend.h: - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::sendMessageToBackend): - * public/WebDevToolsMessageData.h: Removed. - * public/WebDevToolsMessageTransport.h: Removed. - * src/APUAgentDelegate.h: Removed. - * src/DebuggerAgent.h: Removed. - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::DebuggerAgentImpl): - (WebKit::DebuggerAgentImpl::debuggerOutput): - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::onV8DebugMessage): - (WebKit::DebuggerAgentManager::executeDebuggerCommand): - (WebKit::DebuggerAgentManager::sendCommandToV8): - (WebKit::DebuggerAgentManager::sendContinueCommandToV8): - * src/DevToolsRPC.h: Removed. - * src/DevToolsRPCJS.h: Removed. - * src/InspectorClientImpl.cpp: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::sendMessageToBackend): - * src/ProfilerAgent.h: Removed. - * src/ProfilerAgentImpl.cpp: Removed. - * src/ProfilerAgentImpl.h: Removed. - * src/ToolsAgent.h: Removed. - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::didClearWindowObject): - (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorBackend): - (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient): - (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend): - (WebKit::WebDevToolsFrontendImpl::frontendLoaded): - (WebKit::WebDevToolsFrontendImpl::executeScript): - * src/WebDevToolsFrontendImpl.h: - * src/js/DevTools.js: - (devtools.dispatch): - (devtools.ToolsAgent): - * src/js/DevToolsHostStub.js: - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent): - (devtools.ProfilerAgent.prototype._getNextLogLines.else.delayedRequest): - (devtools.ProfilerAgent.prototype._getNextLogLines): - (devtools.ProfilerAgent.prototype._didGetProfilerLogLines): - * src/js/ProfilerProcessor.js: - (devtools.profiler.Processor.prototype.printError): - -2010-08-02 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Remove dependencies to some Chromium headers - https://bugs.webkit.org/show_bug.cgi?id=43396 - - * DEPS: Update Chromium revision to 54649 in order to have a - webkit_support change (r54646) - -2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): - (WebKit::ChromeClientImpl::createPopupMenu): - (WebKit::ChromeClientImpl::createSearchPopupMenu): - * src/ChromeClientImpl.h: - -2010-08-02 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Always initialize GTK - https://bugs.webkit.org/show_bug.cgi?id=43327 - - * WebKit.gyp: Add GTK dependency for DRT. - -2010-08-02 Jeremy Orlow <jorlow@chromium.org> - - Speculative revert of 64425 due to Chromium instability - https://bugs.webkit.org/show_bug.cgi?id=43347 - - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - * tests/PopupMenuTest.cpp: - (WebKit::SelectPopupMenuTest::SetUp): - -2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): - (WebKit::ChromeClientImpl::createPopupMenu): - (WebKit::ChromeClientImpl::createSearchPopupMenu): - * src/ChromeClientImpl.h: - -2010-07-31 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r64422. - http://trac.webkit.org/changeset/64422 - https://bugs.webkit.org/show_bug.cgi?id=43304 - - Build fixes are needed for Snow Leopard and Windows. - (Requested by lca on #webkit). - - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - -2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> - - Reviewed by Darin Fisher. - - PopupMenu refactoring in preparation to WebKit2 - https://bugs.webkit.org/show_bug.cgi?id=42592 - - As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu - instances, concrete classes that inherit from ChromeClient needed to be changed to - implement the new methods. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::selectItemWritingDirectionIsNatural): - (WebKit::ChromeClientImpl::createPopupMenu): - (WebKit::ChromeClientImpl::createSearchPopupMenu): - * src/ChromeClientImpl.h: - -2010-07-30 Joseph Pecoraro <joepeck@webkit.org> - - Reviewed by David Kilzer. - - Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas) - https://bugs.webkit.org/show_bug.cgi?id=40627 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::reachedApplicationCacheOriginQuota): - * src/ChromeClientImpl.h: - -2010-07-30 James Robinson <jamesr@chromium.org> - - Compile fix. Put GLES2 functions behind USE(GLES2_RENDERING) instead of - USE(ACCELERATED_COMPOSITING) to match WebCore. Fixes the compile when - USE(GLES2_RENDERING) is true and USE(ACCELERATED_COMPOSITING) is false. - - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - -2010-07-27 Darin Fisher <darin@chromium.org> - - Reviewed by Brady Eidson. - - History.pushState() + navigation operates on top frame when called from - nested context - https://bugs.webkit.org/show_bug.cgi?id=43080 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::pluginLoadObserver): The WebDataSource - can be null if the Frame has already been detached from the Page. This - happens if a popstate event handler removes the frame. - -2010-07-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Rename all the IDBIndex classses to match the latest conventions - https://bugs.webkit.org/show_bug.cgi?id=43190 - - Fix up stuff in WebKit layer to handle the renamings in WebCore. - - * WebKit.gyp: - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBIndexBackendProxy.cpp: Added. - (WebCore::IDBIndexBackendProxy::create): - (WebCore::IDBIndexBackendProxy::IDBIndexBackendProxy): - (WebCore::IDBIndexBackendProxy::~IDBIndexBackendProxy): - (WebCore::IDBIndexBackendProxy::name): - (WebCore::IDBIndexBackendProxy::keyPath): - (WebCore::IDBIndexBackendProxy::unique): - * src/IDBIndexBackendProxy.h: Added. - * src/IDBIndexProxy.cpp: Removed. - * src/IDBIndexProxy.h: Removed. - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::index): - * src/IDBObjectStoreProxy.h: - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBIndexImpl.cpp: - (WebKit::WebIDBIndexImpl::WebIDBIndexImpl): - (WebKit::WebIDBIndexImpl::name): - (WebKit::WebIDBIndexImpl::keyPath): - (WebKit::WebIDBIndexImpl::unique): - * src/WebIDBIndexImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::index): - -2010-07-30 Satish Sampath <satish@chromium.org> - - Reviewed by Jeremy Orlow. - - Add a check for WebViewClient being null. - https://bugs.webkit.org/show_bug.cgi?id=43240 - - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): - -2010-07-30 Hans Wennborg <hans@chromium.org> - - Reviewed by Steve Block. - - Disable runtime switch for device orientation in chromium - https://bugs.webkit.org/show_bug.cgi?id=43237 - - Explicitly set the runtime switch for device orientation - in WebView::create until we implement the feature. - If the flag is accidentally on while no DeviceOrientationClient - is provided, the program will crash. - - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - -2010-07-26 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] IndexedDatabase should be called IDBFactory. - https://bugs.webkit.org/show_bug.cgi?id=42967 - - * WebKit.gyp: - * public/WebIDBFactory.h: Added. - (WebKit::WebIDBFactory::~WebIDBFactory): - (WebKit::WebIDBFactory::databases): - (WebKit::WebIDBFactory::open): - * public/WebIndexedDatabase.h: Removed. - * public/WebKitClient.h: - (WebKit::WebKitClient::idbFactory): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::idbFactory): - * src/IDBFactoryBackendProxy.cpp: Added. - (WebCore::IDBFactoryBackendProxy::create): - (WebCore::IDBFactoryBackendProxy::IDBFactoryBackendProxy): - (WebCore::IDBFactoryBackendProxy::~IDBFactoryBackendProxy): - (WebCore::IDBFactoryBackendProxy::open): - * src/IDBFactoryBackendProxy.h: Added. - * src/IndexedDatabaseProxy.cpp: Removed. - * src/IndexedDatabaseProxy.h: Removed. - * src/WebIDBFactoryImpl.cpp: Added. - (WebKit::WebIDBFactory::create): - (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl): - (WebKit::WebIDBFactoryImpl::~WebIDBFactoryImpl): - (WebKit::WebIDBFactoryImpl::open): - * src/WebIDBFactoryImpl.h: Added. - * src/WebIndexedDatabaseImpl.cpp: Removed. - * src/WebIndexedDatabaseImpl.h: Removed. - -2010-07-29 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] WebDOMStringList ctor is not exported and causes link errors for the multi-dll chromium build - https://bugs.webkit.org/show_bug.cgi?id=43186 - - Add WEBKIT_API to WebDOMStringList default ctor. - - * public/WebDOMStringList.h: - -2010-07-29 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Runtime feature switch for speech input - https://bugs.webkit.org/show_bug.cgi?id=43146 - - Add a runtime feature switch that decides whether speech input attributes are available or not. - Defaults to true. - - * public/WebRuntimeFeatures.h: - * src/SpeechInputClientImpl.cpp: - (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableSpeechInput): - (WebKit::WebRuntimeFeatures::isSpeechInputEnabled): - -2010-07-28 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Enable UI for chromium's appcache inspection. - https://bugs.webkit.org/show_bug.cgi?id=43098 - - * src/js/DevTools.js: - (WebInspector.loaded): - -2010-07-28 Dominic Mazzoni <dmazzoni@google.com> - - Reviewed by Dimitri Glazkov. - - Add access to the computed style display to WebAccessibilityObject. - https://bugs.webkit.org/show_bug.cgi?id=43044 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::hasComputedStyle): - (WebKit::WebAccessibilityObject::computedStyleDisplay): - -2010-07-28 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - Set ENABLE_DEVICE_ORIENTATION=1 in features.gypi for chromium - https://bugs.webkit.org/show_bug.cgi?id=43122 - - Enable the compile-time switch for device orientation. - The switch was already enabled in features_override.gypi in the Chromium - repository (in revision 53317), and should be set here as well. - - The feature is being implemented behind a run-time flag which - defaults to off in Chromium. - - * features.gypi: Set ENABLE_DEVICE_ORIENTATION=1. - -2010-07-28 Gene Gutnik <gene@google.com> - - Reviewed by Darin Fisher. - - Fix mouse coordinate conversion. WindowX,Y is an absolute - mouse coordinates within browser window, x,y - are coordinates - relative to the plugin. - https://bugs.webkit.org/show_bug.cgi?id=42987 - - * src/WebInputEventConversion.cpp: - (WebKit::WebMouseEventBuilder::WebMouseEventBuilder): - (WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder): - * src/WebInputEventConversion.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleMouseEvent): - (WebKit::WebPluginContainerImpl::handleWheelEvent): - -2010-07-28 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add a bool to Settings to control accelerated 2d canvas - https://bugs.webkit.org/show_bug.cgi?id=43094 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setAccelerated2dCanvasEnabled): - * src/WebSettingsImpl.h: - -2010-07-28 Brett Wilson <brettw@chromium.org> - - Reviewed by Darin Fisher. - - Fix forward declares to be struct instead of class. - https://bugs.webkit.org/show_bug.cgi?id=43127 - - * public/WebFont.h: - -2010-07-28 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Dimitri Glazkov. - - Chromium DevTools: [REGRESSION] sourceURL is not respected. - - https://bugs.webkit.org/show_bug.cgi?id=43124 - - * src/js/DebuggerScript.js: - -2010-07-28 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [IndexedDB] WebDOMStringList default ctor does not initialize its m_private member - variable so any attempt to append strings to a WebDOMStringList instance results in a crash. - https://bugs.webkit.org/show_bug.cgi?id=43120 - - Makes the default WebKit::WebDOMStringList ctor actually create its wrapped - WebCore::DOMStringList instance. - - * public/WebDOMStringList.h: - * src/WebDOMStringList.cpp: - (WebKit::WebDOMStringList::WebDOMStringList): - -2010-07-26 Steve Block <steveblock@google.com> - - Reviewed by Jeremy Orlow. - - Page clients should be passed to Page constructor via structure of pointers - https://bugs.webkit.org/show_bug.cgi?id=42834 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2010-07-28 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: chromium tests fix. - Chromium Dev Tools: [REGRESSION] Pause is not working. - - https://bugs.webkit.org/show_bug.cgi?id=43118 - - * src/js/DevTools.js: - (InspectorBackend.pause): - -2010-07-27 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Ojan Vafai. - - Add FILE_SYSTEM build flag for FileSystem API - https://bugs.webkit.org/show_bug.cgi?id=42915 - - * features.gypi: - -2010-07-27 James Hawkins <jhawkins@chromium.org> - - Unreviewed Build Fix. - - Add a missing itemIcon() method to TestPopupMenuClient. - - * tests/PopupMenuTest.cpp: - (WebKit::TestPopupMenuClient::itemIcon): - -2010-07-27 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add the ability to show right-aligned icons in the AutoFill popup. - https://bugs.webkit.org/show_bug.cgi?id=43076 - - * public/WebView.h: - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getIcon): - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): - (WebKit::AutoFillPopupMenuClient::itemIcon): - (WebKit::AutoFillPopupMenuClient::initialize): - (WebKit::AutoFillPopupMenuClient::setSuggestions): - * src/AutoFillPopupMenuClient.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-07-27 Brett Wilson <brettw@chromium.org> - - Reviewed by Darin Fisher. - - Add the ability to select fonts and do basic text drawing to the - Chromium WebKit API. - https://bugs.webkit.org/show_bug.cgi?id=42999 - - * WebKit.gyp: - * public/WebFloatPoint.h: Added. - (WebKit::WebFloatPoint::WebFloatPoint): - (WebKit::WebFloatPoint::operator=): - (WebKit::WebFloatPoint::operator WebCore::FloatPoint): - (WebKit::operator==): - (WebKit::operator!=): - * public/WebFloatRect.h: Added. - (WebKit::WebFloatRect::isEmpty): - (WebKit::WebFloatRect::WebFloatRect): - (WebKit::WebFloatRect::operator=): - (WebKit::WebFloatRect::operator WebCore::FloatRect): - (WebKit::operator==): - (WebKit::operator!=): - * public/WebFont.h: Added. - * public/WebFontDescription.h: Added. - (WebKit::WebFontDescription::): - (WebKit::WebFontDescription::WebFontDescription): - * public/WebTextRun.h: Added. - (WebKit::WebTextRun::WebTextRun): - * src/AssertMatchingEnums.cpp: - * src/WebFontDescription.cpp: Added. - (WebKit::WebFontDescription::WebFontDescription): - (WebKit::WebFontDescription::operator WebCore::FontDescription): - * src/WebFontImpl.cpp: Added. - (WebKit::WebFont::Create): - (WebKit::WebFontImpl::WebFontImpl): - (WebKit::WebFontImpl::fontDescription): - (WebKit::WebFontImpl::ascent): - (WebKit::WebFontImpl::descent): - (WebKit::WebFontImpl::height): - (WebKit::WebFontImpl::lineSpacing): - (WebKit::WebFontImpl::xHeight): - (WebKit::WebFontImpl::drawText): - (WebKit::WebFontImpl::width): - (WebKit::WebFontImpl::offsetForPosition): - (WebKit::WebFontImpl::selectionRectForText): - * src/WebFontImpl.h: Added. - * src/WebTextRun.cpp: Added. - (WebKit::WebTextRun::operator WebCore::TextRun): - -2010-07-27 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by David Levin. - - Move all WebSQLDatabases-specific code behind #if ENABLE(DATABASE). - https://bugs.webkit.org/show_bug.cgi?id=43035 - - Make Chromium compile with ENABLE_DATABASE=0. - - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::databaseGetFileSize): - * src/DatabaseObserver.cpp: - * src/WebDatabase.cpp: - (WebCore::AbstractDatabase::stringIdentifier): - (WebCore::AbstractDatabase::displayName): - (WebCore::AbstractDatabase::estimatedSize): - (WebCore::AbstractDatabase::securityOrigin): - (WebKit::WebDatabase::updateDatabaseSize): - (WebKit::WebDatabase::closeDatabaseImmediately): - -2010-07-27 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: if breakpoints were deactivated, add new breakpoints as disabled. - https://bugs.webkit.org/show_bug.cgi?id=41461 - - * src/js/DebuggerScript.js: - (): - -2010-07-27 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - WebInspector: Current implementation of message based inspector - transport generated by CodeGeneratorInspector should be upstreamed - from WebKit/chromium to WebCore. - https://bugs.webkit.org/show_bug.cgi?id=42983 - - * WebKit.gypi: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::sendMessageToBackend): - * src/InspectorFrontendClientImpl.h: - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController): - (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost): - * src/WebDevToolsAgentImpl.h: - * src/js/InspectorControllerImpl.js: Removed. - -2010-07-27 Dominic Mazzoni <dmazzoni@google.com> - - Reviewed by Chris Fleizach. - - Add accessors for node and document to WebAccessibilityObject, - needed to support some Windows screenreader functionality. - - https://bugs.webkit.org/show_bug.cgi?id=43001 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::node): - (WebKit::WebAccessibilityObject::document): - -2010-07-27 Dominic Mazzoni <dmazzoni@google.com> - - Reviewed by Chris Fleizach. - - For Windows accessibility, have WebElement provide access - to its attributes. - - https://bugs.webkit.org/show_bug.cgi?id=43004 - - * WebKit.gyp: - * public/WebAttribute.h: Added. - (WebKit::WebAttribute::~WebAttribute): - (WebKit::WebAttribute::WebAttribute): - (WebKit::WebAttribute::operator=): - * public/WebElement.h: - * public/WebNamedNodeMap.h: Added. - (WebKit::WebNamedNodeMap::~WebNamedNodeMap): - (WebKit::WebNamedNodeMap::WebNamedNodeMap): - (WebKit::WebNamedNodeMap::operator=): - * src/WebAttribute.cpp: Added. - (WebKit::WebAttribute::reset): - (WebKit::WebAttribute::assign): - (WebKit::WebAttribute::WebAttribute): - (WebKit::WebAttribute::localName): - (WebKit::WebAttribute::value): - * src/WebElement.cpp: - (WebKit::WebElement::attributes): - * src/WebNamedNodeMap.cpp: Added. - (WebKit::WebNamedNodeMap::reset): - (WebKit::WebNamedNodeMap::assign): - (WebKit::WebNamedNodeMap::WebNamedNodeMap): - (WebKit::WebNamedNodeMap::length): - (WebKit::WebNamedNodeMap::attributeItem): - -2010-07-27 Satish Sampath <satish@chromium.org> - - Reviewed by Kent Tamura. - - Simplify speech input plumbing in webcore and webkit - https://bugs.webkit.org/show_bug.cgi?id=43008 - - * src/SpeechInputClientImpl.cpp: Move functionality to WebCore::SpeechInput and make this a dummy proxy. - (WebKit::SpeechInputClientImpl::startRecognition): - (WebKit::SpeechInputClientImpl::cancelRecognition): - (WebKit::SpeechInputClientImpl::didCompleteRecording): - (WebKit::SpeechInputClientImpl::didCompleteRecognition): - (WebKit::SpeechInputClientImpl::setRecognitionResult): - * src/SpeechInputClientImpl.h: - -2010-07-26 Dominic Mazzoni <dmazzoni@google.com> - - Reviewed by Chris Fleizach. - - Add accessor to get the doctype of a WebDocument, needed to - implement Windows accessibility. - - https://bugs.webkit.org/show_bug.cgi?id=43003 - - * WebKit.gyp: - * public/WebDocument.h: - * public/WebDocumentType.h: Added. - (WebKit::WebDocumentType::WebDocumentType): - (WebKit::WebDocumentType::operator=): - (WebKit::WebDocumentType::assign): - * src/WebDocument.cpp: - (WebKit::WebDocument::doctype): - * src/WebDocumentType.cpp: Added. - (WebKit::WebDocumentType::name): - (WebKit::WebDocumentType::WebDocumentType): - (WebKit::WebDocumentType::operator=): - (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>): - -2010-07-26 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Add WebKit plumbing to connect speech requests and callbacks between WebCore and the embedder. - https://bugs.webkit.org/show_bug.cgi?id=42367 - - No new tests, the relevant LayoutTestController bindings and tests will be added in the next patch. - - * public/WebSpeechInputController.h: Added new interface, implemented by embedder and called by WebKit - (WebKit::WebSpeechInputController::~WebSpeechInputController): - * public/WebSpeechInputListener.h: Added new interface, implemented by WebKit and called by embedder. - (WebKit::WebSpeechInputListener::~WebSpeechInputListener): - * public/WebViewClient.h: - (WebKit::WebViewClient::createSpeechInputClient): New method to get the embedder's speech input client interface. - * src/SpeechInputClientImpl.cpp: Added new class, implementation of a two way connector between WebCore - and the embedder for requests and responses. - (WebKit::SpeechInputClientImpl::SpeechInputClientImpl): - (WebKit::SpeechInputClientImpl::~SpeechInputClientImpl): - (WebKit::SpeechInputClientImpl::startRecognition): - (WebKit::SpeechInputClientImpl::stopRecording): - (WebKit::SpeechInputClientImpl::didCompleteRecording): - (WebKit::SpeechInputClientImpl::setRecognitionResult): - (WebKit::SpeechInputClientImpl::didCompleteRecognition): - * src/SpeechInputClientImpl.h: Added. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): Pass on the above mentioned speech input connector to WebCore. - * src/WebViewImpl.h: - -2010-07-26 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Chromium DevTools: refactor query params, add basic - support for WebSocket-based backend. - - https://bugs.webkit.org/show_bug.cgi?id=42893 - - * src/js/DevTools.js: - (devtools.ToolsAgent.prototype.dispatchOnClient_): - (WebInspector.loaded): - (WebInspector.doLoadedDone): - (devtools.domContentLoaded): - * src/js/InspectorControllerImpl.js: - -2010-07-24 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: chromium build fix. - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::fillResourceList): - -2010-07-23 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Joseph Pecoraro. - - Implement remaining Inspector support for chrome's appcache - https://bugs.webkit.org/show_bug.cgi?id=42426 - - * src/ApplicationCacheHost.cpp: Plugging in chrome's appcache info. - (WebCore::ApplicationCacheHost::applicationCacheInfo): - (WebCore::ApplicationCacheHost::fillResourceList): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-07-23 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Reviewed by Yury Semikhatsky. - - Chromium DevTools: migrate from utility context-based injected - script dispatch to upstream schema. - - https://bugs.webkit.org/show_bug.cgi?id=42883 - - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsAgentImpl.h: - * src/js/DevToolsHostStub.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-07-23 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: rolling out r63963. - - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::dispatchOnInjectedScript): - * src/WebDevToolsAgentImpl.h: - * src/js/DevToolsHostStub.js: - (.window.dispatchOnInjectedScript): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript): - -2010-07-23 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Reviewed by Yury Semikhatsky. - - Chromium DevTools: migrate from utility context-based injected - script dispatch to upstream schema. - - https://bugs.webkit.org/show_bug.cgi?id=42883 - - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsAgentImpl.h: - * src/js/DevToolsHostStub.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-07-23 Kent Tamura <tkent@chromium.org> - - Reviewed by Shinichiro Hamaji. - - Roll Chromium revision - https://bugs.webkit.org/show_bug.cgi?id=42876 - - * DEPS: Roll Chromium revision to r53434 in order to have the - logger initialization change (r53303) - -2010-07-22 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - WebInspector: CodeGeneratorInspector was extended and now it can - generate InspectorBackedDispatcher's code. This dispatcher will - validate and dispatch incoming inspector commands only by native - code without using javaScript. That is necessary step for - RemoteDebugging support. - https://bugs.webkit.org/show_bug.cgi?id=42588 - - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController): - * src/WebDevToolsAgentImpl.h: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl.prototype.callInspectorController_): - -2010-07-22 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] Propagate return value of EventHandler::handleMouseWheelEvent - to caller of WebViewImpl::handleInputEvent. - - https://bugs.webkit.org/show_bug.cgi?id=42835 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseWheel): - (WebKit::WebViewImpl::handleInputEvent): - * src/WebViewImpl.h: - -2010-07-22 Darin Fisher <darin@chromium.org> - - Reviewed by Kent Tamura. - - https://bugs.webkit.org/show_bug.cgi?id=42808 - Pass context menu events through WebInputEvent to WebPlugin::handleInputEvent. - - The DOM treats a context menu event as a type of mouse event. We therefore - do the same here, and reuse the WebMouseEvent subclass. This makes sense - since a context menu event has (x,y)-coordinates. - - * public/WebInputEvent.h: - (WebKit::WebInputEvent::): - (WebKit::WebInputEvent::isMouseEventType): - * src/WebInputEventConversion.cpp: - (WebKit::WebMouseEventBuilder::WebMouseEventBuilder): - -2010-07-22 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Stop granting universal access to inspector front-end page. - https://bugs.webkit.org/show_bug.cgi?id=42817 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::frontendLoaded): - -2010-07-22 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Rename method for CSS rule source range retrieval and fix return object format - https://bugs.webkit.org/show_bug.cgi?id=42379 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-07-21 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium Dev Tools: Separators are missing in the context menu. - - https://bugs.webkit.org/show_bug.cgi?id=42761 - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::populateCustomMenuItems): - -2010-07-21 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Copy the test plugin into DumpRenderTree.app/ - https://bugs.webkit.org/show_bug.cgi?id=42733 - - This was dropped in plugin copy refactoring. - - * WebKit.gyp: - -2010-07-21 Brady Eidson <beidson@apple.com> - - Reviewed by Geoffrey Garen. - - Break out "scheme registration" functionality from SecurityOrigin to a SchemeRegistry - https://bugs.webkit.org/show_bug.cgi?id=42783 - - * src/WebSecurityPolicy.cpp: - (WebKit::WebSecurityPolicy::registerURLSchemeAsLocal): - (WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess): - (WebKit::WebSecurityPolicy::registerURLSchemeAsSecure): - -2010-07-21 Bo Liu <boliu@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add chromium WebMediaPlayer to PlatformMedia - https://bugs.webkit.org/show_bug.cgi?id=41295 - - * WebKit.gyp: - * public/WebMediaElement.h: Added. - * src/WebMediaElement.cpp: Added. - (WebKit::WebMediaElement::player): - (WebKit::WebMediaElement::WebMediaElement): - (WebKit::WebMediaElement::operator=): - (WebKit::WebMediaElement::operator PassRefPtr<HTMLMediaElement>): - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::fromMediaElement): - (WebKit::WebMediaPlayerClientImpl::mediaPlayer): - (WebKit::WebMediaPlayerClientImpl::platformLayer): - (WebKit::WebMediaPlayerClientImpl::platformMedia): - * src/WebMediaPlayerClientImpl.h: - -2010-07-21 Finnur Thorarinsson <finnur.webkit@gmail.com> - - Reviewed by Dimitri Glazkov. - - Avoid crashing during find-in-page when |view| is NULL. - https://bugs.webkit.org/show_bug.cgi?id=42760 - - There are no layout tests because we don't have a repro case - to work with, so this is a speculative fix based on crash dump - diagnosis. See bug for details. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::shouldScopeMatches): - -2010-07-21 Hans Wennborg <hans@chromium.org> - - Reviewed by Steve Block. - - Runtime feature switch for device orientation - https://bugs.webkit.org/show_bug.cgi?id=42265 - - Add a runtime feature switch that decides whether device orientation - events are available or not. Defaults to true. - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDeviceOrientation): - (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled): - -2010-07-21 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: should be possible to debug inspector - https://bugs.webkit.org/show_bug.cgi?id=42730 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - -2010-07-16 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement WebFormElement::wasUserSubmitted(). This is used to - verify that the user submitted the form instead of JS when saving form - data in AutoFill. - https://bugs.webkit.org/show_bug.cgi?id=42479 - - * public/WebFormElement.h: - * src/WebFormElement.cpp: - (WebKit::WebFormElement::wasUserSubmitted): - -2010-07-20 Daniel Erat <derat@chromium.org> - - Reviewed by Ojan Vafai. - - Subpixel rendering always disabled for Chromium Linux - https://bugs.webkit.org/show_bug.cgi?id=42220 - - Honor Fontconfig subpixel rendering setting on Chromium Linux. - - * src/gtk/WebFontInfo.cpp: - (WebKit::WebFontInfo::renderStyleForStrike): - -2010-07-20 Darin Fisher <darin@chromium.org> - - Fix Chromium build bustage. - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::hasAuthenticationChallenge): Add - implementation of this method that always returns false. - -2010-07-20 Darin Fisher <darin@chromium.org> - - Reviewed by Jian Li. - - [Chromium] Add interface for downloading to a file. This can be used - in the future to support XMLHttpRequest.responseBlob, but it also - serves a use case in Chromium. - - https://bugs.webkit.org/show_bug.cgi?id=42657 - - * public/WebURLLoaderClient.h: - (WebKit::WebURLLoaderClient::willSendRequest): - (WebKit::WebURLLoaderClient::didSendData): - (WebKit::WebURLLoaderClient::didReceiveResponse): - (WebKit::WebURLLoaderClient::didDownloadData): - (WebKit::WebURLLoaderClient::didReceiveData): - (WebKit::WebURLLoaderClient::didFinishLoading): - (WebKit::WebURLLoaderClient::didFail): - * public/WebURLRequest.h: - * public/WebURLResponse.h: - * src/WebURLRequest.cpp: - (WebKit::WebURLRequest::downloadToFile): - (WebKit::WebURLRequest::setDownloadToFile): - * src/WebURLRequestPrivate.h: - (WebKit::WebURLRequestPrivate::WebURLRequestPrivate): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::downloadFilePath): - (WebKit::WebURLResponse::setDownloadFilePath): - * src/WebURLResponsePrivate.h: - -2010-07-20 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63750. - http://trac.webkit.org/changeset/63750 - https://bugs.webkit.org/show_bug.cgi?id=42648 - - This revision breaks the windows builds (Requested by - hwennborg on #webkit). - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - -2010-07-19 Victor Wang <victorw@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add webkit api reset to WebIDBDatabaseError and WebIDBKey - and refactor their destructors for chromium multi dll build. - - https://bugs.webkit.org/show_bug.cgi?id=42574 - - * public/WebIDBDatabaseError.h: - (WebKit::WebIDBDatabaseError::~WebIDBDatabaseError): - * public/WebIDBKey.h: - (WebKit::WebIDBKey::~WebIDBKey): - * src/WebIDBDatabaseError.cpp: - (WebKit::WebIDBDatabaseError::reset): - * src/WebIDBKey.cpp: - (WebKit::WebIDBKey::reset): - -2010-07-20 Hans Wennborg <hans@chromium.org> - - Reviewed by Steve Block. - - Runtime feature switch for device orientation - https://bugs.webkit.org/show_bug.cgi?id=42265 - - Add a runtime feature switch that decides whether device orientation - events are available or not. Defaults to true. - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDeviceOrientation): - (WebKit::WebRuntimeFeatures::isDeviceOrientationEnabled): - -2010-07-19 Victoria Kirst <vrk@google.com> - - Reviewed by David Levin. - - Updated WebMediaPlayer to support accelerated rendering and to - create and return a VideoChromiumLayer as its platform layer. - https://bugs.webkit.org/show_bug.cgi?id=42234 - - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::platformLayer): - (WebKit::WebMediaPlayerClientImpl::create): - * src/WebMediaPlayerClientImpl.h: - (WebKit::WebMediaPlayerClientImpl::supportsAcceleratedRendering): - -2010-07-19 Kenneth Russell <kbr@google.com> - - Reviewed by Nate Chapin. - - WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage - https://bugs.webkit.org/show_bug.cgi?id=34719 - - Fixed compiler warning introduced by original patch. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - -2010-07-19 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] refactor npapi plugin copy step - https://bugs.webkit.org/show_bug.cgi?id=42493 - - This is to avoid duplicate copy rules in the Linux make build. - - * WebKit.gyp: - * DEPS: 52483:52869 - -2010-07-19 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Live edit is not working in chromium. - https://bugs.webkit.org/show_bug.cgi?id=42572 - - * src/js/DebuggerScript.js: - -2010-07-16 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Pavel Feldman. - - [V8] Web Inspector: get actual breakpoint location from v8 and pass it - to ScripDebugServer. - https://bugs.webkit.org/show_bug.cgi?id=42452 - - * src/js/DebuggerScript.js: - -2010-07-17 John Gregg <johnnyg@google.com> - - Reviewed by Kent Tamura. - - [chromium] directory upload: pass the attribute up to the chrome client - https://bugs.webkit.org/show_bug.cgi?id=42475 - - This allows chromium to display the native system directory picker when - the directory attribute is present on the input element. - - * public/WebFileChooserParams.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::runOpenPanel): - -2010-07-16 Zhe Su <suzhe@chromium.org> - - Reviewed by Darin Adler. - - REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms - https://bugs.webkit.org/show_bug.cgi?id=42253 - - Implement EditorClient::willSetInputMethodState which replaces - setInputMethodState method. - - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::willSetInputMethodState): - (WebKit::EditorClientImpl::setInputMethodState): - * src/EditorClientImpl.h: - -2010-07-16 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] <input type=number> UI implementation for Windows - https://bugs.webkit.org/show_bug.cgi?id=42259 - - * public/WebThemeEngine.h: - (WebKit::WebThemeEngine::paintSpinButton): Added. - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::paintSpinButton): - Added. It calls WebThemeEngine::paintSpinButton(). - -2010-07-16 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Avoid crashing if offscreen GLES2 context creation fails - https://bugs.webkit.org/show_bug.cgi?id=42469 - - If creating or initializing an offscreen GLES2Context fails we should return null - rather than crashing or returning an invalid context. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::getOffscreenGLES2Context): - -2010-07-15 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Darin Fisher. - - Enable window.webkitPerformance (Web Timing) for chromium - https://bugs.webkit.org/show_bug.cgi?id=42313 - - * features.gypi: - -2010-07-16 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63551. - http://trac.webkit.org/changeset/63551 - https://bugs.webkit.org/show_bug.cgi?id=42460 - - "Problems with gyp" (Requested by yurys on #webkit). - - * DEPS: - -2010-07-16 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Bump up Chromium revision. - - * DEPS: - -2010-07-16 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: disable AppCache in chromium. - - https://bugs.webkit.org/show_bug.cgi?id=41858 - - * src/js/DevTools.js: - (WebInspector.loaded): - -2010-07-16 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: [Chromium] A non-existent resource is referenced from devTools.css - - The erroneous rule has been removed. - https://bugs.webkit.org/show_bug.cgi?id=42454 - - * src/js/devTools.css: - -2010-07-16 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Check that end node of a range has a valid renderer in WebViewImpl::caretOrSelectionBounds() - to avoid crash in Position::getInlineBoxAndOffset() when start node has renderer but end one doesn't. - https://bugs.webkit.org/show_bug.cgi?id=42449 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::caretOrSelectionBounds): - -2010-07-16 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Make JS memory stats available via 'Performance' object (Web Timing). - This statistics is populated only if 'WebKitMemoryInfoEnabled' - preference is set. - - 'console.memory' is kept until Web Timing object becomes visible by - default (currently it is hidden under compile-time flag). These stats - are guarded with the same preference. - - https://bugs.webkit.org/show_bug.cgi?id=41617 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setMemoryInfoEnabled): - * src/WebSettingsImpl.h: - -2010-07-15 Victor Wang <victorw@chromium.org> - - Reviewed by David Levin. - - [Chromium] Chromium webkit dll updates: - -. Fix WEBKIT_IMPLEMENTATION in WebCommon so - dllimport works as expected. - -. Update webkit.gyp so targets that depend on webkit - has correct macros defined. - - https://bugs.webkit.org/show_bug.cgi?id=42177 - - * WebKit.gyp: - * public/WebCommon.h: - -2010-07-13 Zhenyao Mo <zmo@google.com> - - Reviewed by Nate Chapin. - - WebGL rendering results must be made available to Canvas.toDataURL and 2D drawImage - https://bugs.webkit.org/show_bug.cgi?id=34719 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas): Implement paintRenderingResultsToCanvas(). - (WebCore::GraphicsContext3DInternal::beginPaint): Just use paintRenderingResultsToCanvas(). - -2010-07-15 Victor Wang <victorw@chromium.org> - - Reviewed by David Levin. - - Roll Chromium DEPS forward to r52483. - https://bugs.webkit.org/show_bug.cgi?id=42386 - - * DEPS: - -2010-07-15 Scott Violet <sky@chromium.org> - - Reviewed by David Levin. - - [chromium] WebViewClient::removeAutofillSuggestions is not passed the correct name - https://bugs.webkit.org/show_bug.cgi?id=42385 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): Use WebInputElement::nameForAutofill() instead of name. - -2010-07-15 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63446. - http://trac.webkit.org/changeset/63446 - https://bugs.webkit.org/show_bug.cgi?id=42412 - - It broke the Chromium Windows bot due to missing dependencies - there. (Requested by dave_levin on #webkit). - - * DEPS: - -2010-07-15 Victor Wang <victorw@chromium.org> - - Reviewed by David Levin. - - Roll Chromium DEPS forward to r52483. - https://bugs.webkit.org/show_bug.cgi?id=42386 - - * DEPS: - -2010-07-15 Michael Nordman <michaeln@google.com> - - Reviewed by Darin Fisher. - - WebKitAPI additions to support inspecting application caches. - https://bugs.webkit.org/show_bug.cgi?id=41993 - - * public/WebApplicationCacheHost.h: - (WebKit::WebApplicationCacheHost::CacheInfo::CacheInfo): - (WebKit::WebApplicationCacheHost::ResourceInfo::ResourceInfo): - (WebKit::WebApplicationCacheHost::getAssociatedCacheInfo): - (WebKit::WebApplicationCacheHost::getResourceList): - (WebKit::WebApplicationCacheHost::deleteAssociatedCacheGroup): - * public/WebApplicationCacheHostClient.h: - (WebKit::WebApplicationCacheHostClient::didChangeCacheAssociation): - * src/ApplicationCacheHostInternal.h: - (WebCore::ApplicationCacheHostInternal::didChangeCacheAssociation): - -2010-07-15 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: differentiate between blocking and connecting timers. - - https://bugs.webkit.org/show_bug.cgi?id=42372 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::connectionReused): - (WebKit::WebURLResponse::setConnectionReused): - -2010-07-15 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Fix mac compilation failure - https://bugs.webkit.org/show_bug.cgi?id=42344 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): - (WebKit::AutoFillPopupMenuClient::canRemoveSuggestionAtIndex): - -2010-07-14 George Yakovlev <georgey@chromium.org> - - Reviewed by Darin Fisher. - - Allow Chromium access to Select control choices - https://bugs.webkit.org/show_bug.cgi?id=41384 - - * WebKit.gyp: - * public/WebOptionElement.h: Added. - (WebKit::WebOptionElement::WebOptionElement): - (WebKit::WebOptionElement::operator=): - (WebKit::WebOptionElement::assign): - * public/WebSelectElement.h: - * src/WebOptionElement.cpp: Added. - (WebKit::WebOptionElement::setValue): - (WebKit::WebOptionElement::value): - (WebKit::WebOptionElement::index): - (WebKit::WebOptionElement::text): - (WebKit::WebOptionElement::defaultSelected): - (WebKit::WebOptionElement::setDefaultSelected): - (WebKit::WebOptionElement::label): - (WebKit::WebOptionElement::disabled): - (WebKit::WebOptionElement::WebOptionElement): - (WebKit::WebOptionElement::operator=): - (WebKit::WebOptionElement::operator PassRefPtr<HTMLOptionElement>): - * src/WebSelectElement.cpp: - (WebKit::WebSelectElement::listItems): - -2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63389. - http://trac.webkit.org/changeset/63389 - https://bugs.webkit.org/show_bug.cgi?id=42311 - - It broke the Chromium Linux build. (Requested by dave_levin on - #webkit). - - * DEPS: - * WebKit.gyp: - * public/WebCommon.h: - -2010-07-14 Scott Violet <sky@chromium.org> - - Reviewed by David Levin. - - [chromium] Autofill menu shows seperator at the wrong place when an entry is deleted - https://bugs.webkit.org/show_bug.cgi?id=42210 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): Updates internal data appropriately. - (WebKit::AutoFillPopupMenuClient::canRemoveSuggestionAtIndex): Now called before removal to see if can remove. - * src/AutoFillPopupMenuClient.h: Fixed whitespace and added method. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): Added call to canRemoveSuggestionAtIndex. - -2010-07-14 James Robinson <jamesr@chromium.org> - - Unreviewed. Compile fix, initialization/declaration order mismatch. - - * src/GLES2ContextInternal.h: - -2010-07-14 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - [chromium] don't restrict the width of the autofill popup. - https://bugs.webkit.org/show_bug.cgi?id=42206 - - * src/WebViewImpl.cpp: - -2010-07-14 Victor Wang <victorw@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Chromium webkit dll updates: - -. Fix WEBKIT_IMPLEMENTATION in WebCommon so - dllimport works as expected. - -. Update webkit.gyp so targets that depend on webkit - has correct macros defined. - -. Roll forward chromium deps to r52273. - - https://bugs.webkit.org/show_bug.cgi?id=42177 - - * DEPS: - * WebKit.gyp: - * public/WebCommon.h: - -2010-07-14 James Hawkins <jhawkins@chromium.org> - - UNREVIEWED Build Fix. - - Fix a typo. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::applyAutoFillSuggestions): - -2010-07-14 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - Breaks all dependencies on Page from platform/ and cleans up GLES2Context lifetime - https://bugs.webkit.org/show_bug.cgi?id=42203 - - Rather than constructing a GLES2Context from a Page, pass the LayerRendererChromium - a GLES2Context in from the constructor. This way the platform/ directory can remain - ignorant of Page and friends. Also adds functions on ChromeClientChromium to request - onscreen and offscreen GLES2Contexts for callers in WebCore that need them. - - * WebKit.gyp: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::getOnscreenGLES2Context): - (WebKit::ChromeClientImpl::getOffscreenGLES2Context): - * src/ChromeClientImpl.h: - * src/GLES2Context.cpp: - (WebCore::GLES2ContextInternal::create): - (WebCore::GLES2Context::create): - (WebCore::GLES2Context::GLES2Context): - * src/GLES2ContextInternal.cpp: Added. - (WebCore::GLES2ContextInternal::~GLES2ContextInternal): - * src/GLES2ContextInternal.h: Added. - (WebCore::GLES2ContextInternal::getWebGLES2Context): - (WebCore::GLES2ContextInternal::GLES2ContextInternal): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::getOnscreenGLES2Context): - (WebKit::WebViewImpl::getOffscreenGLES2Context): - * src/WebViewImpl.h: - -2010-07-14 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Use the unique ID instead of the profile label to identify - the accepted AutoFill suggestion. - https://bugs.webkit.org/show_bug.cgi?id=42301 - - * public/WebView.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::didAcceptAutoFillSuggestion): - (WebKit::WebViewClient::didSelectAutoFillSuggestion): - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::valueChanged): - (WebKit::AutoFillPopupMenuClient::selectionChanged): - (WebKit::AutoFillPopupMenuClient::initialize): - (WebKit::AutoFillPopupMenuClient::setSuggestions): - (WebKit::AutoFillPopupMenuClient::textFieldStyle): - * src/AutoFillPopupMenuClient.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-07-14 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - Don't notify the WebView that the popup has been closed when the - selection is cleared, as the popup is not gone and would linger - as a ghost popup. - https://bugs.webkit.org/show_bug.cgi?id=42180 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::selectionCleared): - -2010-07-14 Sam Weinig <sam@webkit.org> - - Fix the chromium mac build. - - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::setCursor): - -2010-07-14 Sam Weinig <sam@webkit.org> - - Reviewed by Darin Adler. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=42232 - Make changing Cursors work in WebKit2. - - * src/ChromeClientImpl.h: - (WebKit::ChromeClientImpl::setCursor): - Change prototype to match new one. - - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::setCursor): - * src/WebPopupMenuImpl.h: - Add empty setCursor function to satisfy the HostWindow interface. - -2010-07-13 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=42201 - Use ResourceHandle object for synchronous loading - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::request): - This method is no longer const in cross-platform code, and is called firstRequest. - -2010-07-14 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63305. - http://trac.webkit.org/changeset/63305 - https://bugs.webkit.org/show_bug.cgi?id=42256 - - "debugger-breakpoints-not-activated-on-reload.html fails on - GTK" (Requested by yurys on #webkit). - - * src/js/DebuggerScript.js: - (): - -2010-07-14 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: remove v8 debugger code that doesn't use ScriptDebugServer - https://bugs.webkit.org/show_bug.cgi?id=42164 - - * WebKit.gypi: - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::windowObjectCleared): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::~WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::didNavigate): - (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): - * src/js/DebuggerAgent.js: Removed. - * src/js/DevTools.js: - (devtools.ToolsAgent): - (WebInspector.loaded): - * src/js/DevToolsHostStub.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - * src/js/Tests.js: - (.TestSuite.prototype.testAutoContinueOnSyntaxError): - (.TestSuite.prototype.testExpandScope.examineScopes): - (.TestSuite.prototype.testExpandScope): - (.TestSuite.prototype.testDebugIntrinsicProperties): - -2010-07-14 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Yury Semikhatsky. - - WebInspector: Clean-up InspectorBackend code. In the next changes - InspectorBackend content will be generated by scripts. As far as - generator is very simple thing all nontrivial function should be - moved to InspectorController and DOMAgent. - https://bugs.webkit.org/show_bug.cgi?id=42171 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (.devtools.InspectorBackendImpl.prototype.pause): - (.devtools.InspectorBackendImpl.prototype.resume): - (.devtools.InspectorBackendImpl.prototype.stepIntoStatement): - (.devtools.InspectorBackendImpl.prototype.stepOutOfFunction): - (.devtools.InspectorBackendImpl.prototype.stepOverStatement): - (else.devtools.InspectorBackendImpl.prototype.pause): - -2010-07-14 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: if breakpoints were deactivated, add new breakpoints as disabled. - https://bugs.webkit.org/show_bug.cgi?id=41461 - - * src/js/DebuggerScript.js: - (): - -2010-07-14 Kent Tamura <tkent@chromium.org> - - Unreviewed, 2nd attempt to fix build on 'Webkit.org Reliability Builder'. - - * WebKit.gyp: - -2010-07-14 Kent Tamura <tkent@chromium.org> - - Unreviewed, attempt to fix build on 'Webkit.org Reliability Builder'. - - * WebKit.gyp: - -2010-07-14 Kent Tamura <tkent@chromium.org> - - Reviewed by David Levin. - - [Chromium] Upstreaming inspector_resources target - https://bugs.webkit.org/show_bug.cgi?id=41669 - - 'inspector_resource' is currently in src/webkit/webkit.gyp of - Chromium tree. We move it to WebKit tree because: - - DumpRenderTree in WebKit tree needs it, and - - It's hard to refer to WebKit.gypi and WebCore.gypi from - webkit_support in both cases of Chromium-tree build and - WebKit-tree build. - - * WebKit.gyp: - -2010-07-13 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Linux implementation of <input type=number> UI - https://bugs.webkit.org/show_bug.cgi?id=41925 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setScrollbarColors): - Call PlatformThemeChromiumGtk::setScrollbarColors() instead of - RenderThemeChromiumLinux::setScrollbarColors(). - -2010-07-13 Chris Guillory <chris.guillory@google.com> - - Reviewed by David Levin. - - Fix adoptRef usage violation in WebAccessibilityCacheImpl.cpp. - https://bugs.webkit.org/show_bug.cgi?id=42092 - - * src/WebAccessibilityCacheImpl.cpp: - (WebKit::WebAccessibilityCacheImpl::WeakHandle::create): - (WebKit::WebAccessibilityCacheImpl::WeakHandle::WeakHandle): - -2010-07-13 Albert J. Wong <ajwong@chromium.org> - - Unreviewed, build fix. - - [chromium] The comparision between signed/unsigned breaks the chromium - mac build. - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getSuggestion): - (WebKit::AutoFillPopupMenuClient::getLabel): - -2010-07-10 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Implement bufferData and bufferSubData with ArrayBuffer as input - https://bugs.webkit.org/show_bug.cgi?id=41884 - - * src/GraphicsContext3D.cpp: Implement bufferData and bufferSubData with ArrayBuffer as input. - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - -2010-07-10 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Need to emulate MAX_VARYING_VECTORS/MAX_FRAGMENT_UNIFORM_VECTORs/MAX_VERTEX_UNIFORM_VECTORS for glGet - https://bugs.webkit.org/show_bug.cgi?id=42032 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Emulate the enums. - -2010-07-13 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: catch and log JS exceptions resulting from executing a - script on inspector front-end to prevent renderer from crashing. - https://bugs.webkit.org/show_bug.cgi?id=42157 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::executeScript): - -2010-07-13 Kent Tamura <tkent@chromium.org> - - Unreviewed, build fix. - - Fix a build error by r63179 for Chromium. - - * tests/PopupMenuTest.cpp: - (WebKit::TestPopupMenuClient::itemLabel): Added. - -2010-07-12 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Kent Tamura. - - Making the autofill popup use labels to show the label - associated with an item. - https://bugs.webkit.org/show_bug.cgi?id=41964 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getSuggestion): - (WebKit::AutoFillPopupMenuClient::getLabel): - (WebKit::AutoFillPopupMenuClient::itemLabel): - (WebKit::AutoFillPopupMenuClient::setSuggestions): - (WebKit::AutoFillPopupMenuClient::convertListIndexToInternalIndex): - * src/AutoFillPopupMenuClient.h: - -2010-07-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63171. - http://trac.webkit.org/changeset/63171 - https://bugs.webkit.org/show_bug.cgi?id=42144 - - Broke Chromium canary (Requested by tkent on #webkit). - - * WebKit.gyp: - -2010-07-12 Kent Tamura <tkent@chromium.org> - - Reviewed by David Levin. - - [Chromium] Upstreaming inspector_resources target - https://bugs.webkit.org/show_bug.cgi?id=41669 - - 'inspector_resource' is currently in src/webkit/webkit.gyp of - Chromium tree. We move it to WebKit tree because: - - DumpRenderTree in WebKit tree needs it, and - - It's hard to refer to WebKit.gypi and WebCore.gypi from - webkit_support in both cases of Chromium-tree build and - WebKit-tree build. - - * WebKit.gyp: - -2010-07-12 Viet-Trung Luu <viettrungluu@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Pass key down events on to plugins. - https://bugs.webkit.org/show_bug.cgi?id=42113 - - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - -2010-07-12 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Joseph Pecoraro. - - Web Inspector: provide starts and ends for network phases instead of duration. - - https://bugs.webkit.org/show_bug.cgi?id=42091 - - * public/WebURLLoadTiming.h: - * public/WebURLResponse.h: - * src/WebURLLoadTiming.cpp: - (WebKit::WebURLLoadTiming::proxyStart): - (WebKit::WebURLLoadTiming::setProxyStart): - (WebKit::WebURLLoadTiming::proxyEnd): - (WebKit::WebURLLoadTiming::setProxyEnd): - (WebKit::WebURLLoadTiming::dnsStart): - (WebKit::WebURLLoadTiming::setDNSStart): - (WebKit::WebURLLoadTiming::dnsEnd): - (WebKit::WebURLLoadTiming::setDNSEnd): - (WebKit::WebURLLoadTiming::connectStart): - (WebKit::WebURLLoadTiming::setConnectStart): - (WebKit::WebURLLoadTiming::connectEnd): - (WebKit::WebURLLoadTiming::setConnectEnd): - (WebKit::WebURLLoadTiming::sendStart): - (WebKit::WebURLLoadTiming::setSendStart): - (WebKit::WebURLLoadTiming::sendEnd): - (WebKit::WebURLLoadTiming::setSendEnd): - (WebKit::WebURLLoadTiming::receiveHeadersStart): - (WebKit::WebURLLoadTiming::setReceiveHeadersStart): - (WebKit::WebURLLoadTiming::receiveHeadersEnd): - (WebKit::WebURLLoadTiming::setReceiveHeadersEnd): - (WebKit::WebURLLoadTiming::sslStart): - (WebKit::WebURLLoadTiming::setSSLStart): - (WebKit::WebURLLoadTiming::sslEnd): - (WebKit::WebURLLoadTiming::setSSLEnd): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasCached): - (WebKit::WebURLResponse::setWasCached): - -2010-07-12 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r63156. - http://trac.webkit.org/changeset/63156 - https://bugs.webkit.org/show_bug.cgi?id=42129 - - broke chromium compile (Requested by jamesr on #webkit). - - * WebKit.gyp: - * public/WebAccessibilityObject.h: - * public/WebAttribute.h: Removed. - * public/WebDocumentType.h: Removed. - * public/WebElement.h: - * public/WebNamedNodeMap.h: Removed. - * public/WebNode.h: - * public/WebRenderStyle.h: Removed. - * src/WebAccessibilityObject.cpp: - * src/WebAttribute.cpp: Removed. - * src/WebDocumentType.cpp: Removed. - * src/WebElement.cpp: - * src/WebNamedNodeMap.cpp: Removed. - * src/WebNode.cpp: - * src/WebRenderStyle.cpp: Removed. - -2010-07-12 Dominic Mazzoni <dmazzoni@google.com> - - Reviewed by Darin Fisher. - - Add methods to WebAccessibilityObject to access the Node and - Document, and then add methods to access some document, node, - and element properties needed for Windows accessibility. - - https://bugs.webkit.org/show_bug.cgi?id=41569 - - * WebKit.gyp: - * public/WebAccessibilityObject.h: - * public/WebAttribute.h: Added. - (WebKit::WebAttribute::~WebAttribute): - (WebKit::WebAttribute::WebAttribute): - (WebKit::WebAttribute::operator=): - * public/WebDocumentType.h: Added. - (WebKit::WebDocumentType::WebDocumentType): - (WebKit::WebDocumentType::operator=): - (WebKit::WebDocumentType::assign): - * public/WebElement.h: - * public/WebNamedNodeMap.h: Added. - (WebKit::WebNamedNodeMap::~WebNamedNodeMap): - (WebKit::WebNamedNodeMap::WebNamedNodeMap): - (WebKit::WebNamedNodeMap::operator=): - * public/WebNode.h: - * public/WebRenderStyle.h: Added. - (WebKit::WebRenderStyle::~WebRenderStyle): - (WebKit::WebRenderStyle::WebRenderStyle): - (WebKit::WebRenderStyle::operator=): - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::node): - (WebKit::WebAccessibilityObject::document): - * src/WebAttribute.cpp: Added. - (WebKit::WebAttribute::reset): - (WebKit::WebAttribute::assign): - (WebKit::WebAttribute::WebAttribute): - (WebKit::WebAttribute::localName): - (WebKit::WebAttribute::value): - * src/WebDocumentType.cpp: Added. - (WebKit::WebDocumentType::name): - (WebKit::WebDocumentType::WebDocumentType): - (WebKit::WebDocumentType::operator=): - (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>): - * src/WebElement.cpp: - (WebKit::WebElement::attributes): - * src/WebNamedNodeMap.cpp: Added. - (WebKit::WebNamedNodeMap::reset): - (WebKit::WebNamedNodeMap::assign): - (WebKit::WebNamedNodeMap::WebNamedNodeMap): - (WebKit::WebNamedNodeMap::length): - (WebKit::WebNamedNodeMap::attributeItem): - * src/WebNode.cpp: - (WebKit::WebNode::element): - (WebKit::WebNode::hasComputedStyle): - (WebKit::WebNode::computedStyle): - * src/WebRenderStyle.cpp: Added. - (WebKit::WebRenderStyle::reset): - (WebKit::WebRenderStyle::assign): - (WebKit::WebRenderStyle::WebRenderStyle): - (WebKit::WebRenderStyle::display): - -2010-07-12 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Yury Semikhatsky. - - [Chromium] Crash when stepping on a breakpoint while debugging Web Inspector - https://bugs.webkit.org/show_bug.cgi?id=41958 - - * src/WebViewImpl.cpp: - (WebKit::WebView::willEnterModalLoop): - (WebKit::WebView::didExitModalLoop): - -2010-07-12 Jeremy Orlow <jorlow@chromium.org> - - Speculative fix for visual studio retardedness. - - * public/WebCommon.h: - -2010-07-12 Jeremy Orlow <jorlow@chromium.org> - - Build fix. Add an include. - - * public/WebCommon.h: - -2010-06-27 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Dumitru Daniliuc. - - Implement IDBObjectStore.get/set/remove - https://bugs.webkit.org/show_bug.cgi?id=41250 - - Plumbing for new features, IDBKey, and added support - for both invalid (i.e. not serializable) and null - (i.e. the RefPtr was 0) to SerializedScriptValue. - - * WebKit.gyp: - * public/WebIDBCallbacks.h: - (WebKit::WebIDBCallbacks::onSuccess): - * public/WebIDBKey.h: Added. - (WebKit::WebIDBKey::WebIDBKey): - (WebKit::WebIDBKey::operator=): - (WebKit::WebIDBKey::): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::get): - (WebKit::WebIDBObjectStore::set): - (WebKit::WebIDBObjectStore::remove): - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::index): - (WebKit::WebIDBObjectStore::removeIndex): - * public/WebSerializedScriptValue.h: - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::get): - (WebCore::IDBObjectStoreProxy::set): - (WebCore::IDBObjectStoreProxy::remove): - * src/IDBObjectStoreProxy.h: - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: - * src/WebIDBKey.cpp: Added. - (WebKit::WebIDBKey::~WebIDBKey): - (WebKit::WebIDBKey::createNull): - (WebKit::WebIDBKey::createInvalid): - (WebKit::WebIDBKey::assign): - (WebKit::WebIDBKey::assignNull): - (WebKit::WebIDBKey::assignInvalid): - (WebKit::WebIDBKey::type): - (WebKit::WebIDBKey::string): - (WebKit::WebIDBKey::number): - (WebKit::WebIDBKey::WebIDBKey): - (WebKit::WebIDBKey::operator=): - (WebKit::WebIDBKey::operator PassRefPtr<IDBKey>): - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::get): - (WebKit::WebIDBObjectStoreImpl::set): - (WebKit::WebIDBObjectStoreImpl::remove): - * src/WebIDBObjectStoreImpl.h: - * src/WebSerializedScriptValue.cpp: - (WebKit::WebSerializedScriptValue::createInvalid): - -2010-07-09 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Take out WebPlugin::supportsFind since we can accomplish the same thing by having a return value on startFind - https://bugs.webkit.org/show_bug.cgi?id=42011 - - * public/WebPlugin.h: - (WebKit::WebPlugin::startFind): - -2010-07-09 Leon Clarke <leonclarke@google.com> - - Reviewed by Adam Barth. - - add support for link prefetching - https://bugs.webkit.org/show_bug.cgi?id=3652 - - * public/WebURLRequest.h: - (WebKit::WebURLRequest::): - -2010-07-09 Michael Nordman <michaeln@google.com> - - Reviewed by Dumitru Daniliuc. - - Use class ProgressEvent when raising appcache related progress events and - set the 'total', 'loaded', and 'lengthComputable' attributes. - Also raise the final progress event with the 'total' and 'loaded' attribute - values are equal to one another to keep pace with the spec for this feature. - https://bugs.webkit.org/show_bug.cgi?id=37602 - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): - (WebCore::ApplicationCacheHost::stopDeferringEvents): - (WebCore::ApplicationCacheHost::dispatchDOMEvent): - * src/ApplicationCacheHostInternal.h: - (WebCore::ApplicationCacheHostInternal::notifyEventListener): - (WebCore::ApplicationCacheHostInternal::notifyProgressEventListener): - -2010-07-09 David Holloway <dhollowa@chromium.org> - - Reviewed by Dimitri Glazkov. - - Roll Chromium DEPS forward to r51736. - https://bugs.webkit.org/show_bug.cgi?id=41867 - - * DEPS: - -2010-07-09 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: chromium build fix. - - * public/WebGLES2Context.h: - -2010-07-09 Yael Aharon <yael.aharon@nokia.com> - - Reviewed by Laszlo Gombos. - - NotificationPresenter needs a cancelRequestPermission API - https://bugs.webkit.org/show_bug.cgi?id=41783 - - Updated the NotificationPresenter API. - - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::checkPermission): - (WebKit::NotificationPresenterImpl::requestPermission): - * src/NotificationPresenterImpl.h: - (WebKit::NotificationPresenterImpl::cancelRequestsForPermission): - -2010-07-08 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Provide detailed network info in the resources panel. - - https://bugs.webkit.org/show_bug.cgi?id=40227 - - * WebKit.gyp: - * public/WebDevToolsAgent.h: - * public/WebURLLoadTiming.h: Added. - (WebKit::WebURLLoadTiming::~WebURLLoadTiming): - (WebKit::WebURLLoadTiming::WebURLLoadTiming): - (WebKit::WebURLLoadTiming::operator=): - (WebKit::WebURLLoadTiming::isNull): - * public/WebURLRequest.h: - * public/WebURLResponse.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::willSendRequest): - * src/WebDevToolsAgentImpl.h: - * src/WebURLLoadTiming.cpp: Added. - (WebKit::WebURLLoadTiming::initialize): - (WebKit::WebURLLoadTiming::reset): - (WebKit::WebURLLoadTiming::assign): - (WebKit::WebURLLoadTiming::setDomainLookupTimes): - (WebKit::WebURLLoadTiming::setConnectStartTime): - (WebKit::WebURLLoadTiming::setRequestTimes): - (WebKit::WebURLLoadTiming::setHeadersAvailableTime): - (WebKit::WebURLLoadTiming::WebURLLoadTiming): - (WebKit::WebURLLoadTiming::operator=): - (WebKit::WebURLLoadTiming::operator PassRefPtr<ResourceLoadTiming>): - * src/WebURLRequest.cpp: - (WebKit::WebURLRequest::reportLoadTiming): - (WebKit::WebURLRequest::setReportLoadTiming): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::setConnectionID): - (WebKit::WebURLResponse::setLoadTiming): - -2010-07-08 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Exposing the EditorClient text field related methods - to the WebViewClient. Also adding some more accessors methods - to the WebNode and WebInputElement. - This is needed to move the password autocomplete out of the - Chromium WebKit API to the Chromium code. - https://bugs.webkit.org/show_bug.cgi?id=41286 - - * public/WebInputElement.h: - * public/WebNode.h: - (WebKit::operator!=): - (WebKit::operator<): - * public/WebViewClient.h: - (WebKit::WebViewClient::textFieldDidBeginEditing): - (WebKit::WebViewClient::textFieldDidEndEditing): - (WebKit::WebViewClient::textDidChangeInTextField): - (WebKit::WebViewClient::textFieldHandlingKeyDown): - (WebKit::WebViewClient::didAcceptAutocompleteSuggestion): - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::textFieldDidBeginEditing): - (WebKit::EditorClientImpl::textFieldDidEndEditing): - (WebKit::EditorClientImpl::textDidChangeInTextField): - (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted): - (WebKit::EditorClientImpl::doTextFieldCommandFromEvent): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::readOnly): - (WebKit::WebInputElement::setSelectionRange): - (WebKit::WebInputElement::selectionStart): - (WebKit::WebInputElement::selectionEnd): - * src/WebNode.cpp: - (WebKit::WebNode::lessThan): - -2010-07-08 Aaron Boodman <aa@chromium.org> - - Reviewed by Timothy Hatcher. - - Add the ability for user scripts and user styles to affect just the top frame. - - https://bugs.webkit.org/show_bug.cgi?id=41529 - - * public/WebView.h: - (WebKit::WebView::): - (WebKit::WebView::addUserScript): - (WebKit::WebView::addUserStyleSheet): - * src/AssertMatchingEnums.cpp: - * src/WebViewImpl.cpp: - (WebKit::WebView::addUserScript): - (WebKit::WebView::addUserStyleSheet): - -2010-07-08 James Robinson <jamesr@google.com> - - Reviewed by Darin Fisher. - - Allow resizing and getting the texture ID from an offscreen GLES2Context - https://bugs.webkit.org/show_bug.cgi?id=41828 - - When using an offscreen GLES2Context the caller needs to be able to resize the backing store - managed by the embedder and get access to a texture id to pass to the compositor. WebGL - does these actions in an indirect way, it will be refactored to use this path. - - * public/WebGLES2Context.h: - * src/GLES2Context.cpp: - (WebCore::GLES2Context::resizeOffscreenContent): - (WebCore::GLES2Context::getOffscreenContentParentTextureId): - -2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> - - Reviewed by Pavel Feldman. - - [chromium] Fix deletion has begun assert in TestWebPopupMenuImpl. - https://bugs.webkit.org/show_bug.cgi?id=41899 - - * tests/PopupMenuTest.cpp: - (WebKit::TestWebPopupMenuImpl::create): - (WebKit::TestWebViewClient::TestWebViewClient): - (WebKit::TestWebViewClient::createPopupMenu): - -2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> - - Reviewed by Pavel Feldman. - - [chromium] Fix deletion has begun assertion in TestImage destructor. - https://bugs.webkit.org/show_bug.cgi?id=41883 - - * tests/DragImageTest.cpp: - (WebCore::TestImage::create): - (WebCore::TEST): - -2010-07-08 Vitaly Repeshko <vitalyr@chromium.org> - - Reviewed by Pavel Feldman. - - Fix adoptRef usage violations (mostly in chromium) - https://bugs.webkit.org/show_bug.cgi?id=41863 - - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::create): - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenu::create): - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - -2010-07-07 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Crash when re-entering message loop - - Allow re-entrancy of the message loop by tracking all suspended pages - through a PageGroupLoadDeferrer stack. - https://bugs.webkit.org/show_bug.cgi?id=41697 - - * src/WebViewImpl.cpp: - (WebKit::WebView::willEnterModalLoop): - (WebKit::WebView::didExitModalLoop): - * src/js/Tests.js: - (.TestSuite.prototype.evaluateInConsole_): - (.TestSuite.prototype.testCompletionOnPause): - (.TestSuite.prototype.testMessageLoopReentrant.this): - -2010-07-08 David Holloway <dhollowa@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for - use by other code in WebKit/chromium/src. - - Specific use of these methods is made in WebFrameImpl.cpp. This is - preferred to the cast operator call that was happening prior to this - change. - - https://bugs.webkit.org/show_bug.cgi?id=41477 - - * public/WebNode.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::registerPasswordListener): - (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): - (WebKit::WebFrameImpl::getPasswordListener): - * src/WebFrameImpl.h: - -2010-07-07 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: convert script offset to webkit format - https://bugs.webkit.org/show_bug.cgi?id=41755 - - * src/js/DebuggerScript.js: - (): - -2010-07-07 Kent Tamura <tkent@chromium.org> - - Reviewed by Adam Barth. - - [DRT/Chromium] DumpRenderTree should depend on ImageDiff - https://bugs.webkit.org/show_bug.cgi?id=41749 - - We usually use DumpRenderTree with ImageDiff. So ImageDiff should - be built with DumpRenderTree. Without this change, ImageDiff is not - built in a case of Chromium tree build. - test_shell in Chromium tree also depends on image_diff. - - * WebKit.gyp: - -2010-07-07 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add a few more methods to WebPlugin so that Pepper v2 plugins can support copy/zoom/find - https://bugs.webkit.org/show_bug.cgi?id=41649 - - * public/WebPlugin.h: - (WebKit::WebPlugin::hasSelection): - (WebKit::WebPlugin::selectionAsText): - (WebKit::WebPlugin::selectionAsMarkup): - (WebKit::WebPlugin::setZoomFactor): - (WebKit::WebPlugin::supportsFind): - (WebKit::WebPlugin::startFind): - (WebKit::WebPlugin::selectFindResult): - (WebKit::WebPlugin::stopFind): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::pluginContainerFromFrame): - (WebKit::ChromePluginPrintContext::end): - (WebKit::ChromePluginPrintContext::computePageRects): - (WebKit::ChromePluginPrintContext::spoolPage): - (WebKit::WebFrameImpl::executeCommand): - * src/WebFrameImpl.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::copy): - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - * src/WebPluginContainerImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-07-07 James Hawkins <jhawkins@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Add setSuggestedValue to WebInputElement - https://bugs.webkit.org/show_bug.cgi?id=41785 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::setSuggestedValue): - (WebKit::WebInputElement::suggestedValue): - -2010-07-07 James Robinson <jamesr@chromium.org> and Vincent Scheib <schieb@chromium.org> - - Reviewed by Dimitri Glazkov. - - WebCore::GLES2Context should allow creating onscreen and offscreen contexts - https://bugs.webkit.org/show_bug.cgi?id=41492 - - You should be able to create a GLES2Context for rendering both on screen - and off screen (to a texture). Currently WebGL does the latter by side - stepping the WebCore::GLES2Context API completely. Longer term it should - move over to using this. - - * src/GLES2Context.cpp: - (WebCore::GLES2ContextInternal::initializeOnscreen): - (WebCore::GLES2ContextInternal::initializeOffscreen): - (WebCore::GLES2Context::createOnscreen): - (WebCore::GLES2Context::createOffscreen): - -2010-07-07 Sam Weinig <sam@webkit.org> - - Reviewed by Anders Carlsson. - - Patch for https://bugs.webkit.org/show_bug.cgi?id=41772 - Add basic piping for BackForwardControllerClient. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2010-07-07 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r62645. - http://trac.webkit.org/changeset/62645 - https://bugs.webkit.org/show_bug.cgi?id=41757 - - "Broken inspector tests on several platforms" (Requested by - eseidel on #webkit). - - * src/js/DebuggerScript.js: - (): - -2010-07-07 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: if breakpoints were deactivated, add new breakpoints as disabled. - https://bugs.webkit.org/show_bug.cgi?id=41461 - - * src/js/DebuggerScript.js: - (): - -2010-07-06 Darin Adler <darin@apple.com> - - Try to fix build. - - Why do the Chromium bots stop after the first error they encounter? - - * src/WebWorkerImpl.cpp: - (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): Removed - unneeded release called on a PassOwnPtr to pass it as an argument of - type PassOwnPtr. - -2010-07-06 Darin Adler <darin@apple.com> - - Try to fix build. - - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::dispatchTaskToMainThread): Use leakPtr instead - of release. - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): Removed - unneeded release called on a PassOwnPtr to pass it as an argument of - type PassOwnPtr. - -2010-07-06 Darin Adler <darin@apple.com> - - Try to fix build. - - * src/WebSharedWorkerImpl.cpp: - (WebKit::WebSharedWorkerImpl::connectTask): Removed unneeded release - called on a PassOwnPtr to pass it as an argument of type PassOwnPtr. - -2010-07-06 Darin Adler <darin@apple.com> - - Try to fix build. - - * src/WebDataSourceImpl.cpp: - (WebKit::WebDataSourceImpl::setNextPluginLoadObserver): Call leakPtr - here instead of release. Comment makes it really unclear why it's OK! - -2010-07-06 Darin Adler <darin@apple.com> - - Try to fix build. - - * src/SharedWorkerRepository.cpp: - (WebCore::SharedWorkerRepository::connect): Removed unneeded release - called on a PassOwnPtr to pass it as an argument of type PassOwnPtr. - -2010-07-05 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - [v8] Web Inspector: remove v8-specific code dealing with getOwnPropertyNames from InjectedScript.js - https://bugs.webkit.org/show_bug.cgi?id=41595 - - * src/js/DebuggerScript.js: - -2010-07-03 Erik Arvidsson <arv@chromium.org> - - Reviewed by Ojan Vafai. - - Fix issue where a contextmenu event was reporting the wrong target - if the context menu was shown due to pressing the context menu key - (or Shift+F10). - - https://bugs.webkit.org/show_bug.cgi?id=38129 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::sendContextMenuEvent): - -2010-07-02 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute - https://bugs.webkit.org/show_bug.cgi?id=41511 - - * src/WebBindings.cpp: - (WebKit::getEvent): - -2010-07-01 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r62349. - http://trac.webkit.org/changeset/62349 - https://bugs.webkit.org/show_bug.cgi?id=41499 - - It broke the chromium Linux build. (Requested by dave_levin on - #webkit). - - * public/WebNode.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::registerPasswordListener): - (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): - -2010-07-01 David Holloway <dhollowa@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for - use by other code in WebKit/chromium/src. - - Specific use of these methods is made in WebFrameImpl.cpp. This is - preferred to the cast operator call that was happening prior to this - change. - - https://bugs.webkit.org/show_bug.cgi?id=41477 - - * public/WebNode.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::registerPasswordListener): - (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): - -2010-07-01 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Stop linking against opengl32.lib in Windows Chromium port - https://bugs.webkit.org/show_bug.cgi?id=41424 - - * WebKit.gyp: - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): - * src/WebGraphicsContext3DDefaultImpl.h: - -2010-07-01 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r62246. - http://trac.webkit.org/changeset/62246 - https://bugs.webkit.org/show_bug.cgi?id=41470 - - "Worker tests are broken in Chromium" (Requested by yurys on - #webkit). - - * src/WebBindings.cpp: - (WebKit::getEvent): - -2010-07-01 David Holloway <dhollowa@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Consolidates AutoFill and Autocomplete popup menus into a single popup menu. - - This change combines SuggestionsPopupMenuClient, AutoFillPopupMenuClient, and - AutocompletePopupMenuClient classes into a single consolidated AutoFillPopupMenuClient class. - Prior to this change the contents of the AutoFill popup menu only included AutoFill - suggestions and similarly the Autocomplete popup menu only included Autocomplete - suggestions. With this consolidation, both AutoFill and Autocomplete suggestions can - now be displayed in a single menu. - - https://bugs.webkit.org/show_bug.cgi?id=41236 - - * WebKit.gyp: - * public/WebFrame.h: - * public/WebView.h: - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient): - (WebKit::AutoFillPopupMenuClient::~AutoFillPopupMenuClient): - (WebKit::AutoFillPopupMenuClient::valueChanged): - (WebKit::AutoFillPopupMenuClient::selectionCleared): - (WebKit::AutoFillPopupMenuClient::itemText): - (WebKit::AutoFillPopupMenuClient::itemStyle): - (WebKit::AutoFillPopupMenuClient::menuStyle): - (WebKit::AutoFillPopupMenuClient::clientPaddingLeft): - (WebKit::AutoFillPopupMenuClient::clientPaddingRight): - (WebKit::AutoFillPopupMenuClient::popupDidHide): - (WebKit::AutoFillPopupMenuClient::setTextFromItem): - (WebKit::AutoFillPopupMenuClient::fontSelector): - (WebKit::AutoFillPopupMenuClient::hostWindow): - (WebKit::AutoFillPopupMenuClient::createScrollbar): - (WebKit::AutoFillPopupMenuClient::initialize): - (WebKit::AutoFillPopupMenuClient::getWebView): - (WebKit::AutoFillPopupMenuClient::textFieldStyle): - * src/AutoFillPopupMenuClient.h: - (WebKit::AutoFillPopupMenuClient::itemToolTip): - (WebKit::AutoFillPopupMenuClient::itemAccessibilityText): - (WebKit::AutoFillPopupMenuClient::itemIsEnabled): - (WebKit::AutoFillPopupMenuClient::clientInsetLeft): - (WebKit::AutoFillPopupMenuClient::clientInsetRight): - (WebKit::AutoFillPopupMenuClient::listSize): - (WebKit::AutoFillPopupMenuClient::selectedIndex): - (WebKit::AutoFillPopupMenuClient::itemIsLabel): - (WebKit::AutoFillPopupMenuClient::itemIsSelected): - (WebKit::AutoFillPopupMenuClient::shouldPopOver): - (WebKit::AutoFillPopupMenuClient::valueShouldChangeOnHotTrack): - (WebKit::AutoFillPopupMenuClient::setAutocompleteMode): - (WebKit::AutoFillPopupMenuClient::getTextField): - (WebKit::AutoFillPopupMenuClient::getSelectedIndex): - (WebKit::AutoFillPopupMenuClient::setSelectedIndex): - * src/AutocompletePopupMenuClient.cpp: Removed. - * src/AutocompletePopupMenuClient.h: Removed. - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::textFieldDidEndEditing): - (WebKit::EditorClientImpl::doAutofill): - (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted): - * src/SuggestionsPopupMenuClient.cpp: Removed. - * src/SuggestionsPopupMenuClient.h: Removed. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::currentHistoryItem): - (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): - * src/WebFrameImpl.h: - * src/WebViewImpl.cpp: - (WebKit::): - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::mouseUp): - (WebKit::WebViewImpl::selectPopupHandleKeyEvent): - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): - (WebKit::WebViewImpl::hideAutoFillPopup): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - (WebKit::WebViewImpl::hidePopups): - (WebKit::WebViewImpl::refreshAutoFillPopup): - * src/WebViewImpl.h: - (WebKit::WebViewImpl::autoFillPopupDidHide): - -2010-07-01 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Adam Barth. - - [v8] Web Inspector: inspected page crashes on attempt to change iframe's src attribute - https://bugs.webkit.org/show_bug.cgi?id=41350 - - * src/WebBindings.cpp: - (WebKit::getEvent): - -2010-07-01 Aaron Boodman <aa@chromium.org> - - Reviewed by Darin Fisher. - - Make the user script API static. This makes it more convenient to use - if you don't have a WebView instance yet. - - Added static versions of the three methods and re-route current ones - temporarily through the static versions. Will remove the non-static - versions once Chromium has been updated. - - Also, expose the URLPattern configuration for user stylesheets, since - they were not before. - - https://bugs.webkit.org/show_bug.cgi?id=41385 - - * public/WebView.h: - (WebKit::WebView::addUserScript): - (WebKit::WebView::addUserStyleSheet): - * src/WebViewImpl.cpp: - (WebKit::WebView::addUserScript): - (WebKit::WebView::addUserStyleSheet): - (WebKit::WebView::removeAllUserContent): - -2010-06-30 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Roll forward Chromium DEPS to r51287 - https://bugs.webkit.org/show_bug.cgi?id=41430 - - * DEPS: - -2010-06-25 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chrome DevTools: Finalize migration to new WebView constructor - (devtools agent is now created within WebViewImpl only). - - https://bugs.webkit.org/show_bug.cgi?id=41212 - - * public/WebDevToolsAgent.h: - * public/WebView.h: - * src/WebDevToolsAgentImpl.cpp: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::initializeLoader): - * tests/PopupMenuTest.cpp: - (WebKit::SelectPopupMenuTest::SetUp): - -2010-06-29 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Implement getAttachedShaders - https://bugs.webkit.org/show_bug.cgi?id=31172 - - * public/WebGraphicsContext3D.h: Declaration of getAttachedShaders(). - * src/GraphicsContext3D.cpp: Implementation of getAttachedShaders(). - * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto. - * src/WebGraphicsContext3DDefaultImpl.h: Declaration of getAttachedShaders(). - -2010-06-29 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Darin Fisher. - - Simplify the WebDatabase interface. - https://bugs.webkit.org/show_bug.cgi?id=40607 - - Do not ref()/deref() the private AbstractDatabase member. This - allows us to use WebDatabase in the destructors of the DB - classes. - - * public/WebDatabase.h: - (WebKit::WebDatabase::WebDatabase): - * src/WebDatabase.cpp: - (WebKit::WebDatabase::name): - (WebKit::WebDatabase::displayName): - (WebKit::WebDatabase::estimatedSize): - (WebKit::WebDatabase::securityOrigin): - (WebKit::WebDatabase::WebDatabase): - -2010-06-29 Zhe Su <suzhe@chromium.org> - - Reviewed by Darin Fisher. - - A crash caused by the patch of bug 40608. - https://bugs.webkit.org/show_bug.cgi?id=41334 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::caretOrSelectionBounds): - -2010-06-29 Victor Wang <victorw@chromium.org> - - Reviewed by Darin Fisher. - - [chromium]: Update webkit for chromium multi dll build. - - 1. Export more webkit APIs for chromium multi dll build. - 2. Update DumpRenderTree sources so it can build with webkit.dll - 3. Temp disable webkit unit tests for chromium multi dll build. - - https://bugs.webkit.org/show_bug.cgi?id=41231 - - * WebKit.gyp: - * public/WebAccessibilityCache.h: - * public/WebAccessibilityObject.h: - * public/WebEventListener.h: - * public/WebGeolocationServiceMock.h: - * public/WebGraphicsContext3D.h: - * public/WebIDBDatabaseError.h: - (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): - (WebKit::WebIDBDatabaseError::operator=): - * public/WebNotification.h: - * public/WebPasswordFormData.h: - * public/WebSearchableFormData.h: - * public/WebStorageEventDispatcher.h: - * public/WebString.h: - (WebKit::WebString::WebString): - (WebKit::WebString::operator=): - -2010-06-29 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Hooking up GraphicsContext3D to the gpu compositor. - GraphicsContext3DInternal is now initialized with a pointer to the HostWindow - that corresponds to the WebView containing the context. The initializer - forces a WebGLES2Context to be created for the WebView (if one doesn't already - exist) and uses the view's GL context as a parent to the GL context created - for WebGL. This allows the compositor to read the texture associated with - WebGL's frame buffer. We also plumb though GraphicsContext3D's prepareTexture - and platformLayer methods which are required by the compositor code. - https://bugs.webkit.org/show_bug.cgi?id=41243 - - * public/WebGraphicsContext3D.h: - * public/WebView.h: - Made gles2Context() a virtual method on WebView instead of WebViewImpl - to allow access to it from GraphicsContext3DInternal::initialize(). - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): - (WebCore::GraphicsContext3DInternal::platformTexture): - (WebCore::GraphicsContext3DInternal::prepareTexture): - (WebCore::GraphicsContext3DInternal::platformLayer): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::prepareTexture): - (WebCore::GraphicsContext3D::platformLayer): - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId): - (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture): - * src/WebGraphicsContext3DDefaultImpl.h: - * src/WebViewImpl.h: - -2010-06-29 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: return line number where breakpoint was actually set by v8 from setBreakpoint function. - https://bugs.webkit.org/show_bug.cgi?id=40781 - - * src/js/DebuggerScript.js: - (): - -2010-06-23 John Gregg <johnnyg@google.com> - - Reviewed by Kent Tamura. - - add ENABLE_DIRECTORY_UPLOAD build support - https://bugs.webkit.org/show_bug.cgi?id=41100 - - * features.gypi: - -2010-06-28 Zhe Su <suzhe@chromium.org> - - Reviewed by Jian Li. - - [chromium]Remove deprecated code related to input method. - https://bugs.webkit.org/show_bug.cgi?id=41244 - - Also update TestWebWidget in tests/PopupMenuTest.cpp to add missing implementations. - - * WebKit.gyp: - * public/WebCompositionCommand.h: Removed. - * public/WebViewClient.h: - * public/WebWidget.h: - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::setInputMethodState): - * src/WebPopupMenuImpl.cpp: - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - * tests/PopupMenuTest.cpp: - (WebKit::TestWebWidget::setComposition): - (WebKit::TestWebWidget::confirmComposition): - (WebKit::TestWebWidget::textInputType): - (WebKit::TestWebWidget::caretOrSelectionBounds): - -2010-06-27 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Get the selected text from plugins for right click menu - https://bugs.webkit.org/show_bug.cgi?id=41242 - - * public/WebContextMenuData.h: - (WebKit::WebContextMenuData::): - * public/WebPlugin.h: - (WebKit::WebPlugin::selectedText): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::selectedText): - * src/WebPluginContainerImpl.h: - -2010-06-28 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Fix Chromium debugger tests. - - * src/js/Tests.js: - (.TestSuite.prototype.testDebugIntrinsicProperties): - -2010-06-25 Yuzo Fujishima <yuzo@google.com> - - Reviewed by Shinichiro Hamaji. - - Improve default value handling for page format properties. - https://bugs.webkit.org/show_bug.cgi?id=41150 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::pageSizeAndMarginsInPixels): - * src/WebFrameImpl.h: - -2010-06-26 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r61943. - http://trac.webkit.org/changeset/61943 - https://bugs.webkit.org/show_bug.cgi?id=41251 - - Totally breaks webkit_unit_tests on Chromium linux and mac - (Requested by mnaganov on #webkit). - - * WebKit.gyp: - * src/WebFrameImpl.cpp: - (WebKit::frameContentAsPlainText): - * tests/RunAllTests.cpp: - (main): - * tests/WebFrameTest.cpp: Removed. - * tests/data/iframes_test.html: Removed. - * tests/data/invisible_iframe.html: Removed. - * tests/data/visible_iframe.html: Removed. - * tests/data/zero_sized_iframe.html: Removed. - -2010-06-26 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Dimitri Glazkov. - - Disable Web Timing support by default for chromium port. - https://bugs.webkit.org/show_bug.cgi?id=38924 - - * features.gypi: - -2010-06-25 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Made WebFrame not report the text from hidden frames. - (some pages contain hidden frames with garbage text that - should not be indexed or used to detect the page's language). - https://bugs.webkit.org/show_bug.cgi?id=39456 - - * DEPS: - * WebKit.gyp: - * src/WebFrameImpl.cpp: - (WebKit::frameContentAsPlainText): - * tests/RunAllTests.cpp: - (main): - * tests/WebFrameTest.cpp: Added. - * tests/data: Added. - * tests/data/iframes_test.html: Added. - * tests/data/invisible_iframe.html: Added. - * tests/data/visible_iframe.html: Added. - * tests/data/zero_sized_iframe.html: Added. - -2010-06-25 Bernhard Bauer <bauerb@chromium.org> - - Reviewed by Darin Fisher. - - Add plugin accessors to WebPluginContainer. - https://bugs.webkit.org/show_bug.cgi?id=41145 - - * public/WebPluginContainer.h: - * src/WebPluginContainerImpl.h: - (WebKit::WebPluginContainerImpl::setPlugin): - -2010-06-25 Sterling Swigart <sswigart@google.com> - - Reviewed by David Levin. - - Resetting ENABLE_IMAGE_RESIZER to 0. Image.webkitGetImage needs to be developed under - a 0 value, at least until both the JSC and V8 bindings are in place. - https://bugs.webkit.org/show_bug.cgi?id=41116 - - * features.gypi: ENABLE_IMAGE_RESIZER=0 - -2010-06-25 Victor Wang <victorw@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Update chromium webkit gyp so it has - option to be built as DLL. - - Chromium webkit is built as webkit.dll on windows - if it is inside chromium build and variable component - is set to shared_library. - - https://bugs.webkit.org/show_bug.cgi?id=41161 - - * WebKit.gyp: - -2010-06-25 John Abd-El-Malek <jam@chromium.org> - - Reviewed by David Levin. - - [chromium] Send unhandled events to Node's default handler - https://bugs.webkit.org/show_bug.cgi?id=41223 - - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleEvent): - -2010-06-25 Daniel Cheng <dcheng@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add new stubs for querying platform drag-and-drop and copy-and-paste data. - - This change adds new stubs for querying for data in a clipboard or drag operation. This is - so adding support for more data types in clipboard/drag operations doesn't become - increasingly expensive, since we currently copy all the drag data we need every time a new - web drop target is entered. It also adds a new mechanism to write back to the system - clipboard that isn't tied to one data type. - - https://bugs.webkit.org/show_bug.cgi?id=40540 - - * public/WebClipboard.h: - (WebKit::WebClipboard::): - (WebKit::WebClipboard::isFormatAvailable): - (WebKit::WebClipboard::readPlainText): - (WebKit::WebClipboard::readHTML): - (WebKit::WebClipboard::writePlainText): - (WebKit::WebClipboard::writeHTML): - (WebKit::WebClipboard::writeURL): - (WebKit::WebClipboard::writeImage): - (WebKit::WebClipboard::writeData): - (WebKit::WebClipboard::readAvailableTypes): - (WebKit::WebClipboard::readData): - (WebKit::WebClipboard::readFilenames): - * public/WebKitClient.h: - * src/AssertMatchingEnums.cpp: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::clipboardWriteData): - (WebCore::ChromiumBridge::clipboardReadAvailableTypes): - (WebCore::ChromiumBridge::clipboardReadData): - (WebCore::ChromiumBridge::clipboardReadFilenames): - -2010-06-25 Lei Zheng <lzheng@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Add a flag to the ResourceResponse for tracking if a request was fetched - when Alternate-Protocol is available. - - https://bugs.webkit.org/show_bug.cgi?id=41001 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasAlternateProtocolAvailable): - (WebKit::WebURLResponse::setWasAlternateProtocolAvailable): - -2010-06-25 Michael Nordman <michaeln@google.com> - - Reviewed by Dumitru Daniliuc. - - Additional API to pass additional info needed for AppCache progress events. - https://bugs.webkit.org/show_bug.cgi?id=37602 - - Also, delete an obsolete method from the worker API. - - * public/WebApplicationCacheHostClient.h: define a new method - * public/WebSharedWorker.h: remove an obsolte method - * src/ApplicationCacheHostInternal.h: implement the new method - (WebCore::ApplicationCacheHostInternal::notifyProgressEventListener): - -2010-06-25 John Gregg <johnnyg@google.com> - - Reviewed by Darin Fisher. - - Notification should expose ltr/rtl as TextDirection, not String - https://bugs.webkit.org/show_bug.cgi?id=40871 - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::direction): - -2010-06-24 Eric Seidel <eric@webkit.org> - - Reviewed by Adam Barth. - - Clean up and document DocumentWriter::replaceDocument code path - https://bugs.webkit.org/show_bug.cgi?id=41182 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::loadJavaScriptURL): - - Make Chromium use DocumentWriter like it should. - -2010-06-24 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] A WebView can now own a GLES2Context which gets created on - demand. This context will typically be created for the gpu compositor - and used as a parent context for any elements on the page that use the - gpu for rendering (e.g. WebGL) and need to pass their backbuffer directly - to the compositor. - https://bugs.webkit.org/show_bug.cgi?id=41010 - - * public/WebGLES2Context.h: - * src/GLES2Context.cpp: - (WebCore::GLES2ContextInternal::getWebGLES2Context): - (WebCore::GLES2ContextInternal::initialize): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::gles2Context): - * src/WebViewImpl.h: - -2010-06-24 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Inspector cleanup + better DevTools alignment with Inspector. - - https://bugs.webkit.org/show_bug.cgi?id=41094 - - - Merged InspectorClient implementation into WebDevToolsAgent - - Changed the way WebDevToolsAgent is initialized (will break chromium bot, needs coordinated landing) - - Removed a lot of legacy code from WebDevToolsAgentImpl - - Removed a lot of overrides from DevTools.js - - Simplified devtools stubs - - Got rid of all logic from within InjectDispatch.js - - * public/WebView.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad): - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::inspectorDestroyed): - (WebKit::InspectorClientImpl::openInspectorFrontend): - (WebKit::InspectorClientImpl::highlight): - (WebKit::InspectorClientImpl::hideHighlight): - (WebKit::InspectorClientImpl::populateSetting): - (WebKit::InspectorClientImpl::storeSetting): - (WebKit::InspectorClientImpl::sendMessageToFrontend): - (WebKit::InspectorClientImpl::resourceTrackingWasEnabled): - (WebKit::InspectorClientImpl::resourceTrackingWasDisabled): - (WebKit::InspectorClientImpl::timelineProfilerWasStarted): - (WebKit::InspectorClientImpl::timelineProfilerWasStopped): - (WebKit::InspectorClientImpl::devToolsAgent): - * src/InspectorClientImpl.h: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::inspectedURLChanged): - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient): - (WebKit::WebDevToolsAgentImpl::inspectorDestroyed): - (WebKit::WebDevToolsAgentImpl::openInspectorFrontend): - (WebKit::WebDevToolsAgentImpl::highlight): - (WebKit::WebDevToolsAgentImpl::hideHighlight): - (WebKit::WebDevToolsAgentImpl::populateSetting): - (WebKit::WebDevToolsAgentImpl::storeSetting): - (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend): - (WebKit::WebDevToolsAgentImpl::resourceTrackingWasEnabled): - (WebKit::WebDevToolsAgentImpl::resourceTrackingWasDisabled): - (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStarted): - (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStopped): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsAgentPrivate.h: - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - * src/js/DevTools.js: - (devtools.ToolsAgent): - (): - (devtools): - * src/js/DevToolsHostStub.js: - (.window.setDebuggerScriptSource): - (.window.dispatchOnInjectedScript): - * src/js/InjectDispatch.js: - (dispatch): - * src/js/InspectorControllerImpl.js: - -2010-06-24 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: revert 61766. - - * WebKit.gyp: - * public/WebView.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad): - * src/InspectorClientImpl.cpp: Added. - (WebKit::InspectorClientImpl::InspectorClientImpl): - (WebKit::InspectorClientImpl::~InspectorClientImpl): - (WebKit::InspectorClientImpl::inspectorDestroyed): - (WebKit::InspectorClientImpl::openInspectorFrontend): - (WebKit::invalidateNodeBoundingRect): - (WebKit::InspectorClientImpl::highlight): - (WebKit::InspectorClientImpl::hideHighlight): - (WebKit::InspectorClientImpl::populateSetting): - (WebKit::InspectorClientImpl::storeSetting): - (WebKit::InspectorClientImpl::sendMessageToFrontend): - * src/InspectorClientImpl.h: Added. - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::inspectedURLChanged): - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::didCommitProvisionalLoad): - (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient): - (WebKit::WebDevToolsAgentImpl::jsDispatchToApu): - (WebKit::WebDevToolsAgentImpl::jsEvaluateOnSelf): - (WebKit::WebDevToolsAgentImpl::jsOnRuntimeFeatureStateChanged): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsAgentPrivate.h: - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::setDevToolsAgent): - * src/WebViewImpl.h: - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::initializeLoader): - * src/js/DevTools.js: - (devtools.ToolsAgent): - (devtools.ToolsAgent.prototype.frameNavigate_): - (): - * src/js/DevToolsHostStub.js: - (.RemoteDebuggerAgentStub): - (.RemoteDebuggerAgentStub.prototype.getContextId): - (.RemoteDebuggerAgentStub.prototype.processDebugCommands): - (.RemoteProfilerAgentStub): - (.RemoteProfilerAgentStub.prototype.getActiveProfilerModules): - (.RemoteProfilerAgentStub.prototype.getLogLines): - (.RemoteToolsAgentStub): - (.RemoteToolsAgentStub.prototype.dispatchOnInjectedScript): - (.RemoteToolsAgentStub.prototype.dispatchOnInspectorController): - (.ProfilerStubHelper): - (.ProfilerStubHelper.GetInstance): - (.ProfilerStubHelper.prototype.StopProfiling): - (.ProfilerStubHelper.prototype.StartProfiling): - (.ProfilerStubHelper.prototype.getActiveProfilerModules): - (.ProfilerStubHelper.prototype.getLogLines): - (.RemoteDebuggerCommandExecutorStub): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerCommand): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerPauseScript): - (.RemoteDebuggerCommandExecutorStub.prototype.sendResponse_): - (.DevToolsHostStub): - (.DevToolsHostStub.prototype.reset): - (.DevToolsHostStub.prototype.setting): - (.DevToolsHostStub.prototype.setSetting): - * src/js/InjectDispatch.js: - (ApuAgentDispatcher.dispatchToApu): - (dispatch): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl.prototype.debuggerEnabled): - (devtools.InspectorBackendImpl.prototype.profilerEnabled): - -2010-06-23 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Inspector cleanup + better DevTools alignment with Inspector. - - https://bugs.webkit.org/show_bug.cgi?id=41094 - - - Merged InspectorClient implementation into WebDevToolsAgent - - Changed the way WebDevToolsAgent is initialized (will break chromium bot, needs coordinated landing) - - Removed a lot of legacy code from WebDevToolsAgentImpl - - Removed a lot of overrides from DevTools.js - - Simplified devtools stubs - - Got rid of all logic from within InjectDispatch.js - - * WebKit.gyp: - * public/WebDevToolsAgent.h: - * public/WebView.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad): - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::inspectedURLChanged): - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient): - (WebKit::WebDevToolsAgentImpl::inspectorDestroyed): - (WebKit::WebDevToolsAgentImpl::openInspectorFrontend): - (WebKit::WebDevToolsAgentImpl::highlight): - (WebKit::WebDevToolsAgentImpl::hideHighlight): - (WebKit::WebDevToolsAgentImpl::populateSetting): - (WebKit::WebDevToolsAgentImpl::storeSetting): - (WebKit::WebDevToolsAgentImpl::sendMessageToFrontend): - (WebKit::WebDevToolsAgentImpl::resourceTrackingWasEnabled): - (WebKit::WebDevToolsAgentImpl::resourceTrackingWasDisabled): - (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStarted): - (WebKit::WebDevToolsAgentImpl::timelineProfilerWasStopped): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsAgentPrivate.h: - * src/WebViewImpl.cpp: - (WebKit::WebView::create): - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::initializeLoader): - * src/js/DevTools.js: - (devtools.ToolsAgent): - (): - (devtools): - * src/js/DevToolsHostStub.js: - (.window.setDebuggerScriptSource): - (.window.dispatchOnInjectedScript): - * src/js/InjectDispatch.js: - (dispatch): - * src/js/InspectorControllerImpl.js: - -2010-06-24 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: implement layout tests for debugger - https://bugs.webkit.org/show_bug.cgi?id=40774 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - -2010-06-23 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - layout test for a crash in chromium multipart request handling - https://bugs.webkit.org/show_bug.cgi?id=41050 - - Also roll DEPS to pick up the crash fix. - - * DEPS: - -2010-06-23 Yuzo Fujishima <yuzo@google.com> - - Reviewed by Shinichiro Hamaji. - - Make page format data methods accessible from Chromium - https://bugs.webkit.org/show_bug.cgi?id=41056 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::isPageBoxVisible): - (WebKit::WebFrameImpl::pageAreaRectInPixels): - (WebKit::WebFrameImpl::preferredPageSizeInPixels): - * src/WebFrameImpl.h: - -2010-06-22 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Rename HTMLDocumentParser to LegacyHTMLDocumentParser - https://bugs.webkit.org/show_bug.cgi?id=41043 - - * src/WebEntities.cpp: - -2010-06-22 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: follow up to r61655 to make Chromium tests happy. - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-22 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Clean up after removal of static WebDevToolsAgentClient::sendMessageToFrontendOnIOThread. - - https://bugs.webkit.org/show_bug.cgi?id=40914 - - * public/WebDevToolsAgentClient.h: - -2010-06-22 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Add a sanity test for heap profiler. - - https://bugs.webkit.org/show_bug.cgi?id=40917 - - * src/js/Tests.js: - (.TestSuite.prototype.testHeapProfiler.findDisplayedNode): - (.TestSuite.prototype.testHeapProfiler.findVisibleView): - (.TestSuite.prototype.testHeapProfiler): - -2010-06-21 MORITA Hajime <morrita@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Dragging outside the frame immediately causes page to scroll - http://webkit.org/b/40461 - - This is regression that was introduced at http://webkit.org/b/39725. - - There are 2 problems: - 1. It starts auto-scrolling immediately. We should have some delay. - 2. The scroll continues even after a mouse cursor goes outside a frame. - The scroll should be stopped when the curosr has left. - - This change introduced DragScrollTimer to handle 1. - At the same time, it fixed DragScrollTimer::scrollDistanceFor() to - handle 2, We now stop scrolling when the cursor gone. - - * WebKit.gyp: - * src/DragScrollTimer.cpp: Added. - (WebKit::distanceToRect): - (WebKit::DragScrollTimer::DragScrollTimer): - (WebKit::DragScrollTimer::~DragScrollTimer): - (WebKit::DragScrollTimer::stop): - (WebKit::DragScrollTimer::scroll): - (WebKit::DragScrollTimer::update): - (WebKit::DragScrollTimer::triggerScroll): - (WebKit::DragScrollTimer::scrollDistanceFor): - * src/DragScrollTimer.h: Added. - (WebKit::DragScrollTimer::fired): - (WebKit::DragScrollTimer::shouldScroll): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::dragSourceEndedAt): - (WebKit::WebViewImpl::dragSourceMovedTo): - (WebKit::WebViewImpl::dragTargetDrop): - (WebKit::WebViewImpl::dragTargetDragEnterOrOver): - * src/WebViewImpl.h: - -2010-06-21 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Enable EVENTSOURCE, FILE_WRITER, and IMAGE_RESIZER - https://bugs.webkit.org/show_bug.cgi?id=40905 - - EVENTSOURCE: It is already enabled in Chromium browser. This fixes - some tests with Chromium DRT. - - FILE_WRITER and IMAGE_RESIZER: Enable experimental features in - order to test them before enabling them in Chromium browser. - - * features.gypi: - -2010-06-21 Satish Sampath <satish@chromium.org> - - Reviewed by Steve Block. - - Speech Input Patch 0: Added compilation argument to conditionally compile pending patches. - https://bugs.webkit.org/show_bug.cgi?id=40878 - - * features.gypi: - -2010-06-21 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Yury Semikhatsky. - - [Chromium] Remove usage of static WebDevToolsAgentClient::sendMessageToFrontendOnIOThread. - - Also, move WebDevToolsMessageTransport to its own header file. - - https://bugs.webkit.org/show_bug.cgi?id=40913 - - * DEPS: - * WebKit.gyp: - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - * public/WebDevToolsMessageTransport.h: Added. - (WebKit::WebDevToolsMessageTransport::~WebDevToolsMessageTransport): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - -2010-06-20 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - [v8] Web Inspector: don't add ScriptDebugServer as v8 listener if browser exposes - v8 debugging protocol. - - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::setExposeV8DebuggerProtocol): - -2010-06-19 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - Adding a < operator to WebURLs so they can be used in std::maps. - https://bugs.webkit.org/show_bug.cgi?id=40632 - - * public/WebCString.h: - (WebKit::operator<): - * public/WebURL.h: - (WebKit::operator<): - * src/WebCString.cpp: - (WebKit::WebCString::compare): - -2010-06-19 Kent Tamura <tkent@chromium.org> - - Unreviewed. Build fix for r61488. - - * features.gypi: Define use_accelerated_compositing. - -2010-06-19 Thomas Van Lenten <thomasvl@chromium.org> - - Reviewed by David Levin. - - Warnings from -Wextra in a Chromium Mac build - 1. checks of unsigned >= 0 - 2. enumeral and non-enumeral type in conditional expression - 3. copy ctors that don't call the super copy ctor or ctor - - https://bugs.webkit.org/show_bug.cgi?id=40791 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getSuggestion): - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): - (WebKit::AutoFillPopupMenuClient::valueChanged): - (WebKit::AutoFillPopupMenuClient::selectionChanged): - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::getSuggestion): - (WebKit::AutocompletePopupMenuClient::removeSuggestionAtIndex): - -2010-06-19 Zhe Su <suzhe@chromium.org> - - Reviewed by Darin Fisher. - - [chromium]Refactor input method related APIs. - https://bugs.webkit.org/show_bug.cgi?id=40608 - - * WebKit.gyp: - * public/WebCompositionCommand.h: - * public/WebCompositionUnderline.h: Added. - (WebKit::WebCompositionUnderline::WebCompositionUnderline): - * public/WebTextInputType.h: Added. - (WebKit::): - * public/WebViewClient.h: - * public/WebWidget.h: - * public/WebWidgetClient.h: - (WebKit::WebWidgetClient::resetInputMethod): - * src/CompositionUnderlineBuilder.h: Added. - (WebKit::CompositionUnderlineBuilder::CompositionUnderlineBuilder): - * src/CompositionUnderlineVectorBuilder.cpp: Added. - (WebKit::CompositionUnderlineVectorBuilder::CompositionUnderlineVectorBuilder): - * src/CompositionUnderlineVectorBuilder.h: Added. - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::setInputMethodState): - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::setComposition): - (WebKit::WebPopupMenuImpl::confirmComposition): - (WebKit::WebPopupMenuImpl::textInputType): - (WebKit::WebPopupMenuImpl::caretOrSelectionBounds): - * src/WebPopupMenuImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleCompositionEvent): - (WebKit::WebViewImpl::setComposition): - (WebKit::WebViewImpl::confirmComposition): - (WebKit::WebViewImpl::textInputType): - (WebKit::WebViewImpl::caretOrSelectionBounds): - * src/WebViewImpl.h: - -2010-06-19 Victoria Kirst <vrk@google.com> - - Reviewed by David Levin. - - Modifying the WebMediaPlayer interface to be compatible with - a change in chrome. - This is a part 2 of 3 one-sided changes to chrome and WebKit. Chrome - has been updated, so this commit should NOT break chromium anymore, - nor should it cause any test failures. - https://bugs.webkit.org/show_bug.cgi?id=39445 - - * public/WebMediaPlayer.h: Changed buffered() to be non-const. - -2010-06-19 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - fast/canvas/webgl/get-active-test.html failed in Chrome Mac - https://bugs.webkit.org/show_bug.cgi?id=40496 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Call makeContextCurrent(). - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): - (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): - -2010-06-18 Aaron Boodman <aa@chromium.org> - - Remove WebKit::WebDocument::isXHTMLDocument. - https://bugs.webkit.org/show_bug.cgi?id=40815 - - * public/WebDocument.h: Remove isXHTMLDocument(). - * src/WebDocument.cpp: Ditto. - -2010-06-19 Aaron Boodman <aa@chromium.org> - - Unreviewed, rolling out r61466. - http://trac.webkit.org/changeset/61466 - https://bugs.webkit.org/show_bug.cgi?id=40816 - - Landed wrong change - - * src/WebKit.cpp: - (WebKit::shutdown): - -2010-06-18 Aaron Boodman <aa@chromium.org> - - WebKit API: Undo static hooks into V8 when WebKit is shut downm - https://bugs.webkit.org/show_bug.cgi?id=40816 - - * src/WebKit.cpp: - (WebKit::shutdown): Call new WebCore::V8DOMWindowShell::uninitializeV8IfNeeded(). - -2010-06-18 Drew Wilson <atwilson@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Plumbing for top-level frame names - https://bugs.webkit.org/show_bug.cgi?id=40430 - - * public/WebFrame.h: - Removed obsolete clearName() API and added better documentation for - setName(). - * src/WebFrameImpl.cpp: - Removed clearName() API. - * src/WebFrameImpl.h: - Removed clearName() API. - -2010-06-18 Drew Wilson <atwilson@chromium.org> - - Reviewed by Dumitru Daniliuc. - - Roll chromium DEPS 50089:50171 - https://bugs.webkit.org/show_bug.cgi?id=40842 - - * DEPS: - Update chromium_rev to r50171 to remove downstream reference to WebFrame::clearName(). - -2010-06-18 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Implement 'takeHeapSnapshot' in InspectorController. - - https://bugs.webkit.org/show_bug.cgi?id=40834 - - * src/js/HeapProfilerPanel.js: - (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent.prototype.startProfiling): - -2010-06-18 Anton Muhin <antonm@chromium.org> - - Reviewed by Dimitri Glazkov. - - [v8] Finish migration to new named property query API - https://bugs.webkit.org/show_bug.cgi?id=40771 - Remove definition which allowed gradual transition to new API. - See https://bugs.webkit.org/show_bug.cgi?id=40303 for first phase. - Requires V8 roll. - - * DEPS: - -2010-06-17 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: bring XHR console records back. - - adds "Enable XHR Monitor" / "Disable XHR Monitor" actions to the console's context menu - - make the chosen option persist in the settings. - - https://bugs.webkit.org/show_bug.cgi?id=40799 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-15 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Adam Barth. - - Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase. - https://bugs.webkit.org/show_bug.cgi?id=39041 - - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDatabase): - (WebKit::WebRuntimeFeatures::isDatabaseEnabled): - -2010-06-17 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] cleanup redundant DEPS value and remove buildbot cleanup code - https://bugs.webkit.org/show_bug.cgi?id=40615 - - * DEPS: tools/data_pack was listed twice for linux (harmless, but unnecessary) - -2010-06-17 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium API] Implement WebSandboxSupport on OS X and add stubs to allow - OOP loading of fonts. - - https://bugs.webkit.org/show_bug.cgi?id=40544 - - * WebKit.gyp: Add mac WebSandboxSupport.h - * public/mac/WebSandboxSupport.h: Added. - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::loadFont): - -2010-06-17 Pavel Feldman <pfeldman@chromium.org> - - Unreviewed: chromium tests fix. Added InspectorBackend delegates for new inspector methods. - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-17 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Prepare to making WebDevToolsAgentClient::sendMessageToFrontendOnIOThread virtual - - https://bugs.webkit.org/show_bug.cgi?id=39302 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsMessageTransport::~WebDevToolsMessageTransport): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread): - -2010-06-17 John Gregg <johnnyg@google.com> - - Reviewed by David Levin. - - Undo the build fix with the correct patch: Chromium NotificationPresenter - is now informed of the destruction before it actually happens, so this - use of the Notification object is correct. - https://bugs.webkit.org/show_bug.cgi?id=40097 - - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::notificationObjectDestroyed): - -2010-06-16 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Set current working directory for each of tests - https://bugs.webkit.org/show_bug.cgi?id=40668 - - * DEPS: Update Chromium to r49915 to have - webkit_support::SetCurrentDirectoryForFileURL(). - -2010-06-16 Drew Wilson <atwilson@chromium.org> - - Reviewed by Kent Tamura. - - Added plumbing to Chromium WebKit API to allow setting/getting the name - of top level frames. - - https://bugs.webkit.org/show_bug.cgi?id=40430 - * public/WebFrame.h: - Added setName() API. - * public/WebViewClient.h: - (WebKit::WebViewClient::createView): - Now takes a "name" parameter. - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - Passes a name parameter. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::setName): - Allows setting the frame name by calling through to the WebCore API. - * src/WebFrameImpl.h: - -2010-06-15 Darin Adler <darin@apple.com> - - Reviewed by Adam Barth. - - Move functions out of Frame class that were marked "move to Chrome" - https://bugs.webkit.org/show_bug.cgi?id=39636 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::dispatchBeforeUnloadEvent): Call shouldClose - on FrameLoader instead of going through Frame. - -2010-06-11 Darin Fisher <darin@chromium.org> - - Reviewed by Brady Eidson. - - Expose WebHistoryItem::itemSequenceNumber. - - https://bugs.webkit.org/show_bug.cgi?id=40451 - - * public/WebHistoryItem.h: - * src/WebHistoryItem.cpp: - (WebKit::WebHistoryItem::itemSequenceNumber): - (WebKit::WebHistoryItem::setItemSequenceNumber): - -2010-06-15 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - [v8] Web Inspector: make ui tests pass when ScriptDebugServer is used - https://bugs.webkit.org/show_bug.cgi?id=40623 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.formatCallFrame_): return empty function name for anonymous functions. - * src/js/DebuggerScript.js: - * src/js/Tests.js: - (.TestSuite.prototype.testProfilerTab.findVisibleView): - (.TestSuite.prototype.testProfilerTab): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed): - (.TestSuite.prototype.testSetBreakpoint.this): - (.TestSuite.prototype.testSetBreakpoint): - (.TestSuite.prototype.testEvalOnCallFrame.waitForBreakpointHit): - (.TestSuite.prototype._executeCodeWhenScriptsAreParsed.executeFunctionInInspectedPage): - (.TestSuite.prototype.testExpandScope.examineScopes): - (.TestSuite.prototype.testExpandScope): - (.TestSuite.prototype.testDebugIntrinsicProperties): - -2010-06-14 Anders Carlsson <andersca@apple.com> - - Fix Chromium build. - - * src/WebPluginListBuilderImpl.cpp: - (WebKit::WebPluginListBuilderImpl::addFileExtensionToLastMediaType): - -2010-06-14 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Adam Barth. - - Get DatabaseTracker ready for sync DBs. - https://bugs.webkit.org/show_bug.cgi?id=39041 - - * public/WebDatabase.h: - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::databaseOpened): - (WebCore::DatabaseObserver::databaseModified): - (WebCore::DatabaseObserver::databaseClosed): - * src/WebDatabase.cpp: - (WebKit::WebDatabase::closeDatabaseImmediately): - (WebKit::WebDatabase::WebDatabase): - (WebKit::WebDatabase::operator=): - (WebKit::WebDatabase::operator WTF::PassRefPtr<AbstractDatabase>): - -2010-06-14 Chris Fleizach <cfleizach@apple.com> - - Reviewed by Darin Adler. - - AX: need ListItemRole and PresentationalRole - https://bugs.webkit.org/show_bug.cgi?id=40133 - - * public/WebAccessibilityRole.h: - * src/AssertMatchingEnums.cpp: - -2010-06-14 Anders Carlsson <andersca@apple.com> - - Reviewed by Sam Weinig. - - Remove pluginIndex from MimeClassInfo - https://bugs.webkit.org/show_bug.cgi?id=40588 - - * src/WebPluginListBuilderImpl.cpp: - (WebKit::WebPluginListBuilderImpl::addMediaTypeToLastPlugin): - -2010-06-14 Jeremy Orlow <jorlow@chromium.org> - - Build fix. - - * src/IDBCallbacksProxy.h: - -2010-06-14 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc - data from inspected page to WebInspector as JSON string via http. The native - serialization to JSON string is supported by InspectorValue's classes. This patch - has the implementation of sendMessageToFrontend function. WebKit version of it still - uses ScriptFunctionCall and will be switched to another transport a little bit later. - https://bugs.webkit.org/show_bug.cgi?id=40134 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::sendMessageToFrontend): - * src/InspectorClientImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController): - -2010-06-13 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] checkout chromium third_party directly - https://bugs.webkit.org/show_bug.cgi?id=40556 - - * DEPS: - -2010-06-13 Tony Chang <tony@chromium.org> - - Build fix, not reviewed. - - fix chromium compile after r61094 (id attribute refactor) - https://bugs.webkit.org/show_bug.cgi?id=40553 - - * src/ChromeClientImpl.cpp: - * src/WebFormControlElement.cpp: - (WebKit::WebFormControlElement::nameForAutofill): - -2010-06-13 Andras Becsi <abecsi@inf.u-szeged.hu> - - Reviewed by Darin Adler. - - Centralize the gperf code generation commands into make-hash-tools.pl - to avoid redundancy across multiple build systems. - Do this in preparation of refactoring the usage of these generated - sources to fix the debug linking error on Linux with gcc >= 4.4.0. - - webkit.org/b/29244 - - * src/WebEntities.cpp: - -2010-06-11 Eric Seidel <eric@webkit.org> - - Reviewed by Adam Barth. - - Rename the rest of the *Tokenizer classes to *DocumentParser - https://bugs.webkit.org/show_bug.cgi?id=40507 - - * src/WebEntities.cpp: - - Fix a comment to match new class names. - -2010-06-12 Evan Stade <estade@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] Menu key should act on current selection even if it is not editable - https://bugs.webkit.org/show_bug.cgi?id=40348 - - Allow the menu key to act on non-editable selections. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::sendContextMenuEvent): - -2010-06-11 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Notify the WebView when the AutoFill popup hides. - - https://bugs.webkit.org/show_bug.cgi?id=40459 - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::selectionCleared): - -2010-06-11 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Dimitri Glazkov. - - Roll chromium DEPS 49376:49521 - https://bugs.webkit.org/show_bug.cgi?id=40488 - - * DEPS: - -2010-06-10 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Implement more of IndexedDB's Indexes and ObjectStores - https://bugs.webkit.org/show_bug.cgi?id=40424 - - Add plumbing for both of these classes. - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::name): - (WebKit::WebIDBDatabase::description): - (WebKit::WebIDBDatabase::version): - (WebKit::WebIDBDatabase::objectStores): - (WebKit::WebIDBDatabase::objectStore): - (WebKit::WebIDBDatabase::removeObjectStore): - * public/WebIDBObjectStore.h: - (WebKit::WebIDBObjectStore::indexNames): - (WebKit::WebIDBObjectStore::createIndex): - (WebKit::WebIDBObjectStore::index): - (WebKit::WebIDBObjectStore::removeIndex): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::name): - (WebCore::IDBDatabaseProxy::description): - (WebCore::IDBDatabaseProxy::version): - (WebCore::IDBDatabaseProxy::objectStores): - (WebCore::IDBDatabaseProxy::objectStore): - (WebCore::IDBDatabaseProxy::removeObjectStore): - * src/IDBDatabaseProxy.h: - * src/IDBObjectStoreProxy.cpp: - (WebCore::IDBObjectStoreProxy::indexNames): - (WebCore::IDBObjectStoreProxy::createIndex): - (WebCore::IDBObjectStoreProxy::index): - (WebCore::IDBObjectStoreProxy::removeIndex): - * src/IDBObjectStoreProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl): - (WebKit::WebIDBDatabaseImpl::name): - (WebKit::WebIDBDatabaseImpl::description): - (WebKit::WebIDBDatabaseImpl::version): - (WebKit::WebIDBDatabaseImpl::objectStores): - (WebKit::WebIDBDatabaseImpl::createObjectStore): - (WebKit::WebIDBDatabaseImpl::objectStore): - (WebKit::WebIDBDatabaseImpl::removeObjectStore): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBObjectStoreImpl.cpp: - (WebKit::WebIDBObjectStoreImpl::WebIDBObjectStoreImpl): - (WebKit::WebIDBObjectStoreImpl::name): - (WebKit::WebIDBObjectStoreImpl::keyPath): - (WebKit::WebIDBObjectStoreImpl::indexNames): - (WebKit::WebIDBObjectStoreImpl::createIndex): - (WebKit::WebIDBObjectStoreImpl::index): - (WebKit::WebIDBObjectStoreImpl::removeIndex): - * src/WebIDBObjectStoreImpl.h: - -2010-06-11 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Enable serialization/deserialization of the frontend state - https://bugs.webkit.org/show_bug.cgi?id=40228 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-10 Søren Gjesse <sgjesse@chromium.org> - - Reviewed by Pavel Feldman. - - V8: Chromium test expectations not matching improved V8 JavaScript stepping - https://bugs.webkit.org/show_bug.cgi?id=40419 - - Update test expetations to match chaged V8 break locations. - - * src/js/Tests.js: - -2010-06-10 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Port performSearch from InjectedScript to InspectorDOMAgent. - - https://bugs.webkit.org/show_bug.cgi?id=40422 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-11 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by David Levin. - - [chromium] Adding a build dependency to the gles2 C library to the webkit_unit_tests - project to allow it to link when WebCore is compiled with the ACCELERATED_COMPOSITING - flag. - https://bugs.webkit.org/show_bug.cgi?id=40341 - - * WebKit.gyp: - -2010-06-10 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Support plugin tests - https://bugs.webkit.org/show_bug.cgi?id=40413 - - * DEPS: - Bump the Chromium revision to r49376 to have a npapi_layout_test_plugin - change and Linux <progress> resources. - Add third_party/mesa because app/ depends on them - since r49332. - * WebKit.gyp: - Copy a plugin binary for DRT to recognize it. - -2010-06-10 James Hawkins <jhawkins@chromium.org> - - Not reviwed. - - Build fix for Chromium Mac Release. - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getSuggestion): - (WebKit::AutoFillPopupMenuClient::valueChanged): - (WebKit::AutoFillPopupMenuClient::selectionChanged): - (WebKit::AutoFillPopupMenuClient::itemIsSeparator): - -2010-06-09 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add the ability to specify a separator in - AutoFillPopupMenuClient. - - https://bugs.webkit.org/show_bug.cgi?id=40397 - - * public/WebViewClient.h: - (WebKit::WebViewClient::didAcceptAutoFillSuggestion): - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::getSuggestionsCount): - (WebKit::AutoFillPopupMenuClient::getSuggestion): - (WebKit::AutoFillPopupMenuClient::valueChanged): - (WebKit::AutoFillPopupMenuClient::selectionChanged): - (WebKit::AutoFillPopupMenuClient::itemIsSeparator): - (WebKit::AutoFillPopupMenuClient::initialize): - (WebKit::AutoFillPopupMenuClient::setSuggestions): - * src/AutoFillPopupMenuClient.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::applyAutoFillSuggestions): - * src/WebViewImpl.h: - -2010-06-10 Dmitry Titov <dimich@chromium.org> - - Not reviewed, Chromium build fix from Abhishek Arya. - - * src/WebImageCG.cpp: - (WebKit::WebImage::WebImage): - (WebKit::WebImage::operator=): - -2010-06-10 Abhishek Arya <inferno@chromium.org> - - Reviewed by Dimitri Glazkov. - - Add null pointer checks for nativeImageForCurrentFrame - function calls. - https://bugs.webkit.org/show_bug.cgi?id=39797 - - * src/WebImageCG.cpp: - (WebKit::WebImage::WebImage): - (WebKit::WebImage::operator=): - -2010-06-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: to reduce the front end start up time don't push script - sources to frontend if debugger is always enabled, instead request - script content lazily at the moment it should be displyed. It is critical for - always enabled debugger because in that case lots of script may have - already been parsed when the front end is opening and pushing all - of them at once may slow things down(even though the script sources will never - be used if scripts panel isn't open). - https://bugs.webkit.org/show_bug.cgi?id=40364 - - * src/js/DevTools.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (.devtools.InspectorBackendImpl.prototype.getScriptSource): - -2010-06-10 Mike Belshe <mbelshe@google.com> - - Reviewed by David Levin - - Track whether a resource is loaded via a proxy. - - https://bugs.webkit.org/show_bug.cgi?id=40312 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasFetchedViaProxy): - (WebKit::WebURLResponse::setWasFetchedViaProxy): - -2010-06-10 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Adding the ANGLE project to the DEPS file as it's required - by the gpu-accelerated compositor. - https://bugs.webkit.org/show_bug.cgi?id=40379 - - * DEPS: - -2010-06-09 Bo Liu <boliu@chromium.org> - - Reviewed by David Levin. - - [Chromium] Pass <video> full screen calls to Chromium port client - https://bugs.webkit.org/show_bug.cgi?id=40317 - - * public/WebViewClient.h: - (WebKit::WebViewClient::supportsFullscreen): - (WebKit::WebViewClient::enterFullscreenForNode): - (WebKit::WebViewClient::exitFullscreenForNode): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::supportsFullscreenForNode): - (WebKit::ChromeClientImpl::enterFullscreenForNode): - (WebKit::ChromeClientImpl::exitFullscreenForNode): - * src/ChromeClientImpl.h: - -2010-06-09 Kenneth Russell <kbr@google.com> - - Reviewed by Dimitri Glazkov. - - Rename FloatArray to Float32Array - https://bugs.webkit.org/show_bug.cgi?id=40323 - - Used do-webcore-rename to perform renaming. Manually undid - incorrect changes to WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp, - WebCore/manual-tests/resources/ArrayParameterTestApplet.java and - ArrayParameterTestApplet.class. Updated LayoutTests. Built and ran - all layout tests on Safari; built Chromium and ran selected WebGL - tests. - - * src/GraphicsContext3D.cpp: - -2010-06-09 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60889. - http://trac.webkit.org/changeset/60889 - https://bugs.webkit.org/show_bug.cgi?id=40365 - - gtk bot has some kind of memory corruption (Requested by - loislo on #webkit). - - * src/InspectorClientImpl.cpp: - * src/InspectorClientImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController): - -2010-06-09 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: retreive debugger script source synchronously when - frontend is attached. We need this to be able to stop on top-level - breakpoints. - https://bugs.webkit.org/show_bug.cgi?id=40289 - - * WebKit.gypi: - * src/DebuggerAgent.h: - * src/DebuggerAgentImpl.cpp: - * src/DebuggerAgentImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): - * src/js/DebuggerScript.js: - * src/js/DevTools.js: - (WebInspector.loaded): - * src/js/DevToolsHostStub.js: - -2010-06-07 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc - data from inspected page to WebInspector as JSON string via http. The native - serialization to JSON string is supported by InspectorValue's classes. This patch - has the implementation of sendMessageToFrontend function. WebKit version of it still - uses ScriptFunctionCall and will be switched to another transport a little bit later. - https://bugs.webkit.org/show_bug.cgi?id=40134 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::sendMessageToFrontend): - * src/InspectorClientImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController): - -2010-06-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: update stack trace after script source editing - https://bugs.webkit.org/show_bug.cgi?id=40357 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.editScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.editScriptSource.requestBacktrace): - (devtools.DebuggerAgent.prototype.editScriptSource.handleBacktraceResponse): - (devtools.DebuggerAgent.prototype.editScriptSource.reportDidCommitEditing): - (devtools.DebuggerAgent.prototype.editScriptSource): - (devtools.DebuggerAgent.prototype.requestBacktrace_): - (devtools.DebuggerAgent.prototype.handleDebuggerOutput_): - (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_): - (devtools.DebuggerAgent.prototype.updateCallFramesFromBacktraceResponse_): - * src/js/InspectorControllerImpl.js: - (.devtools.InspectorBackendImpl.prototype.editScriptSource): - -2010-06-08 Tony Chang <tony@chromium.org> - - Reviewed by David Levin. - - [chromium] compile linux chromium in WebKit/out instead of WebKit/WebKit/chromium/out - https://bugs.webkit.org/show_bug.cgi?id=40285 - - Take 2 at landing this patch, this time rolling DEPS just a bit - further to pick up some chromium fixes. - - * DEPS - * gyp_webkit: - -2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60878. - http://trac.webkit.org/changeset/60878 - https://bugs.webkit.org/show_bug.cgi?id=40349 - - broke linux build (Requested by tony^work on #webkit). - - * DEPS: - * gyp_webkit: - -2010-06-08 Tony Chang <tony@chromium.org> - - Reviewed by David Levin. - - [chromium] compile linux chromium in WebKit/out instead of WebKit/WebKit/chromium/out - https://bugs.webkit.org/show_bug.cgi?id=40285 - - * gyp_webkit: - -2010-06-08 Tony Chang <tony@chromium.org> - - Not reviewed, build fix. - - [chromium] fix linux compile - https://bugs.webkit.org/show_bug.cgi?id=40343 - - * DEPS: - -2010-06-08 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: extend ScriptDebugServer to support script source editing - https://bugs.webkit.org/show_bug.cgi?id=40297 - - * src/js/DebuggerAgent.js: - (devtools.ScriptInfo.prototype.worldType): - * src/js/DebuggerScript.js: - (debuggerScriptConstructor.DebuggerScript.editScriptSource): - * src/js/DevTools.js: - (WebInspector.loaded): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-06-08 Antonio Gomes <tonikitoo@webkit.org> - - Reviewed by Ojan Vafai and Darin Adler. - - Refactor platform dependent editing behavior code out of Settings - https://bugs.webkit.org/show_bug.cgi?id=39854 - - EditingBehavior enum was renamed to EditingBehaviorTypes and moved out from Settings.h to - EditingBehaviorTypes.h . Call sites in WebKit/ adjusted accordingly. - - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setEditingBehavior): -2010-06-07 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] roll chromium DEPS - https://bugs.webkit.org/show_bug.cgi?id=40277 - - * DEPS: - -2010-06-07 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Jian Li. - - Refactor FormData and Blob for better support of Blobs synthesized by BlobBuilder. - https://bugs.webkit.org/show_bug.cgi?id=39083 - - Replace FormDataList::Item list with BlobItemList to get it compiled - with the refactoring in FormDataList. - - * src/WebSearchableFormData.cpp: - (WebCore::HasSuitableTextElement): - -2010-06-07 Andrei Popescu <andreip@google.com> - - Reviewed by Jeremy Orlow. - - [indexedDB] It is impossible to create object stores - https://bugs.webkit.org/show_bug.cgi?id=40054 - - * WebKit.gyp: - * public/WebIDBCallbacks.h: - (WebKit::WebIDBCallbacks::onSuccess): - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::createObjectStore): - * public/WebIDBObjectStore.h: Added. - (WebKit::WebIDBObjectStore::~WebIDBObjectStore): - (WebKit::WebIDBObjectStore::name): - (WebKit::WebIDBObjectStore::keyPath): - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::createObjectStore): - * src/IDBDatabaseProxy.h: - * src/IDBObjectStoreProxy.cpp: Added. - (WebCore::IDBObjectStoreProxy::create): - (WebCore::IDBObjectStoreProxy::IDBObjectStoreProxy): - (WebCore::IDBObjectStoreProxy::~IDBObjectStoreProxy): - (WebCore::IDBObjectStoreProxy::name): - (WebCore::IDBObjectStoreProxy::keyPath): - (WebCore::IDBObjectStoreProxy::indexNames): - (WebCore::IDBObjectStoreProxy::createIndex): - (WebCore::IDBObjectStoreProxy::index): - (WebCore::IDBObjectStoreProxy::removeIndex): - * src/IDBObjectStoreProxy.h: Added. - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::createObjectStore): - * src/WebIDBDatabaseImpl.h: - * src/WebIDBObjectStoreImpl.cpp: Added. - (WebKit::WebIDBObjectStoreImpl::WebIDBObjectStoreImpl): - (WebKit::WebIDBObjectStoreImpl::~WebIDBObjectStoreImpl): - (WebKit::WebIDBObjectStoreImpl::name): - (WebKit::WebIDBObjectStoreImpl::keyPath): - * src/WebIDBObjectStoreImpl.h: Added. - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - -2010-06-07 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: should be possible to distinguish extension scripts from main world scripts - https://bugs.webkit.org/show_bug.cgi?id=40220 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.initUI): - (devtools.DebuggerAgent.prototype.addScriptInfo_): - (devtools.DebuggerAgent.prototype.formatCallFrame_): - (devtools.ScriptInfo.prototype.worldType): - * src/js/DebuggerScript.js: - (debuggerScriptConstructor.DebuggerScript.getScripts): use only context id without context type - when filtering scripts so that extension scripts are also included. - (debuggerScriptConstructor.DebuggerScript._formatScript): - * src/js/devTools.css: - -2010-06-04 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Dimitri Glazkov. - - Accessibility focus change notifications are now sent from - ChromeClientImpl::focusedNodeChanged(). - https://bugs.webkit.org/show_bug.cgi?id=39792 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focus): - (WebKit::ChromeClientImpl::focusedNodeChanged): - -2010-06-04 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - [chromium] Adding support for the left and right Windows keys to the - NativeWebKeyboardEvent. - https://bugs.webkit.org/show_bug.cgi?id=39752 - - * src/gtk/WebInputEventFactory.cpp: - (WebKit::gdkEventToWindowsKeyCode): - -2010-06-04 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Create resource for DebuggerScript.js. - https://bugs.webkit.org/show_bug.cgi?id=40122 - - * WebKit.grd: - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::debuggerScriptSource): - -2010-05-26 MORITA Hajime <morrita@google.com> - - Reviewed by Jian Li. - - [Chromium] Dragging over an element with scrollbars should scroll the element when dragging near edges - https://bugs.webkit.org/show_bug.cgi?id=39725 - - Added WebViewImpl::scrollForDragging() to handle scroll-on-drag. - Note that this change handes both source and destination cases. - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::dragSourceMovedTo): - (WebKit::WebViewImpl::dragTargetDragEnterOrOver): - (WebKit::WebViewImpl::scrollForDragging): - * src/WebViewImpl.h: - -2010-06-03 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - [v8] Web Inspector: show "Object" as description for values with anonymous constructor - https://bugs.webkit.org/show_bug.cgi?id=40121 - - * src/js/DevTools.js: don't call DebuggerAgent methods if ScriptDebugServer is used. - -2010-06-03 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Checking out lighttpd - https://bugs.webkit.org/show_bug.cgi?id=39948 - - - Add lighttpd only on Windows. It is used by new-run-webkit-tests. - - Add libvpx. - - Remove pthreads-win32 from DEPS. - It has not been used since Chromium r28642. - - Update Chromium revision to use Windows resource query code and - webkit_glue dependency fix. - - * DEPS: - -2010-06-02 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] refactor WebKit.gyp's DRT section so the conditions are less messy - https://bugs.webkit.org/show_bug.cgi?id=40104 - - * WebKit.gyp: - -2010-06-02 Tony Chang <tony@chromium.org> - - Not reviewed, build fix in downstream chromium. - - Fix the path to repack.py so it works in a chromium checkout too. - - * WebKit.gyp: - -2010-06-02 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] generate DumpRenderTree.pak on DRT linux - https://bugs.webkit.org/show_bug.cgi?id=40098 - - * WebKit.gyp: - -2010-06-02 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60592. - http://trac.webkit.org/changeset/60592 - https://bugs.webkit.org/show_bug.cgi?id=40099 - - broke the build, need to coordiate updating DEPS (Requested by - tony^work on #webkit). - - * DEPS: - * public/WebMediaPlayer.h: - -2010-06-02 Victoria Kirst <vrk@google.com> - - Reviewed by David Levin. - - Modifying the WebMediaPlayer interface to be compatible with - a change in chrome. - This is a part 2 of 3 one-sided changes to chrome and WebKit. Chrome - has been updated, so this commit should NOT break chromium anymore. - https://bugs.webkit.org/show_bug.cgi?id=39445 - - * DEPS: Updated to a newer chrome revision number. - * public/WebMediaPlayer.h: Changed buffered() to be non-const. - -2010-06-02 Peter Kasting <pkasting@google.com> - - Unreviewed, emergency fix for test crashes (verbal r+ beforehand from - John Gregg). - - Temporarily make notificationObjectDestroyed() a no-op to avoid an - ASSERT failure. - - https://bugs.webkit.org/show_bug.cgi?id=40097 - - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::notificationObjectDestroyed): - -2010-06-02 Sterling Swigart <sswigart@google.com> - - Reviewed by David Levin. - - Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches. - https://bugs.webkit.org/show_bug.cgi?id=39906 - - * features.gypi: - -2010-06-01 James Hawkins <jhawkins@chromium.org> - - UNREVIEWED: build fix. - - Implement the added virtual methods from PopupMenuClient to - TestPopupMenuClient. - - * tests/PopupMenuTest.cpp: - (WebKit::TestPopupMenuClient::selectionChanged): - (WebKit::TestPopupMenuClient::selectionCleared): - -2010-05-24 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement new PopupMenuClient methods selectionChanged() - and selectionCleared(). Expose placeHolder methods and isAutoFilled() - in WebInputElement. - - https://bugs.webkit.org/show_bug.cgi?id=39639 - - * public/WebInputElement.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::didSelectAutoFillSuggestion): - (WebKit::WebViewClient::didClearAutoFillSelection): - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::selectionChanged): - (WebKit::AutoFillPopupMenuClient::selectionCleared): - (WebKit::AutoFillPopupMenuClient::popupDidHide): - * src/AutoFillPopupMenuClient.h: - * src/SuggestionsPopupMenuClient.h: - (WebKit::SuggestionsPopupMenuClient::selectionChanged): - (WebKit::SuggestionsPopupMenuClient::selectionCleared): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::setPlaceholder): - (WebKit::WebInputElement::placeholder): - (WebKit::WebInputElement::isAutofilled): - -2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60483. - http://trac.webkit.org/changeset/60483 - https://bugs.webkit.org/show_bug.cgi?id=40013 - - Breaks Mac and Linux builds (Requested by antonm on #webkit). - - * DEPS: - -2010-06-01 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - IndexedDB cleanup - https://bugs.webkit.org/show_bug.cgi?id=40007 - - Remove the exception code paramter (that hasn't been used for a while). - Add asserts to default implementations. - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::name): - (WebKit::WebIDBDatabase::description): - (WebKit::WebIDBDatabase::version): - (WebKit::WebIDBDatabase::objectStores): - * public/WebIndexedDatabase.h: - (WebKit::WebIndexedDatabase::open): - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-06-01 Anton Muhin <antonm@chromium.org> - - Reviewed by Dimitri Glazkov. - - Rolling Chromium revision to bring recent changes to V8. - - * DEPS: - -2010-06-01 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60470. - http://trac.webkit.org/changeset/60470 - https://bugs.webkit.org/show_bug.cgi?id=39990 - - Need to rollout until bot can be updated (Requested by jorlow - on #webkit). - - * DEPS: - -2010-05-31 Pavel Podivilov <podivilov@chromium.org> - - Reviewed by Pavel Feldman. - - Chromium: save inspector settings as dictionary, not as string. - https://bugs.webkit.org/show_bug.cgi?id=32118 - - * public/WebView.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::didUpdateInspectorSetting): - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::populateSetting): - (WebKit::InspectorClientImpl::storeSetting): - * src/InspectorClientImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::inspectorSetting): - (WebKit::WebViewImpl::setInspectorSetting): - * src/WebViewImpl.h: - -2010-05-31 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - Expose html5 parser enabled flag in WebSettings - https://bugs.webkit.org/show_bug.cgi?id=39913 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setHTML5ParserEnabled): - * src/WebSettingsImpl.h: - -2010-05-31 Lyon Chen <liachen@rim.com> - - Reviewed by Kent Tamura. - - Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. - https://bugs.webkit.org/show_bug.cgi?id=35530 - - Change enum EAlteration from { MOVE, EXTEND } to { AlterationMove, AlterationExtend } and enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT} to { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft } to avoid macro conflict, and also better coding style conformance. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeCommand): - -2010-05-31 Roland Steiner <rolandsteiner@chromium.org> - - Bug 39977 - Missing Chromium bindings for InspectorController methods introduced in r60443 - https://bugs.webkit.org/show_bug.cgi?id=39977 - - add missing InspectorController JS bindings: - - getStyleSheet - - getRuleRangesForStyleSheetId - - Tests: inspector/styles-source-offsets.html - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-05-31 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r60456. - http://trac.webkit.org/changeset/60456 - https://bugs.webkit.org/show_bug.cgi?id=39974 - - Broke Chromium Linux/Max build (Requested by tkent on - #webkit). - - * DEPS: - -2010-05-31 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Checking out lighttpd - https://bugs.webkit.org/show_bug.cgi?id=39948 - - - Checking out lighttpd only on Windows. It is used by new-run-webkit-tests. - - Update Chromium revision to use Windows resource query code - - * DEPS: - -2010-05-31 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: allow hiding Scripts panel from Chromium code. This - is needed to support v8 debugging protocol which has an implementation - that conflicts with debugger provided by the inspector. - https://bugs.webkit.org/show_bug.cgi?id=39952 - - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::exposeV8DebuggerProtocol): - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::WebDevToolsFrontendClient): - (WebKit::WebDevToolsFrontendClient::sendMessageToAgent): - (WebKit::WebDevToolsFrontendClient::sendDebuggerCommandToAgent): - (WebKit::WebDevToolsFrontendClient::sendDebuggerPauseScript): - (WebKit::WebDevToolsFrontendClient::activateWindow): - (WebKit::WebDevToolsFrontendClient::closeWindow): - (WebKit::WebDevToolsFrontendClient::requestDockWindow): - (WebKit::WebDevToolsFrontendClient::requestUndockWindow): - (WebKit::WebDevToolsFrontendClient::hideScriptsPanel): - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::setExposeV8DebuggerProtocol): - * src/DebuggerAgentManager.h: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::hiddenPanels): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::attach): - -2010-05-30 Lyon Chen <liachen@rim.com> - - Reviewed by Kent Tamura. - - This is a coding style cleanup before fixing to bug 35530. - - Enum value FORWARD, BACKWARD, RIGHT, LEFT are causing macro conflicts. - https://bugs.webkit.org/show_bug.cgi?id=35530 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::find): - (WebKit::WebFrameImpl::scopeStringMatches): - (WebKit::WebFrameImpl::createChildFrame): - (WebKit::WebFrameImpl::shouldScopeMatches): - -2010-05-30 Daniel Bates <dbates@rim.com> - - Unreviewed, attempt to fix the build after http://trac.webkit.org/changeset/60418. - - I missed a few call sites in the Chromium source when I - landed http://trac.webkit.org/changeset/60419. - - Credit to Chris Jerdonek for looking over both this patch and the patch - committed in r60419. - - * src/WebSearchableFormData.cpp: - (WebCore::GetButtonToActivate): - (WebCore::HasSuitableTextElement): - -2010-05-30 Daniel Bates <dbates@rim.com> - - Unreviewed, attempt to fix the build after http://trac.webkit.org/changeset/60418. - - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::autofill): - * src/WebFormControlElement.cpp: - (WebKit::WebFormControlElement::formControlName): - (WebKit::WebFormControlElement::formControlType): - * src/WebFormElement.cpp: - (WebKit::WebFormElement::getFormControlElements): - * src/WebPasswordFormUtils.cpp: - (WebKit::findPasswordFormFields): - -2010-05-30 Jessie Berlin <jberlin@webkit.org> - - Reviewed by Pavel Feldman. - - https://bugs.webkit.org/show_bug.cgi?id=39224 - Bug 39224 - Web Inspector: There should be a way to clean up profiles - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-05-29 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - Adding support for a runtime flag to enable accelerated - compositing in chromium. - https://bugs.webkit.org/show_bug.cgi?id=39917 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setAcceleratedCompositingEnabled): - * src/WebSettingsImpl.h: - -2010-05-28 Aaron Boodman <aa@chromium.org> - - Reviewed by Darin Fisher. - - Add isXHTMLDocument() to WebDocument. - - https://bugs.webkit.org/show_bug.cgi?id=39887 - - * public/WebDocument.h: Add isXHTMLDocument(). - * src/WebDocument.cpp: ditto. - (WebKit::WebDocument::isXHTMLDocument): dittorama. - -2010-05-27 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Add IndexedDB's IDBIndex - https://bugs.webkit.org/show_bug.cgi?id=39850 - - Add WebKit layer for IDBIndex. - - * WebKit.gyp: - * public/WebCommon.h: - * public/WebIDBCallbacks.h: - (WebKit::WebIDBCallbacks::onError): - (WebKit::WebIDBCallbacks::onSuccess): - * public/WebIDBDatabase.h: - * public/WebIDBIndex.h: Added. - (WebKit::WebIDBIndex::~WebIDBIndex): - (WebKit::WebIDBIndex::name): - (WebKit::WebIDBIndex::keyPath): - (WebKit::WebIDBIndex::unique): - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IDBDatabaseProxy.cpp: - * src/IDBDatabaseProxy.h: - * src/IDBIndexProxy.cpp: Added. - (WebCore::IDBIndexProxy::create): - (WebCore::IDBIndexProxy::IDBIndexProxy): - (WebCore::IDBIndexProxy::~IDBIndexProxy): - (WebCore::IDBIndexProxy::name): - (WebCore::IDBIndexProxy::keyPath): - (WebCore::IDBIndexProxy::unique): - * src/IDBIndexProxy.h: Added. - * src/WebIDBCallbacksImpl.cpp: - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: - * src/WebIDBDatabaseImpl.cpp: - * src/WebIDBDatabaseImpl.h: - * src/WebIDBIndexImpl.cpp: Added. - (WebKit::WebIDBIndexImpl::WebIDBIndexImpl): - (WebKit::WebIDBIndexImpl::~WebIDBIndexImpl): - (WebKit::WebIDBIndexImpl::name): - (WebKit::WebIDBIndexImpl::keyPath): - (WebKit::WebIDBIndexImpl::unique): - * src/WebIDBIndexImpl.h: Added. - -2010-05-28 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: check that ClientMessageLoopAdapter is not 0 before - accessing its fileds from inspectedViewClosed method. It may be 0 - if inspector frontend has not been open. - https://bugs.webkit.org/show_bug.cgi?id=39876 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - -2010-05-27 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Adam Barth. - - Add v8 bindings for async DB API in workers - https://bugs.webkit.org/show_bug.cgi?id=39145 - - * src/DatabaseObserver.cpp: - We should check that we're on the context thread now, not the main - thread. - (WebCore::DatabaseObserver::databaseOpened): - (WebCore::DatabaseObserver::databaseModified): - (WebCore::DatabaseObserver::databaseClosed): - -2010-05-27 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Resume script execution if user tries to navigate to another URL - https://bugs.webkit.org/show_bug.cgi?id=39842 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::didNavigate): - -2010-05-27 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Implement lazy clearing of renderbuffers - https://bugs.webkit.org/show_bug.cgi?id=36248 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): Clear WebGL internal buffers. - -2010-05-26 Roland Steiner <rolandsteiner@chromium.org> - - Reviewed by NOBODY (layout test crashing fix). - - Bug 39811 - WebPluginListBuilderImpl::addMediaTypeToLastPlugin does not initialize pluginIndex - https://bugs.webkit.org/show_bug.cgi?id=39811 - - Initialize the pluginIndex field (quick fix). - - Tests: covered by fast/dom/prototype-inheritance-2.html - (crashed under Chromium Linux and Windows) - - * src/WebPluginListBuilderImpl.cpp: - (WebKit::WebPluginListBuilderImpl::addMediaTypeToLastPlugin): - -2010-05-26 Anders Carlsson <andersca@apple.com> - - Reviewed by Darin Adler. - - Clean up MimeClassInfo and PluginInfo - https://bugs.webkit.org/show_bug.cgi?id=39700 - - Update for WebCore changes. - - * src/WebPluginListBuilderImpl.cpp: - (WebKit::WebPluginListBuilderImpl::addPlugin): - (WebKit::WebPluginListBuilderImpl::addMediaTypeToLastPlugin): - (WebKit::WebPluginListBuilderImpl::addFileExtensionToLastMediaType): - * src/WebPluginListBuilderImpl.h: - (WebKit::WebPluginListBuilderImpl::WebPluginListBuilderImpl): - -2010-05-26 Jeremy Orlow <jorlow@chromium.org> - - Unreviewed chromium build fix - https://bugs.webkit.org/show_bug.cgi?id=39739 - - The backwards compat function needs to take in a WebSecurityOrigin - instead of a WebString. - - * public/WebIndexedDatabase.h: - (WebKit::WebIndexedDatabase::open): - -2010-05-26 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - Implement WebDOMStorageList and make WebIDBDatabase use it - https://bugs.webkit.org/show_bug.cgi?id=39731 - - * WebKit.gyp: - * public/WebDOMStringList.h: Added. - (WebKit::WebDOMStringList::~WebDOMStringList): - (WebKit::WebDOMStringList::WebDOMStringList): - (WebKit::WebDOMStringList::operator=): - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::objectStores): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::objectStores): - * src/WebDOMStringList.cpp: Added. - (WebKit::WebDOMStringList::reset): - (WebKit::WebDOMStringList::assign): - (WebKit::WebDOMStringList::append): - (WebKit::WebDOMStringList::length): - (WebKit::WebDOMStringList::item): - (WebKit::WebDOMStringList::WebDOMStringList): - (WebKit::WebDOMStringList::operator=): - (WebKit::WebDOMStringList::operator WTF::PassRefPtr<WebCore::DOMStringList>): - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::objectStores): - * src/WebIDBDatabaseImpl.h: - -2010-05-24 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - Add IDBDatabase's attributes - https://bugs.webkit.org/show_bug.cgi?id=39602 - - Plumbing to hook up the synchronous attribute requests - on IDBDatabase. - - * public/WebIDBDatabase.h: - (WebKit::WebIDBDatabase::name): - (WebKit::WebIDBDatabase::description): - (WebKit::WebIDBDatabase::version): - (WebKit::WebIDBDatabase::objectStores): - * src/IDBDatabaseProxy.cpp: - (WebCore::IDBDatabaseProxy::name): - (WebCore::IDBDatabaseProxy::description): - (WebCore::IDBDatabaseProxy::version): - (WebCore::IDBDatabaseProxy::objectStores): - * src/IDBDatabaseProxy.h: - * src/WebIDBDatabaseImpl.cpp: - (WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl): - (WebKit::WebIDBDatabaseImpl::name): - (WebKit::WebIDBDatabaseImpl::description): - (WebKit::WebIDBDatabaseImpl::version): - (WebKit::WebIDBDatabaseImpl::objectStores): - * src/WebIDBDatabaseImpl.h: - -2010-05-24 Dirk Pranke <dpranke@chromium.org> - - Reviewed by Dimitri Glazkov. - - Re-commit r58765 - it had been rolled out to see if it was causing - a perf regression (in r59787 and r59789), but that does not seem to - have been the case. - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::dir): - (WebKit::WebNotification::replaceId): - -2010-05-25 Brett Wilson <brettw@chromium.org> - - Reviewed by Darin Fisher. - - Remove obsolete code for Mac & Windows plugin creation in the Chromium - port. This non-Windows code was to prevent a crash which we no longer - seem to have, and it is preventing other types of plugins from working. - https://bugs.webkit.org/show_bug.cgi?id=39684 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - -2010-05-25 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Enable 3D_CANVAS, FILTERS, METER_TAG and PROGRESS_TAG - https://bugs.webkit.org/show_bug.cgi?id=39652 - - 3D_CANVAS and FILTERS have been enabled for Chromium tree - build. They fix dozens of unexpected test results in a case of - upstreaming build. - Enable METER_TAG and PROGRESS_TAG too because they will be enabled - in Chromium tree in the near future. - - * features.gypi: - -2010-05-25 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - The GraphicsContext that serves as a backing store for the root layer - updates when doing accelerated compositing is now stored in LayerRendererChromium - instead of the Layer itself. Updating code in WebViewImpl to reflect - that change. - https://bugs.webkit.org/show_bug.cgi?id=39640 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::updateRootLayerContents): - -2010-05-24 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - ScriptDebugServer is now implemented as DebugEventListener which means it doesn't - depend on v8 debugging protocol, instead it uses ExecState to collect debugging - info and pass it to the listeners. - - New implementation of ScriptDebugServer uses methods provided by client to dispatch - its messages while JS is paused(previously the messages was dispatched in a callback - passed to v8 along with DebugEventHandler). - - Pause command is dispatched on IO thread. - - https://bugs.webkit.org/show_bug.cgi?id=39594 - - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::ClientMessageLoop::~ClientMessageLoop): - (WebKit::WebDevToolsAgentClient::createClientMessageLoop): Returns an object that allows to run - nested client message loop while script execution is paused on a breakpoint. - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): - * src/DebuggerAgentManager.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::): - (WebKit::WebDevToolsAgentImpl::~WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::attach): - * src/js/DebuggerScript.js: - (debuggerScriptConstructor.DebuggerScript.getAfterCompileScript): - (debuggerScriptConstructor.DebuggerScript.stepIntoStatement): - (debuggerScriptConstructor.DebuggerScript.stepOverStatement): - (debuggerScriptConstructor.DebuggerScript.stepOutOfFunction): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (else.devtools.InspectorBackendImpl.prototype.pauseInDebugger): Pause command should be handled on IO - thread so that script can be paused even if it's in an infinite loop. - -2010-05-25 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Add memory graph to Timeline overview pane. - - https://bugs.webkit.org/show_bug.cgi?id=37879 - - * src/js/devTools.css: - (.timeline-category-statusbar-item input): - -2010-05-24 Tony Chang <tony@chromium.org> - - Reviewed by David Levin. - - [chromium] Fix zoom tests after r60104 - https://bugs.webkit.org/show_bug.cgi?id=39645 - - m_zoomFactor moved from Frame to FrameView. FrameView has separate - notions of page zoom and text zoom. In my hurried compile fix, I - assumed that m_zoomFactor was for page zoom, but it's not always. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-05-24 Kent Tamura <tkent@chromium.org> - - Unreviewed. Sort features. - - * features.gypi: - -2010-05-24 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Import layout_test_helper for Windows - https://bugs.webkit.org/show_bug.cgi?id=39581 - - * WebKit.gyp: Add a build rule for LayoutTestHelper.exe for Windows. - -2010-05-24 Marcus Bulach <bulach@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] Adds WebGeolocationServiceMockImpl to remove public dependency on wtf/HashMap.h - https://bugs.webkit.org/show_bug.cgi?id=39587 - - * public/WebGeolocationServiceMock.h: - * src/WebGeolocationServiceMock.cpp: - (WebKit::WebGeolocationServiceMockImpl::~WebGeolocationServiceMockImpl): - (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock): - (WebKit::WebGeolocationServiceMockImpl::requestPermissionForFrame): - (WebKit::WebGeolocationServiceMockImpl::attachBridge): - (WebKit::WebGeolocationServiceMockImpl::detachBridge): - -2010-05-24 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] setup fonts on chromium linux DRT - https://bugs.webkit.org/show_bug.cgi?id=39644 - - * WebKit.gyp: - -2010-05-24 Tony Chang <tony@chromium.org> - - Not reviewed, build fix. - - Fix the chromium compile due to pageZoomFactor refactoring. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-05-24 Darin Adler <darin@apple.com> - - Reviewed by Eric Seidel. - - Move view-related functions from Frame to FrameView - https://bugs.webkit.org/show_bug.cgi?id=39366 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): Call setZoomLevel on FrameView. - -2010-05-24 Anders Carlsson <andersca@apple.com> - - Attempt to fix the Chromium build. - - * src/WebViewImpl.cpp: - -2010-05-21 Tony Chang <tony@chromium.org> - - Reviewed by Ojan Vafai. - - [chromium] if keydown is prevented, don't update the IME and clear the IME state - https://bugs.webkit.org/show_bug.cgi?id=39475 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleCompositionEvent): - -2010-05-23 Roman Gershman <romange@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Suggestion popup is not closed when the view is scrolled. - https://bugs.webkit.org/show_bug.cgi?id=38640 - - This bug appears on both Windows and Linux platforms. - Mac OS, however handles window messages differently and - closes popup menu in RenderWidgetHostViewMac::Destroy(). - - No tests were added because test_shell does not support suggestion - popup. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::invalidateContentsForSlowScroll): - (WebKit::ChromeClientImpl::scroll): - -2010-05-23 Marcus Bulach <bulach@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] Adds Geolocation support to DumpRenderTree. - https://bugs.webkit.org/show_bug.cgi?id=39440 - - Existing LayoutTests/fast/dom/Geolocation/* should pass. - - * public/WebGeolocationServiceMock.h: - * src/WebGeolocationServiceMock.cpp: - (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission): - (WebKit::WebGeolocationServiceMock::requestPermissionForFrame): - (WebKit::WebGeolocationServiceMock::attachBridge): - (WebKit::WebGeolocationServiceMock::detachBridge): - -2010-05-22 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Link resources and load Ahem font for Windows - https://bugs.webkit.org/show_bug.cgi?id=39473 - - * WebKit.gyp: - Add net and webkit resources for Windows. - Copy AHEM____.TTF to DumpRenderTree.exe directory. - -2010-05-21 Steve Block <steveblock@google.com> - - Reviewed by Jeremy Orlow. - - Add DeviceOrientation and DeviceOrientationClient - https://bugs.webkit.org/show_bug.cgi?id=39479 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2010-05-20 Viet-Trung Luu <viettrungluu@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Don't rely on focused node to route mouse events to plugins. - https://bugs.webkit.org/show_bug.cgi?id=39375 - http://crbug.com/43935 - - On mouse down, do a hit test and check if a plugin was hit. If so, then - save the node for future mouse events (until mouse up or capture lost). - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::handleInputEvent): - (WebKit::WebViewImpl::mouseCaptureLost): - * src/WebViewImpl.h: Remove m_haveMouseCapture; add m_mouseCaptureNode. - -2010-05-20 Dominic Mazzoni <dmazzoni@chromium.org> - - Reviewed by Darin Fisher. - - Add headingLevel and setFocused methods. - - https://bugs.webkit.org/show_bug.cgi?id=39238 - - * public/WebAccessibilityObject.h: - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::headingLevel): - (WebKit::WebAccessibilityObject::setFocused): - -2010-05-20 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Map RGBA4/RGB5_A1 to RGBA and RGB565 to RGB in RenderbufferStorage - https://bugs.webkit.org/show_bug.cgi?id=39077 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::renderbufferStorage): Mapping the enums. - -2010-05-20 Abhishek Arya <inferno@chromium.org> - - Reviewed by Adam Barth. - - Added method to WebSecurityOrigin for invoking - SecurityOrigin::canAccessPasswordManager. - https://bugs.webkit.org/show_bug.cgi?id=38916 - - * public/WebSecurityOrigin.h: - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::canAccessPasswordManager): - -2010-05-20 Darin Fisher <darin@chromium.org> - - Reviewed by Nate Chapin. - - [chromium] Provide a way to catch exceptions thrown while interacting - with a NPObject via WebBindings methods. - https://bugs.webkit.org/show_bug.cgi?id=39378 - - * public/WebBindings.h: - * src/WebBindings.cpp: - (WebKit::WebBindings::pushExceptionHandler): - (WebKit::WebBindings::popExceptionHandler): - -2010-05-20 Jian Li <jianli@chromium.org> - - Reviewed by David Levin. - - Rename GenericWorkerTask.h to CrossThreadTask.h and move it to dom directory. - https://bugs.webkit.org/show_bug.cgi?id=39135 - - * src/WebSharedWorkerImpl.cpp: - * src/WebWorkerBase.cpp: - * src/WebWorkerClientImpl.cpp: - * src/WebWorkerImpl.cpp: - -2010-05-20 Martin Robinson <mrobinson@webkit.org> - - Reviewed by Ojan Vafai. - - Expose the editing behavior setting in DRT to test all editing code paths - https://bugs.webkit.org/show_bug.cgi?id=38603 - - * public/WebSettings.h: - (WebKit::WebSettings::): Added an enum for EditingBehavior types. - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setEditingBehavior): Added. - * src/WebSettingsImpl.h: - -2010-05-19 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - Modifying WebViewImpl to support new hardware compositing for - LayerChromium layers. - https://bugs.webkit.org/show_bug.cgi?id=38783 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::updateRootLayerContents): - (WebKit::WebViewImpl::setRootLayerNeedsDisplay): - -2010-05-19 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] disable spelling suggestions if spellcheck=false - https://bugs.webkit.org/show_bug.cgi?id=39402 - - This is the Chromium fix for bug 25639 that was fixed in the - other ports in r59585. - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - -2010-05-19 Darin Fisher <darin@chromium.org> - - Revert r59790 due to failing Chromium npruntime tests. - - * public/WebBindings.h: - * src/WebBindings.cpp: - -2010-05-19 Darin Fisher <darin@chromium.org> - - Reviewed by Nate Chapin. - - [chromium] Provide a way to catch exceptions thrown while interacting - with a NPObject via WebBindings methods. - https://bugs.webkit.org/show_bug.cgi?id=39378 - - * public/WebBindings.h: - * src/WebBindings.cpp: - (WebKit::WebBindings::pushExceptionHandler): - (WebKit::WebBindings::popExceptionHandler): - -2010-05-19 Dirk Pranke <dpranke@chromium.org> - - Try again to roll out r58765. - - * public/WebNotification.h: - * src/WebNotification.cpp: - -2010-05-19 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r59782. - http://trac.webkit.org/changeset/59782 - https://bugs.webkit.org/show_bug.cgi?id=39379 - - broke DRT build (Requested by dpranke on #webkit). - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::dir): - (WebKit::WebNotification::replaceId): - -2010-05-19 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - Remove obsolete ChromiumBridge code that routes FileSystem calls to WebKitClient. - https://bugs.webkit.org/show_bug.cgi?id=39332 - - * public/WebKitClient.h: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::fileExists): - (WebCore::ChromiumBridge::deleteFile): - (WebCore::ChromiumBridge::deleteEmptyDirectory): - (WebCore::ChromiumBridge::getFileSize): - (WebCore::ChromiumBridge::getFileModificationTime): - (WebCore::ChromiumBridge::directoryName): - (WebCore::ChromiumBridge::pathByAppendingComponent): - (WebCore::ChromiumBridge::makeAllDirectories): - (WebCore::ChromiumBridge::getAbsolutePath): - (WebCore::ChromiumBridge::isDirectory): - (WebCore::ChromiumBridge::filePathToURL): - -2010-05-19 Marcus Bulach <bulach@chromium.org> - - Reviewed by Steve Block. - - [chromium] Adds supports for layout tests using GeolocationServiceMock. - https://bugs.webkit.org/show_bug.cgi?id=39081 - - Allows injection of GeolocationServiceMock factory. - Tests: existing fast/dom/Geolocation/* - - * WebKit.gyp: - * public/WebGeolocationServiceMock.h: Added. - * src/WebGeolocationServiceMock.cpp: Added. - (WebCore::GeolocationServiceChromiumMock::create): - (WebCore::GeolocationServiceChromiumMock::GeolocationServiceChromiumMock): - (WebCore::GeolocationServiceChromiumMock::startUpdating): - (WebCore::GeolocationServiceChromiumMock::stopUpdating): - (WebCore::GeolocationServiceChromiumMock::lastPosition): - (WebCore::GeolocationServiceChromiumMock::lastError): - (WebCore::GeolocationServiceChromiumMock::geolocationServicePositionChanged): - (WebCore::GeolocationServiceChromiumMock::geolocationServiceErrorOccurred): - (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition): - (WebKit::WebGeolocationServiceMock::setMockGeolocationError): - -2010-05-17 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - Hook Chromium's WebIndexedDatabaseImpl up to IndexedDatabaseImpl - https://bugs.webkit.org/show_bug.cgi?id=39216 - - Web____Impl is for re-entering the WebKit layer from the browser layer. - Thus the previous IDBCallbacksProxy was mis-named (and should have been - WebIDBCallbacksImpl). This patch renames it and then implements the - proper proxy (which is for going from WebCore to WebKit). - - Also change using security origin strings to using WebSecurityOrigin - objects. - - This patch also implements the glue between WebIndexedDatabaseImpl and - IndexedDatabaseImpl. - - * WebKit.gyp: - * src/IDBCallbacksProxy.cpp: - (WebCore::IDBCallbacksProxy::create): - (WebCore::IDBCallbacksProxy::IDBCallbacksProxy): - (WebCore::IDBCallbacksProxy::onError): - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: - * src/WebIDBCallbacksImpl.cpp: Added. - (WebCore::WebIDBCallbacksImpl::WebIDBCallbacksImpl): - (WebCore::WebIDBCallbacksImpl::~WebIDBCallbacksImpl): - (WebCore::WebIDBCallbacksImpl::onError): - (WebCore::WebIDBCallbacksImpl::onSuccess): - * src/WebIDBCallbacksImpl.h: Added. - * src/WebIDBDatabaseImpl.cpp: Added. - (WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl): - (WebKit::WebIDBDatabaseImpl::~WebIDBDatabaseImpl): - * src/WebIDBDatabaseImpl.h: Added. - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::WebIndexedDatabaseImpl): - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-05-18 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Fix a repaint issue and textarea tests - https://bugs.webkit.org/show_bug.cgi?id=39054 - - * DEPS: Update to Chromium r47248 to use a fix for CommandLine assertion - and textAreaResizeCorner.png - * WebKit.gyp: Add textAreaResizeCorner.png as a Mac resource - -2010-05-18 Tony Chang <tony@chromium.org> - - Reviewed by Ojan Vafai. - - [chromium] ignore IME events if the keydown event was prevented - https://bugs.webkit.org/show_bug.cgi?id=37692 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::handleCompositionEvent): - -2010-05-18 MORITA Hajime <morrita@google.com> - - Reviewed by Kent Tamura. - - [Chromium] Windows: Determinate progress bar should have glossy overlay - https://bugs.webkit.org/show_bug.cgi?id=39269 - - Changed WebThemeEngine::drawProgressBar() signature to delegate - theme implementation detail to the engine. - Chromium side will come to http://crbug.com/44430. - - No new tests, animation effect can be confirmed only manually. - - * public/WebThemeEngine.h: - (WebKit::WebThemeEngine::paintProgressBar): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::paintProgressBar): - -2010-05-16 Mike Belshe <mbelshe@chromium.org> - - Reviewed by Dimitri Glazkov. - - Add a flag to the ResourceResponse for tracking if a request was - fetched via the TLS/Next-Protocol-Negotiation mechanism. - - Also cleaned up the style in ResourceResponse to group the flags - together (and alphabetically) and hopefully improve readability of - the file. - - https://bugs.webkit.org/show_bug.cgi?id=39078 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasNpnNegotiated): - (WebKit::WebURLResponse::setWasNpnNegotiated): - -2010-05-16 Eric Seidel <eric@webkit.org> - - Unreviewed, rolling out r59571. - http://trac.webkit.org/changeset/59571 - https://bugs.webkit.org/show_bug.cgi?id=39054 - - Broke Cr Win, but we didn't notice immediately due to - https://bugs.webkit.org/show_bug.cgi?id=38926. It's possible - that this didn't actually break Cr Win, but rather that bug - 38926 necessitates a clean compile after this and sucessive - checkins only produced a partial recompile and thus failed to - build. - - * DEPS: - * WebKit.gyp: - * features.gypi: - -2010-05-16 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r59574. - http://trac.webkit.org/changeset/59574 - https://bugs.webkit.org/show_bug.cgi?id=39176 - - Supposedly broke cr-win, but the errors seems somewhat - unrelated (Requested by abarth on #webkit). - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - -2010-05-16 Mike Belshe <mbelshe@chromium.org> - - Reviewed by Dimitri Glazkov. - - Add a flag to the ResourceResponse for tracking if a request was - fetched via the TLS/Next-Protocol-Negotiation mechanism. - - Also cleaned up the style in ResourceResponse to group the flags - together (and alphabetically) and hopefully improve readability of - the file. - - https://bugs.webkit.org/show_bug.cgi?id=39078 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasNpnNegotiated): - (WebKit::WebURLResponse::setWasNpnNegotiated): - -2010-05-16 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Fix repaint, WebGL, textarea tests - https://bugs.webkit.org/show_bug.cgi?id=39054 - - * DEPS: Update to Chromium r47248 to use a fix for CommandLine assertion - and textAreaResizeCorner.png - * WebKit.gyp: Add textAreaResizeCorner.png as a Mac resource - * features.gypi: Enable ENABLE_3D_CANVAS. - -2010-05-15 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - [chromium] Expose element accessor on WebPluginContainer - https://bugs.webkit.org/show_bug.cgi?id=39152 - - * public/WebPluginContainer.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::element): - * src/WebPluginContainerImpl.h: - -2010-05-15 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Dmitry Titov. - - Implement canEstablishDatabase call for workers. - https://bugs.webkit.org/show_bug.cgi?id=38742 - - * public/WebCommonWorkerClient.h: - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::canEstablishDatabase): - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::allowDatabase): - (WebKit::WebWorkerBase::allowDatabaseTask): - (WebKit::WebWorkerBase::AllowDatabaseMainThreadBridge::AllowDatabaseMainThreadBridge): - (WebKit::WebWorkerBase::AllowDatabaseMainThreadBridge::cancel): - (WebKit::WebWorkerBase::AllowDatabaseMainThreadBridge::result): - (WebKit::WebWorkerBase::AllowDatabaseMainThreadBridge::signalCompleted): - (WebKit::WebWorkerBase::AllowDatabaseMainThreadBridge::didComplete): - * src/WebWorkerBase.h: - * src/WebWorkerClientImpl.h: - (WebKit::WebWorkerClientImpl::allowDatabase): - -2010-05-15 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Adding a notification on WebViewClient when a new - node gets focused. - https://bugs.webkit.org/show_bug.cgi?id=38508 - - * public/WebViewClient.h: - (WebKit::WebViewClient::focusedNodeChanged): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::focusedNodeChanged): - -2010-05-15 Evan Stade <estade@chromium.org> - - Reviewed by Adam Barth. - - [chromium] "Check spelling in this field" context menu item always checked - https://bugs.webkit.org/show_bug.cgi?id=39018 - - Initialize all POD members of WebContextMenuData in a default - constructor. - - No tests because this code would need some major refactoring to unit - test, and AFAICT it's not testable via layout tests. See note at top - of getCustomMenuFromDefaultItems. - - * public/WebContextMenuData.h: - (WebKit::WebContextMenuData::WebContextMenuData): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - -2010-05-14 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Remove temporary relative include paths - https://bugs.webkit.org/show_bug.cgi?id=38776 - - * public/WebPasswordAutocompleteListener.h: - * src/FrameLoaderClientImpl.h: - * src/PlatformMessagePortChannel.h: - * src/WebAnimationControllerImpl.h: - * src/WebBindings.cpp: - * src/WebDataSourceImpl.h: - * src/WebDevToolsAgentPrivate.h: - * src/WebFileChooserCompletionImpl.h: - * src/WebFrameImpl.h: - * src/WebInputEventConversion.h: - * src/WebPluginContainerImpl.h: - * src/WebPluginLoadObserver.h: - * src/WebPopupMenuImpl.h: - * src/WebSettingsImpl.h: - * src/WebViewImpl.h: - * src/WebWorkerClientImpl.h: - * src/WrappedResourceRequest.h: - * src/WrappedResourceResponse.h: - -2010-05-14 Anton Muhin <antonm@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Consider implementing addOriginAccessWhitelistEntry method - https://bugs.webkit.org/show_bug.cgi?id=37578 - - Remove deprecated methods. - - * public/WebSecurityPolicy.h: - * src/WebSecurityPolicy.cpp: - -2010-05-14 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Adler. - - Rename WebGLArray types to TypedArray types - https://bugs.webkit.org/show_bug.cgi?id=39091 - - Extended functionality of do-webcore-rename script and used it to - rename the WebGLArray types to the TypedArray naming convention. - The only source files which were touched by hand, and which are - being manually reviewed, are: - WebCore/page/DOMWindow.idl - WebCore/bindings/generic/RuntimeEnabledFeatures.h (script's changes undone) - WebKit/WebCore/bindings/js/JSDOMWindowCustom.cpp - WebKit/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp - These only needed to be touched to update the aliases between the - WebGLArray and TypedArray names introduced in bug 39036. (It was - not feasible to have do-webcore-rename handle this as it would - introduce circular renamings.) These aliases will be removed in - roughly a month once existing WebGL content has been updated. - - No new tests; covered under existing WebGL tests. Updated - constructed-objects-prototypes and prototype-inheritance-2 tests. - Ran all layout tests in Safari and all WebGL tests in Chromium. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - -2010-05-14 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Eric Seidel. - - Make ImageDiff depend on webkit (again). - https://bugs.webkit.org/show_bug.cgi?id=39000 - - * WebKit.gyp: - -2010-05-14 James Simonsen <simonjam+webkit@google.com> - - Reviewed by Darin Fisher. - - [chromium] Expose volume through WebMediaPlayerClient - https://bugs.webkit.org/show_bug.cgi?id=38947 - - * public/WebMediaPlayerClient.h: - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::volume): - * src/WebMediaPlayerClientImpl.h: - -2010-05-14 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Update chromium port to send/receive cached metadata - https://bugs.webkit.org/show_bug.cgi?id=38665 - - * public/WebKitClient.h: - (WebKit::WebKitClient::cacheMetadata): - * public/WebURLLoaderClient.h: - (WebKit::WebURLLoaderClient::didReceiveCachedMetadata): - * public/WebURLResponse.h: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::cacheMetadata): - * src/ResourceHandle.cpp: - (WebCore::ResourceHandleInternal::didReceiveCachedMetadata): - (WebCore::ResourceHandle::cacheMetadata): - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::responseTime): - (WebKit::WebURLResponse::setResponseTime): - -2010-05-13 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] enable DRT build in chromium (for the last time) - https://bugs.webkit.org/show_bug.cgi?id=39109 - - * WebKit.gyp: - -2010-05-13 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: main inspector toolbar takes noticeable time to expand. - - https://bugs.webkit.org/show_bug.cgi?id=39013 - - * src/js/DevTools.js: - (devtools.domContentLoaded): - -2010-05-12 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - [Chromium] Remove transitional functions from WebStorageNamespace and WebViewClient. - https://bugs.webkit.org/show_bug.cgi?id=38985 - - These functions are no longer called as of Chromium revision 47020. - This is part of resolving http://crbug.com/42740 - - * public/WebStorageNamespace.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::createSessionStorageNamespace): - -2010-05-12 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] disable DRT in chromium again - https://bugs.webkit.org/show_bug.cgi?id=39049 - - * WebKit.gyp: - -2010-05-12 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Disable WebScrollbarImpl's scrollbar if it's not needed - https://bugs.webkit.org/show_bug.cgi?id=39025 - - * src/WebScrollbarImpl.cpp: - (WebKit::WebScrollbarImpl::setLocation): - (WebKit::WebScrollbarImpl::setDocumentSize): - -2010-05-12 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Dimitri Glazkov. - - Removing the unnecessary dirfd parameter. - https://bugs.webkit.org/show_bug.cgi?id=38869 - - * public/WebKitClient.h: - (WebKit::WebKitClient::databaseOpenFile): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::databaseOpenFile): - -2010-05-12 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Steve Block. - - [Chromium] Pass the origin parameter for WebIndexedDatabase::open - https://bugs.webkit.org/show_bug.cgi?id=38983 - - * public/WebIndexedDatabase.h: - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-05-10 yael aharon <yael.aharon@nokia.com> - - Reviewed by Darin Adler. - - Support control attribute of HTMLLabelElement - https://bugs.webkit.org/show_bug.cgi?id=38688 - - Renamed HTMLLabelElement::correspondingControl to HTMLLabelElement::control - - * src/WebLabelElement.cpp: - (WebKit::WebLabelElement::correspondingControl): - -2010-05-12 MORITA Hajime <morrita@google.com> - - Reviewed by Kent Tamura. - - [Chromium] Support HTML5 <progress> element on Windows. - https://bugs.webkit.org/show_bug.cgi?id=37308 - - Extended ChromiumBridge to handle progress bar painting, - and added delegations to it. - - No new tests. Test cases should be shared with existing ones for - progress element. Expectaions will be added after PROGRESS_TAG is - enabled on Chromium tree. - - * public/WebThemeEngine.h: - (WebKit::WebThemeEngine::paintProgressBar): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::paintProgressBar): - -2010-05-12 Marcus Bulach <bulach@chromium.org> - - Reviewed by Steve Block. - - Attaches the geolocation bridge later on startUpdating(). - This prevents a page requesting permission when it has just accessed navigator.geolocation (without calling navigator.geolocation.getCurrentPosition/watchPosition). - Note: when Geolocation::haveSuitableCachedPosition(), WebGeolocationServiceBridgeImpl::startUpdating() is not called, - so we attach the bridge if needed at requestGeolocationPermissionForFrame(). - https://bugs.webkit.org/show_bug.cgi?id=38323 - http://crbug.com/42789 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded): - (WebKit::WebGeolocationServiceBridgeImpl::setLastPosition): - -2010-05-12 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] add DRT back to the chromium build - https://bugs.webkit.org/show_bug.cgi?id=38978 - - * WebKit.gyp: - -2010-05-11 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Apply recent changes of test_shell to DRT - https://bugs.webkit.org/show_bug.cgi?id=38895 - - * DEPS: Update Chromium revision to use the recent webkit_support change. - * WebKit.gyp: Add JavaScriptCore/wtf to 'include' section. - * src/WebGraphicsContext3D.cpp: - Remove ENABLE(3D_CANVAS) to provide an empty implementation of - WebGraphicsContext3D::createDefault(). - -2010-05-11 Avi Drissman <avi@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Pipe RTL info into WebPopupMenuInfo - https://bugs.webkit.org/show_bug.cgi?id=38749 - - * public/WebPopupMenuInfo.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::getPopupMenuInfo): - -2010-05-11 David Holloway <dhollowa@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add size method to WebInputElement class, providing same data - as HTMLInputElement::size(). During form AutoFill Chromium needs to - access the input element's size attribute in aid of form matching and - filling heuristics. - - https://bugs.webkit.org/show_bug.cgi?id=38825 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::size): - -2010-05-11 Nate Chapin <japhet@chromium.org> - - Reviewed by Adam Barth. - - Crash fix in WebPageSerializerImpl::serialize(). - - https://bugs.webkit.org/show_bug.cgi?id=38543 - - The relevant test is a test_shell_test in src.chromium.org, because neither - DRT nor the Chromium webkit unit tests can currently cover the serializer - functionality. - - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::serialize): Check each frame's url before using it, - since they are not guaranteed to be valid (e.g., if the frame was treated as a download). - -2010-05-11 Jian Li <jianli@chromium.org> - - Reviewed by Dmitry Titov. - - Expose FileReader interface. - https://bugs.webkit.org/show_bug.cgi?id=38609 - - * features.gypi: turn on building FileReader for Chromium. - -2010-05-10 Tony Chang <tony@chromium.org> - - Reviewed by Kent Tamura. - - [chromium] don't build DRT in chromium checkouts due to a circular gyp dependency - https://bugs.webkit.org/show_bug.cgi?id=38889 - - * WebKit.gyp: - -2010-05-10 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add WebKitScrollbar interface to allow Chromium code to reuse the scrollbar code - https://bugs.webkit.org/show_bug.cgi?id=38854 - - * public/WebScrollbar.h: Added. - (WebKit::WebScrollbar::): - (WebKit::WebScrollbar::~WebScrollbar): - * public/WebScrollbarClient.h: Added. - * public/WebThemeEngine.h: - * src/AssertMatchingEnums.cpp: - * src/WebScrollbarImpl.cpp: Added. - (WebKit::WebScrollbar::create): - (WebKit::WebScrollbar::defaultThickness): - (WebKit::WebScrollbarImpl::WebScrollbarImpl): - (WebKit::WebScrollbarImpl::~WebScrollbarImpl): - (WebKit::WebScrollbarImpl::setLocation): - (WebKit::WebScrollbarImpl::value): - (WebKit::WebScrollbarImpl::setValue): - (WebKit::WebScrollbarImpl::setDocumentSize): - (WebKit::WebScrollbarImpl::scroll): - (WebKit::WebScrollbarImpl::paint): - (WebKit::WebScrollbarImpl::handleInputEvent): - (WebKit::WebScrollbarImpl::onMouseDown): - (WebKit::WebScrollbarImpl::onMouseUp): - (WebKit::WebScrollbarImpl::onMouseMove): - (WebKit::WebScrollbarImpl::onMouseLeave): - (WebKit::WebScrollbarImpl::onMouseWheel): - (WebKit::WebScrollbarImpl::onKeyDown): - (WebKit::WebScrollbarImpl::valueChanged): - (WebKit::WebScrollbarImpl::invalidateScrollbarRect): - (WebKit::WebScrollbarImpl::isActive): - (WebKit::WebScrollbarImpl::scrollbarCornerPresent): - (WebKit::WebScrollbarImpl::getTickmarks): - * src/WebScrollbarImpl.h: Added. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::scrollViewWithKeyboard): - (WebKit::WebViewImpl::mapKeyCodeForScroll): - * src/WebViewImpl.h: - -2010-05-10 Tony Gentilcore <tonyg@chromium.org> - - Reviewed by Adam Barth. - - Provide mechanism to cache metadata for a resource - https://bugs.webkit.org/show_bug.cgi?id=37874 - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::cacheMetadata): - -2010-05-10 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - [Chromium] Add quota parameter to WebViewClient::createSessionStorageNamespace() - https://bugs.webkit.org/show_bug.cgi?id=38750 - - Put a per-origin quota on session storage since it is using memory in - the browser process, and should not be allowed to grow arbitrarily - large. See also http://trac.webkit.org/changeset/58828. - - * public/WebStorageNamespace.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::createSessionStorageNamespace): - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::sessionStorageNamespace): - - -2010-05-10 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - Change IndexedDB to use events instead of callbacks - https://bugs.webkit.org/show_bug.cgi?id=38594 - - Change the glue here to match the changes I made in WebCore. - - * WebKit.gyp: - * public/WebIDBCallbacks.h: - * public/WebIndexedDatabase.h: - * src/IDBCallbacksProxy.cpp: Added. - (WebCore::IDBCallbacksProxy::IDBCallbacksProxy): - (WebCore::IDBCallbacksProxy::~IDBCallbacksProxy): - (WebCore::IDBCallbacksProxy::onError): - (WebCore::IDBCallbacksProxy::onSuccess): - * src/IDBCallbacksProxy.h: - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-05-08 Jens Alfke <snej@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] WebFrame::registerPasswordListener shouldn't assert on duplicate listener. - https://bugs.webkit.org/show_bug.cgi?id=38765 - - * public/WebFrame.h: - (WebKit::WebFrameImpl::registerPasswordListener): Changed return type to bool. Updated comment. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::registerPasswordListener): Return false instead of asserting. - * src/WebFrameImpl.h: - (WebKit::WebFrameImpl::registerPasswordListener): Changed return type to bool. - -2010-05-08 Michael Nordman <michaeln@google.com> - - Reviewed by Dmitry Titov. - - Add an additional parameter to the WebSharedWorker::startWorkerContext method - to indicate which appcache the shared worker script resource was loaded from, - and provide that value when calling out to chrome via this interface. - https://bugs.webkit.org/show_bug.cgi?id=38605 - - I'm keeping the old method around until patches can land in both repositories - that make the old method obsolete and unneeded. There's a FIXME for that. - - Also somewhat related but independent change to propagate the runtime enabled - flag thru to the page settings instance used by the 'shadow page'. - - * public/WebSharedWorker.h: Add the new param (but keep the old interface around for now too) - (WebKit::WebSharedWorker::startWorkerContext): - * src/SharedWorkerRepository.cpp: Provide the value when calling out to chrome. - (WebCore::SharedWorkerScriptLoader::notifyFinished): - * src/WebSharedWorkerImpl.cpp: - (WebKit::WebSharedWorkerImpl::startWorkerContext): - * src/WebSharedWorkerImpl.h: - * src/WebWorkerBase.cpp: Propagate runtime enabled flag thru to the page settings. - (WebKit::WebWorkerBase::initializeLoader): - -2010-05-07 Darin Fisher <darin@chromium.org> - - Fix build bustage. Update to Chromium code that avoids a bad - dependency from net/ on chrome/. - - * DEPS: - -2010-05-07 Darin Fisher <darin@chromium.org> - - Fix build bustage. Update to Chromium code that no longer uses - deprecated methods. - - * DEPS: - -2010-05-07 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] clear out more deprecated methods that are no longer used - https://bugs.webkit.org/show_bug.cgi?id=38702 - - * public/WebFrame.h: - * public/WebNode.h: - * src/WebFrameImpl.cpp: - * src/WebFrameImpl.h: - * src/WebNode.cpp: - -2010-05-07 Finnur Thorarinsson <finnur.webkit@gmail.com> - - Reviewed by Dimitri Glazkov. - - [chromium]: Fixing Find in page crash on sites.google.com - https://bugs.webkit.org/show_bug.cgi?id=38591 - - setMarkerActive should not try to set a collapsed marker as - active. This can happen when you Edit a Sites page after doing - a Find operation and then you press FindNext. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::setMarkerActive): - -2010-05-06 Kent Tamura <tkent@chromium.org> - - Reviewed by Dimitri Glazkov. - - [DRT/Chromium] Add support for resources on Mac - https://bugs.webkit.org/show_bug.cgi?id=38637 - - * DEPS: Check out tools/data_pack. - -2010-05-06 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Chromium Dev Tools: Large toolbar icons flash when dev - tools is opened in docked mode. - - https://bugs.webkit.org/show_bug.cgi?id=38631 - - * src/js/DevTools.js: - (devtools.domContentLoaded): - -2010-05-06 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - drop support for sessionStorage in sandbox iframes - https://bugs.webkit.org/show_bug.cgi?id=38151 - - Update client of sessionStorage to handle exceptions. - - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::storageEvent): - -2010-05-05 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] clear out deprecated methods that are no longer used - https://bugs.webkit.org/show_bug.cgi?id=38610 - - * public/WebFormElement.h: - * public/WebInputElement.h: - * public/WebKitClient.h: - * public/WebView.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::createPopupMenu): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - * src/WebFormElement.cpp: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::setSelectionRange): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::hideSuggestionsPopup): - * src/WebViewImpl.h: - -2010-05-05 Hans Wennborg <hans@chromium.org> - - Reviewed by Jeremy Orlow. - - [chromium] Add quota parameter to WebStorageNamespace::createSessionStorageNamespace - https://bugs.webkit.org/show_bug.cgi?id=38589 - - * public/WebStorageNamespace.h: - (WebKit::WebStorageNamespace::createSessionStorageNamespace): - * src/WebStorageNamespaceImpl.cpp: - (WebKit::WebStorageNamespace::createSessionStorageNamespace): - -2010-05-05 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by Darin Fisher. - - Update the plugin container's setFocus implementation to pass the new - boolean argument to the next layer. - - https://bugs.webkit.org/show_bug.cgi?id=37961 - - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::setFocus): - * src/WebPluginContainerImpl.h: - -2010-05-04 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - Provide an API for querying whether a WebWidget is using gpu accelerated compositing. - Also changed: isAcceleratedCompositing to: isAcceleratedCompositingActive. - https://bugs.webkit.org/show_bug.cgi?id=38220 - - * public/WebWidget.h: - * src/WebPopupMenuImpl.h: - (WebKit::WebPopupMenuImpl::isAcceleratedCompositingActive): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::isAcceleratedCompositingActive): - (WebKit::WebViewImpl::setRootGraphicsLayer): - (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): - (WebKit::WebViewImpl::updateRootLayerContents): - * src/WebViewImpl.h: - -2010-04-29 John Gregg <johnnyg@google.com> - - Reviewed by Dmitry Titov. - - notifications should have dir and replaceId attributes - https://bugs.webkit.org/show_bug.cgi?id=38336 - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::dir): - (WebKit::WebNotification::replaceId): - -2010-05-04 Jay Civelli <jcivelli@chromium.org> - - Reviewed by David Levin. - - [chromium] Make the select popup not close on right/middle clicks. - https://bugs.webkit.org/show_bug.cgi?id=38473 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseDown): - -2010-05-03 Abhishek Arya <inferno@chromium.org> - - Reviewed by Adam Barth. - - Add support for controlling clipboard access from javascript. - Clipboard access from javascript is disabled by default. - https://bugs.webkit.org/show_bug.cgi?id=27751 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard): - * src/WebSettingsImpl.h: - -2010-05-03 Jens Alfke <snej@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient - https://bugs.webkit.org/show_bug.cgi?id=38397 - - No tests (functionality is exposed only through native WebKit API.) - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::willSendSubmitEvent): New empty method - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchWillSendSubmitEvent): Delegate to client - * src/FrameLoaderClientImpl.h: - -2010-05-02 Michael Nordman <michaeln@google.com> - - Reviewed by Dmitry Titov. - - Define two new ResourceRequestBase TargetTypes for worker and shared worker - main resources. Use the new target types where appropiate. Add logic to marshal - the target type specified by requests initiated on a background worker thread. - - https://bugs.webkit.org/show_bug.cgi?id=38295 - - * src/SharedWorkerRepository.cpp: use TargetIsSharedWorker - (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader): - -2010-05-02 Rafael Weinstein <rafaelw@chromium.org> - - Reviewed by Darin Fisher. - - Include WebWindowFeatures in call to WebViewClient::createView. - https://bugs.webkit.org/show_bug.cgi?id=38301 - - * public/WebViewClient.h: - (WebKit::WebViewClient::createView): - * public/WebWindowFeatures.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - -2010-05-01 Evan Stade <estade@chromium.org> - - Reviewed by David Levin - - [chromium] Skia needs to fade DragImages - https://bugs.webkit.org/show_bug.cgi?id=38008 - - * tests/DragImageTest.cpp: - (DragImageTest.CreateDragImage): test that the drag image is a deep copy - -2010-04-30 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add WebFileSystem interface and hook up with all FileSystem methods. - https://bugs.webkit.org/show_bug.cgi?id=38228 - - * WebKit.gyp: - * public/WebFileSystem.h: Added. - * public/WebKitClient.h: - (WebKit::WebKitClient::fileSystem): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::fileExists): - (WebCore::ChromiumBridge::deleteFile): - (WebCore::ChromiumBridge::deleteEmptyDirectory): - (WebCore::ChromiumBridge::getFileSize): - (WebCore::ChromiumBridge::getFileModificationTime): - (WebCore::ChromiumBridge::directoryName): - (WebCore::ChromiumBridge::pathByAppendingComponent): - (WebCore::ChromiumBridge::makeAllDirectories): - (WebCore::ChromiumBridge::getAbsolutePath): - (WebCore::ChromiumBridge::isDirectory): - (WebCore::ChromiumBridge::filePathToURL): - (WebCore::ChromiumBridge::openFile): - (WebCore::ChromiumBridge::closeFile): - (WebCore::ChromiumBridge::seekFile): - (WebCore::ChromiumBridge::truncateFile): - (WebCore::ChromiumBridge::readFromFile): - (WebCore::ChromiumBridge::writeToFile): - -2010-04-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - Change StorageEvent.uri to StorageEvent.url to match the spec - https://bugs.webkit.org/show_bug.cgi?id=38331 - - Get rid of a stale FIXME and combine 2 lines that needn't be split. - - * src/StorageEventDispatcherImpl.cpp: - (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent): - -2010-04-29 Anton Muhin <antonm@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Consider implementing addOriginAccessWhitelistEntry method - http://trac.webkit.org/changeset/57537 introduced a new method - to manage whitelisting of origins. - Expose this method in Chromium's bridge. - https://bugs.webkit.org/show_bug.cgi?id=37578 - - * public/WebSecurityPolicy.h: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method - * src/WebSecurityPolicy.cpp: Start renaming (keep old function names) and add new removeOriginAccessWhitelistEntry method - -2010-04-29 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r58498. - http://trac.webkit.org/changeset/58498 - https://bugs.webkit.org/show_bug.cgi?id=38332 - - "Broke a bunch of tests on Chromium canaries" (Requested by - dglazkov on #webkit). - - * public/WebViewClient.h: - (WebKit::WebViewClient::createView): - * public/WebWindowFeatures.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - -2010-04-29 Adam Langley <agl@chromium.org> - - Unreviewed, DEPS roll. - - WebKit's r58517 needs OTS's r30 which was rolled into Chromium in - r45932. - - * DEPS: - Use Chromium r45932. - -2010-04-29 Rafael Weinstein <rafaelw@chromium.org> - - Reviewed by Darin Fisher. - - Include WindowFeatures in call to WebViewClient::createView. - - https://bugs.webkit.org/show_bug.cgi?id=38301 - - * public/WebViewClient.h: - (WebKit::WebViewClient::createView): - * public/WebWindowFeatures.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - -2010-04-29 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - Expose the RuntimeFeature for touch events through the - WebRuntimeFeatures mechanism. - https://bugs.webkit.org/show_bug.cgi?id=37486 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableTouch): - (WebKit::WebRuntimeFeatures::isTouchEnabled): - -2010-04-29 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Remove the unnecessary texImage2D function with Image as input in GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=38235 - - * src/GraphicsContext3D.cpp: Remove tex*image implementation with Image input. - -2010-04-28 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Web Inspector: Allow editing script resources when resource tracking is enabled. - - http://bugs.webkit.org/show_bug.cgi?id=38269 - - * src/js/DebuggerAgent.js: - * src/js/InspectorControllerImpl.js: - (.devtools.InspectorBackendImpl.prototype.setBreakpoint): - (.devtools.InspectorBackendImpl.prototype.editScriptSource): - -2010-04-28 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] callOnMainThread should equate to MessageLoop::PostTask - https://bugs.webkit.org/show_bug.cgi?id=38276 - - * public/WebKitClient.h: - (WebKit::WebKitClient::callOnMainThread): - * src/ChromiumThreading.cpp: - (WTF::ChromiumThreading::callOnMainThread): - -2010-04-27 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - Make WebThemeEngine::paint take a const ref of ExtraParams - https://bugs.webkit.org/show_bug.cgi?id=38242 - - * public/WebThemeEngine.h: - (WebKit::WebThemeEngine::paint): - -2010-04-28 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Fixed passing breakpoints to V8. - https://bugs.webkit.org/show_bug.cgi?id=38266 - - * src/js/InspectorControllerImpl.js: - (.devtools.InspectorBackendImpl.prototype.setBreakpoint): - -2010-04-28 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Support pause on exceptions in v8 implementation of ScriptDebugServer. - - https://bugs.webkit.org/show_bug.cgi?id=38205 - - * src/js/DebuggerScript.js: - (debuggerScriptConstructor.DebuggerScript.getScripts): - (debuggerScriptConstructor.DebuggerScript.pauseOnExceptionsState): - (debuggerScriptConstructor.DebuggerScript.setPauseOnExceptionsState): - (debuggerScriptConstructor.DebuggerScript._v8ToWebkitLineNumber): - (debuggerScriptConstructor): - -2010-04-27 Jens Alfke <snej@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] Fix bug that prevents autosave of forms without action attribute - https://bugs.webkit.org/show_bug.cgi?id=38014 - Change is in the Chromium WebKit API so it can't be tested with a JS-based layout test. - It needs a native unit test, which would go in the Chromium repo, not WebKit. - - * src/WebPasswordFormData.cpp: - (WebKit::WebPasswordFormData::WebPasswordFormData): Set correct URL if action is NULL - -2010-04-27 Michael Nordman <michaeln@google.com> - - Reviewed by Dmitry Titov. - - [Chromium] Add two things to the webkit API to support appcaches in workers. - 1) WebURLRequest TargetTypes for worker and shared worker main resources. - 2) Factory method on class WebCommonWorkerClient to - createApplicationCacheHost() for the associated worker. - - https://bugs.webkit.org/show_bug.cgi?id=38147 - - * public/WebCommonWorkerClient.h: add the factory method - * public/WebURLRequest.h: add the TargetTypes - * src/WebWorkerBase.cpp: call the embedder's factory when needed - (WebKit::WebWorkerBase::didCreateDataSource) - (WebKit::WebWorkerBase::createApplicationCacheHost) - * src/WebWorkerBase.h: ditto - * src/WebWorkerClientImpl.h: add a stub impl of the factory method - (WebKit::WebWorkerClientImpl::createApplicationCacheHost): - -2010-04-27 Kent Tamura <tkent@chromium.org> - - Reviewed by Shinichiro Hamaji. - - [DRT/Chromium] Enable Windows project generation - https://bugs.webkit.org/show_bug.cgi?id=38103 - - - Avoid platform.system(), which causes a crash with python.exe in - depot_tools. Use sys.platform instead. - - Process DumpRenderTree.gyp on all platforms. - - * gyp_webkit: - -2010-04-27 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - Makes clicking a select element close its associated popup if - it is open. - https://bugs.webkit.org/show_bug.cgi?id=38105 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseDown): - -2010-04-27 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Merged the WebView public method to close suggestion popups - into a single method to close all popups (select and suggestions). - That ensures select popups are closed when the browser window is moved - or resized. - https://bugs.webkit.org/show_bug.cgi?id=37837 - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::hidePopups): - (WebKit::WebViewImpl::hideSuggestionsPopup): - * src/WebViewImpl.h: - -2010-04-27 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Adler. - - Remove unnecessary header now that Chrome is updated - https://bugs.webkit.org/show_bug.cgi?id=38211 - - * public/win/WebThemeEngine.h: Removed. - -2010-04-27 Jens Alfke <snej@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add some notifications and an accessor to WebKit API - https://bugs.webkit.org/show_bug.cgi?id=37625 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::didFirstLayout): - (WebKit::WebFrameClient::didFirstVisuallyNonEmptyLayout): - * public/WebNode.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidFirstLayout): - (WebKit::FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout): - * src/WebElement.cpp: - * src/WebNode.cpp: - (WebKit::WebNode::hasNonEmptyBoundingBox): - -2010-04-27 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Remove deprecated form of didChangeLocationWithinPage - https://bugs.webkit.org/show_bug.cgi?id=38178 - - * public/WebFrameClient.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage): - -2010-04-27 Evan Martin <evan@chromium.org> - - Reviewed by David Levin. - - [chromium] bold bengali text not rendered properly on Linux - Roll forward Chrome DEPS so we get new Skia API. - - * DEPS: update Chrome to r45696. - -2010-04-27 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Restore breakpoints associated with script's URL once - script is parsed. - https://bugs.webkit.org/show_bug.cgi?id=38132 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.initUI): - (devtools.DebuggerAgent.prototype.addBreakpoint): - (devtools.DebuggerAgent.prototype.addScriptInfo_): - (devtools.DebuggerAgent.prototype.restoreBreakpoints_): - (devtools.BreakpointInfo): - (devtools.BreakpointInfo.prototype.enabled): - (devtools.BreakpointInfo.prototype.condition): - -2010-04-27 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chrome Dev Tools: Further beautify themes. - - https://bugs.webkit.org/show_bug.cgi?id=38187 - - * src/js/DevTools.js: - (WebInspector.setToolbarColors): - * src/js/devTools.css: - (body.platform-windows #toolbar, body.platform-windows.inactive #toolbar): - -2010-04-26 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Prepare to making WebThemeEngine cross-platform - https://bugs.webkit.org/show_bug.cgi?id=38077 - - * WebKit.gyp: - * public/WebThemeEngine.h: Added. - * public/win/WebThemeEngine.h: - -2010-04-26 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - [Chromium] Crash after calling window.print() on a window object that has been closed. - https://bugs.webkit.org/show_bug.cgi?id=38148 - - It is unfortunately not possible to write a layout test for this as the - crash occurs in an API that is only called by Chrome while showing a - print dialog. - - * src/WebViewImpl.cpp: - (WebKit::WebView::willEnterModalLoop): - (WebKit::WebView::didExitModalLoop): - -2010-04-25 Sam Weinig <sam@webkit.org> - - Reviewed by Maciej Stachowiak. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=38097 - Disentangle initializing the main thread from initializing threading - - * src/WebKit.cpp: - (WebKit::initialize): Add call to initializeMainThread. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): Ditto. - -2010-04-26 Roman Gershman <romange@google.com> - - Reviewed by Adam Barth. - - [Chromium] Font size in suggestions popup menu should be correlated with the font size of its text field. - - https://bugs.webkit.org/show_bug.cgi?id=37977 - - * src/SuggestionsPopupMenuClient.cpp: - (WebKit::SuggestionsPopupMenuClient::initialize): - -2010-04-26 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium Dev Tools: brush up images. - - https://bugs.webkit.org/show_bug.cgi?id=38124 - - * WebKit.gypi: - * src/js/DevTools.js: - (WebInspector.setToolbarColors): - * src/js/Images/segmentChromium.png: - * src/js/Images/segmentChromium2.png: Removed. - * src/js/Images/segmentHoverChromium2.png: Removed. - * src/js/Images/segmentSelectedChromium2.png: Removed. - * src/js/Images/statusbarBackgroundChromium.png: - * src/js/Images/statusbarBackgroundChromium2.png: Removed. - * src/js/Images/statusbarBottomBackgroundChromium.png: - * src/js/Images/statusbarButtonsChromium.png: - * src/js/Images/statusbarMenuButtonChromium.png: - * src/js/Images/statusbarMenuButtonChromium2.png: Removed. - * src/js/devTools.css: - (.section > .header): - (.console-group-messages .section > .header): - (#resources-filter): - (.crumbs .crumb): - (.crumbs .crumb.end): - (.crumbs .crumb.selected): - (.crumbs .crumb.selected:hover): - (.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover): - (.crumbs .crumb:hover): - (.crumbs .crumb.dimmed:hover): - (.crumbs .crumb.end:hover): - (body.drawer-visible #main-status-bar): - (.status-bar): - (button.status-bar-item): - (select.status-bar-item:active): - (#drawer): - (select.status-bar-item): - -2010-04-23 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Add isGLES2Compliant to GraphicsContext3D: make the method const. - https://bugs.webkit.org/show_bug.cgi?id=37872 - - * src/GraphicsContext3D.cpp: Make isGLES2Compliant() const. - (WebCore::GraphicsContext3DInternal::isGLES2Compliant): - (WebCore::GraphicsContext3D::isGLES2Compliant): - -2010-04-23 Rafael Weinstein <rafaelw@grafaelw.sfo.corp.google.com> - - Reviewed by Darin Fisher. - - This patch adds a WebWindowFeatures binding struct for the - chromium client in anticipation of a follow-on patch which will - pass it to WebViewClient::createWindow. - - https://bugs.webkit.org/show_bug.cgi?id=38013 - - * public/WebViewClient.h: - (WebKit::WebViewClient::createView): - * public/WebWindowFeatures.h: Added. - (WebKit::WebWindowFeatures::WebWindowFeatures): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::createWindow): - -2010-04-22 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Add isGLES2Compliant to GraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=37872 - - * public/WebGraphicsContext3D.h: Add isGLES2Compliant(). - * src/GraphicsContext3D.cpp: Ditto. - * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto. - (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2Compliant): - * src/WebGraphicsContext3DDefaultImpl.h: Ditto. - -2010-04-22 Dave Moore <davemoore@chromium.org> - - Reviewed by Dimitri Glazkov. - - Added notification when the favicons for a page are changed - from a script. - The Document object will notify the frame loader, which will - notify the client. Implementations of FrameLoaderClient will - have to add one method; dispatchDidChangeIcons(). - - https://bugs.webkit.org/show_bug.cgi?id=33812 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::didChangeIcons): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons): - * src/FrameLoaderClientImpl.h: - -2010-04-22 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Emulate GL_IMPLEMENTATION_COLOR_READ_FORMAT/TYPE for glGet - https://bugs.webkit.org/show_bug.cgi?id=37281 - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Emulate two enums. - -2010-04-22 Adam Barth <abarth@webkit.org> - - Unreviewed, rolling out r58069. - http://trac.webkit.org/changeset/58069 - https://bugs.webkit.org/show_bug.cgi?id=27751 - - Broke compile on Windows. - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - * src/WebSettingsImpl.h: - -2010-04-22 Tony Chang <tony@chromium.org> - - Reviewed by Shinichiro Hamaji. - - [chromium] roll chromium deps to pick up some windows build fixes - https://bugs.webkit.org/show_bug.cgi?id=37972 - - * DEPS: - -2010-04-22 Abhishek Arya <inferno@chromium.org> - - Reviewed by Adam Barth. - - Add support for controlling clipboard access from javascript. - Clipboard access from javascript is disabled by default. - https://bugs.webkit.org/show_bug.cgi?id=27751 - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setJavaScriptCanAccessClipboard): - * src/WebSettingsImpl.h: - -2010-04-21 Tony Chang <tony@chromium.org> - - Reviewed by Shinichiro Hamaji. - - [chromium] gyp_webkit should be executable - https://bugs.webkit.org/show_bug.cgi?id=37971 - - * gyp_webkit: Added property svn:executable. - -2010-04-21 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Don't notify the WebView that a popup was - opened when the popup is handled externally, as the popup - is in that case transparent to the WebView. - The notification was causing an ASSERT on Mac (where - the popup is handled externally) as there would be no - notification that the popup was closed. - https://bugs.webkit.org/show_bug.cgi?id=37825 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - -2010-04-21 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r58028. - http://trac.webkit.org/changeset/58028 - https://bugs.webkit.org/show_bug.cgi?id=37962 - - broke the chromium build (Requested by tony^work on #webkit). - - * DEPS: - -2010-04-21 Evan Martin <evan@chromium.org> - - Unreviewed, just a dependency change. - - [chromium] roll skia forward to r538 - https://bugs.webkit.org/show_bug.cgi?id=37960 - - This will cause a bunch of pixel tests to fail due to bulleted - lists rendering slightly differently. I will grab new baselines - from the bots and check them in in a followup. - - * DEPS: - -2010-04-21 Evan Stade <estade@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Web page serializer saves tag names in upper case - https://bugs.webkit.org/show_bug.cgi?id=37940 - - Simply convert all tags to lower case. - - This is tested by chrome tests: - - save page browser tests - - encoding ui tests - - web page serializer test shell tests - - * src/WebPageSerializer.cpp: - (WebKit::WebPageSerializer::generateMetaCharsetDeclaration): - (WebKit::WebPageSerializer::generateBaseTagDeclaration): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::openTagToString): - (WebKit::WebPageSerializerImpl::endTagToString): - -2010-04-20 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Factor DocumentWriter out of FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=37175 - - Update these callsites because the method moved to DocumentWriter. - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::finishedLoading): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::commitDocumentData): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebSearchableFormData.cpp: - (WebCore::GetFormEncoding): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::pageEncoding): - -2010-04-20 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: add basic script editing capabilities to the front-end. - - https://bugs.webkit.org/show_bug.cgi?id=37875 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.resolveScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.resolveScriptSource): - (devtools.DebuggerAgent.prototype.editScriptLine.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.editScriptLine): - (devtools.DebuggerAgent.prototype.handleDebuggerOutput_): - * src/js/DevTools.js: - * src/js/InspectorControllerImpl.js: - (.devtools.InspectorBackendImpl.prototype.editScriptLine): - -2010-04-20 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Adler. - - Change a parameter type of chooseIconForFiles() - https://bugs.webkit.org/show_bug.cgi?id=37504 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::chooseIconForFiles): - * src/ChromeClientImpl.h: - -2010-04-20 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Tests that pressing tab now closes the select popup. - https://bugs.webkit.org/show_bug.cgi?id=37721 - - * tests/PopupMenuTest.cpp: - (WebKit::TEST_F): - -2010-04-20 Evan Stade <estade@chromium.org> - - Reviewed by David Levin. - - [chromium] crash when dragging images - https://bugs.webkit.org/show_bug.cgi?id=37715 - - Added unit tests for DragImageChromiumSkia. - - * WebKit.gyp: - * tests/DragImageTest.cpp: Added. - (WebCore::TestImage::TestImage): - (WebCore::TestImage::~TestImage): - (WebCore::TestImage::size): - (WebCore::TestImage::nativeImageForCurrentFrame): - (WebCore::TestImage::destroyDecodedData): - (WebCore::TestImage::decodedSize): - (WebCore::TestImage::draw): - (WebCore::TEST): - -2010-04-20 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by David Levin. - - Remove a workaround in plugin cursor setting that was obsoleted by - the change in https://bugs.webkit.org/show_bug.cgi?id=35132 - https://bugs.webkit.org/show_bug.cgi?id=37811 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::ChromeClientImpl): - (WebKit::ChromeClientImpl::setCursor): - (WebKit::ChromeClientImpl::setCursorForPlugin): - * src/ChromeClientImpl.h: - -2010-04-19 Ada Chan <adachan@apple.com> - - Reviewed by Jeremy Orlow. - - https://bugs.webkit.org/show_bug.cgi?id=37717 - Changes needed now that StorageNamespaceImpl::sessionStorageNamespace() and - StorageNamespace::sessionStorageNamespace() take in a quota parameter. - - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::sessionStorageNamespace): - * src/WebStorageNamespaceImpl.cpp: - (WebKit::WebStorageNamespace::createSessionStorageNamespace): - -2010-04-17 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Adding the implementation of GLES2Context class which provides WebCore access to a GL ES context. - https://bugs.webkit.org/show_bug.cgi?id=37541 - - * WebKit.gyp: - * public/WebGLES2Context.h: Added. - (WebKit::WebGLES2Context::~WebGLES2Context): - * src/GLES2Context.cpp: Added. - (WebCore::GLES2ContextInternal::GLES2ContextInternal): - (WebCore::GLES2ContextInternal::~GLES2ContextInternal): - (WebCore::GLES2ContextInternal::getWebGLES2Context): - (WebCore::GLES2ContextInternal::initialize): - (WebCore::GLES2Context::create): - (WebCore::GLES2Context::~GLES2Context): - (WebCore::GLES2Context::initialize): - (WebCore::GLES2Context::makeCurrent): - (WebCore::GLES2Context::destroy): - (WebCore::GLES2Context::swapBuffers): - -2010-04-16 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Eric Seidel. - - Get rid of the UNUSED_PARAM macro in GraphicsContext3D.cpp. - https://bugs.webkit.org/show_bug.cgi?id=37733 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::GraphicsContext3D): - -2010-04-16 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Jeremy Orlow. - - Changing the return type of WebSecurityOrigin::createFromDatabaseIdentifier(). - https://bugs.webkit.org/show_bug.cgi?id=34466 - - Changing the return type of - WebSecurityOrigin::createFromDatabaseIdentifier() from - WebSecurityOrigin* to WebSecurityOrigin, to make it more - consistent with the other WebSecurityOrigin methods. - - * public/WebSecurityOrigin.h: - * src/WebDatabase.cpp: - (WebKit::WebDatabase::closeDatabaseImmediately): - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): - -2010-04-16 Dmitry Titov <dimich@chromium.org> - - Reviewed by Yury Semikhatsky. - - [v8] In Workers, script errors right after close() are not delivered to the Worker.onerror - https://bugs.webkit.org/show_bug.cgi?id=37691 - - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::createWorkerContextProxy): Don't need to pull V8 proxy to retrieve current WorkerContext. - -2010-04-16 Albert J. Wong <ajwong@chromium.org> - - Not reviewed. Build fix. - - [chromium] Compile fix. Missing include header, and missing type conversion. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::beginPaint): - -2010-04-16 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com> - - Reviewed by Simon Hausmann. - - [Qt] WebGL is not visible when QGLWidget viewport is used - https://bugs.webkit.org/show_bug.cgi?id=37070 - - Added HostWindow parameter to the constructor of GraphicsContext3D. - Shared OpenGL context is initialized with parent QGLWidget. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::GraphicsContext3D): - -2010-04-16 Fumitoshi Ukai <ukai@chromium.org> - - Reviewed by Jian Li. - - [chromium] WebKit::WebURLResponse::addHTTPHeaderField will crash if response is invalid UTF-8 - https://bugs.webkit.org/show_bug.cgi?id=37687 - - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::addHTTPHeaderField): ignore if name or value is null string. - -2010-04-16 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Select popups would assert when destroyed. - Also adding unit-tests for the select popup code. - https://bugs.webkit.org/show_bug.cgi?id=37436 - - * WebKit.gyp: - * src/WebViewImpl.h: - (WebKit::WebViewImpl::selectPopup): - * tests/PopupMenuTest.cpp: Added. - -2010-04-16 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] build DRT on Linux - https://bugs.webkit.org/show_bug.cgi?id=37690 - - * DEPS: Need to roll deps to remove a dependency on src/chrome - * gyp_webkit: generate makefiles for DRT.gyp on Linux - -2010-04-15 Tony Chang <tony@chromium.org> - - Reviewed by Dimitri Glazkov. - - build DRT on chromium mac - https://bugs.webkit.org/show_bug.cgi?id=37639 - - * gyp_webkit: generate build files for DRT on mac - -2010-04-15 Yury Semikhatsky <yurys@google.com> - - Reviewed by Pavel Feldman. - - Support basic debugging capabilities including step in/over/out in v8 - implementation of ScriptDebugServer. - - https://bugs.webkit.org/show_bug.cgi?id=37604 - - * WebKit.gypi: - * src/DebuggerAgent.h: - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::setDebuggerScriptSource): - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::hostDispatchHandler): - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): - * src/DebuggerAgentManager.h: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::windowObjectCleared): - * src/js/DebuggerScript.js: Added. - (debuggerScriptConstructor.DebuggerScript.getAfterCompileScript): - (debuggerScriptConstructor.DebuggerScript.getScripts): - (debuggerScriptConstructor.DebuggerScript._formatScript): - (debuggerScriptConstructor.DebuggerScript.setBreakpoint): - (debuggerScriptConstructor.DebuggerScript.removeBreakpoint): - (debuggerScriptConstructor.DebuggerScript.currentCallFrame): - (debuggerScriptConstructor.DebuggerScript.stepIntoStatement): - (debuggerScriptConstructor.DebuggerScript.stepOverStatement): - (debuggerScriptConstructor.DebuggerScript.stepOutOfFunction): - (debuggerScriptConstructor.DebuggerScript.clearBreakpoints): - (debuggerScriptConstructor.DebuggerScript.setBreakpointsActivated): - (debuggerScriptConstructor.DebuggerScript._frameMirrorToJSCallFrame): - (debuggerScriptConstructor.DebuggerScript._webkitToV8LineNumber): - (debuggerScriptConstructor.DebuggerScript._v8ToWwebkitLineNumber): - (debuggerScriptConstructor): - * src/js/DevTools.js: - (WebInspector.loaded): - (.): - (): - * src/js/DevToolsHostStub.js: - (.RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-04-15 Matt Perry <mpcomplete@chromium.org> - - Reviewed by Dimitri Glazkov. - - Implement layoutTestController's addUserStyleSheet and - setAuthorAndUserStylesEnabled on Chromium port. - https://bugs.webkit.org/show_bug.cgi?id=37595 - - * public/WebSettings.h: - * public/WebView.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setAuthorAndUserStylesEnabled): - * src/WebSettingsImpl.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::addUserStyleSheet): - * src/WebViewImpl.h: - -2010-04-15 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Must enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization - https://bugs.webkit.org/show_bug.cgi?id=37178 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization. - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - -2010-04-15 Albert J. Wong <ajwong@chromium.org> - - Unreviewed, rolling out r57660. - http://trac.webkit.org/changeset/57660 - https://bugs.webkit.org/show_bug.cgi?id=37604 - - Broke a large number of inspector layout tests in chromium. - - * WebKit.gypi: - * src/DebuggerAgent.h: - * src/DebuggerAgentImpl.cpp: - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): - * src/DebuggerAgentManager.h: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::windowObjectCleared): - * src/js/DebuggerScript.js: Removed. - * src/js/DevTools.js: - (WebInspector.loaded): - (WebInspector.UnresolvedPropertyValue): - (): - * src/js/DevToolsHostStub.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-04-15 Yury Semikhatsky <yurys@google.com> - - Reviewed by Pavel Feldman. - - Support basic debugging capabilities including step in/over/out in v8 - implementation of ScriptDebugServer. - - https://bugs.webkit.org/show_bug.cgi?id=37604 - - * WebKit.gypi: - * src/DebuggerAgent.h: - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::setDebuggerScriptSource): - * src/DebuggerAgentImpl.h: - * src/DebuggerAgentManager.cpp: - (WebKit::DebuggerAgentManager::hostDispatchHandler): - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): - * src/DebuggerAgentManager.h: - * src/InspectorFrontendClientImpl.cpp: - (WebKit::InspectorFrontendClientImpl::windowObjectCleared): - * src/js/DebuggerScript.js: Added. - (debuggerScriptConstructor.DebuggerScript.getAfterCompileScript): - (debuggerScriptConstructor.DebuggerScript.getScripts): - (debuggerScriptConstructor.DebuggerScript._formatScript): - (debuggerScriptConstructor.DebuggerScript.setBreakpoint): - (debuggerScriptConstructor.DebuggerScript.removeBreakpoint): - (debuggerScriptConstructor.DebuggerScript.currentCallFrame): - (debuggerScriptConstructor.DebuggerScript.stepIntoStatement): - (debuggerScriptConstructor.DebuggerScript.stepOverStatement): - (debuggerScriptConstructor.DebuggerScript.stepOutOfFunction): - (debuggerScriptConstructor.DebuggerScript.clearBreakpoints): - (debuggerScriptConstructor.DebuggerScript.setBreakpointsActivated): - (debuggerScriptConstructor.DebuggerScript._frameMirrorToJSCallFrame): - (debuggerScriptConstructor.DebuggerScript._webkitToV8LineNumber): - (debuggerScriptConstructor.DebuggerScript._v8ToWwebkitLineNumber): - (debuggerScriptConstructor): - * src/js/DevTools.js: - (WebInspector.loaded): - (.): - (): - * src/js/DevToolsHostStub.js: - (.RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-04-15 Ben Murdoch <benm@google.com> - - Unreviewed, rolling out r57652. - http://trac.webkit.org/changeset/57652 - https://bugs.webkit.org/show_bug.cgi?id=37609 - - Caused a build break on Chromium Mac and Layout Test fail on - Qt - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchPointState): - -2010-04-14 Ben Murdoch <benm@google.com> - - Reviewed by Kenneth Rohde Christiansen. - - The TouchStationary state of WebCore::PlatformTouchPoint is not - handled inside the touch event handler. - https://bugs.webkit.org/show_bug.cgi?id=37609 - - After discussions at the WebKit contributors meeting, we decided that - this is a currently unused state without a good future use case in the - Touch API and thus decided to remove it. This patch actions that decision. - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchPointState): Remove TouchStationary. - -2010-04-12 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] update chromium DEPS for upstream compile - https://bugs.webkit.org/show_bug.cgi?id=36578 - - * DEPS: Pull sub deps from chromium's DEPS file - -2010-04-14 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r57599. - http://trac.webkit.org/changeset/57599 - https://bugs.webkit.org/show_bug.cgi?id=37605 - - "Broke Chromium build" (Requested by dglazkov on #webkit). - - * WebKit.gyp: - * src/WebViewImpl.h: - * tests/PopupMenuTest.cpp: Removed. - -2010-04-14 Aaron Boodman <aa@chromium.org> - - Reviewed by David Levin. - - Support relative URLs for notifications on Chromium. They weren't working previously because WebCore was inserting - the relative URL into a KURL instance, but when KURL is backed by GURL as it is on Chromium, relative URLs are - unsupported. Fixed by resolving the relative URL first. - - https://bugs.webkit.org/show_bug.cgi?id=36623 - - Adding tests for this is difficult because we don't currently have DRT support for notifications on Mac, only Windows. - - * public/WebNotification.h: Remove deprecated icon() method. - * src/WebNotification.cpp: Ditto. - -2010-04-14 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Select popups would assert when destroyed. - Also adding unit-tests for the select popup code. - https://bugs.webkit.org/show_bug.cgi?id=37436 - - * WebKit.gyp: - * src/WebViewImpl.h: - (WebKit::WebViewImpl::selectPopup): - * tests/PopupMenuTest.cpp: Added. - -2010-04-14 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - readPixels must take PACK_ALIGNMENT into account - https://bugs.webkit.org/show_bug.cgi?id=34718 - - * src/GraphicsContext3D.cpp: Refactor readPixels. - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): Temporarily disable pack alignment for glReadPixels. - (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): Move array allocation and alpha fix to WebGLRenderingContext; flush before read pixels. - -2010-04-14 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Re-write testProfilerTab to match the new implementation. - - https://bugs.webkit.org/show_bug.cgi?id=37516 - - * src/js/Tests.js: - (.TestSuite.prototype.testProfilerTab.findDisplayedNode): - (.TestSuite.prototype.testProfilerTab.findVisibleView): - (.TestSuite.prototype.testProfilerTab): - -2010-04-13 Timothy Hatcher <timothy@apple.com> - - Rename SecurityOrigin::whiteListAccessFromOrigin to addOriginAccessWhitelistEntry. - And SecurityOrigin::resetOriginAccessWhiteLists to resetOriginAccessWhitelists. - - SecurityOrigin needs a way to remove individual OriginAccessEntries - https://bugs.webkit.org/show_bug.cgi?id=37449 - - Reviewed by Dave Hyatt. - - * src/WebSecurityPolicy.cpp: - (WebKit::WebSecurityPolicy::whiteListAccessFromOrigin): - (WebKit::WebSecurityPolicy::resetOriginAccessWhiteLists): - -2010-04-13 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Fix search behavior in Heap profiles. - - https://bugs.webkit.org/show_bug.cgi?id=37498 - - * src/js/HeapProfilerPanel.js: - -2010-04-13 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by David Levin. - - Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). - - https://bugs.webkit.org/show_bug.cgi?id=36426 - - * src/ResourceHandle.cpp: Track state across ResourceHandle invocations. - (WebCore::ResourceHandleInternal::ResourceHandleInternal): - (WebCore::ResourceHandleInternal::): - (WebCore::ResourceHandleInternal::start): - (WebCore::ResourceHandleInternal::cancel): - (WebCore::ResourceHandleInternal::didReceiveResponse): - (WebCore::ResourceHandleInternal::didReceiveData): - (WebCore::ResourceHandleInternal::didFinishLoading): - (WebCore::ResourceHandleInternal::didFail): - -2010-04-13 Mikhail Naganov <mnaganov@chromium.org> - - Unreviewed Chromium build fix: pin to a newer V8 revision (4386). - - * DEPS: - -2010-04-12 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Yury Semikhatsky. - - Replace hand-written JavaScriptProfile* bindings with idl-based, and - in Chromium port, bind them to the new V8's profiler API that is - aligned with JSC. - - https://bugs.webkit.org/show_bug.cgi?id=37448 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent): - (devtools.ProfilerAgent.prototype.initializeProfiling): - (devtools.ProfilerAgent.prototype._didGetActiveProfilerModules): - (devtools.ProfilerAgent.prototype._didGetLogLines): - * src/js/Tests.js: - -2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r57468. - http://trac.webkit.org/changeset/57468 - https://bugs.webkit.org/show_bug.cgi?id=37433 - - Broke the world... Must have applied the patch wrong - (Requested by abarth on #webkit). - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::finishedLoading): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::commitDocumentData): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebSearchableFormData.cpp: - (WebCore::GetFormEncoding): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::pageEncoding): - -2010-04-11 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - Factor DocumentWriter out of FrameLoader - https://bugs.webkit.org/show_bug.cgi?id=37175 - - Update these callsites because the method moved to DocumentWriter. - - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::finishedLoading): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::commitDocumentData): - * src/WebPageSerializerImpl.cpp: - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebSearchableFormData.cpp: - (WebCore::GetFormEncoding): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::pageEncoding): - -2010-04-11 Sheriff Bot <webkit.review.bot@gmail.com> - - Unreviewed, rolling out r57460. - http://trac.webkit.org/changeset/57460 - https://bugs.webkit.org/show_bug.cgi?id=37424 - - broke chromium builders (Requested by tony^work on #webkit). - - * DEPS: - * gyp_webkit: - -2010-04-11 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] update chromium DEPS for upstream compile - https://bugs.webkit.org/show_bug.cgi?id=36578 - - * DEPS: - * gyp_webkit: Add DumpRenderTree.gyp so we generate xcode projects for DRT. - -2010-04-10 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Include file change as a result of renaming LayerRenderSkia.h to LayerRenderChromium.h - https://bugs.webkit.org/show_bug.cgi?id=37231 - - * src/WebViewImpl.h: - -2010-04-10 Rafael Weinstein <rafaelw@chromium.org> - - Reviewed by Eric Seidel. - - Cleanup after chromium breakage. All interface methods are - returned to being abstract. - - * public/WebNotificationPresenter.h: - -2010-04-09 Evan Stade <estade@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] Linux: respect the scale factor during printing - https://bugs.webkit.org/show_bug.cgi?id=37168 - - Chromium doesn't support testing .pdfs from printing at the moment, so - this change is not covered by any tests. - - * src/WebFrameImpl.cpp: - (WebKit::ChromePrintContext::spoolPage): - -2010-04-09 Aaron Boodman <aa@chromium.org> - - Reviewed by Eric Seidel. - - Remove applicationID() from WebDocument as it is Chromium-specific. - https://bugs.webkit.org/show_bug.cgi?id=37350 - - * public/WebDocument.h: - * src/WebDocument.cpp: - -2010-04-09 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Adler. - - Move the IDB::open ExceptionCode paramter to be last - https://bugs.webkit.org/show_bug.cgi?id=37277 - - Move the ExceptionCode paramter to the last position in - IndexedDatabaseRequest::open and friends. It should definitely - go after the callbacks to keep the parameters that come directly - from javascript together. And having output parameters appear - last is done often in the code base, so it makes sense to push - it past the Frame* param as well. - - * public/WebIndexedDatabase.h: - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-04-09 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Darin Fisher. - - Complete move of createApplicationCacheHost from WebKitClient to WebFrameClient. - https://bugs.webkit.org/show_bug.cgi?id=37330 - - * public/WebApplicationCacheHost.h: - * public/WebKitClient.h: - * src/ApplicationCacheHostInternal.h: - (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal): - -2010-04-09 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Crash on WebKit::WebGeolocationServiceBridgeImpl::stopUpdating() during frame disconnection - Should not try to access WebViewClient if the frame has already been disconnected. - https://bugs.webkit.org/show_bug.cgi?id=37318 - - * src/WebGeolocationServiceBridgeImpl.cpp: - (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): - -2010-04-09 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Adam Barth. - - Expose SecurityOrigin::canRequest in WebSecurityOrigin. - https://bugs.webkit.org/show_bug.cgi?id=37271 - - * public/WebSecurityOrigin.h: - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::canRequest): - -2010-04-09 Zhenyao Mo <zmo@google.com> - - Reviewed by Dimitri Glazkov. - - Must resolve multisampled back buffer during copyTexImage2D and copyTexSubImage2D - https://bugs.webkit.org/show_bug.cgi?id=37174 - - Test: fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html - - * src/WebGraphicsContext3DDefaultImpl.cpp: Resolve multisampled back buffer during copyTexImage2D and copyTexSubImage2D. - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D): - (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D): - -2010-04-07 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Yury Semikhatsky. - - Chromium: support themes in devtools window. - - https://bugs.webkit.org/attachment.cgi?bugid=37216 - - * WebKit.gypi: - * src/js/DevTools.js: - (WebInspector.setToolbarColors): - (WebInspector.resetToolbarColors): - * src/js/Images/segmentChromium2.png: Added. - * src/js/Images/segmentHoverChromium2.png: Added. - * src/js/Images/segmentSelectedChromium2.png: Added. - * src/js/Images/statusbarBackgroundChromium2.png: Added. - * src/js/Images/statusbarMenuButtonChromium2.png: Added. - -2010-04-07 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Removed inspector methods from ScriptExecutionContext and derived classes. - Removed MessageDestination parameter from console-related calls (we now always - log to the same destination(s)). - Removed redundant FrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest() - https://bugs.webkit.org/show_bug.cgi?id=36949 - - * public/WebCommonWorkerClient.h: - (WebKit::WebCommonWorkerClient::postConsoleMessageToWorkerObject): - * src/FrameLoaderClientImpl.cpp: - * src/FrameLoaderClientImpl.h: - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::postConsoleMessageToWorkerObject): - (WebKit::WebWorkerBase::postConsoleMessageTask): - * src/WebWorkerBase.h: - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject): - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask): - * src/WebWorkerClientImpl.h: - -2010-04-07 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] WebIDBDatabaseError::assign doesn't work correctly - https://bugs.webkit.org/show_bug.cgi?id=37209 - - * src/WebIDBDatabaseError.cpp: - (WebKit::WebIDBDatabaseError::assign): - -2010-04-07 Dawit Alemayehu <adawit@kde.org> - - Reviewed by Simon Hausmann. - - https://bugs.webkit.org/show_bug.cgi?id=36827 - - Updated the WebCore::shouldTreatAsAttachement function call with the - new more generic replacement WebCore::contentDispositionType. - - See comments 39-42 in https://bugs.webkit.org/show_bug.cgi?id=36395 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType): - -2010-04-07 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Darin Fisher. - - Add createApplicationCacheHost to WebFrameClient so - the ApplicationCacheHost has access to its frame. - - https://bugs.webkit.org/show_bug.cgi?id=36882 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::createApplicationCacheHost): - * src/ApplicationCacheHostInternal.h: - (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal): - -2010-04-06 Nicolas Weber <thakis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Use drag images on OS X as well. - https://bugs.webkit.org/show_bug.cgi?id=37069 - - * src/DragClientImpl.cpp: - (WebKit::DragClientImpl::startDrag): - -2010-04-06 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Changing references to Graphics Layer related classes from *Skia to *Chromium. - https://bugs.webkit.org/show_bug.cgi?id=37116 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::setAcceleratedCompositing): - (WebKit::WebViewImpl::updateRootLayerContents): - * src/WebViewImpl.h: - -2010-04-06 James Hawkins <jhawkins@chromium.org> - - Reviewed by Adam Barth. - - [Chromium] Implement WebInputElement::maxLength. - https://bugs.webkit.org/show_bug.cgi?id=37172 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::maxLength): - -2010-04-06 Evan Stade <estade@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] need DragImage implementation - https://bugs.webkit.org/show_bug.cgi?id=35811 - - Basic implementation using SkBitmap. Transformations are not supported - yet. No implementation for mac. - - This was previously committed but rolled back for breaking layout - tests. - - * public/WebViewClient.h: - (WebKit::WebViewClient::startDragging): - * src/DragClientImpl.cpp: - (WebKit::DragClientImpl::startDrag): new: check for null dragImage. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::startDragging): - * src/WebViewImpl.h: - -2010-04-06 James Hawkins <jhawkins@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Move the getElementsByTagName from WebDocument to WebNode. - https://bugs.webkit.org/show_bug.cgi?id=37161 - - * public/WebDocument.h: - * public/WebNode.h: - * src/WebDocument.cpp: - * src/WebNode.cpp: - (WebKit::WebNode::getElementsByTagName): - -2010-04-06 Ilya Tikhonovsky <loislo@chromium.org> - - Unreviewed build fix for Chromium DEPS. - - * DEPS: - -2010-04-06 Ilya Tikhonovsky <loislo@chromium.org> - - Unreviewed: build fix. - - * DEPS: - -2010-04-06 Mattias Nissler <mnissler@chromium.org> - - Reviewed by Pavel Feldman. - - Handle docking requests from the developer tools and forward them to - WebDevToolsFrontendClient. - https://bugs.webkit.org/show_bug.cgi?id=36944 - - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::requestDockWindow): - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::jsRequestAttachWindow): - * src/WebDevToolsFrontendImpl.h: - -2010-04-06 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Yury Semikhatsky. - - Fixed logging of unhndled worker exceptions. - https://bugs.webkit.org/show_bug.cgi?id=37143 - - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): - -2010-04-05 Alexey Proskuryakov <ap@apple.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=37111 - <rdar://problem/7790327> Draw replacement text when plug-in host crashes - - * src/LocalizedStrings.cpp: (WebCore::crashedPluginText): Added a stub string for plug-in - failure. - -2010-04-04 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Rolling out chromium changes r57028 and r57032 - for breaking chromium layout tests. - - * public/WebViewClient.h: - (WebKit::WebViewClient::startDragging): - * src/DragClientImpl.cpp: - (WebKit::DragClientImpl::startDrag): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::startDragging): - * src/WebViewImpl.h: - -2010-04-03 Darin Fisher <darin@chromium.org> - - Add default implementations of WebNotificationPresenter methods to - repair the downstream Chromium build. - - * public/WebNotificationPresenter.h: - (WebKit::WebNotificationPresenter::show): - (WebKit::WebNotificationPresenter::cancel): - (WebKit::WebNotificationPresenter::objectDestroyed): - (WebKit::WebNotificationPresenter::checkPermission): - (WebKit::WebNotificationPresenter::requestPermission): - -2010-04-02 Michael Nordman <michaeln@google.com> - - Reviewed by Nate Chapin. - - Set the close policy used by the DatabaseCloseTask at this callsite to - RemoveDatabaseFromContext. This restores its behavior to what it was prior to - r56293. - https://bugs.webkit.org/show_bug.cgi?id=37037 - - * src/WebDatabase.cpp: - (WebKit::WebDatabase::closeDatabaseImmediately): - -2010-04-02 Evan Stade <estade@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] need DragImage implementation - https://bugs.webkit.org/show_bug.cgi?id=35811 - - Use the DragImageRef that the DragController passes to us. - - * public/WebViewClient.h: - (WebKit::WebViewClient::startDragging): - * src/DragClientImpl.cpp: - (WebKit::DragClientImpl::startDrag): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::startDragging): - * src/WebViewImpl.h: - -2010-04-02 Rafael Weinstein <rafaelw@chromium.org> - - Reviewed by Adam Barth. - - Clean up unused calls after changes to checkPermission and requestPermission argument lists. - - * public/WebNotificationPresenter.h: - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::checkPermission): - (WebKit::NotificationPresenterImpl::requestPermission): - -2010-04-02 Zhenyao Mo <zmo@google.com> - - Reviewed by Eric Seidel. - - Implement and test new framebuffer object attachment behavior. - https://bugs.webkit.org/show_bug.cgi?id=35611 - - Test: fast/canvas/webgl/framebuffer-object-attachment.html - - * src/WebGraphicsContext3DDefaultImpl.cpp: Map to correct DEPTH_STENCIL format. - (WebKit::WebGraphicsContext3DDefaultImpl::framebufferRenderbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv): - (WebKit::WebGraphicsContext3DDefaultImpl::renderbufferStorage): - -2010-04-02 Jay Civelli <jcivelli@chromium.org> - - Reviewed by Darin Fisher. - - The popup type (select or suggestion) is now passed to the - WebClient::createPopupMenu() method. This is required for - Chromium on Linux to make the select popups work correctly. - https://bugs.webkit.org/show_bug.cgi?id=37013 - - * WebKit.gyp: - * public/WebPopupType.h: Added. - (WebKit::): - * public/WebViewClient.h: - (WebKit::WebViewClient::createPopupMenu): - * src/ChromeClientImpl.cpp: - (WebCore::convertPopupType): - (WebKit::ChromeClientImpl::popupOpened): - -2010-04-02 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Implement InspectorFrontendClient in Chromium and remove all custom bindings for the host methods from WebDevToolsFrontendImpl. - - https://bugs.webkit.org/show_bug.cgi?id=36817 - - * WebKit.gyp: - * src/InspectorFrontendClientImpl.cpp: Added. - (WebKit::InspectorFrontendClientImpl::InspectorFrontendClientImpl): - (WebKit::InspectorFrontendClientImpl::~InspectorFrontendClientImpl): - (WebKit::InspectorFrontendClientImpl::windowObjectCleared): - (WebKit::InspectorFrontendClientImpl::frontendLoaded): - (WebKit::InspectorFrontendClientImpl::moveWindowBy): - (WebKit::InspectorFrontendClientImpl::localizedStringsURL): - (WebKit::InspectorFrontendClientImpl::hiddenPanels): - (WebKit::InspectorFrontendClientImpl::bringToFront): - (WebKit::InspectorFrontendClientImpl::closeWindow): - (WebKit::InspectorFrontendClientImpl::canAttachWindow): - (WebKit::InspectorFrontendClientImpl::attachWindow): - (WebKit::InspectorFrontendClientImpl::detachWindow): - (WebKit::InspectorFrontendClientImpl::changeAttachedWindowHeight): - (WebKit::InspectorFrontendClientImpl::inspectedURLChanged): - * src/InspectorFrontendClientImpl.h: Added. - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::frontendLoaded): - * src/WebDevToolsFrontendImpl.h: - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_): - * src/js/DevTools.js: - (): - -2010-04-01 Jay Civelli <jcivelli@google.com> - - Reviewed by David Levin. - - Adds a method to WebFrame to execute JavaScript and get the value - it evaluates to. - https://bugs.webkit.org/show_bug.cgi?id=36907 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::executeScriptAndReturnValue): - * src/WebFrameImpl.h: - -2010-04-01 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Dmitry Titov. - - Add FileThread for async file operation support in FileReader and FileWriter - https://bugs.webkit.org/show_bug.cgi?id=36896 - - Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags. - - * features.gypi: - -2010-04-01 Finnur Thorarinsson <finnur.webkit@gmail.com> - - Reviewed by Eric Seidel. - - [chromium] FindInPage on multi-frame pages wasn't always updating - tickmarks on scrollbars for the subframes. It was calling invalidateRect - on the View and specifying a rect that's in window coordinates, whereas - the invalidateRect expects frame coordinates. - - https://bugs.webkit.org/show_bug.cgi?id=36982 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::invalidateArea): - -2010-04-01 Finnur Thorarinsson <finnur.webkit@gmail.com> - - Reviewed by Dimitri Glazkov. - - [chromium] FindInPage should clear the focused node when a match has - been found. This is because WebFrameImpl::setFocus will try to refocus - editable elements if it thinks they have focus, causing the page to - scroll. - - https://bugs.webkit.org/show_bug.cgi?id=36923 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::find): - -2010-04-01 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - As a follow up on https://bugs.webkit.org/show_bug.cgi?id=36535, remove: - GeolocationServiceBridgeChromium.h - dettachBridge() - getGeolocationService() - https://bugs.webkit.org/show_bug.cgi?id=36895 - - * WebKit.gyp: - * public/GeolocationServiceBridgeChromium.h: Removed. - * public/WebGeolocationService.h: - (WebKit::WebGeolocationService::detachBridge): - * public/WebViewClient.h: - (WebKit::WebViewClient::geolocationService): - -2010-03-31 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Nate Chapin. - - Misc IndexedDatabase cleanup - https://bugs.webkit.org/show_bug.cgi?id=36889 - - Plumb the Frame* so Chromium knows where the request originated from. - - * public/WebIndexedDatabase.h: - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: - * src/WebIndexedDatabaseImpl.cpp: - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: - -2010-03-31 Alpha Lam <hclam@chromium.org> - - Not reviewed. Build fix. - - Fixing a build break caused by 56872. One of the Chromium bots doesn't - like std::strstr(). Includes string.h and use strstr() instead. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - Includes string.h and use strstr(). - -2010-03-31 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Hook up WebGLContextAttributes to OpenGL context creation code - https://bugs.webkit.org/show_bug.cgi?id=33416 - - * src/WebGraphicsContext3DDefaultImpl.cpp: Hook up WebGLContextAttributes to OpenGL context creation code for Chrome. - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::readPixels): Deal with wrong returned alpha values in Mac. - * src/WebGraphicsContext3DDefaultImpl.h: Add a function. - -2010-03-31 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [chromium] including WebKit.gyp:webkit should automatically add Skia - and NPAPI include paths - - https://bugs.webkit.org/show_bug.cgi?id=36887 - - * WebKit.gyp: - -2010-03-31 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Implements cancelGeolocationPermissionRequestForFrame. - https://bugs.webkit.org/show_bug.cgi?id=35031 - - * public/WebGeolocationService.h: - (WebKit::WebGeolocationService::cancelPermissionRequestForFrame): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): - * src/ChromeClientImpl.h: - -2010-03-31 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Rolling out r56829 since it broke chromium layout tests. - - [REGRESSION] Inspector tests started crashing since r56829 - https://bugs.webkit.org/show_bug.cgi?id=36888 - - * public/WebFrameClient.h: - * src/FrameLoaderClientImpl.cpp: - * src/FrameLoaderClientImpl.h: - -2010-03-31 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Add stubs for moveWindowBy and setAttachedWindowHeight. - - https://bugs.webkit.org/show_bug.cgi?id=36842 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::jsSetAttachedWindowHeight): - (WebKit::WebDevToolsFrontendImpl::jsMoveWindowBy): - * src/WebDevToolsFrontendImpl.h: - -2010-03-31 John Gregg <johnnyg@google.com> - - Reviewed by Darin Fisher. - - [chromium] add logging of cross-frame property accesses for site isolation - https://bugs.webkit.org/show_bug.cgi?id=35773 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::logCrossFramePropertyAccess): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::logCrossFramePropertyAccess): - * src/FrameLoaderClientImpl.h: - -2010-03-30 Gavin Barraclough <barraclough@apple.com> - - Rubber stamped by Sam Weinig. - - https://bugs.webkit.org/show_bug.cgi?id=36866 - Move CString to WTF - - * public/WebCString.h: - * src/FrameLoaderClientImpl.cpp: - * src/GraphicsContext3D.cpp: - * src/WebCString.cpp: - (WebKit::WebCString::assign): - (WebKit::WebCString::WebCString): - (WebKit::WebCString::operator=): - (WebKit::WebCString::operator WTF::CString): - * src/WebMediaPlayerClientImpl.cpp: - * src/WebString.cpp: - * src/WebURLError.cpp: - -2010-03-30 Marcus Bulach <bulach@chromium.org> - - Reviewed by Darin Fisher. - - Rename / tidy up Geolocation bridge: - Rename GeolocationServiceBridgeChromium.cpp to WebGeolocationServiceBridgeImpl.cpp - Uses a temporary compatibility layer in GeolocationServiceBridgeChromium.h. - - https://bugs.webkit.org/show_bug.cgi?id=36535 - - * WebKit.gyp: - * public/GeolocationServiceBridgeChromium.h: - * public/WebGeolocationService.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. - (WebKit::WebGeolocationService::detachBridge): - * public/WebGeolocationServiceBridge.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. - * public/WebViewClient.h: - (WebKit::WebViewClient::geolocationService): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): - * src/ChromiumBridge.cpp: - * src/GeolocationServiceBridgeChromium.cpp: Removed. - * src/WebGeolocationServiceBridgeImpl.cpp: Copied from WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp. - (WebKit::createGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl): - (WebKit::WebGeolocationServiceBridgeImpl::startUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::stopUpdating): - (WebKit::WebGeolocationServiceBridgeImpl::suspend): - (WebKit::WebGeolocationServiceBridgeImpl::resume): - (WebKit::WebGeolocationServiceBridgeImpl::getBridgeId): - (WebKit::WebGeolocationServiceBridgeImpl::setIsAllowed): - (WebKit::WebGeolocationServiceBridgeImpl::setLastPosition): - (WebKit::WebGeolocationServiceBridgeImpl::setLastError): - (WebKit::WebGeolocationServiceBridgeImpl::getWebViewClient): - * src/WebGeolocationServiceBridgeImpl.h: Copied from WebKit/chromium/public/GeolocationServiceBridgeChromium.h. - -2010-03-30 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove dysfunctional implementation of canEstablishDatabase for - Workers. I postpone this implementation until Workers can actually - access Web Databases. - - https://bugs.webkit.org/show_bug.cgi?id=36795 - - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::canEstablishDatabase): - * src/WebWorkerBase.h: - -2010-03-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - More IndexedDB work - https://bugs.webkit.org/show_bug.cgi?id=36770 - - Start the implementation of WebIndexedDatabase (for entrance back into WebKit). - - * WebKit.gyp: - * public/WebIndexedDatabase.h: - * src/WebIndexedDatabaseImpl.cpp: Added. - (WebKit::WebIndexedDatabase::create): - (WebKit::WebIndexedDatabaseImpl::~WebIndexedDatabaseImpl): - (WebKit::WebIndexedDatabaseImpl::open): - * src/WebIndexedDatabaseImpl.h: Added. - -2010-03-29 Rafael Weinstein <rafaelw@chromium.org> - - Reviewed by Adam Barth. - - Change NotificationPresenter::checkPermission() to take the source frames full KURL, - rather than its SecurityOrigin. This will aid chromium in having more fine grained - permissions to control notification spam. - - * public/WebNotificationPresenter.h: - (WebKit::WebNotificationPresenter::checkPermission): - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::checkPermission): - * src/NotificationPresenterImpl.h: - -2010-03-29 Dawit Alemayehu <adawit@kde.org> - - Reviewed by Simon Hausmann. - - Factored out the 'ShouldTreatAsAttachment' function to HTTPParsers.* - and replacted local version with the factored out version. - - The code was factored out to make possible its use in other implementations - such as QtWebKit. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType): - -2010-03-29 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Darin Fisher. - - Pass a WebFrame to WebFrameClient::allowDatabase instead of a WebSecurityOrigin - https://bugs.webkit.org/show_bug.cgi?id=36743 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowDatabase): - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::canEstablishDatabase): - -2010-03-24 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - More IndexedDB plumbing - https://bugs.webkit.org/show_bug.cgi?id=36546 - - Plumbing work towards the goal of making IndexedDatabase::open work. - - * WebKit.gyp: - * public/WebIDBCallbacks.h: Added. - (WebKit::WebIDBCallbacks::~WebIDBCallbacks): - * public/WebIDBDatabase.h: Added. - (WebKit::WebIDBDatabase::~WebIDBDatabase): - * public/WebIDBDatabaseError.h: Added. - (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): - (WebKit::WebIDBDatabaseError::operator=): - * public/WebIndexedDatabase.h: - * public/WebKitClient.h: - (WebKit::WebKitClient::indexedDatabase): - * public/WebSerializedScriptValue.h: - * src/IDBCallbacksProxy.h: Added. - (WebCore::IDBCallbacksProxy::IDBCallbacksProxy): - (WebCore::IDBCallbacksProxy::~IDBCallbacksProxy): - (WebCore::IDBCallbacksProxy::onSuccess): - (WebCore::IDBCallbacksProxy::onError): - * src/IDBDatabaseProxy.cpp: Added. - (WebCore::IDBDatabaseProxy::create): - (WebCore::IDBDatabaseProxy::IDBDatabaseProxy): - (WebCore::IDBDatabaseProxy::~IDBDatabaseProxy): - * src/IDBDatabaseProxy.h: Added. - * src/IndexedDatabaseProxy.cpp: - (WebCore::IndexedDatabaseProxy::IndexedDatabaseProxy): - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: - * src/WebIDBDatabaseError.cpp: Added. - (WebKit::WebIDBDatabaseError::~WebIDBDatabaseError): - (WebKit::WebIDBDatabaseError::WebIDBDatabaseError): - (WebKit::WebIDBDatabaseError::assign): - (WebKit::WebIDBDatabaseError::code): - (WebKit::WebIDBDatabaseError::message): - (WebKit::WebIDBDatabaseError::operator=): - (WebKit::WebIDBDatabaseError::operator PassRefPtr<IDBDatabaseError>): - -2010-03-29 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Remove a possibility of confusion from Profiles panel Welcome screen - by turning buttons into non-clickable glyphs. Also, span instructions - alongside panel width. - - https://bugs.webkit.org/show_bug.cgi?id=34319 - - * src/js/HeapProfilerPanel.js: - (WebInspector.HeapSnapshotProfileType.prototype.get welcomeMessage): - -2010-03-28 Alexey Proskuryakov <ap@apple.com> - - Build fix. Removed extraneous includes of KeyboardCodesWin.h and KeyboardCodesPosix.h - - these no longer exist, but they weren't needed even before reshuffling KeyboardCodes headers. - - * src/WebViewImpl.cpp: - -2010-03-27 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Use WebKitClient to instantiate WebGraphicsContext3D - https://bugs.webkit.org/show_bug.cgi?id=36669 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::initialize): - -2010-03-24 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement WebFormControlElement and WebSelectElement. Add - a getFormControlElements method to WebFormElement. - - https://bugs.webkit.org/show_bug.cgi?id=36562 - - * WebKit.gyp: - * public/WebElement.h: - * public/WebFormControlElement.h: Added. - * public/WebFormElement.h: - * public/WebInputElement.h: - (WebKit::WebInputElement::WebInputElement): - (WebKit::WebInputElement::operator=): - (WebKit::WebInputElement::assign): - * public/WebSelectElement.h: Added. - * src/WebElement.cpp: - (WebKit::WebElement::isFormControlElement): - * src/WebFormControlElement.cpp: Added. - * src/WebFormElement.cpp: - (WebKit::WebFormElement::getFormControlElements): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::WebInputElement): - * src/WebSelectElement.cpp: Added. - -2010-03-26 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Send worker resource content to inspector to enable display of web - workers in inspector's resource tab. - https://bugs.webkit.org/show_bug.cgi?id=36658 - - * src/SharedWorkerRepository.cpp: - (WebCore::SharedWorkerScriptLoader::notifyFinished): - -2010-03-25 Tony Chang <tony@chromium.org> - - Reviewed by David Levin. - - [chromium] correctly handle move drag operations - https://bugs.webkit.org/show_bug.cgi?id=36484 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::dragTargetDragEnter): - (WebKit::WebViewImpl::dragTargetDragOver): - (WebKit::WebViewImpl::dragTargetDragEnterOrOver): Combine common code into a helper method - and properly mask against the drag effect. - (WebKit::WebViewImpl::createUniqueIdentifierForRequest): - * src/WebViewImpl.h: - -2010-03-25 Drew Wilson <atwilson@chromium.org> - - Reviewed by Nate Chapin. - - [v8] Error in getScriptExecutionContext() when worker context is terminating - https://bugs.webkit.org/show_bug.cgi?id=36565 - - Test: Existing worker tests suffice. - - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::createWorkerContextProxy): - Changed to use WorkerScriptController::controllerForContext() instead of WorkerScriptExecutionProxy::retrieve(). - -2010-03-25 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add an ASSERT macro to the Chromium WebKit API - https://bugs.webkit.org/show_bug.cgi?id=36545 - - * WebKit.gyp: Add WebCommon.cpp - * public/WebCommon.h: Add the Macro. - * public/WebPrivatePtr.h: - (WebKit::WebPrivatePtr::~WebPrivatePtr): Verify the pointer is now 0. - * src/WebCommon.cpp: Added. - (WebKit::failedAssertion): Calls the WTF assert function and then crashes. - -2010-03-25 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Jeremy Orlow. - - Remove ASSERT(isMainThread()) which is violated for workers and not necessary at this point. - https://bugs.webkit.org/show_bug.cgi?id=36614 - - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::canEstablishDatabase): - -2010-03-25 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Jeremy Orlow. - - Forward DatabaseTracker::canEstablishDatabase to chromium layer. - https://bugs.webkit.org/show_bug.cgi?id=36595 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowDatabase): - * src/DatabaseObserver.cpp: - (WebCore::DatabaseObserver::canEstablishDatabase): - * src/WebWorkerBase.h: - (WebKit::WebWorkerBase::allowDatabase): - -2010-03-10 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Fix up WebMouseWheelEventBuilder to properly calculate the units - https://bugs.webkit.org/show_bug.cgi?id=35989 - - * src/WebInputEventConversion.cpp: - -2010-03-24 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Eliminate unecessary redraws of GraphicsLayer contents when doing accelerated compositing: - https://bugs.webkit.org/show_bug.cgi?id=36470 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::paint): - Remove call that forced redrawing the contents of the entire layer hierarchy. - -2010-03-24 Dmitry Titov <dimich@chromium.org> - - No review, rolling out r56453. - http://trac.webkit.org/changeset/56453 - https://bugs.webkit.org/show_bug.cgi?id=36426 - - In Chromium port, it broke invalid-image-data-standalone.html - invalid-image-data.html multipart-wait-before-boundary.html - stop-crash.html win-boundary-crash.html - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandleInternal::ResourceHandleInternal): - (WebCore::ResourceHandleInternal::start): - (WebCore::ResourceHandleInternal::cancel): - (WebCore::ResourceHandleInternal::didReceiveResponse): - (WebCore::ResourceHandleInternal::didReceiveData): - (WebCore::ResourceHandleInternal::didFinishLoading): - (WebCore::ResourceHandleInternal::didFail): - -2010-03-24 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - [chromium]WebKit side of adding search support to Pepper. - https://bugs.webkit.org/show_bug.cgi?id=36434 - - * WebKit.gyp: - * public/WebDocument.h: - * public/WebNode.h: - (WebKit::WebNode::to): - (WebKit::WebNode::toConst): - * public/WebPluginDocument.h: Added. - (WebKit::WebPluginDocument::WebPluginDocument): - (WebKit::WebPluginDocument::operator=): - (WebKit::WebPluginDocument::assign): - * src/WebDocument.cpp: - (WebKit::WebDocument::isPluginDocument): - * src/WebPluginDocument.cpp: Added. - (WebKit::WebPluginDocument::plugin): - (WebKit::WebPluginDocument::WebPluginDocument): - (WebKit::WebPluginDocument::operator=): - (WebKit::WebPluginDocument::operator PassRefPtr<PluginDocument>): - -2010-03-24 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by Jeremy Orlow. - - Add some diagnostics to try to track down cause of crash in ArchiveFactory::isArchiveMimeType(). - - https://bugs.webkit.org/show_bug.cgi?id=36426 - - * src/ResourceHandle.cpp: Track state across ResourceHandle invocations. - (WebCore::ResourceHandleInternal::ResourceHandleInternal): - (WebCore::ResourceHandleInternal::): - (WebCore::ResourceHandleInternal::start): - (WebCore::ResourceHandleInternal::cancel): - (WebCore::ResourceHandleInternal::didReceiveResponse): - (WebCore::ResourceHandleInternal::didReceiveData): - (WebCore::ResourceHandleInternal::didFinishLoading): - (WebCore::ResourceHandleInternal::didFail): - -2010-03-24 Jay Campan <jcampan@google.com> - - Reviewed by Darin Fisher. - - Making Chromium select popups not steal activation from the browser. - Select popups are now like autocomplete popups, shown in non-activated - windows. - https://bugs.webkit.org/show_bug.cgi?id=36062 - - * public/WebViewClient.h: - (WebKit::WebViewClient::createPopupMenu): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - (WebKit::ChromeClientImpl::popupClosed): - * src/ChromeClientImpl.h: - * src/WebViewImpl.cpp: - (WebKit::): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::selectPopupHandleKeyEvent): - (WebKit::WebViewImpl::hideSelectPopup): - (WebKit::WebViewImpl::popupOpened): - (WebKit::WebViewImpl::popupClosed): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-03-24 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: [Chromium] Audits never complete - https://bugs.webkit.org/show_bug.cgi?id=36544 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-03-24 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Fix VKEY_F10, VKEY_F11 translation in WebInputEvent.cpp - https://bugs.webkit.org/show_bug.cgi?id=36524 - - * src/WebInputEvent.cpp: - (WebKit::staticKeyIdentifiers): - -2010-03-24 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Adler. - - Make Icon::createIconForFiles() optional. - https://bugs.webkit.org/show_bug.cgi?id=35072 - - - Rename iconForFiles() to chooseIconForFiles(). - - Call Icon::createIconForFiles() from chooseIconForFiles(). - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::chooseIconForFiles): - * src/ChromeClientImpl.h: - -2010-03-23 Kenneth Russell <kbr@google.com> - - Unreviewed build fix. - - Add #include <stdio.h> to fix Chromium Linux build. - - * src/WebGraphicsContext3DDefaultImpl.cpp: - -2010-03-23 Nate Chapin <japhet@chromium.org> - - Unreviewed, revert r56376. - - This revision introduced a crash in a couple of layout tests - on Chromium Linux. - - * public/WebViewClient.h: - (WebKit::WebViewClient::createPopupMenu): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - * src/ChromeClientImpl.h: - * src/WebViewImpl.cpp: - (WebKit::): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-03-23 Sergey Ulanov <sergeyu@chromium.org> - - Reviewed by Dmitry Titov. - - Changes needed to implement Show/Hide Controls command for <video> in - chrome: (1) added Controls action in WebMediaPlayerAction that toggles - controls for media player, (2) added MediaHasVideo in - WebContextMenuData so that controls can be made toggleable only for - video player but not for audio. - https://bugs.webkit.org/show_bug.cgi?id=36460 - - * public/WebContextMenuData.h: - (WebKit::WebContextMenuData::): - * public/WebMediaPlayerAction.h: - (WebKit::WebMediaPlayerAction::): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::performMediaPlayerAction): - -2010-03-23 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - When uncaught exception happens reveal Scripts panel only if reporting uncaught exceptions is on. - - https://bugs.webkit.org/show_bug.cgi?id=36498 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.handleExceptionEvent_): - -2010-03-23 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: TimelinePanel stays in the recording state after reopening WebInspector. - https://bugs.webkit.org/show_bug.cgi?id=36503 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::detach): - -2010-03-22 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Add GraphicsContext3D abstraction to WebKit API - https://bugs.webkit.org/show_bug.cgi?id=36262 - - Added WebGraphicsContext3D to the WebKit API and refactored Chromium's - GraphicsContext3D implementation to use it. All of the OpenGL calls have - been moved out of WebKit/chromium/src/GraphicsContext3D.cpp and into the - WebGraphicsContext3D implementation. GraphicsContext3D is still - responsible for the transfer of rendered output from the - WebGraphicsContext3D to the HTMLCanvasElement. - - The GraphicsContext3DInternal class, which is a data member of - GraphicsContext3D for the Chromium port, remains. It is possible to - eliminate this class and thereby one level of delegation, but this is - being deferred. - - The needed entry point for a Chrome implementation of - WebGraphicsContext3D has been added to WebKitClient, but it is not being - called yet by GraphicsContext3D. It will be once this patch lands and - Chromium is rolled forward to support this entry point. - - This is a large patch, but the transformation is almost entirely - mechanical and there is no change in functionality. Nearly all of - GraphicsContext3D and GraphicsContext3DInternal has been moved to - WebGraphicsContext3DDefaultImpl. The only area where the splitting of - logic is less than mechanical is GraphicsContext3D::beginPaint() and its - callees. - - Ran all WebGL layout tests and demos from Khronos site in Chromium - on Mac and Windows. - - * WebKit.gyp: - * public/WebGraphicsContext3D.h: Added. - (WebKit::WebGraphicsContext3D::Attributes::Attributes): - (WebKit::WebGraphicsContext3D::~WebGraphicsContext3D): - * public/WebKitClient.h: - (WebKit::WebKitClient::createGraphicsContext3D): - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): - (WebCore::GraphicsContext3DInternal::platformTexture): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::endPaint): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::bindAttribLocation): - (WebCore::GraphicsContext3DInternal::bindTexture): - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - (WebCore::GraphicsContext3DInternal::getActiveAttrib): - (WebCore::GraphicsContext3DInternal::getActiveUniform): - (WebCore::GraphicsContext3DInternal::getAttribLocation): - (WebCore::GraphicsContext3DInternal::getContextAttributes): - (WebCore::GraphicsContext3DInternal::getProgramInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderSource): - (WebCore::GraphicsContext3DInternal::getString): - (WebCore::GraphicsContext3DInternal::getUniformLocation): - (WebCore::GraphicsContext3DInternal::readPixels): - (WebCore::GraphicsContext3DInternal::shaderSource): - (WebCore::GraphicsContext3DInternal::texImage2D): - (WebCore::GraphicsContext3DInternal::texSubImage2D): - (WebCore::GraphicsContext3DInternal::uniform1fv): - (WebCore::GraphicsContext3DInternal::uniform1iv): - (WebCore::GraphicsContext3DInternal::uniform2fv): - (WebCore::GraphicsContext3DInternal::uniform2iv): - (WebCore::GraphicsContext3DInternal::uniform3fv): - (WebCore::GraphicsContext3DInternal::uniform3iv): - (WebCore::GraphicsContext3DInternal::uniform4fv): - (WebCore::GraphicsContext3DInternal::uniform4iv): - (WebCore::GraphicsContext3DInternal::uniformMatrix2fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix3fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix4fv): - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::~GraphicsContext3D): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::platformGraphicsContext3D): - (WebCore::GraphicsContext3D::platformTexture): - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - * src/WebGraphicsContext3D.cpp: Added. - (WebKit::WebGraphicsContext3D::createDefault): - * src/WebGraphicsContext3DDefaultImpl.cpp: Added. - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::create): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::~GLConnection): - (WebKit::WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState): - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): - (WebKit::WebGraphicsContext3DDefaultImpl::width): - (WebKit::WebGraphicsContext3DDefaultImpl::height): - (WebKit::WebGraphicsContext3DDefaultImpl::sizeInBytes): - (WebKit::createTextureObject): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::flipVertically): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::activeTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::bindBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::disableVertexAttribArray): - (WebKit::WebGraphicsContext3DDefaultImpl::drawElements): - (WebKit::WebGraphicsContext3DDefaultImpl::enableVertexAttribArray): - (WebKit::WebGraphicsContext3DDefaultImpl::generateMipmap): - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): - (WebKit::WebGraphicsContext3DDefaultImpl::getContextAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::getError): - (WebKit::WebGraphicsContext3DDefaultImpl::getProgramInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::getString): - (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): - (WebKit::WebGraphicsContext3DDefaultImpl::releaseShaderCompiler): - (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::vertexAttribPointer): - (WebKit::WebGraphicsContext3DDefaultImpl::createBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createProgram): - (WebKit::WebGraphicsContext3DDefaultImpl::createRenderbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteProgram): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteRenderbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::synthesizeGLError): - * src/WebGraphicsContext3DDefaultImpl.h: Added. - (WebKit::WebGraphicsContext3DDefaultImpl::): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::chooseFBConfig): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createNewContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createPbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyPbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::makeCurrent): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::getCurrentContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::GLConnection): - -2010-03-22 Jay Campan <jcampan@google.com> - - Reviewed by Darin Fisher. - - Making Chromium select popups not steal activation from the browser. - Select popups are now like autocomplete popups, shown in non-activated - windows. - https://bugs.webkit.org/show_bug.cgi?id=36062 - - * public/WebViewClient.h: - (WebKit::WebViewClient::createPopupMenu): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::popupOpened): - (WebKit::ChromeClientImpl::popupClosed): - * src/ChromeClientImpl.h: - * src/WebViewImpl.cpp: - (WebKit::): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::selectPopupHandleKeyEvent): - (WebKit::WebViewImpl::hideSelectPopup): - (WebKit::WebViewImpl::popupOpened): - (WebKit::WebViewImpl::popupClosed): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-03-22 Darin Fisher <darin@chromium.org> - - Reviewed by Nate Chapin. - - [chromium] Renderer crashes when navigating to a reference fragment in - a frame that has no current HistoryItem. - - https://bugs.webkit.org/show_bug.cgi?id=36443 - - Test: fast/loader/crash-replacing-location-before-load.html - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage): - -2010-03-22 Kevin Decker <kdecker@apple.com> - - Reviewed by John Sullivan. - - https://bugs.webkit.org/show_bug.cgi?id=36328 - - * src/LocalizedStrings.cpp: - (WebCore::missingPluginText): Added - -2010-03-22 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Fix inspected Page crash in destructor when Web Inspector is open. - - https://bugs.webkit.org/show_bug.cgi?id=36441 - - * src/js/InjectDispatch.js: - (inspectedPageDestroyed): Added stub for missing method. - -2010-03-22 Jochen Eisinger <jochen@chromium.org> - - Reviewed by Jeremy Orlow. - - Added methods to WebSecurityOrigin for invoking - SecurityOrigin::canAccess and SecurityOrigin::Create - https://bugs.webkit.org/show_bug.cgi?id=36356 - - * public/WebSecurityOrigin.h: - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::create): - (WebKit::WebSecurityOrigin::canAccess): - -2010-03-20 Dimitri Glazkov <dglazkov@chromium.org> - - No review, rolling out r56294. - http://trac.webkit.org/changeset/56294 - https://bugs.webkit.org/show_bug.cgi?id=36262 - - Broke compile on Chromium canaries. - - * WebKit.gyp: - * public/WebGraphicsContext3D.h: Removed. - * public/WebKitClient.h: - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::): - (WebCore::GraphicsContext3DInternal::GLConnection::chooseFBConfig): - (WebCore::GraphicsContext3DInternal::GLConnection::createNewContext): - (WebCore::GraphicsContext3DInternal::GLConnection::createPbuffer): - (WebCore::GraphicsContext3DInternal::GLConnection::destroyPbuffer): - (WebCore::GraphicsContext3DInternal::GLConnection::makeCurrent): - (WebCore::GraphicsContext3DInternal::GLConnection::destroyContext): - (WebCore::GraphicsContext3DInternal::GLConnection::getCurrentContext): - (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection): - (WebCore::GraphicsContext3DInternal::GLConnection::create): - (WebCore::GraphicsContext3DInternal::GLConnection::~GLConnection): - (WebCore::GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState): - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::makeContextCurrent): - (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): - (WebCore::GraphicsContext3DInternal::platformTexture): - (WebCore::createTextureObject): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::flipVertically): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::activeTexture): - (WebCore::GraphicsContext3DInternal::bindBuffer): - (WebCore::GraphicsContext3DInternal::bindFramebuffer): - (WebCore::GraphicsContext3DInternal::bindTexture): - (WebCore::GraphicsContext3DInternal::bufferDataImpl): - (WebCore::GraphicsContext3DInternal::disableVertexAttribArray): - (WebCore::GraphicsContext3DInternal::enableVertexAttribArray): - (WebCore::GraphicsContext3DInternal::getError): - (WebCore::GraphicsContext3DInternal::getContextAttributes): - (WebCore::GraphicsContext3DInternal::vertexAttribPointer): - (WebCore::GraphicsContext3DInternal::viewportImpl): - (WebCore::GraphicsContext3DInternal::synthesizeGLError): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::~GraphicsContext3D): - (WebCore::GraphicsContext3D::platformGraphicsContext3D): - (WebCore::GraphicsContext3D::platformTexture): - (WebCore::GraphicsContext3D::makeContextCurrent): - (WebCore::GraphicsContext3D::reshape): - (WebCore::GraphicsContext3D::beginPaint): - (WebCore::GraphicsContext3D::endPaint): - (WebCore::GraphicsContext3D::sizeInBytes): - (WebCore::GraphicsContext3D::createBuffer): - (WebCore::GraphicsContext3D::createFramebuffer): - (WebCore::GraphicsContext3D::createProgram): - (WebCore::GraphicsContext3D::createRenderbuffer): - (WebCore::GraphicsContext3D::createShader): - (WebCore::GraphicsContext3D::createTexture): - (WebCore::GraphicsContext3D::deleteBuffer): - (WebCore::GraphicsContext3D::deleteFramebuffer): - (WebCore::GraphicsContext3D::deleteProgram): - (WebCore::GraphicsContext3D::deleteRenderbuffer): - (WebCore::GraphicsContext3D::deleteShader): - (WebCore::GraphicsContext3D::deleteTexture): - (WebCore::GraphicsContext3D::activeTexture): - (WebCore::GraphicsContext3D::bindAttribLocation): - (WebCore::GraphicsContext3D::bindBuffer): - (WebCore::GraphicsContext3D::bindFramebuffer): - (WebCore::GraphicsContext3D::bindTexture): - (WebCore::GraphicsContext3D::bufferData): - (WebCore::GraphicsContext3D::bufferSubData): - (WebCore::GraphicsContext3D::checkFramebufferStatus): - (WebCore::GraphicsContext3D::detachShader): - (WebCore::GraphicsContext3D::disableVertexAttribArray): - (WebCore::GraphicsContext3D::drawArrays): - (WebCore::GraphicsContext3D::drawElements): - (WebCore::GraphicsContext3D::enableVertexAttribArray): - (WebCore::GraphicsContext3D::generateMipmap): - (WebCore::GraphicsContext3D::getActiveAttrib): - (WebCore::GraphicsContext3D::getActiveUniform): - (WebCore::GraphicsContext3D::getAttribLocation): - (WebCore::GraphicsContext3D::getBooleanv): - (WebCore::GraphicsContext3D::getBufferParameteriv): - (WebCore::GraphicsContext3D::getContextAttributes): - (WebCore::GraphicsContext3D::getError): - (WebCore::GraphicsContext3D::getFloatv): - (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): - (WebCore::GraphicsContext3D::getIntegerv): - (WebCore::GraphicsContext3D::getProgramiv): - (WebCore::GraphicsContext3D::getProgramInfoLog): - (WebCore::GraphicsContext3D::getRenderbufferParameteriv): - (WebCore::GraphicsContext3D::getShaderiv): - (WebCore::GraphicsContext3D::getShaderInfoLog): - (WebCore::GraphicsContext3D::getShaderSource): - (WebCore::GraphicsContext3D::getString): - (WebCore::GraphicsContext3D::getTexParameterfv): - (WebCore::GraphicsContext3D::getTexParameteriv): - (WebCore::GraphicsContext3D::getUniformfv): - (WebCore::GraphicsContext3D::getUniformiv): - (WebCore::GraphicsContext3D::getUniformLocation): - (WebCore::GraphicsContext3D::getVertexAttribfv): - (WebCore::GraphicsContext3D::getVertexAttribiv): - (WebCore::GraphicsContext3D::getVertexAttribOffset): - (WebCore::GraphicsContext3D::isBuffer): - (WebCore::GraphicsContext3D::isEnabled): - (WebCore::GraphicsContext3D::isFramebuffer): - (WebCore::GraphicsContext3D::isProgram): - (WebCore::GraphicsContext3D::isRenderbuffer): - (WebCore::GraphicsContext3D::isShader): - (WebCore::GraphicsContext3D::isTexture): - (WebCore::GraphicsContext3D::pixelStorei): - (WebCore::GraphicsContext3D::readPixels): - (WebCore::GraphicsContext3D::releaseShaderCompiler): - (WebCore::GraphicsContext3D::shaderSource): - (WebCore::GraphicsContext3D::synthesizeGLError): - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - (WebCore::GraphicsContext3D::uniform1fv): - (WebCore::GraphicsContext3D::uniform1iv): - (WebCore::GraphicsContext3D::uniform2fv): - (WebCore::GraphicsContext3D::uniform2iv): - (WebCore::GraphicsContext3D::uniform3fv): - (WebCore::GraphicsContext3D::uniform3iv): - (WebCore::GraphicsContext3D::uniform4fv): - (WebCore::GraphicsContext3D::uniform4iv): - (WebCore::GraphicsContext3D::uniformMatrix2fv): - (WebCore::GraphicsContext3D::uniformMatrix3fv): - (WebCore::GraphicsContext3D::uniformMatrix4fv): - (WebCore::GraphicsContext3D::vertexAttrib1fv): - (WebCore::GraphicsContext3D::vertexAttrib2fv): - (WebCore::GraphicsContext3D::vertexAttrib3fv): - (WebCore::GraphicsContext3D::vertexAttrib4fv): - (WebCore::GraphicsContext3D::vertexAttribPointer): - (WebCore::GraphicsContext3D::viewport): - * src/WebGraphicsContext3D.cpp: Removed. - * src/WebGraphicsContext3DDefaultImpl.cpp: Removed. - * src/WebGraphicsContext3DDefaultImpl.h: Removed. - -2010-03-19 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Add GraphicsContext3D abstraction to WebKit API - https://bugs.webkit.org/show_bug.cgi?id=36262 - - Added WebGraphicsContext3D to the WebKit API and refactored Chromium's - GraphicsContext3D implementation to use it. All of the OpenGL calls have - been moved out of WebKit/chromium/src/GraphicsContext3D.cpp and into the - WebGraphicsContext3D implementation. GraphicsContext3D is still - responsible for the transfer of rendered output from the - WebGraphicsContext3D to the HTMLCanvasElement. - - The GraphicsContext3DInternal class, which is a data member of - GraphicsContext3D for the Chromium port, remains. It is possible to - eliminate this class and thereby one level of delegation, but this is - being deferred. - - The needed entry point for a Chrome implementation of - WebGraphicsContext3D has been added to WebKitClient, but it is not being - called yet by GraphicsContext3D. It will be once this patch lands and - Chromium is rolled forward to support this entry point. - - This is a large patch, but the transformation is almost entirely - mechanical and there is no change in functionality. Nearly all of - GraphicsContext3D and GraphicsContext3DInternal has been moved to - WebGraphicsContext3DDefaultImpl. The only area where the splitting of - logic is less than mechanical is GraphicsContext3D::beginPaint() and its - callees. - - Ran all WebGL layout tests and demos from Khronos site in Chromium. - - * WebKit.gyp: - * public/WebGraphicsContext3D.h: Added. - (WebKit::WebGraphicsContext3D::Attributes::Attributes): - (WebKit::WebGraphicsContext3D::~WebGraphicsContext3D): - * public/WebKitClient.h: - (WebKit::WebKitClient::createGraphicsContext3D): - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::initialize): - (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): - (WebCore::GraphicsContext3DInternal::platformTexture): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::endPaint): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::bindAttribLocation): - (WebCore::GraphicsContext3DInternal::bindTexture): - (WebCore::GraphicsContext3DInternal::bufferData): - (WebCore::GraphicsContext3DInternal::bufferSubData): - (WebCore::GraphicsContext3DInternal::getActiveAttrib): - (WebCore::GraphicsContext3DInternal::getActiveUniform): - (WebCore::GraphicsContext3DInternal::getAttribLocation): - (WebCore::GraphicsContext3DInternal::getContextAttributes): - (WebCore::GraphicsContext3DInternal::getProgramInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderInfoLog): - (WebCore::GraphicsContext3DInternal::getShaderSource): - (WebCore::GraphicsContext3DInternal::getString): - (WebCore::GraphicsContext3DInternal::getUniformLocation): - (WebCore::GraphicsContext3DInternal::readPixels): - (WebCore::GraphicsContext3DInternal::shaderSource): - (WebCore::GraphicsContext3DInternal::texImage2D): - (WebCore::GraphicsContext3DInternal::texSubImage2D): - (WebCore::GraphicsContext3DInternal::uniform1fv): - (WebCore::GraphicsContext3DInternal::uniform1iv): - (WebCore::GraphicsContext3DInternal::uniform2fv): - (WebCore::GraphicsContext3DInternal::uniform2iv): - (WebCore::GraphicsContext3DInternal::uniform3fv): - (WebCore::GraphicsContext3DInternal::uniform3iv): - (WebCore::GraphicsContext3DInternal::uniform4fv): - (WebCore::GraphicsContext3DInternal::uniform4iv): - (WebCore::GraphicsContext3DInternal::uniformMatrix2fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix3fv): - (WebCore::GraphicsContext3DInternal::uniformMatrix4fv): - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::~GraphicsContext3D): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::platformGraphicsContext3D): - (WebCore::GraphicsContext3D::platformTexture): - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - * src/WebGraphicsContext3D.cpp: Added. - (WebKit::WebGraphicsContext3D::createDefault): - * src/WebGraphicsContext3DDefaultImpl.cpp: Added. - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::create): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::~GLConnection): - (WebKit::WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState): - (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl): - (WebKit::WebGraphicsContext3DDefaultImpl::initialize): - (WebKit::WebGraphicsContext3DDefaultImpl::makeContextCurrent): - (WebKit::WebGraphicsContext3DDefaultImpl::width): - (WebKit::WebGraphicsContext3DDefaultImpl::height): - (WebKit::WebGraphicsContext3DDefaultImpl::sizeInBytes): - (WebKit::createTextureObject): - (WebKit::WebGraphicsContext3DDefaultImpl::reshape): - (WebKit::WebGraphicsContext3DDefaultImpl::flipVertically): - (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::activeTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::bindBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::bindFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::disableVertexAttribArray): - (WebKit::WebGraphicsContext3DDefaultImpl::drawElements): - (WebKit::WebGraphicsContext3DDefaultImpl::enableVertexAttribArray): - (WebKit::WebGraphicsContext3DDefaultImpl::generateMipmap): - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveAttrib): - (WebKit::WebGraphicsContext3DDefaultImpl::getActiveUniform): - (WebKit::WebGraphicsContext3DDefaultImpl::getContextAttributes): - (WebKit::WebGraphicsContext3DDefaultImpl::getError): - (WebKit::WebGraphicsContext3DDefaultImpl::getProgramInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog): - (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::getString): - (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): - (WebKit::WebGraphicsContext3DDefaultImpl::releaseShaderCompiler): - (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource): - (WebKit::WebGraphicsContext3DDefaultImpl::vertexAttribPointer): - (WebKit::WebGraphicsContext3DDefaultImpl::createBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createProgram): - (WebKit::WebGraphicsContext3DDefaultImpl::createRenderbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::createTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteBuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteFramebuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteProgram): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteRenderbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader): - (WebKit::WebGraphicsContext3DDefaultImpl::deleteTexture): - (WebKit::WebGraphicsContext3DDefaultImpl::synthesizeGLError): - * src/WebGraphicsContext3DDefaultImpl.h: Added. - (WebKit::WebGraphicsContext3DDefaultImpl::): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::chooseFBConfig): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createNewContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::createPbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyPbuffer): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::makeCurrent): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::destroyContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::getCurrentContext): - (WebKit::WebGraphicsContext3DDefaultImpl::GLConnection::GLConnection): - -2010-03-19 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - Rename enqueueStorageEvent to enqueueEvent to match changes in - http://trac.webkit.org/changeset/56249. - - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::storageEvent): Renamed. - -2010-03-19 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] querying the current history item during a back/forward - navigation should not clobber the scroll offset, etc. - https://bugs.webkit.org/show_bug.cgi?id=36347 - - We should only allow the current history item to be modified if we are - no longer loading or if the load is a new navigation (i.e., not a - back/forward/reload variant). - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::currentHistoryItem): - -2010-03-18 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Adam Barth. - - Adding support for the ACCELERATED_COMPOSITING render path to Chromium. - https://bugs.webkit.org/show_bug.cgi?id=35557 - Currently compositing of layers is performed via s/w compositor which relies on Skia. This is an initial check-in - and it's only been tested on Windows. Compiling the code requires seting "use_accelerated_compositing=1" - to GYP_DEFINES. The update of layer contents and compositing is fairly inefficient but this will be fixed in - subsequent check-ins. - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::attachRootGraphicsLayer): - (WebKit::ChromeClientImpl::scheduleCompositingLayerSync): - * src/ChromeClientImpl.h: - (WebKit::ChromeClientImpl::setNeedsOneShotDrawingSynchronization): - Added methods required by the RenderLayerCompositor - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::paintWithContext): - (WebKit::WebFrameImpl::paint): - * src/WebFrameImpl.h: - Split WebFrameImpl::paint() into two methods to make it possible to call the paint - routine with an existing GraphicsContext, which is necessary for painting the root layer into - its own backing surface. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::paint): - Modified method to handle the accelerated compositing path. Now, when doing accelerated compositing, - paint() results in repainting the contents of the root layer and then doing a composite operation. - (WebKit::WebViewImpl::setRootGraphicsLayer): - (WebKit::WebViewImpl::setAcceleratedCompositing): - (WebKit::WebViewImpl::updateRootLayerContents): - (WebKit::WebViewImpl::setRootLayerNeedsDisplay): - * src/WebViewImpl.h: - (WebKit::WebViewImpl::isAcceleratedCompositing): - -2010-03-18 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - Chromium interface change to support Blob.slice. - https://bugs.webkit.org/show_bug.cgi?id=35318 - - * features.gypi: - * public/WebHTTPBody.h: - * public/WebKitClient.h: - (WebKit::WebKitClient::getFileModificationTime): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::getFileModificationTime): - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendFile): - (WebKit::WebHTTPBody::appendFileRange): - -2010-03-12 Ojan Vafai <ojan@chromium.org> - - Reviewed by David Levin. - - smartdelete should only occur after double-click - https://bugs.webkit.org/show_bug.cgi?id=35314 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectWordAroundPosition): - -2010-03-18 Nate Chapin <japhet@chromium.org> - - Unreviewed, build fix. - - Left a parentheses unclosed somehow. - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): - -2010-03-18 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Remove all references to V8Index.h and V8ClassIndex. - - https://bugs.webkit.org/show_bug.cgi?id=33477 - - * src/WebBindings.cpp: - (WebKit::getRangeImpl): - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): - -2010-03-17 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - PlatformTouchEventBuilder should not be resizing the touch point - array before appending touch points to it. - https://bugs.webkit.org/show_bug.cgi?id=36231 - - * src/WebInputEventConversion.cpp: - (WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder): - -2010-03-17 Dmitry Titov <dimich@chromium.org> - - Reviewed by Dimitri Glazkov. - - [chromium] Roll Chromium builder's DEPS to current revs. - https://bugs.webkit.org/show_bug.cgi?id=36241 - - * DEPS: - -2010-03-17 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Revert WebGL context attributes changes 33416 / r56074 and 36200 / r56093 - https://bugs.webkit.org/show_bug.cgi?id=36233 - - The patch for bug 33416, which added multisampling support to the - WebGL back buffer, uncovered some OpenGL driver bugs on the build - bots which need further investigation to determine the appropriate - workaround. Reverting this change, the minor build fix in 36189, - and the skipping of the affected tests in bug 36200. - - Built and tested WebKit and Chromium and ran all WebGL layout - tests in both. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::bindFramebuffer): - (WebCore::GraphicsContext3D::readPixels): - -2010-03-16 James Hawkins <jhawkins@chromium.org> - - Reviewed by David Levin. - - [Chromium] Size the WebVector of forms after determining how many - forms are valid and will be returned. - - https://bugs.webkit.org/show_bug.cgi?id=36204 - - No new tests, as this is only triggered by Chromium's use of the - WebFormElement API. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::forms): - -2010-03-16 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Build breakage from 33416 - https://bugs.webkit.org/show_bug.cgi?id=36189 - - No new tests. Built release Chromium. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::reshape): - -2010-03-16 Zhenyao Mo <zmo@google.com> - - Reviewed by Darin Fisher. - - Hook up WebGLContextAttributes to OpenGL context creation code - https://bugs.webkit.org/show_bug.cgi?id=33416 - - Test: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html - - * src/GraphicsContext3D.cpp: Hook up WebGLContextAttributes to OpenGL context creation code for Windows. - -2010-03-16 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. - - Fix Chromium Mac build: remove unused code. - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): - -2010-03-16 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Introduce InspectorFrontendClient that provides InspectorFrontend with an interface to the embedder. InspectorClient now serves as a delegate for InspectorController and does not contain methods for managing inspector frontend window. That allows to create remote InspectorFrontendHost. - - Introduce InspectorFrontendClient that would provide InspectorFrontend with an interface to the embedder - https://bugs.webkit.org/show_bug.cgi?id=35036 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::openInspectorFrontend): - * src/InspectorClientImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::didCommitProvisionalLoad): - (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy): - (WebKit::WebDevToolsAgentImpl::setInspectorFrontendProxyToInspectorController): - * src/WebDevToolsAgentImpl.h: - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::jsBringToFront): - (WebKit::WebDevToolsFrontendImpl::jsInspectedURLChanged): - * src/WebDevToolsFrontendImpl.h: - * src/js/InjectDispatch.js: - (close): - -2010-03-16 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: chromium tests fix. - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-03-16 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: migrate to native styles inspector in order to inspect styles from foreighn domains. - - https://bugs.webkit.org/show_bug.cgi?id=36117 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-03-15 John Gregg <johnnyg@google.com> - - Reviewed by David Levin. - - Notification object should expose absolute URL of icon - https://bugs.webkit.org/show_bug.cgi?id=35800 - - * public/WebNotification.h: - * src/WebNotification.cpp: - (WebKit::WebNotification::iconURL): - -2010-03-15 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - https://bugs.webkit.org/show_bug.cgi?id=36152 - [chromium] Add support for history.pushState and history.replaceState - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::didNavigateWithinPage): Move implementation of - didChangeLocationWithinPage to here. Only add to the redirect chain if - we are performing a simple hash change (i.e., no state object on the - history item). Call the old didChangeLocationWithinPage for backwards - compat with Chromium. This will be removed in a subsequent patch. - - (WebKit::WebFrameClient::didChangeLocationWithinPage): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage): - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - Call the new version of didChangeLocationWithinPage without the - parameter to indicate whether this is a new navigation or not. We only - need this method on WebFrameClient to support TestShell / DRT. - - (WebKit::FrameLoaderClientImpl::dispatchDidPushStateWithinPage): - Call dispatchDidNavigateWithinPage since pushState is just a type of - in-page navigation. This is an in-page navigation that adds another - entry to session history. - - (WebKit::FrameLoaderClientImpl::dispatchDidReplaceStateWithinPage): - Call dispatchDidNavigateWithinPage since replaceState is just a type of - in-page navigation. This is an in-page navigation that replaces the - current session history entry. - - (WebKit::FrameLoaderClientImpl::dispatchDidPopStateWithinPage): Do - nothing since dispatchDidNavigateWithinPage is called in this case by - the FrameLoader. - - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction): - (WebKit::FrameLoaderClientImpl::shouldGoToHistoryItem): Move the code - for handling the dummy chrome-back-forward://go/ URLs from - dispatchDecidePolicyForNavigationAction to shouldGoToHistoryItem, which - prevents the URLs from leaking into session history. - shouldGoToHistoryItem is called before any work is done by history - traversal, so this is a better place for this hack. Ultimately, this - code should be eliminatd in favor of better integration with - FrameLoader or HistoryController. - - * src/FrameLoaderClientImpl.h: - -2010-03-15 Darin Fisher <darin@chromium.org> - - Fix build bustage. We also need to pull down "third_party/tcmalloc" - - * DEPS: - -2010-03-15 Darin Fisher <darin@chromium.org> - - Fix build bustage. We also need to pull down "gfx" - - * DEPS: - -2010-03-15 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - https://bugs.webkit.org/show_bug.cgi?id=36131 - Update include paths for chromium Rect, Point, and Size types. - - Update DEPS to pull latest chromium code that reflects the - new location of these headers. - - * DEPS: - * public/WebPoint.h: - * public/WebRect.h: - * public/WebSize.h: - -2010-03-15 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Send the frame URL on GeolocationServiceBridgeImpl::startUpdating. - https://bugs.webkit.org/show_bug.cgi?id=36012 - - * public/GeolocationServiceBridgeChromium.h: - * src/GeolocationServiceBridgeChromium.cpp: - (WebKit::GeolocationServiceBridgeImpl::startUpdating): - -2010-03-15 Patrik Persson <patrik.j.persson@ericsson.com> - - Reviewed by Darin Adler. - - https://bugs.webkit.org/show_bug.cgi?id=32369 - - Revise iframe sandbox behavior to match the updated HTML5 spec. - - - Enables window.sessionStorage in sandboxed iframes. - - - Raises SECURITY_ERR exceptions when window.localStorage or - window.openDatabase() is blocked by iframe sandboxing. - - Note: window.sessionStorage does not raise exceptions. - - WebKit would previously return null references in these cases. The - new behavior is in accordance with HTML5: - - http://dev.w3.org/html5/webstorage/ (sections 4.2 and 4.3) - http://dev.w3.org/html5/webdatabase/ (section 4.1) - http://www.mail-archive.com/whatwg@lists.whatwg.org/msg19786.html - - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::storageEvent): exception handling - * src/StorageEventDispatcherImpl.cpp: - (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent): exception handling - -2010-03-15 Tony Chang <tony@chromium.org> - - Reviewed by Darin Adler. - - option-pageup/down should move cursor on chromium mac - https://bugs.webkit.org/show_bug.cgi?id=36108 - - * src/EditorClientImpl.cpp: - (WebKit::): - -2010-03-13 Eric Roman <eroman@chromium.org> - - Reviewed by Adam Barth. - - Add a firstPartyForCookies() property to WebDocument. - https://bugs.webkit.org/show_bug.cgi?id=35592 - - * public/WebDocument.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::firstPartyForCookies): - -2010-03-12 Garret Kelly <gdk@chromium.org> - - Unreiviewed. - - Fix Chromium Mac build. Last patch did not apply properly. - (Garret assures me this patch will actually work.) - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchEventType): - (WebKit::toPlatformTouchPointState): - -2010-03-12 Garret Kelly <gdk@chromium.org> - - Unreviewed. - - Fix Chromium Mac build. This time, with actual fixing goodness. - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchEventType): - (WebKit::toPlatformTouchPointState): - -2010-03-12 Garret Kelly <gdk@chromium.org> - - Unreviewed. - - Fix Chromium Mac build. - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchEventType): - (WebKit::toPlatformTouchPointState): - -2010-03-12 Garret Kelly <gdk@chromium.org> - - Reviewed by Eric Seidel. - - Enable touch events in Chromium features gypi file. - https://bugs.webkit.org/show_bug.cgi?id=35994 - - * features.gypi: - -2010-03-12 Darin Fisher <darin@chromium.org> - - Fix Chromium build bustage. - - Wrap usage of WebPrivatePtr from WebNode.h in a #if - WEBKIT_IMPLEMENTATION guard. - - * public/WebNode.h: - -2010-03-12 Nicolas Weber <thakis@chromium.org> - - Reviewed by David Levin. - - [Chromium] Cmd-clicking submit buttons should submit in new tab - https://bugs.webkit.org/show_bug.cgi?id=36023 - - Take modifiers into account when clicking form buttons. E.g. - cmd-clicking a submit button will submit in a new background tab, - cmd-shift-clicking in a new foreground tab, shift-clicking in a new - window. (On windows/linux, it's ctrl instead of cmd.) - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::actionSpecifiesNavigationPolicy): - -2010-03-12 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Fix memory leak in WebImageDecoder API - https://bugs.webkit.org/show_bug.cgi?id=35946 - - * src/WebImageDecoder.cpp: - (WebKit::WebImageDecoder::setData): - (WebKit::WebImageDecoder::getFrameAtIndex): - -2010-03-11 Aaron Boodman <aa@chromium.org> - - Kill WebDocument::applicationID() (part 1). - - Modify interface to WebCore::NotificationPresenter::checkPermission() - and remove implementation of WebDocument::applicationID(). Breaking - API changes will be in a subsequent change. - https://bugs.webkit.org/show_bug.cgi?id=35846 - - * public/WebNotificationPresenter.h: - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::checkPermission): - * src/NotificationPresenterImpl.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::applicationID): - -2010-03-11 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by Darin Fisher. - - Fix the screen coordinate conversion of Chromium Mac mouse events for - multiple-moniter setups. Also changes the global coordinate values - to be computed from the event, rather than the instantaneous mouse - location, and reduces code duplication for location conversion. - - Dual-sided patch with http://codereview.chromium.org/751002 - - https://bugs.webkit.org/show_bug.cgi?id=35950 - - * src/mac/WebInputEventFactory.mm: - (WebKit::setWebEventLocationFromEventInView): - (WebKit::WebInputEventFactory::mouseEvent): - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2010-03-11 Anders Carlsson <andersca@apple.com> - - Reviewed by David Hyatt. - - Remove invalidateContents, it isn't used and it never makes sense to only invalidate the contents. - - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - -2010-03-10 Darin Fisher <darin@chromium.org> - - Reviewed by Jeremy Orlow. - - Use WebPrivatePtr for WebNode - https://bugs.webkit.org/show_bug.cgi?id=36005 - - * public/WebElement.h: - * public/WebFormElement.h: - * public/WebInputElement.h: - * public/WebLabelElement.h: - * public/WebNode.h: - (WebKit::WebNode::WebNode): - (WebKit::WebNode::isNull): - (WebKit::WebNode::unwrap): - (WebKit::WebNode::constUnwrap): - * public/WebPrivatePtr.h: - (WebKit::WebPrivatePtr::assign): - * src/WebDocument.cpp: - (WebKit::WebDocument::WebDocument): - (WebKit::WebDocument::operator=): - (WebKit::WebDocument::operator PassRefPtr<Document>): - * src/WebElement.cpp: - (WebKit::WebElement::hasTagName): - (WebKit::WebElement::WebElement): - (WebKit::WebElement::operator=): - (WebKit::WebElement::operator PassRefPtr<Element>): - * src/WebFormElement.cpp: - (WebKit::WebFormElement::WebFormElement): - (WebKit::WebFormElement::operator=): - (WebKit::WebFormElement::operator PassRefPtr<HTMLFormElement>): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::WebInputElement): - (WebKit::WebInputElement::operator=): - (WebKit::WebInputElement::operator PassRefPtr<HTMLInputElement>): - * src/WebLabelElement.cpp: - (WebKit::WebLabelElement::correspondingControl): - (WebKit::WebLabelElement::operator=): - (WebKit::WebLabelElement::operator PassRefPtr<HTMLLabelElement>): - * src/WebNode.cpp: - (WebKit::WebNode::reset): - (WebKit::WebNode::assign): - (WebKit::WebNode::equals): - (WebKit::WebNode::parentNode): - (WebKit::WebNode::createMarkup): - (WebKit::WebNode::addEventListener): - (WebKit::WebNode::removeEventListener): - (WebKit::WebNode::simulateClick): - (WebKit::WebNode::WebNode): - (WebKit::WebNode::operator=): - (WebKit::WebNode::operator PassRefPtr<Node>): - -2010-03-10 Darin Fisher <darin@chromium.org> - - Reviewed by Jeremy Orlow. - - Add API wrapper for WebCore::SerializedScriptValue - https://bugs.webkit.org/show_bug.cgi?id=35988 - - WebSerializedScriptValue is a wrapper around SerializedScriptValue. - - WebPrivatePtr is used to simplify wrapping reference counted WebCore - types. This class is used to cleanup WebHistoryItem, and will be used - to clean up other classes in the WebKit API in a follow-up patch. - - * WebKit.gyp: - * public/WebHistoryItem.h: - * public/WebPrivatePtr.h: Added. - * public/WebSerializedScriptValue.h: Added. - * src/WebHistoryItem.cpp: - * src/WebSerializedScriptValue.cpp: Added. - -2010-03-10 Sanjeev Radhakrishnan <sanjeevr@chromium.org> - - Reviewed by Darin Fisher. - - Allow a plugin to participate in the browser's print workflow. - https://bugs.webkit.org/show_bug.cgi?id=35550 - - * public/WebFrame.h: - * public/WebPlugin.h: - * src/WebFrameImpl.cpp: - * src/WebFrameImpl.h: - * src/WebPluginContainerImpl.cpp: - * src/WebPluginContainerImpl.h: - -2010-03-10 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Nate Chapin. - - [chromium]: Fix regression in mouse capture on Mac/Linux - https://bugs.webkit.org/show_bug.cgi?id=35987 - - * src/WebViewImpl.cpp: - -2010-03-10 Evan Stade <estade@chromium.org> - - Reviewed by David Levin. - - [chromium] add functionality to activate the focused node in a WebView - https://bugs.webkit.org/show_bug.cgi?id=35407 - - * public/WebDocument.h: - * public/WebNode.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::focusedNode): Added - * src/WebNode.cpp: - (WebKit::WebNode::simulateClick): Added - -2010-03-10 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - https://bugs.webkit.org/show_bug.cgi?id=35952 - Propagate mouse wheel events to Pepper plugins. - - * src/WebInputEventConversion.cpp: - (WebKit::WebMouseWheelEventBuilder::WebMouseWheelEventBuilder): - * src/WebInputEventConversion.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleEvent): - (WebKit::WebPluginContainerImpl::handleMouseEvent): - (WebKit::WebPluginContainerImpl::handleWheelEvent): - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - * src/WebPluginContainerImpl.h: - -2010-03-10 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - Add support for converting WebTouchEvents to PlatformTouchEvents and - routing them into the EventHandler for the frame in which they - originate. - https://bugs.webkit.org/show_bug.cgi?id=35874 - - * src/ChromeClientImpl.h: - (WebKit::ChromeClientImpl::needTouchEvents): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::touchEvent): Handle incoming WebTouchEvents, - converting them to PlatformTouchEvents and sending them to the - EventHandler. - (WebKit::WebViewImpl::handleInputEvent): Now routes WebTouchEvents to - the touchEvent handler. - * src/WebViewImpl.h: - -2010-03-10 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Wrap and unwrap v8 objects with WrapperTypeInfo instead of V8ClassIndex::V8WrapperType. - - https://bugs.webkit.org/show_bug.cgi?id=35941 - - * src/WebBindings.cpp: - (WebKit::getRangeImpl): - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::createInspectorBackendV8Wrapper): - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): - -2010-03-10 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - Fixing build warning caused by using 0 instead of NULL as the sentiel - in a varargs call. - https://bugs.webkit.org/show_bug.cgi?id=35898 - - * src/gtk/WebInputEventFactory.cpp: - -2010-03-10 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - Add IndexedDatabase class and hook it up. - https://bugs.webkit.org/show_bug.cgi?id=35927 - - This change is mostly just adding the plumbing necessary for - the IndexedDatabaseRequest and IndexedDatabaseSync (not written - yet). - - * WebKit.gyp: - * public/WebIndexedDatabase.h: Added. - (WebKit::WebIndexedDatabase::~WebIndexedDatabase): - * public/WebKitClient.h: - (WebKit::WebKitClient::getIndexedDatabase): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::getIndexedDatabase): - * src/IndexedDatabaseProxy.cpp: Added. - (WebCore::IndexedDatabaseProxy::create): - (WebCore::IndexedDatabaseProxy::IndexedDatabaseProxy): - (WebCore::IndexedDatabaseProxy::~IndexedDatabaseProxy): - (WebCore::IndexedDatabaseProxy::open): - * src/IndexedDatabaseProxy.h: Added. - -2010-03-10 Andrey Kosyakov <caseq@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: display list of active workers & support debugging - with fake workers - https://bugs.webkit.org/show_bug.cgi?id=35568 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - -2010-03-10 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - https://bugs.webkit.org/show_bug.cgi?id=35956 - Create a grd file upstream for resources that chromium uses - that are pulled directly from the upstream repository. - - * WebKit.grd: Added. - -2010-03-10 Roland Steiner <rolandsteiner@chromium.org> - - Reviewed by David Levin. - - Bug 28293 - [Chromium] event.datatransfer.getdata("text/uri-list") is treated the same as getdata("URL") - https://bugs.webkit.org/show_bug.cgi?id=28293 - - Change ChromiumDataObject such that it treats types "URL" and "text/uri-list" - correctly for event.dataTransfer.getData/setData. Currently both are treated - as synonyms, but for "URL", getData is supposed to only return the first valid URL - contained within the data for "text/uri-list" (see HTML5 spec). - - Tests: editing/pasteboard/dataTransfer-setData-getData.html - - * src/WebDragData.cpp: - (WebKit::WebDragData::url): - (WebKit::WebDragData::setURL): - -2010-03-08 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - Need to send mouse events to plugin when it has mouse capture - https://bugs.webkit.org/show_bug.cgi?id=35900 - - * public/WebInputEvent.h: - (WebKit::WebInputEvent::isMouseEventType): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::mouseUp): - (WebKit::WebViewImpl::handleInputEvent): - * src/WebViewImpl.h: - -2010-03-09 Anton Muhin <antonm@chromium.org> - - Reviewed by Darin Fisher. - - Accept and bailout NULL widgets in ChromiumBridge - https://bugs.webkit.org/show_bug.cgi?id=35796 - - * src/ChromiumBridge.cpp: - (WebCore::toChromeClientImpl): - -2010-03-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Use clean global object for devtools utility context instead of - trying to simulate inspected context. - - https://bugs.webkit.org/show_bug.cgi?id=35923 - - * src/DebuggerAgentImpl.cpp: - * src/DebuggerAgentImpl.h: - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::resetInspectorFrontendProxy): - -2010-03-08 Alexey Proskuryakov <ap@apple.com> - - Chromium build fix. - - Updated for the removal of "mightDownloadFromHandle". - - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::ResourceHandle): - (WebCore::ResourceHandle::create): - -2010-03-08 Dimitri Glazkov <dglazkov@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Reset multiple form submission protection on mouse events. - https://bugs.webkit.org/show_bug.cgi?id=35128 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseDown): - -2010-03-08 Michael Nordman <michaeln@google.com> - - Reviewed by Darin Fisher. - - Quick fix for a chromium unit test failures around r55675 (repaint refactoring). - This change restores the tests for empty rects that were deleted. - - https://bugs.webkit.org/show_bug.cgi?id=35878 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::invalidateContentsAndWindow): - * src/WebPopupMenuImpl.cpp: - (WebKit::WebPopupMenuImpl::invalidateContentsAndWindow): - -2010-03-02 Adam Treat <atreat@rim.com> - - Reviewed by Dave Hyatt. - - Adapt the chromium port to the refactoring of repaint methods. - - https://bugs.webkit.org/show_bug.cgi?id=34214 - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::invalidateContents): - (WebKit::ChromeClientImpl::invalidateWindow): - (WebKit::ChromeClientImpl::invalidateContentsAndWindow): - (WebKit::ChromeClient::invalidateContentsForSlowScroll): - * src/ChromeClientImpl.h: - -2010-03-08 Jian Li <jianli@chromium.org> - - Reviewed by Dmitry Titov. - - Blob.slice support. - https://bugs.webkit.org/show_bug.cgi?id=32993 - - Add ENABLE_BLOB_SLICE feature define. - - * features.gypi: - -2010-03-08 Eric Uhrhane <ericu@chromium.org> - - Reviewed by David Levin. - - Remove the now-redundant Settings fields for the Database - https://bugs.webkit.org/show_bug.cgi?id=35763 - - No new tests; this code isn't called. - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - * src/WebSettingsImpl.h: - -2010-03-08 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - Pass the WebFrame into WebStorageArea::setItem so we can figure out the routing ID - https://bugs.webkit.org/show_bug.cgi?id=35758 - - This is necessary since setItem is sometimes blocked and the embedder might need - to display some piece of UI associated with such an event. - - * public/WebStorageArea.h: - (WebKit::WebStorageArea::setItem): - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::setItem): - * src/WebStorageAreaImpl.cpp: - (WebKit::WebStorageAreaImpl::setItem): - * src/WebStorageAreaImpl.h: - -2010-03-07 Mark Rowe <mrowe@apple.com> - - Chromium build fix. - - * src/ChromiumBridge.cpp: Include SharedBuffer.h since WebCore::SharedBuffer is being used. - -2010-03-07 Mark Rowe <mrowe@apple.com> - - Chromium build fix. - - * src/ResourceHandle.cpp: Include SharedBuffer.h since WebCore::SharedBuffer is being used. - -2010-03-06 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Chromium: Restore devtools window activate upon node search complete. - - https://bugs.webkit.org/show_bug.cgi?id=35832 - - * src/js/DevTools.js: - -2010-03-06 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] Embedder initiated loads should not always stop existing loads - https://bugs.webkit.org/show_bug.cgi?id=33862 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::reload): - (WebKit::WebFrameImpl::loadRequest): - (WebKit::WebFrameImpl::loadHistoryItem): - (WebKit::WebFrameImpl::loadData): - -2010-03-06 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] spurious WebViewClient::didStopLoading if changing - location.hash while a subframe is still loading - - https://bugs.webkit.org/show_bug.cgi?id=33884 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - Call isLoadingInAPISense, which checks subframes. - -2010-03-06 Hironori Bono <hbono@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Typing into Flash with wmode = opaque|transparent and - non-latin language active outputs as if US keyboard layout active - - https://bugs.webkit.org/show_bug.cgi?id=34936 - - This change is a WebKit-side change for this issue. It dispatches - Char events to plug-ins so plug-ins can receive non-ASCII characters - as well as ASCII characters. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::keyEvent): - -2010-03-06 Kavita Kanetkar <kkanetkar@chromium.org> - - Reviewed by Darin Fisher. - - Create WebKit API for WebCore::ImageDecoder - https://bugs.webkit.org/show_bug.cgi?id=35415 - - * WebKit.gyp: - * public/WebImageDecoder.h: Added. - * src/WebImageDecoder.cpp: Added. - -2010-03-05 John Abd-El-Malek <jam@chromium.org> - - Reviewed by Darin Fisher. - - Take out code hack that flips the result of NPP_HandleEvent. This needs to move to - the NPAPI code so that Pepper plugins don't hit it. - https://bugs.webkit.org/show_bug.cgi?id=35779 - - * public/WebPluginContainer.h: - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleMouseEvent): - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - -2010-03-05 Ilya Tikhonovsky <loislo@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: Do not show link helper in popovers and/or for external resources. - - https://bugs.webkit.org/show_bug.cgi?id=35785 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.initUI): - (devtools.DebuggerAgent.prototype.addScriptInfo_): - -2010-03-04 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - Adding PlatformTouchEventBuilder and PlatformTouchPointBuilder for - converting Chromium WebTouchEvent and WebTouchPoint types to - corresponding WebCore types. - https://bugs.webkit.org/show_bug.cgi?id=35760 - - * src/WebInputEventConversion.cpp: - (WebKit::toPlatformTouchEventType): - (WebKit::toPlatformTouchPointState): - (WebKit::PlatformTouchPointBuilder::PlatformTouchPointBuilder): - (WebKit::PlatformTouchEventBuilder::PlatformTouchEventBuilder): - * src/WebInputEventConversion.h: - -2010-03-04 John Gregg <johnnyg@google.com> - - Reviewed by Darin Fisher. - - [chromium] WebDocument:applicationID() crashes on <meta> tag with no http-equiv attribute - https://bugs.webkit.org/show_bug.cgi?id=35771 - - * src/WebDocument.cpp: - (WebKit::WebDocument::applicationID): - check for presence of http-equiv attribute before lower()ing it. - -2010-03-04 Darin Fisher <darin@chromium.org> - - Reviewed by Dmitry Titov. - - [chromium] make history.{push,replace}State enabled at runtime - https://bugs.webkit.org/show_bug.cgi?id=35753 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enablePushState): - (WebKit::WebRuntimeFeatures::isPushStateEnabled): - -2010-03-04 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed: chromium tests fix. - - * src/js/Tests.js: - -2010-03-03 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: Remove two last synchronous calls from front-end to InspectorBackend. - - https://bugs.webkit.org/show_bug.cgi?id=35720 - - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState): - -2010-03-03 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: Remove sync access to resourceTrackingEnabled. - - https://bugs.webkit.org/show_bug.cgi?id=35693 - - * src/js/DevTools.js: - -2010-03-04 Darin Fisher <darin@chromium.org> - - Reviewed by Pavel Feldman. - - Fix failing DevToolsSanityTest.TestResourceContentLength - https://bugs.webkit.org/show_bug.cgi?id=35725 - - http://trac.webkit.org/changeset/55466 missed one more spot - where contentLength needed to be renamed resourceSize. - - * src/js/Tests.js: - -2010-03-03 Garret Kelly <gdk@chromium.org> - - Reviewed by Darin Fisher. - - Adding touch event type and point type. Tested against the try bots. - https://bugs.webkit.org/show_bug.cgi?id=35691 - - * public/WebInputEvent.h: - (WebKit::WebInputEvent::): - (WebKit::WebInputEvent::isTouchEventType): - (WebKit::WebTouchEvent::WebTouchEvent): - * public/WebTouchPoint.h: Added. - (WebKit::WebTouchPoint::WebTouchPoint): - (WebKit::WebTouchPoint::): - -2010-03-02 Tony Chang <tony@chromium.org> - - Reviewed by Darin Fisher. - - add a flag to WebURLResponse so we can identify multipart content - https://bugs.webkit.org/show_bug.cgi?id=35628 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::isMultipartPayload): - (WebKit::WebURLResponse::setIsMultipartPayload): - -2010-03-02 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Fisher. - - Google Analytics triggers "blocked plugin" UI - https://bugs.webkit.org/show_bug.cgi?id=35565 - - Plumb didNotAllowPlugins to the client. - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::didNotAllowPlugins): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::didNotAllowPlugins): - * src/FrameLoaderClientImpl.h: - -2010-03-02 Chris Fleizach <cfleizach@apple.com> - - Reviewed by Beth Dakin. - - aria-label isn't respected on option elements - https://bugs.webkit.org/show_bug.cgi?id=35400 - - * src/SuggestionsPopupMenuClient.h: - (WebKit::SuggestionsPopupMenuClient::itemAccessibilityText): - -2010-03-02 Mads Ager <ager@chromium.org> - - Reviewed by Adam Barth. - - [V8] V8 should be notified of context disposals - https://bugs.webkit.org/show_bug.cgi?id=35526 - - Update V8 DEPS in order to get V8 API changes needed for context - disposal notifications. - - * DEPS: - -2010-03-02 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Add EnabledAtRuntime attribute to WebGLArray constructors - https://bugs.webkit.org/show_bug.cgi?id=35558 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableWebGL): - (WebKit::WebRuntimeFeatures::isWebGLEnabled): - -2010-03-02 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement WebNode::equals and add inline operators for == - and !=. - - https://bugs.webkit.org/show_bug.cgi?id=35543 - - * public/WebNode.h: - (WebKit::operator==): - (WebKit::operator!=): - * src/WebNode.cpp: - (WebKit::WebNode::equals): - -2010-03-01 Jakob Petsovits <jpetsovits@rim.com> - - Reviewed by Adam Barth. - - Adapt to the new ZoomMode enum. - https://bugs.webkit.org/show_bug.cgi?id=35347 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setZoomLevel): - -2010-03-01 Thatcher Ulrich <tulrich@google.com> - - Reviewed by Darin Fisher. - - Fix chromium iframe shims. Add another test case to the - iframes-shims test. After r53637, the plugin widget doesn't get - moved every paint. This used to hide the bug that if an iframe - gets added, the plugin's cutout rectangles don't get updated until - a layout happens. - https://bugs.webkit.org/show_bug.cgi?id=35184 - - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::widgetPositionsUpdated): do reportGeometry() to ensure that - the plugin is aware of the positions of cutouts on the page (for iframe shim behavior). - * src/WebPluginContainerImpl.h: - -2010-02-27 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Chromium: remove DevTools part that has been upstreamed. - - * src/js/DevTools.js: - -2010-02-26 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Web Inspector: reload inspected page on Cmd+R / Ctrl+R / F5 key event in inspector. - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::jsCanAttachWindow): - * src/WebDevToolsFrontendImpl.h: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl): - (devtools.InspectorBackendImpl.prototype.toggleNodeSearch): - -2010-02-26 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Verify that the Nodes being enumerated are HTML elements. - - https://bugs.webkit.org/show_bug.cgi?id=35463 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::forms): - -2010-02-26 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Fisher. - - Expose an API for ports to add schemes to the mixed content whitelist - https://bugs.webkit.org/show_bug.cgi?id=35438 - - Expose registerURLSchemeAsSecure via the WebKit API. - - * public/WebSecurityPolicy.h: - * src/WebSecurityPolicy.cpp: - (WebKit::WebSecurityPolicy::registerURLSchemeAsSecure): - -2010-02-26 Brett Wilson <brettw@chromium.org> - - Fix chromium build. This test's expectation became obsolete with - recent changes to KURL which my previous change brings Chromium's - port in compliance with. - - * tests/KURLTest.cpp: - (ComponentCase::TEST): - -2010-02-26 Yaar Schnitman <yaar@chromium.org> - - Chromium build fix. - - * features.gypi: Added missing new variable enable_svg. - -2010-02-26 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - [V8] Auto-generate and split DerivedSourcesAllInOne.cpp - https://bugs.webkit.org/show_bug.cgi?id=33048 - - * DEPS: Incremented gyp revision. - -2010-02-26 Darin Fisher <darin@chromium.org> - - Fix mac warning (that gets treated as an error in the chromium build). - - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::cookiesEnabled): - -2010-02-25 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - Remove deprecated cookie methods. - https://bugs.webkit.org/show_bug.cgi?id=35420 - - * public/WebFrameClient.h: - * public/WebKitClient.h: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::setCookies): - (WebCore::ChromiumBridge::cookies): - (WebCore::ChromiumBridge::cookieRequestHeaderFieldValue): - (WebCore::ChromiumBridge::rawCookies): - (WebCore::ChromiumBridge::deleteCookie): - (WebCore::ChromiumBridge::cookiesEnabled): - -2010-02-25 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement WebLabelElement. - - https://bugs.webkit.org/show_bug.cgi?id=35317 - - * WebKit.gyp: - * public/WebLabelElement.h: Added. - * src/WebLabelElement.cpp: Added. - -2010-02-25 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Dimitri Glazkov. - - Web Inspector: make script lines count calculation lazy. - - https://bugs.webkit.org/show_bug.cgi?id=35392 - - * src/js/Tests.js: - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.checkScriptsPanel): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkScriptsPanel): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.checkScriptsList): - (.TestSuite.prototype._executeFunctionForStepTest): - -2010-02-24 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - Add a missing WebString.h include. - https://bugs.webkit.org/show_bug.cgi?id=35360 - - This is required since some of the methods have implementations that - return a WebString. - - * public/WebCookieJar.h: - -2010-02-24 Jay Campan <jcampan@google.com> - - Reviewed by David Levin. - - Don't show the autofill popup when the input text is disabled or read only. - - https://bugs.webkit.org/show_bug.cgi?id=35129 - - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::autofill): - -2010-02-24 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Fisher. - - [Chromium API] Disambiguate allowJavaScript from didNotAllowScript - https://bugs.webkit.org/show_bug.cgi?id=35205 - - Plumb didNotAllowScript through Chromium's WebKit API. - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::didNotAllowScript): - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::createUtilityContext): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::didNotAllowScript): - * src/FrameLoaderClientImpl.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::bindToWindowObject): - -2010-02-23 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Implement WebDocument::getElementsByTagName. - - https://bugs.webkit.org/show_bug.cgi?id=35272 - - * public/WebDocument.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::getElementsByTagName): - -2010-02-23 Steve Block <steveblock@google.com> - - Reviewed by Jeremy Orlow. - - Removes redundant Settings::setGeolocationEnabled and Settings::geolocationEnabled - https://bugs.webkit.org/show_bug.cgi?id=35242 - - This removes Chromium's WebSettings::setGeolocationEnabled - - * public/WebSettings.h: - * src/WebSettingsImpl.cpp: - * src/WebSettingsImpl.h: - -2010-02-23 Dmitriy Belenko <dbelenko@google.com> - - Reviewed by Darin Fisher. - - Chromium: Need to be able to get the bounds of selection - rectangle(s) - https://bugs.webkit.org/show_bug.cgi?id=34915 - - This change will enable about 30 test cases to pass in Chromium. - All of these test cases are related to selection rect boundaries. - This change will enable the test cases to retrieve the selection - rect boundary rectangle for the current selection. - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectionBoundsRect): - * src/WebFrameImpl.h: - -2010-02-23 Steve Block <steveblock@google.com> - - Reviewed by Darin Adler. - - Adds ChromeClient::cancelGeolocationPermissionRequestForFrame - https://bugs.webkit.org/show_bug.cgi?id=34962 - - This method is required so that a Geolocation object can cancel an - asynchronous permission request. This allows the chrome client to cancel - any UI it is showing for the permission request. - - * src/ChromeClientImpl.h: - (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame): - -2009-02-22 Adam Langley <agl@google.com> - - Reviewed by Darin Fisher. - - fontconfig on Linux can change the render preferences on a per strike - basis (a strike a combination of face and size). Because of this, we - need to query fontconfig each time a new FontPlatformData is created - for a new size. - - This patch adds support for querying this via ChromiumBridge. - - https://bugs.webkit.org/show_bug.cgi?id=33065 - - * WebKit.gyp: - * public/gtk/WebFontInfo.h: - * public/linux/WebSandboxSupport.h: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::getRenderStyleForStrike): - * src/gtk/WebFontInfo.cpp: - (WebKit::WebFontInfo::renderStyleForStrike): - -2010-02-22 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Pavel Feldman. - - Web Inspector: there should be a way to "deactivate" or "skip" all breakpoints while debugging. - https://bugs.webkit.org/show_bug.cgi?id=33217 - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent): - (devtools.DebuggerAgent.prototype.setBreakpointsActivated): - (devtools.DebuggerAgent.prototype.handleBreakEvent_): - (devtools.DebuggerAgent.prototype.handleExceptionEvent_): - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl.prototype.activateBreakpoints): - (devtools.InspectorBackendImpl.prototype.deactivateBreakpoints): - -2010-02-21 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Chromium DevTools: kepp debugger API in sync with inspector. - - https://bugs.webkit.org/show_bug.cgi?id=28799 - - * src/js/DebuggerAgent.js: - * src/js/InspectorControllerImpl.js: - (devtools.InspectorBackendImpl.prototype.setBreakpoint): - -2010-02-19 Maciej Stachowiak <mjs@apple.com> - - Reviewed by David Levin. - - Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases - https://bugs.webkit.org/show_bug.cgi?id=35147 - - * features.gypi: - -2010-02-19 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Call WebViewClient::didAcceptAutoFillSuggestion when the - user selects a suggestion from the AutoFill suggestions popup. - - https://bugs.webkit.org/show_bug.cgi?id=35174 - - * public/WebViewClient.h: - (WebKit::WebViewClient::didAcceptAutoFillSuggestion): - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::valueChanged): - * src/AutoFillPopupMenuClient.h: - -2010-02-19 James Hawkins <jhawkins@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Use the m_suggestionsPopupClient pointer to refer to the - popup client, as the Autocomplete popup might not be the current - popup. - - https://bugs.webkit.org/show_bug.cgi?id=35172 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): - (WebKit::WebViewImpl::refreshSuggestionsPopup): - -2010-02-19 James Hawkins <jhawkins@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Rename EditorClientImpl::onAutofillSuggestionAccepted to - onAutocompleteSuggestionAccepted to better match the purpose of the - function. - - https://bugs.webkit.org/show_bug.cgi?id=35171 - - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::onAutocompleteSuggestionAccepted): - * src/EditorClientImpl.h: - * src/SuggestionsPopupMenuClient.cpp: - (WebKit::SuggestionsPopupMenuClient::valueChanged): - -2010-02-18 Peter Kasting <pkasting@google.com> - - Reviewed by Darin Fisher. - - Add an isImageBlocked bool to the WebContextMenuData struct. - https://bugs.webkit.org/show_bug.cgi?id=35136 - - This lets us properly enable/disable the "Copy Image" context menu entry - (and, in the future, maybe add a "Load Image" function). - - * public/WebContextMenuData.h: - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - -2010-02-19 Marcus Bulach <bulach@chromium.org> - - Reviewed by Jeremy Orlow. - - Fixes GeolocationServiceBridgeImpl::stopUpdating (it can be called multiple times). - - * src/GeolocationServiceBridgeChromium.cpp: - (WebKit::GeolocationServiceBridgeImpl::stopUpdating): - -2010-02-19 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Chromium build fix: reverting r54997 and r54998. - - * DEPS: - -2010-02-19 Pavel Feldman <pfeldman@chromium.org> - - Not reviewed. Chromium tests fix: update devtools code to match new - web inspector object proxy format. - - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.formatCallFrame_): - (devtools.DebuggerAgent.formatObjectProxy_): - -2010-02-12 Kent Tamura <tkent@chromium.org> - - Unreviewed. Fix Chromium build. - - * DEPS: Bump Google URL revision to 123. - -2010-02-18 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Don't truncate long lines when evaluating expressions on a breakpoint. - - https://bugs.webkit.org/show_bug.cgi?id=35102 - - * src/js/DebuggerAgent.js: - -2010-02-18 Jay Campan <jcampan@google.com> - - Reviewed by Adam Barth. - - Exposing the title in WebDocument. - - https://bugs.webkit.org/show_bug.cgi?id=35058 - - * public/WebDocument.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::title): - -2010-02-17 Dmitry Titov <dimich@chromium.org> - - Reviewed by David Levin, Darin Fisher, Simon Hausmann. - - When a live iframe element is moved between pages, it still depends on the old page. - https://bugs.webkit.org/show_bug.cgi?id=34382 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - (WebKit::FrameLoaderClientImpl::didTransferChildFrameToNewDocument): - Since Chromium's WebFrameClient is destroyed once a window is closed, - if Frame moves between Pages, the client of corresponding WebFrame - should be replaced as well. - - * src/FrameLoaderClientImpl.h: - * src/WebFrameImpl.h: - (WebKit::WebFrameImpl::setClient): - -2010-02-17 Evan Martin <evan@chromium.org> - - Reviewed by Eric Seidel. - - [chromium] expose cache-bypass flag in reload() API - https://bugs.webkit.org/show_bug.cgi?id=34969 - - This flag is used to force a reload to ignore caches. - (Aka "shift-reload".) - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::reload): - * src/WebFrameImpl.h: - -2010-02-17 Kent Tamura <tkent@chromium.org> - - Reviewed by Eric Seidel. - - Introduces new Icon loading interface in order to support - asynchronous loading. - https://bugs.webkit.org/show_bug.cgi?id=32054 - - Add an empty implementation of ChromeClient::iconForFiles(). - - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::iconForFiles): - * src/ChromeClientImpl.h: - -2010-02-17 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Refactor texImage2D and texSubImage2D taking Image to use common code - https://bugs.webkit.org/show_bug.cgi?id=34458 - - Merged the Safari and Chromium code which extracts the data from - Image objects into common entry points on GraphicsContext3D. This - immediately fixes the following three problems: - - Chromium not implementing texSubImage2D taking Image. - - Safari not obeying the flipY parameter to texImage2D or - texSubImage2D taking Image. - - Safari not obeying the premultipyAlpha parameter to texImage2D - or texSubImage2D taking Image. - Added new test verifying the behavior of texImage2D and - texSubImage2D and the flipY parameter. The premultiplyAlpha - parameter can not be tested yet as the implementation is not yet - spec compliant. This will be fixed in a follow-on bug. - - Ran all WebGL demos in demo repository on Safari and Chromium; - textures are now the right way up in both browsers, and - transparent textures in Particles demo now look correct in Safari. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - -2010-02-17 Alok Priyadarshi <alokp@chromium.org> - - Reviewed by Ariya Hidayat. - - Bug 34900: Implement accelerated compositing for chromium. - https://bugs.webkit.org/show_bug.cgi?id=34900 - - * features.gypi: Added WTF_USE_ACCELERATED_COMPOSITING flag. - -2010-02-17 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Remove the obsolete chromium interface for handling DownloadURL. - https://bugs.webkit.org/show_bug.cgi?id=34982 - - * public/WebDragData.h: - * src/WebDragData.cpp: - -2010-02-16 James Hawkins <jhawkins@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Remove calls to releaseRef when passing PassRefPtrs to base - classes. releaseRef releases the original pointer without decreasing - the reference count, and the base class constructor increases the - reference count, leading to a leak. - - https://bugs.webkit.org/show_bug.cgi?id=35000 - - * src/WebDocument.cpp: - (WebKit::WebDocument::WebDocument): - * src/WebElement.cpp: - (WebKit::WebElement::WebElement): - * src/WebFormElement.cpp: - (WebKit::WebFormElement::WebFormElement): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::WebInputElement): - -2010-02-15 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Fix StorageNamespaceProxy::copy() for test shell - https://bugs.webkit.org/show_bug.cgi?id=34949 - - Chromium passes back NULL when you call WebStorageNamespace::proxy() - but TestShell returns a valid object. Both need to work via - the WebStorageNamespace. - - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespaceProxy::copy): - -2010-02-14 Vangelis Kokkevis <vangelis@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add support for the showDebugBorders setting to Chromium. - - https://bugs.webkit.org/show_bug.cgi?id=34906 - - * public/WebSettings.h: Add declaration for setShowDebugBorders - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setShowDebugBorders): Add method implementation - * src/WebSettingsImpl.h: Added declaration for setShowDebugBorders - -2010-02-11 Darin Fisher <darin@chromium.org> - - Reviewed by Jeremy Orlow. - - Introduce WebCookieJar, and provide for a frame specific cookie jar. - - https://bugs.webkit.org/show_bug.cgi?id=34878 - - * WebKit.gyp: - * public/WebCookieJar.h: Added. - * public/WebFrameClient.h: - (WebKit::WebFrameClient::cookieJar): - * public/WebKitClient.h: - (WebKit::WebKitClient::cookieJar): - (WebKit::WebKitClient::setCookies): - (WebKit::WebKitClient::cookies): - (WebKit::WebKitClient::rawCookies): - (WebKit::WebKitClient::deleteCookie): - (WebKit::WebKitClient::cookiesEnabled): - * src/ChromiumBridge.cpp: - (WebCore::getCookieJar): - (WebCore::ChromiumBridge::setCookies): - (WebCore::ChromiumBridge::cookies): - (WebCore::ChromiumBridge::rawCookies): - (WebCore::ChromiumBridge::deleteCookie): - (WebCore::ChromiumBridge::cookiesEnabled): - -2010-02-12 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by David Levin. - - Chromium: provide theme overrides for Chromium devtools on Mac. - - https://bugs.webkit.org/show_bug.cgi?id=34856 - - * src/js/devTools.css: - -2010-02-12 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add a blockedByPolicy output to WebStorageArea::setItem. - https://bugs.webkit.org/show_bug.cgi?id=34897 - - * public/WebStorageArea.h: - (WebKit::WebStorageArea::setItem): - * src/WebStorageAreaImpl.cpp: - (WebKit::WebStorageAreaImpl::setItem): - * src/WebStorageAreaImpl.h: - -2010-02-11 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by David Levin. - - [Chromium] Add ENABLE_RUBY to the feature defines gypi - https://bugs.webkit.org/show_bug.cgi?id=34841 - - * features.gypi: - -2010-02-12 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Chromium: Web Inspector on an element in a page where JS is blocked crashes the renderer - - https://bugs.webkit.org/show_bug.cgi?id=34890 - - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::createUtilityContext): - -2010-02-11 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Ignore subsequent requests of the same profiler log - chunks. This eliminates emission of several instances for the same - heap snapshot. - - https://bugs.webkit.org/show_bug.cgi?id=34833 - - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent): - (devtools.ProfilerAgent.prototype.initializeProfiling): - (devtools.ProfilerAgent.prototype._getNextLogLines): - (devtools.ProfilerAgent.prototype.startProfiling): - (devtools.ProfilerAgent.prototype._didGetActiveProfilerModules): - (devtools.ProfilerAgent.prototype._didGetLogLines): - -2010-02-10 James Hawkins <jhawkins@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Remove code from SuggestionsPopup that was removed in a - previous revision of AutocompletePopup and accidentally added back in - the refactoring. - - https://bugs.webkit.org/show_bug.cgi?id=34818 - - * src/AutoFillPopupMenuClient.cpp: - * src/AutoFillPopupMenuClient.h: Added property svn:eol-style. - * src/SuggestionsPopupMenuClient.cpp: - (WebKit::SuggestionsPopupMenuClient::popupDidHide): - (WebKit::SuggestionsPopupMenuClient::setTextFromItem): - (WebKit::SuggestionsPopupMenuClient::initialize): - * src/SuggestionsPopupMenuClient.h: - -2010-02-10 Nate Chapin <japhet@chromium.org> - - Reviewed by Adam Barth. - - Update call to V8DOMWrapper::lookupDOMWrapper() to match new parameters. - - https://bugs.webkit.org/show_bug.cgi?id=34768 - - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::createUtilityContext): - -2010-02-10 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Remove automatic viewport resizing - https://bugs.webkit.org/show_bug.cgi?id=34766 - - Removed automatic viewport resizing per conclusions on the WebGL - mailing list. Added test verifying new behavior and updated a - couple of previous tests failing after this change. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::reshape): - -2010-02-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Chromium Win build fix. Add third_party/nss to the dependencies list on Windows. - - https://bugs.webkit.org/show_bug.cgi?id=34789 - - * DEPS: - -2010-02-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Rolling Chromium dependencies to match Chromium revision 38580. - - https://bugs.webkit.org/show_bug.cgi?id=34789 - - * DEPS: - -2010-02-10 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Use v8::Debug::ProcessDebugMessages instead of executing an empty function - - https://bugs.webkit.org/show_bug.cgi?id=34704 - - * src/DebuggerAgent.h: - * src/DebuggerAgentImpl.cpp: - (WebKit::DebuggerAgentImpl::processDebugCommands): - * src/DebuggerAgentImpl.h: - * src/ToolsAgent.h: - * src/WebDevToolsAgentImpl.cpp: - * src/WebDevToolsAgentImpl.h: - * src/js/DebuggerAgent.js: - (devtools.DebuggerAgent.prototype.addBreakpoint): - * src/js/DevToolsHostStub.js: - (.RemoteDebuggerAgentStub.prototype.processDebugCommands): - * src/js/InjectDispatch.js: - (dispatch): - * src/js/ProfilerAgent.js: - (devtools.ProfilerAgent.prototype.startProfiling): - (devtools.ProfilerAgent.prototype.stopProfiling): - * src/js/Tests.js: - -2010-02-10 Tony Chang <tony@chromium.org> - - Unreviewed, build fix for Chromium Mac take 2. - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): - -2010-02-10 Tony Chang <tony@chromium.org> - - Unreviewed, build fix for Chromium Mac. - - * src/AutoFillPopupMenuClient.cpp: - (WebKit::AutoFillPopupMenuClient::removeSuggestionAtIndex): - -2010-02-09 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Refactor AutocompletePopupMenuClient into a base class, - SuggestionsPopupMenuClient, and two derived classes, - AutocompletePopupMenuClient and AutoFillPopupMenuClient. Currently - the behavior of suggestions popups has not changed. - - https://bugs.webkit.org/show_bug.cgi?id=34721 - - * WebKit.gyp: - * public/WebView.h: - * src/AutoFillPopupMenuClient.cpp: Added. - * src/AutoFillPopupMenuClient.h: Added. - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::getSuggestionsCount): - (WebKit::AutocompletePopupMenuClient::getSuggestion): - (WebKit::AutocompletePopupMenuClient::removeSuggestionAtIndex): - (WebKit::AutocompletePopupMenuClient::initialize): - (WebKit::AutocompletePopupMenuClient::setSuggestions): - * src/AutocompletePopupMenuClient.h: - * src/SuggestionsPopupMenuClient.cpp: Added. - * src/SuggestionsPopupMenuClient.h: Added. - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): - (WebKit::WebViewImpl::applyAutofillSuggestions): - (WebKit::WebViewImpl::applyAutoFillSuggestions): - (WebKit::WebViewImpl::applyAutocompleteSuggestions): - * src/WebViewImpl.h: - -2010-02-09 Chris Guillory <ctguil@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Add function for accessibility object state change notifications. - - https://bugs.webkit.org/show_bug.cgi?id=34464 - - * gyp_webkit: - * public/WebViewClient.h: - (WebKit::WebViewClient::didChangeAccessibilityObjectState): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState): - * src/ChromeClientImpl.h: - -2010-02-09 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs. - Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required - for really enabling it in V8 bindings generation. - - https://bugs.webkit.org/show_bug.cgi?id=34706 - - * features.gypi: - -2010-02-09 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Add the chromium interface to support Blob.slice. - https://bugs.webkit.org/show_bug.cgi?id=34652 - - * WebKit.gyp: - * public/WebFileInfo.h: Added. - * public/WebHTTPBody.h: - * src/WebHTTPBody.cpp: - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendFile): - -2010-02-09 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Follow-up fix. - - Add missing devTools.css file. - - https://bugs.webkit.org/show_bug.cgi?id=34756 - - * src/js/devTools.css: Added. - -2010-02-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Upstream DevTools Images and .css files. - - https://bugs.webkit.org/show_bug.cgi?id=34756 - - * WebKit.gypi: - * src/js/DevTools.css: Added. - * src/js/Images/segmentChromium.png: Added. - * src/js/Images/segmentHoverChromium.png: Added. - * src/js/Images/segmentHoverEndChromium.png: Added. - * src/js/Images/segmentSelectedChromium.png: Added. - * src/js/Images/segmentSelectedEndChromium.png: Added. - * src/js/Images/statusbarBackgroundChromium.png: Added. - * src/js/Images/statusbarBottomBackgroundChromium.png: Added. - * src/js/Images/statusbarButtonsChromium.png: Added. - * src/js/Images/statusbarMenuButtonChromium.png: Added. - * src/js/Images/statusbarMenuButtonSelectedChromium.png: Added. - -2010-02-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Upstream JavaScript part of DevTools WebKit API implementation(now - with the added files). - - https://bugs.webkit.org/show_bug.cgi?id=34744 - - * WebKit.gypi: Added. - * src/js/DebuggerAgent.js: Added. - (devtools.DebuggerAgent): - (devtools.DebuggerAgent.prototype.reset): - (devtools.DebuggerAgent.prototype.initUI): - (devtools.DebuggerAgent.prototype.resolveScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.resolveScriptSource): - (devtools.DebuggerAgent.prototype.pauseExecution): - (devtools.DebuggerAgent.prototype.addBreakpoint): - (devtools.DebuggerAgent.prototype.removeBreakpoint): - (devtools.DebuggerAgent.prototype.updateBreakpoint): - (devtools.DebuggerAgent.prototype.stepIntoStatement): - (devtools.DebuggerAgent.prototype.stepOutOfFunction): - (devtools.DebuggerAgent.prototype.stepOverStatement): - (devtools.DebuggerAgent.prototype.resumeExecution): - (devtools.DebuggerAgent.prototype.createExceptionMessage_): - (devtools.DebuggerAgent.prototype.showPendingExceptionMessage_): - (devtools.DebuggerAgent.prototype.clearExceptionMessage_): - (devtools.DebuggerAgent.prototype.pauseOnExceptions): - (devtools.DebuggerAgent.prototype.setPauseOnExceptions): - (devtools.DebuggerAgent.prototype.requestEvaluate): - (devtools.DebuggerAgent.prototype.resolveChildren): - (devtools.DebuggerAgent.prototype.resolveScope.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.resolveScope): - (devtools.DebuggerAgent.prototype.resolveFrameVariables_.scopeResponseHandler): - (devtools.DebuggerAgent.prototype.resolveFrameVariables_): - (devtools.DebuggerAgent.prototype.resolveCompletionsOnFrame): - (devtools.DebuggerAgent.prototype.getScriptContextType): - (devtools.DebuggerAgent.prototype.requestClearBreakpoint_): - (devtools.DebuggerAgent.prototype.requestChangeBreakpoint_): - (devtools.DebuggerAgent.prototype.requestBacktrace_): - (devtools.DebuggerAgent.sendCommand_): - (devtools.DebuggerAgent.prototype.stepCommand_): - (devtools.DebuggerAgent.prototype.requestLookup_): - (devtools.DebuggerAgent.prototype.setContextId_.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.setContextId_): - (devtools.DebuggerAgent.prototype.handleDebuggerOutput_): - (devtools.DebuggerAgent.prototype.handleBreakEvent_): - (devtools.DebuggerAgent.prototype.handleExceptionEvent_): - (devtools.DebuggerAgent.prototype.handleScriptsResponse_): - (devtools.DebuggerAgent.prototype.isScriptFromInspectedContext_): - (devtools.DebuggerAgent.prototype.handleSetBreakpointResponse_): - (devtools.DebuggerAgent.prototype.handleAfterCompileEvent_): - (devtools.DebuggerAgent.prototype.addScriptInfo_): - (devtools.DebuggerAgent.prototype.handleClearBreakpointResponse_): - (devtools.DebuggerAgent.prototype.handleBacktraceResponse_): - (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_): - (devtools.DebuggerAgent.prototype.evaluateInCallFrame): - (devtools.DebuggerAgent.prototype.invokeCallbackForResponse_): - (devtools.DebuggerAgent.prototype.formatCallFrame_): - (devtools.DebuggerAgent.formatObjectProperties_): - (devtools.DebuggerAgent.propertiesToProxies_): - (devtools.DebuggerAgent.formatObjectProxy_): - (devtools.DebuggerAgent.webkitToV8LineNumber_): - (devtools.DebuggerAgent.v8ToWwebkitLineNumber_): - (devtools.ScriptInfo): - (devtools.ScriptInfo.prototype.getLineOffset): - (devtools.ScriptInfo.prototype.getContextType): - (devtools.ScriptInfo.prototype.getUrl): - (devtools.ScriptInfo.prototype.isUnresolved): - (devtools.ScriptInfo.prototype.getBreakpointInfo): - (devtools.ScriptInfo.prototype.addBreakpointInfo): - (devtools.ScriptInfo.prototype.removeBreakpointInfo): - (devtools.BreakpointInfo): - (devtools.BreakpointInfo.prototype.getLine): - (devtools.BreakpointInfo.prototype.getV8Id): - (devtools.BreakpointInfo.prototype.setV8Id): - (devtools.BreakpointInfo.prototype.markAsRemoved): - (devtools.BreakpointInfo.prototype.isRemoved): - (devtools.CallFrame): - (devtools.CallFrame.prototype.evaluate_): - (devtools.DebugCommand): - (devtools.DebugCommand.prototype.getSequenceNumber): - (devtools.DebugCommand.prototype.toJSONProtocol): - (devtools.DebuggerMessage): - (devtools.DebuggerMessage.prototype.getType): - (devtools.DebuggerMessage.prototype.getEvent): - (devtools.DebuggerMessage.prototype.getCommand): - (devtools.DebuggerMessage.prototype.getRequestSeq): - (devtools.DebuggerMessage.prototype.isRunning): - (devtools.DebuggerMessage.prototype.isSuccess): - (devtools.DebuggerMessage.prototype.getMessage): - (devtools.DebuggerMessage.prototype.getBody): - (devtools.DebuggerMessage.prototype.lookup): - * src/js/DevTools.js: Added. - (devtools.dispatch): - (devtools.ToolsAgent): - (devtools.ToolsAgent.prototype.reset): - (devtools.ToolsAgent.prototype.evaluateJavaScript): - (devtools.ToolsAgent.prototype.getDebuggerAgent): - (devtools.ToolsAgent.prototype.getProfilerAgent): - (devtools.ToolsAgent.prototype.frameNavigate_): - (devtools.ToolsAgent.prototype.dispatchOnClient_): - (devtools.ToolsAgent.prototype.evaluate): - (WebInspector.setResourcesPanelEnabled): - (debugPrint): - (devtools): - (WebInspector.loaded): - (): - (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): - (WebInspector.ScriptView.prototype.didResolveScriptSource_): - (WebInspector.UnresolvedPropertyValue): - (WebInspector.UIString): - (WebInspector.resourceTrackingWasEnabled): - (WebInspector.resourceTrackingWasDisabled): - (WebInspector.TestController.prototype.runAfterPendingDispatches): - (WebInspector.queuesAreEmpty): - (WebInspector.pausedScript): - * src/js/DevToolsHostStub.js: Added. - (.RemoteDebuggerAgentStub): - (.RemoteDebuggerAgentStub.prototype.getContextId): - (.RemoteProfilerAgentStub): - (.RemoteProfilerAgentStub.prototype.getActiveProfilerModules): - (.RemoteProfilerAgentStub.prototype.getLogLines): - (.RemoteToolsAgentStub): - (.RemoteToolsAgentStub.prototype.dispatchOnInjectedScript): - (.RemoteToolsAgentStub.prototype.dispatchOnInspectorController): - (.RemoteToolsAgentStub.prototype.executeVoidJavaScript): - (.ProfilerStubHelper): - (.ProfilerStubHelper.GetInstance): - (.ProfilerStubHelper.prototype.StopProfiling): - (.ProfilerStubHelper.prototype.StartProfiling): - (.ProfilerStubHelper.prototype.getActiveProfilerModules): - (.ProfilerStubHelper.prototype.getLogLines): - (.RemoteDebuggerCommandExecutorStub): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerCommand): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerPauseScript): - (.RemoteDebuggerCommandExecutorStub.prototype.sendResponse_): - (.DevToolsHostStub): - (.DevToolsHostStub.prototype.reset): - (.DevToolsHostStub.prototype.setting): - (.DevToolsHostStub.prototype.setSetting): - * src/js/HeapProfilerPanel.js: Added. - (WebInspector.ProfilesPanel.prototype.addSnapshot): - (WebInspector.HeapSnapshotView): - (WebInspector.HeapSnapshotView.prototype.get statusBarItems): - (WebInspector.HeapSnapshotView.prototype.get profile): - (WebInspector.HeapSnapshotView.prototype.set profile): - (WebInspector.HeapSnapshotView.prototype.show): - (WebInspector.HeapSnapshotView.prototype.hide): - (WebInspector.HeapSnapshotView.prototype.resize): - (WebInspector.HeapSnapshotView.prototype.refresh): - (WebInspector.HeapSnapshotView.prototype.refreshShowAsPercents): - (WebInspector.HeapSnapshotView.prototype._deleteSearchMatchedFlags): - (WebInspector.HeapSnapshotView.prototype.searchCanceled): - (WebInspector.HeapSnapshotView.prototype.performSearch): - (WebInspector.HeapSnapshotView.prototype.jumpToFirstSearchResult.WebInspector.CPUProfileView.prototype.jumpToFirstSearchResult.jumpToLastSearchResult.WebInspector.CPUProfileView.prototype.jumpToLastSearchResult.jumpToNextSearchResult.WebInspector.CPUProfileView.prototype.jumpToNextSearchResult.jumpToPreviousSearchResult.WebInspector.CPUProfileView.prototype.jumpToPreviousSearchResult.showingFirstSearchResult.WebInspector.CPUProfileView.prototype.showingFirstSearchResult.showingLastSearchResult.WebInspector.CPUProfileView.prototype.showingLastSearchResult._jumpToSearchResult.WebInspector.CPUProfileView.prototype._jumpToSearchResult.refreshVisibleData): - (WebInspector.HeapSnapshotView.prototype._changeBase): - (WebInspector.HeapSnapshotView.prototype._createSnapshotDataGridList): - (WebInspector.HeapSnapshotView.prototype._mouseDownInDataGrid): - (WebInspector.HeapSnapshotView.prototype.get _isShowingAsPercent): - (WebInspector.HeapSnapshotView.prototype._percentClicked): - (WebInspector.HeapSnapshotView.prototype._resetDataGridList): - (WebInspector.HeapSnapshotView.prototype._sortData): - (WebInspector.HeapSnapshotView.prototype._updateBaseOptions): - (WebInspector.HeapSnapshotView.prototype._updatePercentButton): - (WebInspector.HeapSnapshotView.prototype._updateSummaryGraph): - (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS): - (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS_OR_EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER_OR_EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER): - (WebInspector.HeapSnapshotView.SearchHelper.parseOperationAndNumber): - (WebInspector.HeapSummaryCalculator): - (WebInspector.HeapSummaryCalculator.prototype.computeSummaryValues): - (WebInspector.HeapSummaryCalculator.prototype.formatValue): - (WebInspector.HeapSummaryCalculator.prototype.get showAsPercent): - (WebInspector.HeapSummaryCalculator.prototype.set showAsPercent): - (WebInspector.HeapSummaryCountCalculator): - (WebInspector.HeapSummaryCountCalculator.prototype._highFromLow): - (WebInspector.HeapSummaryCountCalculator.prototype._valueToString): - (WebInspector.HeapSummarySizeCalculator): - (WebInspector.HeapSummarySizeCalculator.prototype._highFromLow): - (WebInspector.HeapSnapshotSidebarTreeElement): - (WebInspector.HeapSnapshotSidebarTreeElement.prototype.get mainTitle): - (WebInspector.HeapSnapshotSidebarTreeElement.prototype.set mainTitle): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _hasRetainers): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _parent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype._populate.if): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype._populate): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.produceDiff): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.sort): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.signForDelta): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.showDeltaAsPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalCount): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalSize): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizePercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countDeltaPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizeDeltaPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get data): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.createCell): - (WebInspector.HeapSnapshotDataGridNode): - (WebInspector.HeapSnapshotDataGridList): - (WebInspector.HeapSnapshotDataGridList.prototype.appendChild): - (WebInspector.HeapSnapshotDataGridList.prototype.insertChild): - (WebInspector.HeapSnapshotDataGridList.prototype.removeChildren): - (WebInspector.HeapSnapshotDataGridList.prototype.populateChildren): - (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator): - (WebInspector.HeapSnapshotDataGridList.propertyComparator): - (WebInspector.HeapSnapshotDataGridRetainerNode): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizePercent): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizeDeltaPercent): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype._calculateRetainers): - (WebInspector.HeapSnapshotProfileType): - (WebInspector.HeapSnapshotProfileType.prototype.get buttonTooltip): - (WebInspector.HeapSnapshotProfileType.prototype.get buttonStyle): - (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): - (WebInspector.HeapSnapshotProfileType.prototype.get welcomeMessage): - (WebInspector.HeapSnapshotProfileType.prototype.createSidebarTreeElementForProfile): - (WebInspector.HeapSnapshotProfileType.prototype.createView): - (): - * src/js/InjectDispatch.js: Added. - (InspectorControllerDispatcher.dispatch): - (ApuAgentDispatcher.dispatchToApu): - (dispatch): - (devtools): - * src/js/InspectorControllerImpl.js: Added. - (devtools.InspectorBackendImpl): - (devtools.InspectorBackendImpl.prototype.toggleNodeSearch): - (devtools.InspectorBackendImpl.prototype.debuggerEnabled): - (devtools.InspectorBackendImpl.prototype.profilerEnabled): - (devtools.InspectorBackendImpl.prototype.addBreakpoint): - (devtools.InspectorBackendImpl.prototype.removeBreakpoint): - (devtools.InspectorBackendImpl.prototype.updateBreakpoint): - (devtools.InspectorBackendImpl.prototype.pauseInDebugger): - (devtools.InspectorBackendImpl.prototype.resumeDebugger): - (devtools.InspectorBackendImpl.prototype.stepIntoStatementInDebugger): - (devtools.InspectorBackendImpl.prototype.stepOutOfFunctionInDebugger): - (devtools.InspectorBackendImpl.prototype.stepOverStatementInDebugger): - (devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState): - (devtools.InspectorBackendImpl.prototype.pauseOnExceptionsState): - (devtools.InspectorBackendImpl.prototype.pauseOnExceptions): - (devtools.InspectorBackendImpl.prototype.setPauseOnExceptions): - (devtools.InspectorBackendImpl.prototype.startProfiling): - (devtools.InspectorBackendImpl.prototype.stopProfiling): - (devtools.InspectorBackendImpl.prototype.getProfileHeaders): - (devtools.InspectorBackendImpl.prototype.addFullProfile): - (devtools.InspectorBackendImpl.prototype.getProfile): - (devtools.InspectorBackendImpl.prototype.takeHeapSnapshot): - (devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript): - (devtools.InspectorBackendImpl.prototype.installInspectorControllerDelegate_): - (devtools.InspectorBackendImpl.prototype.callInspectorController_): - * src/js/ProfilerAgent.js: Added. - (devtools.ProfilerAgent): - (devtools.ProfilerAgent.prototype.setupProfilerProcessorCallbacks): - (devtools.ProfilerAgent.prototype.initializeProfiling): - (devtools.ProfilerAgent.prototype.startProfiling): - (devtools.ProfilerAgent.prototype.stopProfiling): - (devtools.ProfilerAgent.prototype.didGetActiveProfilerModules_): - (devtools.ProfilerAgent.prototype.didGetLogLines_): - * src/js/ProfilerProcessor.js: Added. - (devtools.profiler.WebKitViewBuilder): - (devtools.profiler.WebKitViewBuilder.prototype.createViewNode): - (devtools.profiler.WebKitViewNode): - (set get devtools.profiler.WebKitViewNode.prototype.initFuncInfo_): - (devtools.profiler.JsProfile): - (devtools.profiler.JsProfile.prototype.skipThisFunction): - (devtools.profiler.Processor): - (devtools.profiler.Processor.prototype.printError): - (devtools.profiler.Processor.prototype.skipDispatch): - (devtools.profiler.Processor.prototype.setCallbacks): - (devtools.profiler.Processor.prototype.setNewProfileCallback): - (devtools.profiler.Processor.prototype.processProfiler_.switch.break): - (devtools.profiler.Processor.prototype.processProfiler_): - (devtools.profiler.Processor.prototype.processCodeCreation_): - (devtools.profiler.Processor.prototype.processCodeMove_): - (devtools.profiler.Processor.prototype.processCodeDelete_): - (devtools.profiler.Processor.prototype.processFunctionCreation_): - (devtools.profiler.Processor.prototype.processFunctionMove_): - (devtools.profiler.Processor.prototype.processFunctionDelete_): - (devtools.profiler.Processor.prototype.processTick_): - (devtools.profiler.Processor.prototype.processTickV2_): - (devtools.profiler.Processor.prototype.processHeapSampleBegin_): - (devtools.profiler.Processor.prototype.processHeapSampleStats_): - (devtools.profiler.Processor.prototype.processHeapSampleItem_): - (devtools.profiler.Processor.prototype.processHeapJsConsItem_): - (devtools.profiler.Processor.prototype.processHeapJsRetItem_.mergeRetainers): - (devtools.profiler.Processor.prototype.processHeapJsRetItem_): - (devtools.profiler.Processor.prototype.processHeapSampleEnd_): - (devtools.profiler.Processor.prototype.createProfileForView): - * src/js/Tests.js: Added. - (.TestSuite): - (.TestSuite.prototype.fail): - (.TestSuite.prototype.assertEquals): - (.TestSuite.prototype.assertTrue): - (.TestSuite.prototype.assertContains): - (.TestSuite.prototype.takeControl): - (.TestSuite.prototype.releaseControl): - (.TestSuite.prototype.reportOk_): - (.TestSuite.prototype.reportFailure_): - (.TestSuite.prototype.runTest): - (.TestSuite.prototype.showPanel): - (.TestSuite.prototype.addSniffer.receiver.methodName): - (.TestSuite.prototype.addSniffer): - (.TestSuite.prototype.testHostIsPresent): - (.TestSuite.prototype.testElementsTreeRoot): - (.TestSuite.prototype.testMainResource): - (.TestSuite.prototype.testResourceContentLength.this.addSniffer.): - (.TestSuite.prototype.testResourceHeaders): - (.TestSuite.prototype.testCachedResourceMimeType.this.addSniffer.): - (.TestSuite.prototype.testCachedResourceMimeType): - (.TestSuite.prototype.testProfilerTab): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.checkScriptsPanel): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.switchToElementsTab): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.switchToScriptsTab): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkScriptsPanel): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkNoDuplicates): - (.TestSuite.prototype.testPauseOnException): - (.TestSuite.prototype.testPauseWhenLoadingDevTools): - (.TestSuite.prototype.testPauseWhenScriptIsRunning.testScriptPauseAfterDelay): - (.TestSuite.prototype.testPauseWhenScriptIsRunning.testScriptPause): - (.TestSuite.prototype.testPauseWhenScriptIsRunning): - (.TestSuite.prototype.optionsToString_): - (.TestSuite.prototype.evaluateInConsole_): - (.TestSuite.prototype.waitForSetBreakpointResponse_): - (.TestSuite.prototype.testEvalOnCallFrame.setBreakpointCallback): - (.TestSuite.prototype.testEvalOnCallFrame.waitForBreakpointHit): - (.TestSuite.prototype.testCompletionOnPause): - (.TestSuite.prototype.testCompletionOnPause.testLocalsCompletion): - (.TestSuite.prototype.testCompletionOnPause.testThisCompletion): - (.TestSuite.prototype.testCompletionOnPause.testFieldCompletion): - (.TestSuite.prototype.testCompletionOnPause.checkCompletions): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.checkScriptsList): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.waitForExceptionEvent.test): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.waitForExceptionEvent): - (.TestSuite.prototype._checkExecutionLine): - (.TestSuite.prototype._scriptsAreParsed): - (.TestSuite.prototype._waitForScriptPause): - (.TestSuite.prototype._checkSourceFrameWhenLoaded.checkExecLine): - (.TestSuite.prototype._checkSourceFrameWhenLoaded): - (.TestSuite.prototype._performSteps.doNextAction): - (.TestSuite.prototype._performSteps): - (.TestSuite.prototype._executeCodeWhenScriptsAreParsed.executeFunctionInInspectedPage): - (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts): - (.TestSuite.prototype._waitUntilScriptsAreParsed): - (.TestSuite.prototype._executeFunctionForStepTest): - (.TestSuite.prototype.testStepOver): - (.TestSuite.prototype.testStepOut): - (.TestSuite.prototype.testStepIn): - (.TestSuite.prototype._evaluateXpath): - (.TestSuite.prototype._findNode): - (.TestSuite.prototype._findText): - (.TestSuite.prototype._nodeIterator): - (.TestSuite.prototype._checkScopeSectionDiv): - (.TestSuite.prototype._expandScopeSections.updateListener): - (.TestSuite.prototype._expandScopeSections): - (.TestSuite.prototype.testExpandScope): - (.TestSuite.prototype.testExpandScope.examineScopes): - (.TestSuite.prototype._findChildProperty): - (.TestSuite.prototype._hookGetPropertiesCallback.accessor.getProperties): - (.TestSuite.prototype._hookGetPropertiesCallback.try): - (.TestSuite.prototype._hookGetPropertiesCallback): - (.TestSuite.prototype.testDebugIntrinsicProperties.expandLocalScope): - (.TestSuite.prototype.testDebugIntrinsicProperties): - (.TestSuite.prototype.testDebugIntrinsicProperties.expandAndCheckNextProperty): - (.TestSuite.prototype.testDebugIntrinsicProperties.checkProperty): - (.TestSuite.createKeyEvent): - (.TestSuite.prototype.testConsoleLog.assertNext): - (.TestSuite.prototype.testConsoleLog): - (.TestSuite.prototype.testEvalGlobal.initEval): - (.TestSuite.prototype.testEvalGlobal): - (.TestSuite.prototype.testShowStoragePanel.this.addSniffer.): - (.TestSuite.prototype.testShowStoragePanel.this.addSniffer): - (.uiTests.runAllTests): - (.uiTests.runTest): - -2010-02-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Upstream JavaScript part of DevTools WebKit API implementation - - https://bugs.webkit.org/show_bug.cgi?id=34744 - - * WebKit.gypi: Added. - * src/js/DebuggerAgent.js: Added. - (devtools.DebuggerAgent): - (devtools.DebuggerAgent.prototype.reset): - (devtools.DebuggerAgent.prototype.initUI): - (devtools.DebuggerAgent.prototype.resolveScriptSource.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.resolveScriptSource): - (devtools.DebuggerAgent.prototype.pauseExecution): - (devtools.DebuggerAgent.prototype.addBreakpoint): - (devtools.DebuggerAgent.prototype.removeBreakpoint): - (devtools.DebuggerAgent.prototype.updateBreakpoint): - (devtools.DebuggerAgent.prototype.stepIntoStatement): - (devtools.DebuggerAgent.prototype.stepOutOfFunction): - (devtools.DebuggerAgent.prototype.stepOverStatement): - (devtools.DebuggerAgent.prototype.resumeExecution): - (devtools.DebuggerAgent.prototype.createExceptionMessage_): - (devtools.DebuggerAgent.prototype.showPendingExceptionMessage_): - (devtools.DebuggerAgent.prototype.clearExceptionMessage_): - (devtools.DebuggerAgent.prototype.pauseOnExceptions): - (devtools.DebuggerAgent.prototype.setPauseOnExceptions): - (devtools.DebuggerAgent.prototype.requestEvaluate): - (devtools.DebuggerAgent.prototype.resolveChildren): - (devtools.DebuggerAgent.prototype.resolveScope.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.resolveScope): - (devtools.DebuggerAgent.prototype.resolveFrameVariables_.scopeResponseHandler): - (devtools.DebuggerAgent.prototype.resolveFrameVariables_): - (devtools.DebuggerAgent.prototype.resolveCompletionsOnFrame): - (devtools.DebuggerAgent.prototype.getScriptContextType): - (devtools.DebuggerAgent.prototype.requestClearBreakpoint_): - (devtools.DebuggerAgent.prototype.requestChangeBreakpoint_): - (devtools.DebuggerAgent.prototype.requestBacktrace_): - (devtools.DebuggerAgent.sendCommand_): - (devtools.DebuggerAgent.prototype.stepCommand_): - (devtools.DebuggerAgent.prototype.requestLookup_): - (devtools.DebuggerAgent.prototype.setContextId_.this.requestSeqToCallback_.cmd.getSequenceNumber): - (devtools.DebuggerAgent.prototype.setContextId_): - (devtools.DebuggerAgent.prototype.handleDebuggerOutput_): - (devtools.DebuggerAgent.prototype.handleBreakEvent_): - (devtools.DebuggerAgent.prototype.handleExceptionEvent_): - (devtools.DebuggerAgent.prototype.handleScriptsResponse_): - (devtools.DebuggerAgent.prototype.isScriptFromInspectedContext_): - (devtools.DebuggerAgent.prototype.handleSetBreakpointResponse_): - (devtools.DebuggerAgent.prototype.handleAfterCompileEvent_): - (devtools.DebuggerAgent.prototype.addScriptInfo_): - (devtools.DebuggerAgent.prototype.handleClearBreakpointResponse_): - (devtools.DebuggerAgent.prototype.handleBacktraceResponse_): - (devtools.DebuggerAgent.prototype.doHandleBacktraceResponse_): - (devtools.DebuggerAgent.prototype.evaluateInCallFrame): - (devtools.DebuggerAgent.prototype.invokeCallbackForResponse_): - (devtools.DebuggerAgent.prototype.formatCallFrame_): - (devtools.DebuggerAgent.formatObjectProperties_): - (devtools.DebuggerAgent.propertiesToProxies_): - (devtools.DebuggerAgent.formatObjectProxy_): - (devtools.DebuggerAgent.webkitToV8LineNumber_): - (devtools.DebuggerAgent.v8ToWwebkitLineNumber_): - (devtools.ScriptInfo): - (devtools.ScriptInfo.prototype.getLineOffset): - (devtools.ScriptInfo.prototype.getContextType): - (devtools.ScriptInfo.prototype.getUrl): - (devtools.ScriptInfo.prototype.isUnresolved): - (devtools.ScriptInfo.prototype.getBreakpointInfo): - (devtools.ScriptInfo.prototype.addBreakpointInfo): - (devtools.ScriptInfo.prototype.removeBreakpointInfo): - (devtools.BreakpointInfo): - (devtools.BreakpointInfo.prototype.getLine): - (devtools.BreakpointInfo.prototype.getV8Id): - (devtools.BreakpointInfo.prototype.setV8Id): - (devtools.BreakpointInfo.prototype.markAsRemoved): - (devtools.BreakpointInfo.prototype.isRemoved): - (devtools.CallFrame): - (devtools.CallFrame.prototype.evaluate_): - (devtools.DebugCommand): - (devtools.DebugCommand.prototype.getSequenceNumber): - (devtools.DebugCommand.prototype.toJSONProtocol): - (devtools.DebuggerMessage): - (devtools.DebuggerMessage.prototype.getType): - (devtools.DebuggerMessage.prototype.getEvent): - (devtools.DebuggerMessage.prototype.getCommand): - (devtools.DebuggerMessage.prototype.getRequestSeq): - (devtools.DebuggerMessage.prototype.isRunning): - (devtools.DebuggerMessage.prototype.isSuccess): - (devtools.DebuggerMessage.prototype.getMessage): - (devtools.DebuggerMessage.prototype.getBody): - (devtools.DebuggerMessage.prototype.lookup): - * src/js/DevTools.js: Added. - (devtools.dispatch): - (devtools.ToolsAgent): - (devtools.ToolsAgent.prototype.reset): - (devtools.ToolsAgent.prototype.evaluateJavaScript): - (devtools.ToolsAgent.prototype.getDebuggerAgent): - (devtools.ToolsAgent.prototype.getProfilerAgent): - (devtools.ToolsAgent.prototype.frameNavigate_): - (devtools.ToolsAgent.prototype.dispatchOnClient_): - (devtools.ToolsAgent.prototype.evaluate): - (WebInspector.setResourcesPanelEnabled): - (debugPrint): - (devtools): - (WebInspector.loaded): - (): - (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded): - (WebInspector.ScriptView.prototype.didResolveScriptSource_): - (WebInspector.UnresolvedPropertyValue): - (WebInspector.UIString): - (WebInspector.resourceTrackingWasEnabled): - (WebInspector.resourceTrackingWasDisabled): - (WebInspector.TestController.prototype.runAfterPendingDispatches): - (WebInspector.queuesAreEmpty): - (WebInspector.pausedScript): - * src/js/DevToolsHostStub.js: Added. - (.RemoteDebuggerAgentStub): - (.RemoteDebuggerAgentStub.prototype.getContextId): - (.RemoteProfilerAgentStub): - (.RemoteProfilerAgentStub.prototype.getActiveProfilerModules): - (.RemoteProfilerAgentStub.prototype.getLogLines): - (.RemoteToolsAgentStub): - (.RemoteToolsAgentStub.prototype.dispatchOnInjectedScript): - (.RemoteToolsAgentStub.prototype.dispatchOnInspectorController): - (.RemoteToolsAgentStub.prototype.executeVoidJavaScript): - (.ProfilerStubHelper): - (.ProfilerStubHelper.GetInstance): - (.ProfilerStubHelper.prototype.StopProfiling): - (.ProfilerStubHelper.prototype.StartProfiling): - (.ProfilerStubHelper.prototype.getActiveProfilerModules): - (.ProfilerStubHelper.prototype.getLogLines): - (.RemoteDebuggerCommandExecutorStub): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerCommand): - (.RemoteDebuggerCommandExecutorStub.prototype.DebuggerPauseScript): - (.RemoteDebuggerCommandExecutorStub.prototype.sendResponse_): - (.DevToolsHostStub): - (.DevToolsHostStub.prototype.reset): - (.DevToolsHostStub.prototype.setting): - (.DevToolsHostStub.prototype.setSetting): - * src/js/HeapProfilerPanel.js: Added. - (WebInspector.ProfilesPanel.prototype.addSnapshot): - (WebInspector.HeapSnapshotView): - (WebInspector.HeapSnapshotView.prototype.get statusBarItems): - (WebInspector.HeapSnapshotView.prototype.get profile): - (WebInspector.HeapSnapshotView.prototype.set profile): - (WebInspector.HeapSnapshotView.prototype.show): - (WebInspector.HeapSnapshotView.prototype.hide): - (WebInspector.HeapSnapshotView.prototype.resize): - (WebInspector.HeapSnapshotView.prototype.refresh): - (WebInspector.HeapSnapshotView.prototype.refreshShowAsPercents): - (WebInspector.HeapSnapshotView.prototype._deleteSearchMatchedFlags): - (WebInspector.HeapSnapshotView.prototype.searchCanceled): - (WebInspector.HeapSnapshotView.prototype.performSearch): - (WebInspector.HeapSnapshotView.prototype.jumpToFirstSearchResult.WebInspector.CPUProfileView.prototype.jumpToFirstSearchResult.jumpToLastSearchResult.WebInspector.CPUProfileView.prototype.jumpToLastSearchResult.jumpToNextSearchResult.WebInspector.CPUProfileView.prototype.jumpToNextSearchResult.jumpToPreviousSearchResult.WebInspector.CPUProfileView.prototype.jumpToPreviousSearchResult.showingFirstSearchResult.WebInspector.CPUProfileView.prototype.showingFirstSearchResult.showingLastSearchResult.WebInspector.CPUProfileView.prototype.showingLastSearchResult._jumpToSearchResult.WebInspector.CPUProfileView.prototype._jumpToSearchResult.refreshVisibleData): - (WebInspector.HeapSnapshotView.prototype._changeBase): - (WebInspector.HeapSnapshotView.prototype._createSnapshotDataGridList): - (WebInspector.HeapSnapshotView.prototype._mouseDownInDataGrid): - (WebInspector.HeapSnapshotView.prototype.get _isShowingAsPercent): - (WebInspector.HeapSnapshotView.prototype._percentClicked): - (WebInspector.HeapSnapshotView.prototype._resetDataGridList): - (WebInspector.HeapSnapshotView.prototype._sortData): - (WebInspector.HeapSnapshotView.prototype._updateBaseOptions): - (WebInspector.HeapSnapshotView.prototype._updatePercentButton): - (WebInspector.HeapSnapshotView.prototype._updateSummaryGraph): - (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS): - (WebInspector.HeapSnapshotView.SearchHelper.operations.LESS_OR_EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER_OR_EQUAL): - (WebInspector.HeapSnapshotView.SearchHelper.operations.GREATER): - (WebInspector.HeapSnapshotView.SearchHelper.parseOperationAndNumber): - (WebInspector.HeapSummaryCalculator): - (WebInspector.HeapSummaryCalculator.prototype.computeSummaryValues): - (WebInspector.HeapSummaryCalculator.prototype.formatValue): - (WebInspector.HeapSummaryCalculator.prototype.get showAsPercent): - (WebInspector.HeapSummaryCalculator.prototype.set showAsPercent): - (WebInspector.HeapSummaryCountCalculator): - (WebInspector.HeapSummaryCountCalculator.prototype._highFromLow): - (WebInspector.HeapSummaryCountCalculator.prototype._valueToString): - (WebInspector.HeapSummarySizeCalculator): - (WebInspector.HeapSummarySizeCalculator.prototype._highFromLow): - (WebInspector.HeapSnapshotSidebarTreeElement): - (WebInspector.HeapSnapshotSidebarTreeElement.prototype.get mainTitle): - (WebInspector.HeapSnapshotSidebarTreeElement.prototype.set mainTitle): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _hasRetainers): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get _parent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype._populate.if): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype._populate): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.produceDiff): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.sort): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.signForDelta): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.showDeltaAsPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalCount): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.getTotalSize): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizePercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get countDeltaPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get sizeDeltaPercent): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.get data): - (WebInspector.HeapSnapshotDataGridNodeWithRetainers.prototype.createCell): - (WebInspector.HeapSnapshotDataGridNode): - (WebInspector.HeapSnapshotDataGridList): - (WebInspector.HeapSnapshotDataGridList.prototype.appendChild): - (WebInspector.HeapSnapshotDataGridList.prototype.insertChild): - (WebInspector.HeapSnapshotDataGridList.prototype.removeChildren): - (WebInspector.HeapSnapshotDataGridList.prototype.populateChildren): - (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator): - (WebInspector.HeapSnapshotDataGridList.propertyComparator): - (WebInspector.HeapSnapshotDataGridRetainerNode): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizePercent): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype.get sizeDeltaPercent): - (WebInspector.HeapSnapshotDataGridRetainerNode.prototype._calculateRetainers): - (WebInspector.HeapSnapshotProfileType): - (WebInspector.HeapSnapshotProfileType.prototype.get buttonTooltip): - (WebInspector.HeapSnapshotProfileType.prototype.get buttonStyle): - (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): - (WebInspector.HeapSnapshotProfileType.prototype.get welcomeMessage): - (WebInspector.HeapSnapshotProfileType.prototype.createSidebarTreeElementForProfile): - (WebInspector.HeapSnapshotProfileType.prototype.createView): - (): - * src/js/InjectDispatch.js: Added. - (InspectorControllerDispatcher.dispatch): - (ApuAgentDispatcher.dispatchToApu): - (dispatch): - (devtools): - * src/js/InspectorControllerImpl.js: Added. - (devtools.InspectorBackendImpl): - (devtools.InspectorBackendImpl.prototype.toggleNodeSearch): - (devtools.InspectorBackendImpl.prototype.debuggerEnabled): - (devtools.InspectorBackendImpl.prototype.profilerEnabled): - (devtools.InspectorBackendImpl.prototype.addBreakpoint): - (devtools.InspectorBackendImpl.prototype.removeBreakpoint): - (devtools.InspectorBackendImpl.prototype.updateBreakpoint): - (devtools.InspectorBackendImpl.prototype.pauseInDebugger): - (devtools.InspectorBackendImpl.prototype.resumeDebugger): - (devtools.InspectorBackendImpl.prototype.stepIntoStatementInDebugger): - (devtools.InspectorBackendImpl.prototype.stepOutOfFunctionInDebugger): - (devtools.InspectorBackendImpl.prototype.stepOverStatementInDebugger): - (devtools.InspectorBackendImpl.prototype.setPauseOnExceptionsState): - (devtools.InspectorBackendImpl.prototype.pauseOnExceptionsState): - (devtools.InspectorBackendImpl.prototype.pauseOnExceptions): - (devtools.InspectorBackendImpl.prototype.setPauseOnExceptions): - (devtools.InspectorBackendImpl.prototype.startProfiling): - (devtools.InspectorBackendImpl.prototype.stopProfiling): - (devtools.InspectorBackendImpl.prototype.getProfileHeaders): - (devtools.InspectorBackendImpl.prototype.addFullProfile): - (devtools.InspectorBackendImpl.prototype.getProfile): - (devtools.InspectorBackendImpl.prototype.takeHeapSnapshot): - (devtools.InspectorBackendImpl.prototype.dispatchOnInjectedScript): - (devtools.InspectorBackendImpl.prototype.installInspectorControllerDelegate_): - (devtools.InspectorBackendImpl.prototype.callInspectorController_): - * src/js/ProfilerAgent.js: Added. - (devtools.ProfilerAgent): - (devtools.ProfilerAgent.prototype.setupProfilerProcessorCallbacks): - (devtools.ProfilerAgent.prototype.initializeProfiling): - (devtools.ProfilerAgent.prototype.startProfiling): - (devtools.ProfilerAgent.prototype.stopProfiling): - (devtools.ProfilerAgent.prototype.didGetActiveProfilerModules_): - (devtools.ProfilerAgent.prototype.didGetLogLines_): - * src/js/ProfilerProcessor.js: Added. - (devtools.profiler.WebKitViewBuilder): - (devtools.profiler.WebKitViewBuilder.prototype.createViewNode): - (devtools.profiler.WebKitViewNode): - (set get devtools.profiler.WebKitViewNode.prototype.initFuncInfo_): - (devtools.profiler.JsProfile): - (devtools.profiler.JsProfile.prototype.skipThisFunction): - (devtools.profiler.Processor): - (devtools.profiler.Processor.prototype.printError): - (devtools.profiler.Processor.prototype.skipDispatch): - (devtools.profiler.Processor.prototype.setCallbacks): - (devtools.profiler.Processor.prototype.setNewProfileCallback): - (devtools.profiler.Processor.prototype.processProfiler_.switch.break): - (devtools.profiler.Processor.prototype.processProfiler_): - (devtools.profiler.Processor.prototype.processCodeCreation_): - (devtools.profiler.Processor.prototype.processCodeMove_): - (devtools.profiler.Processor.prototype.processCodeDelete_): - (devtools.profiler.Processor.prototype.processFunctionCreation_): - (devtools.profiler.Processor.prototype.processFunctionMove_): - (devtools.profiler.Processor.prototype.processFunctionDelete_): - (devtools.profiler.Processor.prototype.processTick_): - (devtools.profiler.Processor.prototype.processTickV2_): - (devtools.profiler.Processor.prototype.processHeapSampleBegin_): - (devtools.profiler.Processor.prototype.processHeapSampleStats_): - (devtools.profiler.Processor.prototype.processHeapSampleItem_): - (devtools.profiler.Processor.prototype.processHeapJsConsItem_): - (devtools.profiler.Processor.prototype.processHeapJsRetItem_.mergeRetainers): - (devtools.profiler.Processor.prototype.processHeapJsRetItem_): - (devtools.profiler.Processor.prototype.processHeapSampleEnd_): - (devtools.profiler.Processor.prototype.createProfileForView): - * src/js/Tests.js: Added. - (.TestSuite): - (.TestSuite.prototype.fail): - (.TestSuite.prototype.assertEquals): - (.TestSuite.prototype.assertTrue): - (.TestSuite.prototype.assertContains): - (.TestSuite.prototype.takeControl): - (.TestSuite.prototype.releaseControl): - (.TestSuite.prototype.reportOk_): - (.TestSuite.prototype.reportFailure_): - (.TestSuite.prototype.runTest): - (.TestSuite.prototype.showPanel): - (.TestSuite.prototype.addSniffer.receiver.methodName): - (.TestSuite.prototype.addSniffer): - (.TestSuite.prototype.testHostIsPresent): - (.TestSuite.prototype.testElementsTreeRoot): - (.TestSuite.prototype.testMainResource): - (.TestSuite.prototype.testResourceContentLength.this.addSniffer.): - (.TestSuite.prototype.testResourceHeaders): - (.TestSuite.prototype.testCachedResourceMimeType.this.addSniffer.): - (.TestSuite.prototype.testCachedResourceMimeType): - (.TestSuite.prototype.testProfilerTab): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.waitUntilScriptIsParsed): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh.checkScriptsPanel): - (.TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.switchToElementsTab): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.switchToScriptsTab): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkScriptsPanel): - (.TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch.checkNoDuplicates): - (.TestSuite.prototype.testPauseOnException): - (.TestSuite.prototype.testPauseWhenLoadingDevTools): - (.TestSuite.prototype.testPauseWhenScriptIsRunning.testScriptPauseAfterDelay): - (.TestSuite.prototype.testPauseWhenScriptIsRunning.testScriptPause): - (.TestSuite.prototype.testPauseWhenScriptIsRunning): - (.TestSuite.prototype.optionsToString_): - (.TestSuite.prototype.evaluateInConsole_): - (.TestSuite.prototype.waitForSetBreakpointResponse_): - (.TestSuite.prototype.testEvalOnCallFrame.setBreakpointCallback): - (.TestSuite.prototype.testEvalOnCallFrame.waitForBreakpointHit): - (.TestSuite.prototype.testCompletionOnPause): - (.TestSuite.prototype.testCompletionOnPause.testLocalsCompletion): - (.TestSuite.prototype.testCompletionOnPause.testThisCompletion): - (.TestSuite.prototype.testCompletionOnPause.testFieldCompletion): - (.TestSuite.prototype.testCompletionOnPause.checkCompletions): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.checkScriptsList): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.waitForExceptionEvent.test): - (.TestSuite.prototype.testAutoContinueOnSyntaxError.waitForExceptionEvent): - (.TestSuite.prototype._checkExecutionLine): - (.TestSuite.prototype._scriptsAreParsed): - (.TestSuite.prototype._waitForScriptPause): - (.TestSuite.prototype._checkSourceFrameWhenLoaded.checkExecLine): - (.TestSuite.prototype._checkSourceFrameWhenLoaded): - (.TestSuite.prototype._performSteps.doNextAction): - (.TestSuite.prototype._performSteps): - (.TestSuite.prototype._executeCodeWhenScriptsAreParsed.executeFunctionInInspectedPage): - (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts): - (.TestSuite.prototype._waitUntilScriptsAreParsed): - (.TestSuite.prototype._executeFunctionForStepTest): - (.TestSuite.prototype.testStepOver): - (.TestSuite.prototype.testStepOut): - (.TestSuite.prototype.testStepIn): - (.TestSuite.prototype._evaluateXpath): - (.TestSuite.prototype._findNode): - (.TestSuite.prototype._findText): - (.TestSuite.prototype._nodeIterator): - (.TestSuite.prototype._checkScopeSectionDiv): - (.TestSuite.prototype._expandScopeSections.updateListener): - (.TestSuite.prototype._expandScopeSections): - (.TestSuite.prototype.testExpandScope): - (.TestSuite.prototype.testExpandScope.examineScopes): - (.TestSuite.prototype._findChildProperty): - (.TestSuite.prototype._hookGetPropertiesCallback.accessor.getProperties): - (.TestSuite.prototype._hookGetPropertiesCallback.try): - (.TestSuite.prototype._hookGetPropertiesCallback): - (.TestSuite.prototype.testDebugIntrinsicProperties.expandLocalScope): - (.TestSuite.prototype.testDebugIntrinsicProperties): - (.TestSuite.prototype.testDebugIntrinsicProperties.expandAndCheckNextProperty): - (.TestSuite.prototype.testDebugIntrinsicProperties.checkProperty): - (.TestSuite.createKeyEvent): - (.TestSuite.prototype.testConsoleLog.assertNext): - (.TestSuite.prototype.testConsoleLog): - (.TestSuite.prototype.testEvalGlobal.initEval): - (.TestSuite.prototype.testEvalGlobal): - (.TestSuite.prototype.testShowStoragePanel.this.addSniffer.): - (.TestSuite.prototype.testShowStoragePanel.this.addSniffer): - (.uiTests.runAllTests): - (.uiTests.runTest): - -2010-02-09 Avi Drissman <avi@chromium.org> - - Reviewed by David Levin. - - Chromium Mac: Control-A shouldn't select all/Control-C shouldn't copy - https://bugs.webkit.org/show_bug.cgi?id=34615 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::keyEventDefault): - -2010-02-08 Evan Martin <evan@chromium.org> - - dlopen() knows how to search the library search path, so just rely on - it. While I'm at it, print out the dlerror() error message on failure. - - [chromium] webgl shouldn't hard code library search path - https://bugs.webkit.org/show_bug.cgi?id=34659 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection): - (WebCore::GraphicsContext3DInternal::GLConnection::create): - -2010-02-08 Charlie Reis <creis@chromium.org> - - Reviewed by Darin Adler. - - onbeforeunload not called at window close + frame or iframe focused - https://bugs.webkit.org/show_bug.cgi?id=27481 - http://code.google.com/p/chromium/issues/detail?id=32615 - http://code.google.com/p/chromium/issues/detail?id=17157 - - Chromium and WebKit on Windows will now fire beforeunload handlers - even if an inner frame is focused. - - Layout tests aren't able to test this bug, since it requires closing - the actual browser window, not calling window.close(). Instead, - test with WebCore/manual-tests/onbeforeunload-focused-iframe.html. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::dispatchBeforeUnloadEvent): - -2010-02-08 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by David Levin. - - WebKit/chromium: Custom context menu does not work in inspector. - https://bugs.webkit.org/show_bug.cgi?id=34711 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): - -2010-02-08 Nate Chapin <japhet@chromium.org> - - Reviewed by Darin Fisher. - - Check that the index passed into BackForwardListClientImpl::itemAtIndex() - is valid, and return null if it isn't. - - https://bugs.webkit.org/show_bug.cgi?id=34722 - - * src/BackForwardListClientImpl.cpp: - (WebKit::BackForwardListClientImpl::itemAtIndex): - -2010-02-05 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Jeremy Orlow. - - Adding a way to close all database handles pointing to a certain - database as soon as possible. - https://bugs.webkit.org/show_bug.cgi?id=34619 - - * public/WebDatabase.h: - * src/WebDatabase.cpp: - (WebKit::WebDatabase::closeDatabaseImmediately): - -2010-02-08 Dirk Schulze <krit@webkit.org> - - Reviewed by Nikolas Zimmermann. - - Add back an AffineTransform class for use by SVG - https://bugs.webkit.org/show_bug.cgi?id=33750 - - Use AffineTransform instead of TransformationMatrix here. - - * tests/TransparencyWinTest.cpp: - (WebCore::TEST): - -2010-02-07 Jian Li <jianli@chromium.org> - - Reviewed by Darin Fisher. - - [chromium] Change chromium interface to handle DownloadURL format. - https://bugs.webkit.org/show_bug.cgi?id=34655 - - * public/WebDragData.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::downloadMetadata): - (WebKit::WebDragData::setDownloadMetadata): - -2010-02-06 Dimitri Glazkov <dglazkov@chromium.org> - - No review, rolling out r54364. - http://trac.webkit.org/changeset/54364 - https://bugs.webkit.org/show_bug.cgi?id=34464 - - Introduced asserts in layout tests, needs more testing - locally. - - * public/WebViewClient.h: - * src/ChromeClientImpl.cpp: - * src/ChromeClientImpl.h: - -2010-02-05 James Hawkins <jhawkins@chromium.org> - - Reviewed by David Levin. - - [Chromium] Rename autocomplete* to suggestions* to prepare for the - refactoring of AutocompletePopupMenuClient. - - https://bugs.webkit.org/show_bug.cgi?id=34664 - - * public/WebView.h: - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::popupDidHide): - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::textFieldDidEndEditing): - (WebKit::EditorClientImpl::doAutofill): - * src/WebViewImpl.cpp: - (WebKit::): - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::applyAutofillSuggestions): - (WebKit::WebViewImpl::hideAutofillPopup): - (WebKit::WebViewImpl::hideSuggestionsPopup): - (WebKit::WebViewImpl::refreshSuggestionsPopup): - * src/WebViewImpl.h: - (WebKit::WebViewImpl::suggestionsPopupDidHide): - -2010-02-05 James Hawkins <jhawkins@chromium.org> - - Reviewed by David Levin. - - [Chromium] Remove an unused forward declaration in WebKitClient.h. - - https://bugs.webkit.org/show_bug.cgi?id=34622 - - * public/WebKitClient.h: - -2010-02-05 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - Implement WebInputElement::isActivatedSubmit(). - - https://bugs.webkit.org/show_bug.cgi?id=34623 - - * public/WebInputElement.h: - * src/WebInputElement.cpp: - (WebKit::WebInputElement::isActivatedSubmit): - -2010-02-05 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Update code for getting a v8::FunctionTemplate. - - https://bugs.webkit.org/show_bug.cgi?id=34606 - - * src/WebDevToolsAgentImpl.cpp: - (WebKit::WebDevToolsAgentImpl::createInspectorBackendV8Wrapper): - -2010-02-05 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - Enable JAVASCRIPT_DEBUGGER in chromium port. - - https://bugs.webkit.org/show_bug.cgi?id=34638 - - * features.gypi: - -2010-02-04 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Upstreaming gtests from chromium: UniscribeHelper and TransparencyWin - https://bugs.webkit.org/show_bug.cgi?id=34509 - - Resubmit: The previous commit (r54333) was rolled back. - - * WebKit.gyp: - * tests/TransparencyWinTest.cpp: Added. - (WebCore::RECTToFloatRect): - (WebCore::drawNativeRect): - (WebCore::getPixelAt): - (WebCore::clearTopLayerAlphaChannel): - (WebCore::clearTopLayerAlphaPixel): - (WebCore::operator<<): - (WebCore::TEST): - * tests/UniscribeHelperTest.cpp: Added. - (WebCore::UniscribeTest::UniscribeTest): - (WebCore::UniscribeTest::MakeFont): - (WebCore::UniscribeTest::SetUp): - (WebCore::UniscribeTest::TearDown): - (TEST_F): - -2010-02-04 Drew Wilson <atwilson@chromium.org> - - Reviewed by David Levin. - - WorkerContext.close() does not work in the chromium port - https://bugs.webkit.org/show_bug.cgi?id=34551 - - Test: Adding new downstream test. - - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::workerContextClosedTask): - Now shuts down the worker thread when WorkerContext::close() is invoked. - -2010-02-04 Chris Guillory <chris.guillory@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Add function for AccessibilityObject state change notifications. - - https://bugs.webkit.org/show_bug.cgi?id=34464 - - * public/WebViewClient.h: - (WebKit::WebViewClient::didChangeAccessibilityObjectState): - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState): - * src/ChromeClientImpl.h: - -2010-02-04 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by Darin Fisher. - - Update comments to better document the possible values of the - writing direction menu state variables. - - * public/WebContextMenuData.h: - -2010-02-04 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Remove references to V8Custom. - - https://bugs.webkit.org/show_bug.cgi?id=32638 - - * src/DebuggerAgentImpl.cpp: - * src/WebDevToolsFrontendImpl.cpp: - -2010-02-04 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed. Revert 54333 which broke Chromium build. - - * WebKit.gyp: - * tests/TransparencyWinTest.cpp: Removed. - * tests/UniscribeHelperTest.cpp: Removed. - -2010-02-04 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Upstreaming gtests from chromium: UniscribeHelper and TransparencyWin. - https://bugs.webkit.org/show_bug.cgi?id=34509 - - * WebKit.gyp: - * tests/TransparencyWinTest.cpp: Added. - (WebCore::RECTToFloatRect): - (WebCore::drawNativeRect): - (WebCore::getPixelAt): - (WebCore::clearTopLayerAlphaChannel): - (WebCore::clearTopLayerAlphaPixel): - (WebCore::operator<<): - (WebCore::TEST): - * tests/UniscribeHelperTest.cpp: Added. - (WebCore::UniscribeTest::UniscribeTest): - (WebCore::UniscribeTest::MakeFont): - (WebCore::UniscribeTest::SetUp): - (WebCore::UniscribeTest::TearDown): - (WebCore::TEST_F): - -2010-02-04 Jeremy Moskovich <jeremy@chromium.org> - - Reviewed by David Levin. - - [Chromium] WebKit side of "Writing direction" context menu on OS X. - https://bugs.webkit.org/show_bug.cgi?id=34524 - - * public/WebContextMenuData.h: - (WebKit::WebContextMenuData::): - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - -2010-02-03 Drew Wilson <atwilson@chromium.org> - - Reviewed by Alexey Proskuryakov. - - SharedWorkerScriptLoader should not be an ActiveDOMObject - https://bugs.webkit.org/show_bug.cgi?id=34513 - - * src/SharedWorkerRepository.cpp: - (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader): - Changed SharedWorkerScriptLoader to manage its own lifecycle without using ActiveDOMObject. - (WebCore::SharedWorkerScriptLoader::parentContext): - (WebCore::pendingLoaders): - Now we manually track pending loads so we can shut them down when the parent context shuts down. - (WebCore::SharedWorkerScriptLoader::contextDetached): - Shuts down/frees any pending worker loads. - (WebCore::SharedWorkerScriptLoader::~SharedWorkerScriptLoader): - Marks the SharedWorker object as not having pending activity if there was a load active (handles case where load was pending when parent document exits). - (WebCore::SharedWorkerScriptLoader::load): - (WebCore::SharedWorkerRepository::documentDetached): - Now calls SharedWorkerScriptLoader::contextDetached() to shutdown any pending worker loads. - -2010-02-03 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Timothy Hatcher. - - [Chromium] Return a consistent set of platforms from WebDevToolsFrontendImpl - https://bugs.webkit.org/show_bug.cgi?id=34523 - - * src/WebDevToolsFrontendImpl.cpp: - (WebKit::WebDevToolsFrontendImpl::jsPlatform): - -2010-02-02 Joel Stanley <joel@jms.id.au> - - Reviewed by David Levin. - - [Chromium] Add API method for setting caret blink frequency. - https://bugs.webkit.org/show_bug.cgi?id=31704 - - This enables the RenderThemeChromiumLinux::setCaretBlinkInterval method - to be called Chromium's API. The API is linux-only as it is currently - the only port to implement RenderTheme::setCaretBlinkInterval. - - * WebKit.gyp: Add WebRenderTheme.{h,cpp} - * public/linux/WebRenderTheme.h: Added. - * src/linux/WebRenderTheme.cpp: Added. - (WebKit::setCaretBlinkInterval): Exposed API - -2010-02-02 Shinichiro Hamaji <hamaji@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Implement WebFrameImpl::pageNumberForElementById - https://bugs.webkit.org/show_bug.cgi?id=34471 - - * public/WebFrame.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::pageNumberForElementById): - * src/WebFrameImpl.h: - -2010-02-02 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Upstream DevTools code. - - https://bugs.webkit.org/show_bug.cgi?id=34326 - - * WebKit.gyp: - * src/APUAgentDelegate.h: Added. - * src/BoundObject.cpp: Added. - (WebKit::BoundObject::BoundObject): - (WebKit::BoundObject::~BoundObject): - (WebKit::BoundObject::addProtoFunction): - (WebKit::BoundObject::build): - * src/BoundObject.h: Added. - * src/DebuggerAgent.h: Added. - * src/DebuggerAgentImpl.cpp: Added. - (WebKit::DebuggerAgentImpl::DebuggerAgentImpl): - (WebKit::DebuggerAgentImpl::~DebuggerAgentImpl): - (WebKit::DebuggerAgentImpl::getContextId): - (WebKit::DebuggerAgentImpl::debuggerOutput): - (WebKit::DebuggerAgentImpl::createUtilityContext): - (WebKit::DebuggerAgentImpl::executeUtilityFunction): - (WebKit::DebuggerAgentImpl::executeVoidJavaScript): - (WebKit::DebuggerAgentImpl::page): - * src/DebuggerAgentImpl.h: Added. - (WebKit::DebuggerAgentImpl::setAutoContinueOnException): - (WebKit::DebuggerAgentImpl::autoContinueOnException): - (WebKit::DebuggerAgentImpl::webdevtoolsAgent): - (WebKit::DebuggerAgentImpl::webView): - * src/DebuggerAgentManager.cpp: Added. - (WebKit::DebuggerAgentManager::debugHostDispatchHandler): - (WebKit::DebuggerAgentManager::debugAttach): - (WebKit::DebuggerAgentManager::debugDetach): - (WebKit::DebuggerAgentManager::onV8DebugMessage): - (WebKit::DebuggerAgentManager::pauseScript): - (WebKit::DebuggerAgentManager::executeDebuggerCommand): - (WebKit::DebuggerAgentManager::setMessageLoopDispatchHandler): - (WebKit::DebuggerAgentManager::setHostId): - (WebKit::DebuggerAgentManager::onWebViewClosed): - (WebKit::DebuggerAgentManager::onNavigate): - (WebKit::DebuggerAgentManager::sendCommandToV8): - (WebKit::DebuggerAgentManager::sendContinueCommandToV8): - (WebKit::DebuggerAgentManager::findAgentForCurrentV8Context): - (WebKit::DebuggerAgentManager::debuggerAgentForHostId): - * src/DebuggerAgentManager.h: Added. - (WebKit::DebuggerAgentManager::UtilityContextScope::UtilityContextScope): - (WebKit::DebuggerAgentManager::UtilityContextScope::~UtilityContextScope): - * src/DevToolsRPC.h: Added. - (WebKit::): - (WebKit::DevToolsRPC::Delegate::Delegate): - (WebKit::DevToolsRPC::Delegate::~Delegate): - (WebKit::DevToolsRPC::DevToolsRPC): - (WebKit::DevToolsRPC::~DevToolsRPC): - (WebKit::DevToolsRPC::sendRpcMessage): - * src/DevToolsRPCJS.h: Added. - * src/ProfilerAgent.h: Added. - * src/ProfilerAgentImpl.cpp: Added. - (WebKit::ProfilerAgentImpl::getActiveProfilerModules): - (WebKit::ProfilerAgentImpl::getLogLines): - * src/ProfilerAgentImpl.h: Added. - (WebKit::ProfilerAgentImpl::ProfilerAgentImpl): - (WebKit::ProfilerAgentImpl::~ProfilerAgentImpl): - * src/ToolsAgent.h: Added. - * src/WebDevToolsAgentImpl.cpp: Added. - (WebKit::): - (WebKit::WebDevToolsAgentImpl::WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::~WebDevToolsAgentImpl): - (WebKit::WebDevToolsAgentImpl::disposeUtilityContext): - (WebKit::WebDevToolsAgentImpl::unhideResourcesPanelIfNecessary): - (WebKit::WebDevToolsAgentImpl::attach): - (WebKit::WebDevToolsAgentImpl::detach): - (WebKit::WebDevToolsAgentImpl::didNavigate): - (WebKit::WebDevToolsAgentImpl::didCommitProvisionalLoad): - (WebKit::WebDevToolsAgentImpl::didClearWindowObject): - (WebKit::WebDevToolsAgentImpl::forceRepaint): - (WebKit::WebDevToolsAgentImpl::dispatchOnInspectorController): - (WebKit::WebDevToolsAgentImpl::dispatchOnInjectedScript): - (WebKit::WebDevToolsAgentImpl::executeVoidJavaScript): - (WebKit::WebDevToolsAgentImpl::dispatchMessageFromFrontend): - (WebKit::WebDevToolsAgentImpl::inspectElementAt): - (WebKit::WebDevToolsAgentImpl::setRuntimeFeatureEnabled): - (WebKit::WebDevToolsAgentImpl::sendRpcMessage): - (WebKit::WebDevToolsAgentImpl::compileUtilityScripts): - (WebKit::WebDevToolsAgentImpl::initDevToolsAgentHost): - (WebKit::WebDevToolsAgentImpl::createInspectorBackendV8Wrapper): - (WebKit::WebDevToolsAgentImpl::resetInspectorFrontendProxy): - (WebKit::WebDevToolsAgentImpl::setApuAgentEnabled): - (WebKit::WebDevToolsAgentImpl::jsDispatchOnClient): - (WebKit::WebDevToolsAgentImpl::jsDispatchToApu): - (WebKit::WebDevToolsAgentImpl::jsEvaluateOnSelf): - (WebKit::WebDevToolsAgentImpl::jsOnRuntimeFeatureStateChanged): - (WebKit::WebDevToolsAgentImpl::inspectorController): - (WebKit::WebDevToolsAgentImpl::identifierForInitialRequest): - (WebKit::WebDevToolsAgentImpl::willSendRequest): - (WebKit::WebDevToolsAgentImpl::didReceiveData): - (WebKit::WebDevToolsAgentImpl::didReceiveResponse): - (WebKit::WebDevToolsAgentImpl::didFinishLoading): - (WebKit::WebDevToolsAgentImpl::didFailLoading): - (WebKit::WebDevToolsAgentImpl::evaluateInWebInspector): - (WebKit::WebDevToolsAgentImpl::setTimelineProfilingEnabled): - (WebKit::WebDevToolsAgent::create): - (WebKit::WebDevToolsAgent::executeDebuggerCommand): - (WebKit::WebDevToolsAgent::debuggerPauseScript): - (WebKit::WebDevToolsAgent::setMessageLoopDispatchHandler): - (WebKit::WebDevToolsAgent::dispatchMessageFromFrontendOnIOThread): - * src/WebDevToolsAgentImpl.h: Added. - (WebKit::WebDevToolsAgentImpl::hostId): - * src/WebDevToolsFrontendImpl.cpp: Added. - (WebKit::ToV8String): - (WebKit::WebDevToolsFrontend::create): - (WebKit::WebDevToolsFrontendImpl::WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl): - (WebKit::WebDevToolsFrontendImpl::dispatchMessageFromAgent): - (WebKit::WebDevToolsFrontendImpl::executeScript): - (WebKit::WebDevToolsFrontendImpl::dispatchOnWebInspector): - (WebKit::WebDevToolsFrontendImpl::sendRpcMessage): - (WebKit::WebDevToolsFrontendImpl::contextMenuItemSelected): - (WebKit::WebDevToolsFrontendImpl::contextMenuCleared): - (WebKit::WebDevToolsFrontendImpl::jsLoaded): - (WebKit::WebDevToolsFrontendImpl::jsPlatform): - (WebKit::WebDevToolsFrontendImpl::jsPort): - (WebKit::WebDevToolsFrontendImpl::jsCopyText): - (WebKit::WebDevToolsFrontendImpl::jsActivateWindow): - (WebKit::WebDevToolsFrontendImpl::jsCloseWindow): - (WebKit::WebDevToolsFrontendImpl::jsDockWindow): - (WebKit::WebDevToolsFrontendImpl::jsUndockWindow): - (WebKit::WebDevToolsFrontendImpl::jsLocalizedStringsURL): - (WebKit::WebDevToolsFrontendImpl::jsHiddenPanels): - (WebKit::WebDevToolsFrontendImpl::jsDebuggerCommand): - (WebKit::WebDevToolsFrontendImpl::jsSetting): - (WebKit::WebDevToolsFrontendImpl::jsSetSetting): - (WebKit::WebDevToolsFrontendImpl::jsDebuggerPauseScript): - (WebKit::WebDevToolsFrontendImpl::jsWindowUnloading): - (WebKit::WebDevToolsFrontendImpl::jsShowContextMenu): - * src/WebDevToolsFrontendImpl.h: Added. - (WebKit::WebDevToolsFrontendImpl::MenuProvider::create): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::~MenuProvider): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::disconnect): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::populateContextMenu): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::contextMenuItemSelected): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::contextMenuCleared): - (WebKit::WebDevToolsFrontendImpl::MenuProvider::MenuProvider): - -2010-02-01 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Add WebSecurityOrigin::createFromString factory - https://bugs.webkit.org/show_bug.cgi?id=34460 - - * public/WebSecurityOrigin.h: - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::createFromString): - -2010-02-02 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Should not select a word on right-click. - https://bugs.webkit.org/show_bug.cgi?id=33364 - - For non-Mac platforms, do not select a word around the caret when - a context menu is opening. This behavior is not common in non-Mac - platforms, and it prevents pasting with a context menu. - - In order that the spell checker works without the selection, we - introduce WebFrame::selectWordAroundCaret(). We can replace a word - around the caret with selectWordAroundCaret() + replaceSelection(). - - * public/WebFrame.h: Add pure selectWordAroundCaret() declaration. - * src/ContextMenuClientImpl.cpp: - (WebKit::selectMisspelledWord): Move word-selection code to - WebFrameImpl::selectWordAroundPosition(), and clear the selection - on non-Mac. - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectWordAroundPosition): - (WebKit::WebFrameImpl::selectWordAroundCaret): - * src/WebFrameImpl.h: Add selectWordAroundCaret() declaration. - -2010-02-01 Shinichiro Hamaji <hamaji@chromium.org> - - Unreviewed attempt to fix the broken build. - - This was introduced in http://trac.webkit.org/changeset/54182 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::performMediaPlayerAction): - -2010-01-27 Matt Perry <mpcomplete@chromium.org> - - Reviewed by Eric Seidel. - - Add support for addUserScript to chromium port. - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::addUserScript): - (WebKit::WebViewImpl::removeAllUserContent): - * src/WebViewImpl.h: - -2010-01-29 Philippe Normand <pnormand@igalia.com> - - Reviewed by Eric Carlson. - - [GTK] set playbin mute property depending on volume value - https://bugs.webkit.org/show_bug.cgi?id=31586 - - New API in MediaPlayer for mute control - - * public/WebMediaPlayerClient.h: - * src/WebMediaPlayerClientImpl.cpp: - (WebKit::WebMediaPlayerClientImpl::volumeChanged): - (WebKit::WebMediaPlayerClientImpl::muteChanged): - * src/WebMediaPlayerClientImpl.h: - -2010-01-31 Kent Tamura <tkent@chromium.org> - - Reviewed by Jeremy Orlow. - - [Chromium] Fix a bug that a selected word is not recognized as a - spell-check source. - https://bugs.webkit.org/show_bug.cgi?id=33660 - - * src/ContextMenuClientImpl.cpp: - (WebKit::isASingleWord): Use wordBreakIterator(), and correctly check - the return value of textBreakNext(). - -2010-01-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Clean up WebStorageArea - https://bugs.webkit.org/show_bug.cgi?id=34353 - - Get rid of legacy glue code and fix a typo. - - * public/WebStorageArea.h: - -2010-01-29 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Dimitri Glazkov. - - A first step towards the Indexed Database API - https://bugs.webkit.org/show_bug.cgi?id=34342 - - Add runtime enable support for Indexed Database API. - - * features.gypi: - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableIndexedDatabase): - (WebKit::WebRuntimeFeatures::isIndexedDatabaseEnabled): - -2010-01-29 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Add API methods for loading inspector utility scripts. - - https://bugs.webkit.org/show_bug.cgi?id=34326 - - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::injectedScriptSource): - (WebKit::WebDevToolsAgentClient::injectedScriptDispatcherSource): - -2010-01-29 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - Add FrameLoaderClient::allowImages method to allow the client to - overrule image loading policy on a per frame basis. - - https://bugs.webkit.org/show_bug.cgi?id=34225 - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowImages): - * public/WebSettings.h: - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::allowImages): - * src/FrameLoaderClientImpl.h: - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setImagesEnabled): - * src/WebSettingsImpl.h: - -2010-01-28 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - StorageNamespaceProxy::copy() should be a no-op - https://bugs.webkit.org/show_bug.cgi?id=34298 - - The comment in the code should make clear why. - - * public/WebViewClient.h: - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespaceProxy::copy): - -2010-01-28 Michael Nordman <michaeln@google.com> - - Reviewed by Alexey Proskuryakov. - - ApplicationCache events should be deferred until after Document onload has fired. - https://bugs.webkit.org/show_bug.cgi?id=29690 - - * src/ApplicationCacheHost.cpp: - (WebCore::ApplicationCacheHost::ApplicationCacheHost): Initialize m_isDeferringEvents to true. - (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): Depending, defer or raise the event. - (WebCore::ApplicationCacheHost::stopDeferringEvents): Raise any deferred events and reset the flag. - -2010-01-27 Aaron Boodman <aa@chromium.org> - - Reviewed by Darin Adler. - - Send full URL and application id of requesting context to Chromium - when checking notification permissions. - - https://bugs.webkit.org/show_bug.cgi?id=34238 - - * public/WebDocument.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::applicationID): - Implement applicationID() method. - - * public/WebNotificationPresenter.h: - * src/NotificationPresenterImpl.cpp: - (WebKit::NotificationPresenterImpl::checkPermission): - * src/NotificationPresenterImpl.h: - Send applicationID and full URL through to Chromium. - -2010-01-27 Darin Fisher <darin@chromium.org> - - Reviewed by Pavel Feldman. - - Expose HistoryItem::documentSequenceNumber - https://bugs.webkit.org/show_bug.cgi?id=34243 - - * public/WebHistoryItem.h: - * src/WebHistoryItem.cpp: - (WebKit::WebHistoryItem::documentSequenceNumber): - (WebKit::WebHistoryItem::setDocumentSequenceNumber): - -2010-01-26 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - Add methods to support running a nested modal loop outside of WebKit. - https://bugs.webkit.org/show_bug.cgi?id=34199 - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebView::willEnterModalLoop): Create PageGroupLoadDeferrer - (WebKit::WebView::didExitModalLoop): Destroy PageGroupLoadDeferrer - -2010-01-27 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - Adding missing WebMutationEvent.cpp file to fix build bustage. - https://bugs.webkit.org/show_bug.cgi?id=33882 - - * public/WebMutationEvent.h: Remove unnecessary constructor. - * src/WebEvent.cpp: Remove unnecessary include of WebMutationEvent.h. - * src/WebMutationEvent.cpp: Added. - -2010-01-27 Jay Campan <jcampan@google.com> - - Reviewed by Darin Fisher. - - Adding EventListeners to the chromium API. - - https://bugs.webkit.org/show_bug.cgi?id=33882 - - * WebKit.gyp: - * public/WebEvent.h: Added. - * public/WebEventListener.h: Added. - * public/WebMutationEvent.h: Added. - * public/WebNode.h: - * public/WebString.h: - (WebKit::operator==): - (WebKit::operator!=): - * src/EventListenerWrapper.cpp: Added. - * src/EventListenerWrapper.h: Added. - * src/WebEvent.cpp: Added. - * src/WebEventListener.cpp: Added. - * src/WebEventListenerPrivate.cpp: Added. - * src/WebEventListenerPrivate.h: Added. - * src/WebNode.cpp: - (WebKit::WebNode::addEventListener): - (WebKit::WebNode::removeEventListener): - * src/WebString.cpp: - (WebKit::WebString::equals): - -2010-01-26 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Add KeyboardTest to WebKit API tests - https://bugs.webkit.org/show_bug.cgi?id=34178 - - * WebKit.gyp: - * tests/KeyboardTest.cpp: Added. - -2010-01-22 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Adler. - - Make storage events match the spec. - https://bugs.webkit.org/show_bug.cgi?id=30546 - - Update the storageEvent algorithm to match the change in WebCore. - - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::storageEvent): - -2010-01-22 Elliot Glaysher <erg@chromium.org> - - Reviewed by David Levin. - - Chromium: theme selection colors to match gtk theme - Add functions to RenderThemeChromiumLinux to change the selection color - according to the current GTK+ theme. - - Since the change is to the Chromium WebKit API layer, testing is done - in Chromium's test shell (see Chromium side of this patch: - http://codereview.chromium.org/554004) - - https://bugs.webkit.org/show_bug.cgi?id=33921 - - * public/WebView.h: Adds interface to change the selection colors - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setSelectionColors): Implements new interface. - * src/WebViewImpl.h: - -2010-01-22 Steve VanDeBogart <vandebo@chromium.org> - - Reviewed by David Levin. - - Middle clicking the main scroll bars should not trigger a paste event - in Linux chromium. - https://bugs.webkit.org/show_bug.cgi?id=33062 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseUp): - -2010-01-22 Albert J. Wong <ajwong@chromium.org> - - Not reviewed. backout. - - Backout r53705. - Causes ui_tests to timeout, and browser_tests to fail with - TestConnectToBadPort and WindowOpenInvalidExtension. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - (WebKit::FrameLoaderClientImpl::postProgressStartedNotification): - (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - * src/WebViewImpl.h: - -2010-01-22 Peter Kasting <pkasting@google.com> - - Not reviewed, backout. - - Back out r52673, which caused several regressions. - https://bugs.webkit.org/show_bug.cgi?id=32533 - - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::initialize): - (WebKit::AutocompletePopupMenuClient::popupDidHide): - (WebKit::AutocompletePopupMenuClient::setTextFromItem): - * src/AutocompletePopupMenuClient.h: - -2010-01-21 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - The Chromium WebKit API needs to expose storage event related data - https://bugs.webkit.org/show_bug.cgi?id=33985 - - setItem and removeItem on WebStorageArea need to expose what the previous - value was for the key being modified. Clear needs to return whether it - actually cleared anything. - - * public/WebStorageArea.h: - (WebKit::WebStorageArea::setItem): - (WebKit::WebStorageArea::removeItem): - (WebKit::WebStorageArea::clear): - * src/StorageAreaProxy.cpp: - (WebCore::StorageAreaProxy::StorageAreaProxy): - (WebCore::StorageAreaProxy::setItem): - (WebCore::StorageAreaProxy::removeItem): - (WebCore::StorageAreaProxy::clear): - (WebCore::StorageAreaProxy::storageEvent): - * src/StorageAreaProxy.h: - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::localStorageNamespace): - (WebCore::StorageNamespace::sessionStorageNamespace): - (WebCore::StorageNamespaceProxy::StorageNamespaceProxy): - (WebCore::StorageNamespaceProxy::copy): - (WebCore::StorageNamespaceProxy::storageArea): - * src/StorageNamespaceProxy.h: - * src/WebStorageAreaImpl.cpp: - (WebKit::WebStorageAreaImpl::setItem): - (WebKit::WebStorageAreaImpl::removeItem): - (WebKit::WebStorageAreaImpl::clear): - * src/WebStorageAreaImpl.h: - -2010-01-21 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] spurious WebViewClient::didStopLoading if changing - location.hash while a subframe is still loading - - https://bugs.webkit.org/show_bug.cgi?id=33884 - - This is a refinement of http://trac.webkit.org/changeset/51548 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - (WebKit::FrameLoaderClientImpl::postProgressStartedNotification): - (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::didStartLoading): - (WebKit::WebViewImpl::didStopLoading): - * src/WebViewImpl.h: - -2010-01-21 Adam Barth <abarth@webkit.org> - - Unreviewed. Added a blank line requested by the great an powerful - fishd. - - * public/WebFrameClient.h: - -2010-01-21 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - [chromium] Add allowPlugins callback to allow per-site enabling of plugins - https://bugs.webkit.org/show_bug.cgi?id=33974 - - Forward the new allowPlugins callback to WebKitClient so that it can - make the policy decision. - - * public/WebFrameClient.h: - (WebKit::WebFrameClient::allowPlugins): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::allowJavaScript): - (WebKit::FrameLoaderClientImpl::allowPlugins): - * src/FrameLoaderClientImpl.h: - -2010-01-21 James Robinson <jamesr@chromium.org> - - Reviewed by Darin Fisher. - - Bumps the refcount when WebNode::toElement/toConstElement are called. - https://bugs.webkit.org/show_bug.cgi?id=33977 - - Ensures that when a wrapper around a WebNode is create via the - toElement() or toConstElement() calls that the refcount on the WebNode - is increased, by forcing a call to WebNode::assign(). This is needed - so that the following code: - { - WebNode n = someNode(); - WebElement e = n.toElement<WebElement>(); - } - does not decrease the overall refcount on the Node that someNode() - returns. - - This caused crashes in the 'Save page as..' feature. - - * public/WebNode.h: - (WebKit::WebNode::toElement): - (WebKit::WebNode::toConstElement): - -2010-01-21 Michael Nordman <michaeln@google.com> - - Reviewed by Darin Fisher. - - Adds WebKit::WebDataSource::applicationCacheHost() to the API. - https://bugs.webkit.org/show_bug.cgi?id=33880 - - * WebKit.gyp: - * public/WebDataSource.h: - * src/ApplicationCacheHost.cpp: - * src/ApplicationCacheHostInternal.h: Copied from WebKit/chromium/src/ApplicationCacheHost.cpp. - (WebCore::ApplicationCacheHostInternal::notifyEventListener): - (WebCore::ApplicationCacheHostInternal::toWebApplicationCacheHost): - * src/WebDataSourceImpl.cpp: - (WebKit::WebDataSourceImpl::applicationCacheHost): - * src/WebDataSourceImpl.h: - -2010-01-21 Eric Uhrhane <ericu@chromium.org> - - Reviewed by Dmitry Titov. - - Add changes missing from r53595, without which Chromium has no database. - - https://bugs.webkit.org/show_bug.cgi?id=33966 - - No new tests - fixes database layout tests in Chromium. - - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableDatabase): - (WebKit::WebRuntimeFeatures::isDatabaseEnabled): - -2010-01-21 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - [Chromium] Implement texSubImage2D taking WebGLArray - https://bugs.webkit.org/show_bug.cgi?id=33932 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::texSubImage2D): - -2010-01-20 Vitaly Repeshko <vitalyr@chromium.org> - - Reviewed by Pavel Feldman. - - [V8] Support SerializedScriptValue. - https://bugs.webkit.org/show_bug.cgi?id=32920 - http://crbug.com/30620 - - Updated uses of SerializedScriptValue: - * src/PlatformMessagePortChannel.cpp: - (WebCore::PlatformMessagePortChannel::postMessageToRemote): - (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::postMessageToWorkerObject): - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): - (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): - * src/WebWorkerImpl.cpp: - (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): - -2010-01-20 Shinichiro Hamaji <hamaji@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] computePageRectsForFrame seems to be unnecessary - https://bugs.webkit.org/show_bug.cgi?id=33881 - - * src/WebFrameImpl.cpp: Stop including FrameChromium.h - -2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> - - Chromium build fix. - - * public/WebAccessibilityRole.h: - (WebKit::): - Correct enum names. - - * src/LocalizedStrings.cpp: - (WebCore::AXMenuListPopupActionVerb): - Stubbed. - (WebCore::AXMenuListActionVerb): - Stubbed. - -2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> - - Chromium build fix. - - * public/WebAccessibilityRole.h: - (WebKit::): - - * src/AssertMatchingEnums.cpp: - -2010-01-18 Jonathan Dixon <joth@chromium.org> - - Reviewed by Adam Barth. - - Add support for enabling navigator.geolocation at runtime in the V8 bindings. - Adds the [EnabledAtRuntime] modifier to the navigator IDL. - https://bugs.webkit.org/show_bug.cgi?id=33467 - - * public/WebRuntimeFeatures.h: - * src/WebRuntimeFeatures.cpp: - (WebKit::WebRuntimeFeatures::enableGeolocation): - (WebKit::WebRuntimeFeatures::isGeolocationEnabled): - -2010-01-17 Kent Tamura <tkent@chromium.org> - - Reviewed by Shinichiro Hamaji. - - [Chromium] Remove an old runFileChooser() method. - https://bugs.webkit.org/show_bug.cgi?id=33778 - - Chromium code switched to new runFileChooser() introduced by - r53269. The old one is not needed anymore. - - * public/WebViewClient.h: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::runOpenPanel): - -2010-01-15 Eric Seidel <eric@webkit.org> - - No review, rolling out r53344. - http://trac.webkit.org/changeset/53344 - https://bugs.webkit.org/show_bug.cgi?id=32920 - - Broke the Chromium Mac builder. - - * src/PlatformMessagePortChannel.cpp: - (WebCore::PlatformMessagePortChannel::postMessageToRemote): - (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::postMessageToWorkerObject): - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): - (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): - * src/WebWorkerImpl.cpp: - (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): - -2010-01-15 Vitaly Repeshko <vitalyr@chromium.org> - - Reviewed by David Levin. - - [V8] Support SerializedScriptValue. - https://bugs.webkit.org/show_bug.cgi?id=32920 - http://crbug.com/30620 - - Updated uses of SerializedScriptValue: - * src/PlatformMessagePortChannel.cpp: - (WebCore::PlatformMessagePortChannel::postMessageToRemote): - (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::postMessageToWorkerObject): - * src/WebWorkerClientImpl.cpp: - (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): - (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): - * src/WebWorkerImpl.cpp: - (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): - -2010-01-14 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Oliver Hunt. - - [Chromium] Forgot to adopt a ref counted object in StorageNamespaceProxy - https://bugs.webkit.org/show_bug.cgi?id=33704 - - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::localStorageNamespace): - (WebCore::StorageNamespace::sessionStorageNamespace): - -2010-01-14 Marcus Bulach <bulach@chromium.org> - - Reviewed by Dimitri Glazkov. - - Adds WebKit::WebSecurityOrigin::createFromDatabaseIdentifier. - https://bugs.webkit.org/show_bug.cgi?id=33648 - - * public/WebSecurityOrigin.h: - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): - -2010-01-14 Brian Weinstein <bweinstein@apple.com> - - Reviewed by Adam Roben. - - Drag and Drop source/destination code needs cleanup. - <https://bugs.webkit.org/show_bug.cgi?id=33691>. - - Update to new way of calling sourceOperation. - - * src/DragClientImpl.cpp: - (WebKit::DragClientImpl::startDrag): - -2010-01-14 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Remove references to V8DOMWrapper::convertToNative*(). - - https://bugs.webkit.org/show_bug.cgi?id=33677 - - * src/WebBindings.cpp: - (WebKit::getDragDataImpl): - (WebKit::getRangeImpl): - -2010-01-14 Kent Tamura <tkent@chromium.org> - - Reviewed by Darin Fisher. - - Introduce WebFileChooserParams to convey parameters for - WebViewClient::runFileChooser(), and add new parameters to it. - https://bugs.webkit.org/show_bug.cgi?id=32473 - - The new parameters are - - selected file names - - "accept" attribute value - - * WebKit.gyp: Add WebFileChooserParams.h - * public/WebFileChooserParams.h: Added. - * public/WebViewClient.h: - (WebKit::WebViewClient::runFileChooser): - Add runFileChooser() with WebFileChooserParams, and mark the old one deprecated. - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::runOpenPanel): - Call the new runFileChooser() first, then call the old - runFileChooser() if the new one failed. - -2010-01-13 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Need to implement WebGLContextAttributes - https://bugs.webkit.org/show_bug.cgi?id=31169 - - Added the WebGLContextAttributes class and custom JavaScript - bindings to accept a native object as the second argument to - getContext("experimental-webgl") per the WebGL specification. - Added GraphicsContext3D::Attributes struct to isolate DOM and - graphics layers. Added getContextAttributes() to - WebGLRenderingContext. Added test case ensuring that context - attributes can be passed down and returned. Tested in Safari and - Chromium. The attributes will be hooked up to the creation of the - OpenGL context in bug 33416. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::getContextAttributes): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::getContextAttributes): - -2010-01-13 Jon Honeycutt <jhoneycutt@apple.com> - - MSAA: selected, selectable, extended selectable, and multiple - selectable states are not reported - - https://bugs.webkit.org/show_bug.cgi?id=33574 - <rdar://problem/7536826> - - Reviewed by Darin Adler. - - * public/WebAccessibilityObject.h: - Update for WebCore::AccessibilityObject function rename. - - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::isMultiSelectable): - Ditto. - -2010-01-13 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient - https://bugs.webkit.org/show_bug.cgi?id=33492 - - * public/WebKitClient.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::createSessionStorageNamespace): - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::sessionStorageNamespace): - -2010-01-13 Jeremy Orlow <jorlow@chromium.org> - - No reviewer. More or less a build fix. My 53180 broke some - stuff on the Chromium port so I'm reverting. - - * public/WebKitClient.h: - * public/WebViewClient.h: - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::sessionStorageNamespace): - -2010-01-11 Jeremy Orlow <jorlow@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient - https://bugs.webkit.org/show_bug.cgi?id=33492 - - * public/WebKitClient.h: - * public/WebViewClient.h: - (WebKit::WebViewClient::getSessionStorageNamespace): - * src/StorageNamespaceProxy.cpp: - (WebCore::StorageNamespace::sessionStorageNamespace): - -2010-01-11 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Re-work webkit_unit_tests so that WebKit is initialized only once - https://bugs.webkit.org/show_bug.cgi?id=33504 - - * WebKit.gyp: - * tests/KURLTest.cpp: - (ComponentCase::TEST): - * tests/RunAllTests.cpp: Added. - (main): - * tests/WebKitTest.h: Removed. - -2010-01-09 Adam Barth <abarth@webkit.org> - - Reviewed by Darin Adler. - - ScriptController::isEnabled needs to be renamed - https://bugs.webkit.org/show_bug.cgi?id=32063 - - Rename ScriptController::isEnabled to - ScriptController::canExecuteScripts. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::bindToWindowObject): - -2010-01-08 Daniel Bates <dbates@webkit.org> - - Reviewed by Adam Barth. - - https://bugs.webkit.org/show_bug.cgi?id=33417 - - Cleans up style errors exposed by the patch for bug #33198. - - No functionality was changed. So, no new tests. - - * src/GraphicsContext3D.cpp: - -2010-01-08 Darin Fisher <darin@chromium.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Upstream webkit unit tests from the chromium repository - https://bugs.webkit.org/show_bug.cgi?id=33351 - - This adds one such test (for KURL) and sets up the test framework. - - Switch WebKit to build a static library on all platforms. Add a - webkit_unit_tests executable target that runs the unit tests and also - ensures that we don't have any missing symbols (a function that WebKit - as a shared library used to serve). - - Changes chromium_src_dir to ../../WebKit/chromium to match how - WebCore.gyp defines that variable. - - * WebKit.gyp: - * public/WebKitClient.h: - (WebKit::WebKitClient::getPluginList): Remove bogus trailing semi-colon. - (WebKit::WebKitClient::decrementStatsCounter): Remove bogus trailing semi-colon. - (WebKit::WebKitClient::incrementStatsCounter): Remove bogus trailing semi-colon. - (WebKit::WebKitClient::traceEventBegin): Remove bogus trailing semi-colon. - (WebKit::WebKitClient::traceEventEnd): Remove bogus trailing semi-colon. - (WebKit::WebKitClient::histogramCounts): Remove bogus trailing semi-colon. - * tests: Added. - * tests/KURLTest.cpp: Added. - * tests/WebKitTest.h: Added. - -2010-01-07 Mike Belshe <mbelshe@chromium.org> - - Reviewed by Darin Adler. - - Fix Spdy casing to match style guide. - - https://bugs.webkit.org/show_bug.cgi?id=33326 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasFetchedViaSPDY): - (WebKit::WebURLResponse::setWasFetchedViaSPDY): - -2010-01-07 Daniel Bates <dbates@rim.com> - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=32987 - - Added ENABLE_XHTMLMP flag. Disabled by default. - - * features.gypi: - -2010-01-07 Adam Barth <abarth@webkit.org> - - No review, rolling out r52847. - http://trac.webkit.org/changeset/52847 - https://bugs.webkit.org/show_bug.cgi?id=33232 - - Might have caused a perf regression. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-01-06 Mike Belshe <mike@belshe.com> - - Add a flag to the ResourceResponse for tracking if a request was - fetched via SPDY. This is plumbed through so that we can inform - a webpage via JavaScript if it was fecthed via the experimental - SPDY protocol. - - https://bugs.webkit.org/show_bug.cgi?id=33186 - - * public/WebURLResponse.h: - * src/WebURLResponse.cpp: - (WebKit::WebURLResponse::wasFetchedViaSpdy): - (WebKit::WebURLResponse::setWasFetchedViaSpdy): - -2010-01-06 Darin Fisher <darin@chromium.org> - - Fix release build bustage. - - * src/WebKit.cpp: Need to include Logging.h - -2010-01-05 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - [Chromium] Expose more APIs to eliminate WebCore usage in Chromium. - https://bugs.webkit.org/show_bug.cgi?id=33249 - - * WebKit.gyp: - * public/WebFrame.h: - * public/WebGlyphCache.h: Added. - * public/WebKit.h: - * src/WebFrameImpl.cpp: - (WebKit::WebFrame::instanceCount): - (WebKit::WebFrameImpl::WebFrameImpl): - (WebKit::WebFrameImpl::~WebFrameImpl): - * src/WebFrameImpl.h: - * src/WebGlyphCache.cpp: Added. - (WebKit::WebGlyphCache::pageCount): - * src/WebKit.cpp: - (WebKit::enableLogChannel): - -2010-01-05 Adam Barth <abarth@webkit.org> - - Reviewed by Dimitri Glazkov. - - [v8] Move V8DOMWindowShell to ScriptController - https://bugs.webkit.org/show_bug.cgi?id=33232 - - Update FrameLoaderClientImpl.cpp to call clearForClose on - ScriptController instead of on V8Proxy. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - -2010-01-05 Rachel Petterson <rlp@google.com> - - Reviewed by Adam Barth. - - Matches the texImage2D and texSubImage2D functions to their - declarations. Elminates uncessary versions of those functions. - https://bugs.webkit.org/show_bug.cgi?id=31562 - Also bug: https://bugs.webkit.org/show_bug.cgi?id=31493 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - -2010-01-04 Maciej Stachowiak <mjs@apple.com> - - Reviewed by Darin Fisher. - - Reorganize, document and rename OS() platform macros. - https://bugs.webkit.org/show_bug.cgi?id=33198 - - Adapt to name changes. - - * src/ChromiumBridge.cpp: - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled): - (WebKit::): - (WebKit::EditorClientImpl::handleEditingKeyboardEvent): - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::createPlugin): - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::makeContextCurrent): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::selectionAsText): - (WebKit::WebFrameImpl::printPage): - * src/WebPluginContainerImpl.cpp: - (WebKit::WebPluginContainerImpl::handleMouseEvent): - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::mouseContextMenu): - (WebKit::WebViewImpl::mouseUp): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::sendContextMenuEvent): - (WebKit::WebViewImpl::setScrollbarColors): - (WebKit::WebViewImpl::navigationPolicyFromMouseEvent): - -2010-01-04 Darin Fisher <darin@chromium.org> - - Reviewed by Eric Seidel. - - [Chromium] Expose more DOM methods to support LayoutTests - https://bugs.webkit.org/show_bug.cgi?id=33185 - - * public/WebDocument.h: Adds documentElement method. - * public/WebElement.h: Adds innerText method. - * public/WebFrame.h: Adds renderTreeAsText and counterValueForElementById - methods, and fixes a few whitespace issues. - * src/WebDocument.cpp: - (WebKit::WebDocument::documentElement): - * src/WebElement.cpp: - (WebKit::WebElement::innerText): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::clearName): - (WebKit::WebFrameImpl::renderTreeAsText): - (WebKit::WebFrameImpl::counterValueForElementById): - * src/WebFrameImpl.h: - -2010-01-04 Darin Fisher <darin@chromium.org> - - Fix Chromium build bustage. - - * src/WebAnimationControllerImpl.h: - -2010-01-04 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Adding WebAnimationController to chromium's WebKit API. - - https://bugs.webkit.org/show_bug.cgi?id=32870 - - * WebKit.gyp: - * public/WebAnimationController.h: Added. - (WebKit::WebAnimationController::~WebAnimationController): - * public/WebFrame.h: - * src/WebAnimationControllerImpl.cpp: Added. - (WebKit::WebAnimationControllerImpl::WebAnimationControllerImpl): - (WebKit::WebAnimationControllerImpl::pauseAnimationAtTime): - (WebKit::WebAnimationControllerImpl::pauseTransitionAtTime): - (WebKit::WebAnimationControllerImpl::numberOfActiveAnimations): - * src/WebAnimationControllerImpl.h: Added. - (WebKit::WebAnimationControllerImpl::~WebAnimationControllerImpl): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::animationController): - (WebKit::WebFrameImpl::WebFrameImpl): - * src/WebFrameImpl.h: - -2010-01-04 Jay Campan <jcampan@google.com> - - Reviewed by Darin Fisher - - Adding more DOM API methods. They are needed for the upcoming - translate feature. - - * public/WebElement.h: - * public/WebNode.h: - * src/WebElement.cpp: - (WebKit::WebElement::tagName): - (WebKit::WebElement::setAttribute): - * src/WebNode.cpp: - (WebKit::WebNode::setNodeValue): - -2010-01-03 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - [Chromium] Implement CookieJarChromium::cookiesEnabled - https://bugs.webkit.org/show_bug.cgi?id=33123 - - Call out to the webKitClient() to see if cookies are enabled. Also - remove some straggling references to policyURL! - - * public/WebKitClient.h: - (WebKit::WebKitClient::setCookies): - (WebKit::WebKitClient::cookies): - (WebKit::WebKitClient::rawCookies): - (WebKit::WebKitClient::cookiesEnabled): - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::cookiesEnabled): - -2010-01-03 Adam Barth <abarth@webkit.org> - - Reviewed by Eric Seidel. - - [Chromium] Remove evaluateInNewContext (it's useless) - https://bugs.webkit.org/show_bug.cgi?id=33068 - - This function has no clients and makes life complicated. Isolated - worlds won out over NewContext and there's not really any going back - now. - - * public/WebFrame.h: - * src/FrameLoaderClientImpl.h: - * src/WebFrameImpl.cpp: - * src/WebFrameImpl.h: - -2009-12-30 Darin Fisher <darin@chromium.org> - - Reviewed by David Levin. - - [Chromium] Delete ResourceRequest::securityInfo - https://bugs.webkit.org/show_bug.cgi?id=26847 - - * src/WebWorkerBase.cpp: - (WebKit::WebWorkerBase::initializeLoader): - -2009-12-30 Albert J. Wong <ajwong@chromium.org> - - Not reviewed. Trivial Chromium build fix. - - Add static_cast<unsigned>() to fix signed/unsigned comparison warning. - - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::selectionChanged): - -2009-12-30 Zelidrag Hornung <zelidrag@chromium.org> - - Reviewed by Dimitri Glazkov. - - Autocomplete in Chromium now offers suggestions within the input element as a user - a) types text that produces some autocomplete suggestions, and - b) scrolls through suggested values in the menu - The suggested value is rendered but not exposed through JS unti the - user makes the final selection. - - No new tests since this new functionality (autocomplete suggestions) - is intentionally hidden from everything else than renderer. - - * src/AutocompletePopupMenuClient.cpp: - (WebKit::AutocompletePopupMenuClient::initialize): - (WebKit::AutocompletePopupMenuClient::setInitialAutocompleteValue): - (WebKit::AutocompletePopupMenuClient::selectionChanged): - (WebKit::AutocompletePopupMenuClient::popupDidHide): - (WebKit::AutocompletePopupMenuClient::setTextFromItem): - (WebKit::AutocompletePopupMenuClient::resetLastFieldValue): - * src/AutocompletePopupMenuClient.h: - -2009-12-28 Kinuko Yasuda <kinuko@chromium.org> - - Reviewed by Maciej Stachowiak. - - Fixed isKeypadEvent behavior for chromium/Mac to correctly report - keyLocation as DOM_KEY_LOCATION_NUMPAD for numeric pad key events. - https://bugs.webkit.org/show_bug.cgi?id=28247 - - Test: fast/events/keydown-numpad-keys.html - - * src/mac/WebInputEventFactory.mm: - (WebKit::isKeypadEvent): - -2009-12-22 Kenneth Russell <kbr@google.com> - - Reviewed by Eric Seidel. - - [Chromium] Garbage in transparent regions of images uploaded as textures - https://bugs.webkit.org/show_bug.cgi?id=32888 - - Test: fast/canvas/webgl/bug-32888.html (works in Safari / DumpRenderTree) - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::texImage2D): - -2009-12-22 Adam Langley <agl@google.com> - - Build fix: not reviewed. - - r52504 (https://bugs.webkit.org/show_bug.cgi?id=32845) broke the - Chromium build on Windows and Mac due to a misplaced #endif. The - buildbot didn't find the problem because it runs on Linux. - - Have verified this patch with the author of the above. - - * src/GraphicsContext3D.cpp: - -2009-12-22 Kenneth Russell <kbr@google.com> - - Reviewed by Eric Seidel. - - [Chromium] WebGL crashes intermittently on Linux - https://bugs.webkit.org/show_bug.cgi?id=32845 - - The dlclose'ing of libGL.so.1 and dlopen'ing of it each time a - GraphicsContext3D was created was occasionally causing it to be - re-mapped at a different base address. Since GLEW is not - re-initialized every time, primarily for performance reasons, its - cached function pointers were pointing to garbage. Stopped closing - and re-opening libGL.so.1 each time; now it is loaded lazily, when - the first 3D context is created. Also reused the X display - connection since the GLX routines' correctness might hinge upon it - not resulting in a change of GL implementation. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GLConnection::chooseFBConfig): - (WebCore::GraphicsContext3DInternal::GLConnection::createNewContext): - (WebCore::GraphicsContext3DInternal::GLConnection::createPbuffer): - (WebCore::GraphicsContext3DInternal::GLConnection::destroyPbuffer): - (WebCore::GraphicsContext3DInternal::GLConnection::makeCurrent): - (WebCore::GraphicsContext3DInternal::GLConnection::destroyContext): - (WebCore::GraphicsContext3DInternal::GLConnection::getCurrentContext): - (WebCore::GraphicsContext3DInternal::GLConnection::GLConnection): - (WebCore::GraphicsContext3DInternal::GLConnection::tryLoad): - (WebCore::GraphicsContext3DInternal::GLConnection::create): - (WebCore::GraphicsContext3DInternal::GLConnection::~GLConnection): - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::makeContextCurrent): - -2009-12-22 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - autoComplete and getElementById methods for WebKit API - - https://bugs.webkit.org/show_bug.cgi?id=32866 - - * public/WebDocument.h: - * public/WebInputElement.h: - * src/WebDocument.cpp: - (WebKit::WebDocument::getElementById): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::autoComplete): - -2009-12-18 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Eliminate redundant data copy in GraphicsContext3D readback - https://bugs.webkit.org/show_bug.cgi?id=32763 - - Eliminated useless creation of a CGBitmapContext and from there a - CGImage. Now create CGImage directly from data. Also changed - readPixels parameters and CGImage alpha info to try to avoid byte - swapping, and disabled interpolation when drawing the GL content. - Some test cases run twice as fast with these changes, though more - work is needed to achieve desired performance. - - No test case; performance optimization only. Ran WebGL demos from - Khronos site to verify changes. - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::beginPaint): - -2009-12-18 Peter Kasting <pkasting@google.com> - - Reviewed by Adam Barth. - - Chromium build fix - https://bugs.webkit.org/show_bug.cgi?id=32756 - - * public/WebAccessibilityRole.h: - (WebKit::): - * src/AssertMatchingEnums.cpp: - -2009-12-18 Adam Roben <aroben@apple.com> - - Chromium build fix - - * src/ChromiumBridge.cpp: - * src/WebPluginContainerImpl.cpp: - * src/WebViewImpl.cpp: - Added #includes. - -2009-12-17 Eric Seidel <eric@webkit.org> - - No review, rolling out r52291. - http://trac.webkit.org/changeset/52291 - https://bugs.webkit.org/show_bug.cgi?id=32618 - - Darin Fisher points out that this will likely break - the SSL security indicator in Chromium. Rolling out for now. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2009-12-17 Alexander Pavlov <apavlov@chromium.org> - - Reviewed by Eric Seidel. - - Disable memory cache client calls so that a new identifier isn't created - for the same resource on reload. - - With the calls enabled, duplicate entries for cached resources are created - in the Web Inspector. Safari for Windows disables the calls near the point of the - Frame instance creation, and we just follow this for Chromium. - https://bugs.webkit.org/show_bug.cgi?id=32618 - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2009-12-17 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Added WebPageSerializer to WebKit API and enriched the WebNode hierarchy to support - downstream unit-testing of serialization. - - WebPageSerializer was adapted from Chromium's dom_serializer, originally authored by Johnny Ding. - - https://bugs.webkit.org/show_bug.cgi?id=31737 - - * WebKit.gyp: - * public/WebDocument.h: Added. - (WebKit::WebDocument::WebDocument): - (WebKit::WebDocument::operator=): - (WebKit::WebDocument::assign): - * public/WebElement.h: - * public/WebFormElement.h: - (WebKit::WebFormElement::operator=): - * public/WebFrame.h: - * public/WebNode.h: - (WebKit::WebNode::): - (WebKit::WebNode::toConstElement): - * public/WebNodeCollection.h: Added. - (WebKit::WebNodeCollection::~WebNodeCollection): - (WebKit::WebNodeCollection::WebNodeCollection): - (WebKit::WebNodeCollection::operator=): - * public/WebNodeList.h: Added. - (WebKit::WebNodeList::~WebNodeList): - (WebKit::WebNodeList::WebNodeList): - (WebKit::WebNodeList::operator=): - * public/WebPageSerializer.h: Added. - * public/WebPageSerializerClient.h: Added. - (WebKit::WebPageSerializerClient::): - (WebKit::WebPageSerializerClient::WebPageSerializerClient): - (WebKit::WebPageSerializerClient::~WebPageSerializerClient): - * public/WebString.h: - * public/WebView.h: - * src/AssertMatchingEnums.cpp: - * src/DOMUtilitiesPrivate.cpp: - (WebKit::elementHasLegalLinkAttribute): - * src/DOMUtilitiesPrivate.h: - * src/WebDocument.cpp: Added. - (WebKit::WebDocument::WebDocument): - (WebKit::WebDocument::operator=): - (WebKit::WebDocument::operator WTF::PassRefPtr<Document>): - (WebKit::WebDocument::frame): - (WebKit::WebDocument::isHTMLDocument): - (WebKit::WebDocument::baseURL): - (WebKit::WebDocument::body): - (WebKit::WebDocument::head): - (WebKit::WebDocument::all): - (WebKit::WebDocument::completeURL): - * src/WebElement.cpp: - (WebKit::WebElement::hasTagName): - (WebKit::WebElement::hasAttribute): - (WebKit::WebElement::getAttribute): - * src/WebEntities.cpp: Added. - (WebKit::populateMap): - (WebKit::): - (WebKit::WebEntities::WebEntities): - (WebKit::WebEntities::entityNameByCode): - (WebKit::WebEntities::convertEntitiesInString): - * src/WebEntities.h: Added. - * src/WebFrameImpl.cpp: - (WebKit::WebFrame::fromFrameOwnerElement): - (WebKit::WebFrameImpl::encoding): - (WebKit::WebFrameImpl::document): - (WebKit::WebFrameImpl::fromFrameOwnerElement): - * src/WebFrameImpl.h: - * src/WebNode.cpp: - (WebKit::WebNode::nodeType): - (WebKit::WebNode::nodeValue): - (WebKit::WebNode::document): - (WebKit::WebNode::firstChild): - (WebKit::WebNode::lastChild): - (WebKit::WebNode::previousSibling): - (WebKit::WebNode::nextSibling): - (WebKit::WebNode::hasChildNodes): - (WebKit::WebNode::childNodes): - (WebKit::WebNode::createMarkup): - (WebKit::WebNode::isTextNode): - (WebKit::WebNode::isElementNode): - * src/WebNodeCollection.cpp: Added. - (WebKit::WebNodeCollection::reset): - (WebKit::WebNodeCollection::assign): - (WebKit::WebNodeCollection::WebNodeCollection): - (WebKit::WebNodeCollection::length): - (WebKit::WebNodeCollection::nextItem): - (WebKit::WebNodeCollection::firstItem): - * src/WebNodeList.cpp: Added. - (WebKit::WebNodeList::reset): - (WebKit::WebNodeList::assign): - (WebKit::WebNodeList::WebNodeList): - (WebKit::WebNodeList::length): - (WebKit::WebNodeList::item): - * src/WebPageSerializer.cpp: Added. - (WebKit::WebPageSerializer::serialize): - (WebKit::WebPageSerializer::generateMetaCharsetDeclaration): - (WebKit::WebPageSerializer::generateMarkOfTheWebDeclaration): - (WebKit::WebPageSerializer::generateBaseTagDeclaration): - * src/WebPageSerializerImpl.cpp: Added. - (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam): - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag): - (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag): - (WebKit::WebPageSerializerImpl::preActionBeforeSerializeEndTag): - (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag): - (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer): - (WebKit::WebPageSerializerImpl::openTagToString): - (WebKit::WebPageSerializerImpl::endTagToString): - (WebKit::WebPageSerializerImpl::buildContentForNode): - (WebKit::WebPageSerializerImpl::WebPageSerializerImpl): - (WebKit::WebPageSerializerImpl::collectTargetFrames): - (WebKit::WebPageSerializerImpl::serialize): - * src/WebPageSerializerImpl.h: Added. - * src/WebString.cpp: - (WebKit::WebString::WebString): - (WebKit::WebString::operator=): - * src/WebViewImpl.cpp: - -2009-12-17 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by David Levin. - - Provide explicit implementation of 'non-template' WebVector<T>::operator= - - https://bugs.webkit.org/show_bug.cgi?id=32363 - - * public/WebVector.h: - -2009-12-16 Fumitoshi Ukai <ukai@chromium.org> - - Unreviewed, build fix. - - [Chromium] Add EditableTextRole to catch up with - http://trac.webkit.org/changeset/52233 - - * public/WebAccessibilityRole.h: - (WebKit::): Added WebAccessibilityRoleEditableText - * src/AssertMatchingEnums.cpp: Added matching compile assert. - -2009-12-15 Kenneth Russell <kbr@google.com> - - Reviewed by Darin Fisher. - - Don't allow default framebuffer to be mutated - https://bugs.webkit.org/show_bug.cgi?id=32391 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::bindFramebuffer): - (WebCore::GraphicsContext3D::bindFramebuffer): - -2009-12-15 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - [Chromium] Add TreeGridRole to catch up with - http://trac.webkit.org/changeset/52159. - - * public/WebAccessibilityRole.h: - (WebKit::): Added WebAccessibilityRoleTreeGrid. - * src/AssertMatchingEnums.cpp: Added matching compile assert. - -2009-12-15 Jian Li <jianli@chromium.org> - - Reviewed by Dmitry Titov. - - Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard. - https://bugs.webkit.org/show_bug.cgi?id=31090 - - The proposal to whatwg can be found here: - http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html - - * public/WebDragData.h: - * src/WebDragData.cpp: - (WebKit::WebDragData::downloadURL): - (WebKit::WebDragData::setDownloadURL): - -2009-12-14 Evan Stade <estade@chromium.org> - - Reviewed by Darin Fisher. - - https://bugs.webkit.org/show_bug.cgi?id=32347 - Chromium: Context menu launched by menu key has funky behavior - - Make the context menu's position depend on the selection only when an - editable field has focus. Also, don't send multiple context menu events - for a single keypress. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::sendContextMenuEvent): - -2009-12-13 Sam Weinig <sam@webkit.org> - - Reviewed by Dan Bernstein. - - Fix for https://bugs.webkit.org/show_bug.cgi?id=32499 - Add client based Geolocation provider - - Add first cut of a client based Geolocation provider. This is guarded by - ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a - GeolocationControllerClient interface that no-one currently implements, - but will in a subsequent patch. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::WebViewImpl): - -2009-12-13 Charles Reis <creis@chromium.org> - - Reviewed by Adam Barth. - - Refactor some security code out of V8 bindings - https://bugs.webkit.org/show_bug.cgi?id=32326 - - * src/WebBindings.cpp: - (WebKit::getDragDataImpl): - -2009-12-11 Nate Chapin <japhet@chromium.org> - - Reviewed by Darin Fisher. - - Expose shouldHideReferrer() in WebSecurityPolicy. - - https://bugs.webkit.org/show_bug.cgi?id=32398 - - * public/WebSecurityPolicy.h: Add shouldHideReferrer(). - * src/WebSecurityPolicy.cpp: - (WebKit:: WebSecurityPolicy::shouldHideReferrer): Added. - -2009-12-11 Avi Drissman <avi@chromium.org> - - Reviewed by Darin Fisher. - - Tickmarks in the scrollbar are not cleared for non-main frames - https://bugs.webkit.org/show_bug.cgi?id=32385 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::stopFinding): - -2009-12-11 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Remove obsolete message handling methods from WebDevTools* interfaces - - https://bugs.webkit.org/show_bug.cgi?id=32320 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - * public/WebDevToolsFrontend.h: - * public/WebDevToolsFrontendClient.h: - -2009-12-10 Mike Belshe <mike@belshe.com> - - Unreviewed, build fix for chromium. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest): - -2009-12-10 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Changed WebGLRenderingContext to synthesize GL errors rather than - raising JavaScript exceptions. Removed internal getError() calls - after each graphics call. The GraphicsContext3D maintains the - synthetic exceptions because only it has complete information - about certain conditions requiring them to be raised. - - Based on idea from Ilmari Heikkinen, added create3DDebugContext() - to webgl-test.js and changed the WebGL layout tests expecting - error conditions to use it. Updated expected.txt files, which now - implicitly test the OpenGL error as it is part of the exception's - message. - - Added new targeted test covering aspects of synthetic errors as - well as regression tests for bugs uncovered during its development. - - Test: fast/canvas/webgl/error-reporting.html - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::getError): - (WebCore::GraphicsContext3DInternal::synthesizeGLError): - (WebCore::GraphicsContext3D::getActiveAttrib): - (WebCore::GraphicsContext3D::getActiveUniform): - (WebCore::GraphicsContext3D::getError): - (WebCore::GraphicsContext3D::synthesizeGLError): - -2009-12-10 Mike Belshe <mike@belshe.com> - - Reviewed by Darin Fisher. - - Fix FrameLoader to use the new ResourceTypes properly. - - https://bugs.webkit.org/show_bug.cgi?id=32336 - - * public/WebURLRequest.h: - (WebKit::WebURLRequest::): - * src/FrameLoaderClientImpl.cpp: - (WebKit::setTargetTypeFromLoader): - (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest): - -2009-12-10 Ilya Tikhonovsky <loislo@google.com> - - Reviewed by Pavel Feldman. - - Chromium: Expose devtools agent API for inspector layout tests. - - https://bugs.webkit.org/show_bug.cgi?id=32379 - - * public/WebDevToolsAgent.h: - (WebKit::WebDevToolsAgent::setTimelineProfilingEnabled): - (WebKit::WebDevToolsAgent::evaluateInWebInspector): - -2009-12-09 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed, build fix. - - Change forward declaration of WebContextMenuData from class to - struct to match its definition. The bug was introduced by - http://trac.webkit.org/changeset/51874 - - * src/ContextMenuClientImpl.h: - -2009-12-09 Darin Fisher <darin@chromium.org> - - Reviewed by Eric Seidel. - - https://bugs.webkit.org/show_bug.cgi?id=32324 - [Chromium] Suppress WebFrameClient callbacks from a detached frame. - - This change means that we no longer need the ClientHandle class. - FrameLoaderClient::detachedFromParent3() is called on each frame - in the frame tree from within frameDetached(). - - Test: http/tests/loading/gmail-assert-on-load.html - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::create): - (WebKit::WebFrameImpl::WebFrameImpl): - (WebKit::WebFrameImpl::createChildFrame): - * src/WebFrameImpl.h: - (WebKit::WebFrameImpl::client): - (WebKit::WebFrameImpl::dropClient): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::close): - -2009-12-08 Stuart Morgan <stuartmorgan@chromium.org> - - Reviewed by Darin Fisher. - - Include clickCount when doing MouseEvent -> WebMouseEvent conversion - in Chromium API. - - https://bugs.webkit.org/show_bug.cgi?id=32289 - - * src/WebInputEventConversion.cpp: - (WebKit::WebMouseEventBuilder::WebMouseEventBuilder): - -2009-12-09 Yury Semikhatsky <yurys@chromium.org> - - Unreviewed, build fix. - - Add return statement to default implementation of hostIdentifier method - introduced in http://trac.webkit.org/changeset/51897 - - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::hostIdentifier): - -2009-12-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Add declaration of static methods that allow to dispatch - DevTools messages on the IO thread and accept WebDevToolsMessageData - argument. - - https://bugs.webkit.org/show_bug.cgi?id=32314 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - -2009-12-09 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Introduce a class for devtools message data - - https://bugs.webkit.org/show_bug.cgi?id=32314 - - * WebKit.gyp: - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - (WebKit::WebDevToolsAgentClient::sendMessageToFrontend): - (WebKit::WebDevToolsAgentClient::forceRepaint): - (WebKit::WebDevToolsAgentClient::hostIdentifier): - (WebKit::WebDevToolsAgentClient::runtimeFeatureStateChanged): - * public/WebDevToolsFrontend.h: - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::sendMessageToAgent): - * public/WebDevToolsMessageData.h: Added. - -2009-12-08 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Darin Fisher. - - Chromium: support custom WebCore context menu items in Chromium port. - - https://bugs.webkit.org/show_bug.cgi?id=32277 - - * public/WebContextMenuData.h: - * public/WebPopupMenuInfo.h: - (WebKit::WebPopupMenuInfo::Item::): - * public/WebView.h: - * src/ContextMenuClientImpl.cpp: - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::executeCustomContextMenuAction): - * src/WebViewImpl.h: - -2009-12-08 Albert J. Wong <ajwong@chromium.org> - - Not reviewed: Chromium build fix. - - r51859 changed the case for some of the ResourceRequest::TargetType - enums. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::determineTargetTypeFromLoader): - -2009-12-07 Zhe Su <suzhe@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] accesskey is not supported on Chromium Mac. - https://bugs.webkit.org/show_bug.cgi?id=32213 - - This change fixes (partially) the accesskey issue by decoupling the - code for handling accesskeys and system keys. Because on Mac, - the modifiers of accesskeys are ctrl+alt, which are not marked as - system keys. - In order to fully fix this issue, some changes in Chromium code is - also required. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::charEvent): - -2009-12-07 Evan Martin <evan@chromium.org> - - Reviewed by Eric Seidel. - - Chromium: theme scrollbars to match GTK theme. - Add API to set the colors. - - Since the change is to the Chromium WebKit API layer, testing will - be in Chromium's test shell. - http://bugs.webkit.org/show_bug.cgi?id=32048 - - Patch from Markus Gutschke <markus@chromium.org>. - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setScrollbarColors): - * src/WebViewImpl.h: - -2009-12-07 Finnur Thorarinsson <finnur.webkit@gmail.com> - - Reviewed by Darin Fisher. - - A patch for Chromium to restrict the scope of the Gmail focus fix, - where we set the Selection to 0,0 for content-editable fields and - also make sure we set the selection end-state for find to select the - text found (when not focusing a link we found). - WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=32248 - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection): - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::setFocus): - -2009-12-07 Dmitry Titov <dimich@chromium.org> - - Rubber-stamped by Darin Adler. - - Remove ENABLE_SHARED_SCRIPT flags - https://bugs.webkit.org/show_bug.cgi?id=32245 - This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. - - * features.gypi: - -2009-12-07 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - fixes to build-webkit --chromium - https://bugs.webkit.org/show_bug.cgi?id=32179 - - * DEPS: - * WebKit.gyp: - * gyp_webkit: - -2009-12-07 Mikhail Naganov <mnaganov@chromium.org> - - Reviewed by Pavel Feldman. - - [Chromium] Add declarations for DevTools message dispatching on IO thread - (see http://codereview.chromium.org/460018) - - https://bugs.webkit.org/show_bug.cgi?id=32217 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsAgentClient.h: - -2009-12-04 James Hawkins <jhawkins@chromium.org> - - Reviewed by Darin Fisher. - - https://bugs.webkit.org/show_bug.cgi?id=32095 - Implement WebRegularExpression, a WebKit API for accessing - WebCore::RegularExpression. - - * WebKit.gyp: - * public/WebRegularExpression.h: Added. - * public/WebTextCaseSensitivity.h: Added. - (WebKit::): - * src/AssertMatchingEnums.cpp: - * src/WebRegularExpression.cpp: Added. - (WebKit::WebRegularExpression::WebRegularExpression): - (WebKit::WebRegularExpression::~WebRegularExpression): - (WebKit::WebRegularExpression::match): - -2009-12-04 Peter Kasting <pkasting@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Simplify zoom-related APIs and add a zoom level getter, - part two: Remove deprecated APIs. - https://bugs.webkit.org/show_bug.cgi?id=31893 - - * public/WebView.h: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - -2009-12-03 Jonathan Dixon <joth@chromium.org> - - Reviewed by Dimitri Glazkov. - - Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium - https://bugs.webkit.org/show_bug.cgi?id=32066 - - Add the plumbing to map WebSettings through to WebCore::Settings - - * features.gypi: - * public/WebSettings.h: Add setGeolocationEnabled API to interface - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setGeolocationEnabled): Calls through to WebCore::Settings::setGeolocationEnabled - * src/WebSettingsImpl.h: Add setGeolocationEnabled interface function - -2009-12-03 Brady Eidson <beidson@apple.com> - - Reviewed by Sam Weinig. - - <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidPushStateWithinPage): - (WebKit::FrameLoaderClientImpl::dispatchDidReplaceStateWithinPage): - (WebKit::FrameLoaderClientImpl::dispatchDidPopStateWithinPage): - * src/FrameLoaderClientImpl.h: - -2009-12-03 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Timothy Hatcher. - - Chromium: Add support for settings containing ":" - - https://bugs.webkit.org/show_bug.cgi?id=32118 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::loadSettings): - -2009-12-03 Pavel Feldman <pfeldman@dhcp-172-28-174-220.spb.corp.google.com> - - Reviewed by Timothy Hatcher. - - Web Inspector: Simplify the settings support in inspector controller. - - https://bugs.webkit.org/show_bug.cgi?id=32076 - - * src/InspectorClientImpl.cpp: - (WebKit::InspectorClientImpl::hiddenPanels): - (WebKit::InspectorClientImpl::populateSetting): - (WebKit::InspectorClientImpl::storeSetting): - (WebKit::InspectorClientImpl::loadSettings): - (WebKit::InspectorClientImpl::saveSettings): - * src/InspectorClientImpl.h: - -2009-12-03 Ben Murdoch <benm@google.com> - - Reviewed by Brady Eidson. - - [Android] The FrameLoaderClient is unaware of BackForwardList changes. - https://bugs.webkit.org/show_bug.cgi?id=31914 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). - (WebKit::FrameLoaderClientImpl::dispatchDidRemoveBackForwardItem): ditto. - (WebKit::FrameLoaderClientImpl::dispatchDidChangeBackForwardIndex): dito. - * src/FrameLoaderClientImpl.h: - -2009-12-02 Yusuke Sato <yusukes@chromium.org> - - Reviewed by Eric Seidel. - - Sanitize web fonts using the OTS library - https://bugs.webkit.org/show_bug.cgi?id=31106 - - * DEPS: Added dependency to the OpenType sanitizer library. - * features.gypi: Added ENABLE_OPENTYPE_SANITIZER=1. - -2009-12-02 Evan Stade <estade@chromium.org> - - Reviewed by Darin Fisher. - - https://bugs.webkit.org/show_bug.cgi?id=32029 - Mousewheel event delta has reversed sign on Linux Chrome. - - No new tests (layout tests don't cover event conversion code). - Manual test: http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel - - * src/gtk/WebInputEventFactory.cpp: - (WebKit::WebInputEventFactory::mouseWheelEvent): - -2009-12-02 Anton Muhin <antonm@chromium.org> - - Reviewed by Adam Barth. - - Allow to skip thread checks when accessing DOMDataStore for processes - which run V8 in single thread mode. - https://bugs.webkit.org/show_bug.cgi?id=31877 - - * src/WebScriptController.cpp: - (WebKit::WebScriptController::enableV8SingleThreadMode): - -2009-12-01 Peter Kasting <pkasting@google.com> - - Reviewed by Darin Fisher. - - [Chromium] Simplify zoom-related APIs and add a zoom level getter, - part one: Add new APIs. (Old APIs will be removed in a second pass.) - https://bugs.webkit.org/show_bug.cgi?id=31893 - - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::zoomLevel): - (WebKit::WebViewImpl::setZoomLevel): - * src/WebViewImpl.h: - -2009-12-01 Xiyuan Xia <xiyuan@chromium.org> - - Reviewed by Darin Fisher. - - Only fire start/stop events when main frame is not loading. - - https://bugs.webkit.org/show_bug.cgi?id=31838 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - -2009-11-27 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - Add separate method for pause command to WebDevToolsAgent - and WebDevToolsFrontendClient interfaces so that pause command - can be processed on the IO thread. - - https://bugs.webkit.org/show_bug.cgi?id=31934 - - * public/WebDevToolsAgent.h: - * public/WebDevToolsFrontendClient.h: - (WebKit::WebDevToolsFrontendClient::sendDebuggerCommandToAgent): - (WebKit::WebDevToolsFrontendClient::sendDebuggerPauseScript): - (WebKit::WebDevToolsFrontendClient::activateWindow): - (WebKit::WebDevToolsFrontendClient::closeWindow): - (WebKit::WebDevToolsFrontendClient::dockWindow): - (WebKit::WebDevToolsFrontendClient::undockWindow): - -2009-11-27 Yury Semikhatsky <yurys@chromium.org> - - Reviewed by Pavel Feldman. - - WebCore part of the fix that allows to view plugin - resources loaded by plugins. Methods that for resource - loading notifications are exposed through WebDevToolsAgent - interface to the glue code to allow Chromium's plugin - implementation to notify InspectorController about resource - loading in plugins. - - https://bugs.webkit.org/show_bug.cgi?id=31832 - - * public/WebDevToolsAgent.h: - * public/WebView.h: - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::createUniqueIdentifierForRequest): - * src/WebViewImpl.h: - -2009-11-26 Yury Semikhatsky <yurys@chromium.org> - - Not reviewed. Build fix: revert r51421. - - * public/WebDevToolsAgent.h: - * public/WebView.h: - * src/WebViewImpl.cpp: - * src/WebViewImpl.h: - -2009-11-25 Dimitri Glazkov <dglazkov@chromium.org> - - Reviewed by David Levin. - - [Chromium] Implement canSetValueAttribute in the API. - https://bugs.webkit.org/show_bug.cgi?id=31894 - - * public/WebAccessibilityObject.h: Added decl. - * src/WebAccessibilityCacheImpl.h: Cleaned up mis-include. - * src/WebAccessibilityObject.cpp: - (WebKit::WebAccessibilityObject::canSetValueAttribute): Added impl. - -2009-11-25 Dimitri Glazkov <dglazkov@chromium.org> - - Reviewed by Darin Fisher. - - [Chromium] Plumb setNeedsSiteSpecificQuirks throught WebKit API. - https://bugs.webkit.org/show_bug.cgi?id=31878 - - * public/WebSettings.h: Added decl. - * src/WebSettingsImpl.cpp: - (WebKit::WebSettingsImpl::setNeedsSiteSpecificQuirks): Added impl. - * src/WebSettingsImpl.h: - -2009-11-24 Dmitry Titov <dimich@chromium.org> - - Reviewed by Eric Seidel. - - Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit - https://bugs.webkit.org/show_bug.cgi?id=31444 - - * features.gypi: - -2009-11-24 Evan Stade <estade@chromium.org> - - Reviewed by David Levin. - - Linux Chromium sends too many click events - https://bugs.webkit.org/show_bug.cgi?id=31841 - - Manually count number of clicks for double/triple click events. This - makes us match Firefox on http://www.quirksmode.org/js/events_mouse.html - Chromium side of this patch is here: - http://codereview.chromium.org/431031/show - - * src/gtk/WebInputEventFactory.cpp: - (WebKit::WebInputEventFactory::mouseEvent): - -2009-11-24 Darin Fisher <darin@chromium.org> - - Reviewed by Adam Barth. - - [Chromium] Renderer hang when using www.expedia.com - https://bugs.webkit.org/show_bug.cgi?id=31822 - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest): - Assign ReturnCacheDataDontLoad cache policy at the last moment - to match Safari. This way the cache policy does not get stored - in DocumentLoader's originalRequest preventing it from being - inherited by subresource requests. - * src/ResourceHandle.cpp: - (WebCore::ResourceHandle::willLoadFromCache): Remove assignment - of ReturnCacheDataDontLoad cache policy so that it doesn't end - up applying to the DocumentLoader's originalRequest. - -2009-11-23 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Change get... calls to latest spec - https://bugs.webkit.org/show_bug.cgi?id=30091 - - Removed old versions of get calls on WebGLRenderingContext and - added new ones per spec returning "any". New code simplifies - GraphicsContext3D and fixes previously unimplemented routines. - Added custom JS and V8 bindings. Added exhaustive test case - exercising all new code paths. Updated preexisting test cases for - new APIs. Fixed preexisting bugs in WebKit's and Chrome's WebGL - implementations. - - Ran WebGL layout tests in WebKit (clean) and Chrome (couple of - preexisting known failures) and manual WebGL tests in both - browsers. - - Test: fast/canvas/webgl/gl-object-get-calls.html - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::createFramebuffer): - (WebCore::GraphicsContext3D::createRenderbuffer): - (WebCore::GraphicsContext3D::deleteFramebuffer): - (WebCore::GraphicsContext3D::deleteRenderbuffer): - (WebCore::GraphicsContext3D::checkFramebufferStatus): - (WebCore::GraphicsContext3D::getBooleanv): - (WebCore::GraphicsContext3D::getBufferParameteriv): - (WebCore::GraphicsContext3D::getFloatv): - (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): - (WebCore::GraphicsContext3D::getIntegerv): - (WebCore::GraphicsContext3D::getProgramiv): - (WebCore::GraphicsContext3D::getRenderbufferParameteriv): - (WebCore::GraphicsContext3D::getShaderiv): - (WebCore::GraphicsContext3D::getTexParameterfv): - (WebCore::GraphicsContext3D::getTexParameteriv): - (WebCore::GraphicsContext3D::getUniformfv): - (WebCore::GraphicsContext3D::getUniformiv): - (WebCore::GraphicsContext3D::getVertexAttribfv): - (WebCore::GraphicsContext3D::getVertexAttribiv): - (WebCore::GraphicsContext3D::isFramebuffer): - (WebCore::GraphicsContext3D::isRenderbuffer): - -2009-11-24 Pavel Feldman <pfeldman@chromium.org> - - Reviewed by Darin Fisher. - - Chromium: Expose method for reporting user stats - to the host. Also includes drive-by default implementation. - - https://bugs.webkit.org/show_bug.cgi?id=31830 - - * public/WebKitClient.h: - -2009-11-24 Adam Barth <abarth@webkit.org> - - Reviewed by Dimitri Glazkov. - - [Chromium] Fix DOM storage layout tests - https://bugs.webkit.org/show_bug.cgi?id=31833 - - The issue is, essentially, that this code assumes that - SecurityOrigin::createString can re-create a SecurityOrigin given - the string produced from SecurityOrigin::toString. This is a bogus - assumption in a number of corner cases (e.g., document.domain, - @sandbox). A recent patch (http://trac.webkit.org/changeset/51294) - make this assumption further invalid in the case of of file:// URLs. - - The correct fix is for this code to use WebSecurityOrigin objects - (and not strings) to represent SecurityOrigin objects. However, the - expert on this code is on vacation, and I don't want to do major - surgery here without his involvement. This patch is a temporary fix - to get these tests passing again. We'll do the right fix once - jorlow gets back from vacation. - - Tests: Covered by a number of existing DOM storage tests. - - * src/WebStorageNamespaceImpl.cpp: - (WebKit::WebStorageNamespaceImpl::createStorageArea): - -2009-11-23 Jian Li <jianli@chromium.org> - - Reviewed by NOBODY (Chromium build fix). - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::createShader): - -2009-11-20 Jian Li <jianli@chromium.org> - - Not reviewed. Fix chromium build. - - * public/WebAccessibilityRole.h: - (WebKit::): - * src/AssertMatchingEnums.cpp: - -2009-11-19 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Darin Fisher. - - Make chromium/webkit/glue/FormFieldValues use the WebKit API - - https://bugs.webkit.org/show_bug.cgi?id=31650 - - * public/WebElement.h: - * public/WebFormElement.h: - * public/WebInputElement.h: - (WebKit::WebInputElement::): - * public/WebNode.h: - * src/AssertMatchingEnums.cpp: - * src/DOMUtilitiesPrivate.cpp: - (WebKit::nameOfInputElement): - * src/DOMUtilitiesPrivate.h: - * src/EditorClientImpl.cpp: - (WebKit::EditorClientImpl::autofill): - (WebKit::EditorClientImpl::doAutofill): - * src/WebFormElement.cpp: - (WebKit::WebFormElement::name): - (WebKit::WebFormElement::method): - (WebKit::WebFormElement::getNamedElements): - (WebKit::WebFormElement::getInputElements): - * src/WebInputElement.cpp: - (WebKit::WebInputElement::isEnabledFormControl): - (WebKit::WebInputElement::inputType): - (WebKit::WebInputElement::formControlType): - (WebKit::WebInputElement::value): - (WebKit::WebInputElement::dispatchFormControlChangeEvent): - (WebKit::WebInputElement::setSelectionRange): - (WebKit::WebInputElement::name): - (WebKit::WebInputElement::nameForAutofill): - * src/WebNode.cpp: - (WebKit::WebNode::frame): - -2009-11-18 Michelangelo De Simone <micdesim@gmail.com> - - Reviewed by Darin Adler. - - Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>. - Support for validationMessage attribute, as per HTML5 specs. - - * src/LocalizedStrings.cpp: - (WebCore::validationMessageValueMissingText): - (WebCore::validationMessageTypeMismatchText): - (WebCore::validationMessagePatternMismatchText): - (WebCore::validationMessageTooLongText): - (WebCore::validationMessageRangeUnderflowText): - (WebCore::validationMessageRangeOverflowText): - (WebCore::validationMessageStepMismatchText): - -2009-11-18 Nate Chapin <japhet@chromium.org> - - Reviewed by Darin Fisher. - - Remove Chromium port's dependency on some dummy pthreads header - files that live in the Chromium repository. - - https://bugs.webkit.org/show_bug.cgi?id=31648 - - * DEPS: Remove reference to chromium svn's webkit/build/ directory. - -2009-11-18 Evan Stade <estade@chromium.org> - - Reviewed by Darin Fisher. - - Menu button shows wrong content in Chromium - https://bugs.webkit.org/show_bug.cgi?id=31448 - - Make context menu button (VK_APPS) show context menu for node that has - keyboard focus. This affects both the content and the positioning. - - * src/WebViewImpl.cpp: - (WebKit::WebViewImpl::sendContextMenuEvent): - -2009-11-17 Darin Fisher <darin@chromium.org> - - Reviewed by Dmitry Titov. - - Minor cleanup in WebKit API - https://bugs.webkit.org/show_bug.cgi?id=31616 - - * public/WebFormElement.h: Add missing WEBKIT_API prefix. - * public/WebNode.h: Add missing WEBKIT_API prefix. - * src/WebFormElement.cpp: - (WebKit::WebFormElement::action): Make action getter const. - * src/WebNode.cpp: - (WebKit::WebNode::frame): Utilize WebFrameImpl::fromFrame. - -2009-11-17 Nicolas Weber <thakis@chromium.org> - - Reviewed by Darin Fisher, Dmitry Titov. - - Revert r50887, it regressed handling of cmd-left when a text box is focused. - https://bugs.webkit.org/show_bug.cgi?id=31566 - - * src/mac/WebInputEventFactory.mm: - (WebKit::WebInputEventFactory::keyboardEvent): - -2009-11-16 Kenneth Russell <kbr@google.com> - - Reviewed by Oliver Hunt. - - Update API of WebGLArray and friends - https://bugs.webkit.org/show_bug.cgi?id=31175 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3D::bufferData): - (WebCore::GraphicsContext3D::bufferSubData): - -2009-11-15 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - Correct an error in the previous commit - - * public/WebAccessibilityRole.h: It should be WebAccessibilityRoleDirectory, - not WebAccessibilityDirectoryRole. - -2009-11-15 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - Bring WebAccessibilityRole up to sync after - http://trac.webkit.org/changeset/51007. - - * public/WebAccessibilityRole.h: Added WebAccessibilityRoleDirectory. - * src/AssertMatchingEnums.cpp: Added a match between DirectoryRole and - WebAccessibilityRoleDirectory. - -2009-11-13 Dimitri Glazkov <dglazkov@chromium.org> - - Unreviewed, build fix. - - [Chromium] Rename windowObjectCleared to dispatchDidClearWindowObjectInWorld - to catch up http://trac.webkit.org/changeset/50973. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld): - * src/FrameLoaderClientImpl.h: - -2009-11-13 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Chromium WebKit Port to compile as dynamic lib - - https://bugs.webkit.org/show_bug.cgi?id=31478 - - * WebKit.gyp: - -2009-11-13 Aaron Boodman <aa@chromium.org> - - Reviewed by Eric Seidel. - - Adds a way to get the document element's scrollHeight, - which is sort of the moral equivalent to - RenderBox::minPrefWidth(). - - https://bugs.webkit.org/show_bug.cgi?id=31036 - - * public/WebFrame.h: Declare documentElementScrollHeight() - * src/WebFrameImpl.h: Ditto - * src/WebFrameImpl.cpp: Implement documentElementScrollHeight() - (WebKit::WebFrameImpl::documentElementScrollHeight): Return the - scroll height of the document element, or zero if there's no - documentElement. - -2009-11-12 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Dimitri Glazkov. - - Adding Chromium's DatabaseTracker implementation. - - https://bugs.webkit.org/show_bug.cgi?id=31440 - - * WebKit.gyp: - * src/ChromeClientImpl.cpp: - (WebKit::ChromeClientImpl::exceededDatabaseQuota): - * src/DatabaseObserver.cpp: Added. - (WebCore::DatabaseObserver::databaseOpened): - (WebCore::DatabaseObserver::databaseModified): - (WebCore::DatabaseObserver::databaseClosed): - * src/WebDatabase.cpp: - (WebKit::WebDatabase::name): - (WebKit::WebDatabase::displayName): - (WebKit::WebDatabase::estimatedSize): - (WebKit::WebDatabase::securityOrigin): - (WebKit::WebDatabase::updateDatabaseSize): - * src/WebSecurityOrigin.cpp: - (WebKit::WebSecurityOrigin::toString): - (WebKit::WebSecurityOrigin::databaseIdentifier): - -2009-11-13 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Rolling Chromium dependencies to match Chromium revision 31834. - - https://bugs.webkit.org/show_bug.cgi?id=31445 - - * DEPS: - -2009-11-12 Dumitru Daniliuc <dumi@chromium.org> - - Reviewed by Dimitri Glazkov. - - Renaming some parameters passed to DB-related methods to better - indicate their purpose. - - https://bugs.webkit.org/show_bug.cgi?id=31449 - - * public/WebKitClient.h: - * src/ChromiumBridge.cpp: - (WebCore::ChromiumBridge::databaseOpenFile): - (WebCore::ChromiumBridge::databaseDeleteFile): - (WebCore::ChromiumBridge::databaseGetFileAttributes): - (WebCore::ChromiumBridge::databaseGetFileSize): - -2009-11-12 Adam Barth <abarth> - - Reviewed by Dimitri Glazkov. - - [Chromium] reload-subframe-object.html fails - https://bugs.webkit.org/show_bug.cgi?id=31398 - - More closely match FrameLoaderClient.mm. Turns out we don't want to - use MIMETypeRegistry::getMIMETypeForPath because we can't distinguish - between application/octet-stream and lack of knowledge of the MIME - type. - - Covered by reload-subframe-object.html. - - * src/FrameLoaderClientImpl.cpp: - (WebKit::FrameLoaderClientImpl::objectContentType): - -2009-11-12 Nate Chapin <japhet@chromium.org> - - Unreviewed, Chromium build fix. - - Add new accessibility enum values to Chromium enums from - http://trac.webkit.org/changeset/50865 and - http://trac.webkit.org/changeset/50883. - - https://bugs.webkit.org/show_bug.cgi?id=31424 - - * public/WebAccessibilityRole.h: - (WebKit::): - * src/AssertMatchingEnums.cpp: - -2009-11-12 Nicolas Weber <thakis@chromium.org> - - Reviewed by Dimitri Glazkov. - - Send |keypress()| events for keys with cmd down, like safari. - Test: Hit cmd-shift-a on unixpapa.com/js/testkey.html , should show a - keypress() event. - - * src/mac/WebInputEventFactory.mm: - (WebKit::WebInputEventFactory::keyboardEvent): - -2009-11-11 Jeremy Orlow <jorlow@chromium.org> - - Not reviewed. Build fix. Will be cleaned up in subsequent patch once we know exaclty what's going on. - - * src/WebBindings.cpp: - -2009-11-11 Drew Wilson <atwilson@chromium.org> - - Reviewed by Dimitri Glazkov. - - SharedWorkerRepository.connect() does not call WebSharedWorkerRepository - https://bugs.webkit.org/show_bug.cgi?id=31371 - - Test: Unit tests can be enabled downstream when this lands. - - * src/SharedWorkerRepository.cpp: - (WebCore::SharedWorkerRepository::connect): - Added missing call to WebSharedWorkerRepository.addSharedWorker(). - -2009-11-11 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Tiny path fixes in Chromium API includes. - - https://bugs.webkit.org/show_bug.cgi?id=31369 - - * public/linux/WebSandboxSupport.h: Fixed path. - * src/WebBindings.cpp: Fixed path. - -2009-11-11 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - http://trac.webkit.org/changeset/50811 removed some methods from - platform/network/SocketStreamHandleClient.h, so remove them - here too. - - https://bugs.webkit.org/show_bug.cgi?id=31360 - - * public/WebSocketStreamHandleClient.h: - * src/SocketStreamHandle.cpp: - (WebCore::SocketStreamHandleInternal::send): - -2009-11-11 Nate Chapin <japhet@chromium.org> - - Reviewed by Eric Seidel. - - Remove some additional references to dragSourceMovedTo() not - needed after http://trac.webkit.org/changeset/50786. - - https://bugs.webkit.org/show_bug.cgi?id=31354 - - * public/WebView.h: - * src/WebViewImpl.h: - -2009-11-11 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Remove WebViewImpl::dragSourceMovedTo(), as it is no longer - needed after http://trac.webkit.org/changeset/50786. - - https://bugs.webkit.org/show_bug.cgi?id=31354 - - * src/WebViewImpl.cpp: - -2009-11-10 Nate Chapin <japhet@chromium.org> - - Unreviewed, Chromium build fix for http://trac.webkit.org/changeset/50760. - - * src/WebFrameImpl.cpp: - (WebKit::WebFrameImpl::paint): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Modified WebKit.gyp to build the webkit api. - - https://bugs.webkit.org/show_bug.cgi?id=31320 - - * README: Added. - * WebKit.gyp: Added. - * webkit.gyp: Removed. - -2009-11-10 Nate Chapin <japhet@chromium.org> - - Reviewed by Eric Seidel. - - Update references to Canvas 3D classes to use the WebGL prefix - introduced in http://trac.webkit.org/changeset/50725. - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/GraphicsContext3D.cpp: - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::bindBuffer): - (WebCore::GraphicsContext3DInternal::bindTexture): - (WebCore::GraphicsContext3D::beginPaint): - (WebCore::GraphicsContext3D::bindAttribLocation): - (WebCore::GraphicsContext3D::bindBuffer): - (WebCore::GraphicsContext3D::bindTexture): - (WebCore::GraphicsContext3D::bufferData): - (WebCore::GraphicsContext3D::bufferSubData): - (WebCore::GraphicsContext3D::detachShader): - (WebCore::GraphicsContext3D::getActiveAttrib): - (WebCore::GraphicsContext3D::getActiveUniform): - (WebCore::GraphicsContext3D::getAttribLocation): - (WebCore::GraphicsContext3D::getBooleanv): - (WebCore::GraphicsContext3D::getBufferParameteriv): - (WebCore::GraphicsContext3D::getFloatv): - (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): - (WebCore::GraphicsContext3D::getIntegerv): - (WebCore::GraphicsContext3D::getProgrami): - (WebCore::GraphicsContext3D::getProgramiv): - (WebCore::GraphicsContext3D::getProgramInfoLog): - (WebCore::GraphicsContext3D::getRenderbufferParameteriv): - (WebCore::GraphicsContext3D::getShaderi): - (WebCore::GraphicsContext3D::getShaderiv): - (WebCore::GraphicsContext3D::getShaderInfoLog): - (WebCore::GraphicsContext3D::getShaderSource): - (WebCore::GraphicsContext3D::getTexParameterfv): - (WebCore::GraphicsContext3D::getTexParameteriv): - (WebCore::GraphicsContext3D::getUniformf): - (WebCore::GraphicsContext3D::getUniformfv): - (WebCore::GraphicsContext3D::getUniformi): - (WebCore::GraphicsContext3D::getUniformiv): - (WebCore::GraphicsContext3D::getUniformLocation): - (WebCore::GraphicsContext3D::getVertexAttribfv): - (WebCore::GraphicsContext3D::getVertexAttribiv): - (WebCore::GraphicsContext3D::isBuffer): - (WebCore::GraphicsContext3D::isFramebuffer): - (WebCore::GraphicsContext3D::isProgram): - (WebCore::GraphicsContext3D::isRenderbuffer): - (WebCore::GraphicsContext3D::isShader): - (WebCore::GraphicsContext3D::isTexture): - (WebCore::GraphicsContext3D::readPixels): - (WebCore::GraphicsContext3D::shaderSource): - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::GraphicsContext3D::texSubImage2D): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebWorker and friends. - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebWorkerBase.cpp: Added. - (WebKit::WorkerWebFrameClient::didCreateDataSource): - (WebKit::WorkerWebFrameClient::sharedInstance): - (WebKit::WorkerWebFrameClient::WorkerWebFrameClient): - (WebKit::initializeWebKitStaticValues): - (WebKit::WebWorkerBase::WebWorkerBase): - (WebKit::WebWorkerBase::~WebWorkerBase): - (WebKit::WebWorkerBase::stopWorkerThread): - (WebKit::WebWorkerBase::initializeLoader): - (WebKit::WebWorkerBase::dispatchTaskToMainThread): - (WebKit::WebWorkerBase::invokeTaskMethod): - (WebKit::WebWorkerBase::postMessageToWorkerObject): - (WebKit::WebWorkerBase::postMessageTask): - (WebKit::WebWorkerBase::postExceptionToWorkerObject): - (WebKit::WebWorkerBase::postExceptionTask): - (WebKit::WebWorkerBase::postConsoleMessageToWorkerObject): - (WebKit::WebWorkerBase::postConsoleMessageTask): - (WebKit::WebWorkerBase::confirmMessageFromWorkerObject): - (WebKit::WebWorkerBase::confirmMessageTask): - (WebKit::WebWorkerBase::reportPendingActivity): - (WebKit::WebWorkerBase::reportPendingActivityTask): - (WebKit::WebWorkerBase::workerContextClosed): - (WebKit::WebWorkerBase::workerContextClosedTask): - (WebKit::WebWorkerBase::workerContextDestroyed): - (WebKit::WebWorkerBase::workerContextDestroyedTask): - (WebKit::WebWorkerBase::postTaskToLoader): - (WebKit::WebWorkerBase::postTaskForModeToWorkerContext): - * src/WebWorkerBase.h: Added. - (WebKit::WebWorkerBase::setWorkerThread): - (WebKit::WebWorkerBase::workerThread): - * src/WebWorkerClientImpl.cpp: Added. - (WebKit::WebWorkerClientImpl::createWorkerContextProxy): - (WebKit::WebWorkerClientImpl::WebWorkerClientImpl): - (WebKit::WebWorkerClientImpl::~WebWorkerClientImpl): - (WebKit::WebWorkerClientImpl::setWebWorker): - (WebKit::WebWorkerClientImpl::startWorkerContext): - (WebKit::WebWorkerClientImpl::terminateWorkerContext): - (WebKit::WebWorkerClientImpl::postMessageToWorkerContext): - (WebKit::WebWorkerClientImpl::hasPendingActivity): - (WebKit::WebWorkerClientImpl::workerObjectDestroyed): - (WebKit::WebWorkerClientImpl::postMessageToWorkerObject): - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject): - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject): - (WebKit::WebWorkerClientImpl::confirmMessageFromWorkerObject): - (WebKit::WebWorkerClientImpl::reportPendingActivity): - (WebKit::WebWorkerClientImpl::workerContextDestroyed): - (WebKit::WebWorkerClientImpl::workerContextClosed): - (WebKit::WebWorkerClientImpl::startWorkerContextTask): - (WebKit::WebWorkerClientImpl::terminateWorkerContextTask): - (WebKit::WebWorkerClientImpl::postMessageToWorkerContextTask): - (WebKit::WebWorkerClientImpl::workerObjectDestroyedTask): - (WebKit::WebWorkerClientImpl::postMessageToWorkerObjectTask): - (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask): - (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask): - (WebKit::WebWorkerClientImpl::confirmMessageFromWorkerObjectTask): - (WebKit::WebWorkerClientImpl::reportPendingActivityTask): - * src/WebWorkerClientImpl.h: Added. - (WebKit::WebWorkerClientImpl::createWorker): - (WebKit::WebWorkerClientImpl::notificationPresenter): - * src/WebWorkerImpl.cpp: Added. - (WebKit::WebWorker::create): - (WebKit::WebWorkerImpl::WebWorkerImpl): - (WebKit::WebWorkerImpl::~WebWorkerImpl): - (WebKit::WebWorkerImpl::commonClient): - (WebKit::WebWorkerImpl::postMessageToWorkerContextTask): - (WebKit::WebWorkerImpl::startWorkerContext): - (WebKit::WebWorkerImpl::terminateWorkerContext): - (WebKit::WebWorkerImpl::postMessageToWorkerContext): - (WebKit::WebWorkerImpl::workerObjectDestroyed): - (WebKit::WebWorkerImpl::clientDestroyed): - * src/WebWorkerImpl.h: Added. - (WebKit::WebWorkerImpl::client): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: Platform specific files. - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/gtk/WebFontInfo.cpp: Added. - (WebKit::WebFontInfo::familyForChars): - * src/gtk/WebInputEventFactory.cpp: Added. - (WebKit::gdkEventTimeToWebEventTime): - (WebKit::gdkStateToWebEventModifiers): - (WebKit::gdkEventToWindowsKeyCode): - (WebKit::getControlCharacter): - (WebKit::WebInputEventFactory::keyboardEvent): - (WebKit::WebInputEventFactory::mouseEvent): - (WebKit::WebInputEventFactory::mouseWheelEvent): - * src/gtk/WebScreenInfoFactory.cpp: Added. - (WebKit::WebScreenInfoFactory::screenInfo): - * src/linux/WebFontRendering.cpp: Added. - (WebKit::WebFontRendering::setHinting): - (WebKit::WebFontRendering::setAntiAlias): - (WebKit::WebFontRendering::setSubpixelGlyphs): - (WebKit::WebFontRendering::setLCDOrder): - (WebKit::WebFontRendering::setLCDOrientation): - * src/mac/WebInputEventFactory.mm: Added. - (WebKit::isKeyUpEvent): - (WebKit::isKeypadEvent): - (WebKit::windowsKeyCodeForKeyEvent): - (WebKit::textFromEvent): - (WebKit::unmodifiedTextFromEvent): - (WebKit::keyIdentifierForKeyEvent): - (WebKit::modifiersFromEvent): - (WebKit::WebInputEventFactory::keyboardEvent): - (WebKit::WebInputEventFactory::mouseEvent): - (WebKit::WebInputEventFactory::mouseWheelEvent): - * src/mac/WebScreenInfoFactory.mm: Added. - (WebKit::screenForWindow): - (WebKit::toUserSpace): - (WebKit::WebScreenInfoFactory::screenInfo): - * src/win/WebInputEventFactory.cpp: Added. - (WebKit::isKeyPad): - (WebKit::WebInputEventFactory::keyboardEvent): - (WebKit::GetRelativeCursorPos): - (WebKit::WebInputEventFactory::resetLastClickState): - (WebKit::WebInputEventFactory::mouseEvent): - (WebKit::WebInputEventFactory::mouseWheelEvent): - * src/win/WebScreenInfoFactory.cpp: Added. - (WebKit::toWebRect): - (WebKit::WebScreenInfoFactory::screenInfo): - * src/x11/WebScreenInfoFactory.cpp: Added. - (WebKit::WebScreenInfoFactory::screenInfo): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Eric Seidel. - - Up-streaming Chromium API src files: WrapperResourceRequest and Response - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WrappedResourceRequest.h: Added. - (WebKit::WrappedResourceRequest::~WrappedResourceRequest): - (WebKit::WrappedResourceRequest::WrappedResourceRequest): - (WebKit::WrappedResourceRequest::bind): - (WebKit::WrappedResourceRequest::Handle::dispose): - * src/WrappedResourceResponse.h: Added. - (WebKit::WrappedResourceResponse::~WrappedResourceResponse): - (WebKit::WrappedResourceResponse::WrappedResourceResponse): - (WebKit::WrappedResourceResponse::bind): - (WebKit::WrappedResourceResponse::Handle::dispose): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: StorageStreamHandlers...StorageNamespaceProxy - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/SocketStreamHandle.cpp: Added. - (WebCore::SocketStreamHandleInternal::create): - (WebCore::SocketStreamHandleInternal::SocketStreamHandleInternal): - (WebCore::SocketStreamHandleInternal::~SocketStreamHandleInternal): - (WebCore::SocketStreamHandleInternal::connect): - (WebCore::SocketStreamHandleInternal::send): - (WebCore::SocketStreamHandleInternal::close): - (WebCore::SocketStreamHandleInternal::willOpenStream): - (WebCore::SocketStreamHandleInternal::didOpenStream): - (WebCore::SocketStreamHandleInternal::didSendData): - (WebCore::SocketStreamHandleInternal::didReceiveData): - (WebCore::SocketStreamHandleInternal::didClose): - (WebCore::SocketStreamHandleInternal::didFail): - (WebCore::SocketStreamHandle::SocketStreamHandle): - (WebCore::SocketStreamHandle::~SocketStreamHandle): - (WebCore::SocketStreamHandle::platformSend): - (WebCore::SocketStreamHandle::platformClose): - (WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): - (WebCore::SocketStreamHandle::receivedCredential): - (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): - (WebCore::SocketStreamHandle::receivedCancellation): - * src/StorageAreaProxy.cpp: Added. - (WebCore::StorageAreaProxy::StorageAreaProxy): - (WebCore::StorageAreaProxy::~StorageAreaProxy): - (WebCore::StorageAreaProxy::length): - (WebCore::StorageAreaProxy::key): - (WebCore::StorageAreaProxy::getItem): - (WebCore::StorageAreaProxy::setItem): - (WebCore::StorageAreaProxy::removeItem): - (WebCore::StorageAreaProxy::clear): - (WebCore::StorageAreaProxy::contains): - * src/StorageAreaProxy.h: Added. - * src/StorageEventDispatcherChromium.cpp: Added. - (WebCore::StorageEventDispatcher::dispatch): - * src/StorageEventDispatcherImpl.cpp: Added. - (WebCore::StorageEventDispatcherImpl::StorageEventDispatcherImpl): - (WebCore::StorageEventDispatcherImpl::dispatchStorageEvent): - * src/StorageEventDispatcherImpl.h: Added. - * src/StorageNamespaceProxy.cpp: Added. - (WebCore::StorageNamespace::localStorageNamespace): - (WebCore::StorageNamespace::sessionStorageNamespace): - (WebCore::StorageNamespaceProxy::StorageNamespaceProxy): - (WebCore::StorageNamespaceProxy::~StorageNamespaceProxy): - (WebCore::StorageNamespaceProxy::copy): - (WebCore::StorageNamespaceProxy::storageArea): - (WebCore::StorageNamespaceProxy::close): - (WebCore::StorageNamespaceProxy::unlock): - * src/StorageNamespaceProxy.h: Added. - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: NotificationPresenterImpl...SharedWorkerRepository - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/NotificationPresenterImpl.cpp: Added. - (WebKit::VoidCallbackClient::VoidCallbackClient): - (WebKit::VoidCallbackClient::permissionRequestComplete): - (WebKit::NotificationPresenterImpl::initialize): - (WebKit::NotificationPresenterImpl::isInitialized): - (WebKit::NotificationPresenterImpl::show): - (WebKit::NotificationPresenterImpl::cancel): - (WebKit::NotificationPresenterImpl::notificationObjectDestroyed): - (WebKit::NotificationPresenterImpl::checkPermission): - (WebKit::NotificationPresenterImpl::requestPermission): - * src/NotificationPresenterImpl.h: Added. - (WebKit::NotificationPresenterImpl::NotificationPresenterImpl): - * src/PlatformMessagePortChannel.cpp: Added. - (WebCore::MessagePortChannel::create): - (WebCore::MessagePortChannel::createChannel): - (WebCore::MessagePortChannel::MessagePortChannel): - (WebCore::MessagePortChannel::~MessagePortChannel): - (WebCore::MessagePortChannel::entangleIfOpen): - (WebCore::MessagePortChannel::disentangle): - (WebCore::MessagePortChannel::postMessageToRemote): - (WebCore::MessagePortChannel::tryGetMessageFromRemote): - (WebCore::MessagePortChannel::close): - (WebCore::MessagePortChannel::isConnectedTo): - (WebCore::MessagePortChannel::hasPendingActivity): - (WebCore::MessagePortChannel::locallyEntangledPort): - (WebCore::PlatformMessagePortChannel::create): - (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel): - (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel): - (WebCore::PlatformMessagePortChannel::createChannel): - (WebCore::PlatformMessagePortChannel::messageAvailable): - (WebCore::PlatformMessagePortChannel::entangleIfOpen): - (WebCore::PlatformMessagePortChannel::disentangle): - (WebCore::PlatformMessagePortChannel::postMessageToRemote): - (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote): - (WebCore::PlatformMessagePortChannel::close): - (WebCore::PlatformMessagePortChannel::isConnectedTo): - (WebCore::PlatformMessagePortChannel::hasPendingActivity): - (WebCore::PlatformMessagePortChannel::setEntangledChannel): - (WebCore::PlatformMessagePortChannel::webChannelRelease): - * src/PlatformMessagePortChannel.h: Added. - * src/ResourceHandle.cpp: Added. - (WebCore::ResourceHandleInternal::ResourceHandleInternal): - (WebCore::ResourceHandleInternal::start): - (WebCore::ResourceHandleInternal::cancel): - (WebCore::ResourceHandleInternal::setDefersLoading): - (WebCore::ResourceHandleInternal::allowStoredCredentials): - (WebCore::ResourceHandleInternal::willSendRequest): - (WebCore::ResourceHandleInternal::didSendData): - (WebCore::ResourceHandleInternal::didReceiveResponse): - (WebCore::ResourceHandleInternal::didReceiveData): - (WebCore::ResourceHandleInternal::didFinishLoading): - (WebCore::ResourceHandleInternal::didFail): - (WebCore::ResourceHandle::ResourceHandle): - (WebCore::ResourceHandle::create): - (WebCore::ResourceHandle::request): - (WebCore::ResourceHandle::client): - (WebCore::ResourceHandle::setClient): - (WebCore::ResourceHandle::setDefersLoading): - (WebCore::ResourceHandle::start): - (WebCore::ResourceHandle::clearAuthentication): - (WebCore::ResourceHandle::cancel): - (WebCore::ResourceHandle::~ResourceHandle): - (WebCore::ResourceHandle::bufferedData): - (WebCore::ResourceHandle::loadsBlocked): - (WebCore::ResourceHandle::supportsBufferedData): - (WebCore::ResourceHandle::loadResourceSynchronously): - (WebCore::ResourceHandle::willLoadFromCache): - * src/SharedWorkerRepository.cpp: Added. - (WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader): - (WebCore::SharedWorkerScriptLoader::load): - (WebCore::getWebPort): - (WebCore::SharedWorkerScriptLoader::notifyFinished): - (WebCore::SharedWorkerScriptLoader::sendConnect): - (WebCore::SharedWorkerScriptLoader::contextDestroyed): - (WebCore::SharedWorkerScriptLoader::connected): - (WebCore::SharedWorkerRepository::isAvailable): - (WebCore::getId): - (WebCore::SharedWorkerRepository::connect): - (WebCore::SharedWorkerRepository::documentDetached): - (WebCore::SharedWorkerRepository::hasSharedWorkers): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: GraphicContext3D...MediaPlaterPrivateChromium - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/GraphicsContext3D.cpp: Added. - (WebCore::GraphicsContext3DInternal::): - (WebCore::GraphicsContext3DInternal::VertexAttribPointerState::VertexAttribPointerState): - (WebCore::tryLoad): - (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): - (WebCore::GraphicsContext3DInternal::checkError): - (WebCore::GraphicsContext3DInternal::makeContextCurrent): - (WebCore::GraphicsContext3DInternal::platformGraphicsContext3D): - (WebCore::GraphicsContext3DInternal::platformTexture): - (WebCore::createTextureObject): - (WebCore::GraphicsContext3DInternal::reshape): - (WebCore::GraphicsContext3DInternal::flipVertically): - (WebCore::GraphicsContext3DInternal::beginPaint): - (WebCore::GraphicsContext3DInternal::validateTextureTarget): - (WebCore::GraphicsContext3DInternal::validateTextureParameter): - (WebCore::GraphicsContext3DInternal::activeTexture): - (WebCore::GraphicsContext3DInternal::bindBuffer): - (WebCore::GraphicsContext3DInternal::bindTexture): - (WebCore::GraphicsContext3DInternal::bufferDataImpl): - (WebCore::GraphicsContext3DInternal::disableVertexAttribArray): - (WebCore::GraphicsContext3DInternal::enableVertexAttribArray): - (WebCore::GraphicsContext3DInternal::vertexAttribPointer): - (WebCore::GraphicsContext3DInternal::viewportImpl): - (WebCore::GraphicsContext3D::create): - (WebCore::GraphicsContext3D::GraphicsContext3D): - (WebCore::GraphicsContext3D::~GraphicsContext3D): - (WebCore::GraphicsContext3D::platformGraphicsContext3D): - (WebCore::GraphicsContext3D::platformTexture): - (WebCore::GraphicsContext3D::checkError): - (WebCore::GraphicsContext3D::makeContextCurrent): - (WebCore::GraphicsContext3D::reshape): - (WebCore::GraphicsContext3D::beginPaint): - (WebCore::GraphicsContext3D::endPaint): - (WebCore::GraphicsContext3D::sizeInBytes): - (WebCore::GraphicsContext3D::createBuffer): - (WebCore::GraphicsContext3D::createFramebuffer): - (WebCore::GraphicsContext3D::createProgram): - (WebCore::GraphicsContext3D::createRenderbuffer): - (WebCore::GraphicsContext3D::createShader): - (WebCore::GraphicsContext3D::createTexture): - (WebCore::GraphicsContext3D::deleteBuffer): - (WebCore::GraphicsContext3D::deleteFramebuffer): - (WebCore::GraphicsContext3D::deleteProgram): - (WebCore::GraphicsContext3D::deleteRenderbuffer): - (WebCore::GraphicsContext3D::deleteShader): - (WebCore::GraphicsContext3D::deleteTexture): - (WebCore::GraphicsContext3D::activeTexture): - (WebCore::GraphicsContext3D::bindAttribLocation): - (WebCore::GraphicsContext3D::bindBuffer): - (WebCore::GraphicsContext3D::bindTexture): - (WebCore::GraphicsContext3D::bufferData): - (WebCore::GraphicsContext3D::bufferSubData): - (WebCore::GraphicsContext3D::checkFramebufferStatus): - (WebCore::GraphicsContext3D::detachShader): - (WebCore::GraphicsContext3D::disableVertexAttribArray): - (WebCore::GraphicsContext3D::drawArrays): - (WebCore::GraphicsContext3D::drawElements): - (WebCore::GraphicsContext3D::enableVertexAttribArray): - (WebCore::GraphicsContext3D::generateMipmap): - (WebCore::GraphicsContext3D::getActiveAttrib): - (WebCore::GraphicsContext3D::getActiveUniform): - (WebCore::GraphicsContext3D::getAttribLocation): - (WebCore::GraphicsContext3D::getBoolean): - (WebCore::GraphicsContext3D::getBooleanv): - (WebCore::GraphicsContext3D::getBufferParameteri): - (WebCore::GraphicsContext3D::getBufferParameteriv): - (WebCore::GraphicsContext3D::getError): - (WebCore::GraphicsContext3D::getFloat): - (WebCore::GraphicsContext3D::getFloatv): - (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteri): - (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): - (WebCore::GraphicsContext3D::getInteger): - (WebCore::GraphicsContext3D::getIntegerv): - (WebCore::GraphicsContext3D::getProgrami): - (WebCore::GraphicsContext3D::getProgramiv): - (WebCore::GraphicsContext3D::getProgramInfoLog): - (WebCore::GraphicsContext3D::getRenderbufferParameteri): - (WebCore::GraphicsContext3D::getRenderbufferParameteriv): - (WebCore::GraphicsContext3D::getShaderi): - (WebCore::GraphicsContext3D::getShaderiv): - (WebCore::GraphicsContext3D::getShaderInfoLog): - (WebCore::GraphicsContext3D::getShaderSource): - (WebCore::GraphicsContext3D::getString): - (WebCore::GraphicsContext3D::getTexParameterf): - (WebCore::GraphicsContext3D::getTexParameterfv): - (WebCore::GraphicsContext3D::getTexParameteri): - (WebCore::GraphicsContext3D::getTexParameteriv): - (WebCore::GraphicsContext3D::getUniformf): - (WebCore::GraphicsContext3D::getUniformfv): - (WebCore::GraphicsContext3D::getUniformi): - (WebCore::GraphicsContext3D::getUniformiv): - (WebCore::GraphicsContext3D::getUniformLocation): - (WebCore::GraphicsContext3D::getVertexAttribf): - (WebCore::GraphicsContext3D::getVertexAttribfv): - (WebCore::GraphicsContext3D::getVertexAttribi): - (WebCore::GraphicsContext3D::getVertexAttribiv): - (WebCore::GraphicsContext3D::getVertexAttribOffset): - (WebCore::GraphicsContext3D::isBuffer): - (WebCore::GraphicsContext3D::isEnabled): - (WebCore::GraphicsContext3D::isFramebuffer): - (WebCore::GraphicsContext3D::isProgram): - (WebCore::GraphicsContext3D::isRenderbuffer): - (WebCore::GraphicsContext3D::isShader): - (WebCore::GraphicsContext3D::isTexture): - (WebCore::GraphicsContext3D::pixelStorei): - (WebCore::GraphicsContext3D::readPixels): - (WebCore::GraphicsContext3D::releaseShaderCompiler): - (WebCore::GraphicsContext3D::shaderSource): - (WebCore::GraphicsContext3D::texImage2D): - (WebCore::unmultiplyAlpha): - (WebCore::texImage2DHelper): - (WebCore::GraphicsContext3D::texSubImage2D): - (WebCore::GraphicsContext3D::uniform1fv): - (WebCore::GraphicsContext3D::uniform1iv): - (WebCore::GraphicsContext3D::uniform2fv): - (WebCore::GraphicsContext3D::uniform2iv): - (WebCore::GraphicsContext3D::uniform3fv): - (WebCore::GraphicsContext3D::uniform3iv): - (WebCore::GraphicsContext3D::uniform4fv): - (WebCore::GraphicsContext3D::uniform4iv): - (WebCore::GraphicsContext3D::uniformMatrix2fv): - (WebCore::GraphicsContext3D::uniformMatrix3fv): - (WebCore::GraphicsContext3D::uniformMatrix4fv): - (WebCore::GraphicsContext3D::vertexAttrib1fv): - (WebCore::GraphicsContext3D::vertexAttrib2fv): - (WebCore::GraphicsContext3D::vertexAttrib3fv): - (WebCore::GraphicsContext3D::vertexAttrib4fv): - (WebCore::GraphicsContext3D::vertexAttribPointer): - (WebCore::GraphicsContext3D::viewport): - * src/InspectorClientImpl.cpp: Added. - (WebKit::InspectorClientImpl::InspectorClientImpl): - (WebKit::InspectorClientImpl::~InspectorClientImpl): - (WebKit::InspectorClientImpl::inspectorDestroyed): - (WebKit::InspectorClientImpl::createPage): - (WebKit::InspectorClientImpl::showWindow): - (WebKit::InspectorClientImpl::closeWindow): - (WebKit::InspectorClientImpl::windowVisible): - (WebKit::InspectorClientImpl::attachWindow): - (WebKit::InspectorClientImpl::detachWindow): - (WebKit::InspectorClientImpl::setAttachedWindowHeight): - (WebKit::invalidateNodeBoundingRect): - (WebKit::InspectorClientImpl::highlight): - (WebKit::InspectorClientImpl::hideHighlight): - (WebKit::InspectorClientImpl::inspectedURLChanged): - (WebKit::InspectorClientImpl::localizedStringsURL): - (WebKit::InspectorClientImpl::hiddenPanels): - (WebKit::InspectorClientImpl::populateSetting): - (WebKit::InspectorClientImpl::storeSetting): - (WebKit::InspectorClientImpl::removeSetting): - (WebKit::InspectorClientImpl::inspectorWindowObjectCleared): - (WebKit::InspectorClientImpl::loadSettings): - (WebKit::InspectorClientImpl::saveSettings): - * src/InspectorClientImpl.h: Added. - * src/LocalizedStrings.cpp: Added. - (WebCore::query): - (WebCore::searchableIndexIntroduction): - (WebCore::submitButtonDefaultLabel): - (WebCore::inputElementAltText): - (WebCore::resetButtonDefaultLabel): - (WebCore::fileButtonChooseFileLabel): - (WebCore::fileButtonNoFileSelectedLabel): - (WebCore::searchMenuNoRecentSearchesText): - (WebCore::searchMenuRecentSearchesText): - (WebCore::searchMenuClearRecentSearchesText): - (WebCore::AXWebAreaText): - (WebCore::AXLinkText): - (WebCore::AXListMarkerText): - (WebCore::AXImageMapText): - (WebCore::AXHeadingText): - (WebCore::AXDefinitionListTermText): - (WebCore::AXDefinitionListDefinitionText): - (WebCore::AXButtonActionVerb): - (WebCore::AXRadioButtonActionVerb): - (WebCore::AXTextFieldActionVerb): - (WebCore::AXCheckedCheckBoxActionVerb): - (WebCore::AXUncheckedCheckBoxActionVerb): - (WebCore::AXLinkActionVerb): - (WebCore::multipleFileUploadText): - (WebCore::unknownFileSizeText): - (WebCore::keygenMenuHighGradeKeySize): - (WebCore::keygenMenuMediumGradeKeySize): - (WebCore::imageTitle): - (WebCore::contextMenuItemTagOpenLinkInNewWindow): - (WebCore::contextMenuItemTagDownloadLinkToDisk): - (WebCore::contextMenuItemTagCopyLinkToClipboard): - (WebCore::contextMenuItemTagOpenImageInNewWindow): - (WebCore::contextMenuItemTagDownloadImageToDisk): - (WebCore::contextMenuItemTagCopyImageToClipboard): - (WebCore::contextMenuItemTagOpenFrameInNewWindow): - (WebCore::contextMenuItemTagCopy): - (WebCore::contextMenuItemTagGoBack): - (WebCore::contextMenuItemTagGoForward): - (WebCore::contextMenuItemTagStop): - (WebCore::contextMenuItemTagReload): - (WebCore::contextMenuItemTagCut): - (WebCore::contextMenuItemTagPaste): - (WebCore::contextMenuItemTagNoGuessesFound): - (WebCore::contextMenuItemTagIgnoreSpelling): - (WebCore::contextMenuItemTagLearnSpelling): - (WebCore::contextMenuItemTagSearchWeb): - (WebCore::contextMenuItemTagLookUpInDictionary): - (WebCore::contextMenuItemTagOpenLink): - (WebCore::contextMenuItemTagIgnoreGrammar): - (WebCore::contextMenuItemTagSpellingMenu): - (WebCore::contextMenuItemTagCheckSpelling): - (WebCore::contextMenuItemTagCheckSpellingWhileTyping): - (WebCore::contextMenuItemTagCheckGrammarWithSpelling): - (WebCore::contextMenuItemTagFontMenu): - (WebCore::contextMenuItemTagBold): - (WebCore::contextMenuItemTagItalic): - (WebCore::contextMenuItemTagUnderline): - (WebCore::contextMenuItemTagOutline): - (WebCore::contextMenuItemTagWritingDirectionMenu): - (WebCore::contextMenuItemTagTextDirectionMenu): - (WebCore::contextMenuItemTagDefaultDirection): - (WebCore::contextMenuItemTagLeftToRight): - (WebCore::contextMenuItemTagRightToLeft): - (WebCore::contextMenuItemTagInspectElement): - (WebCore::contextMenuItemTagShowSpellingPanel): - (WebCore::mediaElementLiveBroadcastStateText): - (WebCore::mediaElementLoadingStateText): - (WebCore::localizedMediaControlElementString): - (WebCore::localizedMediaControlElementHelpText): - (WebCore::localizedMediaTimeDescription): - * src/MediaPlayerPrivateChromium.cpp: Added. - (WebCore::MediaPlayerPrivate::registerMediaEngine): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: DOMUtilities...FrameLoaderClientImpl - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/DOMUtilitiesPrivate.cpp: Added. - (WebCore::toHTMLElement): - (WebKit::toHTMLInputElement): - (WebKit::toHTMLLinkElement): - (WebKit::toHTMLMetaElement): - (WebKit::toHTMLOptionElement): - (WebKit::nameOfInputElement): - * src/DOMUtilitiesPrivate.h: Added. - * src/DragClientImpl.cpp: Added. - (WebKit::DragClientImpl::willPerformDragDestinationAction): - (WebKit::DragClientImpl::willPerformDragSourceAction): - (WebKit::DragClientImpl::actionMaskForDrag): - (WebKit::DragClientImpl::dragSourceActionMaskForPoint): - (WebKit::DragClientImpl::startDrag): - (WebKit::DragClientImpl::createDragImageForLink): - (WebKit::DragClientImpl::dragControllerDestroyed): - * src/DragClientImpl.h: Added. - (WebKit::DragClientImpl::DragClientImpl): - * src/EditorClientImpl.cpp: Added. - (WebKit::EditorClientImpl::EditorClientImpl): - (WebKit::EditorClientImpl::~EditorClientImpl): - (WebKit::EditorClientImpl::pageDestroyed): - (WebKit::EditorClientImpl::shouldShowDeleteInterface): - (WebKit::EditorClientImpl::smartInsertDeleteEnabled): - (WebKit::EditorClientImpl::isSelectTrailingWhitespaceEnabled): - (WebKit::EditorClientImpl::shouldSpellcheckByDefault): - (WebKit::EditorClientImpl::isContinuousSpellCheckingEnabled): - (WebKit::EditorClientImpl::toggleContinuousSpellChecking): - (WebKit::EditorClientImpl::isGrammarCheckingEnabled): - (WebKit::EditorClientImpl::toggleGrammarChecking): - (WebKit::EditorClientImpl::spellCheckerDocumentTag): - (WebKit::EditorClientImpl::isEditable): - (WebKit::EditorClientImpl::shouldBeginEditing): - (WebKit::EditorClientImpl::shouldEndEditing): - (WebKit::EditorClientImpl::shouldInsertNode): - (WebKit::EditorClientImpl::shouldInsertText): - (WebKit::EditorClientImpl::shouldDeleteRange): - (WebKit::EditorClientImpl::shouldChangeSelectedRange): - (WebKit::EditorClientImpl::shouldApplyStyle): - (WebKit::EditorClientImpl::shouldMoveRangeAfterDelete): - (WebKit::EditorClientImpl::didBeginEditing): - (WebKit::EditorClientImpl::respondToChangedSelection): - (WebKit::EditorClientImpl::respondToChangedContents): - (WebKit::EditorClientImpl::didEndEditing): - (WebKit::EditorClientImpl::didWriteSelectionToPasteboard): - (WebKit::EditorClientImpl::didSetSelectionTypesForPasteboard): - (WebKit::EditorClientImpl::registerCommandForUndo): - (WebKit::EditorClientImpl::registerCommandForRedo): - (WebKit::EditorClientImpl::clearUndoRedoOperations): - (WebKit::EditorClientImpl::canUndo): - (WebKit::EditorClientImpl::canRedo): - (WebKit::EditorClientImpl::undo): - (WebKit::EditorClientImpl::redo): - (WebKit::): - (WebKit::EditorClientImpl::interpretKeyEvent): - (WebKit::EditorClientImpl::handleEditingKeyboardEvent): - (WebKit::EditorClientImpl::handleKeyboardEvent): - (WebKit::EditorClientImpl::handleInputMethodKeydown): - (WebKit::EditorClientImpl::textFieldDidBeginEditing): - (WebKit::EditorClientImpl::textFieldDidEndEditing): - (WebKit::EditorClientImpl::textDidChangeInTextField): - (WebKit::EditorClientImpl::showFormAutofillForNode): - (WebKit::EditorClientImpl::autofill): - (WebKit::EditorClientImpl::doAutofill): - (WebKit::EditorClientImpl::cancelPendingAutofill): - (WebKit::EditorClientImpl::onAutofillSuggestionAccepted): - (WebKit::EditorClientImpl::doTextFieldCommandFromEvent): - (WebKit::EditorClientImpl::textWillBeDeletedInTextField): - (WebKit::EditorClientImpl::textDidChangeInTextArea): - (WebKit::EditorClientImpl::ignoreWordInSpellDocument): - (WebKit::EditorClientImpl::learnWord): - (WebKit::EditorClientImpl::checkSpellingOfString): - (WebKit::EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord): - (WebKit::EditorClientImpl::checkGrammarOfString): - (WebKit::EditorClientImpl::updateSpellingUIWithGrammarString): - (WebKit::EditorClientImpl::updateSpellingUIWithMisspelledWord): - (WebKit::EditorClientImpl::showSpellingUI): - (WebKit::EditorClientImpl::spellingUIIsShowing): - (WebKit::EditorClientImpl::getGuessesForWord): - (WebKit::EditorClientImpl::setInputMethodState): - * src/EditorClientImpl.h: Added. - (WebKit::EditorClientImpl::): - * src/FrameLoaderClientImpl.cpp: Added. - (WebKit::): - (WebKit::FrameLoaderClientImpl::FrameLoaderClientImpl): - (WebKit::FrameLoaderClientImpl::~FrameLoaderClientImpl): - (WebKit::FrameLoaderClientImpl::frameLoaderDestroyed): - (WebKit::FrameLoaderClientImpl::windowObjectCleared): - (WebKit::FrameLoaderClientImpl::documentElementAvailable): - (WebKit::FrameLoaderClientImpl::didCreateScriptContextForFrame): - (WebKit::FrameLoaderClientImpl::didDestroyScriptContextForFrame): - (WebKit::FrameLoaderClientImpl::didCreateIsolatedScriptContext): - (WebKit::FrameLoaderClientImpl::didPerformFirstNavigation): - (WebKit::FrameLoaderClientImpl::registerForIconNotification): - (WebKit::FrameLoaderClientImpl::didChangeScrollOffset): - (WebKit::FrameLoaderClientImpl::allowJavaScript): - (WebKit::FrameLoaderClientImpl::hasWebView): - (WebKit::FrameLoaderClientImpl::hasFrameView): - (WebKit::FrameLoaderClientImpl::makeDocumentView): - (WebKit::FrameLoaderClientImpl::makeRepresentation): - (WebKit::FrameLoaderClientImpl::forceLayout): - (WebKit::FrameLoaderClientImpl::forceLayoutForNonHTML): - (WebKit::FrameLoaderClientImpl::setCopiesOnScroll): - (WebKit::FrameLoaderClientImpl::detachedFromParent2): - (WebKit::FrameLoaderClientImpl::detachedFromParent3): - (WebKit::FrameLoaderClientImpl::assignIdentifierToInitialRequest): - (WebKit::determineTargetTypeFromLoader): - (WebKit::FrameLoaderClientImpl::dispatchWillSendRequest): - (WebKit::FrameLoaderClientImpl::shouldUseCredentialStorage): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveAuthenticationChallenge): - (WebKit::FrameLoaderClientImpl::dispatchDidCancelAuthenticationChallenge): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveResponse): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveContentLength): - (WebKit::FrameLoaderClientImpl::dispatchDidFinishLoading): - (WebKit::FrameLoaderClientImpl::dispatchDidFailLoading): - (WebKit::FrameLoaderClientImpl::dispatchDidFinishDocumentLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidLoadResourceFromMemoryCache): - (WebKit::FrameLoaderClientImpl::dispatchDidLoadResourceByXMLHttpRequest): - (WebKit::FrameLoaderClientImpl::dispatchDidHandleOnloadEvents): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveServerRedirectForProvisionalLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidCancelClientRedirect): - (WebKit::FrameLoaderClientImpl::dispatchWillPerformClientRedirect): - (WebKit::FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage): - (WebKit::FrameLoaderClientImpl::dispatchWillClose): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveIcon): - (WebKit::FrameLoaderClientImpl::dispatchDidStartProvisionalLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidReceiveTitle): - (WebKit::FrameLoaderClientImpl::dispatchDidCommitLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidFailProvisionalLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidFailLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidFinishLoad): - (WebKit::FrameLoaderClientImpl::dispatchDidFirstLayout): - (WebKit::FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout): - (WebKit::FrameLoaderClientImpl::dispatchCreatePage): - (WebKit::FrameLoaderClientImpl::dispatchShow): - (WebKit::shouldTreatAsAttachment): - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType): - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNewWindowAction): - (WebKit::FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction): - (WebKit::FrameLoaderClientImpl::cancelPolicyCheck): - (WebKit::FrameLoaderClientImpl::dispatchUnableToImplementPolicy): - (WebKit::FrameLoaderClientImpl::dispatchWillSubmitForm): - (WebKit::FrameLoaderClientImpl::dispatchDidLoadMainResource): - (WebKit::FrameLoaderClientImpl::revertToProvisionalState): - (WebKit::FrameLoaderClientImpl::setMainDocumentError): - (WebKit::FrameLoaderClientImpl::postProgressStartedNotification): - (WebKit::FrameLoaderClientImpl::postProgressEstimateChangedNotification): - (WebKit::FrameLoaderClientImpl::postProgressFinishedNotification): - (WebKit::FrameLoaderClientImpl::setMainFrameDocumentReady): - (WebKit::FrameLoaderClientImpl::startDownload): - (WebKit::FrameLoaderClientImpl::willChangeTitle): - (WebKit::FrameLoaderClientImpl::didChangeTitle): - (WebKit::FrameLoaderClientImpl::committedLoad): - (WebKit::FrameLoaderClientImpl::finishedLoading): - (WebKit::FrameLoaderClientImpl::updateGlobalHistory): - (WebKit::FrameLoaderClientImpl::updateGlobalHistoryRedirectLinks): - (WebKit::FrameLoaderClientImpl::shouldGoToHistoryItem): - (WebKit::FrameLoaderClientImpl::didDisplayInsecureContent): - (WebKit::FrameLoaderClientImpl::didRunInsecureContent): - (WebKit::FrameLoaderClientImpl::blockedError): - (WebKit::FrameLoaderClientImpl::cancelledError): - (WebKit::FrameLoaderClientImpl::cannotShowURLError): - (WebKit::FrameLoaderClientImpl::interruptForPolicyChangeError): - (WebKit::FrameLoaderClientImpl::cannotShowMIMETypeError): - (WebKit::FrameLoaderClientImpl::fileDoesNotExistError): - (WebKit::FrameLoaderClientImpl::pluginWillHandleLoadError): - (WebKit::FrameLoaderClientImpl::shouldFallBack): - (WebKit::FrameLoaderClientImpl::canHandleRequest): - (WebKit::FrameLoaderClientImpl::canShowMIMEType): - (WebKit::FrameLoaderClientImpl::representationExistsForURLScheme): - (WebKit::FrameLoaderClientImpl::generatedMIMETypeForURLScheme): - (WebKit::FrameLoaderClientImpl::frameLoadCompleted): - (WebKit::FrameLoaderClientImpl::saveViewStateToItem): - (WebKit::FrameLoaderClientImpl::restoreViewState): - (WebKit::FrameLoaderClientImpl::provisionalLoadStarted): - (WebKit::FrameLoaderClientImpl::didFinishLoad): - (WebKit::FrameLoaderClientImpl::prepareForDataSourceReplacement): - (WebKit::FrameLoaderClientImpl::createDocumentLoader): - (WebKit::FrameLoaderClientImpl::setTitle): - (WebKit::FrameLoaderClientImpl::userAgent): - (WebKit::FrameLoaderClientImpl::savePlatformDataToCachedFrame): - (WebKit::FrameLoaderClientImpl::transitionToCommittedFromCachedFrame): - (WebKit::FrameLoaderClientImpl::transitionToCommittedForNewPage): - (WebKit::FrameLoaderClientImpl::canCachePage): - (WebKit::FrameLoaderClientImpl::download): - (WebKit::FrameLoaderClientImpl::createFrame): - (WebKit::FrameLoaderClientImpl::createPlugin): - (WebKit::FrameLoaderClientImpl::redirectDataToPlugin): - (WebKit::FrameLoaderClientImpl::createJavaAppletWidget): - (WebKit::FrameLoaderClientImpl::objectContentType): - (WebKit::FrameLoaderClientImpl::overrideMediaType): - (WebKit::FrameLoaderClientImpl::actionSpecifiesNavigationPolicy): - (WebKit::FrameLoaderClientImpl::handleBackForwardNavigation): - (WebKit::FrameLoaderClientImpl::pluginLoadObserver): - * src/FrameLoaderClientImpl.h: Added. - (WebKit::FrameLoaderClientImpl::webFrame): - (WebKit::FrameLoaderClientImpl::willChangeEstimatedProgress): - (WebKit::FrameLoaderClientImpl::didChangeEstimatedProgress): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: ChromeClientImpl...ContextMenuClientImpl - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/ChromeClientImpl.cpp: Added. - (WebKit::ChromeClientImpl::ChromeClientImpl): - (WebKit::ChromeClientImpl::~ChromeClientImpl): - (WebKit::ChromeClientImpl::chromeDestroyed): - (WebKit::ChromeClientImpl::setWindowRect): - (WebKit::ChromeClientImpl::windowRect): - (WebKit::ChromeClientImpl::pageRect): - (WebKit::ChromeClientImpl::scaleFactor): - (WebKit::ChromeClientImpl::focus): - (WebKit::ChromeClientImpl::unfocus): - (WebKit::ChromeClientImpl::canTakeFocus): - (WebKit::ChromeClientImpl::takeFocus): - (WebKit::ChromeClientImpl::focusedNodeChanged): - (WebKit::ChromeClientImpl::createWindow): - (WebKit::currentEventShouldCauseBackgroundTab): - (WebKit::ChromeClientImpl::show): - (WebKit::ChromeClientImpl::canRunModal): - (WebKit::ChromeClientImpl::runModal): - (WebKit::ChromeClientImpl::setToolbarsVisible): - (WebKit::ChromeClientImpl::toolbarsVisible): - (WebKit::ChromeClientImpl::setStatusbarVisible): - (WebKit::ChromeClientImpl::statusbarVisible): - (WebKit::ChromeClientImpl::setScrollbarsVisible): - (WebKit::ChromeClientImpl::scrollbarsVisible): - (WebKit::ChromeClientImpl::setMenubarVisible): - (WebKit::ChromeClientImpl::menubarVisible): - (WebKit::ChromeClientImpl::setResizable): - (WebKit::ChromeClientImpl::addMessageToConsole): - (WebKit::ChromeClientImpl::canRunBeforeUnloadConfirmPanel): - (WebKit::ChromeClientImpl::runBeforeUnloadConfirmPanel): - (WebKit::ChromeClientImpl::closeWindowSoon): - (WebKit::ChromeClientImpl::runJavaScriptAlert): - (WebKit::ChromeClientImpl::runJavaScriptConfirm): - (WebKit::ChromeClientImpl::runJavaScriptPrompt): - (WebKit::ChromeClientImpl::setStatusbarText): - (WebKit::ChromeClientImpl::shouldInterruptJavaScript): - (WebKit::ChromeClientImpl::tabsToLinks): - (WebKit::ChromeClientImpl::windowResizerRect): - (WebKit::ChromeClientImpl::repaint): - (WebKit::ChromeClientImpl::scroll): - (WebKit::ChromeClientImpl::screenToWindow): - (WebKit::ChromeClientImpl::windowToScreen): - (WebKit::ChromeClientImpl::contentsSizeChanged): - (WebKit::ChromeClientImpl::scrollbarsModeDidChange): - (WebKit::ChromeClientImpl::mouseDidMoveOverElement): - (WebKit::ChromeClientImpl::setToolTip): - (WebKit::ChromeClientImpl::print): - (WebKit::ChromeClientImpl::exceededDatabaseQuota): - (WebKit::ChromeClientImpl::reachedMaxAppCacheSize): - (WebKit::ChromeClientImpl::runOpenPanel): - (WebKit::ChromeClientImpl::popupOpened): - (WebKit::ChromeClientImpl::setCursor): - (WebKit::ChromeClientImpl::setCursorForPlugin): - (WebKit::ChromeClientImpl::formStateDidChange): - (WebKit::ChromeClientImpl::getPopupMenuInfo): - (WebKit::ChromeClientImpl::notificationPresenter): - * src/ChromeClientImpl.h: Added. - (WebKit::ChromeClientImpl::webView): - (WebKit::ChromeClientImpl::platformPageClient): - (WebKit::ChromeClientImpl::scrollRectIntoView): - (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame): - (WebKit::ChromeClientImpl::setCursor): - (WebKit::ChromeClientImpl::createHTMLParserQuirks): - * src/ChromiumBridge.cpp: Added. - (WebCore::toChromeClientImpl): - (WebCore::toWebWidgetClient): - (WebCore::ChromiumBridge::clipboardIsFormatAvailable): - (WebCore::ChromiumBridge::clipboardReadPlainText): - (WebCore::ChromiumBridge::clipboardReadHTML): - (WebCore::ChromiumBridge::clipboardWriteSelection): - (WebCore::ChromiumBridge::clipboardWritePlainText): - (WebCore::ChromiumBridge::clipboardWriteURL): - (WebCore::ChromiumBridge::clipboardWriteImage): - (WebCore::ChromiumBridge::setCookies): - (WebCore::ChromiumBridge::cookies): - (WebCore::ChromiumBridge::rawCookies): - (WebCore::ChromiumBridge::deleteCookie): - (WebCore::ChromiumBridge::prefetchDNS): - (WebCore::ChromiumBridge::fileExists): - (WebCore::ChromiumBridge::deleteFile): - (WebCore::ChromiumBridge::deleteEmptyDirectory): - (WebCore::ChromiumBridge::getFileSize): - (WebCore::ChromiumBridge::getFileModificationTime): - (WebCore::ChromiumBridge::directoryName): - (WebCore::ChromiumBridge::pathByAppendingComponent): - (WebCore::ChromiumBridge::makeAllDirectories): - (WebCore::ChromiumBridge::getAbsolutePath): - (WebCore::ChromiumBridge::isDirectory): - (WebCore::ChromiumBridge::filePathToURL): - (WebCore::ChromiumBridge::ensureFontLoaded): - (WebCore::ChromiumBridge::getFontFamilyForCharacters): - (WebCore::ChromiumBridge::databaseOpenFile): - (WebCore::ChromiumBridge::databaseDeleteFile): - (WebCore::ChromiumBridge::databaseGetFileAttributes): - (WebCore::ChromiumBridge::databaseGetFileSize): - (WebCore::ChromiumBridge::signedPublicKeyAndChallengeString): - (WebCore::ChromiumBridge::computedDefaultLanguage): - (WebCore::ChromiumBridge::layoutTestMode): - (WebCore::ChromiumBridge::isSupportedImageMIMEType): - (WebCore::ChromiumBridge::isSupportedJavaScriptMIMEType): - (WebCore::ChromiumBridge::isSupportedNonImageMIMEType): - (WebCore::ChromiumBridge::mimeTypeForExtension): - (WebCore::ChromiumBridge::mimeTypeFromFile): - (WebCore::ChromiumBridge::preferredExtensionForMIMEType): - (WebCore::ChromiumBridge::plugins): - (WebCore::ChromiumBridge::pluginScriptableObject): - (WebCore::ChromiumBridge::loadPlatformImageResource): - (WebCore::ChromiumBridge::sandboxEnabled): - (WebCore::ChromiumBridge::setSharedTimerFiredFunction): - (WebCore::ChromiumBridge::setSharedTimerFireTime): - (WebCore::ChromiumBridge::stopSharedTimer): - (WebCore::ChromiumBridge::decrementStatsCounter): - (WebCore::ChromiumBridge::incrementStatsCounter): - (WebCore::ChromiumBridge::suddenTerminationChanged): - (WebCore::ChromiumBridge::currentTime): - (WebCore::ChromiumBridge::paintButton): - (WebCore::ChromiumBridge::paintMenuList): - (WebCore::ChromiumBridge::paintScrollbarArrow): - (WebCore::ChromiumBridge::paintScrollbarThumb): - (WebCore::ChromiumBridge::paintScrollbarTrack): - (WebCore::ChromiumBridge::paintTextField): - (WebCore::ChromiumBridge::paintTrackbar): - (WebCore::ChromiumBridge::traceEventBegin): - (WebCore::ChromiumBridge::traceEventEnd): - (WebCore::ChromiumBridge::visitedLinkHash): - (WebCore::ChromiumBridge::isLinkVisited): - (WebCore::ChromiumBridge::notifyJSOutOfMemory): - (WebCore::ChromiumBridge::memoryUsageMB): - (WebCore::ChromiumBridge::screenDepth): - (WebCore::ChromiumBridge::screenDepthPerComponent): - (WebCore::ChromiumBridge::screenIsMonochrome): - (WebCore::ChromiumBridge::screenRect): - (WebCore::ChromiumBridge::screenAvailableRect): - (WebCore::ChromiumBridge::popupsAllowed): - (WebCore::ChromiumBridge::widgetSetCursor): - (WebCore::ChromiumBridge::widgetSetFocus): - (WebCore::WorkerContextProxy::create): - * src/ChromiumCurrentTime.cpp: Added. - (WTF::currentTime): - * src/ChromiumThreading.cpp: Added. - (WTF::ChromiumThreading::initializeMainThread): - (WTF::ChromiumThreading::scheduleDispatchFunctionsOnMainThread): - * src/ContextMenuClientImpl.cpp: Added. - (WebKit::urlFromFrame): - (WebKit::isASingleWord): - (WebKit::selectMisspelledWord): - (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): - * src/ContextMenuClientImpl.h: Added. - (WebKit::ContextMenuClientImpl::ContextMenuClientImpl): - (WebKit::ContextMenuClientImpl::~ContextMenuClientImpl): - (WebKit::ContextMenuClientImpl::copyImageToClipboard): - (WebKit::ContextMenuClientImpl::contextMenuDestroyed): - (WebKit::ContextMenuClientImpl::contextMenuItemSelected): - (WebKit::ContextMenuClientImpl::downloadURL): - (WebKit::ContextMenuClientImpl::isSpeaking): - (WebKit::ContextMenuClientImpl::lookUpInDictionary): - (WebKit::ContextMenuClientImpl::searchWithGoogle): - (WebKit::ContextMenuClientImpl::shouldIncludeInspectElementItem): - (WebKit::ContextMenuClientImpl::speak): - (WebKit::ContextMenuClientImpl::stopSpeaking): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: AppCach...BackForwardListClientImpl - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/ApplicationCacheHost.cpp: Added. - (WebCore::ApplicationCacheHostInternal::ApplicationCacheHostInternal): - (WebCore::ApplicationCacheHostInternal::notifyEventListener): - (WebCore::ApplicationCacheHost::ApplicationCacheHost): - (WebCore::ApplicationCacheHost::~ApplicationCacheHost): - (WebCore::ApplicationCacheHost::maybeLoadMainResource): - (WebCore::ApplicationCacheHost::selectCacheWithoutManifest): - (WebCore::ApplicationCacheHost::selectCacheWithManifest): - (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse): - (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError): - (WebCore::ApplicationCacheHost::mainResourceDataReceived): - (WebCore::ApplicationCacheHost::failedLoadingMainResource): - (WebCore::ApplicationCacheHost::finishedLoadingMainResource): - (WebCore::ApplicationCacheHost::maybeLoadResource): - (WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect): - (WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse): - (WebCore::ApplicationCacheHost::maybeLoadFallbackForError): - (WebCore::ApplicationCacheHost::maybeLoadSynchronously): - (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously): - (WebCore::ApplicationCacheHost::canCacheInPageCache): - (WebCore::ApplicationCacheHost::setDOMApplicationCache): - (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): - (WebCore::ApplicationCacheHost::status): - (WebCore::ApplicationCacheHost::update): - (WebCore::ApplicationCacheHost::swapCache): - (WebCore::ApplicationCacheHost::isApplicationCacheEnabled): - * src/AssertMatchingEnums.cpp: Added. - * src/AutocompletePopupMenuClient.cpp: Added. - (WebKit::AutocompletePopupMenuClient::AutocompletePopupMenuClient): - (WebKit::AutocompletePopupMenuClient::~AutocompletePopupMenuClient): - (WebKit::AutocompletePopupMenuClient::initialize): - (WebKit::AutocompletePopupMenuClient::valueChanged): - (WebKit::AutocompletePopupMenuClient::itemText): - (WebKit::AutocompletePopupMenuClient::itemStyle): - (WebKit::AutocompletePopupMenuClient::menuStyle): - (WebKit::AutocompletePopupMenuClient::clientPaddingLeft): - (WebKit::AutocompletePopupMenuClient::clientPaddingRight): - (WebKit::AutocompletePopupMenuClient::popupDidHide): - (WebKit::AutocompletePopupMenuClient::setTextFromItem): - (WebKit::AutocompletePopupMenuClient::fontSelector): - (WebKit::AutocompletePopupMenuClient::hostWindow): - (WebKit::AutocompletePopupMenuClient::createScrollbar): - (WebKit::AutocompletePopupMenuClient::setSuggestions): - (WebKit::AutocompletePopupMenuClient::removeItemAtIndex): - (WebKit::AutocompletePopupMenuClient::textFieldStyle): - * src/AutocompletePopupMenuClient.h: Added. - (WebKit::AutocompletePopupMenuClient::textField): - (WebKit::AutocompletePopupMenuClient::itemToolTip): - (WebKit::AutocompletePopupMenuClient::itemIsEnabled): - (WebKit::AutocompletePopupMenuClient::clientInsetLeft): - (WebKit::AutocompletePopupMenuClient::clientInsetRight): - (WebKit::AutocompletePopupMenuClient::listSize): - (WebKit::AutocompletePopupMenuClient::selectedIndex): - (WebKit::AutocompletePopupMenuClient::itemIsSeparator): - (WebKit::AutocompletePopupMenuClient::itemIsLabel): - (WebKit::AutocompletePopupMenuClient::itemIsSelected): - (WebKit::AutocompletePopupMenuClient::shouldPopOver): - (WebKit::AutocompletePopupMenuClient::valueShouldChangeOnHotTrack): - * src/BackForwardListClientImpl.cpp: Added. - (WebKit::BackForwardListClientImpl::BackForwardListClientImpl): - (WebKit::BackForwardListClientImpl::~BackForwardListClientImpl): - (WebKit::BackForwardListClientImpl::setCurrentHistoryItem): - (WebKit::BackForwardListClientImpl::previousHistoryItem): - (WebKit::BackForwardListClientImpl::addItem): - (WebKit::BackForwardListClientImpl::goToItem): - (WebKit::BackForwardListClientImpl::currentItem): - (WebKit::BackForwardListClientImpl::itemAtIndex): - (WebKit::BackForwardListClientImpl::backListCount): - (WebKit::BackForwardListClientImpl::forwardListCount): - (WebKit::BackForwardListClientImpl::close): - * src/BackForwardListClientImpl.h: Added. - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebString...WebViewImpl - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebString.cpp: Added. - (WebKit::WebString::reset): - (WebKit::WebString::assign): - (WebKit::WebString::length): - (WebKit::WebString::data): - (WebKit::WebString::utf8): - (WebKit::WebString::fromUTF8): - (WebKit::WebString::WebString): - (WebKit::WebString::operator=): - (WebKit::WebString::operator WebCore::String): - (WebKit::WebString::operator WebCore::AtomicString): - * src/WebURL.cpp: Added. - (WebKit::WebURL::WebURL): - (WebKit::WebURL::operator=): - (WebKit::WebURL::operator WebCore::KURL): - * src/WebURLError.cpp: Added. - (WebKit::WebURLError::WebURLError): - (WebKit::WebURLError::operator=): - (WebKit::WebURLError::operator ResourceError): - * src/WebURLRequest.cpp: Added. - (WebKit::WebURLRequestPrivateImpl::WebURLRequestPrivateImpl): - (WebKit::WebURLRequestPrivateImpl::dispose): - (WebKit::WebURLRequest::initialize): - (WebKit::WebURLRequest::reset): - (WebKit::WebURLRequest::assign): - (WebKit::WebURLRequest::isNull): - (WebKit::WebURLRequest::url): - (WebKit::WebURLRequest::setURL): - (WebKit::WebURLRequest::firstPartyForCookies): - (WebKit::WebURLRequest::setFirstPartyForCookies): - (WebKit::WebURLRequest::allowCookies): - (WebKit::WebURLRequest::setAllowCookies): - (WebKit::WebURLRequest::allowStoredCredentials): - (WebKit::WebURLRequest::setAllowStoredCredentials): - (WebKit::WebURLRequest::cachePolicy): - (WebKit::WebURLRequest::setCachePolicy): - (WebKit::WebURLRequest::httpMethod): - (WebKit::WebURLRequest::setHTTPMethod): - (WebKit::WebURLRequest::httpHeaderField): - (WebKit::WebURLRequest::setHTTPHeaderField): - (WebKit::WebURLRequest::addHTTPHeaderField): - (WebKit::WebURLRequest::clearHTTPHeaderField): - (WebKit::WebURLRequest::visitHTTPHeaderFields): - (WebKit::WebURLRequest::httpBody): - (WebKit::WebURLRequest::setHTTPBody): - (WebKit::WebURLRequest::reportUploadProgress): - (WebKit::WebURLRequest::setReportUploadProgress): - (WebKit::WebURLRequest::targetType): - (WebKit::WebURLRequest::setTargetType): - (WebKit::WebURLRequest::requestorID): - (WebKit::WebURLRequest::setRequestorID): - (WebKit::WebURLRequest::requestorProcessID): - (WebKit::WebURLRequest::setRequestorProcessID): - (WebKit::WebURLRequest::appCacheHostID): - (WebKit::WebURLRequest::setAppCacheHostID): - (WebKit::WebURLRequest::toMutableResourceRequest): - (WebKit::WebURLRequest::toResourceRequest): - * src/WebURLRequestPrivate.h: Added. - (WebKit::WebURLRequestPrivate::WebURLRequestPrivate): - * src/WebURLResponse.cpp: Added. - (WebKit::WebURLResponsePrivateImpl::WebURLResponsePrivateImpl): - (WebKit::WebURLResponsePrivateImpl::dispose): - (WebKit::WebURLResponse::initialize): - (WebKit::WebURLResponse::reset): - (WebKit::WebURLResponse::assign): - (WebKit::WebURLResponse::isNull): - (WebKit::WebURLResponse::url): - (WebKit::WebURLResponse::setURL): - (WebKit::WebURLResponse::mimeType): - (WebKit::WebURLResponse::setMIMEType): - (WebKit::WebURLResponse::expectedContentLength): - (WebKit::WebURLResponse::setExpectedContentLength): - (WebKit::WebURLResponse::textEncodingName): - (WebKit::WebURLResponse::setTextEncodingName): - (WebKit::WebURLResponse::suggestedFileName): - (WebKit::WebURLResponse::setSuggestedFileName): - (WebKit::WebURLResponse::httpStatusCode): - (WebKit::WebURLResponse::setHTTPStatusCode): - (WebKit::WebURLResponse::httpStatusText): - (WebKit::WebURLResponse::setHTTPStatusText): - (WebKit::WebURLResponse::httpHeaderField): - (WebKit::WebURLResponse::setHTTPHeaderField): - (WebKit::WebURLResponse::addHTTPHeaderField): - (WebKit::WebURLResponse::clearHTTPHeaderField): - (WebKit::WebURLResponse::visitHTTPHeaderFields): - (WebKit::WebURLResponse::lastModifiedDate): - (WebKit::WebURLResponse::setLastModifiedDate): - (WebKit::WebURLResponse::isContentFiltered): - (WebKit::WebURLResponse::setIsContentFiltered): - (WebKit::WebURLResponse::appCacheID): - (WebKit::WebURLResponse::setAppCacheID): - (WebKit::WebURLResponse::appCacheManifestURL): - (WebKit::WebURLResponse::setAppCacheManifestURL): - (WebKit::WebURLResponse::securityInfo): - (WebKit::WebURLResponse::setSecurityInfo): - (WebKit::WebURLResponse::toMutableResourceResponse): - (WebKit::WebURLResponse::toResourceResponse): - * src/WebURLResponsePrivate.h: Added. - (WebKit::WebURLResponsePrivate::WebURLResponsePrivate): - * src/WebViewImpl.cpp: Added. - (WebKit::): - (WebKit::WebView::create): - (WebKit::WebView::updateVisitedLinkState): - (WebKit::WebView::resetVisitedLinkState): - (WebKit::WebViewImpl::initializeMainFrame): - (WebKit::WebViewImpl::WebViewImpl): - (WebKit::WebViewImpl::~WebViewImpl): - (WebKit::WebViewImpl::theme): - (WebKit::WebViewImpl::mainFrameImpl): - (WebKit::WebViewImpl::tabKeyCyclesThroughElements): - (WebKit::WebViewImpl::setTabKeyCyclesThroughElements): - (WebKit::WebViewImpl::mouseMove): - (WebKit::WebViewImpl::mouseLeave): - (WebKit::WebViewImpl::mouseDown): - (WebKit::WebViewImpl::mouseContextMenu): - (WebKit::WebViewImpl::mouseUp): - (WebKit::WebViewImpl::mouseWheel): - (WebKit::WebViewImpl::keyEvent): - (WebKit::WebViewImpl::autocompleteHandleKeyEvent): - (WebKit::WebViewImpl::charEvent): - (WebKit::WebViewImpl::sendContextMenuEvent): - (WebKit::WebViewImpl::keyEventDefault): - (WebKit::WebViewImpl::scrollViewWithKeyboard): - (WebKit::WebViewImpl::propagateScroll): - (WebKit::WebViewImpl::focusedWebCoreFrame): - (WebKit::WebViewImpl::fromPage): - (WebKit::WebViewImpl::close): - (WebKit::WebViewImpl::resize): - (WebKit::WebViewImpl::layout): - (WebKit::WebViewImpl::paint): - (WebKit::WebViewImpl::handleInputEvent): - (WebKit::WebViewImpl::mouseCaptureLost): - (WebKit::WebViewImpl::setFocus): - (WebKit::WebViewImpl::handleCompositionEvent): - (WebKit::WebViewImpl::queryCompositionStatus): - (WebKit::WebViewImpl::setTextDirection): - (WebKit::WebViewImpl::settings): - (WebKit::WebViewImpl::pageEncoding): - (WebKit::WebViewImpl::setPageEncoding): - (WebKit::WebViewImpl::dispatchBeforeUnloadEvent): - (WebKit::WebViewImpl::dispatchUnloadEvent): - (WebKit::WebViewImpl::mainFrame): - (WebKit::WebViewImpl::findFrameByName): - (WebKit::WebViewImpl::focusedFrame): - (WebKit::WebViewImpl::setFocusedFrame): - (WebKit::WebViewImpl::setInitialFocus): - (WebKit::WebViewImpl::clearFocusedNode): - (WebKit::WebViewImpl::zoomIn): - (WebKit::WebViewImpl::zoomOut): - (WebKit::WebViewImpl::zoomDefault): - (WebKit::WebViewImpl::performMediaPlayerAction): - (WebKit::WebViewImpl::copyImageAt): - (WebKit::WebViewImpl::dragSourceEndedAt): - (WebKit::WebViewImpl::dragSourceMovedTo): - (WebKit::WebViewImpl::dragSourceSystemDragEnded): - (WebKit::WebViewImpl::dragTargetDragEnter): - (WebKit::WebViewImpl::dragTargetDragOver): - (WebKit::WebViewImpl::dragTargetDragLeave): - (WebKit::WebViewImpl::dragTargetDrop): - (WebKit::WebViewImpl::dragIdentity): - (WebKit::WebViewImpl::inspectElementAt): - (WebKit::WebViewImpl::inspectorSettings): - (WebKit::WebViewImpl::setInspectorSettings): - (WebKit::WebViewImpl::devToolsAgent): - (WebKit::WebViewImpl::setDevToolsAgent): - (WebKit::WebViewImpl::accessibilityObject): - (WebKit::WebViewImpl::applyAutofillSuggestions): - (WebKit::WebViewImpl::hideAutofillPopup): - (WebKit::WebViewImpl::setDropEffect): - (WebKit::WebViewImpl::setIsTransparent): - (WebKit::WebViewImpl::isTransparent): - (WebKit::WebViewImpl::setIsActive): - (WebKit::WebViewImpl::isActive): - (WebKit::WebViewImpl::didCommitLoad): - (WebKit::WebViewImpl::navigationPolicyFromMouseEvent): - (WebKit::WebViewImpl::startDragging): - (WebKit::WebViewImpl::setCurrentHistoryItem): - (WebKit::WebViewImpl::previousHistoryItem): - (WebKit::WebViewImpl::observeNewNavigation): - (WebKit::WebViewImpl::hideAutoCompletePopup): - (WebKit::WebViewImpl::autoCompletePopupDidHide): - (WebKit::WebViewImpl::setIgnoreInputEvents): - (WebKit::WebViewImpl::notificationPresenterImpl): - (WebKit::WebViewImpl::refreshAutofillPopup): - (WebKit::WebViewImpl::focusedWebCoreNode): - (WebKit::WebViewImpl::hitTestResultForWindowPos): - (WebKit::WebViewImpl::setTabsToLinks): - (WebKit::WebViewImpl::tabsToLinks): - * src/WebViewImpl.h: Added. - (WebKit::WebViewImpl::size): - (WebKit::WebViewImpl::devToolsAgentPrivate): - (WebKit::WebViewImpl::lastMouseDownPoint): - (WebKit::WebViewImpl::client): - (WebKit::WebViewImpl::page): - (WebKit::WebViewImpl::contextMenuAllowed): - (WebKit::WebViewImpl::setInitialNavigationPolicy): - (WebKit::WebViewImpl::initialNavigationPolicy): - (WebKit::WebViewImpl::currentInputEvent): - (WebKit::WebViewImpl::): - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebScriptController...WebStorageNamespaceImpl - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebScriptController.cpp: Added. - (WebKit::WebScriptController::registerExtension): - (WebKit::WebScriptController::enableV8SingleThreadMode): - (WebKit::WebScriptController::flushConsoleMessages): - * src/WebSearchableFormData.cpp: Added. - (WebCore::GetFormEncoding): - (WebCore::IsHTTPFormSubmit): - (WebCore::GetButtonToActivate): - (WebCore::IsSelectInDefaultState): - (WebCore::IsInDefaultState): - (WebCore::HasSuitableTextElement): - (WebKit::WebSearchableFormData::WebSearchableFormData): - * src/WebSecurityOrigin.cpp: Added. - (WebKit::WebSecurityOrigin::reset): - (WebKit::WebSecurityOrigin::assign): - (WebKit::WebSecurityOrigin::protocol): - (WebKit::WebSecurityOrigin::host): - (WebKit::WebSecurityOrigin::port): - (WebKit::WebSecurityOrigin::isEmpty): - (WebKit::WebSecurityOrigin::toString): - (WebKit::WebSecurityOrigin::databaseIdentifier): - (WebKit::WebSecurityOrigin::WebSecurityOrigin): - (WebKit::WebSecurityOrigin::operator=): - (WebKit::WebSecurityOrigin::operator WTF::PassRefPtr<WebCore::SecurityOrigin>): - * src/WebSecurityPolicy.cpp: Added. - (WebKit::WebSecurityPolicy::registerURLSchemeAsLocal): - (WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess): - (WebKit::WebSecurityPolicy::whiteListAccessFromOrigin): - (WebKit::WebSecurityPolicy::resetOriginAccessWhiteLists): - * src/WebSettingsImpl.cpp: Added. - (WebKit::WebSettingsImpl::WebSettingsImpl): - (WebKit::WebSettingsImpl::setStandardFontFamily): - (WebKit::WebSettingsImpl::setFixedFontFamily): - (WebKit::WebSettingsImpl::setSerifFontFamily): - (WebKit::WebSettingsImpl::setSansSerifFontFamily): - (WebKit::WebSettingsImpl::setCursiveFontFamily): - (WebKit::WebSettingsImpl::setFantasyFontFamily): - (WebKit::WebSettingsImpl::setDefaultFontSize): - (WebKit::WebSettingsImpl::setDefaultFixedFontSize): - (WebKit::WebSettingsImpl::setMinimumFontSize): - (WebKit::WebSettingsImpl::setMinimumLogicalFontSize): - (WebKit::WebSettingsImpl::setDefaultTextEncodingName): - (WebKit::WebSettingsImpl::setJavaScriptEnabled): - (WebKit::WebSettingsImpl::setWebSecurityEnabled): - (WebKit::WebSettingsImpl::setJavaScriptCanOpenWindowsAutomatically): - (WebKit::WebSettingsImpl::setLoadsImagesAutomatically): - (WebKit::WebSettingsImpl::setPluginsEnabled): - (WebKit::WebSettingsImpl::setDOMPasteAllowed): - (WebKit::WebSettingsImpl::setDeveloperExtrasEnabled): - (WebKit::WebSettingsImpl::setShrinksStandaloneImagesToFit): - (WebKit::WebSettingsImpl::setUsesEncodingDetector): - (WebKit::WebSettingsImpl::setTextAreasAreResizable): - (WebKit::WebSettingsImpl::setJavaEnabled): - (WebKit::WebSettingsImpl::setAllowScriptsToCloseWindows): - (WebKit::WebSettingsImpl::setUserStyleSheetLocation): - (WebKit::WebSettingsImpl::setUsesPageCache): - (WebKit::WebSettingsImpl::setDownloadableBinaryFontsEnabled): - (WebKit::WebSettingsImpl::setXSSAuditorEnabled): - (WebKit::WebSettingsImpl::setLocalStorageEnabled): - (WebKit::WebSettingsImpl::setEditableLinkBehaviorNeverLive): - (WebKit::WebSettingsImpl::setFontRenderingModeNormal): - (WebKit::WebSettingsImpl::setShouldPaintCustomScrollbars): - (WebKit::WebSettingsImpl::setDatabasesEnabled): - (WebKit::WebSettingsImpl::setAllowUniversalAccessFromFileURLs): - (WebKit::WebSettingsImpl::setTextDirectionSubmenuInclusionBehaviorNeverIncluded): - (WebKit::WebSettingsImpl::setOfflineWebApplicationCacheEnabled): - (WebKit::WebSettingsImpl::setExperimentalWebGLEnabled): - * src/WebSettingsImpl.h: Added. - (WebKit::WebSettingsImpl::~WebSettingsImpl): - * src/WebSharedWorkerImpl.cpp: Added. - (WebKit::WebSharedWorkerImpl::WebSharedWorkerImpl): - (WebKit::WebSharedWorkerImpl::~WebSharedWorkerImpl): - (WebKit::WebSharedWorkerImpl::isStarted): - (WebKit::WebSharedWorkerImpl::connect): - (WebKit::WebSharedWorkerImpl::connectTask): - (WebKit::WebSharedWorkerImpl::startWorkerContext): - (WebKit::WebSharedWorkerImpl::terminateWorkerContext): - (WebKit::WebSharedWorkerImpl::clientDestroyed): - (WebKit::WebSharedWorkerImpl::client): - (WebKit::WebSharedWorker::create): - * src/WebSharedWorkerImpl.h: Added. - (WebKit::WebSharedWorkerImpl::commonClient): - * src/WebStorageAreaImpl.cpp: Added. - (WebKit::WebStorageAreaImpl::WebStorageAreaImpl): - (WebKit::WebStorageAreaImpl::~WebStorageAreaImpl): - (WebKit::WebStorageAreaImpl::length): - (WebKit::WebStorageAreaImpl::key): - (WebKit::WebStorageAreaImpl::getItem): - (WebKit::WebStorageAreaImpl::setItem): - (WebKit::WebStorageAreaImpl::removeItem): - (WebKit::WebStorageAreaImpl::clear): - * src/WebStorageAreaImpl.h: Added. - (WebKit::WebStorageAreaImpl::currentStorageEventURL): - (WebKit::WebStorageAreaImpl::ScopedStorageEventURL::ScopedStorageEventURL): - (WebKit::WebStorageAreaImpl::ScopedStorageEventURL::~ScopedStorageEventURL): - * src/WebStorageEventDispatcherImpl.cpp: Added. - (WebKit::WebStorageEventDispatcher::create): - (WebKit::WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl): - (WebKit::WebStorageEventDispatcherImpl::dispatchStorageEvent): - * src/WebStorageEventDispatcherImpl.h: Added. - * src/WebStorageNamespaceImpl.cpp: Added. - (WebKit::WebStorageNamespace::createLocalStorageNamespace): - (WebKit::WebStorageNamespace::createSessionStorageNamespace): - (WebKit::WebStorageNamespaceImpl::WebStorageNamespaceImpl): - (WebKit::WebStorageNamespaceImpl::~WebStorageNamespaceImpl): - (WebKit::WebStorageNamespaceImpl::createStorageArea): - (WebKit::WebStorageNamespaceImpl::copy): - (WebKit::WebStorageNamespaceImpl::close): - * src/WebStorageNamespaceImpl.h: Added. - -2009-11-10 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebPasswordFormData...WebRuntimeFeatures - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebPasswordFormData.cpp: Added. - (WebKit::): - (WebKit::WebPasswordFormData::WebPasswordFormData): - * src/WebPasswordFormUtils.cpp: Added. - (WebKit::findPasswordFormFields): - * src/WebPasswordFormUtils.h: Added. - (WebKit::PasswordFormFields::PasswordFormFields): - * src/WebPluginContainerImpl.cpp: Added. - (WebKit::WebPluginContainerImpl::setFrameRect): - (WebKit::WebPluginContainerImpl::paint): - (WebKit::WebPluginContainerImpl::invalidateRect): - (WebKit::WebPluginContainerImpl::setFocus): - (WebKit::WebPluginContainerImpl::show): - (WebKit::WebPluginContainerImpl::hide): - (WebKit::WebPluginContainerImpl::handleEvent): - (WebKit::WebPluginContainerImpl::frameRectsChanged): - (WebKit::WebPluginContainerImpl::setParentVisible): - (WebKit::WebPluginContainerImpl::setParent): - (WebKit::WebPluginContainerImpl::invalidate): - (WebKit::WebPluginContainerImpl::reportGeometry): - (WebKit::WebPluginContainerImpl::clearScriptObjects): - (WebKit::WebPluginContainerImpl::scriptableObjectForElement): - (WebKit::WebPluginContainerImpl::executeScriptURL): - (WebKit::WebPluginContainerImpl::loadFrameRequest): - (WebKit::WebPluginContainerImpl::didReceiveResponse): - (WebKit::WebPluginContainerImpl::didReceiveData): - (WebKit::WebPluginContainerImpl::didFinishLoading): - (WebKit::WebPluginContainerImpl::didFailLoading): - (WebKit::WebPluginContainerImpl::scriptableObject): - (WebKit::WebPluginContainerImpl::willDestroyPluginLoadObserver): - (WebKit::WebPluginContainerImpl::~WebPluginContainerImpl): - (WebKit::WebPluginContainerImpl::handleMouseEvent): - (WebKit::WebPluginContainerImpl::handleKeyboardEvent): - (WebKit::WebPluginContainerImpl::calculateGeometry): - (WebKit::WebPluginContainerImpl::windowClipRect): - (WebKit::getObjectStack): - (WebKit::checkStackOnTop): - (WebKit::WebPluginContainerImpl::windowCutOutRects): - * src/WebPluginContainerImpl.h: Added. - (WebKit::WebPluginContainerImpl::create): - (WebKit::WebPluginContainerImpl::plugin): - (WebKit::WebPluginContainerImpl::WebPluginContainerImpl): - * src/WebPluginListBuilderImpl.cpp: Added. - (WebKit::WebPluginListBuilderImpl::addPlugin): - (WebKit::WebPluginListBuilderImpl::addMediaTypeToLastPlugin): - (WebKit::WebPluginListBuilderImpl::addFileExtensionToLastMediaType): - * src/WebPluginListBuilderImpl.h: Added. - (WebKit::WebPluginListBuilderImpl::WebPluginListBuilderImpl): - * src/WebPluginLoadObserver.cpp: Added. - (WebKit::WebPluginLoadObserver::~WebPluginLoadObserver): - (WebKit::WebPluginLoadObserver::didFinishLoading): - (WebKit::WebPluginLoadObserver::didFailLoading): - * src/WebPluginLoadObserver.h: Added. - (WebKit::WebPluginLoadObserver::WebPluginLoadObserver): - (WebKit::WebPluginLoadObserver::url): - (WebKit::WebPluginLoadObserver::clearPluginContainer): - * src/WebPopupMenuImpl.cpp: Added. - (WebKit::WebPopupMenu::create): - (WebKit::WebPopupMenuImpl::WebPopupMenuImpl): - (WebKit::WebPopupMenuImpl::~WebPopupMenuImpl): - (WebKit::WebPopupMenuImpl::Init): - (WebKit::WebPopupMenuImpl::MouseMove): - (WebKit::WebPopupMenuImpl::MouseLeave): - (WebKit::WebPopupMenuImpl::MouseDown): - (WebKit::WebPopupMenuImpl::MouseUp): - (WebKit::WebPopupMenuImpl::MouseWheel): - (WebKit::WebPopupMenuImpl::KeyEvent): - (WebKit::WebPopupMenuImpl::close): - (WebKit::WebPopupMenuImpl::resize): - (WebKit::WebPopupMenuImpl::layout): - (WebKit::WebPopupMenuImpl::paint): - (WebKit::WebPopupMenuImpl::handleInputEvent): - (WebKit::WebPopupMenuImpl::mouseCaptureLost): - (WebKit::WebPopupMenuImpl::setFocus): - (WebKit::WebPopupMenuImpl::handleCompositionEvent): - (WebKit::WebPopupMenuImpl::queryCompositionStatus): - (WebKit::WebPopupMenuImpl::setTextDirection): - (WebKit::WebPopupMenuImpl::repaint): - (WebKit::WebPopupMenuImpl::scroll): - (WebKit::WebPopupMenuImpl::screenToWindow): - (WebKit::WebPopupMenuImpl::windowToScreen): - (WebKit::WebPopupMenuImpl::scrollRectIntoView): - (WebKit::WebPopupMenuImpl::scrollbarsModeDidChange): - (WebKit::WebPopupMenuImpl::popupClosed): - * src/WebPopupMenuImpl.h: Added. - (WebKit::WebPopupMenuImpl::size): - (WebKit::WebPopupMenuImpl::client): - (WebKit::WebPopupMenuImpl::platformPageClient): - * src/WebRange.cpp: Added. - (WebKit::WebRange::reset): - (WebKit::WebRange::assign): - (WebKit::WebRange::startOffset): - (WebKit::WebRange::endOffset): - (WebKit::WebRange::startContainer): - (WebKit::WebRange::endContainer): - (WebKit::WebRange::toHTMLText): - (WebKit::WebRange::toPlainText): - (WebKit::WebRange::WebRange): - (WebKit::WebRange::operator=): - (WebKit::WebRange::operator WTF::PassRefPtr<WebCore::Range>): - * src/WebRuntimeFeatures.cpp: Added. - (WebKit::WebRuntimeFeatures::enableDatabase): - (WebKit::WebRuntimeFeatures::isDatabaseEnabled): - (WebKit::WebRuntimeFeatures::enableLocalStorage): - (WebKit::WebRuntimeFeatures::isLocalStorageEnabled): - (WebKit::WebRuntimeFeatures::enableSessionStorage): - (WebKit::WebRuntimeFeatures::isSessionStorageEnabled): - (WebKit::WebRuntimeFeatures::enableMediaPlayer): - (WebKit::WebRuntimeFeatures::isMediaPlayerEnabled): - (WebKit::WebRuntimeFeatures::enableSockets): - (WebKit::WebRuntimeFeatures::isSocketsEnabled): - (WebKit::WebRuntimeFeatures::enableNotifications): - (WebKit::WebRuntimeFeatures::isNotificationsEnabled): - (WebKit::WebRuntimeFeatures::enableApplicationCache): - (WebKit::WebRuntimeFeatures::isApplicationCacheEnabled): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebFileInputElement...WebNotifications - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebInputElement.cpp: Added. - (WebKit::WebInputElement::WebInputElement): - (WebKit::WebInputElement::operator=): - (WebKit::WebInputElement::operator WTF::PassRefPtr<HTMLInputElement>): - (WebKit::WebInputElement::setActivatedSubmit): - (WebKit::WebInputElement::setValue): - (WebKit::WebInputElement::value): - (WebKit::WebInputElement::setAutofilled): - (WebKit::WebInputElement::dispatchFormControlChangeEvent): - (WebKit::WebInputElement::setSelectionRange): - * src/WebInputEvent.cpp: Added. - (WebKit::staticKeyIdentifiers): - (WebKit::WebKeyboardEvent::setKeyIdentifierFromWindowsKeyCode): - * src/WebInputEventConversion.cpp: Added. - (WebKit::PlatformMouseEventBuilder::PlatformMouseEventBuilder): - (WebKit::PlatformWheelEventBuilder::PlatformWheelEventBuilder): - (WebKit::toPlatformKeyboardEventType): - (WebKit::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): - (WebKit::PlatformKeyboardEventBuilder::setKeyType): - (WebKit::PlatformKeyboardEventBuilder::isCharacterKey): - (WebKit::getWebInputModifiers): - (WebKit::WebMouseEventBuilder::WebMouseEventBuilder): - (WebKit::WebKeyboardEventBuilder::WebKeyboardEventBuilder): - * src/WebInputEventConversion.h: Added. - * src/WebKit.cpp: Added. - (WebKit::initialize): - (WebKit::shutdown): - (WebKit::webKitClient): - (WebKit::setLayoutTestMode): - (WebKit::layoutTestMode): - (WebKit::resetPluginCache): - * src/WebMediaPlayerClientImpl.cpp: Added. - (WebKit::createWebMediaPlayer): - (WebKit::WebMediaPlayerClientImpl::isEnabled): - (WebKit::WebMediaPlayerClientImpl::setIsEnabled): - (WebKit::WebMediaPlayerClientImpl::registerSelf): - (WebKit::WebMediaPlayerClientImpl::networkStateChanged): - (WebKit::WebMediaPlayerClientImpl::readyStateChanged): - (WebKit::WebMediaPlayerClientImpl::volumeChanged): - (WebKit::WebMediaPlayerClientImpl::timeChanged): - (WebKit::WebMediaPlayerClientImpl::repaint): - (WebKit::WebMediaPlayerClientImpl::durationChanged): - (WebKit::WebMediaPlayerClientImpl::rateChanged): - (WebKit::WebMediaPlayerClientImpl::sizeChanged): - (WebKit::WebMediaPlayerClientImpl::sawUnsupportedTracks): - (WebKit::WebMediaPlayerClientImpl::load): - (WebKit::WebMediaPlayerClientImpl::cancelLoad): - (WebKit::WebMediaPlayerClientImpl::play): - (WebKit::WebMediaPlayerClientImpl::pause): - (WebKit::WebMediaPlayerClientImpl::naturalSize): - (WebKit::WebMediaPlayerClientImpl::hasVideo): - (WebKit::WebMediaPlayerClientImpl::hasAudio): - (WebKit::WebMediaPlayerClientImpl::setVisible): - (WebKit::WebMediaPlayerClientImpl::duration): - (WebKit::WebMediaPlayerClientImpl::currentTime): - (WebKit::WebMediaPlayerClientImpl::seek): - (WebKit::WebMediaPlayerClientImpl::seeking): - (WebKit::WebMediaPlayerClientImpl::setEndTime): - (WebKit::WebMediaPlayerClientImpl::setRate): - (WebKit::WebMediaPlayerClientImpl::paused): - (WebKit::WebMediaPlayerClientImpl::supportsFullscreen): - (WebKit::WebMediaPlayerClientImpl::supportsSave): - (WebKit::WebMediaPlayerClientImpl::setVolume): - (WebKit::WebMediaPlayerClientImpl::networkState): - (WebKit::WebMediaPlayerClientImpl::readyState): - (WebKit::WebMediaPlayerClientImpl::maxTimeSeekable): - (WebKit::WebMediaPlayerClientImpl::buffered): - (WebKit::WebMediaPlayerClientImpl::dataRate): - (WebKit::WebMediaPlayerClientImpl::totalBytesKnown): - (WebKit::WebMediaPlayerClientImpl::totalBytes): - (WebKit::WebMediaPlayerClientImpl::bytesLoaded): - (WebKit::WebMediaPlayerClientImpl::setSize): - (WebKit::WebMediaPlayerClientImpl::paint): - (WebKit::WebMediaPlayerClientImpl::setAutobuffer): - (WebKit::WebMediaPlayerClientImpl::hasSingleSecurityOrigin): - (WebKit::WebMediaPlayerClientImpl::movieLoadType): - (WebKit::WebMediaPlayerClientImpl::create): - (WebKit::WebMediaPlayerClientImpl::getSupportedTypes): - (WebKit::WebMediaPlayerClientImpl::supportsType): - (WebKit::WebMediaPlayerClientImpl::WebMediaPlayerClientImpl): - * src/WebMediaPlayerClientImpl.h: Added. - * src/WebNode.cpp: Added. - (WebKit::WebNode::reset): - (WebKit::WebNode::assign): - (WebKit::WebNode::parentNode): - (WebKit::WebNode::nodeName): - (WebKit::WebNode::WebNode): - (WebKit::WebNode::operator=): - (WebKit::WebNode::operator WTF::PassRefPtr<WebCore::Node>): - (WebKit::WebNode::frame): - * src/WebNotification.cpp: Added. - (WebKit::WebNotification::reset): - (WebKit::WebNotification::assign): - (WebKit::WebNotification::lessThan): - (WebKit::WebNotification::isHTML): - (WebKit::WebNotification::url): - (WebKit::WebNotification::icon): - (WebKit::WebNotification::title): - (WebKit::WebNotification::body): - (WebKit::WebNotification::dispatchDisplayEvent): - (WebKit::WebNotification::dispatchErrorEvent): - (WebKit::WebNotification::dispatchCloseEvent): - (WebKit::WebNotification::WebNotification): - (WebKit::WebNotification::operator=): - (WebKit::WebNotification::operator WTF::PassRefPtr<Notification>): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebFileChooser...WebImageSkia - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebFileChooserCompletionImpl.cpp: Added. - (WebKit::WebFileChooserCompletionImpl::WebFileChooserCompletionImpl): - (WebKit::WebFileChooserCompletionImpl::~WebFileChooserCompletionImpl): - (WebKit::WebFileChooserCompletionImpl::didChooseFile): - * src/WebFileChooserCompletionImpl.h: Added. - * src/WebFontCache.cpp: Added. - (WebKit::WebFontCache::fontDataCount): - (WebKit::WebFontCache::inactiveFontDataCount): - (WebKit::WebFontCache::clear): - * src/WebFormElement.cpp: Added. - (WebKit::WebFormElement::WebFormElement): - (WebKit::WebFormElement::operator=): - (WebKit::WebFormElement::operator WTF::PassRefPtr<WebCore::HTMLFormElement>): - (WebKit::WebFormElement::autoComplete): - (WebKit::WebFormElement::action): - (WebKit::WebFormElement::submit): - (WebKit::WebFormElement::getNamedElements): - * src/WebFrameImpl.cpp: Added. - (WebKit::frameContentAsPlainText): - (WebKit::ChromePrintContext::ChromePrintContext): - (WebKit::ChromePrintContext::begin): - (WebKit::ChromePrintContext::getPageShrink): - (WebKit::ChromePrintContext::spoolPage): - (WebKit::DataSourceForDocLoader): - (WebKit::WebFrameImpl::DeferredScopeStringMatches::DeferredScopeStringMatches): - (WebKit::WebFrameImpl::DeferredScopeStringMatches::doTimeout): - (WebKit::WebFrame::frameForEnteredContext): - (WebKit::WebFrame::frameForCurrentContext): - (WebKit::WebFrameImpl::name): - (WebKit::WebFrameImpl::url): - (WebKit::WebFrameImpl::favIconURL): - (WebKit::WebFrameImpl::openSearchDescriptionURL): - (WebKit::WebFrameImpl::scrollOffset): - (WebKit::WebFrameImpl::contentsSize): - (WebKit::WebFrameImpl::contentsPreferredWidth): - (WebKit::WebFrameImpl::hasVisibleContent): - (WebKit::WebFrameImpl::view): - (WebKit::WebFrameImpl::opener): - (WebKit::WebFrameImpl::parent): - (WebKit::WebFrameImpl::top): - (WebKit::WebFrameImpl::firstChild): - (WebKit::WebFrameImpl::lastChild): - (WebKit::WebFrameImpl::nextSibling): - (WebKit::WebFrameImpl::previousSibling): - (WebKit::WebFrameImpl::traverseNext): - (WebKit::WebFrameImpl::traversePrevious): - (WebKit::WebFrameImpl::findChildByName): - (WebKit::WebFrameImpl::findChildByExpression): - (WebKit::WebFrameImpl::forms): - (WebKit::WebFrameImpl::securityOrigin): - (WebKit::WebFrameImpl::grantUniversalAccess): - (WebKit::WebFrameImpl::windowObject): - (WebKit::WebFrameImpl::bindToWindowObject): - (WebKit::WebFrameImpl::executeScript): - (WebKit::WebFrameImpl::executeScriptInNewContext): - (WebKit::WebFrameImpl::executeScriptInIsolatedWorld): - (WebKit::WebFrameImpl::addMessageToConsole): - (WebKit::WebFrameImpl::collectGarbage): - (WebKit::WebFrameImpl::mainWorldScriptContext): - (WebKit::WebFrameImpl::insertStyleText): - (WebKit::WebFrameImpl::reload): - (WebKit::WebFrameImpl::loadRequest): - (WebKit::WebFrameImpl::loadHistoryItem): - (WebKit::WebFrameImpl::loadData): - (WebKit::WebFrameImpl::loadHTMLString): - (WebKit::WebFrameImpl::isLoading): - (WebKit::WebFrameImpl::stopLoading): - (WebKit::WebFrameImpl::provisionalDataSource): - (WebKit::WebFrameImpl::dataSource): - (WebKit::WebFrameImpl::previousHistoryItem): - (WebKit::WebFrameImpl::currentHistoryItem): - (WebKit::WebFrameImpl::enableViewSourceMode): - (WebKit::WebFrameImpl::isViewSourceModeEnabled): - (WebKit::WebFrameImpl::setReferrerForRequest): - (WebKit::WebFrameImpl::dispatchWillSendRequest): - (WebKit::WebFrameImpl::commitDocumentData): - (WebKit::WebFrameImpl::unloadListenerCount): - (WebKit::WebFrameImpl::isProcessingUserGesture): - (WebKit::WebFrameImpl::willSuppressOpenerInNewFrame): - (WebKit::WebFrameImpl::replaceSelection): - (WebKit::WebFrameImpl::insertText): - (WebKit::WebFrameImpl::setMarkedText): - (WebKit::WebFrameImpl::unmarkText): - (WebKit::WebFrameImpl::hasMarkedText): - (WebKit::WebFrameImpl::markedRange): - (WebKit::WebFrameImpl::executeCommand): - (WebKit::WebFrameImpl::isCommandEnabled): - (WebKit::WebFrameImpl::enableContinuousSpellChecking): - (WebKit::WebFrameImpl::isContinuousSpellCheckingEnabled): - (WebKit::WebFrameImpl::hasSelection): - (WebKit::WebFrameImpl::selectionRange): - (WebKit::WebFrameImpl::selectionAsText): - (WebKit::WebFrameImpl::selectionAsMarkup): - (WebKit::WebFrameImpl::printBegin): - (WebKit::WebFrameImpl::getPrintPageShrink): - (WebKit::WebFrameImpl::printPage): - (WebKit::WebFrameImpl::printEnd): - (WebKit::WebFrameImpl::find): - (WebKit::WebFrameImpl::stopFinding): - (WebKit::WebFrameImpl::scopeStringMatches): - (WebKit::WebFrameImpl::cancelPendingScopingEffort): - (WebKit::WebFrameImpl::increaseMatchCount): - (WebKit::WebFrameImpl::reportFindInPageSelection): - (WebKit::WebFrameImpl::resetMatchCount): - (WebKit::WebFrameImpl::completeURL): - (WebKit::WebFrameImpl::contentAsText): - (WebKit::WebFrameImpl::contentAsMarkup): - (WebKit::WebFrameImpl::create): - (WebKit::WebFrameImpl::WebFrameImpl): - (WebKit::WebFrameImpl::~WebFrameImpl): - (WebKit::WebFrameImpl::initializeAsMainFrame): - (WebKit::WebFrameImpl::createChildFrame): - (WebKit::WebFrameImpl::layout): - (WebKit::WebFrameImpl::paint): - (WebKit::WebFrameImpl::createFrameView): - (WebKit::WebFrameImpl::fromFrame): - (WebKit::WebFrameImpl::viewImpl): - (WebKit::WebFrameImpl::dataSourceImpl): - (WebKit::WebFrameImpl::provisionalDataSourceImpl): - (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection): - (WebKit::WebFrameImpl::didFail): - (WebKit::WebFrameImpl::setAllowsScrolling): - (WebKit::WebFrameImpl::registerPasswordListener): - (WebKit::WebFrameImpl::getPasswordListener): - (WebKit::WebFrameImpl::closing): - (WebKit::WebFrameImpl::invalidateArea): - (WebKit::WebFrameImpl::addMarker): - (WebKit::WebFrameImpl::setMarkerActive): - (WebKit::WebFrameImpl::ordinalOfFirstMatchForFrame): - (WebKit::WebFrameImpl::shouldScopeMatches): - (WebKit::WebFrameImpl::scopeStringMatchesSoon): - (WebKit::WebFrameImpl::callScopeStringMatches): - (WebKit::WebFrameImpl::invalidateIfNecessary): - (WebKit::WebFrameImpl::clearPasswordListeners): - (WebKit::WebFrameImpl::loadJavaScriptURL): - * src/WebFrameImpl.h: Added. - (WebKit::WebFrameImpl::liveObjectCount): - (WebKit::WebFrameImpl::frame): - (WebKit::WebFrameImpl::frameView): - (WebKit::WebFrameImpl::activeMatchFrame): - (WebKit::WebFrameImpl::client): - (WebKit::WebFrameImpl::dropClient): - (WebKit::WebFrameImpl::ClientHandle::create): - (WebKit::WebFrameImpl::ClientHandle::client): - (WebKit::WebFrameImpl::ClientHandle::dropClient): - (WebKit::WebFrameImpl::ClientHandle::ClientHandle): - (WebKit::WebFrameImpl::): - * src/WebHTTPBody.cpp: Added. - (WebKit::WebHTTPBody::initialize): - (WebKit::WebHTTPBody::reset): - (WebKit::WebHTTPBody::assign): - (WebKit::WebHTTPBody::elementCount): - (WebKit::WebHTTPBody::elementAt): - (WebKit::WebHTTPBody::appendData): - (WebKit::WebHTTPBody::appendFile): - (WebKit::WebHTTPBody::identifier): - (WebKit::WebHTTPBody::setIdentifier): - (WebKit::WebHTTPBody::WebHTTPBody): - (WebKit::WebHTTPBody::operator=): - (WebKit::WebHTTPBody::operator PassRefPtr<FormData>): - (WebKit::WebHTTPBody::ensureMutable): - * src/WebHistoryItem.cpp: Added. - (WebKit::WebHistoryItem::initialize): - (WebKit::WebHistoryItem::reset): - (WebKit::WebHistoryItem::assign): - (WebKit::WebHistoryItem::urlString): - (WebKit::WebHistoryItem::setURLString): - (WebKit::WebHistoryItem::originalURLString): - (WebKit::WebHistoryItem::setOriginalURLString): - (WebKit::WebHistoryItem::referrer): - (WebKit::WebHistoryItem::setReferrer): - (WebKit::WebHistoryItem::target): - (WebKit::WebHistoryItem::setTarget): - (WebKit::WebHistoryItem::parent): - (WebKit::WebHistoryItem::setParent): - (WebKit::WebHistoryItem::title): - (WebKit::WebHistoryItem::setTitle): - (WebKit::WebHistoryItem::alternateTitle): - (WebKit::WebHistoryItem::setAlternateTitle): - (WebKit::WebHistoryItem::lastVisitedTime): - (WebKit::WebHistoryItem::setLastVisitedTime): - (WebKit::WebHistoryItem::scrollOffset): - (WebKit::WebHistoryItem::setScrollOffset): - (WebKit::WebHistoryItem::isTargetItem): - (WebKit::WebHistoryItem::setIsTargetItem): - (WebKit::WebHistoryItem::visitCount): - (WebKit::WebHistoryItem::setVisitCount): - (WebKit::WebHistoryItem::documentState): - (WebKit::WebHistoryItem::setDocumentState): - (WebKit::WebHistoryItem::httpContentType): - (WebKit::WebHistoryItem::setHTTPContentType): - (WebKit::WebHistoryItem::httpBody): - (WebKit::WebHistoryItem::setHTTPBody): - (WebKit::WebHistoryItem::children): - (WebKit::WebHistoryItem::setChildren): - (WebKit::WebHistoryItem::appendToChildren): - (WebKit::WebHistoryItem::WebHistoryItem): - (WebKit::WebHistoryItem::operator=): - (WebKit::WebHistoryItem::operator PassRefPtr<HistoryItem>): - (WebKit::WebHistoryItem::ensureMutable): - * src/WebImageCG.cpp: Added. - (WebKit::WebImage::fromData): - (WebKit::WebImage::reset): - (WebKit::WebImage::assign): - (WebKit::WebImage::isNull): - (WebKit::WebImage::size): - (WebKit::WebImage::WebImage): - (WebKit::WebImage::operator=): - * src/WebImageSkia.cpp: Added. - (WebKit::WebImage::fromData): - (WebKit::WebImage::reset): - (WebKit::WebImage::assign): - (WebKit::WebImage::isNull): - (WebKit::WebImage::size): - (WebKit::WebImage::WebImage): - (WebKit::WebImage::operator=): - -2009-11-09 Yaar Schnitman <yaar@chromium.src> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebData...WebElement - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebData.cpp: Added. - (WebKit::WebData::reset): - (WebKit::WebData::assign): - (WebKit::WebData::size): - (WebKit::WebData::data): - (WebKit::WebData::WebData): - (WebKit::WebData::operator=): - (WebKit::WebData::operator PassRefPtr<SharedBuffer>): - * src/WebDataSourceImpl.cpp: Added. - (WebKit::WebDataSourceImpl::create): - (WebKit::WebDataSourceImpl::originalRequest): - (WebKit::WebDataSourceImpl::request): - (WebKit::WebDataSourceImpl::response): - (WebKit::WebDataSourceImpl::hasUnreachableURL): - (WebKit::WebDataSourceImpl::unreachableURL): - (WebKit::WebDataSourceImpl::redirectChain): - (WebKit::WebDataSourceImpl::pageTitle): - (WebKit::WebDataSourceImpl::navigationType): - (WebKit::WebDataSourceImpl::triggeringEventTime): - (WebKit::WebDataSourceImpl::extraData): - (WebKit::WebDataSourceImpl::setExtraData): - (WebKit::WebDataSourceImpl::toWebNavigationType): - (WebKit::WebDataSourceImpl::endOfRedirectChain): - (WebKit::WebDataSourceImpl::clearRedirectChain): - (WebKit::WebDataSourceImpl::appendRedirect): - (WebKit::WebDataSourceImpl::setNextPluginLoadObserver): - (WebKit::WebDataSourceImpl::WebDataSourceImpl): - (WebKit::WebDataSourceImpl::~WebDataSourceImpl): - * src/WebDataSourceImpl.h: Added. - (WebKit::WebDataSourceImpl::fromDocumentLoader): - (WebKit::WebDataSourceImpl::hasRedirectChain): - (WebKit::WebDataSourceImpl::releasePluginLoadObserver): - * src/WebDatabase.cpp: Added. - (WebKit::WebDatabase::reset): - (WebKit::WebDatabase::assign): - (WebKit::WebDatabase::name): - (WebKit::WebDatabase::displayName): - (WebKit::WebDatabase::estimatedSize): - (WebKit::WebDatabase::securityOrigin): - (WebKit::WebDatabase::setObserver): - (WebKit::WebDatabase::observer): - (WebKit::WebDatabase::updateDatabaseSize): - (WebKit::WebDatabase::WebDatabase): - (WebKit::WebDatabase::operator=): - (WebKit::WebDatabase::operator WTF::PassRefPtr<Database>): - * src/WebDevToolsAgentPrivate.h: Added. - * src/WebDragData.cpp: Added. - (WebKit::WebDragData::initialize): - (WebKit::WebDragData::reset): - (WebKit::WebDragData::assign): - (WebKit::WebDragData::url): - (WebKit::WebDragData::setURL): - (WebKit::WebDragData::urlTitle): - (WebKit::WebDragData::setURLTitle): - (WebKit::WebDragData::fileExtension): - (WebKit::WebDragData::setFileExtension): - (WebKit::WebDragData::hasFileNames): - (WebKit::WebDragData::fileNames): - (WebKit::WebDragData::setFileNames): - (WebKit::WebDragData::appendToFileNames): - (WebKit::WebDragData::plainText): - (WebKit::WebDragData::setPlainText): - (WebKit::WebDragData::htmlText): - (WebKit::WebDragData::setHTMLText): - (WebKit::WebDragData::htmlBaseURL): - (WebKit::WebDragData::setHTMLBaseURL): - (WebKit::WebDragData::fileContentFileName): - (WebKit::WebDragData::setFileContentFileName): - (WebKit::WebDragData::fileContent): - (WebKit::WebDragData::setFileContent): - (WebKit::WebDragData::WebDragData): - (WebKit::WebDragData::operator=): - (WebKit::WebDragData::operator WTF::PassRefPtr<WebCore::ChromiumDataObject>): - (WebKit::WebDragData::ensureMutable): - * src/WebElement.cpp: Added. - (WebKit::WebElement::WebElement): - (WebKit::WebElement::operator=): - (WebKit::WebElement::operator WTF::PassRefPtr<Element>): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - WebPo*.h and WebRunetimeFeatures.h Chromium API headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebPoint.h: Added. - (WebKit::WebPoint::WebPoint): - (WebKit::WebPoint::operator=): - (WebKit::WebPoint::operator WebCore::IntPoint): - (WebKit::WebPoint::operator gfx::Point): - (WebKit::operator==): - (WebKit::operator!=): - * public/WebPopupMenu.h: Added. - * public/WebPopupMenuInfo.h: Added. - (WebKit::WebPopupMenuInfo::Item::): - * public/WebRuntimeFeatures.h: Added. - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - WebPa*.h and WebPl*.h Chromium API headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebPasswordAutocompleteListener.h: Added. - (WebKit::WebPasswordAutocompleteListener::~WebPasswordAutocompleteListener): - * public/WebPasswordFormData.h: Added. - (WebKit::WebPasswordFormData::isValid): - * public/WebPlugin.h: Added. - (WebKit::WebPlugin::~WebPlugin): - * public/WebPluginContainer.h: Added. - (WebKit::WebPluginContainer::~WebPluginContainer): - * public/WebPluginListBuilder.h: Added. - * public/WebPluginParams.h: Added. - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebBindging ... WebCursorInfo - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebBindings.cpp: Added. - (WebKit::WebBindings::construct): - (WebKit::WebBindings::createObject): - (WebKit::WebBindings::enumerate): - (WebKit::WebBindings::evaluate): - (WebKit::WebBindings::evaluateHelper): - (WebKit::WebBindings::getIntIdentifier): - (WebKit::WebBindings::getProperty): - (WebKit::WebBindings::getStringIdentifier): - (WebKit::WebBindings::getStringIdentifiers): - (WebKit::WebBindings::hasMethod): - (WebKit::WebBindings::hasProperty): - (WebKit::WebBindings::identifierIsString): - (WebKit::WebBindings::intFromIdentifier): - (WebKit::WebBindings::initializeVariantWithStringCopy): - (WebKit::WebBindings::invoke): - (WebKit::WebBindings::invokeDefault): - (WebKit::WebBindings::releaseObject): - (WebKit::WebBindings::releaseVariantValue): - (WebKit::WebBindings::removeProperty): - (WebKit::WebBindings::retainObject): - (WebKit::WebBindings::setException): - (WebKit::WebBindings::setProperty): - (WebKit::WebBindings::unregisterObject): - (WebKit::WebBindings::utf8FromIdentifier): - (WebKit::WebBindings::extractIdentifierData): - (WebKit::getEvent): - (WebKit::getDragDataImpl): - (WebKit::getRangeImpl): - (WebKit::WebBindings::getDragData): - (WebKit::WebBindings::isDragEvent): - (WebKit::WebBindings::getRange): - * src/WebCString.cpp: Added. - (WebKit::WebCString::reset): - (WebKit::WebCString::assign): - (WebKit::WebCString::length): - (WebKit::WebCString::data): - (WebKit::WebCString::utf16): - (WebKit::WebCString::fromUTF16): - (WebKit::WebCString::WebCString): - (WebKit::WebCString::operator=): - (WebKit::WebCString::operator WebCore::CString): - * src/WebCache.cpp: Added. - (WebKit::ToResourceTypeStat): - (WebKit::WebCache::setCapacities): - (WebKit::WebCache::clear): - (WebKit::WebCache::getUsageStats): - (WebKit::WebCache::getResourceTypeStats): - * src/WebColor.cpp: Added. - (WebKit::toCSSValueKeyword): - (WebKit::setNamedColors): - * src/WebCrossOriginPreflightResultCache.cpp: Added. - (WebKit::WebCrossOriginPreflightResultCache::clear): - * src/WebCursorInfo.cpp: Added. - (WebKit::WebCursorInfo::WebCursorInfo): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Up-streaming Chromium API src files: WebAccessibilty - - https://bugs.webkit.org/show_bug.cgi?id=31276 - - * src/WebAccessibilityCache.cpp: Added. - (WebKit::WebAccessibilityCache::enableAccessibility): - * src/WebAccessibilityCacheImpl.cpp: Added. - (WebKit::toAccessibilityObject): - (WebKit::WebAccessibilityCache::create): - (WebKit::WebAccessibilityCacheImpl::WeakHandle::create): - (WebKit::WebAccessibilityCacheImpl::WeakHandle::WeakHandle): - (WebKit::WebAccessibilityCacheImpl::WeakHandle::detach): - (WebKit::WebAccessibilityCacheImpl::WebAccessibilityCacheImpl): - (WebKit::WebAccessibilityCacheImpl::~WebAccessibilityCacheImpl): - (WebKit::WebAccessibilityCacheImpl::initialize): - (WebKit::WebAccessibilityCacheImpl::getObjectById): - (WebKit::WebAccessibilityCacheImpl::isValidId): - (WebKit::WebAccessibilityCacheImpl::remove): - (WebKit::WebAccessibilityCacheImpl::clear): - (WebKit::WebAccessibilityCacheImpl::addOrGetId): - * src/WebAccessibilityCacheImpl.h: Added. - (WebKit::WebAccessibilityCacheImpl::isInitialized): - * src/WebAccessibilityObject.cpp: Added. - (WebKit::WebAccessibilityObject::reset): - (WebKit::WebAccessibilityObject::assign): - (WebKit::WebAccessibilityObject::accessibilityDescription): - (WebKit::WebAccessibilityObject::actionVerb): - (WebKit::WebAccessibilityObject::canSetFocusAttribute): - (WebKit::WebAccessibilityObject::childCount): - (WebKit::WebAccessibilityObject::childAt): - (WebKit::WebAccessibilityObject::firstChild): - (WebKit::WebAccessibilityObject::focusedChild): - (WebKit::WebAccessibilityObject::lastChild): - (WebKit::WebAccessibilityObject::nextSibling): - (WebKit::WebAccessibilityObject::parentObject): - (WebKit::WebAccessibilityObject::previousSibling): - (WebKit::WebAccessibilityObject::isAnchor): - (WebKit::WebAccessibilityObject::isChecked): - (WebKit::WebAccessibilityObject::isFocused): - (WebKit::WebAccessibilityObject::isEnabled): - (WebKit::WebAccessibilityObject::isHovered): - (WebKit::WebAccessibilityObject::isIndeterminate): - (WebKit::WebAccessibilityObject::isMultiSelect): - (WebKit::WebAccessibilityObject::isOffScreen): - (WebKit::WebAccessibilityObject::isPasswordField): - (WebKit::WebAccessibilityObject::isPressed): - (WebKit::WebAccessibilityObject::isReadOnly): - (WebKit::WebAccessibilityObject::isVisited): - (WebKit::WebAccessibilityObject::boundingBoxRect): - (WebKit::WebAccessibilityObject::helpText): - (WebKit::WebAccessibilityObject::hitTest): - (WebKit::WebAccessibilityObject::keyboardShortcut): - (WebKit::WebAccessibilityObject::performDefaultAction): - (WebKit::WebAccessibilityObject::roleValue): - (WebKit::WebAccessibilityObject::stringValue): - (WebKit::WebAccessibilityObject::title): - (WebKit::WebAccessibilityObject::WebAccessibilityObject): - (WebKit::WebAccessibilityObject::operator=): - (WebKit::WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming Chromium API: Platform specific files - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/gtk/WebFontInfo.h: Added. - * public/gtk/WebInputEventFactory.h: Added. - * public/gtk/WebScreenInfoFactory.h: Added. - * public/linux/WebFontRendering.h: Added. - * public/linux/WebSandboxSupport.h: Added. - * public/mac/WebInputEventFactory.h: Added. - * public/mac/WebScreenInfoFactory.h: Added. - * public/win/WebInputEventFactory.h: Added. - * public/win/WebSandboxSupport.h: Added. - * public/win/WebScreenInfoFactory.h: Added. - * public/win/WebThemeEngine.h: Added. - * public/x11/WebScreenInfoFactory.h: Added. - -2009-11-09 David Levin <levin@chromium.org> - - Reviewed by Dmitry Titov. - - Change struct ResourceRequest to class ResourceRequest per - http://trac.webkit.org/changeset/50625. - - * public/WebURLRequest.h: - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream remaining Chromium API WebN*.h headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebNonCopyable.h: Added. - (WebKit::WebNonCopyable::WebNonCopyable): - (WebKit::WebNonCopyable::~WebNonCopyable): - * public/WebNotification.h: Added. - (WebKit::WebNotification::WebNotification): - (WebKit::WebNotification::~WebNotification): - (WebKit::WebNotification::operator=): - (WebKit::WebNotification::equals): - (WebKit::operator==): - (WebKit::operator!=): - (WebKit::operator<): - * public/WebNotificationPermissionCallback.h: Added. - (WebKit::WebNotificationPermissionCallback::~WebNotificationPermissionCallback): - * public/WebNotificationPresenter.h: Added. - (WebKit::WebNotificationPresenter::): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream Chromium API headers WebMessage through WebNavigation. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebMessagePortChannel.h: Added. - (WebKit::WebMessagePortChannel::~WebMessagePortChannel): - * public/WebMessagePortChannelClient.h: Added. - (WebKit::WebMessagePortChannelClient::~WebMessagePortChannelClient): - * public/WebMimeRegistry.h: Added. - (WebKit::WebMimeRegistry::): - (WebKit::WebMimeRegistry::~WebMimeRegistry): - * public/WebNavigationPolicy.h: Added. - (WebKit::): - * public/WebNavigationType.h: Added. - (WebKit::): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming the Chromium WebKit API: WebScreenInfo to WebSharedWorkerRepo. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebScreenInfo.h: Added. - (WebKit::WebScreenInfo::WebScreenInfo): - * public/WebScriptController.h: Added. - * public/WebScriptSource.h: Added. - (WebKit::WebScriptSource::WebScriptSource): - * public/WebSearchableFormData.h: Added. - (WebKit::WebSearchableFormData::isValid): - (WebKit::WebSearchableFormData::url): - (WebKit::WebSearchableFormData::encoding): - * public/WebSecurityOrigin.h: Added. - (WebKit::WebSecurityOrigin::~WebSecurityOrigin): - (WebKit::WebSecurityOrigin::WebSecurityOrigin): - (WebKit::WebSecurityOrigin::operator=): - (WebKit::WebSecurityOrigin::isNull): - * public/WebSecurityPolicy.h: Added. - * public/WebSettings.h: Added. - (WebKit::WebSettings::~WebSettings): - * public/WebSharedWorker.h: Added. - (WebKit::WebSharedWorker::~WebSharedWorker): - * public/WebSharedWorkerRepository.h: Added. - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream Chromium API headers Webkit.h thru WebMediaPlayerClient.h. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebKit.h: Added. - * public/WebKitClient.h: Added. - (WebKit::WebKitClient::~WebKitClient): - * public/WebLocalizedString.h: Added. - (WebKit::WebLocalizedString::): - * public/WebMediaPlayer.h: Added. - (WebKit::WebTimeRange::WebTimeRange): - (WebKit::WebMediaPlayer::): - (WebKit::WebMediaPlayer::~WebMediaPlayer): - * public/WebMediaPlayerAction.h: Added. - (WebKit::WebMediaPlayerAction::): - (WebKit::WebMediaPlayerAction::WebMediaPlayerAction): - * public/WebMediaPlayerClient.h: Added. - (WebKit::WebMediaPlayerClient::~WebMediaPlayerClient): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream rest of WebH*.h and WebI*.h Chromium API headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebHTTPBody.h: Added. - (WebKit::WebHTTPBody::Element::): - (WebKit::WebHTTPBody::~WebHTTPBody): - (WebKit::WebHTTPBody::WebHTTPBody): - (WebKit::WebHTTPBody::operator=): - (WebKit::WebHTTPBody::isNull): - * public/WebHTTPHeaderVisitor.h: Added. - (WebKit::WebHTTPHeaderVisitor::~WebHTTPHeaderVisitor): - * public/WebHistoryItem.h: Added. - (WebKit::WebHistoryItem::~WebHistoryItem): - (WebKit::WebHistoryItem::WebHistoryItem): - (WebKit::WebHistoryItem::operator=): - (WebKit::WebHistoryItem::isNull): - * public/WebImage.h: Added. - (WebKit::WebImage::~WebImage): - (WebKit::WebImage::WebImage): - (WebKit::WebImage::operator=): - (WebKit::WebImage::getSkBitmap): - (WebKit::WebImage::init): - (WebKit::WebImage::getCGImageRef): - * public/WebInputEvent.h: Added. - (WebKit::WebInputEvent::WebInputEvent): - (WebKit::WebInputEvent::): - (WebKit::WebInputEvent::isKeyboardEventType): - (WebKit::WebKeyboardEvent::WebKeyboardEvent): - (WebKit::WebMouseEvent::): - (WebKit::WebMouseEvent::WebMouseEvent): - (WebKit::WebMouseWheelEvent::WebMouseWheelEvent): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Eric Seidel. - - Upstreaming the Chromium WebKit API: WebSockets and WebStorage. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebSocketStreamError.h: Added. - * public/WebSocketStreamHandle.h: Added. - (WebKit::WebSocketStreamHandle::~WebSocketStreamHandle): - * public/WebSocketStreamHandleClient.h: Added. - * public/WebStorageArea.h: Added. - (WebKit::WebStorageArea::~WebStorageArea): - * public/WebStorageEventDispatcher.h: Added. - (WebKit::WebStorageEventDispatcher::~WebStorageEventDispatcher): - * public/WebStorageNamespace.h: Added. - (WebKit::WebStorageNamespace::~WebStorageNamespace): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming the Chromium WebKit API: WebString and other basic objects. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebRange.h: Added. - (WebKit::WebRange::~WebRange): - (WebKit::WebRange::WebRange): - (WebKit::WebRange::operator=): - (WebKit::WebRange::isNull): - * public/WebRect.h: Added. - (WebKit::WebRect::isEmpty): - (WebKit::WebRect::WebRect): - (WebKit::WebRect::operator=): - (WebKit::WebRect::operator WebCore::IntRect): - (WebKit::WebRect::operator gfx::Rect): - (WebKit::operator==): - (WebKit::operator!=): - * public/WebSize.h: Added. - (WebKit::WebSize::isEmpty): - (WebKit::WebSize::WebSize): - (WebKit::WebSize::operator=): - (WebKit::WebSize::operator WebCore::IntSize): - (WebKit::WebSize::operator gfx::Size): - (WebKit::operator==): - (WebKit::operator!=): - * public/WebString.h: Added. - (WebKit::WebString::~WebString): - (WebKit::WebString::WebString): - (WebKit::WebString::operator=): - (WebKit::WebString::isEmpty): - (WebKit::WebString::isNull): - (WebKit::WebString::operator string16): - (WebKit::WebString::operator NullableString16): - (WebKit::WebString::fromUTF8): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Eric Seidel. - - Upstreaming the Chromium WebKit API: WebText* - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebTextAffinity.h: Added. - (WebKit::): - * public/WebTextDirection.h: Added. - (WebKit::): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream remainder of WebE*.h and WebF*.h Chromium API headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebEditingAction.h: Added. - (WebKit::): - * public/WebFileChooserCompletion.h: Added. - (WebKit::WebFileChooserCompletion::~WebFileChooserCompletion): - * public/WebFindOptions.h: Added. - (WebKit::WebFindOptions::WebFindOptions): - * public/WebFontCache.h: Added. - * public/WebFrame.h: Added. - (WebKit::WebFrame::~WebFrame): - * public/WebFrameClient.h: Added. - (WebKit::WebFrameClient::createPlugin): - (WebKit::WebFrameClient::createWorker): - (WebKit::WebFrameClient::createSharedWorker): - (WebKit::WebFrameClient::createMediaPlayer): - (WebKit::WebFrameClient::willClose): - (WebKit::WebFrameClient::loadURLExternally): - (WebKit::WebFrameClient::decidePolicyForNavigation): - (WebKit::WebFrameClient::canHandleRequest): - (WebKit::WebFrameClient::cannotHandleRequestError): - (WebKit::WebFrameClient::cancelledError): - (WebKit::WebFrameClient::unableToImplementPolicyWithError): - (WebKit::WebFrameClient::willSubmitForm): - (WebKit::WebFrameClient::willPerformClientRedirect): - (WebKit::WebFrameClient::didCancelClientRedirect): - (WebKit::WebFrameClient::didCompleteClientRedirect): - (WebKit::WebFrameClient::didCreateDataSource): - (WebKit::WebFrameClient::didStartProvisionalLoad): - (WebKit::WebFrameClient::didReceiveServerRedirectForProvisionalLoad): - (WebKit::WebFrameClient::didFailProvisionalLoad): - (WebKit::WebFrameClient::didReceiveDocumentData): - (WebKit::WebFrameClient::didCommitProvisionalLoad): - (WebKit::WebFrameClient::didClearWindowObject): - (WebKit::WebFrameClient::didCreateDocumentElement): - (WebKit::WebFrameClient::didReceiveTitle): - (WebKit::WebFrameClient::didFinishDocumentLoad): - (WebKit::WebFrameClient::didHandleOnloadEvents): - (WebKit::WebFrameClient::didFailLoad): - (WebKit::WebFrameClient::didFinishLoad): - (WebKit::WebFrameClient::didChangeLocationWithinPage): - (WebKit::WebFrameClient::didUpdateCurrentHistoryItem): - (WebKit::WebFrameClient::assignIdentifierToRequest): - (WebKit::WebFrameClient::willSendRequest): - (WebKit::WebFrameClient::didReceiveResponse): - (WebKit::WebFrameClient::didFinishResourceLoad): - (WebKit::WebFrameClient::didFailResourceLoad): - (WebKit::WebFrameClient::didLoadResourceFromMemoryCache): - (WebKit::WebFrameClient::didDisplayInsecureContent): - (WebKit::WebFrameClient::didRunInsecureContent): - (WebKit::WebFrameClient::allowScript): - (WebKit::WebFrameClient::didExhaustMemoryAvailableForScript): - (WebKit::WebFrameClient::didCreateScriptContext): - (WebKit::WebFrameClient::didDestroyScriptContext): - (WebKit::WebFrameClient::didCreateIsolatedScriptContext): - (WebKit::WebFrameClient::didChangeContentsSize): - (WebKit::WebFrameClient::didChangeScrollOffset): - (WebKit::WebFrameClient::reportFindInPageMatchCount): - (WebKit::WebFrameClient::reportFindInPageSelection): - (WebKit::WebFrameClient::~WebFrameClient): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream WebDevTools*.h and WebDrag*.h Chromium API headers. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebDevToolsAgent.h: Added. - (WebKit::WebDevToolsAgent::~WebDevToolsAgent): - * public/WebDevToolsAgentClient.h: Added. - (WebKit::WebDevToolsAgentClient::~WebDevToolsAgentClient): - * public/WebDevToolsFrontend.h: Added. - (WebKit::WebDevToolsFrontend::~WebDevToolsFrontend): - * public/WebDevToolsFrontendClient.h: Added. - (WebKit::WebDevToolsFrontendClient::WebDevToolsFrontendClient): - (WebKit::WebDevToolsFrontendClient::~WebDevToolsFrontendClient): - * public/WebDragData.h: Added. - (WebKit::WebDragData::~WebDragData): - (WebKit::WebDragData::WebDragData): - (WebKit::WebDragData::operator=): - (WebKit::WebDragData::isNull): - * public/WebDragOperation.h: Added. - (WebKit::): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming the Chromium WebKit API: WebURL and friends. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebURL.h: Added. - (WebKit::WebURL::~WebURL): - (WebKit::WebURL::WebURL): - (WebKit::WebURL::operator=): - (WebKit::WebURL::assign): - (WebKit::WebURL::spec): - (WebKit::WebURL::parsed): - (WebKit::WebURL::isValid): - (WebKit::WebURL::isEmpty): - (WebKit::WebURL::isNull): - (WebKit::WebURL::operator GURL): - * public/WebURLError.h: Added. - (WebKit::WebURLError::WebURLError): - * public/WebURLLoader.h: Added. - (WebKit::WebURLLoader::~WebURLLoader): - * public/WebURLLoaderClient.h: Added. - (WebKit::WebURLLoaderClient::~WebURLLoaderClient): - * public/WebURLRequest.h: Added. - (WebKit::WebURLRequest::): - (WebKit::WebURLRequest::~WebURLRequest): - (WebKit::WebURLRequest::WebURLRequest): - (WebKit::WebURLRequest::operator=): - * public/WebURLResponse.h: Added. - (WebKit::WebURLResponse::~WebURLResponse): - (WebKit::WebURLResponse::WebURLResponse): - (WebKit::WebURLResponse::operator=): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming the Chromium WebKit API: WebVector to WebWorkerClient - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebVector.h: Added. - (WebKit::WebVector::~WebVector): - (WebKit::WebVector::WebVector): - (WebKit::WebVector::operator=): - (WebKit::WebVector::assign): - (WebKit::WebVector::size): - (WebKit::WebVector::isEmpty): - (WebKit::WebVector::operator[]): - (WebKit::WebVector::data): - (WebKit::WebVector::swap): - (WebKit::WebVector::initialize): - (WebKit::WebVector::initializeFrom): - (WebKit::WebVector::destroy): - * public/WebView.h: Added. - (WebKit::WebView::~WebView): - * public/WebViewClient.h: Added. - (WebKit::WebViewClient::createView): - (WebKit::WebViewClient::createPopupMenu): - (WebKit::WebViewClient::didAddMessageToConsole): - (WebKit::WebViewClient::printPage): - (WebKit::WebViewClient::notificationPresenter): - (WebKit::WebViewClient::didStartLoading): - (WebKit::WebViewClient::didStopLoading): - (WebKit::WebViewClient::shouldBeginEditing): - (WebKit::WebViewClient::shouldEndEditing): - (WebKit::WebViewClient::shouldInsertNode): - (WebKit::WebViewClient::shouldInsertText): - (WebKit::WebViewClient::shouldChangeSelectedRange): - (WebKit::WebViewClient::shouldDeleteRange): - (WebKit::WebViewClient::shouldApplyStyle): - (WebKit::WebViewClient::isSmartInsertDeleteEnabled): - (WebKit::WebViewClient::isSelectTrailingWhitespaceEnabled): - (WebKit::WebViewClient::setInputMethodEnabled): - (WebKit::WebViewClient::didBeginEditing): - (WebKit::WebViewClient::didChangeSelection): - (WebKit::WebViewClient::didChangeContents): - (WebKit::WebViewClient::didExecuteCommand): - (WebKit::WebViewClient::didEndEditing): - (WebKit::WebViewClient::handleCurrentKeyboardEvent): - (WebKit::WebViewClient::spellCheck): - (WebKit::WebViewClient::autoCorrectWord): - (WebKit::WebViewClient::showSpellingUI): - (WebKit::WebViewClient::isShowingSpellingUI): - (WebKit::WebViewClient::updateSpellingUIWithMisspelledWord): - (WebKit::WebViewClient::runFileChooser): - (WebKit::WebViewClient::runModalAlertDialog): - (WebKit::WebViewClient::runModalConfirmDialog): - (WebKit::WebViewClient::runModalPromptDialog): - (WebKit::WebViewClient::runModalBeforeUnloadDialog): - (WebKit::WebViewClient::setStatusText): - (WebKit::WebViewClient::setMouseOverURL): - (WebKit::WebViewClient::setKeyboardFocusURL): - (WebKit::WebViewClient::setToolTipText): - (WebKit::WebViewClient::showContextMenu): - (WebKit::WebViewClient::startDragging): - (WebKit::WebViewClient::acceptsLoadDrops): - (WebKit::WebViewClient::focusNext): - (WebKit::WebViewClient::focusPrevious): - (WebKit::WebViewClient::navigateBackForwardSoon): - (WebKit::WebViewClient::historyBackListCount): - (WebKit::WebViewClient::historyForwardListCount): - (WebKit::WebViewClient::didAddHistoryItem): - (WebKit::WebViewClient::focusAccessibilityObject): - (WebKit::WebViewClient::didUpdateInspectorSettings): - (WebKit::WebViewClient::queryAutofillSuggestions): - (WebKit::WebViewClient::removeAutofillSuggestions): - (WebKit::WebViewClient::~WebViewClient): - * public/WebWidget.h: Added. - (WebKit::WebWidget::~WebWidget): - * public/WebWidgetClient.h: Added. - (WebKit::WebWidgetClient::didInvalidateRect): - (WebKit::WebWidgetClient::didScrollRect): - (WebKit::WebWidgetClient::didFocus): - (WebKit::WebWidgetClient::didBlur): - (WebKit::WebWidgetClient::didChangeCursor): - (WebKit::WebWidgetClient::closeWidgetSoon): - (WebKit::WebWidgetClient::show): - (WebKit::WebWidgetClient::runModal): - (WebKit::WebWidgetClient::windowRect): - (WebKit::WebWidgetClient::setWindowRect): - (WebKit::WebWidgetClient::windowResizerRect): - (WebKit::WebWidgetClient::rootWindowRect): - (WebKit::WebWidgetClient::screenInfo): - (WebKit::WebWidgetClient::~WebWidgetClient): - * public/WebWorker.h: Added. - (WebKit::WebWorker::~WebWorker): - * public/WebWorkerClient.h: Added. - (WebKit::WebWorkerClient::~WebWorkerClient): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream WebData*.h Chromium API files. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebData.h: Added. - (WebKit::WebData::~WebData): - (WebKit::WebData::WebData): - (WebKit::WebData::operator=): - (WebKit::WebData::isEmpty): - (WebKit::WebData::isNull): - * public/WebDataSource.h: Added. - (WebKit::WebDataSource::ExtraData::~ExtraData): - (WebKit::WebDataSource::~WebDataSource): - * public/WebDatabase.h: Added. - (WebKit::WebDatabase::WebDatabase): - (WebKit::WebDatabase::~WebDatabase): - (WebKit::WebDatabase::operator=): - (WebKit::WebDatabase::isNull): - * public/WebDatabaseObserver.h: Added. - (WebKit::WebDatabaseObserver::~WebDatabaseObserver): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstream the last of the Chromium API WebC*.h files. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebConsoleMessage.h: Added. - (WebKit::WebConsoleMessage::): - (WebKit::WebConsoleMessage::WebConsoleMessage): - * public/WebContextMenuData.h: Added. - (WebKit::WebContextMenuData::): - * public/WebCookie.h: Added. - (WebKit::WebCookie::WebCookie): - * public/WebCrossOriginPreflightResultCache.h: Added. - * public/WebCursorInfo.h: Added. - (WebKit::WebCursorInfo::): - (WebKit::WebCursorInfo::WebCursorInfo): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - More WebC*.h upstreaming. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebCString.h: Added. - (WebKit::WebCString::~WebCString): - (WebKit::WebCString::WebCString): - (WebKit::WebCString::operator=): - (WebKit::WebCString::isEmpty): - (WebKit::WebCString::isNull): - (WebKit::WebCString::operator std::string): - (WebKit::WebCString::fromUTF16): - * public/WebColorName.h: Added. - (WebKit::): - * public/WebCommon.h: Added. - * public/WebCommonWorkerClient.h: Added. - (WebKit::WebCommonWorkerClient::~WebCommonWorkerClient): - * public/WebCompositionCommand.h: Added. - (WebKit::): - -2009-11-09 Yaar Schnitman <yaar@chromium.org> - - Reviewed by Dimitri Glazkov. - - Upstreaming the Chromium WebKit API: WebNode.h and friends are thin wrappers around WebCore::Nodes - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * public/WebElement.h: Added. - (WebKit::WebElement::WebElement): - (WebKit::WebElement::operator=): - (WebKit::WebElement::assign): - * public/WebFormElement.h: Added. - (WebKit::WebFormElement::~WebFormElement): - (WebKit::WebFormElement::WebFormElement): - (WebKit::WebFormElement::operator=): - (WebKit::WebFormElement::assign): - * public/WebInputElement.h: Added. - (WebKit::WebInputElement::WebInputElement): - (WebKit::WebInputElement::operator=): - (WebKit::WebInputElement::assign): - * public/WebNode.h: Added. - (WebKit::WebNode::~WebNode): - (WebKit::WebNode::WebNode): - (WebKit::WebNode::operator=): - (WebKit::WebNode::isNull): - (WebKit::WebNode::toElement): - (WebKit::WebNode::unwrap): - (WebKit::WebNode::constUnwrap): - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - WebKit Chromium API upstreaming, WebBindings.h through WebColor.h. - - * public/WebBindings.h: Added. - * public/WebCache.h: Added. - * public/WebCanvas.h: Added. - * public/WebClipboard.h: Added. - (WebKit::WebClipboard::): - (WebKit::WebClipboard::~WebClipboard): - * public/WebColor.h: Added. - -2009-11-09 Nate Chapin <japhet@chromium.org> - - Reviewed by Dimitri Glazkov. - - Starting upstreaming the Chromium WebKit API. public/ contains header files only. - - https://bugs.webkit.org/show_bug.cgi?id=28394 - - * ChangeLog: First!! - * public: Added. - * public/WebAccessibilityCache.h: Added. - (WebKit::WebAccessibilityCache::WebAccessibilityCache): - (WebKit::WebAccessibilityCache::~WebAccessibilityCache): - * public/WebAccessibilityObject.h: Added. - (WebKit::WebAccessibilityObject::~WebAccessibilityObject): - (WebKit::WebAccessibilityObject::WebAccessibilityObject): - (WebKit::WebAccessibilityObject::operator=): - (WebKit::WebAccessibilityObject::isNull): - * public/WebAccessibilityRole.h: Added. - (WebKit::): - * public/WebApplicationCacheHost.h: Added. - (WebKit::WebApplicationCacheHost::): - (WebKit::WebApplicationCacheHost::~WebApplicationCacheHost): - * public/WebApplicationCacheHostClient.h: Added. - (WebKit::WebApplicationCacheHostClient::~WebApplicationCacheHostClient): diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS deleted file mode 100644 index 7fbcbcd..0000000 --- a/WebKit/chromium/DEPS +++ /dev/null @@ -1,184 +0,0 @@ -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Google Inc. nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# This file is used by gclient to fetch the projects that the webkit -# chromium port depends on. - -vars = { - 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', - 'chromium_rev': '70840' -} - -deps = { - 'chromium_deps': - File(Var('chromium_svn')+'/DEPS@'+Var('chromium_rev')), - - # build tools - 'build': - Var('chromium_svn')+'/build@'+Var('chromium_rev'), - 'tools/data_pack': - Var('chromium_svn')+'/tools/data_pack@'+Var('chromium_rev'), - 'tools/gyp': - From('chromium_deps', 'src/tools/gyp'), - - # Basic tools - 'base': - Var('chromium_svn')+'/base@'+Var('chromium_rev'), - 'gfx': - Var('chromium_svn')+'/gfx@'+Var('chromium_rev'), - - # skia dependencies - 'skia': - Var('chromium_svn')+'/skia@'+Var('chromium_rev'), - 'third_party/skia/src': - From('chromium_deps', 'src/third_party/skia/src'), - 'third_party/skia/include': - From('chromium_deps', 'src/third_party/skia/include'), - - # testing - 'testing': - Var('chromium_svn')+'/testing@'+Var('chromium_rev'), - 'testing/gtest': - From('chromium_deps', 'src/testing/gtest'), - - # v8 javascript engine - 'v8': From('chromium_deps', 'src/v8'), - - # net dependencies - 'net': - Var('chromium_svn')+'/net@'+Var('chromium_rev'), - 'sdch': - Var('chromium_svn')+'/sdch@'+Var('chromium_rev'), - 'sdch/open-vcdiff': - From('chromium_deps', 'src/sdch/open-vcdiff'), - 'googleurl': - From('chromium_deps', 'src/googleurl'), - - # webkit dependencies - 'webkit': Var('chromium_svn')+'/webkit@'+Var('chromium_rev'), - - 'app': - Var('chromium_svn')+'/app@'+Var('chromium_rev'), # needed by appcache - 'gpu': - Var('chromium_svn')+'/gpu@'+Var('chromium_rev'), - 'ipc': - Var('chromium_svn')+'/ipc@'+Var('chromium_rev'), - 'media': - Var('chromium_svn')+'/media@'+Var('chromium_rev'), - 'printing': - Var('chromium_svn')+'/printing@'+Var('chromium_rev'), - 'ppapi': - Var('chromium_svn')+'/ppapi@'+Var('chromium_rev'), - 'third_party/angle': # needed by the gpu process - From('chromium_deps', 'src/third_party/angle'), - 'third_party/libvpx': # needed by webkit/media - From('chromium_deps', 'src/third_party/libvpx'), - 'third_party/ffmpeg': # needed by webkit/media - From('chromium_deps', 'src/third_party/ffmpeg'), - 'third_party/libwebp': - Var('chromium_svn')+'/third_party/libwebp@'+Var('chromium_rev'), - 'tools/grit': - Var('chromium_svn')+'/tools/grit@'+Var('chromium_rev'), - 'tools/generate_stubs': - Var('chromium_svn')+'/tools/generate_stubs@'+Var('chromium_rev'), - - # other third party - 'third_party/icu': - From('chromium_deps', 'src/third_party/icu'), - 'third_party/ots': - From('chromium_deps', 'src/third_party/ots'), - 'third_party/yasm/source/patched-yasm': - From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'), - 'third_party': - Var('chromium_svn')+'/third_party@'+Var('chromium_rev'), -} - -deps_os = { - 'win': { - 'third_party/cygwin': - From('chromium_deps', 'src/third_party/cygwin'), - 'third_party/ffmpeg/binaries/chromium/win/ia32': - From('chromium_deps', 'src/third_party/ffmpeg/binaries/chromium/win/ia32'), - 'third_party/lighttpd': - From('chromium_deps', 'src/third_party/lighttpd'), - 'third_party/nss': - From('chromium_deps', 'src/third_party/nss'), - }, - 'mac': { - 'third_party/nss': - From('chromium_deps', 'src/third_party/nss'), - }, - 'unix': { - # Linux, actually. - 'tools/xdisplaycheck': - Var('chromium_svn')+'/tools/xdisplaycheck@'+Var('chromium_rev'), - 'third_party/openssl': - From('chromium_deps', 'src/third_party/openssl'), - }, -} - -skip_child_includes = [ - # Don't look for dependencies in the following folders: - 'base', - 'build', - 'googleurl', - 'net', - 'sdch', - 'skia', - 'testing', - 'third_party', - 'tools', - 'v8', - 'webkit', -] - -include_rules = [ - # Everybody can use some things. - '+base', - '+build', - '+ipc', - - # For now, we allow ICU to be included by specifying 'unicode/...', although - # this should probably change. - '+unicode', - '+testing', - - # Allow anybody to include files from the 'public' Skia directory in the - # webkit port. This is shared between the webkit port and Chromium. - '+webkit/port/platform/graphics/skia/public', -] - - -hooks = [ - { - # A change to any file in this directory should run the gyp generator. - 'pattern': '.', - 'action': ['python', 'gyp_webkit'], - }, -] diff --git a/WebKit/chromium/README b/WebKit/chromium/README deleted file mode 100644 index ecac503..0000000 --- a/WebKit/chromium/README +++ /dev/null @@ -1,57 +0,0 @@ -This directory contains the Chromium WebKit API. - - -OVERVIEW - - The Chromium WebKit API provides a stable interface to WebCore without - revealing any of the WebCore or WTF types to the consumer. - - The 'public' directory contains the API headers, and the 'src' directory - contains the API implementation. The API is intended to be used either as a - shared or static library. - - -COMPATIBILITY - - No attempt is made to support runtime compatibility in a shared library - build. Instead, the API is intended to support backwards compatibility at - build time. C++ symbols are allowed in other words. - - -DEFINES - - WEBKIT_IMPLEMENTATION is defined when building the 'src' directory. - Consumers should not define this macro. - - WEBKIT_DLL is defined when building as a shared library. This should be - defined when building the 'src' directory, and it should also be defined by - the consumer to ensure proper linkage to the shared library. - - WEBKIT_API is defined for platforms (e.g., Windows) that require additional - annotations on functions and methods, which should be exported from WebKit - when it is built as a DLL. In general, this includes all public methods - unless the methods are defined inline, marked pure virtual, or contained - within a WEBKIT_IMPLEMENTATION section. Also, any private method called by a - public inline-defined method should be annotated with WEBKIT_API. WEBKIT_API - is not used to export whole classes. - - WEBKIT_USING_SKIA is defined when using Skia as the graphics library. - - WEBKIT_USING_CG is defined when using CG as the graphics library. - - WEBKIT_USING_V8 is defined when using V8 as the JavaScript library. - - WEBKIT_USING_JSC is defined when using JSC as the JavaScript library. - - -BASIC TYPES - - Use of STL is prohibited except in cases where it would be allowed in - WebCore. This includes non-allocating uses: algorithms, numeric limits, etc. - WTF container classes should be used in the implementation of this API. - - The API includes some usage of WebCore types when WEBKIT_IMPLEMENTATION is - defined. This is only done for the convenience to the implementation, and - should not be considered part of the Chromium WebKit API. Similarly, STL - types are assumed when WEBKIT_IMPLEMENTATION is not defined, which is done - for the convenience of the consumer. diff --git a/WebKit/chromium/WebKit.grd b/WebKit/chromium/WebKit.grd deleted file mode 100644 index ab89640..0000000 --- a/WebKit/chromium/WebKit.grd +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<grit latest_public_release="0" current_release="1"> - <outputs> - <output filename="grit/webkit_chromium_resources.h" type="rc_header"> - <emit emit_type='prepend'></emit> - </output> - <output filename="webkit_chromium_resources.rc" type="rc_all" /> - <output filename="webkit_chromium_resources.pak" type="data_package" /> - </outputs> - <release seq="1"> - <includes> - <include name="IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS" file="..\..\Source\WebCore\bindings\v8\DebuggerScript.js" type="BINDATA"/> - <include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\Source\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/> - </includes> - </release> -</grit> diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp deleted file mode 100644 index 9385778..0000000 --- a/WebKit/chromium/WebKit.gyp +++ /dev/null @@ -1,1175 +0,0 @@ -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -{ - 'includes': [ - '../../Source/WebCore/WebCore.gypi', - '../../Tools/DumpRenderTree/DumpRenderTree.gypi', - 'WebKit.gypi', - 'features.gypi', - ], - 'variables': { - 'conditions': [ - # Location of the chromium src directory and target type is different - # if webkit is built inside chromium or as standalone project. - ['inside_chromium_build==0', { - # Webkit is being built outside of the full chromium project. - # e.g. via build-webkit --chromium - 'chromium_src_dir': '../../WebKit/chromium', - 'webkit_target_type': 'static_library', - - # List of DevTools source files, ordered by dependencies. It is used both - # for copying them to resource dir, and for generating 'devtools.html' file. - 'devtools_files': [ - '<@(devtools_css_files)', - '<@(devtools_js_files)', - ], - },{ - # WebKit is checked out in src/chromium/third_party/WebKit - 'chromium_src_dir': '../../../..', - 'webkit_target_type': '<(library)', - - 'devtools_files': [ - '<@(devtools_css_files)', - '<@(devtools_js_files)', - ], - }], - ], - 'ahem_path': '../../Tools/DumpRenderTree/qt/fonts/AHEM____.TTF', - - # If debug_devtools is set to 1, JavaScript files for DevTools are - # stored as is. Otherwise, a concatenated file is stored. - 'debug_devtools%': 0, - }, - 'targets': [ - { - 'target_name': 'webkit', - 'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65', - 'dependencies': [ - '../../Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', - '<(chromium_src_dir)/app/app.gyp:app_base', # For GLContext - '<(chromium_src_dir)/skia/skia.gyp:skia', - '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', - '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl', - ], - 'export_dependent_settings': [ - '<(chromium_src_dir)/skia/skia.gyp:skia', - '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', - ], - 'include_dirs': [ - 'public', - 'src', - '<(chromium_src_dir)/third_party/angle/include', - ], - 'defines': [ - 'WEBKIT_IMPLEMENTATION=1', - ], - 'sources': [ - 'public/gtk/WebInputEventFactory.h', - 'public/linux/WebFontRendering.h', - 'public/linux/WebFontRenderStyle.h', - 'public/linux/WebRenderTheme.h', - 'public/linux/WebThemeEngine.h', - 'public/x11/WebScreenInfoFactory.h', - 'public/mac/WebInputEventFactory.h', - 'public/mac/WebSandboxSupport.h', - 'public/mac/WebScreenInfoFactory.h', - 'public/mac/WebThemeEngine.h', - 'public/WebAccessibilityCache.h', - 'public/WebAccessibilityNotification.h', - 'public/WebAccessibilityObject.h', - 'public/WebAccessibilityRole.h', - 'public/WebAnimationController.h', - 'public/WebApplicationCacheHost.h', - 'public/WebApplicationCacheHostClient.h', - 'public/WebAttribute.h', - 'public/WebAudioBus.h', - 'public/WebAudioDevice.h', - 'public/WebAutoFillClient.h', - 'public/WebBindings.h', - 'public/WebBlobData.h', - 'public/WebBlobRegistry.h', - 'public/WebCache.h', - 'public/WebCanvas.h', - 'public/WebClipboard.h', - 'public/WebColor.h', - 'public/WebColorName.h', - 'public/WebCommon.h', - 'public/WebCommonWorkerClient.h', - 'public/WebCompositionUnderline.h', - 'public/WebConsoleMessage.h', - 'public/WebContextMenuData.h', - 'public/WebCookie.h', - 'public/WebCookieJar.h', - 'public/WebCrossOriginPreflightResultCache.h', - 'public/WebCString.h', - 'public/WebCursorInfo.h', - 'public/WebDOMEvent.h', - 'public/WebDOMEventListener.h', - 'public/WebDOMMouseEvent.h', - 'public/WebDOMMutationEvent.h', - 'public/WebDOMStringList.h', - 'public/WebData.h', - 'public/WebDatabase.h', - 'public/WebDatabaseObserver.h', - 'public/WebDataSource.h', - 'public/WebDevToolsAgent.h', - 'public/WebDevToolsAgentClient.h', - 'public/WebDevToolsFrontend.h', - 'public/WebDevToolsFrontendClient.h', - 'public/WebDeviceOrientation.h', - 'public/WebDeviceOrientationClient.h', - 'public/WebDeviceOrientationClientMock.h', - 'public/WebDeviceOrientationController.h', - 'public/WebDocument.h', - 'public/WebDocumentType.h', - 'public/WebDragData.h', - 'public/WebEditingAction.h', - 'public/WebElement.h', - 'public/WebExceptionCode.h', - 'public/WebExternalPopupMenu.h', - 'public/WebExternalPopupMenuClient.h', - 'public/WebFileChooserCompletion.h', - 'public/WebFileChooserParams.h', - 'public/WebFileError.h', - 'public/WebFileInfo.h', - 'public/WebFileSystem.h', - 'public/WebFileSystemCallbacks.h', - 'public/WebFileSystemEntry.h', - 'public/WebFileUtilities.h', - 'public/WebFileWriter.h', - 'public/WebFileWriterClient.h', - 'public/WebFindOptions.h', - 'public/WebFloatPoint.h', - 'public/WebFloatRect.h', - 'public/WebFont.h', - 'public/WebFontDescription.h', - 'public/WebFrame.h', - 'public/WebFrameClient.h', - 'public/WebFontCache.h', - 'public/WebFormControlElement.h', - 'public/WebFormElement.h', - 'public/WebGeolocationClient.h', - 'public/WebGeolocationClientMock.h', - 'public/WebGeolocationController.h', - 'public/WebGeolocationError.h', - 'public/WebGeolocationPermissionRequest.h', - 'public/WebGeolocationPermissionRequestManager.h', - 'public/WebGeolocationPosition.h', - 'public/WebGeolocationService.h', - 'public/WebGeolocationServiceBridge.h', - 'public/WebGeolocationServiceMock.h', - 'public/WebGlyphCache.h', - 'public/WebGraphicsContext3D.h', - 'public/WebHistoryItem.h', - 'public/WebHTTPBody.h', - 'public/WebHTTPLoadInfo.h', - 'public/WebImage.h', - 'public/WebImageDecoder.h', - 'public/WebIDBCallbacks.h', - 'public/WebIDBCursor.h', - 'public/WebIDBDatabase.h', - 'public/WebIDBDatabaseError.h', - 'public/WebIDBFactory.h', - 'public/WebIDBKeyRange.h', - 'public/WebIDBIndex.h', - 'public/WebIDBKey.h', - 'public/WebIDBKeyPath.h', - 'public/WebIDBObjectStore.h', - 'public/WebIDBTransaction.h', - 'public/WebIDBTransactionCallbacks.h', - 'public/WebInputElement.h', - 'public/WebInputEvent.h', - 'public/WebKit.h', - 'public/WebKitClient.h', - 'public/WebLabelElement.h', - 'public/WebLocalizedString.h', - 'public/WebMediaElement.h', - 'public/WebMediaPlayer.h', - 'public/WebMediaPlayerAction.h', - 'public/WebMediaPlayerClient.h', - 'public/WebMenuItemInfo.h', - 'public/WebMessagePortChannel.h', - 'public/WebMessagePortChannelClient.h', - 'public/WebMimeRegistry.h', - 'public/WebNamedNodeMap.h', - 'public/WebNavigationType.h', - 'public/WebNode.h', - 'public/WebNodeCollection.h', - 'public/WebNodeList.h', - 'public/WebNonCopyable.h', - 'public/WebNotification.h', - 'public/WebNotificationPresenter.h', - 'public/WebNotificationPermissionCallback.h', - 'public/WebOptionElement.h', - 'public/WebPageSerializer.h', - 'public/WebPageSerializerClient.h', - 'public/WebPasswordAutocompleteListener.h', - 'public/WebPasswordFormData.h', - 'public/WebPerformance.h', - 'public/WebPlugin.h', - 'public/WebPluginContainer.h', - 'public/WebPluginDocument.h', - 'public/WebPluginListBuilder.h', - 'public/WebPoint.h', - 'public/WebPopupMenu.h', - 'public/WebPopupMenuInfo.h', - 'public/WebPopupType.h', - 'public/WebPrivatePtr.h', - 'public/WebPrivateOwnPtr.h', - 'public/WebRange.h', - 'public/WebRect.h', - 'public/WebRegularExpression.h', - 'public/WebRuntimeFeatures.h', - 'public/WebScrollbar.h', - 'public/WebScrollbarClient.h', - 'public/WebScreenInfo.h', - 'public/WebScriptController.h', - 'public/WebScriptSource.h', - 'public/WebSearchableFormData.h', - 'public/WebSecurityOrigin.h', - 'public/WebSecurityPolicy.h', - 'public/WebSelectElement.h', - 'public/WebSerializedScriptValue.h', - 'public/WebSettings.h', - 'public/WebSharedWorker.h', - 'public/WebSharedWorkerRepository.h', - 'public/WebSize.h', - 'public/WebSocketStreamError.h', - 'public/WebSocketStreamHandle.h', - 'public/WebSocketStreamHandleClient.h', - 'public/WebSpeechInputController.h', - 'public/WebSpeechInputControllerMock.h', - 'public/WebSpeechInputListener.h', - 'public/WebSpeechInputResult.h', - 'public/WebStorageArea.h', - 'public/WebStorageEventDispatcher.h', - 'public/WebStorageNamespace.h', - 'public/WebString.h', - 'public/WebTextAffinity.h', - 'public/WebTextCaseSensitivity.h', - 'public/WebTextDirection.h', - 'public/WebTextInputType.h', - 'public/WebTextRun.h', - 'public/WebThreadSafeData.h', - 'public/WebURL.h', - 'public/WebURLError.h', - 'public/WebURLLoader.h', - 'public/WebURLLoadTiming.h', - 'public/WebURLLoaderClient.h', - 'public/WebURLRequest.h', - 'public/WebURLResponse.h', - 'public/WebVector.h', - 'public/WebView.h', - 'public/WebViewClient.h', - 'public/WebWidget.h', - 'public/WebWidgetClient.h', - 'public/WebWorker.h', - 'public/WebWorkerClient.h', - 'public/win/WebInputEventFactory.h', - 'public/win/WebSandboxSupport.h', - 'public/win/WebScreenInfoFactory.h', - 'public/win/WebThemeEngine.h', - 'src/ApplicationCacheHost.cpp', - 'src/ApplicationCacheHostInternal.h', - 'src/AssertMatchingEnums.cpp', - 'src/AssociatedURLLoader.cpp', - 'src/AssociatedURLLoader.h', - 'src/AsyncFileSystemChromium.cpp', - 'src/AsyncFileSystemChromium.h', - 'src/AsyncFileWriterChromium.cpp', - 'src/AsyncFileWriterChromium.h', - 'src/AudioDestinationChromium.cpp', - 'src/AudioDestinationChromium.h', - 'src/AutoFillPopupMenuClient.cpp', - 'src/AutoFillPopupMenuClient.h', - 'src/BackForwardListClientImpl.cpp', - 'src/BackForwardListClientImpl.h', - 'src/BlobRegistryProxy.cpp', - 'src/BlobRegistryProxy.h', - 'src/BoundObject.cpp', - 'src/BoundObject.h', - 'src/ChromeClientImpl.cpp', - 'src/ChromeClientImpl.h', - 'src/ChromiumBridge.cpp', - 'src/ChromiumCurrentTime.cpp', - 'src/ChromiumThreading.cpp', - 'src/CompositionUnderlineBuilder.h', - 'src/CompositionUnderlineVectorBuilder.cpp', - 'src/CompositionUnderlineVectorBuilder.h', - 'src/ContextMenuClientImpl.cpp', - 'src/ContextMenuClientImpl.h', - 'src/DatabaseObserver.cpp', - 'src/DebuggerAgentImpl.cpp', - 'src/DebuggerAgentImpl.h', - 'src/DebuggerAgentManager.cpp', - 'src/DebuggerAgentManager.h', - 'src/DeviceOrientationClientProxy.cpp', - 'src/DeviceOrientationClientProxy.h', - 'src/DOMUtilitiesPrivate.cpp', - 'src/DOMUtilitiesPrivate.h', - 'src/DragClientImpl.cpp', - 'src/DragClientImpl.h', - 'src/DragScrollTimer.cpp', - 'src/DragScrollTimer.h', - 'src/EditorClientImpl.cpp', - 'src/EditorClientImpl.h', - 'src/EventListenerWrapper.cpp', - 'src/EventListenerWrapper.h', - 'src/Extensions3DChromium.cpp', - 'src/ExternalPopupMenu.cpp', - 'src/ExternalPopupMenu.h', - 'src/FrameLoaderClientImpl.cpp', - 'src/FrameLoaderClientImpl.h', - 'src/FrameNetworkingContextImpl.h', - 'src/GeolocationClientProxy.cpp', - 'src/GeolocationClientProxy.h', - 'src/GraphicsContext3DChromium.cpp', - 'src/GraphicsContext3DInternal.h', - 'src/gtk/WebFontInfo.cpp', - 'src/gtk/WebFontInfo.h', - 'src/gtk/WebInputEventFactory.cpp', - 'src/IDBCallbacksProxy.cpp', - 'src/IDBCallbacksProxy.h', - 'src/IDBCursorBackendProxy.cpp', - 'src/IDBCursorBackendProxy.h', - 'src/IDBDatabaseProxy.cpp', - 'src/IDBDatabaseProxy.h', - 'src/IDBFactoryBackendProxy.cpp', - 'src/IDBFactoryBackendProxy.h', - 'src/IDBIndexBackendProxy.cpp', - 'src/IDBIndexBackendProxy.h', - 'src/IDBObjectStoreProxy.cpp', - 'src/IDBObjectStoreProxy.h', - 'src/IDBTransactionBackendProxy.cpp', - 'src/IDBTransactionBackendProxy.h', - 'src/IDBTransactionCallbacksProxy.cpp', - 'src/IDBTransactionCallbacksProxy.h', - 'src/InspectorClientImpl.cpp', - 'src/InspectorClientImpl.h', - 'src/InspectorFrontendClientImpl.cpp', - 'src/InspectorFrontendClientImpl.h', - 'src/linux/WebFontRendering.cpp', - 'src/linux/WebFontRenderStyle.cpp', - 'src/linux/WebRenderTheme.cpp', - 'src/x11/WebScreenInfoFactory.cpp', - 'src/mac/WebInputEventFactory.mm', - 'src/mac/WebScreenInfoFactory.mm', - 'src/LocalFileSystemChromium.cpp', - 'src/LocalizedStrings.cpp', - 'src/MediaPlayerPrivateChromium.cpp', - 'src/NotificationPresenterImpl.h', - 'src/NotificationPresenterImpl.cpp', - 'src/PlatformMessagePortChannel.cpp', - 'src/PlatformMessagePortChannel.h', - 'src/ResourceHandle.cpp', - 'src/SharedWorkerRepository.cpp', - 'src/SocketStreamHandle.cpp', - 'src/SpeechInputClientImpl.cpp', - 'src/SpeechInputClientImpl.h', - 'src/StorageAreaProxy.cpp', - 'src/StorageAreaProxy.h', - 'src/StorageEventDispatcherChromium.cpp', - 'src/StorageEventDispatcherImpl.cpp', - 'src/StorageEventDispatcherImpl.h', - 'src/StorageNamespaceProxy.cpp', - 'src/StorageNamespaceProxy.h', - 'src/TemporaryGlue.h', - 'src/VideoFrameChromiumImpl.cpp', - 'src/VideoFrameChromiumImpl.h', - 'src/WebAccessibilityCache.cpp', - 'src/WebAccessibilityCacheImpl.cpp', - 'src/WebAccessibilityCacheImpl.h', - 'src/WebAccessibilityObject.cpp', - 'src/WebAnimationControllerImpl.cpp', - 'src/WebAnimationControllerImpl.h', - 'src/WebAttribute.cpp', - 'src/WebAudioBus.cpp', - 'src/WebBindings.cpp', - 'src/WebBlobData.cpp', - 'src/WebCache.cpp', - 'src/WebColor.cpp', - 'src/WebCommon.cpp', - 'src/WebCrossOriginPreflightResultCache.cpp', - 'src/WebCString.cpp', - 'src/WebCursorInfo.cpp', - 'src/WebDOMEvent.cpp', - 'src/WebDOMEventListener.cpp', - 'src/WebDOMEventListenerPrivate.cpp', - 'src/WebDOMEventListenerPrivate.h', - 'src/WebDOMMouseEvent.cpp', - 'src/WebDOMMutationEvent.cpp', - 'src/WebDOMStringList.cpp', - 'src/WebData.cpp', - 'src/WebDatabase.cpp', - 'src/WebDataSourceImpl.cpp', - 'src/WebDataSourceImpl.h', - 'src/WebDevToolsAgentImpl.cpp', - 'src/WebDevToolsAgentImpl.h', - 'src/WebDevToolsFrontendImpl.cpp', - 'src/WebDevToolsFrontendImpl.h', - 'src/WebDeviceOrientation.cpp', - 'src/WebDeviceOrientationClientMock.cpp', - 'src/WebDeviceOrientationController.cpp', - 'src/WebDocument.cpp', - 'src/WebDocumentType.cpp', - 'src/WebDragData.cpp', - 'src/WebElement.cpp', - 'src/WebEntities.cpp', - 'src/WebEntities.h', - 'src/WebFileChooserCompletionImpl.cpp', - 'src/WebFileChooserCompletionImpl.h', - 'src/WebFileSystemCallbacksImpl.cpp', - 'src/WebFileSystemCallbacksImpl.h', - 'src/WebFontCache.cpp', - 'src/WebFontDescription.cpp', - 'src/WebFontImpl.cpp', - 'src/WebFontImpl.h', - 'src/WebFormControlElement.cpp', - 'src/WebFormElement.cpp', - 'src/WebFrameImpl.cpp', - 'src/WebFrameImpl.h', - 'src/WebGeolocationController.cpp', - 'src/WebGeolocationClientMock.cpp', - 'src/WebGeolocationError.cpp', - 'src/WebGeolocationPermissionRequest.cpp', - 'src/WebGeolocationPermissionRequestManager.cpp', - 'src/WebGeolocationPosition.cpp', - 'src/WebGeolocationServiceBridgeImpl.cpp', - 'src/WebGeolocationServiceBridgeImpl.h', - 'src/WebGeolocationServiceMock.cpp', - 'src/WebGlyphCache.cpp', - 'src/WebGraphicsContext3D.cpp', - 'src/WebGraphicsContext3DDefaultImpl.cpp', - 'src/WebGraphicsContext3DDefaultImpl.h', - 'src/WebHistoryItem.cpp', - 'src/WebHTTPBody.cpp', - 'src/WebHTTPLoadInfo.cpp', - 'src/WebIDBCallbacksImpl.cpp', - 'src/WebIDBCallbacksImpl.h', - 'src/WebIDBCursorImpl.cpp', - 'src/WebIDBCursorImpl.h', - 'src/WebIDBDatabaseError.cpp', - 'src/WebIDBDatabaseImpl.cpp', - 'src/WebIDBDatabaseImpl.h', - 'src/WebIDBFactoryImpl.cpp', - 'src/WebIDBFactoryImpl.h', - 'src/WebIDBIndexImpl.cpp', - 'src/WebIDBIndexImpl.h', - 'src/WebIDBKey.cpp', - 'src/WebIDBKeyPath.cpp', - 'src/WebIDBKeyRange.cpp', - 'src/WebIDBObjectStoreImpl.cpp', - 'src/WebIDBObjectStoreImpl.h', - 'src/WebIDBTransactionImpl.cpp', - 'src/WebIDBTransactionImpl.h', - 'src/WebIDBTransactionCallbacksImpl.cpp', - 'src/WebIDBTransactionCallbacksImpl.h', - 'src/WebImageCG.cpp', - 'src/WebImageDecoder.cpp', - 'src/WebImageSkia.cpp', - 'src/WebInputElement.cpp', - 'src/WebInputEvent.cpp', - 'src/WebInputEventConversion.cpp', - 'src/WebInputEventConversion.h', - 'src/WebKit.cpp', - 'src/WebLabelElement.cpp', - 'src/WebMediaElement.cpp', - 'src/WebMediaPlayerClientImpl.cpp', - 'src/WebMediaPlayerClientImpl.h', - 'src/WebNamedNodeMap.cpp', - 'src/WebNode.cpp', - 'src/WebNodeCollection.cpp', - 'src/WebNodeList.cpp', - 'src/WebNotification.cpp', - 'src/WebOptionElement.cpp', - 'src/WebPageSerializer.cpp', - 'src/WebPageSerializerImpl.cpp', - 'src/WebPageSerializerImpl.h', - 'src/WebPasswordFormData.cpp', - 'src/WebPasswordFormUtils.cpp', - 'src/WebPasswordFormUtils.h', - 'src/WebPerformance.cpp', - 'src/WebPluginContainerImpl.h', - 'src/WebPluginContainerImpl.cpp', - 'src/WebPluginDocument.cpp', - 'src/WebPluginListBuilderImpl.cpp', - 'src/WebPluginListBuilderImpl.h', - 'src/WebPluginLoadObserver.cpp', - 'src/WebPluginLoadObserver.h', - 'src/WebPopupMenuImpl.cpp', - 'src/WebPopupMenuImpl.h', - 'src/WebRange.cpp', - 'src/WebRegularExpression.cpp', - 'src/WebRuntimeFeatures.cpp', - 'src/WebScriptController.cpp', - 'src/WebScrollbarImpl.cpp', - 'src/WebScrollbarImpl.h', - 'src/WebSearchableFormData.cpp', - 'src/WebSecurityOrigin.cpp', - 'src/WebSecurityPolicy.cpp', - 'src/WebSelectElement.cpp', - 'src/WebSerializedScriptValue.cpp', - 'src/WebSettingsImpl.cpp', - 'src/WebSettingsImpl.h', - 'src/WebSharedWorkerImpl.cpp', - 'src/WebSharedWorkerImpl.h', - 'src/WebSpeechInputControllerMockImpl.cpp', - 'src/WebSpeechInputControllerMockImpl.h', - 'src/WebSpeechInputResult.cpp', - 'src/WebStorageAreaImpl.cpp', - 'src/WebStorageAreaImpl.h', - 'src/WebStorageEventDispatcherImpl.cpp', - 'src/WebStorageEventDispatcherImpl.h', - 'src/WebStorageNamespaceImpl.cpp', - 'src/WebStorageNamespaceImpl.h', - 'src/WebString.cpp', - 'src/WebTextRun.cpp', - 'src/WebThreadSafeData.cpp', - 'src/WebURL.cpp', - 'src/WebURLLoadTiming.cpp', - 'src/WebURLRequest.cpp', - 'src/WebURLRequestPrivate.h', - 'src/WebURLResponse.cpp', - 'src/WebURLResponsePrivate.h', - 'src/WebURLError.cpp', - 'src/WebViewImpl.cpp', - 'src/WebViewImpl.h', - 'src/WebWorkerBase.cpp', - 'src/WebWorkerBase.h', - 'src/WebWorkerClientImpl.cpp', - 'src/WebWorkerClientImpl.h', - 'src/WebWorkerImpl.cpp', - 'src/WebWorkerImpl.h', - 'src/WorkerAsyncFileSystemChromium.cpp', - 'src/WorkerAsyncFileSystemChromium.h', - 'src/WorkerAsyncFileWriterChromium.cpp', - 'src/WorkerAsyncFileWriterChromium.h', - 'src/WorkerFileSystemCallbacksBridge.cpp', - 'src/WorkerFileSystemCallbacksBridge.h', - 'src/WorkerFileWriterCallbacksBridge.cpp', - 'src/WorkerFileWriterCallbacksBridge.h', - 'src/WrappedResourceRequest.h', - 'src/WrappedResourceResponse.h', - 'src/win/WebInputEventFactory.cpp', - 'src/win/WebScreenInfoFactory.cpp', - ], - 'conditions': [ - ['inside_chromium_build==1 and OS=="win"', { - 'type': '<(component)', - - 'conditions': [ - ['component=="shared_library"', { - 'defines': [ - 'WEBKIT_DLL', - ], - 'dependencies': [ - '../../Source/WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings', - '<(chromium_src_dir)/base/base.gyp:test_support_base', - '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl', - '<(chromium_src_dir)/testing/gtest.gyp:gtest', - '<(chromium_src_dir)/third_party/icu/icu.gyp:*', - '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg', - '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng', - '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml', - '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt', - '<(chromium_src_dir)/third_party/modp_b64/modp_b64.gyp:modp_b64', - '<(chromium_src_dir)/third_party/nss/nss.gyp:*', - '<(chromium_src_dir)/third_party/ots/ots.gyp:ots', - '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib', - '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8', - ], - 'direct_dependent_settings': { - 'defines': [ - 'WEBKIT_DLL', - ], - }, - 'export_dependent_settings': [ - '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl', - '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8', - ], - 'sources': [ - '<@(webkit_unittest_files)', - 'tests/PopupMenuTest.cpp', - 'tests/TransparencyWinTest.cpp', - 'tests/UniscribeHelperTest.cpp', - 'tests/WebUnitTests.cpp' - ] - }], - ], - }, { - 'type': '<(webkit_target_type)' - }], - ['OS=="linux" or OS=="freebsd"', { - 'dependencies': [ - '<(chromium_src_dir)/build/linux/system.gyp:fontconfig', - '<(chromium_src_dir)/build/linux/system.gyp:gtk', - '<(chromium_src_dir)/build/linux/system.gyp:x11', - ], - 'include_dirs': [ - 'public/x11', - 'public/gtk', - 'public/linux', - ], - }, { # else: OS!="linux" and OS!="freebsd" - 'sources/': [ - ['exclude', '/gtk/'], - ['exclude', '/x11/'], - ['exclude', '/linux/'], - ], - }], - ['OS=="mac"', { - 'include_dirs': [ - 'public/mac', - ], - 'sources/': [ - ['exclude', 'Skia\\.cpp$'], - ], - }, { # else: OS!="mac" - 'sources/': [ - ['exclude', '/mac/'], - ['exclude', 'CG\\.cpp$'], - ], - }], - ['OS=="win"', { - 'include_dirs': [ - 'public/win', - ], - }, { # else: OS!="win" - 'sources/': [['exclude', '/win/']], - 'variables': { - # FIXME: Turn on warnings on Windows. - 'chromium_code': 1, - } - }], - ['"ENABLE_3D_CANVAS=1" in feature_defines', { - 'conditions': [ - ['OS=="mac"', { - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', - ], - }, - }], - ], - }], - ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', { - 'sources/': [ - ['exclude', 'WebGeolocationService.*$'], - ], - }, { - 'sources/': [ - ['exclude', 'GeolocationClientProxy.*'], - ['exclude', 'WebGeolocationClient.*'], - ['exclude', 'WebGeolocationController.*'], - ['exclude', 'WebGeolocationError.*'], - ['exclude', 'WebGeolocationPermissionRequest.*'], - ['exclude', 'WebGeolocationPosition.*'], - ], - }] - ], - }, - - { - 'target_name': 'inspector_resources', - 'type': 'none', - 'dependencies': [ - 'devtools_html', - '../../Source/WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources', - ], - 'conditions': [ - ['debug_devtools==0', { - 'dependencies': ['concatenated_devtools_js', - 'concatenated_devtools_css'], - }], - ], - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/resources/inspector', - 'files': [ - '<@(devtools_files)', - '<@(webinspector_files)', - '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js', - ], - 'conditions': [ - ['debug_devtools==0', { - 'files/': [['exclude', '\\.(js|css|html)$']], - }], - ], - }, - { - 'destination': '<(PRODUCT_DIR)/resources/inspector/Images', - 'files': [ - '<@(webinspector_image_files)', - '<@(devtools_image_files)', - ], - }, - ], - }, - { - 'target_name': 'devtools_html', - 'type': 'none', - 'sources': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'], - 'actions': [{ - 'action_name': 'devtools_html', - 'inputs': [ - 'scripts/generate_devtools_html.py', - # See issue 29695: WebKit.gypi is a source file for devtools.html. - 'WebKit.gypi', - '../../Source/WebCore/inspector/front-end/inspector.html', - ], - 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'], - 'action': ['python', '<@(_inputs)', '<@(_outputs)', '<@(debug_devtools)', '<@(devtools_files)'], - }], - }, - { - 'target_name': 'concatenated_devtools_js', - 'type': 'none', - 'dependencies': [ - 'devtools_html', - '../../Source/WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources' - ], - 'sources': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'], - 'actions': [{ - 'action_name': 'concatenate_devtools_js', - 'script_name': 'scripts/concatenate_js_files.py', - 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html', - 'inputs': [ - '<@(_script_name)', - '<@(_input_page)', - '<@(webinspector_files)', - '<@(devtools_files)', - '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js' - ], - 'search_path': [ - '../../Source/WebCore/inspector/front-end', - 'src/js', - '<(SHARED_INTERMEDIATE_DIR)/webcore', - ], - 'outputs': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'], - 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_search_path)', '<@(_outputs)'], - }], - }, - { - 'target_name': 'concatenated_devtools_css', - 'type': 'none', - 'dependencies': [ - 'devtools_html' - ], - 'sources': ['<(PRODUCT_DIR)/resources/inspector/devTools.css'], - 'actions': [{ - 'action_name': 'concatenate_devtools_css', - 'script_name': 'scripts/concatenate_css_files.py', - 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html', - 'inputs': [ - '<@(_script_name)', - '<@(_input_page)', - '<@(webinspector_files)', - '<@(devtools_files)' - ], - 'search_path': [ - '../../Source/WebCore/inspector/front-end', - 'src/js', - ], - 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devTools.css'], - 'action': ['python', '<@(_script_name)', '<@(_input_page)', '<@(_search_path)', '<@(_outputs)'], - }], - }, - { - 'target_name': 'webkit_unit_tests', - 'type': 'executable', - 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD', - 'dependencies': [ - 'webkit', - '../../Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', - '<(chromium_src_dir)/testing/gtest.gyp:gtest', - '<(chromium_src_dir)/base/base.gyp:base', - '<(chromium_src_dir)/base/base.gyp:base_i18n', - '<(chromium_src_dir)/base/base.gyp:test_support_base', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', - ], - 'sources': [ - 'tests/RunAllTests.cpp', - ], - 'include_dirs': [ - 'public', - 'src', - ], - 'conditions': [ - ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', { - 'defines': [ - 'WEBKIT_DLL_UNITTEST', - ], - }, { - 'sources': [ - '<@(webkit_unittest_files)', - ], - 'conditions': [ - ['OS=="win"', { - 'sources': [ - # FIXME: Port PopupMenuTest and WebFrameTest to Linux and Mac. - 'tests/PopupMenuTest.cpp', - 'tests/TransparencyWinTest.cpp', - 'tests/UniscribeHelperTest.cpp', - 'tests/WebFrameTest.cpp', - ], - }], - ['OS=="mac"', { - 'sources!': [ - # FIXME: Port DragImageTest to Mac. - 'tests/DragImageTest.cpp', - ], - }], - ['OS=="linux" or OS=="freebsd"', { - 'sources': [ - 'tests/WebInputEventFactoryTestGtk.cpp', - ], - 'include_dirs': [ - 'public/gtk', - ], - 'variables': { - # FIXME: Enable warnings on other platforms. - 'chromium_code': 1, - }, - }], - ], - }], - ['inside_chromium_build==1 and OS=="win" and component!="shared_library"', { - 'configurations': { - 'Debug_Base': { - 'msvs_settings': { - 'VCLinkerTool': { - 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', - }, - }, - }, - }, - }], - ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', { - 'sources/': [ - ['exclude', 'WebGeolocationService.*$'], - ], - }] - ], - }, - { - 'target_name': 'ImageDiff', - 'type': 'executable', - 'dependencies': [ - 'webkit', - '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', - ], - 'include_dirs': [ - '../../Source/JavaScriptCore', - '<(DEPTH)', - ], - 'sources': [ - '../../Tools/DumpRenderTree/chromium/ImageDiff.cpp', - ], - }, - { - 'target_name': 'DumpRenderTree', - 'type': 'executable', - 'mac_bundle': 1, - 'dependencies': [ - 'ImageDiff', - 'inspector_resources', - 'TestNetscapePlugIn', - 'copy_TestNetscapePlugIn', - 'webkit', - '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config', - '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc', - '<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob', - '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support', - ], - 'include_dirs': [ - '<(chromium_src_dir)', - 'public', - '../../Source/JavaScriptCore', - '../../Source/JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/. - '<(DEPTH)', - ], - 'defines': [ - # Technically not a unit test but require functions available only to - # unit tests. - 'UNIT_TEST', - ], - 'sources': [ - '<@(drt_files)', - ], - 'conditions': [ - ['OS=="win"', { - 'dependencies': ['LayoutTestHelper'], - - 'resource_include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/webkit'], - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc', - ], - 'conditions': [ - ['inside_chromium_build==1 and component=="shared_library"', { - 'sources': [ - 'src/ChromiumCurrentTime.cpp', - 'src/ChromiumThreading.cpp', - ], - 'include_dirs': [ - 'public', - ], - 'dependencies': [ - '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf', - ], - }], - ['inside_chromium_build==1', { - 'configurations': { - 'Debug_Base': { - 'msvs_settings': { - 'VCLinkerTool': { - 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', - }, - }, - }, - }, - }], - ], - 'copies': [{ - 'destination': '<(PRODUCT_DIR)', - 'files': ['<(ahem_path)'], - }], - },{ # OS!="win" - 'sources/': [ - ['exclude', 'Win\\.cpp$'], - ], - 'actions': [ - { - 'action_name': 'repack_locale', - 'variables': { - 'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py', - 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', - ]}, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], - 'process_outputs_as_mac_bundle_resources': 1, - }, - ], # actions - }], - ['OS=="mac"', { - 'dependencies': [ - 'copy_mesa', - 'LayoutTestHelper', - ], - 'mac_bundle_resources': [ - '<(ahem_path)', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf', - '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf', - '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png', - ], - },{ # OS!="mac" - 'sources/': [ - # .mm is already excluded by common.gypi - ['exclude', 'Mac\\.cpp$'], - ], - }], - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { - 'dependencies': [ - '<(chromium_src_dir)/build/linux/system.gyp:fontconfig', - '<(chromium_src_dir)/build/linux/system.gyp:gtk', - ], - 'include_dirs': [ - 'public/gtk', - ], - 'copies': [{ - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(ahem_path)', - '../../Tools/DumpRenderTree/chromium/fonts.conf', - '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak', - ] - }], - 'variables': { - # FIXME: Enable warnings on other platforms. - 'chromium_code': 1, - }, - },{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris" - 'sources/': [ - ['exclude', '(Gtk|Linux)\\.cpp$'] - ] - }], - ['inside_chromium_build==0', { - 'dependencies': [ - '<(chromium_src_dir)/webkit/support/setup_third_party.gyp:third_party_headers', - ] - }], - ], - }, - { - 'target_name': 'TestNetscapePlugIn', - 'type': 'loadable_module', - 'sources': [ '<@(test_plugin_files)' ], - 'dependencies': [ - '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi', - ], - 'include_dirs': [ - '<(chromium_src_dir)', - '../../Tools/DumpRenderTree/TestNetscapePlugIn', - '../../Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders', - ], - 'conditions': [ - ['OS=="mac"', { - 'mac_bundle': 1, - # It would be nice to name this - # TestNetscapePlugIn, but that name is already - # used by the fork of this plugin in Chromium. - 'product_name': 'WebKitTestNetscapePlugIn', - 'product_extension': 'plugin', - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', - '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', - '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', - ] - }, - 'xcode_settings': { - 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', - # This is a temporary fork of - # DRT/TestNetscapePlugIn/mac/Info.plist. Once - # we get rid of our forked plugin in the - # chromium repo, we can share the same - # Info.plist. - 'INFOPLIST_FILE': '../../Tools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist', - }, - }], - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { - 'cflags': [ - '-fvisibility=default', - ], - }], - ['OS=="win"', { - 'defines': [ - # This seems like a hack, but this is what Safari Win does. - 'snprintf=_snprintf', - ], - 'sources': [ - '../../Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def', - '../../Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc', - ], - # The .rc file requires that the name of the dll is npTestNetscapePlugin.dll. - # This adds the 'np' to the dll name. - 'product_prefix': 'np', - }], - ], - }, - { - 'target_name': 'copy_TestNetscapePlugIn', - 'type': 'none', - 'dependencies': [ - 'TestNetscapePlugIn', - ], - 'conditions': [ - ['OS=="win"', { - 'copies': [{ - 'destination': '<(PRODUCT_DIR)/plugins', - 'files': ['<(PRODUCT_DIR)/npTestNetscapePlugIn.dll'], - }], - }], - ['OS=="mac"', { - 'copies': [{ - 'destination': '<(PRODUCT_DIR)/plugins/', - 'files': ['<(PRODUCT_DIR)/WebKitTestNetscapePlugIn.plugin/'], - }], - }], - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { - 'copies': [{ - 'destination': '<(PRODUCT_DIR)/plugins', - 'files': ['<(PRODUCT_DIR)/libTestNetscapePlugIn.so'], - }], - }], - ], - }, - ], # targets - 'conditions': [ - ['OS=="win"', { - 'targets': [{ - 'target_name': 'LayoutTestHelper', - 'type': 'executable', - 'sources': ['../../Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'], - }], - }], - ['OS=="mac"', { - 'targets': [ - { - 'target_name': 'LayoutTestHelper', - 'type': 'executable', - 'sources': ['../../Tools/DumpRenderTree/chromium/LayoutTestHelper.mm'], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', - ], - }, - }, - { - 'target_name': 'copy_mesa', - 'type': 'none', - 'dependencies': ['<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa'], - 'copies': [{ - 'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/MacOS/', - 'files': ['<(PRODUCT_DIR)/osmesa.so'], - }], - }, - ], - }], - ], # conditions -} - -# Local Variables: -# tab-width:2 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi deleted file mode 100644 index 016cf1a..0000000 --- a/WebKit/chromium/WebKit.gypi +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -{ - 'variables': { - # List of DevTools source files, ordered by dependencies. It is used both - # for copying them to resource dir, and for generating 'devtools.html' file. - 'devtools_js_files': [ - 'src/js/DevTools.js', - 'src/js/Tests.js', - ], - 'devtools_css_files': [ - 'src/js/devTools.css', - ], - 'devtools_image_files': [ - 'src/js/Images/segmentChromium.png', - 'src/js/Images/segmentHoverChromium.png', - 'src/js/Images/segmentHoverEndChromium.png', - 'src/js/Images/segmentSelectedChromium.png', - 'src/js/Images/segmentSelectedEndChromium.png', - 'src/js/Images/statusbarBackgroundChromium.png', - 'src/js/Images/statusbarBottomBackgroundChromium.png', - 'src/js/Images/statusbarButtonsChromium.png', - 'src/js/Images/statusbarMenuButtonChromium.png', - 'src/js/Images/statusbarMenuButtonSelectedChromium.png', - ], - 'webkit_unittest_files': [ - 'tests/ArenaTestHelpers.h', - 'tests/DragImageTest.cpp', - 'tests/IDBBindingUtilitiesTest.cpp', - 'tests/IDBKeyPathTest.cpp', - 'tests/KeyboardTest.cpp', - 'tests/KURLTest.cpp', - 'tests/PODArenaTest.cpp', - 'tests/PODIntervalTreeTest.cpp', - 'tests/PODRedBlackTreeTest.cpp', - 'tests/TilingDataTest.cpp', - 'tests/TreeTestHelpers.cpp', - 'tests/TreeTestHelpers.h', - ], - }, -} - -# Local Variables: -# tab-width:2 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=2 shiftwidth=2: diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi deleted file mode 100644 index 372cc5c..0000000 --- a/WebKit/chromium/features.gypi +++ /dev/null @@ -1,102 +0,0 @@ -# -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -{ - # The following defines turn webkit features on and off. - 'variables': { - 'variables': { - # We have to nest variables inside variables as a hack for variables - # override. - - # WARNING: build/features_override.gypi which is included in a full - # chromium build, overrides this list with its own values. See - # features_override.gypi inline documentation for more details. - 'feature_defines': [ - 'ENABLE_3D_CANVAS=1', - 'ENABLE_3D_RENDERING=1', - 'ENABLE_ACCELERATED_2D_CANVAS=1', - 'ENABLE_BLOB=1', - 'ENABLE_BLOB_SLICE=1', - 'ENABLE_CHANNEL_MESSAGING=1', - 'ENABLE_CLIENT_BASED_GEOLOCATION=1', - 'ENABLE_DASHBOARD_SUPPORT=0', - 'ENABLE_DATABASE=1', - 'ENABLE_DATAGRID=0', - 'ENABLE_DEVICE_ORIENTATION=1', - 'ENABLE_DIRECTORY_UPLOAD=1', - 'ENABLE_DOM_STORAGE=1', - 'ENABLE_EVENTSOURCE=1', - 'ENABLE_FILE_SYSTEM=1', - 'ENABLE_FILTERS=1', - 'ENABLE_GEOLOCATION=1', - 'ENABLE_ICONDATABASE=0', - 'ENABLE_INDEXED_DATABASE=1', - 'ENABLE_INPUT_SPEECH=1', - 'ENABLE_JAVASCRIPT_DEBUGGER=1', - 'ENABLE_JSC_MULTIPLE_THREADS=0', - 'ENABLE_LINK_PREFETCH=1', - 'ENABLE_MATHML=0', - 'ENABLE_METER_TAG=1', - 'ENABLE_NOTIFICATIONS=1', - 'ENABLE_OFFLINE_WEB_APPLICATIONS=1', - 'ENABLE_OPENTYPE_SANITIZER=1', - 'ENABLE_ORIENTATION_EVENTS=0', - 'ENABLE_PROGRESS_TAG=1', - 'ENABLE_SHARED_WORKERS=1', - 'ENABLE_SVG=1', - 'ENABLE_SVG_ANIMATION=1', - 'ENABLE_SVG_AS_IMAGE=1', - 'ENABLE_SVG_FONTS=1', - 'ENABLE_SVG_FOREIGN_OBJECT=1', - 'ENABLE_SVG_USE=1', - 'ENABLE_TOUCH_EVENTS=1', - 'ENABLE_V8_SCRIPT_DEBUG_SERVER=1', - 'ENABLE_VIDEO=1', - 'ENABLE_WEB_AUDIO=0', - 'ENABLE_WEB_SOCKETS=1', - 'ENABLE_WEB_TIMING=1', - 'ENABLE_WORKERS=1', - 'ENABLE_XHR_RESPONSE_BLOB=1', - 'ENABLE_XPATH=1', - 'ENABLE_XSLT=1', - 'WTF_USE_ACCELERATED_COMPOSITING=1', - 'WTF_USE_WEBP=1', - 'WTF_USE_WEBKIT_IMAGE_DECODERS=1', - ], - - 'use_accelerated_compositing%': 1, - 'enable_svg%': 1, - }, - - 'feature_defines%': '<(feature_defines)', - 'use_accelerated_compositing%': '<(use_accelerated_compositing)', - 'enable_svg%': '<(enable_svg)', - }, -} diff --git a/WebKit/chromium/gyp_webkit b/WebKit/chromium/gyp_webkit deleted file mode 100755 index b7d2308..0000000 --- a/WebKit/chromium/gyp_webkit +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2009 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Google Inc. nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# This file is used by gclient execute gyp with the proper command -# line arguments. - -import glob -import os -import shlex -import sys - -script_dir = os.path.dirname(__file__) - -sys.path.append(os.path.join(script_dir, 'tools', 'gyp', 'pylib')) -import gyp - -def additional_include_files(args=[]): - """ - Returns a list of additional (.gypi) files to include, without - duplicating ones that are already specified on the command line. - """ - # Determine the include files specified on the command line. - # This doesn't cover all the different option formats you can use, - # but it's mainly intended to avoid duplicating flags on the automatic - # makefile regeneration which only uses this format. - specified_includes = set() - for arg in args: - if arg.startswith('-I') and len(arg) > 2: - specified_includes.add(os.path.realpath(arg[2:])) - - result = [] - def AddInclude(path): - if os.path.realpath(path) not in specified_includes: - result.append(path) - - # Always include common.gypi - AddInclude(os.path.join(script_dir, 'build', 'common.gypi')) - - # Optionally add supplemental .gypi files if present. - supplements = glob.glob(os.path.join(script_dir, '*', 'supplement.gypi')) - for supplement in supplements: - AddInclude(supplement) - - return result - -if __name__ == '__main__': - - args = sys.argv[1:] - - # Add includes. - args.extend(['-I' + i for i in additional_include_files(args)]) - - # On linux, we want gyp to output a makefile (default is scons). - if sys.platform == 'linux2': - args.extend(['-fmake', - '--suffix=.chromium', - '--toplevel-dir=../..', - # auto_regeneration doesn't work with toplevel-dir - '-Gauto_regeneration=0']) - - # Other command args: - args.extend([ - # gyp variable defines. - '-Dinside_chromium_build=0', - '-Dv8_use_snapshot=false', - '-Dmsvs_use_common_release=0', - - # gyp hack: otherwise gyp assumes its in chromium's src/ dir. - '--depth=./', - - # gyp file to execute. - 'WebKit.gyp']) - - print 'Updating webkit projects from gyp files...' - sys.stdout.flush() - - # Off we go... - sys.exit(gyp.main(args)) diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h deleted file mode 100644 index bb2fc7b..0000000 --- a/WebKit/chromium/public/WebAccessibilityCache.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAccessibilityCache_h -#define WebAccessibilityCache_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebView; -class WebAccessibilityObject; - -class WebAccessibilityCache { -public: - WebAccessibilityCache() {} - virtual ~WebAccessibilityCache() {} - - WEBKIT_API static WebAccessibilityCache* create(); - WEBKIT_API static void enableAccessibility(); - WEBKIT_API static bool accessibilityEnabled(); - - virtual void initialize(WebView* view) = 0; - virtual bool isInitialized() const = 0; - - virtual WebAccessibilityObject getObjectById(int) = 0; - virtual int addOrGetId(const WebAccessibilityObject& object) = 0; - virtual bool isCached(const WebAccessibilityObject&) = 0; - - virtual void remove(int) = 0; - virtual void clear() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebAccessibilityNotification.h b/WebKit/chromium/public/WebAccessibilityNotification.h deleted file mode 100644 index c4a9551..0000000 --- a/WebKit/chromium/public/WebAccessibilityNotification.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAccessibilityNotification_h -#define WebAccessibilityNotification_h - -namespace WebKit { - -enum WebAccessibilityNotification { - WebAccessibilityNotificationActiveDescendantChanged, - WebAccessibilityNotificationCheckedStateChanged, - WebAccessibilityNotificationChildrenChanged, - WebAccessibilityNotificationFocusedUIElementChanged, - WebAccessibilityNotificationLayoutComplete, - WebAccessibilityNotificationLoadComplete, - WebAccessibilityNotificationSelectedChildrenChanged, - WebAccessibilityNotificationSelectedTextChanged, - WebAccessibilityNotificationValueChanged, - WebAccessibilityNotificationScrolledToAnchor, - WebAccessibilityNotificationLiveRegionChanged, - WebAccessibilityNotificationMenuListValueChanged, - WebAccessibilityNotificationRowCountChanged, - WebAccessibilityNotificationRowCollapsed, - WebAccessibilityNotificationRowExpanded, - WebAccessibilityNotificationInvalid -}; - -} // namespace WebKit - -#endif // WebAccessibilityNotification_h diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h deleted file mode 100644 index 182d124..0000000 --- a/WebKit/chromium/public/WebAccessibilityObject.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAccessibilityObject_h -#define WebAccessibilityObject_h - -#include "WebAccessibilityRole.h" -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class AccessibilityObject; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebAccessibilityObjectPrivate; -class WebNode; -class WebDocument; -class WebString; -class WebURL; -struct WebPoint; -struct WebRect; - -// A container for passing around a reference to AccessibilityObject. -class WebAccessibilityObject { -public: - ~WebAccessibilityObject() { reset(); } - - WebAccessibilityObject() : m_private(0) { } - WebAccessibilityObject(const WebAccessibilityObject& o) : m_private(0) { assign(o); } - WebAccessibilityObject& operator=(const WebAccessibilityObject& o) - { - assign(o); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebAccessibilityObject&); - - bool isNull() const { return !m_private; } - - WEBKIT_API WebString accessibilityDescription() const; - WEBKIT_API WebString actionVerb() const; - WEBKIT_API bool canSetFocusAttribute() const; - WEBKIT_API bool canSetValueAttribute() const; - WEBKIT_API bool isValid() const; - - WEBKIT_API unsigned childCount() const; - - WEBKIT_API WebAccessibilityObject childAt(unsigned) const; - WEBKIT_API WebAccessibilityObject firstChild() const; - WEBKIT_API WebAccessibilityObject focusedChild() const; - WEBKIT_API WebAccessibilityObject lastChild() const; - WEBKIT_API WebAccessibilityObject nextSibling() const; - WEBKIT_API WebAccessibilityObject parentObject() const; - WEBKIT_API WebAccessibilityObject previousSibling() const; - - WEBKIT_API bool canSetSelectedAttribute() const; - WEBKIT_API bool isAnchor() const; - WEBKIT_API bool isChecked() const; - WEBKIT_API bool isCollapsed() const; - WEBKIT_API bool isFocused() const; - WEBKIT_API bool isEnabled() const; - WEBKIT_API bool isHovered() const; - WEBKIT_API bool isIndeterminate() const; - WEBKIT_API bool isLinked() const; - WEBKIT_API bool isMultiSelectable() const; - WEBKIT_API bool isOffScreen() const; - WEBKIT_API bool isPasswordField() const; - WEBKIT_API bool isPressed() const; - WEBKIT_API bool isReadOnly() const; - WEBKIT_API bool isSelected() const; - WEBKIT_API bool isVisible() const; - WEBKIT_API bool isVisited() const; - - WEBKIT_API WebRect boundingBoxRect() const; - WEBKIT_API WebString helpText() const; - WEBKIT_API int headingLevel() const; - WEBKIT_API WebAccessibilityObject hitTest(const WebPoint&) const; - WEBKIT_API WebString keyboardShortcut() const; - WEBKIT_API bool performDefaultAction() const; - WEBKIT_API WebAccessibilityRole roleValue() const; - WEBKIT_API void setFocused(bool) const; - WEBKIT_API WebString stringValue() const; - WEBKIT_API WebString title() const; - WEBKIT_API WebURL url() const; - - WEBKIT_API WebNode node() const; - WEBKIT_API WebDocument document() const; - WEBKIT_API bool hasComputedStyle() const; - WEBKIT_API WebString computedStyleDisplay() const; - -#if WEBKIT_IMPLEMENTATION - WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>&); - WebAccessibilityObject& operator=(const WTF::PassRefPtr<WebCore::AccessibilityObject>&); - operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const; -#endif - -private: - void assign(WebAccessibilityObjectPrivate*); - WebAccessibilityObjectPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebAccessibilityRole.h b/WebKit/chromium/public/WebAccessibilityRole.h deleted file mode 100644 index b0748a7..0000000 --- a/WebKit/chromium/public/WebAccessibilityRole.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAccessibilityRole_h -#define WebAccessibilityRole_h - -#include "WebCommon.h" - -namespace WebKit { - -// These values must match WebCore::AccessibilityRole values -enum WebAccessibilityRole { - WebAccessibilityRoleUnknown = 1, - WebAccessibilityRoleButton, - WebAccessibilityRoleRadioButton, - WebAccessibilityRoleCheckBox, - WebAccessibilityRoleSlider, - WebAccessibilityRoleTabGroup, - WebAccessibilityRoleTextField, - WebAccessibilityRoleStaticText, - WebAccessibilityRoleTextArea, - WebAccessibilityRoleScrollArea, - WebAccessibilityRolePopUpButton, - WebAccessibilityRoleMenuButton, - WebAccessibilityRoleTable, - WebAccessibilityRoleApplication, - WebAccessibilityRoleGroup, - WebAccessibilityRoleRadioGroup, - WebAccessibilityRoleList, - WebAccessibilityRoleScrollBar, - WebAccessibilityRoleValueIndicator, - WebAccessibilityRoleImage, - WebAccessibilityRoleMenuBar, - WebAccessibilityRoleMenu, - WebAccessibilityRoleMenuItem, - WebAccessibilityRoleColumn, - WebAccessibilityRoleRow, - WebAccessibilityRoleToolbar, - WebAccessibilityRoleBusyIndicator, - WebAccessibilityRoleProgressIndicator, - WebAccessibilityRoleWindow, - WebAccessibilityRoleDrawer, - WebAccessibilityRoleSystemWide, - WebAccessibilityRoleOutline, - WebAccessibilityRoleIncrementor, - WebAccessibilityRoleBrowser, - WebAccessibilityRoleComboBox, - WebAccessibilityRoleSplitGroup, - WebAccessibilityRoleSplitter, - WebAccessibilityRoleColorWell, - WebAccessibilityRoleGrowArea, - WebAccessibilityRoleSheet, - WebAccessibilityRoleHelpTag, - WebAccessibilityRoleMatte, - WebAccessibilityRoleRuler, - WebAccessibilityRoleRulerMarker, - WebAccessibilityRoleLink, - WebAccessibilityRoleDisclosureTriangle, - WebAccessibilityRoleGrid, - WebAccessibilityRoleCell, - WebAccessibilityRoleColumnHeader, - WebAccessibilityRoleRowHeader, - - WebAccessibilityRoleWebCoreLink, - WebAccessibilityRoleImageMapLink, - WebAccessibilityRoleImageMap, - WebAccessibilityRoleListMarker, - WebAccessibilityRoleWebArea, - WebAccessibilityRoleHeading, - WebAccessibilityRoleListBox, - WebAccessibilityRoleListBoxOption, - WebAccessibilityRoleTableHeaderContainer, - WebAccessibilityRoleDefinitionListTerm, - WebAccessibilityRoleDefinitionListDefinition, - WebAccessibilityRoleAnnotation, - WebAccessibilityRoleSliderThumb, - WebAccessibilityRoleIgnored, - WebAccessibilityRolePresentational, - WebAccessibilityRoleTab, - WebAccessibilityRoleTabList, - WebAccessibilityRoleTabPanel, - WebAccessibilityRoleTreeRole, - WebAccessibilityRoleTreeGrid, - WebAccessibilityRoleTreeItemRole, - WebAccessibilityRoleDirectory, - WebAccessibilityRoleEditableText, - - WebAccessibilityRoleListItem, - WebAccessibilityRoleMenuListPopup, - WebAccessibilityRoleMenuListOption, - - WebAccessibilityRoleLandmarkApplication, - WebAccessibilityRoleLandmarkBanner, - WebAccessibilityRoleLandmarkComplementary, - WebAccessibilityRoleLandmarkContentInfo, - WebAccessibilityRoleLandmarkMain, - WebAccessibilityRoleLandmarkNavigation, - WebAccessibilityRoleLandmarkSearch, - - WebAccessibilityRoleApplicationAlert, - WebAccessibilityRoleApplicationAlertDialog, - WebAccessibilityRoleApplicationDialog, - WebAccessibilityRoleApplicationLog, - WebAccessibilityRoleApplicationMarquee, - WebAccessibilityRoleApplicationStatus, - WebAccessibilityRoleApplicationTimer, - - WebAccessibilityRoleDocument, - WebAccessibilityRoleDocumentArticle, - WebAccessibilityRoleDocumentMath, - WebAccessibilityRoleDocumentNote, - WebAccessibilityRoleDocumentRegion, - - WebAccessibilityRoleUserInterfaceTooltip -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h deleted file mode 100644 index c61e531..0000000 --- a/WebKit/chromium/public/WebAnimationController.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAnimationController_h -#define WebAnimationController_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebElement; -class WebString; -class WebURL; - -// WebAnimationController can be used to control animations in a frame. It is -// owned by a WebFrame and its life span is bound to that WebFrame. -class WebAnimationController { -public: - virtual bool pauseAnimationAtTime(WebElement&, - const WebString& animationName, - double time) = 0; - virtual bool pauseTransitionAtTime(WebElement&, - const WebString& propertyName, - double time) = 0; - - virtual unsigned numberOfActiveAnimations() const = 0; - virtual void suspendAnimations() const = 0; - virtual void resumeAnimations() const = 0; - -protected: - ~WebAnimationController() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebApplicationCacheHost.h b/WebKit/chromium/public/WebApplicationCacheHost.h deleted file mode 100644 index acbc106..0000000 --- a/WebKit/chromium/public/WebApplicationCacheHost.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebApplicationCacheHost_h -#define WebApplicationCacheHost_h - -#include "WebCommon.h" -#include "WebURL.h" -#include "WebVector.h" - -namespace WebKit { - -class WebApplicationCacheHostClient; -class WebURL; -class WebURLRequest; -class WebURLResponse; -struct WebURLError; - -// This interface is used by webkit to call out to the embedder. Webkit uses -// the WebFrameClient::createApplicationCacheHost method to create instances, -// and calls delete when the instance is no longer needed. -class WebApplicationCacheHost { -public: - // These values must match WebCore::ApplicationCacheHost::Status values - enum Status { - Uncached, - Idle, - Checking, - Downloading, - UpdateReady, - Obsolete - }; - - // These values must match WebCore::ApplicationCacheHost::EventID values - enum EventID { - CheckingEvent, - ErrorEvent, - NoUpdateEvent, - DownloadingEvent, - ProgressEvent, - UpdateReadyEvent, - CachedEvent, - ObsoleteEvent - }; - - virtual ~WebApplicationCacheHost() { } - - // Called for every request made within the context. - virtual void willStartMainResourceRequest(WebURLRequest&) { } - virtual void willStartSubResourceRequest(WebURLRequest&) { } - - // One or the other selectCache methods is called after having parsed the <html> tag. - // The latter returns false if the current document has been identified as a "foreign" - // entry, in which case the frame navigation will be restarted by webkit. - virtual void selectCacheWithoutManifest() { } - virtual bool selectCacheWithManifest(const WebURL& manifestURL) { return true; } - - // Called as the main resource is retrieved. - virtual void didReceiveResponseForMainResource(const WebURLResponse&) { } - virtual void didReceiveDataForMainResource(const char* data, int len) { } - virtual void didFinishLoadingMainResource(bool success) { } - - // Called on behalf of the scriptable interface. - virtual Status status() { return Uncached; } - virtual bool startUpdate() { return false; } - virtual bool swapCache() { return false; } - - // Structures and methods to support inspecting Application Caches. - struct CacheInfo { - WebURL manifestURL; // Empty if there is no associated cache. - double creationTime; - double updateTime; - long long totalSize; - CacheInfo() : creationTime(0), updateTime(0), totalSize(0) { } - }; - struct ResourceInfo { - WebURL url; - long long size; - bool isMaster; - bool isManifest; - bool isExplicit; - bool isForeign; - bool isFallback; - ResourceInfo() : size(0), isMaster(false), isManifest(false), isExplicit(false), isForeign(false), isFallback(false) { } - }; - virtual void getAssociatedCacheInfo(CacheInfo*) { } - virtual void getResourceList(WebVector<ResourceInfo>*) { } - virtual void deleteAssociatedCacheGroup() { } -}; - -} // namespace WebKit - -#endif // WebApplicationCacheHost_h - diff --git a/WebKit/chromium/public/WebApplicationCacheHostClient.h b/WebKit/chromium/public/WebApplicationCacheHostClient.h deleted file mode 100644 index 3f84c51..0000000 --- a/WebKit/chromium/public/WebApplicationCacheHostClient.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebApplicationCacheHostClient_h -#define WebApplicationCacheHostClient_h - -#include "WebApplicationCacheHost.h" -#include "WebCommon.h" - -namespace WebKit { - -// This interface is used by the embedder to call into webkit. -class WebApplicationCacheHostClient { -public: - // Called when a different cache, including possibly no cache, is associated with the host. - virtual void didChangeCacheAssociation() = 0; - - // Called to fire events in the scriptable interface. - virtual void notifyEventListener(WebApplicationCacheHost::EventID) = 0; - virtual void notifyProgressEventListener(const WebURL&, int num_total, int num_complete) = 0; - -protected: - // Should not be deleted by the embedder. - virtual ~WebApplicationCacheHostClient() { } -}; - -} // namespace WebKit - -#endif // WebApplicationCacheHostClient_h - diff --git a/WebKit/chromium/public/WebAttribute.h b/WebKit/chromium/public/WebAttribute.h deleted file mode 100644 index 56e140b..0000000 --- a/WebKit/chromium/public/WebAttribute.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAttribute_h -#define WebAttribute_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class Attribute; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebString; - -// Provides readonly access to some properties of a DOM attribute. -class WebAttribute { -public: - ~WebAttribute() { reset(); } - - WebAttribute() { } - WebAttribute(const WebAttribute& n) { assign(n); } - WebAttribute& operator=(const WebAttribute& n) - { - assign(n); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebAttribute&); - - WEBKIT_API WebString localName() const; - WEBKIT_API WebString value() const; - -#if WEBKIT_IMPLEMENTATION - WebAttribute(const WTF::PassRefPtr<WebCore::Attribute>&); -#endif - -private: - WebPrivatePtr<WebCore::Attribute> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebAudioBus.h b/WebKit/chromium/public/WebAudioBus.h deleted file mode 100644 index b7f8d74..0000000 --- a/WebKit/chromium/public/WebAudioBus.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAudioBus_h -#define WebAudioBus_h - -#include "WebCommon.h" - -namespace WebCore { class AudioBus; } - -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassOwnPtr; } -#endif - -namespace WebKit { - -class WebAudioBusPrivate; - -// A container for multi-channel linear PCM audio data. -// -// WARNING: It is not safe to pass a WebAudioBus across threads!!! -// -class WebAudioBus { -public: - WebAudioBus() : m_private(0) { } - ~WebAudioBus() { reset(); } - - // initialize() allocates memory of the given length for the given number of channels. - WEBKIT_API void initialize(unsigned numberOfChannels, size_t length, double sampleRate); - - // reset() releases the memory allocated from initialize(). - WEBKIT_API void reset(); - - WEBKIT_API unsigned numberOfChannels() const; - WEBKIT_API size_t length() const; - WEBKIT_API double sampleRate() const; - - WEBKIT_API float* channelData(unsigned channelIndex); - -#if WEBKIT_IMPLEMENTATION - WTF::PassOwnPtr<WebCore::AudioBus> release(); -#endif - -private: - // Disallow copy and assign. - WebAudioBus(const WebAudioBus&); - void operator=(const WebAudioBus&); - - WebCore::AudioBus* m_private; -}; - -} // namespace WebKit - -#endif // WebAudioBus_h diff --git a/WebKit/chromium/public/WebAudioDevice.h b/WebKit/chromium/public/WebAudioDevice.h deleted file mode 100644 index a9f5a1c..0000000 --- a/WebKit/chromium/public/WebAudioDevice.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAudioDevice_h -#define WebAudioDevice_h - -#include "WebVector.h" - -namespace WebKit { - -// Abstract interface to the Chromium audio system. - -class WebAudioDevice { -public: - class RenderCallback { - public: - virtual void render(const WebVector<float*>& audioData, size_t numberOfFrames) = 0; - protected: - virtual ~RenderCallback() { } - }; - - virtual ~WebAudioDevice() { } - - virtual void start() = 0; - virtual void stop() = 0; -}; - -} // namespace WebKit - -#endif // WebAudioDevice_h diff --git a/WebKit/chromium/public/WebAutoFillClient.h b/WebKit/chromium/public/WebAutoFillClient.h deleted file mode 100644 index 4e73be0..0000000 --- a/WebKit/chromium/public/WebAutoFillClient.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAutoFillClient_h -#define WebAutoFillClient_h - -namespace WebKit { - -class WebInputElement; -class WebKeyboardEvent; -class WebNode; -class WebString; - -class WebAutoFillClient { -public: - // Informs the browser that the user has accepted an AutoFill suggestion for - // a WebNode. |uniqueID| is used as a key into the set of AutoFill profiles, - // and should never be negative. If it is 0, then the suggestion is an - // Autocomplete suggestion; and |value| stores the suggested text. |index| - // is an index of the selected suggestion in the list of suggestions provided - // by the client. - virtual void didAcceptAutoFillSuggestion(const WebNode&, - const WebString& value, - const WebString& label, - int uniqueID, - unsigned index) { } - - // Informs the browser that the user has selected an AutoFill suggestion for - // a WebNode. This happens when the user hovers over a suggestion or uses - // the arrow keys to navigate to a suggestion. - virtual void didSelectAutoFillSuggestion(const WebNode&, - const WebString& name, - const WebString& label, - int uniqueID) { } - - // Informs the browser that the user has cleared the selection from the - // AutoFill suggestions popup. This happens when a user uses the arrow - // keys to navigate outside the range of possible selections. - virtual void didClearAutoFillSelection(const WebNode&) { } - - // Instructs the browser to remove the Autocomplete entry specified from - // its DB. - virtual void removeAutocompleteSuggestion(const WebString& name, - const WebString& value) { } - - // Informs the browser that the user has selected an autocomplete (password - // or field) suggestion from the drop-down. The input element text has - // already been set to the selected suggestion. - virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { } - - // These methods are called when the users edits a text-field. - virtual void textFieldDidBeginEditing(const WebInputElement&) { } - virtual void textFieldDidEndEditing(const WebInputElement&) { } - virtual void textFieldDidChange(const WebInputElement&) { } - virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { } - -protected: - ~WebAutoFillClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebBindings.h b/WebKit/chromium/public/WebBindings.h deleted file mode 100644 index cb33781..0000000 --- a/WebKit/chromium/public/WebBindings.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebBindings_h -#define WebBindings_h - -#include "WebCommon.h" -#include "WebString.h" -#include "WebVector.h" -#include <bindings/npruntime.h> - -namespace WebKit { - -class WebDragData; -class WebElement; -class WebRange; - -// A haphazard collection of functions for dealing with plugins. -class WebBindings { -public: - // NPN Functions ------------------------------------------------------ - // These are all defined in npruntime.h and are well documented. - - // NPN_Construct - WEBKIT_API static bool construct(NPP, NPObject*, const NPVariant* args, uint32_t argCount, NPVariant* result); - - // NPN_CreateObject - WEBKIT_API static NPObject* createObject(NPP, NPClass*); - - // NPN_Enumerate - WEBKIT_API static bool enumerate(NPP, NPObject*, NPIdentifier**, uint32_t* count); - - // NPN_Evaluate - WEBKIT_API static bool evaluate(NPP, NPObject*, NPString* script, NPVariant* result); - - // NPN_EvaluateHelper - WEBKIT_API static bool evaluateHelper(NPP, bool popupsAllowed, NPObject*, NPString* script, NPVariant* result); - - // NPN_GetIntIdentifier - WEBKIT_API static NPIdentifier getIntIdentifier(int32_t number); - - // NPN_GetProperty - WEBKIT_API static bool getProperty(NPP, NPObject*, NPIdentifier propertyName, NPVariant *result); - - // NPN_GetStringIdentifier - WEBKIT_API static NPIdentifier getStringIdentifier(const NPUTF8* string); - - // NPN_GetStringIdentifiers - WEBKIT_API static void getStringIdentifiers(const NPUTF8** names, int32_t nameCount, NPIdentifier*); - - // NPN_HasMethod - WEBKIT_API static bool hasMethod(NPP, NPObject*, NPIdentifier methodName); - - // NPN_HasProperty - WEBKIT_API static bool hasProperty(NPP, NPObject*, NPIdentifier propertyName); - - // NPN_IdentifierIsString - WEBKIT_API static bool identifierIsString(NPIdentifier); - - // NPN_InitializeVariantWithStringCopy (though sometimes prefixed with an underscore) - WEBKIT_API static void initializeVariantWithStringCopy(NPVariant*, const NPString*); - - // NPN_IntFromIdentifier - WEBKIT_API static int32_t intFromIdentifier(NPIdentifier); - - // NPN_Invoke - WEBKIT_API static bool invoke(NPP, NPObject*, NPIdentifier methodName, const NPVariant* args, uint32_t count, NPVariant* result); - - // NPN_InvokeDefault - WEBKIT_API static bool invokeDefault(NPP, NPObject*, const NPVariant* args, uint32_t count, NPVariant* result); - - // NPN_ReleaseObject - WEBKIT_API static void releaseObject(NPObject*); - - // NPN_ReleaseVariantValue - WEBKIT_API static void releaseVariantValue(NPVariant*); - - // NPN_RemoveProperty - WEBKIT_API static bool removeProperty(NPP, NPObject*, NPIdentifier); - - // NPN_RetainObject - WEBKIT_API static NPObject* retainObject(NPObject*); - - // NPN_SetException - WEBKIT_API static void setException(NPObject*, const NPUTF8* message); - - // NPN_SetProperty - WEBKIT_API static bool setProperty(NPP, NPObject*, NPIdentifier, const NPVariant*); - - // _NPN_UnregisterObject - WEBKIT_API static void unregisterObject(NPObject*); - - // NPN_UTF8FromIdentifier - WEBKIT_API static NPUTF8* utf8FromIdentifier(NPIdentifier); - - // Miscellaneous utility functions ---------------------------------------- - - // Complement to NPN_Get___Identifier functions. Extracts data from the NPIdentifier data - // structure. If isString is true upon return, string will be set but number's value is - // undefined. If iString is false, the opposite is true. - WEBKIT_API static void extractIdentifierData(const NPIdentifier&, const NPUTF8*& string, int32_t& number, bool& isString); - - // Return true (success) if the given npobj is the current drag event in browser dispatch, - // and is accessible based on context execution frames and their security origins and - // WebKit clipboard access policy. If so, return the event id and the clipboard data (WebDragData). - // This only works with V8. If compiled without V8, it'll always return false. - WEBKIT_API static bool getDragData(NPObject* event, int* eventId, WebDragData*); - - // Invoke the event access policy checks listed above with GetDragData(). No need for clipboard - // data or event_id outputs, just confirm the given npobj is the current & accessible drag event. - // This only works with V8. If compiled without V8, it'll always return false. - WEBKIT_API static bool isDragEvent(NPObject* event); - - // Return true (success) if the given npobj is a range object. - // If so, return that range as a WebRange object. - WEBKIT_API static bool getRange(NPObject* range, WebRange*); - - // Return true (success) if the given npobj is an element. - // If so, return that element as a WebElement object. - WEBKIT_API static bool getElement(NPObject* element, WebElement*); - - WEBKIT_API static NPObject* makeIntArray(const WebVector<int>&); - WEBKIT_API static NPObject* makeStringArray(const WebVector<WebString>&); - - // Exceptions ------------------------------------------------------------- - - typedef void (ExceptionHandler)(void* data, const NPUTF8* message); - - // The exception handler will be notified of any exceptions thrown while - // operating on a NPObject. - WEBKIT_API static void pushExceptionHandler(ExceptionHandler, void* data); - WEBKIT_API static void popExceptionHandler(); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebBlobData.h b/WebKit/chromium/public/WebBlobData.h deleted file mode 100644 index 67b6cd6..0000000 --- a/WebKit/chromium/public/WebBlobData.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebBlobData_h -#define WebBlobData_h - -#include "WebThreadSafeData.h" -#include "WebString.h" -#include "WebURL.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class BlobData; } -namespace WTF { template <typename T> class PassOwnPtr; } -#endif - -namespace WebKit { - -class WebBlobDataPrivate; - -class WebBlobData { -public: - struct Item { - enum { TypeData, TypeFile, TypeBlob } type; - WebThreadSafeData data; - WebString filePath; - WebURL blobURL; - long long offset; - long long length; // -1 means go to the end of the file/blob. - double expectedModificationTime; // 0.0 means that the time is not set. - }; - - ~WebBlobData() { reset(); } - - WebBlobData() : m_private(0) { } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - - bool isNull() const { return !m_private; } - - // Returns the number of items. - WEBKIT_API size_t itemCount() const; - - // Retrieves the values of the item at the given index. Returns false if - // index is out of bounds. - WEBKIT_API bool itemAt(size_t index, Item& result) const; - - WEBKIT_API WebString contentType() const; - - WEBKIT_API WebString contentDisposition() const; - -#if WEBKIT_IMPLEMENTATION - WebBlobData(const WTF::PassOwnPtr<WebCore::BlobData>&); - WebBlobData& operator=(const WTF::PassOwnPtr<WebCore::BlobData>&); - operator WTF::PassOwnPtr<WebCore::BlobData>(); -#endif - -private: -#if WEBKIT_IMPLEMENTATION - void assign(const WTF::PassOwnPtr<WebCore::BlobData>&); -#endif - WebBlobDataPrivate* m_private; -}; - -} // namespace WebKit - -#endif // WebBlobData_h diff --git a/WebKit/chromium/public/WebBlobRegistry.h b/WebKit/chromium/public/WebBlobRegistry.h deleted file mode 100644 index 7c5be55..0000000 --- a/WebKit/chromium/public/WebBlobRegistry.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebBlobRegistry_h -#define WebBlobRegistry_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebBlobData; -class WebURL; - -class WebBlobRegistry { -public: - WEBKIT_API static WebBlobRegistry* create(); - - virtual ~WebBlobRegistry() { } - - // Registers a blob URL referring to the specified blob data. - virtual void registerBlobURL(const WebURL&, WebBlobData&) = 0; - - // Registers a blob URL referring to the blob data identified by the specified srcURL. - virtual void registerBlobURL(const WebURL&, const WebURL& srcURL) = 0; - - virtual void unregisterBlobURL(const WebURL&) = 0; -}; - -} // namespace WebKit - -#endif // WebBlobRegistry_h diff --git a/WebKit/chromium/public/WebCString.h b/WebKit/chromium/public/WebCString.h deleted file mode 100644 index 0320eb6..0000000 --- a/WebKit/chromium/public/WebCString.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCString_h -#define WebCString_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include <wtf/Forward.h> -#else -#include <string> -#endif - -namespace WTF { -class CString; -} - -namespace WebKit { - -class WebCStringPrivate; -class WebString; - -// A single-byte string container with unspecified encoding. It is -// inexpensive to copy a WebCString object. -// -// WARNING: It is not safe to pass a WebCString across threads!!! -// -class WebCString { -public: - ~WebCString() { reset(); } - - WebCString() : m_private(0) { } - - WebCString(const char* data, size_t len) : m_private(0) - { - assign(data, len); - } - - WebCString(const WebCString& s) : m_private(0) { assign(s); } - - WebCString& operator=(const WebCString& s) - { - assign(s); - return *this; - } - - // Returns 0 if both strings are equals, a value greater than zero if the - // first character that does not match has a greater value in this string - // than in |other|, or a value less than zero to indicate the opposite. - WEBKIT_API int compare(const WebCString& other) const; - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebCString&); - WEBKIT_API void assign(const char* data, size_t len); - - WEBKIT_API size_t length() const; - WEBKIT_API const char* data() const; - - bool isEmpty() const { return !length(); } - bool isNull() const { return !m_private; } - - WEBKIT_API WebString utf16() const; - - WEBKIT_API static WebCString fromUTF16(const WebUChar* data, size_t length); - WEBKIT_API static WebCString fromUTF16(const WebUChar* data); - -#if WEBKIT_IMPLEMENTATION - WebCString(const WTF::CString&); - WebCString& operator=(const WTF::CString&); - operator WTF::CString() const; -#else - WebCString(const std::string& s) : m_private(0) - { - assign(s.data(), s.length()); - } - - WebCString& operator=(const std::string& s) - { - assign(s.data(), s.length()); - return *this; - } - - operator std::string() const - { - size_t len = length(); - return len ? std::string(data(), len) : std::string(); - } - - template <class UTF16String> - static WebCString fromUTF16(const UTF16String& s) - { - return fromUTF16(s.data(), s.length()); - } -#endif - -private: - void assign(WebCStringPrivate*); - WebCStringPrivate* m_private; -}; - -inline bool operator<(const WebCString& a, const WebCString& b) -{ - return a.compare(b) < 0; -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCache.h b/WebKit/chromium/public/WebCache.h deleted file mode 100644 index e8a18d3..0000000 --- a/WebKit/chromium/public/WebCache.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCache_h -#define WebCache_h - -#include "WebCommon.h" - -namespace WebKit { - -// An interface to query and configure WebKit's resource cache. -class WebCache { -public: - struct UsageStats { - // Capacities. - size_t minDeadCapacity; - size_t maxDeadCapacity; - size_t capacity; - // Utilization. - size_t liveSize; - size_t deadSize; - }; - - // A struct mirroring WebCore::MemoryCache::TypeStatistic. - struct ResourceTypeStat { - size_t count; - size_t size; - size_t liveSize; - size_t decodedSize; - }; - - // A struct mirroring WebCore::MemoryCache::Statistics. - struct ResourceTypeStats { - ResourceTypeStat images; - ResourceTypeStat cssStyleSheets; - ResourceTypeStat scripts; - ResourceTypeStat xslStyleSheets; - ResourceTypeStat fonts; - }; - - // Sets the capacities of the resource cache, evicting objects as necessary. - WEBKIT_API static void setCapacities(size_t minDeadCapacity, - size_t maxDeadCapacity, - size_t capacity); - - // Clears the cache (as much as possible; some resources may not be - // cleared if they are actively referenced). - WEBKIT_API static void clear(); - - // Gets the usage statistics from the resource cache. - WEBKIT_API static void getUsageStats(UsageStats*); - - // Get usage stats about the resource cache. - WEBKIT_API static void getResourceTypeStats(ResourceTypeStats*); - -private: - WebCache(); // Not intended to be instanced. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCanvas.h b/WebKit/chromium/public/WebCanvas.h deleted file mode 100644 index 4675487..0000000 --- a/WebKit/chromium/public/WebCanvas.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCanvas_h -#define WebCanvas_h - -#include "WebCommon.h" - -#if WEBKIT_USING_SKIA -namespace skia { class PlatformCanvas; } -#elif WEBKIT_USING_CG -struct CGContext; -#endif - -namespace WebKit { - -#if WEBKIT_USING_SKIA -typedef skia::PlatformCanvas WebCanvas; -#elif WEBKIT_USING_CG -typedef struct CGContext WebCanvas; -#else -#error "Need to define WebCanvas" -#endif - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebClipboard.h b/WebKit/chromium/public/WebClipboard.h deleted file mode 100644 index 861c522..0000000 --- a/WebKit/chromium/public/WebClipboard.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebClipboard_h -#define WebClipboard_h - -#include "WebCommon.h" -#include "WebString.h" -#include "WebVector.h" - -namespace WebKit { - -class WebDragData; -class WebImage; -class WebURL; - -class WebClipboard { -public: - enum Format { - FormatHTML, - FormatBookmark, - FormatSmartPaste - }; - - enum Buffer { - BufferStandard, - // Used on platforms like the X Window System that treat selection - // as a type of clipboard. - BufferSelection, - // Read-only buffer corresponding to the current drag operation, if any. - BufferDrag, - }; - - virtual bool isFormatAvailable(Format, Buffer) { return false; } - - virtual WebString readPlainText(Buffer) { return WebString(); } - virtual WebString readHTML(Buffer, WebURL*) { return WebString(); } - - virtual void writePlainText(const WebString&) { } - virtual void writeHTML( - const WebString& htmlText, const WebURL&, - const WebString& plainText, bool writeSmartPaste) { } - virtual void writeURL( - const WebURL&, const WebString& title) { } - virtual void writeImage( - const WebImage&, const WebURL&, const WebString& title) { } - virtual void writeData( - const WebString& type, - const WebString& data, - const WebString& metadata) { } - - // The following functions are used for reading platform data for copy and - // paste, drag and drop, and selection copy (on X). - virtual WebVector<WebString> readAvailableTypes( - Buffer, bool* containsFilenames) { return WebVector<WebString>(); } - // Returns true if the requested type was successfully read from the buffer. - virtual bool readData( - Buffer, const WebString& type, WebString* data, - WebString* metadata) { return false; } - virtual WebVector<WebString> readFilenames( - Buffer) { return WebVector<WebString>(); } - -protected: - ~WebClipboard() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebColor.h b/WebKit/chromium/public/WebColor.h deleted file mode 100644 index 034f8db..0000000 --- a/WebKit/chromium/public/WebColor.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebColor_h -#define WebColor_h - -#include "WebColorName.h" -#include "WebCommon.h" - -namespace WebKit { - -typedef unsigned WebColor; // RGBA quad. Equivalent to SkColor. - -// Sets the values of a set of named colors. -WEBKIT_API void setNamedColors(const WebColorName*, const WebColor*, size_t length); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebColorName.h b/WebKit/chromium/public/WebColorName.h deleted file mode 100644 index f97ed26..0000000 --- a/WebKit/chromium/public/WebColorName.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Copyright (C) 2009 Google Inc. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following disclaimer -* in the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Google Inc. nor the names of its -* contributors may be used to endorse or promote products derived from -* this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef WebColorName_h -#define WebColorName_h - -namespace WebKit { - -enum WebColorName { - WebColorActiveBorder, - WebColorActiveCaption, - WebColorAppworkspace, - WebColorBackground, - WebColorButtonFace, - WebColorButtonHighlight, - WebColorButtonShadow, - WebColorButtonText, - WebColorCaptionText, - WebColorGrayText, - WebColorHighlight, - WebColorHighlightText, - WebColorInactiveBorder, - WebColorInactiveCaption, - WebColorInactiveCaptionText, - WebColorInfoBackground, - WebColorInfoText, - WebColorMenu, - WebColorMenuText, - WebColorScrollbar, - WebColorText, - WebColorThreedDarkShadow, - WebColorThreedShadow, - WebColorThreedFace, - WebColorThreedHighlight, - WebColorThreedLightShadow, - WebColorWebkitFocusRingColor, - WebColorWindow, - WebColorWindowFrame, - WebColorWindowText -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCommon.h b/WebKit/chromium/public/WebCommon.h deleted file mode 100644 index 2bfa17d..0000000 --- a/WebKit/chromium/public/WebCommon.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCommon_h -#define WebCommon_h - -// ----------------------------------------------------------------------------- -// Default configuration - -#if !defined(WEBKIT_IMPLEMENTATION) - #define WEBKIT_IMPLEMENTATION 0 -#endif - -#if !defined(WEBKIT_USING_SKIA) - #if !defined(__APPLE__) - #define WEBKIT_USING_SKIA 1 - #else - #define WEBKIT_USING_SKIA 0 - #endif -#endif - -#if !defined(WEBKIT_USING_CG) - #if defined(__APPLE__) - #define WEBKIT_USING_CG 1 - #else - #define WEBKIT_USING_CG 0 - #endif -#endif - -#if !defined(WEBKIT_USING_V8) - #define WEBKIT_USING_V8 1 -#endif - -#if !defined(WEBKIT_USING_JSC) - #define WEBKIT_USING_JSC 0 -#endif - -// ----------------------------------------------------------------------------- -// Exported symbols need to be annotated with WEBKIT_API - -#if defined(WIN32) && defined(WEBKIT_DLL) - #if WEBKIT_IMPLEMENTATION - #define WEBKIT_API __declspec(dllexport) - #else - #define WEBKIT_API __declspec(dllimport) - #endif -#else - #define WEBKIT_API -#endif - -// ----------------------------------------------------------------------------- -// Basic types - -#include <stddef.h> // For size_t - -#if defined(WIN32) -// Visual Studio doesn't have stdint.h. -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned int uint32_t; -#endif - -namespace WebKit { - -// UTF-16 character type -#if defined(WIN32) -typedef wchar_t WebUChar; -#else -typedef unsigned short WebUChar; -#endif - -// ----------------------------------------------------------------------------- -// Assertions - -WEBKIT_API void failedAssertion(const char* file, int line, const char* function, const char* assertion); - -} // namespace WebKit - -// Ideally, only use inside the public directory but outside of WEBKIT_IMPLEMENTATION blocks. (Otherwise use WTF's ASSERT.) -#if defined(NDEBUG) -#define WEBKIT_ASSERT(assertion) ((void)0) -#else -#define WEBKIT_ASSERT(assertion) do { \ - if (!(assertion)) \ - failedAssertion(__FILE__, __LINE__, __FUNCTION__, #assertion); \ -} while (0) -#endif - -#define WEBKIT_ASSERT_NOT_REACHED() WEBKIT_ASSERT(0) - -#endif diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h deleted file mode 100644 index b99d39d..0000000 --- a/WebKit/chromium/public/WebCommonWorkerClient.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCommonWorkerClient_h -#define WebCommonWorkerClient_h - -#include "WebCommon.h" -#include "WebFileSystem.h" - -namespace WebKit { - -class WebApplicationCacheHost; -class WebApplicationCacheHostClient; -class WebFrame; -class WebNotificationPresenter; -class WebString; -class WebWorker; -class WebWorkerClient; - -// Provides an interface back to the in-page script object for a worker. -// This interface contains common APIs used by both shared and dedicated -// workers. -// All functions are expected to be called back on the thread that created -// the Worker object, unless noted. -class WebCommonWorkerClient { -public: - virtual void postExceptionToWorkerObject( - const WebString& errorString, int lineNumber, - const WebString& sourceURL) = 0; - - // FIXME: the below is for compatibility only and should be - // removed once Chromium is updated to remove message - // destination parameter <http://webkit.org/b/37155>. - virtual void postConsoleMessageToWorkerObject(int, int sourceIdentifier, int messageType, int messageLevel, - const WebString& message, int lineNumber, const WebString& sourceURL) = 0; - - virtual void postConsoleMessageToWorkerObject(int sourceIdentifier, int messageType, int messageLevel, - const WebString& message, int lineNumber, const WebString& sourceURL) - { - postConsoleMessageToWorkerObject(0, sourceIdentifier, messageType, messageLevel, - message, lineNumber, sourceURL); - } - - virtual void workerContextClosed() = 0; - virtual void workerContextDestroyed() = 0; - - // Returns the notification presenter for this worker context. Pointer - // is owned by the object implementing WebCommonWorkerClient. - virtual WebNotificationPresenter* notificationPresenter() = 0; - - // This can be called on any thread to create a nested WebWorker. - // WebSharedWorkers are not instantiated via this API - instead - // they are created via the WebSharedWorkerRepository. - virtual WebWorker* createWorker(WebWorkerClient* client) = 0; - - // Called on the main webkit thread in the worker process during initialization. - virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) = 0; - - // Called on the main webkit thread before opening a web database. - virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) = 0; - - // Called on the main webkit thread before opening a file system. - virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*) - { - WEBKIT_ASSERT_NOT_REACHED(); - } - - // This will be removed once changes in chromium use the new method above. - virtual void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*) - { - WEBKIT_ASSERT_NOT_REACHED(); - } - -protected: - ~WebCommonWorkerClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCompositionUnderline.h b/WebKit/chromium/public/WebCompositionUnderline.h deleted file mode 100644 index d8b0d63..0000000 --- a/WebKit/chromium/public/WebCompositionUnderline.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCompositionUnderline_h -#define WebCompositionUnderline_h - -#include "WebColor.h" - -namespace WebKit { - -// Class WebCompositionUnderline is intended to be used with WebWidget's -// setComposition() method. -struct WebCompositionUnderline { - WebCompositionUnderline() - : startOffset(0) - , endOffset(0) - , color(0) - , thick(false) { } - - WebCompositionUnderline(unsigned s, unsigned e, WebColor c, bool t) - : startOffset(s) - , endOffset(e) - , color(c) - , thick(t) { } - - unsigned startOffset; - unsigned endOffset; - WebColor color; - bool thick; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebConsoleMessage.h b/WebKit/chromium/public/WebConsoleMessage.h deleted file mode 100644 index d7a0ead..0000000 --- a/WebKit/chromium/public/WebConsoleMessage.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebConsoleMessage_h -#define WebConsoleMessage_h - -#include "WebString.h" - -namespace WebKit { - -struct WebConsoleMessage { - enum Level { - LevelTip, - LevelLog, - LevelWarning, - LevelError - }; - - Level level; - WebString text; - - WebConsoleMessage() - : level(LevelLog) { } - WebConsoleMessage(Level level, const WebString& text) - : level(LevelLog) - , text(text) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebContextMenuData.h b/WebKit/chromium/public/WebContextMenuData.h deleted file mode 100644 index e3aee4e..0000000 --- a/WebKit/chromium/public/WebContextMenuData.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebContextMenuData_h -#define WebContextMenuData_h - -#include "WebMenuItemInfo.h" -#include "WebPoint.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebVector.h" - -namespace WebKit { - -// This struct is passed to WebViewClient::ShowContextMenu. -struct WebContextMenuData { - enum MediaType { - // No special node is in context. - MediaTypeNone, - // An image node is selected. - MediaTypeImage, - // A video node is selected. - MediaTypeVideo, - // An audio node is selected. - MediaTypeAudio, - }; - // The type of media the context menu is being invoked on. - MediaType mediaType; - - // The x and y position of the mouse pointer (relative to the webview). - WebPoint mousePosition; - - // The absolute URL of the link that is in context. - WebURL linkURL; - - // The absolute URL of the image/video/audio that is in context. - WebURL srcURL; - - // Whether the image in context has been blocked. - bool isImageBlocked; - - // The absolute URL of the page in context. - WebURL pageURL; - - // The absolute URL of the subframe in context. - WebURL frameURL; - - // The encoding for the frame in context. - WebString frameEncoding; - - enum MediaFlags { - MediaNone = 0x0, - MediaInError = 0x1, - MediaPaused = 0x2, - MediaMuted = 0x4, - MediaLoop = 0x8, - MediaCanSave = 0x10, - MediaHasAudio = 0x20, - MediaHasVideo = 0x40, - MediaControls = 0x80, - }; - - // Extra attributes describing media elements. - int mediaFlags; - - // The raw text of the selection in context. - WebString selectedText; - - // Whether spell checking is enabled. - bool isSpellCheckingEnabled; - - // The editable (possibily) misspelled word. - WebString misspelledWord; - - // Whether context is editable. - bool isEditable; - - enum CheckableMenuItemFlags { - CheckableMenuItemDisabled = 0x0, - CheckableMenuItemEnabled = 0x1, - CheckableMenuItemChecked = 0x2, - }; - - // Writing direction menu items - values are unions of - // CheckableMenuItemFlags. - // Currently only used on OS X. - int writingDirectionDefault; - int writingDirectionLeftToRight; - int writingDirectionRightToLeft; - - enum EditFlags { - CanDoNone = 0x0, - CanUndo = 0x1, - CanRedo = 0x2, - CanCut = 0x4, - CanCopy = 0x8, - CanPaste = 0x10, - CanDelete = 0x20, - CanSelectAll = 0x40, - CanTranslate = 0x80, - }; - - // Which edit operations are available in the context. - int editFlags; - - // Security information for the context. - WebCString securityInfo; - - // Custom context menu items provided by the WebCore internals. - WebVector<WebMenuItemInfo> customItems; - - WebContextMenuData() - : mediaType(MediaTypeNone) - , isImageBlocked(false) - , mediaFlags(MediaNone) - , isSpellCheckingEnabled(false) - , isEditable(false) - , writingDirectionDefault(CheckableMenuItemDisabled) - , writingDirectionLeftToRight(CheckableMenuItemEnabled) - , writingDirectionRightToLeft(CheckableMenuItemEnabled) - , editFlags(0) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCookie.h b/WebKit/chromium/public/WebCookie.h deleted file mode 100644 index 81cb361..0000000 --- a/WebKit/chromium/public/WebCookie.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCookie_h -#define WebCookie_h - -#include "WebCommon.h" -#include "WebString.h" - -namespace WebKit { - -class WebString; - -// A cookie. -// -struct WebCookie { - WebCookie() - : expires(0) - , httpOnly(false) - , secure(false) - , session(false) - { - } - - WebCookie(const WebString& name, const WebString& value, const WebString& domain, - const WebString& path, double expires, bool httpOnly, bool secure, bool session) - : name(name) - , value(value) - , domain(domain) - , path(path) - , expires(expires) - , httpOnly(httpOnly) - , secure(secure) - , session(session) - { - } - - WebString name; - WebString value; - WebString domain; - WebString path; - double expires; - bool httpOnly; - bool secure; - bool session; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCookieJar.h b/WebKit/chromium/public/WebCookieJar.h deleted file mode 100644 index 6daba6b..0000000 --- a/WebKit/chromium/public/WebCookieJar.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCookieJar_h -#define WebCookieJar_h - -#include "WebString.h" - -namespace WebKit { -class WebURL; -struct WebCookie; -template <typename T> class WebVector; - -class WebCookieJar { -public: - virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { } - virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } - virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); } - virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { } - virtual void deleteCookie(const WebURL&, const WebString& cookieName) { } - virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; } - -protected: - ~WebCookieJar() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h b/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h deleted file mode 100644 index 62827f7..0000000 --- a/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCrossOriginPreflightResultCache_h -#define WebCrossOriginPreflightResultCache_h - -#include "WebCommon.h" - -namespace WebKit { - -// An interface to configure WebKit's cross-origin preflight result cache. -class WebCrossOriginPreflightResultCache { -public: - // Clears the cache. - WEBKIT_API static void clear(); - -private: - WebCrossOriginPreflightResultCache(); // Not intended to be instanced. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebCursorInfo.h b/WebKit/chromium/public/WebCursorInfo.h deleted file mode 100644 index 8926e5c..0000000 --- a/WebKit/chromium/public/WebCursorInfo.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebCursorInfo_h -#define WebCursorInfo_h - -#include "WebImage.h" -#include "WebPoint.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Cursor; } -#endif - -#ifdef WIN32 -typedef struct HICON__* HICON; -typedef HICON HCURSOR; -#endif - -namespace WebKit { - -struct WebCursorInfo { - enum Type { - TypePointer, - TypeCross, - TypeHand, - TypeIBeam, - TypeWait, - TypeHelp, - TypeEastResize, - TypeNorthResize, - TypeNorthEastResize, - TypeNorthWestResize, - TypeSouthResize, - TypeSouthEastResize, - TypeSouthWestResize, - TypeWestResize, - TypeNorthSouthResize, - TypeEastWestResize, - TypeNorthEastSouthWestResize, - TypeNorthWestSouthEastResize, - TypeColumnResize, - TypeRowResize, - TypeMiddlePanning, - TypeEastPanning, - TypeNorthPanning, - TypeNorthEastPanning, - TypeNorthWestPanning, - TypeSouthPanning, - TypeSouthEastPanning, - TypeSouthWestPanning, - TypeWestPanning, - TypeMove, - TypeVerticalText, - TypeCell, - TypeContextMenu, - TypeAlias, - TypeProgress, - TypeNoDrop, - TypeCopy, - TypeNone, - TypeNotAllowed, - TypeZoomIn, - TypeZoomOut, - TypeCustom - }; - - Type type; - WebPoint hotSpot; - WebImage customImage; - -#ifdef WIN32 - // On Windows, TypeCustom may alternatively reference an externally - // defined HCURSOR. If type is TypeCustom and externalHandle is non- - // null, then customData should be ignored. The WebCursorInfo is not - // responsible for managing the lifetime of this cursor handle. - HCURSOR externalHandle; -#endif - - explicit WebCursorInfo(Type type = TypePointer) - : type(type) - { -#ifdef WIN32 - externalHandle = 0; -#endif - } - -#if WEBKIT_IMPLEMENTATION - explicit WebCursorInfo(const WebCore::Cursor&); -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDOMEvent.h b/WebKit/chromium/public/WebDOMEvent.h deleted file mode 100644 index fa02b0c..0000000 --- a/WebKit/chromium/public/WebDOMEvent.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDOMEvent_h -#define WebDOMEvent_h - -#include "WebCommon.h" -#include "WebNode.h" -#include "WebString.h" - -namespace WebCore { class Event; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebDOMEvent { -public: - enum PhaseType { - CapturingPhase = 1, - AtTarget = 2, - BubblingPhase = 3 - }; - - ~WebDOMEvent() { reset(); } - - WebDOMEvent() : m_private(0) { } - WebDOMEvent(const WebDOMEvent& e) : m_private(0) { assign(e); } - WebDOMEvent& operator=(const WebDOMEvent& e) - { - assign(e); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebDOMEvent&); - - bool isNull() const { return !m_private; } - - WEBKIT_API WebString type() const; - WEBKIT_API WebNode target() const; - WEBKIT_API WebNode currentTarget() const; - - WEBKIT_API PhaseType eventPhase() const; - WEBKIT_API bool bubbles() const; - WEBKIT_API bool cancelable() const; - - WEBKIT_API bool isUIEvent() const; - WEBKIT_API bool isMouseEvent() const; - WEBKIT_API bool isMutationEvent() const; - WEBKIT_API bool isKeyboardEvent() const; - WEBKIT_API bool isTextEvent() const; - WEBKIT_API bool isCompositionEvent() const; - WEBKIT_API bool isDragEvent() const; - WEBKIT_API bool isClipboardEvent() const; - WEBKIT_API bool isMessageEvent() const; - WEBKIT_API bool isWheelEvent() const; - WEBKIT_API bool isBeforeTextInsertedEvent() const; - WEBKIT_API bool isOverflowEvent() const; - WEBKIT_API bool isPageTransitionEvent() const; - WEBKIT_API bool isPopStateEvent() const; - WEBKIT_API bool isProgressEvent() const; - WEBKIT_API bool isXMLHttpRequestProgressEvent() const; - WEBKIT_API bool isWebKitAnimationEvent() const; - WEBKIT_API bool isWebKitTransitionEvent() const; - WEBKIT_API bool isBeforeLoadEvent() const; - -#if WEBKIT_IMPLEMENTATION - WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>&); -#endif - - template<typename T> T to() - { - T res; - res.WebDOMEvent::assign(*this); - return res; - } - - template<typename T> const T toConst() const - { - T res; - res.WebDOMEvent::assign(*this); - return res; - } - -protected: - typedef WebCore::Event WebDOMEventPrivate; - void assign(WebDOMEventPrivate*); - WebDOMEventPrivate* m_private; - - template<typename T> T* unwrap() - { - return static_cast<T*>(m_private); - } - - template<typename T> const T* constUnwrap() const - { - return static_cast<const T*>(m_private); - } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDOMEventListener.h b/WebKit/chromium/public/WebDOMEventListener.h deleted file mode 100644 index 4b32b93..0000000 --- a/WebKit/chromium/public/WebDOMEventListener.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDOMEventListener_h -#define WebDOMEventListener_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Node; } -#endif - -namespace WebKit { - -class EventListenerWrapper; -class WebDOMEvent; -class WebDOMEventListenerPrivate; -class WebNode; -class WebString; - -class WebDOMEventListener { -public: - WEBKIT_API WebDOMEventListener(); - WEBKIT_API virtual ~WebDOMEventListener(); - - // Called when an event is received. - virtual void handleEvent(const WebDOMEvent&) = 0; - -#if WEBKIT_IMPLEMENTATION - void notifyEventListenerDeleted(EventListenerWrapper*); - EventListenerWrapper* createEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node); - EventListenerWrapper* getEventListenerWrapper(const WebString& eventType, bool useCapture, WebCore::Node* node); -#endif - -private: - WebDOMEventListenerPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDOMMouseEvent.h b/WebKit/chromium/public/WebDOMMouseEvent.h deleted file mode 100644 index 4c38b56..0000000 --- a/WebKit/chromium/public/WebDOMMouseEvent.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef WebDOMMouseEvent_h -#define WebDOMMouseEvent_h - -#include "WebDOMEvent.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Event; } -#endif - -namespace WebKit { - -class WebDOMMouseEvent : public WebDOMEvent { -public: - WEBKIT_API int screenX() const; - WEBKIT_API int screenY() const; - WEBKIT_API int clientX() const; - WEBKIT_API int clientY() const; - WEBKIT_API int layerX() const; - WEBKIT_API int layerY() const; - WEBKIT_API int offsetX() const; - WEBKIT_API int offsetY() const; - WEBKIT_API int pageX() const; - WEBKIT_API int pageY() const; - WEBKIT_API int x() const; - WEBKIT_API int y() const; - - WEBKIT_API int button() const; - WEBKIT_API bool buttonDown() const; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDOMMutationEvent.h b/WebKit/chromium/public/WebDOMMutationEvent.h deleted file mode 100644 index 471331f..0000000 --- a/WebKit/chromium/public/WebDOMMutationEvent.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef WebDOMMutationEvent_h -#define WebDOMMutationEvent_h - -#include "WebDOMEvent.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Event; } -#endif - -namespace WebKit { - -class WebDOMMutationEvent : public WebDOMEvent { -public: - enum AttrChangeType { - Modification = 1, - Addition = 2, - Removal = 3 - }; - - WEBKIT_API WebNode relatedNode() const; - WEBKIT_API WebString prevValue() const; - WEBKIT_API WebString newValue() const; - WEBKIT_API WebString attrName() const; - WEBKIT_API AttrChangeType attrChange() const; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDOMStringList.h b/WebKit/chromium/public/WebDOMStringList.h deleted file mode 100644 index dabf1b7..0000000 --- a/WebKit/chromium/public/WebDOMStringList.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDOMStringList_h -#define WebDOMStringList_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" -#include "WebString.h" - -namespace WebCore { class DOMStringList; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebDOMStringList { -public: - ~WebDOMStringList() { reset(); } - - WEBKIT_API WebDOMStringList(); - WebDOMStringList(const WebDOMStringList& l) { assign(l); } - WebDOMStringList& operator=(const WebDOMStringList& l) - { - assign(l); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebDOMStringList&); - - WEBKIT_API void append(const WebString&); - WEBKIT_API unsigned length() const; - WEBKIT_API WebString item(unsigned) const; - -#if WEBKIT_IMPLEMENTATION - WebDOMStringList(const WTF::PassRefPtr<WebCore::DOMStringList>&); - WebDOMStringList& operator=(const WTF::PassRefPtr<WebCore::DOMStringList>&); - operator WTF::PassRefPtr<WebCore::DOMStringList>() const; -#endif - -private: - WebPrivatePtr<WebCore::DOMStringList> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebData.h b/WebKit/chromium/public/WebData.h deleted file mode 100644 index 5874bed..0000000 --- a/WebKit/chromium/public/WebData.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebData_h -#define WebData_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class SharedBuffer; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebDataPrivate; - -// A container for raw bytes. It is inexpensive to copy a WebData object. -// -// WARNING: It is not safe to pass a WebData across threads!!! -// -class WebData { -public: - ~WebData() { reset(); } - - WebData() : m_private(0) { } - - WebData(const char* data, size_t size) : m_private(0) - { - assign(data, size); - } - - template <int N> - WebData(const char (&data)[N]) : m_private(0) - { - assign(data, N - 1); - } - - WebData(const WebData& d) : m_private(0) { assign(d); } - - WebData& operator=(const WebData& d) - { - assign(d); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebData&); - WEBKIT_API void assign(const char* data, size_t size); - - WEBKIT_API size_t size() const; - WEBKIT_API const char* data() const; - - bool isEmpty() const { return !size(); } - bool isNull() const { return !m_private; } - -#if WEBKIT_IMPLEMENTATION - WebData(const WTF::PassRefPtr<WebCore::SharedBuffer>&); - WebData& operator=(const WTF::PassRefPtr<WebCore::SharedBuffer>&); - operator WTF::PassRefPtr<WebCore::SharedBuffer>() const; -#else - template <class C> - WebData(const C& c) : m_private(0) - { - assign(c.data(), c.size()); - } - - template <class C> - WebData& operator=(const C& c) - { - assign(c.data(), c.size()); - return *this; - } -#endif - -private: - void assign(WebDataPrivate*); - WebDataPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDataSource.h b/WebKit/chromium/public/WebDataSource.h deleted file mode 100644 index 1a8c270..0000000 --- a/WebKit/chromium/public/WebDataSource.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDataSource_h -#define WebDataSource_h - -#include "WebCommon.h" -#include "WebNavigationType.h" - -namespace WebKit { - -class WebApplicationCacheHost; -class WebString; -class WebURL; -class WebURLRequest; -class WebURLResponse; -template <typename T> class WebVector; - -class WebDataSource { -public: - class ExtraData { - public: - virtual ~ExtraData() { } - }; - - // Returns the original request that resulted in this datasource. - virtual const WebURLRequest& originalRequest() const = 0; - - // Returns the request corresponding to this datasource. It may - // include additional request headers added by WebKit that were not - // present in the original request. This request may also correspond - // to a location specified by a redirect that was followed. - virtual const WebURLRequest& request() const = 0; - - // Returns the response associated with this datasource. - virtual const WebURLResponse& response() const = 0; - - // When this datasource was created as a result of WebFrame::loadData, - // there may be an associated unreachableURL. - virtual bool hasUnreachableURL() const = 0; - virtual WebURL unreachableURL() const = 0; - - // Returns all redirects that occurred (both client and server) before - // at last committing the current page. This will contain one entry - // for each intermediate URL, and one entry for the last URL (so if - // there are no redirects, it will contain exactly the current URL, and - // if there is one redirect, it will contain the source and destination - // URL). - virtual void redirectChain(WebVector<WebURL>&) const = 0; - - // Returns the title for the current page. - virtual WebString pageTitle() const = 0; - - // The type of navigation that triggered the creation of this datasource. - virtual WebNavigationType navigationType() const = 0; - - // The time in seconds (since the epoch) of the event that triggered - // the creation of this datasource. Returns 0 if unknown. - virtual double triggeringEventTime() const = 0; - - // Extra data associated with this datasource. If non-null, the extra - // data pointer will be deleted when the datasource is destroyed. - // Setting the extra data pointer will cause any existing non-null - // extra data pointer to be deleted. - virtual ExtraData* extraData() const = 0; - virtual void setExtraData(ExtraData*) = 0; - - // The application cache host associated with this datasource. - virtual WebApplicationCacheHost* applicationCacheHost() = 0; - - // Set deferMainResourceDataLoad flag on the loader. This is used for - // testing. - virtual void setDeferMainResourceDataLoad(bool) = 0; - -protected: - ~WebDataSource() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDatabase.h b/WebKit/chromium/public/WebDatabase.h deleted file mode 100644 index 0a5d4f8..0000000 --- a/WebKit/chromium/public/WebDatabase.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDatabase_h -#define WebDatabase_h - -#include "WebCommon.h" -#include "WebSecurityOrigin.h" - -namespace WebCore { class AbstractDatabase; } - -namespace WebKit { - -class WebDatabaseObserver; -class WebString; - -class WebDatabase { -public: - WEBKIT_API WebString name() const; - WEBKIT_API WebString displayName() const; - WEBKIT_API unsigned long estimatedSize() const; - WEBKIT_API WebSecurityOrigin securityOrigin() const; - - WEBKIT_API static void setObserver(WebDatabaseObserver*); - WEBKIT_API static WebDatabaseObserver* observer(); - - WEBKIT_API static void updateDatabaseSize( - const WebString& originIdentifier, const WebString& databaseName, - unsigned long long databaseSize, unsigned long long spaceAvailable); - WEBKIT_API static void closeDatabaseImmediately( - const WebString& originIdentifier, const WebString& databaseName); - -#if WEBKIT_IMPLEMENTATION - WebDatabase(const WebCore::AbstractDatabase*); -#endif - -private: - WebDatabase() { } - const WebCore::AbstractDatabase* m_database; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDatabaseObserver.h b/WebKit/chromium/public/WebDatabaseObserver.h deleted file mode 100644 index da85c93..0000000 --- a/WebKit/chromium/public/WebDatabaseObserver.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDatabaseObserver_h -#define WebDatabaseObserver_h - -namespace WebKit { -class WebDatabase; - -class WebDatabaseObserver { -public: - virtual void databaseOpened(const WebDatabase&) = 0; - virtual void databaseModified(const WebDatabase&) = 0; - virtual void databaseClosed(const WebDatabase&) = 0; -protected: - ~WebDatabaseObserver() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h deleted file mode 100644 index d6a7bcd..0000000 --- a/WebKit/chromium/public/WebDevToolsAgent.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsAgent_h -#define WebDevToolsAgent_h - -#include "WebCommon.h" - -#if WEBKIT_USING_V8 -namespace v8 { -class Value; -template <class T> class Handle; -} -#endif - -namespace WebKit { -class WebDevToolsAgentClient; -class WebDevToolsMessageTransport; -class WebFrame; -class WebString; -class WebURLRequest; -class WebURLResponse; -class WebView; -struct WebDevToolsMessageData; -struct WebPoint; -struct WebURLError; - -class WebDevToolsAgent { -public: - virtual ~WebDevToolsAgent() {} - - virtual void attach() = 0; - virtual void detach() = 0; - virtual void frontendLoaded() = 0; - - virtual void didNavigate() = 0; - - virtual void dispatchOnInspectorBackend(const WebString& message) = 0; - - virtual void inspectElementAt(const WebPoint&) = 0; -#if WEBKIT_USING_V8 - virtual void inspectNode(v8::Handle<v8::Value>) = 0; -#endif - virtual void setRuntimeProperty(const WebString& name, const WebString& value) = 0; - - // Exposed for LayoutTestController. - virtual void evaluateInWebInspector(long callId, const WebString& script) = 0; - virtual void setTimelineProfilingEnabled(bool enabled) = 0; - - // Asynchronously executes debugger command in the render thread. - // |callerIdentifier| will be used for sending response. - WEBKIT_API static void executeDebuggerCommand( - const WebString& command, int callerIdentifier); - - // Asynchronously request debugger to pause immediately. - WEBKIT_API static void debuggerPauseScript(); - - class MessageDescriptor { - public: - virtual ~MessageDescriptor() { } - virtual WebDevToolsAgent* agent() = 0; - virtual WebString message() = 0; - }; - // Asynchronously request debugger to pause immediately and run the command. - WEBKIT_API static void interruptAndDispatch(MessageDescriptor*); - WEBKIT_API static bool shouldInterruptForMessage(const WebString&); - WEBKIT_API static void processPendingMessages(); - - typedef void (*MessageLoopDispatchHandler)(); - - // Installs dispatch handle that is going to be called periodically - // while on a breakpoint. - WEBKIT_API static void setMessageLoopDispatchHandler(MessageLoopDispatchHandler); - - virtual void identifierForInitialRequest(unsigned long resourceId, WebFrame*, const WebURLRequest&) = 0; - virtual void willSendRequest(unsigned long resourceId, WebURLRequest&) = 0; - virtual void didReceiveData(unsigned long resourceId, int length) = 0; - virtual void didReceiveResponse(unsigned long resourceId, const WebURLResponse&) = 0; - virtual void didFinishLoading(unsigned long resourceId) = 0; - virtual void didFailLoading(unsigned long resourceId, const WebURLError&) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h deleted file mode 100644 index b373b60..0000000 --- a/WebKit/chromium/public/WebDevToolsAgentClient.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsAgentClient_h -#define WebDevToolsAgentClient_h - -#include "WebCString.h" -#include "WebCommon.h" - -namespace WebKit { -class WebString; -struct WebDevToolsMessageData; - -class WebDevToolsAgentClient { -public: - virtual void sendMessageToInspectorFrontend(const WebString&) { } - virtual void sendDebuggerOutput(const WebString&) { } - virtual void sendDispatchToAPU(const WebString&) { } - - // Returns the identifier of the entity hosting this agent. - virtual int hostIdentifier() { return -1; } - - // Notifies host upon runtime feature being enabled/disabled. - virtual void runtimePropertyChanged(const WebString& name, const WebString& value) { } - - virtual WebCString debuggerScriptSource() { return WebCString(); } - - class WebKitClientMessageLoop { - public: - virtual ~WebKitClientMessageLoop() { } - virtual void run() = 0; - virtual void quitNow() = 0; - }; - virtual WebKitClientMessageLoop* createClientMessageLoop() { return 0; } - - virtual bool exposeV8DebuggerProtocol() { return false; } - -protected: - ~WebDevToolsAgentClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDevToolsFrontend.h b/WebKit/chromium/public/WebDevToolsFrontend.h deleted file mode 100644 index 0325f92..0000000 --- a/WebKit/chromium/public/WebDevToolsFrontend.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsFrontend_h -#define WebDevToolsFrontend_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebDevToolsFrontendClient; -class WebString; -class WebView; - -// WebDevToolsFrontend represents DevTools client sitting in the Glue. It provides -// direct and delegate Apis to the host. -class WebDevToolsFrontend { -public: - WEBKIT_API static WebDevToolsFrontend* create(WebView* view, - WebDevToolsFrontendClient* client, - const WebString& applicationLocale); - - virtual ~WebDevToolsFrontend() {} - - virtual void dispatchOnInspectorFrontend(const WebString&) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDevToolsFrontendClient.h b/WebKit/chromium/public/WebDevToolsFrontendClient.h deleted file mode 100644 index df34dc5..0000000 --- a/WebKit/chromium/public/WebDevToolsFrontendClient.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsFrontendClient_h -#define WebDevToolsFrontendClient_h - -namespace WebKit { - -class WebString; -struct WebDevToolsMessageData; - -class WebDevToolsFrontendClient { -public: - WebDevToolsFrontendClient() { } - - virtual void sendFrontendLoaded() { } - virtual void sendMessageToBackend(const WebString&) { } - virtual void sendDebuggerCommandToAgent(const WebString& command) { } - virtual void sendDebuggerPauseScript() { } - - virtual void activateWindow() { } - virtual void closeWindow() { } - virtual void requestDockWindow() { } - virtual void requestUndockWindow() { } - - virtual bool shouldHideScriptsPanel() { return false; } - -protected: - virtual ~WebDevToolsFrontendClient() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDeviceOrientation.h b/WebKit/chromium/public/WebDeviceOrientation.h deleted file mode 100644 index 7e8aa72..0000000 --- a/WebKit/chromium/public/WebDeviceOrientation.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDeviceOrientation_h -#define WebDeviceOrientation_h - -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -namespace WebCore { class DeviceOrientation; } -#endif - -namespace WebKit { - -class WebDeviceOrientation { -public: - WebDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma) - : m_isNull(false), - m_canProvideAlpha(canProvideAlpha), - m_alpha(alpha), - m_canProvideBeta(canProvideBeta), - m_beta(beta), - m_canProvideGamma(canProvideGamma), - m_gamma(gamma) - { - } - - static WebDeviceOrientation nullOrientation() { return WebDeviceOrientation(); } - - bool isNull() { return m_isNull; } - bool canProvideAlpha() { return m_canProvideAlpha; } - double alpha() { return m_alpha; } - bool canProvideBeta() { return m_canProvideBeta; } - double beta() { return m_beta; } - bool canProvideGamma() { return m_canProvideGamma; } - double gamma() { return m_gamma; } - -#if WEBKIT_IMPLEMENTATION - WebDeviceOrientation(const WTF::PassRefPtr<WebCore::DeviceOrientation>&); - WebDeviceOrientation& operator=(const WTF::PassRefPtr<WebCore::DeviceOrientation>&); - operator WTF::PassRefPtr<WebCore::DeviceOrientation>() const; -#endif - -private: - WebDeviceOrientation() - : m_isNull(true), - m_canProvideAlpha(false), - m_alpha(0), - m_canProvideBeta(false), - m_beta(0), - m_canProvideGamma(false), - m_gamma(0) - { - } - - bool m_isNull; - bool m_canProvideAlpha; - double m_alpha; - bool m_canProvideBeta; - double m_beta; - bool m_canProvideGamma; - double m_gamma; -}; - -} // namespace WebKit - -#endif // WebDeviceOrientation_h diff --git a/WebKit/chromium/public/WebDeviceOrientationClient.h b/WebKit/chromium/public/WebDeviceOrientationClient.h deleted file mode 100644 index 4df8665..0000000 --- a/WebKit/chromium/public/WebDeviceOrientationClient.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDeviceOrientationClient_h -#define WebDeviceOrientationClient_h - -namespace WebKit { - -class WebDeviceOrientation; -class WebDeviceOrientationController; - -class WebDeviceOrientationClient { -public: - virtual ~WebDeviceOrientationClient() {} - - virtual void setController(WebDeviceOrientationController*) = 0; - virtual void startUpdating() = 0; - virtual void stopUpdating() = 0; - - virtual WebDeviceOrientation lastOrientation() const = 0; -}; - -} // namespace WebKit - -#endif // WebDeviceOrientationClient_h diff --git a/WebKit/chromium/public/WebDeviceOrientationClientMock.h b/WebKit/chromium/public/WebDeviceOrientationClientMock.h deleted file mode 100644 index 7fae792..0000000 --- a/WebKit/chromium/public/WebDeviceOrientationClientMock.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDeviceOrientationClientMock_h -#define WebDeviceOrientationClientMock_h - -#include "WebCommon.h" -#include "WebDeviceOrientationClient.h" -#include "WebPrivateOwnPtr.h" - -namespace WebCore { class DeviceOrientationClientMock; } - -namespace WebKit { - -class WebDeviceOrientationClientMock : public WebDeviceOrientationClient { -public: - WEBKIT_API static WebDeviceOrientationClientMock* create(); - ~WebDeviceOrientationClientMock() { reset(); } - - virtual void setController(WebDeviceOrientationController*); - virtual void startUpdating(); - virtual void stopUpdating(); - virtual WebDeviceOrientation lastOrientation() const; - - WEBKIT_API void setOrientation(WebDeviceOrientation&); - -private: - WebDeviceOrientationClientMock() { initialize(); } - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - - WebPrivateOwnPtr<WebCore::DeviceOrientationClientMock> m_clientMock; -}; - -} // namespace WebKit - -#endif // WebDeviceOrientationClientMock_h diff --git a/WebKit/chromium/public/WebDeviceOrientationController.h b/WebKit/chromium/public/WebDeviceOrientationController.h deleted file mode 100644 index ef843ee..0000000 --- a/WebKit/chromium/public/WebDeviceOrientationController.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDeviceOrientationController_h -#define WebDeviceOrientationController_h - -#include "WebCommon.h" - -namespace WebCore { class DeviceOrientationController; } - -namespace WebKit { - -class WebDeviceOrientation; - -class WebDeviceOrientationController { -public: - WebDeviceOrientationController(WebCore::DeviceOrientationController* c) - : m_controller(c) - { - } - - WEBKIT_API void didChangeDeviceOrientation(const WebDeviceOrientation&); - -#if WEBKIT_IMPLEMENTATION - WebCore::DeviceOrientationController* controller() const; -#endif - -private: - WebCore::DeviceOrientationController* m_controller; -}; - -} // namespace WebKit - -#endif // WebDeviceOrientationController_h diff --git a/WebKit/chromium/public/WebDocument.h b/WebKit/chromium/public/WebDocument.h deleted file mode 100644 index d9f7386..0000000 --- a/WebKit/chromium/public/WebDocument.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDocument_h -#define WebDocument_h - -#include "WebNode.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { -class Document; -class DocumentType; -} -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebDocumentType; -class WebElement; -class WebFrame; -class WebNodeCollection; -class WebNodeList; -class WebString; -class WebURL; - -// Provides readonly access to some properties of a DOM document. -class WebDocument : public WebNode { -public: - WebDocument() { } - WebDocument(const WebDocument& e) : WebNode(e) { } - - WebDocument& operator=(const WebDocument& e) - { - WebNode::assign(e); - return *this; - } - void assign(const WebDocument& e) { WebNode::assign(e); } - - // Returns the frame the document belongs to or 0 if the document is frameless. - WEBKIT_API WebFrame* frame() const; - WEBKIT_API bool isHTMLDocument() const; - WEBKIT_API bool isXHTMLDocument() const; - WEBKIT_API bool isPluginDocument() const; - WEBKIT_API WebURL baseURL() const; - WEBKIT_API WebURL firstPartyForCookies() const; - WEBKIT_API WebElement documentElement() const; - WEBKIT_API WebElement body() const; - WEBKIT_API WebElement head(); - WEBKIT_API WebString title() const; - WEBKIT_API WebNodeCollection all(); - WEBKIT_API WebURL completeURL(const WebString&) const; - WEBKIT_API WebElement getElementById(const WebString&) const; - WEBKIT_API WebNode focusedNode() const; - WEBKIT_API WebDocumentType doctype() const; - -#if WEBKIT_IMPLEMENTATION - WebDocument(const WTF::PassRefPtr<WebCore::Document>&); - WebDocument& operator=(const WTF::PassRefPtr<WebCore::Document>&); - operator WTF::PassRefPtr<WebCore::Document>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDocumentType.h b/WebKit/chromium/public/WebDocumentType.h deleted file mode 100644 index b339320..0000000 --- a/WebKit/chromium/public/WebDocumentType.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDocumentType_h -#define WebDocumentType_h - -#include "WebNode.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class DocumentType; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebString; - -// Provides readonly access to some properties of a DOM document type. -class WebDocumentType : public WebNode { -public: - WebDocumentType() { } - WebDocumentType(const WebDocumentType& e) : WebNode(e) { } - - WebDocumentType& operator=(const WebDocumentType& e) - { - WebNode::assign(e); - return *this; - } - void assign(const WebDocumentType& e) { WebNode::assign(e); } - - WEBKIT_API WebString name() const; - -#if WEBKIT_IMPLEMENTATION - WebDocumentType(const WTF::PassRefPtr<WebCore::DocumentType>&); - WebDocumentType& operator=(const WTF::PassRefPtr<WebCore::DocumentType>&); - operator WTF::PassRefPtr<WebCore::DocumentType>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h deleted file mode 100644 index 1d704f0..0000000 --- a/WebKit/chromium/public/WebDragData.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDragData_h -#define WebDragData_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class ChromiumDataObject; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebData; -class WebDragDataPrivate; -class WebString; -class WebURL; -template <typename T> class WebVector; - -// Holds data that may be exchanged through a drag-n-drop operation. It is -// inexpensive to copy a WebDragData object. -class WebDragData { -public: - ~WebDragData() { reset(); } - - WebDragData() : m_private(0) { } - WebDragData(const WebDragData& d) : m_private(0) { assign(d); } - WebDragData& operator=(const WebDragData& d) - { - assign(d); - return *this; - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebDragData&); - - bool isNull() const { return !m_private; } - - WEBKIT_API WebString url() const; - WEBKIT_API void setURL(const WebURL&); - - WEBKIT_API WebString urlTitle() const; - WEBKIT_API void setURLTitle(const WebString&); - - WEBKIT_API WebString downloadMetadata() const; - WEBKIT_API void setDownloadMetadata(const WebString&); - - WEBKIT_API WebString fileExtension() const; - WEBKIT_API void setFileExtension(const WebString&); - - WEBKIT_API bool containsFilenames() const; - WEBKIT_API void filenames(WebVector<WebString>&) const; - WEBKIT_API void setFilenames(const WebVector<WebString>&); - WEBKIT_API void appendToFilenames(const WebString&); - - WEBKIT_API WebString plainText() const; - WEBKIT_API void setPlainText(const WebString&); - - WEBKIT_API WebString htmlText() const; - WEBKIT_API void setHTMLText(const WebString&); - - WEBKIT_API WebURL htmlBaseURL() const; - WEBKIT_API void setHTMLBaseURL(const WebURL&); - - WEBKIT_API WebString fileContentFilename() const; - WEBKIT_API void setFileContentFilename(const WebString&); - - WEBKIT_API WebData fileContent() const; - WEBKIT_API void setFileContent(const WebData&); - -#if WEBKIT_IMPLEMENTATION - WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&); - WebDragData& operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>&); - operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const; -#endif - -private: - void assign(WebDragDataPrivate*); - void ensureMutable(); - WebDragDataPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebDragOperation.h b/WebKit/chromium/public/WebDragOperation.h deleted file mode 100644 index 050b74f..0000000 --- a/WebKit/chromium/public/WebDragOperation.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* Copyright (C) 2009 Google Inc. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following disclaimer -* in the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Google Inc. nor the names of its -* contributors may be used to endorse or promote products derived from -* this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef WebDragOperation_h -#define WebDragOperation_h - -#include <limits.h> - -namespace WebKit { - -// "Verb" of a drag-and-drop operation as negotiated between the source and -// destination. -// (These constants match their equivalents in WebCore's DragActions.h and -// should not be renumbered.) -enum WebDragOperation { - WebDragOperationNone = 0, - WebDragOperationCopy = 1, - WebDragOperationLink = 2, - WebDragOperationGeneric = 4, - WebDragOperationPrivate = 8, - WebDragOperationMove = 16, - WebDragOperationDelete = 32, - WebDragOperationEvery = UINT_MAX -}; - -// Alternate typedef to make it clear when this is being used as a mask -// with potentially multiple value bits set. -typedef WebDragOperation WebDragOperationsMask; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebEditingAction.h b/WebKit/chromium/public/WebEditingAction.h deleted file mode 100644 index 4e76100..0000000 --- a/WebKit/chromium/public/WebEditingAction.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebEditingAction_h -#define WebEditingAction_h - -namespace WebKit { - -enum WebEditingAction { - WebEditingActionTyped, - WebEditingActionPasted, - WebEditingActionDropped, -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h deleted file mode 100644 index 8d51e98..0000000 --- a/WebKit/chromium/public/WebElement.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebElement_h -#define WebElement_h - -#include "WebNode.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Element; } -#endif - -namespace WebKit { -class WebNamedNodeMap; - - // Provides access to some properties of a DOM element node. - class WebElement : public WebNode { - public: - WebElement() : WebNode() { } - WebElement(const WebElement& e) : WebNode(e) { } - - WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; } - void assign(const WebElement& e) { WebNode::assign(e); } - - WEBKIT_API bool isFormControlElement() const; - WEBKIT_API bool isTextFormControlElement() const; - WEBKIT_API WebString tagName() const; - WEBKIT_API bool hasTagName(const WebString&) const; - WEBKIT_API bool hasAttribute(const WebString&) const; - WEBKIT_API WebString getAttribute(const WebString&) const; - WEBKIT_API bool setAttribute(const WebString& name, const WebString& value); - WEBKIT_API WebNamedNodeMap attributes() const; - WEBKIT_API WebString innerText() const; - - // Returns the language code specified for this element. This attribute - // is inherited, so the returned value is drawn from the closest parent - // element that has the lang attribute set, or from the HTTP - // "Content-Language" header as a fallback. - WEBKIT_API WebString computeInheritedLanguage() const; - -#if WEBKIT_IMPLEMENTATION - WebElement(const WTF::PassRefPtr<WebCore::Element>&); - WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&); - operator WTF::PassRefPtr<WebCore::Element>() const; -#endif - }; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebExceptionCode.h b/WebKit/chromium/public/WebExceptionCode.h deleted file mode 100644 index 61d53d9..0000000 --- a/WebKit/chromium/public/WebExceptionCode.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebExceptionCode_h -#define WebExceptionCode_h - -namespace WebKit { - -// This should match how ExceptionCode is defined in WebCore. -typedef int WebExceptionCode; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebExternalPopupMenu.h b/WebKit/chromium/public/WebExternalPopupMenu.h deleted file mode 100644 index 49630cf..0000000 --- a/WebKit/chromium/public/WebExternalPopupMenu.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebExternalPopupMenu_h -#define WebExternalPopupMenu_h - -namespace WebKit { - -struct WebRect; - -class WebExternalPopupMenu { -public: - virtual void show(const WebRect& bounds) = 0; - virtual void close() = 0; -}; - -} // namespace WebKit - -#endif // WebExternalPopupMenu_h diff --git a/WebKit/chromium/public/WebExternalPopupMenuClient.h b/WebKit/chromium/public/WebExternalPopupMenuClient.h deleted file mode 100644 index e01bc2d..0000000 --- a/WebKit/chromium/public/WebExternalPopupMenuClient.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebExternalPopupMenuClient_h -#define WebExternalPopupMenuClient_h - -namespace WebKit { - -class WebExternalPopupMenuClient { -public: - // Should be called when the currently selected item in the popup menu - // changed. Can be -1 if there is no selection. - virtual void didChangeSelection(int index) = 0; - - // Should be called when an index has been accepted. - // Note that it is not safe to access this WebExternalPopupClientMenu after - // this has been called as it might not be valid anymore. - virtual void didAcceptIndex(int index) = 0; - - // Should be called when the popup menu was discarded (closed without a - // selection. - // Note that it is not safe to access this WebExternalPopupClientMenu after - // this has been called as it might not be valid anymore. - virtual void didCancel() = 0; -}; - -} // namespace WebKit - -#endif // WebExternalPopupMenuClient_h diff --git a/WebKit/chromium/public/WebFileChooserCompletion.h b/WebKit/chromium/public/WebFileChooserCompletion.h deleted file mode 100644 index 14bace4..0000000 --- a/WebKit/chromium/public/WebFileChooserCompletion.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileChooserCompletion_h -#define WebFileChooserCompletion_h - -namespace WebKit { - -class WebString; -template <typename T> class WebVector; - -// Gets called back when WebViewClient finished choosing a file. -class WebFileChooserCompletion { -public: - // Called with zero or more file names. Zero-lengthed vector means that - // the user cancelled or that file choosing failed. The callback instance - // is destroyed when this method is called. - virtual void didChooseFile(const WebVector<WebString>& fileNames) = 0; -protected: - virtual ~WebFileChooserCompletion() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileChooserParams.h b/WebKit/chromium/public/WebFileChooserParams.h deleted file mode 100644 index 8e56d70..0000000 --- a/WebKit/chromium/public/WebFileChooserParams.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileChooserParams_h -#define WebFileChooserParams_h - -#include "WebFileChooserCompletion.h" -#include "WebString.h" -#include "WebVector.h" - -namespace WebKit { - -struct WebFileChooserParams { - // If |multiSelect| is true, the dialog allow to select multiple files. - bool multiSelect; - // If |directory| is true, the dialog allows the user to select a directory. - bool directory; - // |title| is a title of a file chooser dialog. It can be an empty string. - WebString title; - // |initialValue| is a filename which the dialog should select by default. - // It can be an empty string. - WebString initialValue; - // |acceptTypes| has a comma-separated MIME types such as "audio/*,text/plain". - // The dialog may restrict selectable files to the specified MIME types. - // This value comes from an 'accept' attribute value of an INPUT element. - // So it might be a wrong formatted string. - WebString acceptTypes; - // |selectedFiles| has filenames which a file upload control already select. - // A WebViewClient implementation may ask a user to select - // - removing a file from the selected files, - // - appending other files, or - // - replacing with other files - // before opening a file chooser dialog. - WebVector<WebString> selectedFiles; - - WebFileChooserParams() - : multiSelect(false) - , directory(false) - { - } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileError.h b/WebKit/chromium/public/WebFileError.h deleted file mode 100644 index e7a17c3..0000000 --- a/WebKit/chromium/public/WebFileError.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef WebFileError_h -#define WebFileError_h - -namespace WebKit { - -// File-related error code defined in HTML5 File API. -enum WebFileError { - WebFileErrorNotFound = 1, - WebFileErrorSecurity = 2, - WebFileErrorAbort = 3, - WebFileErrorNotReadable = 4, - WebFileErrorEncoding = 5, - WebFileErrorNoModificationAllowed = 6, - WebFileErrorInvalidState = 7, - WebFileErrorSyntax = 8, - WebFileErrorInvalidModification = 9, - WebFileErrorQuotaExceeded = 10, - WebFileErrorTypeMismatch = 11, - WebFileErrorPathExists = 12, -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileInfo.h b/WebKit/chromium/public/WebFileInfo.h deleted file mode 100644 index be0b3e4..0000000 --- a/WebKit/chromium/public/WebFileInfo.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileInfo_h -#define WebFileInfo_h - -namespace WebKit { - -struct WebFileInfo { - // The last modification time of the file, in seconds. - // The value 0.0 means that the time is not set. - double modificationTime; - - // The length of the file in bytes. - // The value -1 means that the length is not set. - long long length; - - enum Type { - TypeUnknown = 0, - TypeFile, - TypeDirectory - }; - - Type type; - - WebFileInfo() : modificationTime(0.0), length(-1), type(TypeUnknown) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h deleted file mode 100644 index 7198f31..0000000 --- a/WebKit/chromium/public/WebFileSystem.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileSystem_h -#define WebFileSystem_h - -#include "WebCommon.h" -#include "WebString.h" - -namespace WebKit { - -class WebFileSystemCallbacks; -class WebFileWriter; -class WebFileWriterClient; - -class WebFileSystem { -public: - enum Type { - TypeTemporary, - TypePersistent, - }; - - // Moves a file or directory at |srcPath| to |destPath|. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void move(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Copies a file or directory at |srcPath| to |destPath|. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Deletes a file or directory at a given |path|. - // It is an error to try to remove a directory that is not empty. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void remove(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Deletes a file or directory recursively at a given |path|. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void removeRecursively(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Retrieves the metadata information of the file or directory at the given |path|. - // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void readMetadata(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Creates a file at given |path|. - // If the |path| doesn't exist, it creates a new file at |path|. - // If |exclusive| is true, it fails if the |path| already exists. - // If |exclusive| is false, it succeeds if the |path| already exists or - // it has successfully created a new file at |path|. - // - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void createFile(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Creates a directory at a given |path|. - // If the |path| doesn't exist, it creates a new directory at |path|. - // If |exclusive| is true, it fails if the |path| already exists. - // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|. - // - // WebFileSystemCallbacks::didSucceed() must be called when - // the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void createDirectory(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Checks if a file exists at a given |path|. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void fileExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Checks if a directory exists at a given |path|. - // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void directoryExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Reads directory entries of a given directory at |path|. - // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully. - // WebFileSystemCallbacks::didFail() must be called otherwise. - virtual void readDirectory(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Creates a WebFileWriter that can be used to write to the given file. - // This is a fast, synchronous call, and should not stat the filesystem. - virtual WebFileWriter* createFileWriter(const WebString& path, WebFileWriterClient*) { WEBKIT_ASSERT_NOT_REACHED(); return 0; } - -protected: - virtual ~WebFileSystem() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileSystemCallbacks.h b/WebKit/chromium/public/WebFileSystemCallbacks.h deleted file mode 100644 index fa7ebbe..0000000 --- a/WebKit/chromium/public/WebFileSystemCallbacks.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileSystemCallbacks_h -#define WebFileSystemCallbacks_h - -#include "WebFileError.h" -#include "WebFileSystemEntry.h" -#include "WebVector.h" - -namespace WebKit { - -class WebString; -struct WebFileInfo; - -class WebFileSystemCallbacks { -public: - // Callback for WebFileSystem's various operations that don't require - // return values. - virtual void didSucceed() = 0; - - // Callback for WebFileSystem::readMetadata. Called with the file metadata - // for the requested path. - virtual void didReadMetadata(const WebFileInfo&) = 0; - - // Callback for WebFileSystem::readDirectory. Called with a vector of - // file entries in the requested directory. This callback might be called - // multiple times if the directory has many entries. |hasMore| must be - // true when there are more entries. - virtual void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore) = 0; - - // Callback for WebFrameClient::openFileSystem. Called with a name and - // root path for the FileSystem when the request is accepted. - virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath) = 0; - - // Called with an error code when a requested operation hasn't been - // completed. - virtual void didFail(WebFileError) = 0; - -protected: - virtual ~WebFileSystemCallbacks() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileSystemEntry.h b/WebKit/chromium/public/WebFileSystemEntry.h deleted file mode 100644 index 00a5e38..0000000 --- a/WebKit/chromium/public/WebFileSystemEntry.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileSystemEntry_h -#define WebFileSystemEntry_h - -#include "WebString.h" - -namespace WebKit { - -struct WebFileSystemEntry { - WebFileSystemEntry() : isDirectory(false) { } - - // The name of the entry. - WebString name; - - // This flag indicates if the entry is directory or not. - bool isDirectory; -}; - -} // namespace WebKit - -#endif // WebFileSystemEntry_h diff --git a/WebKit/chromium/public/WebFileUtilities.h b/WebKit/chromium/public/WebFileUtilities.h deleted file mode 100644 index c8876f2..0000000 --- a/WebKit/chromium/public/WebFileUtilities.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileUtilities_h -#define WebFileUtilities_h - -#include "WebCommon.h" -#include "WebString.h" -#include "WebURL.h" - -#ifdef WIN32 -typedef void *HANDLE; -#endif - -namespace WebKit { - -class WebFileUtilities { -public: -#ifdef WIN32 - typedef HANDLE FileHandle; -#else - typedef int FileHandle; -#endif - virtual void revealFolderInOS(const WebString& path) { } - virtual bool fileExists(const WebString& path) { return false; } - virtual bool deleteFile(const WebString& path) { return false; } - virtual bool deleteEmptyDirectory(const WebString& path) { return false; } - virtual bool getFileSize(const WebString& path, long long& result) { return false; } - virtual bool getFileModificationTime(const WebString& path, double& result) { return false; } - virtual WebString directoryName(const WebString& path) { return WebString(); } - virtual WebString pathByAppendingComponent(const WebString& path, const WebString& component) { return WebString(); } - virtual bool makeAllDirectories(const WebString& path) { return false; } - virtual WebString getAbsolutePath(const WebString& path) { return WebString(); } - virtual bool isDirectory(const WebString& path) { return false; } - virtual WebURL filePathToURL(const WebString& path) { return WebURL(); } - virtual FileHandle openFile(const WebString& path, int mode) { return FileHandle(); } - // Should set the FileHandle to a invalid value if the file is closed successfully. - virtual void closeFile(FileHandle&) { } - virtual long long seekFile(FileHandle, long long offset, int origin) { return 0; } - virtual bool truncateFile(FileHandle, long long offset) { return false; } - virtual int readFromFile(FileHandle, char* data, int length) { return 0; } - virtual int writeToFile(FileHandle, const char* data, int length) { return 0; } - -protected: - ~WebFileUtilities() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileWriter.h b/WebKit/chromium/public/WebFileWriter.h deleted file mode 100644 index 9cde098..0000000 --- a/WebKit/chromium/public/WebFileWriter.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileWriter_h -#define WebFileWriter_h - -#include "WebCommon.h" -#include "WebString.h" - -namespace WebKit { - -class WebURL; - -class WebFileWriter { -public: - virtual ~WebFileWriter() { } - - // Only one write or one truncate operation can be in progress at a time. - // These functions are asynchronous and will report results through the WebFileWriter's associated WebFileWriterClient. - virtual void write(long long position, const WebURL& blobURL) = 0; - virtual void truncate(long long length) = 0; - - // Cancel will attempt to abort a running write or truncate. However, it may not be possible to cancel an in-progress action, or the call may have come in too late. Partial writes are possible. - // Do not call cancel when there is no write or truncate in progress. - virtual void cancel() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFileWriterClient.h b/WebKit/chromium/public/WebFileWriterClient.h deleted file mode 100644 index 46ff153..0000000 --- a/WebKit/chromium/public/WebFileWriterClient.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileWriterClient_h -#define WebFileWriterClient_h - -#include "WebCommon.h" -#include "WebFileError.h" - -namespace WebKit { - -class WebFileWriterClient { -public: - // Called for each chunk of a write, to indicate progress. - // On the final chunk, when the write is finished, complete will be true. - virtual void didWrite(long long bytes, bool complete) = 0; - - // Called once when the truncate completes successfully. - virtual void didTruncate() = 0; - - // Called if the write or truncate fails, or if it is cancelled before the write or truncate completes. Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true). - virtual void didFail(WebFileError) = 0; - -protected: - virtual ~WebFileWriterClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFindOptions.h b/WebKit/chromium/public/WebFindOptions.h deleted file mode 100644 index 93d48d3..0000000 --- a/WebKit/chromium/public/WebFindOptions.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFindOptions_h -#define WebFindOptions_h - -#include "WebString.h" - -namespace WebKit { - -// Options used when performing a find-in-page query. -struct WebFindOptions { - // Whether to search forward or backward within the page. - bool forward; - - // Whether search should be case-sensitive. - bool matchCase; - - // Whether this operation is the first request or a follow-up. - bool findNext; - - WebFindOptions() - : forward(true) - , matchCase(false) - , findNext(false) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFloatPoint.h b/WebKit/chromium/public/WebFloatPoint.h deleted file mode 100644 index c053ed6..0000000 --- a/WebKit/chromium/public/WebFloatPoint.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFloatPoint_h -#define WebFloatPoint_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include "IntPoint.h" -#endif - -namespace WebKit { - -struct WebFloatPoint { - float x; - float y; - - WebFloatPoint() - : x(0.0f) - , y(0.0f) - { - } - - WebFloatPoint(float x, float y) - : x(x) - , y(y) - { - } - -#if WEBKIT_IMPLEMENTATION - WebFloatPoint(const WebCore::FloatPoint& p) - : x(p.x()) - , y(p.y()) - { - } - - WebFloatPoint& operator=(const WebCore::FloatPoint& p) - { - x = p.x(); - y = p.y(); - return *this; - } - - operator WebCore::FloatPoint() const - { - return WebCore::FloatPoint(x, y); - } -#endif -}; - -inline bool operator==(const WebFloatPoint& a, const WebFloatPoint& b) -{ - return a.x == b.x && a.y == b.y; -} - -inline bool operator!=(const WebFloatPoint& a, const WebFloatPoint& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFloatRect.h b/WebKit/chromium/public/WebFloatRect.h deleted file mode 100644 index a883513..0000000 --- a/WebKit/chromium/public/WebFloatRect.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFloatRect_h -#define WebFloatRect_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include "FloatRect.h" -#endif - -namespace WebKit { - -struct WebFloatRect { - float x; - float y; - float width; - float height; - - bool isEmpty() const { return width <= 0 || height <= 0; } - - WebFloatRect() - : x(0.0f) - , y(0.0f) - , width(0.0f) - , height(0.0f) - { - } - - WebFloatRect(float x, float y, float width, float height) - : x(x) - , y(y) - , width(width) - , height(height) - { - } - -#if WEBKIT_IMPLEMENTATION - WebFloatRect(const WebCore::FloatRect& r) - : x(r.x()) - , y(r.y()) - , width(r.width()) - , height(r.height()) - { - } - - WebFloatRect& operator=(const WebCore::FloatRect& r) - { - x = r.x(); - y = r.y(); - width = r.width(); - height = r.height(); - return *this; - } - - operator WebCore::FloatRect() const - { - return WebCore::FloatRect(x, y, width, height); - } -#endif -}; - -inline bool operator==(const WebFloatRect& a, const WebFloatRect& b) -{ - return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const WebFloatRect& a, const WebFloatRect& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFont.h b/WebKit/chromium/public/WebFont.h deleted file mode 100644 index a20d52f..0000000 --- a/WebKit/chromium/public/WebFont.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFont_h -#define WebFont_h - -#include "WebCanvas.h" -#include "WebColor.h" -#include "WebCommon.h" - -namespace WebKit { - -struct WebFontDescription; -struct WebFloatPoint; -struct WebFloatRect; -struct WebPoint; -struct WebRect; -struct WebTextRun; - -class WebFont { -public: - virtual ~WebFont() { } - - WEBKIT_API static WebFont* create(const WebFontDescription&); - - virtual WebFontDescription fontDescription() const = 0; - - virtual int ascent() const = 0; - virtual int descent() const = 0; - virtual int height() const = 0; - virtual int lineSpacing() const = 0; - virtual float xHeight() const = 0; - - // Draws the text run to the given canvas. The text is positioned at the - // given left-hand point at the baseline. - // - // The text will be clipped to the given clip rect. |canvasIsOpaque| is - // used to control whether subpixel antialiasing is possible. If there is a - // possibility the area drawn could be semi-transparent, subpixel - // antialiasing will be disabled. - // - // |from| and |to| allow the caller to specify a subrange of the given text - // run to draw. If |to| is -1, the entire run will be drawn. - virtual void drawText(WebCanvas*, const WebTextRun&, const WebFloatPoint& leftBaseline, WebColor, - const WebRect& clip, bool canvasIsOpaque, - int from = 0, int to = -1) const = 0; - - // Measures the width in pixels of the given text run. - virtual int calculateWidth(const WebTextRun&) const = 0; - - // Returns the character offset corresponding to the given horizontal pixel - // position as measured from from the left of the run. - virtual int offsetForPosition(const WebTextRun&, float position) const = 0; - - // Returns the rectangle representing the selection rect for the subrange - // |from| -> |to| of the given text run. You can use -1 for |to| to specify - // the entire run (this will do something similar to calling width()). - // - // The rect will be positioned as if the text was drawn at the given - // |leftBaseline| position. |height| indicates the height of the selection - // rect you want, typically this will just be the height() of this font. - // - // To get the pixel offset of some character (the opposite of - // offsetForPosition()), pass in a |leftBaseline| = (0, 0), |from| = 0, and - // |to| = the character you want. The right edge of the resulting selection - // rect will tell you the right side of the character. - virtual WebFloatRect selectionRectForText(const WebTextRun&, const WebFloatPoint& leftBaseline, - int height, int from = 0, int to = -1) const = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFontCache.h b/WebKit/chromium/public/WebFontCache.h deleted file mode 100644 index 05aadc7..0000000 --- a/WebKit/chromium/public/WebFontCache.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontCache_h -#define WebFontCache_h - -#include "WebCommon.h" - -namespace WebKit { - -// An interface to query and configure WebKit's font cache. -class WebFontCache { -public: - // Returns the number of items in the font data cache. - WEBKIT_API static size_t fontDataCount(); - - // Returns the number of inactive items in the font data cache. - WEBKIT_API static size_t inactiveFontDataCount(); - - // Clears the cache. - WEBKIT_API static void clear(); - -private: - WebFontCache(); // Not intended to be instanced. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFontDescription.h b/WebKit/chromium/public/WebFontDescription.h deleted file mode 100644 index d4bb07e..0000000 --- a/WebKit/chromium/public/WebFontDescription.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontDescription_h -#define WebFontDescription_h - -#include "WebString.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class FontDescription; } -#endif - -namespace WebKit { - -struct WebFontDescription { - enum GenericFamily { - GenericFamilyNone, - GenericFamilyStandard, - GenericFamilySerif, - GenericFamilySansSerif, - GenericFamilyMonospace, - GenericFamilyCursive, - GenericFamilyFantasy - }; - - enum Smoothing { - SmoothingAuto, - SmoothingNone, - SmoothingGrayscale, - SmoothingSubpixel - }; - - enum Weight { - Weight100, - Weight200, - Weight300, - Weight400, - Weight500, - Weight600, - Weight700, - Weight800, - Weight900, - WeightNormal = Weight400, - WeightBold = Weight700 - }; - - WebFontDescription() - : genericFamily(GenericFamilyNone) - , size(0) - , italic(false) - , smallCaps(false) - , weight(WeightNormal) - , smoothing(SmoothingAuto) - , letterSpacing(0) - , wordSpacing(0) - { - } - - WebString family; - GenericFamily genericFamily; - float size; - bool italic; - bool smallCaps; - Weight weight; - Smoothing smoothing; - - short letterSpacing; - short wordSpacing; - -#if WEBKIT_IMPLEMENTATION - WebFontDescription(const WebCore::FontDescription&, short fontLetterSpacing, short fontWordSpacing); - - operator WebCore::FontDescription() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFormControlElement.h b/WebKit/chromium/public/WebFormControlElement.h deleted file mode 100644 index 56a02dd..0000000 --- a/WebKit/chromium/public/WebFormControlElement.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFormControlElement_h -#define WebFormControlElement_h - -#include "WebElement.h" -#include "WebString.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLFormControlElement; } -#endif - -namespace WebKit { - -// Provides readonly access to some properties of a DOM form control element node. -class WebFormControlElement : public WebElement { -public: - WebFormControlElement() : WebElement() { } - WebFormControlElement(const WebFormControlElement& e) : WebElement(e) { } - - WebFormControlElement& operator=(const WebFormControlElement& e) - { - WebElement::assign(e); - return *this; - } - void assign(const WebFormControlElement& e) { WebElement::assign(e); } - - WEBKIT_API bool isEnabled() const; - WEBKIT_API WebString formControlName() const; - WEBKIT_API WebString formControlType() const; - - // Returns the name that should be used for the specified |element| when - // storing autofill data. This is either the field name or its id, an empty - // string if it has no name and no id. - WEBKIT_API WebString nameForAutofill() const; - -#if WEBKIT_IMPLEMENTATION - WebFormControlElement(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&); - WebFormControlElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormControlElement>&); - operator WTF::PassRefPtr<WebCore::HTMLFormControlElement>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h deleted file mode 100644 index 53554d7..0000000 --- a/WebKit/chromium/public/WebFormElement.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFormElement_h -#define WebFormElement_h - -#include "WebElement.h" -#include "WebVector.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLFormElement; } -#endif - -namespace WebKit { - - class WebInputElement; - class WebFormControlElement; - - // A container for passing around a reference to a form element. Provides - // some information about the form. - class WebFormElement : public WebElement { - public: - ~WebFormElement() { reset(); } - - WebFormElement() : WebElement() { } - WebFormElement(const WebFormElement& element) : WebElement(element) { } - - WebFormElement& operator=(const WebFormElement& element) - { - WebElement::assign(element); - return *this; - } - void assign(const WebFormElement& element) { WebElement::assign(element); } - - WEBKIT_API bool autoComplete() const; - WEBKIT_API WebString action() const; - WEBKIT_API WebString name() const; - WEBKIT_API WebString method() const; - WEBKIT_API bool wasUserSubmitted() const; - WEBKIT_API void submit(); - // FIXME: Deprecate and replace with WebVector<WebElement>. - WEBKIT_API void getNamedElements(const WebString&, WebVector<WebNode>&); - WEBKIT_API void getFormControlElements(WebVector<WebFormControlElement>&) const; - -#if WEBKIT_IMPLEMENTATION - WebFormElement(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); - WebFormElement& operator=(const WTF::PassRefPtr<WebCore::HTMLFormElement>&); - operator WTF::PassRefPtr<WebCore::HTMLFormElement>() const; -#endif - }; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h deleted file mode 100644 index 30bf03b..0000000 --- a/WebKit/chromium/public/WebFrame.h +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFrame_h -#define WebFrame_h - -#include "WebCanvas.h" -#include "WebURL.h" - -struct NPObject; - -#if WEBKIT_USING_V8 -namespace v8 { -class Context; -class Value; -template <class T> class Handle; -template <class T> class Local; -} -#endif - -namespace WebKit { - -class WebAnimationController; -class WebData; -class WebDataSource; -class WebDocument; -class WebElement; -class WebFormElement; -class WebHistoryItem; -class WebInputElement; -class WebPasswordAutocompleteListener; -class WebPerformance; -class WebRange; -class WebSecurityOrigin; -class WebString; -class WebURL; -class WebURLLoader; -class WebURLRequest; -class WebView; -struct WebConsoleMessage; -struct WebFindOptions; -struct WebRect; -struct WebScriptSource; -struct WebSize; -template <typename T> class WebVector; - -class WebFrame { -public: - // Returns the number of live WebFrame objects, used for leak checking. - WEBKIT_API static int instanceCount(); - - // The two functions below retrieve the WebFrame instances relating the - // currently executing JavaScript. Since JavaScript can make function - // calls across frames, though, we need to be more precise. - // - // For example, imagine that a JS function in frame A calls a function - // in frame B, which calls native code, which wants to know what the - // 'active' frame is. - // - // The 'entered context' is the context where execution first entered - // the script engine; the context that is at the bottom of the JS - // function stack. frameForEnteredContext() would return frame A in - // our example. - // - // The 'current context' is the context the JS engine is currently - // inside of; the context that is at the top of the JS function stack. - // frameForCurrentContext() would return frame B in our example. - WEBKIT_API static WebFrame* frameForEnteredContext(); - WEBKIT_API static WebFrame* frameForCurrentContext(); - - // Returns the frame inside a given frame or iframe element. Returns 0 if - // the given element is not a frame, iframe or if the frame is empty. - WEBKIT_API static WebFrame* fromFrameOwnerElement(const WebElement&); - - - // Basic properties --------------------------------------------------- - - // The name of this frame. - virtual WebString name() const = 0; - - // Sets the name of this frame. For child frames (frames that are not a - // top-most frame) the actual name may have a suffix appended to make the - // frame name unique within the hierarchy. - virtual void setName(const WebString&) = 0; - - // A globally unique identifier for this frame. - virtual long long identifier() const = 0; - - // The url of the document loaded in this frame. This is equivalent to - // dataSource()->request().url(). - virtual WebURL url() const = 0; - - // The url of the favicon (if any) specified by the document loaded in - // this frame. - virtual WebURL favIconURL() const = 0; - - // The url of the OpenSearch Desription Document (if any) specified by - // the document loaded in this frame. - virtual WebURL openSearchDescriptionURL() const = 0; - - // Return the frame's encoding. - virtual WebString encoding() const = 0; - - - // Geometry ----------------------------------------------------------- - - // NOTE: These routines do not force page layout so their results may - // not be accurate if the page layout is out-of-date. - - // If set to false, do not draw scrollbars on this frame's view. - virtual void setCanHaveScrollbars(bool) = 0; - - // The scroll offset from the top-left corner of the frame in pixels. - virtual WebSize scrollOffset() const = 0; - - // The size of the contents area. - virtual WebSize contentsSize() const = 0; - - // Returns the minimum preferred width of the content contained in the - // current document. - virtual int contentsPreferredWidth() const = 0; - - // Returns the scroll height of the document element. This is - // equivalent to the DOM property of the same name, and is the minimum - // height required to display the document without scrollbars. - virtual int documentElementScrollHeight() const = 0; - - // Returns true if the contents (minus scrollbars) has non-zero area. - virtual bool hasVisibleContent() const = 0; - - - // Hierarchy ---------------------------------------------------------- - - // Returns the containing view. - virtual WebView* view() const = 0; - - // Returns the frame that opened this frame or 0 if there is none. - virtual WebFrame* opener() const = 0; - - // Returns the parent frame or 0 if this is a top-most frame. - virtual WebFrame* parent() const = 0; - - // Returns the top-most frame in the hierarchy containing this frame. - virtual WebFrame* top() const = 0; - - // Returns the first/last child frame. - virtual WebFrame* firstChild() const = 0; - virtual WebFrame* lastChild() const = 0; - - // Returns the next/previous sibling frame. - virtual WebFrame* nextSibling() const = 0; - virtual WebFrame* previousSibling() const = 0; - - // Returns the next/previous frame in "frame traversal order" - // optionally wrapping around. - virtual WebFrame* traverseNext(bool wrap) const = 0; - virtual WebFrame* traversePrevious(bool wrap) const = 0; - - // Returns the child frame identified by the given name. - virtual WebFrame* findChildByName(const WebString& name) const = 0; - - // Returns the child frame identified by the given xpath expression. - virtual WebFrame* findChildByExpression(const WebString& xpath) const = 0; - - - // Content ------------------------------------------------------------ - - virtual WebDocument document() const = 0; - - virtual void forms(WebVector<WebFormElement>&) const = 0; - - virtual WebAnimationController* animationController() = 0; - - virtual WebPerformance performance() const = 0; - - - // Scripting ---------------------------------------------------------- - - // Returns the security origin of the current document. - virtual WebSecurityOrigin securityOrigin() const = 0; - - // This grants the currently loaded document access to all security - // origins (including file URLs). Use with care. The access is - // revoked when a new document is loaded into this frame. - virtual void grantUniversalAccess() = 0; - - // Returns a NPObject corresponding to this frame's DOMWindow. - virtual NPObject* windowObject() const = 0; - - // Binds a NPObject as a property of this frame's DOMWindow. - virtual void bindToWindowObject(const WebString& name, NPObject*) = 0; - - // Executes script in the context of the current page. - virtual void executeScript(const WebScriptSource&) = 0; - - // Executes JavaScript in a new world associated with the web frame. - // The script gets its own global scope and its own prototypes for - // intrinsic JavaScript objects (String, Array, and so-on). It also - // gets its own wrappers for all DOM nodes and DOM constructors. - // extensionGroup is an embedder-provided specifier that controls which - // v8 extensions are loaded into the new context - see - // WebKit::registerExtension for the corresponding specifier. - virtual void executeScriptInIsolatedWorld( - int worldId, const WebScriptSource* sources, unsigned numSources, - int extensionGroup) = 0; - - // Logs to the console associated with this frame. - virtual void addMessageToConsole(const WebConsoleMessage&) = 0; - - // Calls window.gc() if it is defined. - virtual void collectGarbage() = 0; - -#if WEBKIT_USING_V8 - // Executes script in the context of the current page and returns the value - // that the script evaluated to. - virtual v8::Handle<v8::Value> executeScriptAndReturnValue( - const WebScriptSource&) = 0; - - // Returns the V8 context for this frame, or an empty handle if there - // is none. - virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0; -#endif - - - // Styling ------------------------------------------------------------- - - // Insert the given text as a STYLE element at the beginning of the - // document. |elementId| can be empty, but if specified then it is used - // as the id for the newly inserted element (replacing an existing one - // with the same id, if any). - virtual bool insertStyleText(const WebString& styleText, - const WebString& elementId) = 0; - - - // Navigation ---------------------------------------------------------- - - // Reload the current document. - // True |ignoreCache| explicitly bypasses caches. - // False |ignoreCache| revalidates any existing cache entries. - virtual void reload(bool ignoreCache = false) = 0; - - // Load the given URL. - virtual void loadRequest(const WebURLRequest&) = 0; - - // Load the given history state, corresponding to a back/forward - // navigation. - virtual void loadHistoryItem(const WebHistoryItem&) = 0; - - // Loads the given data with specific mime type and optional text - // encoding. For HTML data, baseURL indicates the security origin of - // the document and is used to resolve links. If specified, - // unreachableURL is reported via WebDataSource::unreachableURL. If - // replace is false, then this data will be loaded as a normal - // navigation. Otherwise, the current history item will be replaced. - virtual void loadData(const WebData& data, - const WebString& mimeType, - const WebString& textEncoding, - const WebURL& baseURL, - const WebURL& unreachableURL = WebURL(), - bool replace = false) = 0; - - // This method is short-hand for calling LoadData, where mime_type is - // "text/html" and text_encoding is "UTF-8". - virtual void loadHTMLString(const WebData& html, - const WebURL& baseURL, - const WebURL& unreachableURL = WebURL(), - bool replace = false) = 0; - - // Returns true if the current frame is busy loading content. - virtual bool isLoading() const = 0; - - // Stops any pending loads on the frame and its children. - virtual void stopLoading() = 0; - - // Returns the data source that is currently loading. May be null. - virtual WebDataSource* provisionalDataSource() const = 0; - - // Returns the data source that is currently loaded. - virtual WebDataSource* dataSource() const = 0; - - // Returns the previous history item. Check WebHistoryItem::isNull() - // before using. - virtual WebHistoryItem previousHistoryItem() const = 0; - - // Returns the current history item. Check WebHistoryItem::isNull() - // before using. - virtual WebHistoryItem currentHistoryItem() const = 0; - - // View-source rendering mode. Set this before loading an URL to cause - // it to be rendered in view-source mode. - virtual void enableViewSourceMode(bool) = 0; - virtual bool isViewSourceModeEnabled() const = 0; - - // Sets the referrer for the given request to be the specified URL or - // if that is null, then it sets the referrer to the referrer that the - // frame would use for subresources. NOTE: This method also filters - // out invalid referrers (e.g., it is invalid to send a HTTPS URL as - // the referrer for a HTTP request). - virtual void setReferrerForRequest(WebURLRequest&, const WebURL&) = 0; - - // Called to associate the WebURLRequest with this frame. The request - // will be modified to inherit parameters that allow it to be loaded. - // This method ends up triggering WebFrameClient::willSendRequest. - // DEPRECATED: Please use createAssociatedURLLoader instead. - virtual void dispatchWillSendRequest(WebURLRequest&) = 0; - - // Returns a WebURLLoader that is associated with this frame. The loader - // will, for example, be cancelled when WebFrame::stopLoading is called. - // FIXME: stopLoading does not yet cancel an associated loader!! - virtual WebURLLoader* createAssociatedURLLoader() = 0; - - // Called from within WebFrameClient::didReceiveDocumentData to commit - // data for the frame that will be used to construct the frame's - // document. - virtual void commitDocumentData(const char* data, size_t length) = 0; - - // Returns the number of registered unload listeners. - virtual unsigned unloadListenerCount() const = 0; - - // Returns true if a user gesture is currently being processed. - virtual bool isProcessingUserGesture() const = 0; - - // Returns true if this frame is in the process of opening a new frame - // with a suppressed opener. - virtual bool willSuppressOpenerInNewFrame() const = 0; - - - // Editing ------------------------------------------------------------- - - // Replaces the selection with the given text. - virtual void replaceSelection(const WebString& text) = 0; - - virtual void insertText(const WebString& text) = 0; - - virtual void setMarkedText(const WebString& text, unsigned location, unsigned length) = 0; - virtual void unmarkText() = 0; - virtual bool hasMarkedText() const = 0; - - virtual WebRange markedRange() const = 0; - - virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; - - // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, - // Unselect, etc. See EditorCommand.cpp for the full list of supported - // commands. - virtual bool executeCommand(const WebString&) = 0; - virtual bool executeCommand(const WebString&, const WebString& value) = 0; - virtual bool isCommandEnabled(const WebString&) const = 0; - - // Spell-checking support. - virtual void enableContinuousSpellChecking(bool) = 0; - virtual bool isContinuousSpellCheckingEnabled() const = 0; - - - // Selection ----------------------------------------------------------- - - virtual bool hasSelection() const = 0; - - virtual WebRange selectionRange() const = 0; - - virtual WebString selectionAsText() const = 0; - virtual WebString selectionAsMarkup() const = 0; - - // Expands the selection to a word around the caret and returns - // true. Does nothing and returns false if there is no caret or - // there is ranged selection. - virtual bool selectWordAroundCaret() = 0; - - - // Printing ------------------------------------------------------------ - - // Reformats the WebFrame for printing. pageSize is the page size in - // points (a point in 1/72 of an inch). printerDPI is the user selected, - // DPI for the printer. Returns the number of pages that - // can be printed at the given page size. The out param useBrowserOverlays - // specifies whether the browser process should use its overlays (header, - // footer, margins etc) or whether the renderer controls this. - virtual int printBegin(const WebSize& pageSize, int printerDPI = 72, - bool* useBrowserOverlays = 0) = 0; - - // Returns the page shrinking factor calculated by webkit (usually - // between 1/1.25 and 1/2). Returns 0 if the page number is invalid or - // not in printing mode. - virtual float getPrintPageShrink(int page) = 0; - - // Prints one page, and returns the calculated page shrinking factor - // (usually between 1/1.25 and 1/2). Returns 0 if the page number is - // invalid or not in printing mode. - virtual float printPage(int pageToPrint, WebCanvas*) = 0; - - // Reformats the WebFrame for screen display. - virtual void printEnd() = 0; - - // CSS3 Paged Media ---------------------------------------------------- - - // Returns true if page box (margin boxes and page borders) is visible. - virtual bool isPageBoxVisible(int pageIndex) = 0; - - // Returns the preferred page size and margins in pixels, assuming 96 - // pixels per inch. pageSize, marginTop, marginRight, marginBottom, - // marginLeft must be initialized to the default values that are used if - // auto is specified. - virtual void pageSizeAndMarginsInPixels(int pageIndex, - WebSize& pageSize, - int& marginTop, - int& marginRight, - int& marginBottom, - int& marginLeft) = 0; - - // Find-in-page -------------------------------------------------------- - - // Searches a frame for a given string. - // - // If a match is found, this function will select it (scrolling down to - // make it visible if needed) and fill in selectionRect with the - // location of where the match was found (in window coordinates). - // - // If no match is found, this function clears all tickmarks and - // highlighting. - // - // Returns true if the search string was found, false otherwise. - virtual bool find(int identifier, - const WebString& searchText, - const WebFindOptions& options, - bool wrapWithinFrame, - WebRect* selectionRect) = 0; - - // Notifies the frame that we are no longer interested in searching. - // This will abort any asynchronous scoping effort already under way - // (see the function scopeStringMatches for details) and erase all - // tick-marks and highlighting from the previous search. If - // clearSelection is true, it will also make sure the end state for the - // find operation does not leave a selection. This can occur when the - // user clears the search string but does not close the find box. - virtual void stopFinding(bool clearSelection) = 0; - - // Counts how many times a particular string occurs within the frame. - // It also retrieves the location of the string and updates a vector in - // the frame so that tick-marks and highlighting can be drawn. This - // function does its work asynchronously, by running for a certain - // time-slice and then scheduling itself (co-operative multitasking) to - // be invoked later (repeating the process until all matches have been - // found). This allows multiple frames to be searched at the same time - // and provides a way to cancel at any time (see - // cancelPendingScopingEffort). The parameter searchText specifies - // what to look for and |reset| signals whether this is a brand new - // request or a continuation of the last scoping effort. - virtual void scopeStringMatches(int identifier, - const WebString& searchText, - const WebFindOptions& options, - bool reset) = 0; - - // Cancels any outstanding requests for scoping string matches on a frame. - virtual void cancelPendingScopingEffort() = 0; - - // This function is called on the main frame during the scoping effort - // to keep a running tally of the accumulated total match-count for all - // frames. After updating the count it will notify the WebViewClient - // about the new count. - virtual void increaseMatchCount(int count, int identifier) = 0; - - // This function is called on the main frame to reset the total number - // of matches found during the scoping effort. - virtual void resetMatchCount() = 0; - - - // Password autocompletion --------------------------------------------- - - // Registers a listener for the specified user name input element. The - // listener will receive notifications for blur and when autocomplete - // should be triggered. - // An element can have only one listener. If a listener already exists, - // this method returns false and does not add the new one. - // Either way, the WebFrame becomes the owner of the passed listener. - virtual bool registerPasswordListener( - WebInputElement, - WebPasswordAutocompleteListener*) = 0; - - // Dispatches an Autocompletion notification to registered listener if one - // exists that is registered against the WebInputElement specified. - virtual void notifiyPasswordListenerOfAutocomplete( - const WebInputElement&) = 0; - - - // Utility ------------------------------------------------------------- - - // Returns the contents of this frame as a string. If the text is - // longer than maxChars, it will be clipped to that length. WARNING: - // This function may be slow depending on the number of characters - // retrieved and page complexity. For a typically sized page, expect - // it to take on the order of milliseconds. - // - // If there is room, subframe text will be recursively appended. Each - // frame will be separated by an empty line. - virtual WebString contentAsText(size_t maxChars) const = 0; - - // Returns HTML text for the contents of this frame. This is generated - // from the DOM. - virtual WebString contentAsMarkup() const = 0; - - // Returns a text representation of the render tree. This method is used - // to support layout tests. - virtual WebString renderTreeAsText() const = 0; - - // Returns the counter value for the specified element. This method is - // used to support layout tests. - virtual WebString counterValueForElementById(const WebString& id) const = 0; - - // Calls markerTextForListItem() defined in WebCore/rendering/RenderTreeAsText.h. - virtual WebString markerTextForListItem(const WebElement&) const = 0; - - // Returns the number of page where the specified element will be put. - // This method is used to support layout tests. - virtual int pageNumberForElementById(const WebString& id, - float pageWidthInPixels, - float pageHeightInPixels) const = 0; - - // Returns the bounds rect for current selection. If selection is performed - // on transformed text, the rect will still bound the selection but will - // not be transformed itself. If no selection is present, the rect will be - // empty ((0,0), (0,0)). - virtual WebRect selectionBoundsRect() const = 0; - - // Only for testing purpose: - // Returns true if selection.anchorNode has a marker on range from |from| with |length|. - virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0; - - // Pauses and samples an SVG animation. Returns false if there's no svg - // animation to pause. This is only for testing. - virtual bool pauseSVGAnimation(const WebString& animationId, - double time, - const WebString& elementId) = 0; - - // Dumps the layer tree, used by the accelerated compositor, in - // text form. This is used only by layout tests. - virtual WebString layerTreeAsText() const = 0; - -protected: - ~WebFrame() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h deleted file mode 100644 index 1c6fd04..0000000 --- a/WebKit/chromium/public/WebFrameClient.h +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFrameClient_h -#define WebFrameClient_h - -#include "WebCommon.h" -#include "WebFileSystem.h" -#include "WebNavigationPolicy.h" -#include "WebNavigationType.h" -#include "WebURLError.h" - -namespace WebKit { - -class WebApplicationCacheHost; -class WebApplicationCacheHostClient; -class WebCookieJar; -class WebDataSource; -class WebFormElement; -class WebFrame; -class WebMediaPlayer; -class WebMediaPlayerClient; -class WebNode; -class WebPlugin; -class WebSecurityOrigin; -class WebSharedWorker; -class WebString; -class WebURL; -class WebURLRequest; -class WebURLResponse; -class WebWorker; -class WebWorkerClient; -struct WebPluginParams; -struct WebRect; -struct WebSize; -struct WebURLError; - -class WebFrameClient { -public: - // Factory methods ----------------------------------------------------- - - // May return null. - virtual WebPlugin* createPlugin(WebFrame*, const WebPluginParams&) { return 0; } - - // May return null. - virtual WebWorker* createWorker(WebFrame*, WebWorkerClient*) { return 0; } - - // May return null. - virtual WebSharedWorker* createSharedWorker(WebFrame*, const WebURL&, const WebString&, unsigned long long) { return 0; } - - // May return null. - virtual WebMediaPlayer* createMediaPlayer(WebFrame*, WebMediaPlayerClient*) { return 0; } - - // May return null. - virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*) { return 0; } - - - // Services ------------------------------------------------------------ - - // A frame specific cookie jar. May return null, in which case - // WebKitClient::cookieJar() will be called to access cookies. - virtual WebCookieJar* cookieJar(WebFrame*) { return 0; } - - - // General notifications ----------------------------------------------- - - // This frame has been detached from the view. - // - // FIXME: Do not use this in new code. Currently this is used by code in - // Chromium that errantly caches WebKit objects. - virtual void frameDetached(WebFrame*) { } - - // This frame is about to be closed. - virtual void willClose(WebFrame*) { } - - // Controls whether plugins are allowed for this frame. - virtual bool allowPlugins(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } - - // Notifies the client that the frame would have instantiated a plug-in if plug-ins were enabled. - virtual void didNotAllowPlugins(WebFrame*) { } - - // Controls whether images are allowed for this frame. - virtual bool allowImages(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } - - - // Load commands ------------------------------------------------------- - - // The client should handle the navigation externally. - virtual void loadURLExternally( - WebFrame*, const WebURLRequest&, WebNavigationPolicy) { } - - - // Navigational queries ------------------------------------------------ - - // The client may choose to alter the navigation policy. Otherwise, - // defaultPolicy should just be returned. - virtual WebNavigationPolicy decidePolicyForNavigation( - WebFrame*, const WebURLRequest&, WebNavigationType, - const WebNode& originatingNode, - WebNavigationPolicy defaultPolicy, bool isRedirect) { return defaultPolicy; } - - // Query if the specified request can be handled. - virtual bool canHandleRequest( - WebFrame*, const WebURLRequest& request) { return true; } - - // Returns an error corresponding to canHandledRequest() returning false. - virtual WebURLError cannotHandleRequestError( - WebFrame*, const WebURLRequest& request) { return WebURLError(); } - - // Returns an error corresponding to a user cancellation event. - virtual WebURLError cancelledError( - WebFrame*, const WebURLRequest& request) { return WebURLError(); } - - // Notify that a URL cannot be handled. - virtual void unableToImplementPolicyWithError( - WebFrame*, const WebURLError&) { } - - - // Navigational notifications ------------------------------------------ - - // A form submission has been requested, but the page's submit event handler - // hasn't yet had a chance to run (and possibly alter/interrupt the submit.) - virtual void willSendSubmitEvent(WebFrame*, const WebFormElement&) { } - - // A form submission is about to occur. - virtual void willSubmitForm(WebFrame*, const WebFormElement&) { } - - // A client-side redirect will occur. This may correspond to a <META - // refresh> or some script activity. - virtual void willPerformClientRedirect( - WebFrame*, const WebURL& from, const WebURL& to, - double interval, double fireTime) { } - - // A client-side redirect was cancelled. - virtual void didCancelClientRedirect(WebFrame*) { } - - // A client-side redirect completed. - virtual void didCompleteClientRedirect(WebFrame*, const WebURL& fromURL) { } - - // A datasource has been created for a new navigation. The given - // datasource will become the provisional datasource for the frame. - virtual void didCreateDataSource(WebFrame*, WebDataSource*) { } - - // A new provisional load has been started. - virtual void didStartProvisionalLoad(WebFrame*) { } - - // The provisional load was redirected via a HTTP 3xx response. - virtual void didReceiveServerRedirectForProvisionalLoad(WebFrame*) { } - - // The provisional load failed. - virtual void didFailProvisionalLoad(WebFrame*, const WebURLError&) { } - - // Notifies the client to commit data for the given frame. The client - // may optionally prevent default processing by setting preventDefault - // to true before returning. If default processing is prevented, then - // it is up to the client to manually call commitDocumentData on the - // WebFrame. It is only valid to call commitDocumentData within a call - // to didReceiveDocumentData. If commitDocumentData is not called, - // then an empty document will be loaded. - virtual void didReceiveDocumentData( - WebFrame*, const char* data, size_t length, bool& preventDefault) { } - - // The provisional datasource is now committed. The first part of the - // response body has been received, and the encoding of the response - // body is known. - virtual void didCommitProvisionalLoad(WebFrame*, bool isNewNavigation) { } - - // The window object for the frame has been cleared of any extra - // properties that may have been set by script from the previously - // loaded document. - virtual void didClearWindowObject(WebFrame*) { } - - // The document element has been created. - virtual void didCreateDocumentElement(WebFrame*) { } - - // The page title is available. - virtual void didReceiveTitle(WebFrame*, const WebString& title) { } - - // The icons for the page have changed. - virtual void didChangeIcons(WebFrame*) { } - - // The frame's document finished loading. - virtual void didFinishDocumentLoad(WebFrame*) { } - - // The 'load' event was dispatched. - virtual void didHandleOnloadEvents(WebFrame*) { } - - // The frame's document or one of its subresources failed to load. - virtual void didFailLoad(WebFrame*, const WebURLError&) { } - - // The frame's document and all of its subresources succeeded to load. - virtual void didFinishLoad(WebFrame*) { } - - // The navigation resulted in no change to the documents within the page. - // For example, the navigation may have just resulted in scrolling to a - // named anchor or a PopState event may have been dispatched. - virtual void didNavigateWithinPage(WebFrame*, bool isNewNavigation) { } - - // The navigation resulted in scrolling the page to a named anchor instead - // of downloading a new document. - virtual void didChangeLocationWithinPage(WebFrame*) { } - - // Called upon update to scroll position, document state, and other - // non-navigational events related to the data held by WebHistoryItem. - // WARNING: This method may be called very frequently. - virtual void didUpdateCurrentHistoryItem(WebFrame*) { } - - - // Low-level resource notifications ------------------------------------ - - // An identifier was assigned to the specified request. The client - // should remember this association if interested in subsequent events. - virtual void assignIdentifierToRequest( - WebFrame*, unsigned identifier, const WebURLRequest&) { } - - // Remove the association between an identifier assigned to a request if - // the client keeps such an association. - virtual void removeIdentifierForRequest(unsigned identifier) { } - - // A request is about to be sent out, and the client may modify it. Request - // is writable, and changes to the URL, for example, will change the request - // made. If this request is the result of a redirect, then redirectResponse - // will be non-null and contain the response that triggered the redirect. - virtual void willSendRequest( - WebFrame*, unsigned identifier, WebURLRequest&, - const WebURLResponse& redirectResponse) { } - - // Response headers have been received for the resource request given - // by identifier. - virtual void didReceiveResponse( - WebFrame*, unsigned identifier, const WebURLResponse&) { } - - // The resource request given by identifier succeeded. - virtual void didFinishResourceLoad( - WebFrame*, unsigned identifier) { } - - // The resource request given by identifier failed. - virtual void didFailResourceLoad( - WebFrame*, unsigned identifier, const WebURLError&) { } - - // The specified request was satified from WebCore's memory cache. - virtual void didLoadResourceFromMemoryCache( - WebFrame*, const WebURLRequest&, const WebURLResponse&) { } - - // This frame has displayed inactive content (such as an image) from an - // insecure source. Inactive content cannot spread to other frames. - virtual void didDisplayInsecureContent(WebFrame*) { } - - // The indicated security origin has run active content (such as a - // script) from an insecure source. Note that the insecure content can - // spread to other frames in the same origin. - virtual void didRunInsecureContent(WebFrame*, const WebSecurityOrigin&) { } - - - // Script notifications ------------------------------------------------ - - // Controls whether scripts are allowed to execute for this frame. - virtual bool allowScript(WebFrame*, bool enabledPerSettings) { return enabledPerSettings; } - - // Controls whether access to Web Databases is allowed for this frame. - virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) { return true; } - - // Notifies the client that the frame would have executed script if script were enabled. - virtual void didNotAllowScript(WebFrame*) { } - - // Script in the page tried to allocate too much memory. - virtual void didExhaustMemoryAvailableForScript(WebFrame*) { } - - // Notifies that a new script context has been created for this frame. - // This is similar to didClearWindowObject but only called once per - // frame context. - virtual void didCreateScriptContext(WebFrame*) { } - - // Notifies that this frame's script context has been destroyed. - virtual void didDestroyScriptContext(WebFrame*) { } - - // Notifies that a garbage-collected context was created - content - // scripts. - virtual void didCreateIsolatedScriptContext(WebFrame*) { } - - // Controls whether the given script extension should run in a new script - // context in this frame. If extensionGroup is 0, the script context is the - // frame's main context. Otherwise, it is a context created by - // WebFrame::executeScriptInIsolatedWorld with that same extensionGroup - // value. - virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; } - - - // Geometry notifications ---------------------------------------------- - - // The frame's document finished the initial layout of a page. - virtual void didFirstLayout(WebFrame*) { } - - // The frame's document finished the initial non-empty layout of a page. - virtual void didFirstVisuallyNonEmptyLayout(WebFrame*) { } - - // The size of the content area changed. - virtual void didChangeContentsSize(WebFrame*, const WebSize&) { } - - // The main frame scrolled. - virtual void didChangeScrollOffset(WebFrame*) { } - - - // Find-in-page notifications ------------------------------------------ - - // Notifies how many matches have been found so far, for a given - // identifier. |finalUpdate| specifies whether this is the last update - // (all frames have completed scoping). - virtual void reportFindInPageMatchCount( - int identifier, int count, bool finalUpdate) { } - - // Notifies what tick-mark rect is currently selected. The given - // identifier lets the client know which request this message belongs - // to, so that it can choose to ignore the message if it has moved on - // to other things. The selection rect is expected to have coordinates - // relative to the top left corner of the web page area and represent - // where on the screen the selection rect is currently located. - virtual void reportFindInPageSelection( - int identifier, int activeMatchOrdinal, const WebRect& selection) { } - - // FileSystem ---------------------------------------------------- - - // Requests to open a FileSystem. - // |size| indicates how much storage space (in bytes) the caller expects - // to need. - // WebFileSystemCallbacks::didOpenFileSystem() must be called with - // a name and root path for the requested FileSystem when the operation - // is completed successfully. WebFileSystemCallbacks::didFail() must be - // called otherwise. The create bool is for indicating whether or not to - // create root path for file systems if it do not exist. - virtual void openFileSystem( - WebFrame*, WebFileSystem::Type, long long size, - bool create, WebFileSystemCallbacks*) { } - - // FIXME: This method should be deleted once chromium implements the new method above. - virtual void openFileSystem(WebFrame* frame, WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks) { return openFileSystem(frame, type, size, true, callbacks); } - -protected: - ~WebFrameClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebGeolocationClient.h b/WebKit/chromium/public/WebGeolocationClient.h deleted file mode 100644 index 1dfb0cd..0000000 --- a/WebKit/chromium/public/WebGeolocationClient.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationClient_h -#define WebGeolocationClient_h - -namespace WebKit { -class WebGeolocationController; -class WebGeolocationPermissionRequest; -class WebGeolocationPosition; - -class WebGeolocationClient { -public: - virtual ~WebGeolocationClient() {} - - virtual void startUpdating() = 0; - virtual void stopUpdating() = 0; - virtual void setEnableHighAccuracy(bool) = 0; - virtual void geolocationDestroyed() = 0; - virtual bool lastPosition(WebGeolocationPosition&) = 0; - - virtual void requestPermission(const WebGeolocationPermissionRequest&) = 0; - virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&) = 0; - - // The controller is valid until geolocationDestroyed() is invoked. - // Ownership of the WebGeolocationController is transferred to the client. - virtual void setController(WebGeolocationController*) = 0; -}; - -} // namespace WebKit - -#endif // WebGeolocationClient_h diff --git a/WebKit/chromium/public/WebGeolocationClientMock.h b/WebKit/chromium/public/WebGeolocationClientMock.h deleted file mode 100644 index 08a85e2..0000000 --- a/WebKit/chromium/public/WebGeolocationClientMock.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationClientMock_h -#define WebGeolocationClientMock_h - -#include "WebCommon.h" -#include "WebGeolocationClient.h" -#include "WebPrivateOwnPtr.h" - -namespace WebCore { -class GeolocationClientMock; -} - -namespace WebKit { -class WebGeolocationPosition; -class WebString; - -class WebGeolocationClientMock : public WebGeolocationClient { -public: - WEBKIT_API static WebGeolocationClientMock* create(); - ~WebGeolocationClientMock() { reset(); } - - WEBKIT_API void setPosition(double latitude, double longitude, double accuracy); - WEBKIT_API void setError(int errorCode, const WebString& message); - WEBKIT_API void setPermission(bool); - WEBKIT_API void resetMock(); - - virtual void startUpdating(); - virtual void stopUpdating(); - virtual void setEnableHighAccuracy(bool); - - virtual void geolocationDestroyed(); - virtual void setController(WebGeolocationController*); - - virtual void requestPermission(const WebGeolocationPermissionRequest&); - virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&); - - virtual bool lastPosition(WebGeolocationPosition& webPosition); - -private: - WebGeolocationClientMock(); - WEBKIT_API void reset(); - - WebPrivateOwnPtr<WebCore::GeolocationClientMock> m_clientMock; -}; -} - -#endif // WebGeolocationClientMock_h diff --git a/WebKit/chromium/public/WebGeolocationController.h b/WebKit/chromium/public/WebGeolocationController.h deleted file mode 100644 index 3cddd0f..0000000 --- a/WebKit/chromium/public/WebGeolocationController.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationController_h -#define WebGeolocationController_h - -#include "WebCommon.h" -#include "WebNonCopyable.h" - -namespace WebCore { class GeolocationController; } - -namespace WebKit { - -class WebGeolocationPosition; -class WebGeolocationError; - -// Note that the WebGeolocationController is invalid after the -// WebGeolocationClient::geolocationDestroyed() has been received. -class WebGeolocationController : public WebNonCopyable { -public: - WEBKIT_API void positionChanged(const WebGeolocationPosition&); - WEBKIT_API void errorOccurred(const WebGeolocationError&); - -#if WEBKIT_IMPLEMENTATION - WebGeolocationController(WebCore::GeolocationController* c) - : m_private(c) - { - } - - WebCore::GeolocationController* controller() const { return m_private; } -#endif - -private: - // No implementation for the default constructor. Declared private to ensure that no instances - // can be created by the consumers of Chromium WebKit. - WebGeolocationController(); - - WebCore::GeolocationController* m_private; -}; - -} // namespace WebKit - -#endif // WebGeolocationController_h diff --git a/WebKit/chromium/public/WebGeolocationError.h b/WebKit/chromium/public/WebGeolocationError.h deleted file mode 100644 index ecb758c..0000000 --- a/WebKit/chromium/public/WebGeolocationError.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationError_h -#define WebGeolocationError_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -#if WEBKIT_IMPLEMENTATION -#include <wtf/PassRefPtr.h> -#endif - -namespace WebCore { class GeolocationError; } - -namespace WebKit { - -class WebString; - -class WebGeolocationError { -public: - enum Error { - ErrorPermissionDenied, - ErrorPositionUnavailable - }; - - WebGeolocationError(Error code, const WebString& message) { assign(code, message); } - WebGeolocationError(const WebGeolocationError& other) { assign(other); } - ~WebGeolocationError() { reset(); } - - WEBKIT_API void assign(Error code, const WebString& message); - WEBKIT_API void assign(const WebGeolocationError&); - WEBKIT_API void reset(); - -#if WEBKIT_IMPLEMENTATION - WebGeolocationError(WTF::PassRefPtr<WebCore::GeolocationError>); - WebGeolocationError& operator=(WTF::PassRefPtr<WebCore::GeolocationError>); - operator WTF::PassRefPtr<WebCore::GeolocationError>() const; -#endif - -private: - WebPrivatePtr<WebCore::GeolocationError> m_private; -}; - -} // namespace WebKit - -#endif // WebGeolocationError_h diff --git a/WebKit/chromium/public/WebGeolocationPermissionRequest.h b/WebKit/chromium/public/WebGeolocationPermissionRequest.h deleted file mode 100644 index 8b2f69e..0000000 --- a/WebKit/chromium/public/WebGeolocationPermissionRequest.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationPermissionRequest_h -#define WebGeolocationPermissionRequest_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { -class Geolocation; -} - -namespace WebKit { -class WebSecurityOrigin; - -// WebGeolocationPermissionRequest encapsulates a WebCore Geolocation object and represents -// a request from WebCore for permission to be determined for that Geolocation object. -// The underlying Geolocation object is guaranteed to be valid until the invocation of -// either WebGeolocationPermissionRequest::setIsAllowed (request complete) or -// WebGeolocationClient::cancelPermissionRequest (request cancelled). -class WebGeolocationPermissionRequest { -public: - WEBKIT_API WebSecurityOrigin securityOrigin() const; - WEBKIT_API void setIsAllowed(bool); - -#if WEBKIT_IMPLEMENTATION - WebGeolocationPermissionRequest(WebCore::Geolocation* geolocation) - : m_private(geolocation) - { - } - - WebCore::Geolocation* geolocation() const { return m_private; } -#endif - -private: - WebCore::Geolocation* m_private; -}; -} - -#endif // WebGeolocationPermissionRequest_h diff --git a/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h b/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h deleted file mode 100644 index dfa1642..0000000 --- a/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationPermissionRequestManager_h -#define WebGeolocationPermissionRequestManager_h - -#include "WebNonCopyable.h" -#include "WebPrivateOwnPtr.h" - -namespace WebKit { - -class WebGeolocationPermissionRequest; -class WebGeolocationPermissionRequestManagerPrivate; - -// This class is used to map between integer identifiers and WebGeolocationPermissionRequest -// instances. The intended usage is that on WebGeolocationClient::requestPermission(), -// the implementer can call add() to associate an id with the WebGeolocationPermissionRequest object. -// Once the permission request has been decided, the second remove() method can be used to -// find the request. On WebGeolocationClient::cancelPermissionRequest, the first remove() method will -// remove the association with the id. -class WebGeolocationPermissionRequestManager : public WebNonCopyable { -public: - WebGeolocationPermissionRequestManager() { init(); } - ~WebGeolocationPermissionRequestManager() { reset(); } - - WEBKIT_API int add(const WebKit::WebGeolocationPermissionRequest&); - WEBKIT_API bool remove(const WebKit::WebGeolocationPermissionRequest&, int&); - WEBKIT_API bool remove(int, WebKit::WebGeolocationPermissionRequest&); - -private: - WEBKIT_API void init(); - WEBKIT_API void reset(); - - WebPrivateOwnPtr<WebGeolocationPermissionRequestManagerPrivate> m_private; - int m_lastId; -}; - -} - -#endif // WebGeolocationPermissionRequestManager_h - diff --git a/WebKit/chromium/public/WebGeolocationPosition.h b/WebKit/chromium/public/WebGeolocationPosition.h deleted file mode 100644 index 57ba314..0000000 --- a/WebKit/chromium/public/WebGeolocationPosition.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationPosition_h -#define WebGeolocationPosition_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -#if WEBKIT_IMPLEMENTATION -#include <wtf/PassRefPtr.h> -#endif - -namespace WebCore { class GeolocationPosition; } - -namespace WebKit { - -class WebGeolocationPosition { -public: - WebGeolocationPosition() {} - WebGeolocationPosition(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) - { - assign(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed); - } - WebGeolocationPosition(const WebGeolocationPosition& other) { assign(other); } - ~WebGeolocationPosition() { reset(); } - - WEBKIT_API void assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed); - WEBKIT_API void assign(const WebGeolocationPosition&); - WEBKIT_API void reset(); - -#if WEBKIT_IMPLEMENTATION - WebGeolocationPosition(WTF::PassRefPtr<WebCore::GeolocationPosition>); - WebGeolocationPosition& operator=(WTF::PassRefPtr<WebCore::GeolocationPosition>); - operator WTF::PassRefPtr<WebCore::GeolocationPosition>() const; -#endif - -private: - WebPrivatePtr<WebCore::GeolocationPosition> m_private; -}; - -} // namespace WebKit - -#endif // WebGeolocationPosition_h diff --git a/WebKit/chromium/public/WebGeolocationService.h b/WebKit/chromium/public/WebGeolocationService.h deleted file mode 100644 index ea91b58..0000000 --- a/WebKit/chromium/public/WebGeolocationService.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationService_h -#define WebGeolocationService_h - -namespace WebKit { - -class WebGeolocationServiceBridge; -class WebString; -class WebURL; - -// Provides an embedder API called by WebKit. -class WebGeolocationService { -public: - virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) { } - virtual void cancelPermissionRequestForFrame(int bridgeId, const WebURL&) { } - virtual void startUpdating(int bridgeId, const WebURL& url, bool enableHighAccuracy) { } - virtual void stopUpdating(int bridgeId) { } - virtual void suspend(int bridgeId) { } - virtual void resume(int bridgeId) { } - - // Attaches the WebGeolocationServiceBridge to the embedder and returns its - // id, which should be used on subsequent calls for the methods above. - // An ID of zero indicates the attach failed. - virtual int attachBridge(WebGeolocationServiceBridge*) { return 0; } - - // Detaches the WebGeolocationServiceBridge from the embedder. - virtual void detachBridge(int bridgeId) { } - -protected: - virtual ~WebGeolocationService() {} -}; - -} // namespace WebKit - -#endif // WebGeolocationService_h diff --git a/WebKit/chromium/public/WebGeolocationServiceBridge.h b/WebKit/chromium/public/WebGeolocationServiceBridge.h deleted file mode 100644 index d209c23..0000000 --- a/WebKit/chromium/public/WebGeolocationServiceBridge.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationServiceBridge_h -#define WebGeolocationServiceBridge_h - -namespace WebCore { -class GeolocationServiceBridge; -class GeolocationServiceChromium; -} - -namespace WebKit { - -class WebString; -class WebURL; - -// Provides a WebKit API called by the embedder. -class WebGeolocationServiceBridge { -public: - virtual void setIsAllowed(bool allowed) = 0; - virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) = 0; - virtual void setLastError(int errorCode, const WebString& message) = 0; - // Called when the WebGeolocationService to which this bridge is attached is going out of scope. On receiving - // this call the bridge implementation must not make any further access to the service. - virtual void didDestroyGeolocationService() = 0; - // FIXME: Remove this badly named method when all callers are using didDestroyGeolocationService directly. - void onWebGeolocationServiceDestroyed() { didDestroyGeolocationService(); } - -protected: - virtual ~WebGeolocationServiceBridge() {} -}; - -} // namespace WebKit - -#endif // WebGeolocationServiceBridge_h diff --git a/WebKit/chromium/public/WebGeolocationServiceMock.h b/WebKit/chromium/public/WebGeolocationServiceMock.h deleted file mode 100644 index 820975e..0000000 --- a/WebKit/chromium/public/WebGeolocationServiceMock.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationServiceMock_h -#define WebGeolocationServiceMock_h - -#include "WebCommon.h" -#include "WebGeolocationService.h" - -namespace WebKit { - -class WebString; - -class WebGeolocationServiceMock : public WebGeolocationService { -public: - WEBKIT_API static WebGeolocationServiceMock* createWebGeolocationServiceMock(); - WEBKIT_API static void setMockGeolocationPermission(bool allowed); - WEBKIT_API static void setMockGeolocationPosition(double latitude, double longitude, double accuracy); - WEBKIT_API static void setMockGeolocationError(int errorCode, const WebString& message); -}; - -} // namespace WebKit - -#endif // WebGeolocationServiceMock_h diff --git a/WebKit/chromium/public/WebGlyphCache.h b/WebKit/chromium/public/WebGlyphCache.h deleted file mode 100644 index 661767d..0000000 --- a/WebKit/chromium/public/WebGlyphCache.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGlyphCache_h -#define WebGlyphCache_h - -#include "WebCommon.h" - -namespace WebKit { - -// An interface to query WebKit's glyph cache (which maps unicode characters to -// glyphs in particular fonts). -class WebGlyphCache { -public: - // Returns the number of pages in the glyph cache. - WEBKIT_API static size_t pageCount(); - -private: - WebGlyphCache(); // Not intended to be instanced. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h deleted file mode 100644 index 035b140..0000000 --- a/WebKit/chromium/public/WebGraphicsContext3D.h +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGraphicsContext3D_h -#define WebGraphicsContext3D_h - -#include "WebCommon.h" -#include "WebNonCopyable.h" -#include "WebString.h" - -namespace WebKit { - -// Typedef for server-side objects like OpenGL textures and program objects. -typedef unsigned int WebGLId; - -class WebView; - -// This interface abstracts the operations performed by the -// GraphicsContext3D in order to implement WebGL. Nearly all of the -// methods exposed on this interface map directly to entry points in -// the OpenGL ES 2.0 API. - -class WebGraphicsContext3D : public WebNonCopyable { -public: - // Return value from getActiveUniform and getActiveAttrib. - struct ActiveInfo { - WebString name; - unsigned type; - int size; - }; - - // Context creation attributes. - struct Attributes { - Attributes() - : alpha(true) - , depth(true) - , stencil(true) - , antialias(true) - , premultipliedAlpha(true) - , canRecoverFromContextLoss(true) - { - } - - bool alpha; - bool depth; - bool stencil; - bool antialias; - bool premultipliedAlpha; - bool canRecoverFromContextLoss; - }; - - // This destructor needs to be public so that using classes can destroy instances if initialization fails. - virtual ~WebGraphicsContext3D() {} - - // Creates a "default" implementation of WebGraphicsContext3D which calls - // OpenGL directly. - WEBKIT_API static WebGraphicsContext3D* createDefault(); - - // Initializes the graphics context; should be the first operation performed - // on newly-constructed instances. Returns true on success. - virtual bool initialize(Attributes, WebView*, bool renderDirectlyToWebView) = 0; - - // Makes the OpenGL context current on the current thread. Returns true on - // success. - virtual bool makeContextCurrent() = 0; - - // The size of the region into which this WebGraphicsContext3D is rendering. - // Returns the last values passed to reshape(). - virtual int width() = 0; - virtual int height() = 0; - - // Helper to return the size in bytes of OpenGL data types - // like GL_FLOAT, GL_INT, etc. - virtual int sizeInBytes(int type) = 0; - - // Resizes the region into which this WebGraphicsContext3D is drawing. - virtual void reshape(int width, int height) = 0; - - // Query whether it is built on top of compliant GLES2 implementation. - virtual bool isGLES2Compliant() = 0; - - // Helper for software compositing path. Reads back the frame buffer into - // the memory region pointed to by "pixels" with size "bufferSize". It is - // expected that the storage for "pixels" covers (4 * width * height) bytes. - // Returns true on success. - virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize) = 0; - - // Returns the id of the texture which is used for storing the contents of - // the framebuffer associated with this context. This texture is accessible - // by the gpu-based page compositor. - virtual unsigned getPlatformTextureId() = 0; - - // Copies the contents of the off-screen render target used by the WebGL - // context to the corresponding texture used by the compositor. - virtual void prepareTexture() = 0; - - // Synthesizes an OpenGL error which will be returned from a - // later call to getError. This is used to emulate OpenGL ES - // 2.0 behavior on the desktop and to enforce additional error - // checking mandated by WebGL. - // - // Per the behavior of glGetError, this stores at most one - // instance of any given error, and returns them from calls to - // getError in the order they were added. - virtual void synthesizeGLError(unsigned long error) = 0; - - // GL_CHROMIUM_map_sub - virtual void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) = 0; - virtual void unmapBufferSubDataCHROMIUM(const void*) = 0; - virtual void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) = 0; - virtual void unmapTexSubImage2DCHROMIUM(const void*) = 0; - - // GL_CHROMIUM_copy_texture_to_parent_texture - virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) = 0; - - // GL_CHROMIUM_request_extension - virtual WebString getRequestableExtensionsCHROMIUM() = 0; - virtual void requestExtensionCHROMIUM(const char*) = 0; - - // The entry points below map directly to the OpenGL ES 2.0 API. - // See: http://www.khronos.org/registry/gles/ - // and: http://www.khronos.org/opengles/sdk/docs/man/ - virtual void activeTexture(unsigned long texture) = 0; - virtual void attachShader(WebGLId program, WebGLId shader) = 0; - virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name) = 0; - virtual void bindBuffer(unsigned long target, WebGLId buffer) = 0; - virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer) = 0; - virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer) = 0; - virtual void bindTexture(unsigned long target, WebGLId texture) = 0; - virtual void blendColor(double red, double green, double blue, double alpha) = 0; - virtual void blendEquation(unsigned long mode) = 0; - virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha) = 0; - virtual void blendFunc(unsigned long sfactor, unsigned long dfactor) = 0; - virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha) = 0; - - virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage) = 0; - virtual void bufferSubData(unsigned long target, long offset, int size, const void* data) = 0; - - virtual unsigned long checkFramebufferStatus(unsigned long target) = 0; - virtual void clear(unsigned long mask) = 0; - virtual void clearColor(double red, double green, double blue, double alpha) = 0; - virtual void clearDepth(double depth) = 0; - virtual void clearStencil(long s) = 0; - virtual void colorMask(bool red, bool green, bool blue, bool alpha) = 0; - virtual void compileShader(WebGLId shader) = 0; - - virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border) = 0; - virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height) = 0; - virtual void cullFace(unsigned long mode) = 0; - virtual void depthFunc(unsigned long func) = 0; - virtual void depthMask(bool flag) = 0; - virtual void depthRange(double zNear, double zFar) = 0; - virtual void detachShader(WebGLId program, WebGLId shader) = 0; - virtual void disable(unsigned long cap) = 0; - virtual void disableVertexAttribArray(unsigned long index) = 0; - virtual void drawArrays(unsigned long mode, long first, long count) = 0; - virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) = 0; - - virtual void enable(unsigned long cap) = 0; - virtual void enableVertexAttribArray(unsigned long index) = 0; - virtual void finish() = 0; - virtual void flush() = 0; - virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer) = 0; - virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level) = 0; - virtual void frontFace(unsigned long mode) = 0; - virtual void generateMipmap(unsigned long target) = 0; - - virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&) = 0; - virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&) = 0; - - virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders) = 0; - - virtual int getAttribLocation(WebGLId program, const char* name) = 0; - - virtual void getBooleanv(unsigned long pname, unsigned char* value) = 0; - - virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0; - - virtual Attributes getContextAttributes() = 0; - - virtual unsigned long getError() = 0; - - virtual bool isContextLost() = 0; - - virtual void getFloatv(unsigned long pname, float* value) = 0; - - virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value) = 0; - - virtual void getIntegerv(unsigned long pname, int* value) = 0; - - virtual void getProgramiv(WebGLId program, unsigned long pname, int* value) = 0; - - virtual WebString getProgramInfoLog(WebGLId program) = 0; - - virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value) = 0; - - virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value) = 0; - - virtual WebString getShaderInfoLog(WebGLId shader) = 0; - - // TBD - // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); - - virtual WebString getShaderSource(WebGLId shader) = 0; - virtual WebString getString(unsigned long name) = 0; - - virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value) = 0; - virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value) = 0; - - virtual void getUniformfv(WebGLId program, long location, float* value) = 0; - virtual void getUniformiv(WebGLId program, long location, int* value) = 0; - - virtual long getUniformLocation(WebGLId program, const char* name) = 0; - - virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value) = 0; - virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value) = 0; - - virtual long getVertexAttribOffset(unsigned long index, unsigned long pname) = 0; - - virtual void hint(unsigned long target, unsigned long mode) = 0; - virtual bool isBuffer(WebGLId buffer) = 0; - virtual bool isEnabled(unsigned long cap) = 0; - virtual bool isFramebuffer(WebGLId framebuffer) = 0; - virtual bool isProgram(WebGLId program) = 0; - virtual bool isRenderbuffer(WebGLId renderbuffer) = 0; - virtual bool isShader(WebGLId shader) = 0; - virtual bool isTexture(WebGLId texture) = 0; - virtual void lineWidth(double) = 0; - virtual void linkProgram(WebGLId program) = 0; - virtual void pixelStorei(unsigned long pname, long param) = 0; - virtual void polygonOffset(double factor, double units) = 0; - - virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) = 0; - - virtual void releaseShaderCompiler() = 0; - virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height) = 0; - virtual void sampleCoverage(double value, bool invert) = 0; - virtual void scissor(long x, long y, unsigned long width, unsigned long height) = 0; - virtual void shaderSource(WebGLId shader, const char* string) = 0; - virtual void stencilFunc(unsigned long func, long ref, unsigned long mask) = 0; - virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask) = 0; - virtual void stencilMask(unsigned long mask) = 0; - virtual void stencilMaskSeparate(unsigned long face, unsigned long mask) = 0; - virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass) = 0; - virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass) = 0; - - virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels) = 0; - - virtual void texParameterf(unsigned target, unsigned pname, float param) = 0; - virtual void texParameteri(unsigned target, unsigned pname, int param) = 0; - - virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels) = 0; - - virtual void uniform1f(long location, float x) = 0; - virtual void uniform1fv(long location, int count, float* v) = 0; - virtual void uniform1i(long location, int x) = 0; - virtual void uniform1iv(long location, int count, int* v) = 0; - virtual void uniform2f(long location, float x, float y) = 0; - virtual void uniform2fv(long location, int count, float* v) = 0; - virtual void uniform2i(long location, int x, int y) = 0; - virtual void uniform2iv(long location, int count, int* v) = 0; - virtual void uniform3f(long location, float x, float y, float z) = 0; - virtual void uniform3fv(long location, int count, float* v) = 0; - virtual void uniform3i(long location, int x, int y, int z) = 0; - virtual void uniform3iv(long location, int count, int* v) = 0; - virtual void uniform4f(long location, float x, float y, float z, float w) = 0; - virtual void uniform4fv(long location, int count, float* v) = 0; - virtual void uniform4i(long location, int x, int y, int z, int w) = 0; - virtual void uniform4iv(long location, int count, int* v) = 0; - virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value) = 0; - virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value) = 0; - virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value) = 0; - - virtual void useProgram(WebGLId program) = 0; - virtual void validateProgram(WebGLId program) = 0; - - virtual void vertexAttrib1f(unsigned long indx, float x) = 0; - virtual void vertexAttrib1fv(unsigned long indx, const float* values) = 0; - virtual void vertexAttrib2f(unsigned long indx, float x, float y) = 0; - virtual void vertexAttrib2fv(unsigned long indx, const float* values) = 0; - virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z) = 0; - virtual void vertexAttrib3fv(unsigned long indx, const float* values) = 0; - virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w) = 0; - virtual void vertexAttrib4fv(unsigned long indx, const float* values) = 0; - virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset) = 0; - - virtual void viewport(long x, long y, unsigned long width, unsigned long height) = 0; - - // Support for buffer creation and deletion. - virtual unsigned createBuffer() = 0; - virtual unsigned createFramebuffer() = 0; - virtual unsigned createProgram() = 0; - virtual unsigned createRenderbuffer() = 0; - virtual unsigned createShader(unsigned long) = 0; - virtual unsigned createTexture() = 0; - - virtual void deleteBuffer(unsigned) = 0; - virtual void deleteFramebuffer(unsigned) = 0; - virtual void deleteProgram(unsigned) = 0; - virtual void deleteRenderbuffer(unsigned) = 0; - virtual void deleteShader(unsigned) = 0; - virtual void deleteTexture(unsigned) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebHTTPBody.h b/WebKit/chromium/public/WebHTTPBody.h deleted file mode 100644 index 8c37622..0000000 --- a/WebKit/chromium/public/WebHTTPBody.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebHTTPBody_h -#define WebHTTPBody_h - -#include "WebData.h" -#include "WebNonCopyable.h" -#include "WebString.h" -#include "WebURL.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class FormData; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebHTTPBodyPrivate; - -class WebHTTPBody { -public: - struct Element { - enum { TypeData, TypeFile, TypeBlob } type; - WebData data; - WebString filePath; - long long fileStart; - long long fileLength; // -1 means to the end of the file. - double modificationTime; - WebURL blobURL; - }; - - ~WebHTTPBody() { reset(); } - - WebHTTPBody() : m_private(0) { } - WebHTTPBody(const WebHTTPBody& b) : m_private(0) { assign(b); } - WebHTTPBody& operator=(const WebHTTPBody& b) - { - assign(b); - return *this; - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebHTTPBody&); - - bool isNull() const { return !m_private; } - - // Returns the number of elements comprising the http body. - WEBKIT_API size_t elementCount() const; - - // Sets the values of the element at the given index. Returns false if - // index is out of bounds. - WEBKIT_API bool elementAt(size_t index, Element&) const; - - // Append to the list of elements. - WEBKIT_API void appendData(const WebData&); - WEBKIT_API void appendFile(const WebString&); - // Passing -1 to fileLength means to the end of the file. - WEBKIT_API void appendFileRange(const WebString&, long long fileStart, long long fileLength, double modificationTime); - WEBKIT_API void appendBlob(const WebURL&); - - // Identifies a particular form submission instance. A value of 0 is - // used to indicate an unspecified identifier. - WEBKIT_API long long identifier() const; - WEBKIT_API void setIdentifier(long long); - -#if WEBKIT_IMPLEMENTATION - WebHTTPBody(const WTF::PassRefPtr<WebCore::FormData>&); - WebHTTPBody& operator=(const WTF::PassRefPtr<WebCore::FormData>&); - operator WTF::PassRefPtr<WebCore::FormData>() const; -#endif - -private: - void assign(WebHTTPBodyPrivate*); - void ensureMutable(); - WebHTTPBodyPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebHTTPHeaderVisitor.h b/WebKit/chromium/public/WebHTTPHeaderVisitor.h deleted file mode 100644 index 2ca86c0..0000000 --- a/WebKit/chromium/public/WebHTTPHeaderVisitor.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebHTTPHeaderVisitor_h -#define WebHTTPHeaderVisitor_h - -namespace WebKit { - -class WebString; - -class WebHTTPHeaderVisitor { -public: - virtual void visitHeader(const WebString& name, const WebString& value) = 0; - -protected: - ~WebHTTPHeaderVisitor() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebHTTPLoadInfo.h b/WebKit/chromium/public/WebHTTPLoadInfo.h deleted file mode 100644 index 9ff9153..0000000 --- a/WebKit/chromium/public/WebHTTPLoadInfo.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebHTTPLoadInfo_h -#define WebHTTPLoadInfo_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { -struct ResourceLoadInfo; -} - -namespace WebKit { -class WebString; - -class WebHTTPLoadInfo { -public: - WebHTTPLoadInfo() { initialize(); } - ~WebHTTPLoadInfo() { reset(); } - WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); } - WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r) - { - assign(r); - return *this; - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebHTTPLoadInfo& r); - - WEBKIT_API int httpStatusCode() const; - WEBKIT_API void setHTTPStatusCode(int); - - WEBKIT_API WebString httpStatusText() const; - WEBKIT_API void setHTTPStatusText(const WebString&); - - WEBKIT_API void addRequestHeader(const WebString& name, const WebString& value); - WEBKIT_API void addResponseHeader(const WebString& name, const WebString& value); - -#if WEBKIT_IMPLEMENTATION - WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo>); - operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const; -#endif - -private: - WebPrivatePtr<WebCore::ResourceLoadInfo> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h deleted file mode 100644 index b5cd02b..0000000 --- a/WebKit/chromium/public/WebHistoryItem.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebHistoryItem_h -#define WebHistoryItem_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class HistoryItem; } - -namespace WebKit { -class WebHTTPBody; -class WebString; -class WebSerializedScriptValue; -struct WebPoint; -template <typename T> class WebVector; - -// Represents a frame-level navigation entry in session history. A -// WebHistoryItem is a node in a tree. -// -// Copying a WebHistoryItem is cheap. -// -class WebHistoryItem { -public: - ~WebHistoryItem() { reset(); } - - WebHistoryItem() { } - WebHistoryItem(const WebHistoryItem& h) { assign(h); } - WebHistoryItem& operator=(const WebHistoryItem& h) - { - assign(h); - return *this; - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebHistoryItem&); - - bool isNull() const { return m_private.isNull(); } - - WEBKIT_API WebString urlString() const; - WEBKIT_API void setURLString(const WebString&); - - WEBKIT_API WebString originalURLString() const; - WEBKIT_API void setOriginalURLString(const WebString&); - - WEBKIT_API WebString referrer() const; - WEBKIT_API void setReferrer(const WebString&); - - WEBKIT_API WebString target() const; - WEBKIT_API void setTarget(const WebString&); - - WEBKIT_API WebString parent() const; - WEBKIT_API void setParent(const WebString&); - - WEBKIT_API WebString title() const; - WEBKIT_API void setTitle(const WebString&); - - WEBKIT_API WebString alternateTitle() const; - WEBKIT_API void setAlternateTitle(const WebString&); - - WEBKIT_API double lastVisitedTime() const; - WEBKIT_API void setLastVisitedTime(double); - - WEBKIT_API WebPoint scrollOffset() const; - WEBKIT_API void setScrollOffset(const WebPoint&); - - WEBKIT_API bool isTargetItem() const; - WEBKIT_API void setIsTargetItem(bool); - - WEBKIT_API int visitCount() const; - WEBKIT_API void setVisitCount(int); - - WEBKIT_API WebVector<WebString> documentState() const; - WEBKIT_API void setDocumentState(const WebVector<WebString>&); - - WEBKIT_API long long itemSequenceNumber() const; - WEBKIT_API void setItemSequenceNumber(long long); - - WEBKIT_API long long documentSequenceNumber() const; - WEBKIT_API void setDocumentSequenceNumber(long long); - - WEBKIT_API WebSerializedScriptValue stateObject() const; - WEBKIT_API void setStateObject(const WebSerializedScriptValue&); - - WEBKIT_API WebString httpContentType() const; - WEBKIT_API void setHTTPContentType(const WebString&); - - WEBKIT_API WebHTTPBody httpBody() const; - WEBKIT_API void setHTTPBody(const WebHTTPBody&); - - WEBKIT_API WebVector<WebHistoryItem> children() const; - WEBKIT_API void setChildren(const WebVector<WebHistoryItem>&); - WEBKIT_API void appendToChildren(const WebHistoryItem&); - -#if WEBKIT_IMPLEMENTATION - WebHistoryItem(const WTF::PassRefPtr<WebCore::HistoryItem>&); - WebHistoryItem& operator=(const WTF::PassRefPtr<WebCore::HistoryItem>&); - operator WTF::PassRefPtr<WebCore::HistoryItem>() const; -#endif - -private: - void ensureMutable(); - WebPrivatePtr<WebCore::HistoryItem> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h deleted file mode 100644 index 64ffc08..0000000 --- a/WebKit/chromium/public/WebIDBCallbacks.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBCallbacks_h -#define WebIDBCallbacks_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebIDBCursor; -class WebIDBDatabase; -class WebIDBDatabaseError; -class WebIDBKey; -class WebIDBIndex; -class WebIDBObjectStore; -class WebIDBTransaction; -class WebSerializedScriptValue; - -class WebIDBCallbacks { -public: - virtual ~WebIDBCallbacks() { } - - // For classes that follow the PImpl pattern, pass a const reference. - // For the rest, pass ownership to the callee via a pointer. - virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } // For "null". - virtual void onSuccess(WebIDBCursor*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(WebIDBIndex*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(WebIDBTransaction*) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); } -}; - -} // namespace WebKit - -#endif // WebIDBCallbacks_h diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h deleted file mode 100644 index 98b2b97..0000000 --- a/WebKit/chromium/public/WebIDBCursor.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBCursor_h -#define WebIDBCursor_h - -#include "WebCommon.h" -#include "WebExceptionCode.h" -#include "WebIDBCallbacks.h" -#include "WebIDBKey.h" -#include "WebSerializedScriptValue.h" -#include "WebString.h" - -namespace WebKit { - -// See comment in WebIDBFactory for a high level overview these classes. -class WebIDBCursor { -public: - virtual ~WebIDBCursor() { } - - virtual unsigned short direction() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual WebIDBKey key() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebIDBKey::createInvalid(); - } - // One or the other will set, depending on what type of cursor this is. - virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const { WEBKIT_ASSERT_NOT_REACHED(); } - - virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - // FIXME: Remove after WK roll. - virtual void remove(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { deleteFunction(callbacks, ec); } - virtual void deleteFunction(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { remove(callbacks, ec); } - -protected: - WebIDBCursor() { } -}; - -} // namespace WebKit - -#endif // WebIDBCursor_h diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h deleted file mode 100644 index 5ed8052..0000000 --- a/WebKit/chromium/public/WebIDBDatabase.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBDatabase_h -#define WebIDBDatabase_h - -#include "WebCommon.h" -#include "WebDOMStringList.h" -#include "WebExceptionCode.h" - -namespace WebKit { - -class WebFrame; -class WebIDBCallbacks; -class WebIDBObjectStore; -class WebIDBTransaction; - -// See comment in WebIDBFactory for a high level overview of these classes. -class WebIDBDatabase { -public: - virtual ~WebIDBDatabase() { } - - virtual WebString name() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebString version() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebDOMStringList objectStoreNames() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebDOMStringList(); - } - virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&) - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - // Transfers ownership of the WebIDBTransaction to the caller. - virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&) - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual void close() { WEBKIT_ASSERT_NOT_REACHED(); } - -protected: - WebIDBDatabase() { } -}; - -} // namespace WebKit - -#endif // WebIDBDatabase_h diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h deleted file mode 100644 index f247b36..0000000 --- a/WebKit/chromium/public/WebIDBDatabaseError.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBDatabaseError_h -#define WebIDBDatabaseError_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" -#include "WebString.h" - -namespace WebCore { class IDBDatabaseError; } - -namespace WebKit { - -// See comment in WebIDBFactory for a high level overview these classes. -class WebIDBDatabaseError { -public: - ~WebIDBDatabaseError() { reset(); } - - WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); } - WebIDBDatabaseError(const WebIDBDatabaseError& error) { assign(error); } - WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error) - { - assign(error); - return *this; - } - - WEBKIT_API void assign(const WebIDBDatabaseError&); - WEBKIT_API void reset(); - - WEBKIT_API unsigned short code() const; - WEBKIT_API WebString message() const; - -#if WEBKIT_IMPLEMENTATION - WebIDBDatabaseError(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&); - WebIDBDatabaseError& operator=(const WTF::PassRefPtr<WebCore::IDBDatabaseError>&); - operator WTF::PassRefPtr<WebCore::IDBDatabaseError>() const; -#endif - -private: - WEBKIT_API void assign(unsigned short code, const WebString& message); - - WebPrivatePtr<WebCore::IDBDatabaseError> m_private; -}; - -} // namespace WebKit - -#endif // WebIDBDatabaseError_h diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h deleted file mode 100755 index 10a134a..0000000 --- a/WebKit/chromium/public/WebIDBFactory.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBFactory_h -#define WebIDBFactory_h - -#include "WebCommon.h" -#include "WebDOMStringList.h" -#include "WebIDBCallbacks.h" -#include "WebSecurityOrigin.h" -#include "WebString.h" -#include "WebVector.h" - -namespace WebKit { - -class WebFrame; -class WebIDBDatabase; -class WebSecurityOrigin; - -// The entry point into the IndexedDatabase API. These classes match their Foo and -// FooSync counterparts in the spec, but operate only in an async manner. -// http://dev.w3.org/2006/webapi/WebSimpleDB/ -class WebIDBFactory { -public: - WEBKIT_API static WebIDBFactory* create(); - - virtual ~WebIDBFactory() { } - - // The WebKit implementation of open ignores the WebFrame* parameter. - virtual void open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir, unsigned long long maximumSize) - { - WEBKIT_ASSERT_NOT_REACHED(); - } -}; - -} // namespace WebKit - -#endif // WebIDBFactory_h diff --git a/WebKit/chromium/public/WebIDBIndex.h b/WebKit/chromium/public/WebIDBIndex.h deleted file mode 100644 index 3c07a50..0000000 --- a/WebKit/chromium/public/WebIDBIndex.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBIndex_h -#define WebIDBIndex_h - -#include "WebExceptionCode.h" -#include "WebIDBTransaction.h" -#include "WebString.h" - -namespace WebKit { - -class WebIDBCallbacks; -class WebIDBKey; -class WebIDBKeyRange; - -// See comment in WebIDBFactory for a high level overview of these classes. -class WebIDBIndex { -public: - virtual ~WebIDBIndex() { } - - virtual WebString name() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebString storeName() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebString keyPath() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual bool unique() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return false; - } - - virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - -protected: - WebIDBIndex() {} -}; - -} // namespace WebKit - -#endif // WebIDBIndex_h diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h deleted file mode 100644 index 376d1c5..0000000 --- a/WebKit/chromium/public/WebIDBKey.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBKey_h -#define WebIDBKey_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" -#include "WebString.h" - -namespace WebCore { class IDBKey; } - -namespace WebKit { - -class WebIDBKeyPath; -class WebSerializedScriptValue; - -class WebIDBKey { -public: - // Please use one of the factory methods. This is public only to allow WebVector. - WebIDBKey() { } - ~WebIDBKey() { reset(); } - - WEBKIT_API static WebIDBKey createNull(); - WEBKIT_API static WebIDBKey createString(const WebString&); - WEBKIT_API static WebIDBKey createDate(double); - WEBKIT_API static WebIDBKey createNumber(double); - WEBKIT_API static WebIDBKey createInvalid(); - WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScriptValue&, const WebIDBKeyPath&); - - WebIDBKey(const WebIDBKey& e) { assign(e); } - WebIDBKey& operator=(const WebIDBKey& e) - { - assign(e); - return *this; - } - - WEBKIT_API void assign(const WebIDBKey&); - WEBKIT_API void assignNull(); - WEBKIT_API void assignString(const WebString&); - WEBKIT_API void assignDate(double); - WEBKIT_API void assignNumber(double); - WEBKIT_API void assignInvalid(); - WEBKIT_API void reset(); - - enum Type { - NullType = 0, - StringType, - DateType, - NumberType, - // Types not in WebCore::IDBKey: - InvalidType - }; - - WEBKIT_API Type type() const; - WEBKIT_API WebString string() const; // Only valid for StringType. - WEBKIT_API double date() const; // Only valid for DateType. - WEBKIT_API double number() const; // Only valid for NumberType. - -#if WEBKIT_IMPLEMENTATION - WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&); - WebIDBKey& operator=(const WTF::PassRefPtr<WebCore::IDBKey>&); - operator WTF::PassRefPtr<WebCore::IDBKey>() const; -#endif - -private: - WebPrivatePtr<WebCore::IDBKey> m_private; -}; - -} // namespace WebKit - -#endif // WebIDBKey_h diff --git a/WebKit/chromium/public/WebIDBKeyPath.h b/WebKit/chromium/public/WebIDBKeyPath.h deleted file mode 100644 index db6c363..0000000 --- a/WebKit/chromium/public/WebIDBKeyPath.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBKeyPath_h -#define WebIDBKeyPath_h - -#include "WebCommon.h" -#include "WebPrivateOwnPtr.h" -#include "WebVector.h" - -namespace WebCore { struct IDBKeyPathElement; } - -namespace WTF { template<typename T, size_t inlineCapacity> class Vector; } - -namespace WebKit { - -class WebString; - -class WebIDBKeyPath { -public: - WEBKIT_API static WebIDBKeyPath create(const WebString&); - WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); } - ~WebIDBKeyPath() { reset(); } - - WEBKIT_API int parseError() const; - WEBKIT_API void assign(const WebIDBKeyPath&); - WEBKIT_API void reset(); - -#if WEBKIT_IMPLEMENTATION - operator const WTF::Vector<WebCore::IDBKeyPathElement, 0>& () const; -#endif - -private: - WebIDBKeyPath(); - -#if WEBKIT_IMPLEMENTATION - WebIDBKeyPath(const WTF::Vector<WebCore::IDBKeyPathElement, 0>&, int parseError); -#endif - - WebPrivateOwnPtr<WTF::Vector<WebCore::IDBKeyPathElement, 0> > m_private; - int m_parseError; -}; - -} // namespace WebKit - -#endif // WebIDBKeyPath_h diff --git a/WebKit/chromium/public/WebIDBKeyRange.h b/WebKit/chromium/public/WebIDBKeyRange.h deleted file mode 100644 index 922d4ed..0000000 --- a/WebKit/chromium/public/WebIDBKeyRange.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBKeyRange_h -#define WebIDBKeyRange_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class IDBKeyRange; } - -namespace WebKit { - -class WebIDBKey; -class WebString; - -class WebIDBKeyRange { -public: - ~WebIDBKeyRange() { reset(); } - - WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); } - WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); } - - WEBKIT_API WebIDBKey lower() const; - WEBKIT_API WebIDBKey upper() const; - WEBKIT_API bool lowerOpen() const; - WEBKIT_API bool upperOpen() const; - - WEBKIT_API void assign(const WebIDBKeyRange&); - WEBKIT_API void assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen); - WEBKIT_API void reset(); - -#if WEBKIT_IMPLEMENTATION - WebIDBKeyRange(const WTF::PassRefPtr<WebCore::IDBKeyRange>&); - WebIDBKeyRange& operator=(const WTF::PassRefPtr<WebCore::IDBKeyRange>&); - operator WTF::PassRefPtr<WebCore::IDBKeyRange>() const; -#endif - -private: - WebPrivatePtr<WebCore::IDBKeyRange> m_private; -}; - -} // namespace WebKit - -#endif // WebIDBKeyRange_h diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h deleted file mode 100755 index 8f2247f..0000000 --- a/WebKit/chromium/public/WebIDBObjectStore.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBObjectStore_h -#define WebIDBObjectStore_h - -#include "WebCommon.h" -#include "WebExceptionCode.h" -#include "WebDOMStringList.h" -#include "WebIDBCallbacks.h" -#include "WebIDBTransaction.h" -#include "WebString.h" - -namespace WebKit { - -class WebIDBKeyRange; -class WebIDBTransaction; - -// See comment in WebIDBFactory for a high level overview these classes. -class WebIDBObjectStore { -public: - virtual ~WebIDBObjectStore() { } - - virtual WebString name() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebString keyPath() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebString(); - } - virtual WebDOMStringList indexNames() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return WebDOMStringList(); - } - - virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&) - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - // Transfers ownership of the WebIDBIndex to the caller. - virtual WebIDBIndex* index(const WebString& name, WebExceptionCode&) - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); } - -protected: - WebIDBObjectStore() {} -}; - -} // namespace WebKit - -#endif // WebIDBObjectStore_h diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h deleted file mode 100644 index 74919a8..0000000 --- a/WebKit/chromium/public/WebIDBTransaction.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBTransaction_h -#define WebIDBTransaction_h - -#include "WebExceptionCode.h" -#include "WebString.h" - -namespace WebCore { class IDBTransactionBackendInterface; } - -namespace WebKit { - -class WebIDBObjectStore; -class WebIDBTransactionCallbacks; - -// See comment in WebIDBFactory for a high level overview of these classes. -class WebIDBTransaction { -public: - virtual ~WebIDBTransaction() { } - - virtual int mode() const - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&) - { - WEBKIT_ASSERT_NOT_REACHED(); - return 0; - } - virtual void abort() { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void didCompleteTaskEvents() { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } - - // FIXME: this is never called from WebCore. Find a cleaner solution. - virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const - { - return 0; - } - -protected: - WebIDBTransaction() {} -}; - -} // namespace WebKit - -#endif // WebIDBTransaction_h diff --git a/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/WebKit/chromium/public/WebIDBTransactionCallbacks.h deleted file mode 100644 index c9b6b05..0000000 --- a/WebKit/chromium/public/WebIDBTransactionCallbacks.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBTransactionCallbacks_h -#define WebIDBTransactionCallbacks_h - -#include "WebCommon.h" - -namespace WebKit { -class WebIDBTransactionCallbacks { -public: - virtual ~WebIDBTransactionCallbacks() { } - - virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onComplete() { WEBKIT_ASSERT_NOT_REACHED(); } - virtual void onTimeout() { WEBKIT_ASSERT_NOT_REACHED(); } -}; - -} // namespace WebKit - -#endif // WebIDBTransactionCallbacks_h diff --git a/WebKit/chromium/public/WebImage.h b/WebKit/chromium/public/WebImage.h deleted file mode 100644 index a7b6f8c..0000000 --- a/WebKit/chromium/public/WebImage.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebImage_h -#define WebImage_h - -#include "WebCommon.h" - -#if WEBKIT_USING_SKIA -#include <SkBitmap.h> -#elif WEBKIT_USING_CG -typedef struct CGImage* CGImageRef; -#endif - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Image; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebData; -struct WebSize; - -// A container for an ARGB bitmap. -class WebImage { -public: - ~WebImage() { reset(); } - - WebImage() { init(); } - WebImage(const WebImage& image) - { - init(); - assign(image); - } - - WebImage& operator=(const WebImage& image) - { - assign(image); - return *this; - } - - // Decodes the given image data. If the image has multiple frames, - // then the frame whose size is desiredSize is returned. Otherwise, - // the first frame is returned. - WEBKIT_API static WebImage fromData(const WebData&, const WebSize& desiredSize); - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebImage&); - - WEBKIT_API bool isNull() const; - WEBKIT_API WebSize size() const; - -#if WEBKIT_IMPLEMENTATION - WebImage(const WTF::PassRefPtr<WebCore::Image>&); - WebImage& operator=(const WTF::PassRefPtr<WebCore::Image>&); -#endif - -#if WEBKIT_USING_SKIA - WebImage(const SkBitmap& bitmap) : m_bitmap(bitmap) { } - - WebImage& operator=(const SkBitmap& bitmap) - { - m_bitmap = bitmap; - return *this; - } - - SkBitmap& getSkBitmap() { return m_bitmap; } - const SkBitmap& getSkBitmap() const { return m_bitmap; } - -private: - void init() { } - SkBitmap m_bitmap; - -#elif WEBKIT_USING_CG - WebImage(CGImageRef imageRef) - { - init(); - assign(imageRef); - } - - WebImage& operator=(CGImageRef imageRef) - { - assign(imageRef); - return *this; - } - - CGImageRef getCGImageRef() const { return m_imageRef; } - -private: - void init() { m_imageRef = 0; } - void assign(CGImageRef); - CGImageRef m_imageRef; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebImageDecoder.h b/WebKit/chromium/public/WebImageDecoder.h deleted file mode 100644 index 22db709..0000000 --- a/WebKit/chromium/public/WebImageDecoder.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebImageDecoder_h -#define WebImageDecoder_h - -#include "WebCommon.h" -#include "WebImage.h" -#include "WebNonCopyable.h" - -namespace WebCore { class ImageDecoder; } - -namespace WebKit { - -typedef WebCore::ImageDecoder WebImageDecoderPrivate; -class WebData; - -class WebImageDecoder : public WebNonCopyable { -public: - enum Type { - TypeBMP, - TypeICO - }; - - ~WebImageDecoder() { reset(); } - - explicit WebImageDecoder(Type type) { init(type); } - - // Sets data contents for underlying decoder. All the API methods - // require that setData() is called prior to their use. - WEBKIT_API void setData(const WebData& data, bool allDataReceived); - - // Deletes owned decoder. - WEBKIT_API void reset(); - - // Returns true if image decoding failed. - WEBKIT_API bool isFailed() const; - - // Returns true if size information is available for the decoder. - WEBKIT_API bool isSizeAvailable() const; - - // Returns the size of the image. - WEBKIT_API WebSize size() const; - - // Gives frame count for the image. For multiple frames, decoder scans the image data for the count. - WEBKIT_API size_t frameCount() const; - - // Returns if the frame at given index is completely decoded. - WEBKIT_API bool isFrameCompleteAtIndex(int index) const; - - // Creates and returns WebImage from buffer at the index. - WEBKIT_API WebImage getFrameAtIndex(int index) const; - -private: - // Creates type-specific decoder. - WEBKIT_API void init(Type type); - - WebImageDecoderPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h deleted file mode 100644 index be8623c..0000000 --- a/WebKit/chromium/public/WebInputElement.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputElement_h -#define WebInputElement_h - -#include "WebFormControlElement.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLInputElement; } -#endif - -namespace WebKit { - - // Provides readonly access to some properties of a DOM input element node. - class WebInputElement : public WebFormControlElement { - public: - WebInputElement() : WebFormControlElement() { } - WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { } - - WebInputElement& operator=(const WebInputElement& element) - { - WebFormControlElement::assign(element); - return *this; - } - void assign(const WebInputElement& element) { WebFormControlElement::assign(element); } - - // This returns true for all of textfield-looking types such as text, - // password, search, email, url, and number. - WEBKIT_API bool isTextField() const; - // This returns true only for type=text. - WEBKIT_API bool isText() const; - WEBKIT_API bool isPasswordField() const; - WEBKIT_API bool isImageButton() const; - WEBKIT_API bool autoComplete() const; - WEBKIT_API bool isReadOnly() const; - WEBKIT_API bool isEnabledFormControl() const; - WEBKIT_API int maxLength() const; - WEBKIT_API bool isActivatedSubmit() const; - WEBKIT_API void setActivatedSubmit(bool); - WEBKIT_API int size() const; - WEBKIT_API void setValue(const WebString&, bool sendChangeEvent = false); - WEBKIT_API WebString value() const; - WEBKIT_API void setSuggestedValue(const WebString&); - WEBKIT_API WebString suggestedValue() const; - WEBKIT_API void setPlaceholder(const WebString&); - WEBKIT_API WebString placeholder() const; - WEBKIT_API bool isAutofilled() const; - WEBKIT_API void setAutofilled(bool); - WEBKIT_API void dispatchFormControlChangeEvent(); - WEBKIT_API void setSelectionRange(int, int); - WEBKIT_API int selectionStart() const; - WEBKIT_API int selectionEnd() const; - WEBKIT_API bool isValidValue(const WebString&) const; - - // Exposes the default value of the maxLength attribute. - WEBKIT_API static const int defaultMaxLength; - -#if WEBKIT_IMPLEMENTATION - WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); - WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); - operator WTF::PassRefPtr<WebCore::HTMLInputElement>() const; -#endif - }; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h deleted file mode 100644 index 581e76c..0000000 --- a/WebKit/chromium/public/WebInputEvent.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputEvent_h -#define WebInputEvent_h - -#include "WebCommon.h" -#include "WebTouchPoint.h" - -#include <string.h> - -namespace WebKit { - -// The classes defined in this file are intended to be used with -// WebWidget's handleInputEvent method. These event types are cross- -// platform and correspond closely to WebCore's Platform*Event classes. -// -// WARNING! These classes must remain PODs (plain old data). They are -// intended to be "serializable" by copying their raw bytes, so they must -// not contain any non-bit-copyable member variables! - -// WebInputEvent -------------------------------------------------------------- - -class WebInputEvent { -public: - WebInputEvent(unsigned sizeParam = sizeof(WebInputEvent)) - : size(sizeParam) - , type(Undefined) - , modifiers(0) - , timeStampSeconds(0.0) { } - - // When we use an input method (or an input method editor), we receive - // two events for a keypress. The former event is a keydown, which - // provides a keycode, and the latter is a textinput, which provides - // a character processed by an input method. (The mapping from a - // keycode to a character code is not trivial for non-English - // keyboards.) - // To support input methods, Safari sends keydown events to WebKit for - // filtering. WebKit sends filtered keydown events back to Safari, - // which sends them to input methods. - // Unfortunately, it is hard to apply this design to Chrome because of - // our multiprocess architecture. An input method is running in a - // browser process. On the other hand, WebKit is running in a renderer - // process. So, this design results in increasing IPC messages. - // To support input methods without increasing IPC messages, Chrome - // handles keyboard events in a browser process and send asynchronous - // input events (to be translated to DOM events) to a renderer - // process. - // This design is mostly the same as the one of Windows and Mac Carbon. - // So, for what it's worth, our Linux and Mac front-ends emulate our - // Windows front-end. To emulate our Windows front-end, we can share - // our back-end code among Windows, Linux, and Mac. - // TODO(hbono): Issue 18064: remove the KeyDown type since it isn't - // used in Chrome any longer. - - enum Type { - Undefined = -1, - - // WebMouseEvent - MouseDown, - MouseUp, - MouseMove, - MouseEnter, - MouseLeave, - ContextMenu, - - // WebMouseWheelEvent - MouseWheel, - - // WebKeyboardEvent - RawKeyDown, - KeyDown, - KeyUp, - Char, - - // WebTouchEvent - TouchStart, - TouchMove, - TouchEnd, - TouchCancel, - }; - - enum Modifiers { - // modifiers for all events: - ShiftKey = 1 << 0, - ControlKey = 1 << 1, - AltKey = 1 << 2, - MetaKey = 1 << 3, - - // modifiers for keyboard events: - IsKeyPad = 1 << 4, - IsAutoRepeat = 1 << 5, - - // modifiers for mouse events: - LeftButtonDown = 1 << 6, - MiddleButtonDown = 1 << 7, - RightButtonDown = 1 << 8, - - // Toggle modifiers for all events. Danger: these are not reflected - // into WebCore, so round-tripping from WebInputEvent to a WebCore - // event and back will not preserve these flags. - CapsLockOn = 1 << 9, - NumLockOn = 1 << 10, - }; - - static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; - - unsigned size; // The size of this structure, for serialization. - Type type; - int modifiers; - double timeStampSeconds; // Seconds since epoch. - - // Returns true if the WebInputEvent |type| is a mouse event. - static bool isMouseEventType(int type) - { - return type == MouseDown - || type == MouseUp - || type == MouseMove - || type == MouseEnter - || type == MouseLeave - || type == ContextMenu; - } - - // Returns true if the WebInputEvent |type| is a keyboard event. - static bool isKeyboardEventType(int type) - { - return type == RawKeyDown - || type == KeyDown - || type == KeyUp - || type == Char; - } - - // Returns true if the WebInputEvent |type| is a touch event. - static bool isTouchEventType(int type) - { - return type == TouchStart - || type == TouchMove - || type == TouchEnd - || type == TouchCancel; - } -}; - -// WebKeyboardEvent ----------------------------------------------------------- - -class WebKeyboardEvent : public WebInputEvent { -public: - // Caps on string lengths so we can make them static arrays and keep - // them PODs. - static const size_t textLengthCap = 4; - - // http://www.w3.org/TR/DOM-Level-3-Events/keyset.html lists the - // identifiers. The longest is 18 characters, so we round up to the - // next multiple of 4. - static const size_t keyIdentifierLengthCap = 20; - - // |windowsKeyCode| is the Windows key code associated with this key - // event. Sometimes it's direct from the event (i.e. on Windows), - // sometimes it's via a mapping function. If you want a list, see - // WebCore/platform/chromium/KeyboardCodes* . - int windowsKeyCode; - - // The actual key code genenerated by the platform. The DOM spec runs - // on Windows-equivalent codes (thus |windowsKeyCode| above) but it - // doesn't hurt to have this one around. - int nativeKeyCode; - - // |text| is the text generated by this keystroke. |unmodifiedText| is - // |text|, but unmodified by an concurrently-held modifiers (except - // shift). This is useful for working out shortcut keys. Linux and - // Windows guarantee one character per event. The Mac does not, but in - // reality that's all it ever gives. We're generous, and cap it a bit - // longer. - WebUChar text[textLengthCap]; - WebUChar unmodifiedText[textLengthCap]; - - // This is a string identifying the key pressed. - char keyIdentifier[keyIdentifierLengthCap]; - - // This identifies whether this event was tagged by the system as being - // a "system key" event (see - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for - // details). Other platforms don't have this concept, but it's just - // easier to leave it always false than ifdef. - // int is used instead of bool to ensure the size of this structure is - // strictly aligned to a factor of 4 bytes, otherwise memory check tools - // like valgrind may complain about uninitialized memory usage when - // transfering it over the wire. - int isSystemKey; - - WebKeyboardEvent(unsigned sizeParam = sizeof(WebKeyboardEvent)) - : WebInputEvent(sizeParam) - , windowsKeyCode(0) - , nativeKeyCode(0) - , isSystemKey(false) - { - memset(&text, 0, sizeof(text)); - memset(&unmodifiedText, 0, sizeof(unmodifiedText)); - memset(&keyIdentifier, 0, sizeof(keyIdentifier)); - } - - // Sets keyIdentifier based on the value of windowsKeyCode. This is - // handy for generating synthetic keyboard events. - WEBKIT_API void setKeyIdentifierFromWindowsKeyCode(); -}; - -// WebMouseEvent -------------------------------------------------------------- - -class WebMouseEvent : public WebInputEvent { -public: - // These values defined for WebCore::MouseButton - enum Button { - ButtonNone = -1, - ButtonLeft, - ButtonMiddle, - ButtonRight - }; - - Button button; - int x; - int y; - int windowX; - int windowY; - int globalX; - int globalY; - int clickCount; - - WebMouseEvent(unsigned sizeParam = sizeof(WebMouseEvent)) - : WebInputEvent(sizeParam) - , button(ButtonNone) - , x(0) - , y(0) - , windowX(0) - , windowY(0) - , globalX(0) - , globalY(0) - , clickCount(0) - { - } -}; - -// WebMouseWheelEvent --------------------------------------------------------- - -class WebMouseWheelEvent : public WebMouseEvent { -public: - float deltaX; - float deltaY; - float wheelTicksX; - float wheelTicksY; - - // int is used instead of bool to ensure the size of this structure is - // strictly aligned to a factor of 4 bytes, otherwise memory check tools - // like valgrind may complain about uninitialized memory usage when - // transfering it over the wire. - int scrollByPage; - - WebMouseWheelEvent(unsigned sizeParam = sizeof(WebMouseWheelEvent)) - : WebMouseEvent(sizeParam) - , deltaX(0.0f) - , deltaY(0.0f) - , wheelTicksX(0.0f) - , wheelTicksY(0.0f) - , scrollByPage(false) - { - } -}; - -// WebTouchEvent -------------------------------------------------------------- - -class WebTouchEvent : public WebInputEvent { -public: - static const int touchPointsLengthCap = 4; - - int touchPointsLength; - WebTouchPoint touchPoints[touchPointsLengthCap]; - - WebTouchEvent(unsigned sizeParam = sizeof(WebTouchEvent)) - : WebInputEvent(sizeParam) - , touchPointsLength(0) - { - } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebKit.h b/WebKit/chromium/public/WebKit.h deleted file mode 100644 index 732cac6..0000000 --- a/WebKit/chromium/public/WebKit.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebKit_h -#define WebKit_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebKitClient; - -// Must be called on the thread that will be the main WebKit thread before -// using any other WebKit APIs. The provided WebKitClient must be non-null -// and must remain valid until the current thread calls shutdown. -WEBKIT_API void initialize(WebKitClient*); - -// Once shutdown, the WebKitClient passed to initialize will no longer be -// accessed. No other WebKit objects should be in use when this function -// is called. Any background threads created by WebKit are promised to be -// terminated by the time this function returns. -WEBKIT_API void shutdown(); - -// Returns the WebKitClient instance passed to initialize. -WEBKIT_API WebKitClient* webKitClient(); - -// Alters the rendering of content to conform to a fixed set of rules. -WEBKIT_API void setLayoutTestMode(bool); -WEBKIT_API bool layoutTestMode(); - -// Enables the named log channel. See WebCore/platform/Logging.h for details. -WEBKIT_API void enableLogChannel(const char*); - -// Purge the plugin list cache. If |reloadPages| is true, any pages -// containing plugins will be reloaded after refreshing the plugin list. -WEBKIT_API void resetPluginCache(bool reloadPages); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h deleted file mode 100644 index ae7892d..0000000 --- a/WebKit/chromium/public/WebKitClient.h +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebKitClient_h -#define WebKitClient_h - -#include "WebAudioBus.h" -#include "WebAudioDevice.h" -#include "WebCommon.h" -#include "WebData.h" -#include "WebLocalizedString.h" -#include "WebString.h" -#include "WebVector.h" -#include "WebURL.h" - -#include <time.h> - -#ifdef WIN32 -typedef void *HANDLE; -#endif - -namespace WebKit { - -class WebApplicationCacheHost; -class WebApplicationCacheHostClient; -class WebBlobRegistry; -class WebClipboard; -class WebCookieJar; -class WebFileSystem; -class WebFileUtilities; -class WebGraphicsContext3D; -class WebIDBFactory; -class WebIDBKey; -class WebMessagePortChannel; -class WebMimeRegistry; -class WebPluginListBuilder; -class WebSandboxSupport; -class WebSerializedScriptValue; -class WebSharedWorkerRepository; -class WebSocketStreamHandle; -class WebStorageNamespace; -class WebThemeEngine; -class WebURLLoader; - -class WebKitClient { -public: - // Must return non-null. - virtual WebClipboard* clipboard() { return 0; } - - // Must return non-null. - virtual WebMimeRegistry* mimeRegistry() { return 0; } - - // Must return non-null. - virtual WebFileUtilities* fileUtilities() { return 0; } - - // May return null if sandbox support is not necessary - virtual WebSandboxSupport* sandboxSupport() { return 0; } - - // May return null on some platforms. - virtual WebThemeEngine* themeEngine() { return 0; } - - // May return null. - virtual WebCookieJar* cookieJar() { return 0; } - - // Blob ---------------------------------------------------------------- - - // Must return non-null. - virtual WebBlobRegistry* blobRegistry() { return 0; } - - // DOM Storage -------------------------------------------------- - - // Return a LocalStorage namespace that corresponds to the following path. - virtual WebStorageNamespace* createLocalStorageNamespace(const WebString& path, unsigned quota) { return 0; } - - // Called when storage events fire. - virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL& url, bool isLocalStorage) { } - - - // History ------------------------------------------------------------- - - // Returns the hash for the given canonicalized URL for use in visited - // link coloring. - virtual unsigned long long visitedLinkHash( - const char* canonicalURL, size_t length) { return 0; } - - // Returns whether the given link hash is in the user's history. The - // hash must have been generated by calling VisitedLinkHash(). - virtual bool isLinkVisited(unsigned long long linkHash) { return false; } - - - // HTML5 Database ------------------------------------------------------ - -#ifdef WIN32 - typedef HANDLE FileHandle; -#else - typedef int FileHandle; -#endif - - // Opens a database file; dirHandle should be 0 if the caller does not need - // a handle to the directory containing this file - virtual FileHandle databaseOpenFile( - const WebString& vfsFileName, int desiredFlags) { return FileHandle(); } - - // Deletes a database file and returns the error code - virtual int databaseDeleteFile(const WebString& vfsFileName, bool syncDir) { return 0; } - - // Returns the attributes of the given database file - virtual long databaseGetFileAttributes(const WebString& vfsFileName) { return 0; } - - // Returns the size of the given database file - virtual long long databaseGetFileSize(const WebString& vfsFileName) { return 0; } - - - // Indexed Database ---------------------------------------------------- - - virtual WebIDBFactory* idbFactory() { return 0; } - virtual void idbShutdown() { }; - virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { } - - - // Keygen -------------------------------------------------------------- - - // Handle the <keygen> tag for generating client certificates - // Returns a base64 encoded signed copy of a public key from a newly - // generated key pair and the supplied challenge string. keySizeindex - // specifies the strength of the key. - virtual WebString signedPublicKeyAndChallengeString(unsigned keySizeIndex, - const WebKit::WebString& challenge, - const WebKit::WebURL& url) { return WebString(); } - - - - // Memory -------------------------------------------------------------- - - // Returns the current space allocated for the pagefile, in MB. - // That is committed size for Windows and virtual memory size for POSIX - virtual size_t memoryUsageMB() { return 0; } - - // Same as above, but always returns actual value, without any caches. - virtual size_t actualMemoryUsageMB() { return 0; } - - - // Message Ports ------------------------------------------------------- - - // Creates a Message Port Channel. This can be called on any thread. - // The returned object should only be used on the thread it was created on. - virtual WebMessagePortChannel* createMessagePortChannel() { return 0; } - - - // Network ------------------------------------------------------------- - - // A suggestion to prefetch IP information for the given hostname. - virtual void prefetchHostName(const WebString&) { } - - // Returns a new WebURLLoader instance. - virtual WebURLLoader* createURLLoader() { return 0; } - - // Returns a new WebSocketStreamHandle instance. - virtual WebSocketStreamHandle* createSocketStreamHandle() { return 0; } - - // Returns the User-Agent string that should be used for the given URL. - virtual WebString userAgent(const WebURL&) { return WebString(); } - - // A suggestion to cache this metadata in association with this URL. - virtual void cacheMetadata(const WebURL&, double responseTime, const char* data, size_t dataSize) { } - - - // Plugins ------------------------------------------------------------- - - // If refresh is true, then cached information should not be used to - // satisfy this call. - virtual void getPluginList(bool refresh, WebPluginListBuilder*) { } - - - // Profiling ----------------------------------------------------------- - - virtual void decrementStatsCounter(const char* name) { } - virtual void incrementStatsCounter(const char* name) { } - - // An event is identified by the pair (name, id). The extra parameter - // specifies additional data to log with the event. - virtual void traceEventBegin(const char* name, void* id, const char* extra) { } - virtual void traceEventEnd(const char* name, void* id, const char* extra) { } - - // Callbacks for reporting histogram data. - // CustomCounts histogram has exponential bucket sizes, so that min=1, max=1000000, bucketCount=50 would do. - virtual void histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) { } - // Enumeration histogram buckets are linear, boundaryValue should be larger than any possible sample value. - virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { } - - - // Resources ----------------------------------------------------------- - - // Returns a blob of data corresponding to the named resource. - virtual WebData loadResource(const char* name) { return WebData(); } - - // Decodes the in-memory audio file data and returns the linear PCM audio data in the destinationBus. - // A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate. - // Returns true on success. - virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; } - - // Returns a localized string resource (with substitution parameters). - virtual WebString queryLocalizedString(WebLocalizedString::Name) { return WebString(); } - virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter) { return WebString(); } - virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter1, const WebString& parameter2) { return WebString(); } - - - // Sandbox ------------------------------------------------------------ - - // In some browsers, a "sandbox" restricts what operations a program - // is allowed to preform. Such operations are typically abstracted out - // via this API, but sometimes (like in HTML 5 database opening) WebKit - // needs to behave differently based on whether it's restricted or not. - // In these cases (and these cases only) you can call this function. - // It's OK for this value to be conservitive (i.e. true even if the - // sandbox isn't active). - virtual bool sandboxEnabled() { return false; } - - - // Shared Workers ------------------------------------------------------ - - virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; } - - // Sudden Termination -------------------------------------------------- - - // Disable/Enable sudden termination. - virtual void suddenTerminationChanged(bool enabled) { } - - - // System -------------------------------------------------------------- - - // Returns a value such as "en-US". - virtual WebString defaultLocale() { return WebString(); } - - // Wall clock time in seconds since the epoch. - virtual double currentTime() { return 0; } - - // Delayed work is driven by a shared timer. - virtual void setSharedTimerFiredFunction(void (*func)()) { } - virtual void setSharedTimerFireTime(double fireTime) { } - virtual void stopSharedTimer() { } - - // Callable from a background WebKit thread. - virtual void callOnMainThread(void (*func)(void*), void* context) { } - - // WebGL -------------------------------------------------------------- - - // May return null if WebGL is not supported. - // Returns newly allocated WebGraphicsContext3D instance. - virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; } - - // Audio -------------------------------------------------------------- - - virtual WebAudioDevice* createAudioDevice(size_t bufferSize, unsigned numberOfChannels, double sampleRate, WebAudioDevice::RenderCallback*) { return 0; } - - // FileSystem ---------------------------------------------------------- - - // Must return non-null. - virtual WebFileSystem* fileSystem() { return 0; } - -protected: - ~WebKitClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebLabelElement.h b/WebKit/chromium/public/WebLabelElement.h deleted file mode 100644 index eb9b06d..0000000 --- a/WebKit/chromium/public/WebLabelElement.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebLabelElement_h -#define WebLabelElement_h - -#include "WebElement.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLLabelElement; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -// Provides readonly access to some properties of a DOM label element node. -class WebLabelElement : public WebElement { -public: - WebLabelElement() : WebElement() { } - WebLabelElement(const WebLabelElement& element) : WebElement(element) { } - - WebLabelElement& operator=(const WebLabelElement& element) - { - WebElement::assign(element); - return *this; - } - - void assign(const WebLabelElement& element) { WebElement::assign(element); } - - WEBKIT_API WebElement correspondingControl(); - -#if WEBKIT_IMPLEMENTATION - WebLabelElement(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&); - WebLabelElement& operator=(const WTF::PassRefPtr<WebCore::HTMLLabelElement>&); - operator WTF::PassRefPtr<WebCore::HTMLLabelElement>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebLocalizedString.h b/WebKit/chromium/public/WebLocalizedString.h deleted file mode 100644 index 598e972..0000000 --- a/WebKit/chromium/public/WebLocalizedString.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebLocalizedString_h -#define WebLocalizedString_h - -namespace WebKit { - -struct WebLocalizedString { - enum Name { - SubmitButtonDefaultLabel, - InputElementAltText, - ResetButtonDefaultLabel, - FileButtonChooseFileLabel, - FileButtonNoFileSelectedLabel, - MultipleFileUploadText, - SearchableIndexIntroduction, - SearchMenuNoRecentSearchesText, - SearchMenuRecentSearchesText, - SearchMenuClearRecentSearchesText, - AXWebAreaText, - AXLinkText, - AXListMarkerText, - AXImageMapText, - AXHeadingText, - AXButtonActionVerb, - AXRadioButtonActionVerb, - AXTextFieldActionVerb, - AXCheckedCheckBoxActionVerb, - AXUncheckedCheckBoxActionVerb, - AXLinkActionVerb, - KeygenMenuHighGradeKeySize, - KeygenMenuMediumGradeKeySize, - ValidationValueMissing, - ValidationValueMissingForCheckbox, - ValidationValueMissingForFile, - ValidationValueMissingForMultipleFile, - ValidationValueMissingForRadio, - ValidationValueMissingForSelect, - ValidationTypeMismatch, - ValidationTypeMismatchForEmail, - ValidationTypeMismatchForMultipleEmail, - ValidationTypeMismatchForURL, - ValidationPatternMismatch, - ValidationTooLong, - ValidationRangeUnderflow, - ValidationRangeOverflow, - ValidationStepMismatch, - }; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMediaElement.h b/WebKit/chromium/public/WebMediaElement.h deleted file mode 100644 index 94837a5..0000000 --- a/WebKit/chromium/public/WebMediaElement.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMediaElement_h -#define WebMediaElement_h - -#include "WebElement.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLMediaElement; } -#endif - -namespace WebKit { - -class WebMediaPlayer; - -class WebMediaElement : public WebElement { -public: - WEBKIT_API WebMediaPlayer* player() const; - -#if WEBKIT_IMPLEMENTATION - WebMediaElement(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&); - WebMediaElement& operator=(const WTF::PassRefPtr<WebCore::HTMLMediaElement>&); - operator WTF::PassRefPtr<WebCore::HTMLMediaElement>() const; -#endif -}; -} // namespace WebKit - -#endif // WebMediaElement_h diff --git a/WebKit/chromium/public/WebMediaPlayer.h b/WebKit/chromium/public/WebMediaPlayer.h deleted file mode 100644 index 6cec0f5..0000000 --- a/WebKit/chromium/public/WebMediaPlayer.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMediaPlayer_h -#define WebMediaPlayer_h - -#include "WebCanvas.h" -#include "WebVector.h" -#include "WebVideoFrame.h" - -namespace WebKit { - -class WebMediaPlayerClient; -class WebURL; -struct WebRect; -struct WebSize; - -struct WebTimeRange { - WebTimeRange() : start(0), end(0) {} - WebTimeRange(float s, float e) : start(s), end(e) {} - - float start; - float end; -}; - -typedef WebVector<WebTimeRange> WebTimeRanges; - -class WebMediaPlayer { -public: - enum NetworkState { - Empty, - Idle, - Loading, - Loaded, - FormatError, - NetworkError, - DecodeError, - }; - - enum ReadyState { - HaveNothing, - HaveMetadata, - HaveCurrentData, - HaveFutureData, - HaveEnoughData, - }; - - enum MovieLoadType { - Unknown, - Download, - StoredStream, - LiveStream, - }; - - virtual ~WebMediaPlayer() {} - - virtual void load(const WebURL&) = 0; - virtual void cancelLoad() = 0; - - // Playback controls. - virtual void play() = 0; - virtual void pause() = 0; - virtual bool supportsFullscreen() const = 0; - virtual bool supportsSave() const = 0; - virtual void seek(float seconds) = 0; - virtual void setEndTime(float seconds) = 0; - virtual void setRate(float) = 0; - virtual void setVolume(float) = 0; - virtual void setVisible(bool) = 0; - virtual bool setAutoBuffer(bool) = 0; - virtual bool totalBytesKnown() = 0; - virtual const WebTimeRanges& buffered() = 0; - virtual float maxTimeSeekable() const = 0; - - virtual void setSize(const WebSize&) = 0; - - virtual void paint(WebCanvas*, const WebRect&) = 0; - - // True if the loaded media has a playable video/audio track. - virtual bool hasVideo() const = 0; - virtual bool hasAudio() const = 0; - - // Dimension of the video. - virtual WebSize naturalSize() const = 0; - - // Getters of playback state. - virtual bool paused() const = 0; - virtual bool seeking() const = 0; - virtual float duration() const = 0; - virtual float currentTime() const = 0; - - // Get rate of loading the resource. - virtual int dataRate() const = 0; - - // Internal states of loading and network. - virtual NetworkState networkState() const = 0; - virtual ReadyState readyState() const = 0; - - virtual unsigned long long bytesLoaded() const = 0; - virtual unsigned long long totalBytes() const = 0; - - virtual bool hasSingleSecurityOrigin() const = 0; - virtual MovieLoadType movieLoadType() const = 0; - - // This function returns a pointer to a WebVideoFrame, which is - // a WebKit wrapper for a video frame in chromium. This places a lock - // on the frame in chromium, and calls to this method should always be - // followed with a call to putCurrentFrame(). The ownership of this object - // is not transferred to the caller, and the caller should not free the - // returned object. - virtual WebVideoFrame* getCurrentFrame() { return 0; } - // This function releases the lock on the current video frame in Chromium. - // It should always be called after getCurrentFrame(). Frame passed to this - // method should no longer be referenced after the call is made. - virtual void putCurrentFrame(WebVideoFrame*) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMediaPlayerAction.h b/WebKit/chromium/public/WebMediaPlayerAction.h deleted file mode 100644 index 192704f..0000000 --- a/WebKit/chromium/public/WebMediaPlayerAction.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMediaPlayerAction_h -#define WebMediaPlayerAction_h - -namespace WebKit { - -struct WebMediaPlayerAction { - enum Type { - Unknown, - Play, - Mute, - Loop, - Controls - }; - - Type type; - bool enable; - - WebMediaPlayerAction() - : type(Unknown), enable(false) { } - WebMediaPlayerAction(Type type, bool enable) - : type(type), enable(enable) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMediaPlayerClient.h b/WebKit/chromium/public/WebMediaPlayerClient.h deleted file mode 100644 index 7e5dd68..0000000 --- a/WebKit/chromium/public/WebMediaPlayerClient.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMediaPlayerClient_h -#define WebMediaPlayerClient_h - -namespace WebKit { - -class WebRequest; -class WebURL; - -class WebMediaPlayerClient { -public: - virtual void networkStateChanged() = 0; - virtual void readyStateChanged() = 0; - virtual void volumeChanged(float) = 0; - virtual void muteChanged(bool) = 0; - virtual void timeChanged() = 0; - virtual void repaint() = 0; - virtual void durationChanged() = 0; - virtual void rateChanged() = 0; - virtual void sizeChanged() = 0; - virtual void sawUnsupportedTracks() = 0; - virtual float volume() const = 0; - -protected: - ~WebMediaPlayerClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMenuItemInfo.h b/WebKit/chromium/public/WebMenuItemInfo.h deleted file mode 100644 index 445dfb4..0000000 --- a/WebKit/chromium/public/WebMenuItemInfo.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMenuItemInfo_h -#define WebMenuItemInfo_h - -#include "WebCommon.h" -#include "WebString.h" -#include "WebVector.h" - -namespace WebKit { - -struct WebMenuItemInfo { - enum Type { - Option, - CheckableOption, - Group, - Separator, - }; - - WebMenuItemInfo() - : type(Option) - , action(0) - , enabled(false) - , checked(false) - { - } - - WebString label; - Type type; - unsigned action; - bool enabled; - bool checked; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMessagePortChannel.h b/WebKit/chromium/public/WebMessagePortChannel.h deleted file mode 100644 index 288bd55..0000000 --- a/WebKit/chromium/public/WebMessagePortChannel.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMessagePortChannel_h -#define WebMessagePortChannel_h - -#include "WebCommon.h" -#include "WebVector.h" - -namespace WebKit { - -class WebMessagePortChannelClient; -class WebString; - -typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray; - -// Provides an interface to a Message Port Channel implementation. The object owns itself and -// is signalled that its not needed anymore with the destroy() call. -class WebMessagePortChannel { -public: - virtual void setClient(WebMessagePortChannelClient*) = 0; - virtual void destroy() = 0; - // WebKit versions of WebCore::MessagePortChannel. - virtual void entangle(WebMessagePortChannel*) = 0; - // Callee receives ownership of the passed vector. - virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0; - virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0; - -protected: - ~WebMessagePortChannel() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMessagePortChannelClient.h b/WebKit/chromium/public/WebMessagePortChannelClient.h deleted file mode 100644 index 0b85bb3..0000000 --- a/WebKit/chromium/public/WebMessagePortChannelClient.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMessagePortChannelClient_h -#define WebMessagePortChannelClient_h - -namespace WebKit { - -// Provides an interface for users of WebMessagePortChannel to be notified -// when messages are available. -class WebMessagePortChannelClient { -public: - // Alerts that new messages have arrived, which are retrieved by calling - // WebMessagePortChannel::tryGetMessage. Note that this may be called - // on any thread. - virtual void messageAvailable() = 0; - -protected: - ~WebMessagePortChannelClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebMimeRegistry.h b/WebKit/chromium/public/WebMimeRegistry.h deleted file mode 100644 index 425753e..0000000 --- a/WebKit/chromium/public/WebMimeRegistry.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMimeRegistry_h -#define WebMimeRegistry_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebString; - -class WebMimeRegistry { -public: - enum SupportsType { IsNotSupported, IsSupported, MayBeSupported }; - - virtual SupportsType supportsMIMEType(const WebString& mimeType) = 0; - virtual SupportsType supportsImageMIMEType(const WebString& mimeType) = 0; - virtual SupportsType supportsJavaScriptMIMEType(const WebString& mimeType) = 0; - virtual SupportsType supportsMediaMIMEType(const WebString& mimeType, - const WebString& codecs) = 0; - virtual SupportsType supportsNonImageMIMEType(const WebString& mimeType) = 0; - - virtual WebString mimeTypeForExtension(const WebString& fileExtension) = 0; - virtual WebString mimeTypeFromFile(const WebString& filePath) = 0; - virtual WebString preferredExtensionForMIMEType(const WebString& mimeType) = 0; - -protected: - ~WebMimeRegistry() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNamedNodeMap.h b/WebKit/chromium/public/WebNamedNodeMap.h deleted file mode 100644 index 0b7e296..0000000 --- a/WebKit/chromium/public/WebNamedNodeMap.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNamedNodeMap_h -#define WebNamedNodeMap_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class NamedNodeMap; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebAttribute; - -// Provides readonly access to some properties of a DOM attribute map. -class WebNamedNodeMap { -public: - ~WebNamedNodeMap() { reset(); } - - WebNamedNodeMap() { } - WebNamedNodeMap(const WebNamedNodeMap& n) { assign(n); } - WebNamedNodeMap& operator=(const WebNamedNodeMap& n) - { - assign(n); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebNamedNodeMap&); - - WEBKIT_API unsigned length() const; - WEBKIT_API WebAttribute attributeItem(unsigned) const; - -#if WEBKIT_IMPLEMENTATION - WebNamedNodeMap(const WTF::PassRefPtr<WebCore::NamedNodeMap>&); -#endif - -private: - WebPrivatePtr<WebCore::NamedNodeMap> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNavigationPolicy.h b/WebKit/chromium/public/WebNavigationPolicy.h deleted file mode 100644 index 54bee9d..0000000 --- a/WebKit/chromium/public/WebNavigationPolicy.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNavigationPolicy_h -#define WebNavigationPolicy_h - -namespace WebKit { - -enum WebNavigationPolicy { - WebNavigationPolicyIgnore, - WebNavigationPolicyDownload, - WebNavigationPolicyCurrentTab, - WebNavigationPolicyNewBackgroundTab, - WebNavigationPolicyNewForegroundTab, - WebNavigationPolicyNewWindow, - WebNavigationPolicyNewPopup, -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNavigationType.h b/WebKit/chromium/public/WebNavigationType.h deleted file mode 100644 index 8ca8dc6..0000000 --- a/WebKit/chromium/public/WebNavigationType.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNavigationType_h -#define WebNavigationType_h - -namespace WebKit { - -enum WebNavigationType { - WebNavigationTypeLinkClicked, - WebNavigationTypeFormSubmitted, - WebNavigationTypeBackForward, - WebNavigationTypeReload, - WebNavigationTypeFormResubmitted, - WebNavigationTypeOther -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h deleted file mode 100644 index 7116dfa..0000000 --- a/WebKit/chromium/public/WebNode.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNode_h -#define WebNode_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" -#include "WebString.h" - -namespace WebCore { class Node; } - -namespace WebKit { -class WebDOMEventListener; -class WebDOMEventListenerPrivate; -class WebDocument; -class WebFrame; -class WebNodeList; - -// Provides access to some properties of a DOM node. -class WebNode { -public: - virtual ~WebNode() { reset(); } - - WebNode() { } - WebNode(const WebNode& n) { assign(n); } - WebNode& operator=(const WebNode& n) - { - assign(n); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebNode&); - - WEBKIT_API bool equals(const WebNode&) const; - // Required for using WebNodes in std maps. Note the order used is - // arbitrary and should not be expected to have any specific meaning. - WEBKIT_API bool lessThan(const WebNode&) const; - - bool isNull() const { return m_private.isNull(); } - - enum NodeType { - ElementNode = 1, - AttributeNode, - TextNode, - CDataSectionNode, - EntityReferenceNode, - EntityNode, - ProcessingInstructionsNode, - CommentNode, - DocumentNode, - DocumentTypeNode, - DocumentFragmentNode, - NotationNode, - XPathNamespaceNode - }; - WEBKIT_API NodeType nodeType() const; - WEBKIT_API WebNode parentNode() const; - WEBKIT_API WebString nodeName() const; - WEBKIT_API WebString nodeValue() const; - WEBKIT_API bool setNodeValue(const WebString&); - WEBKIT_API WebDocument document() const; - WEBKIT_API WebNode firstChild() const; - WEBKIT_API WebNode lastChild() const; - WEBKIT_API WebNode previousSibling() const; - WEBKIT_API WebNode nextSibling() const; - WEBKIT_API bool hasChildNodes() const; - WEBKIT_API WebNodeList childNodes(); - WEBKIT_API WebString createMarkup() const; - WEBKIT_API bool isTextNode() const; - WEBKIT_API bool isContentEditable() const; - WEBKIT_API bool isElementNode() const; - WEBKIT_API void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture); - WEBKIT_API void removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture); - WEBKIT_API void simulateClick(); - WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const; - - // Returns true if the node has a non-empty bounding box in layout. - // This does not 100% guarantee the user can see it, but is pretty close. - // Note: This method only works properly after layout has occurred. - WEBKIT_API bool hasNonEmptyBoundingBox() const; - - template<typename T> T to() - { - T res; - res.WebNode::assign(*this); - return res; - } - - template<typename T> const T toConst() const - { - T res; - res.WebNode::assign(*this); - return res; - } - -#if WEBKIT_IMPLEMENTATION - WebNode(const WTF::PassRefPtr<WebCore::Node>&); - WebNode& operator=(const WTF::PassRefPtr<WebCore::Node>&); - operator WTF::PassRefPtr<WebCore::Node>() const; -#endif - -#if WEBKIT_IMPLEMENTATION - template<typename T> T* unwrap() - { - return static_cast<T*>(m_private.get()); - } - - template<typename T> const T* constUnwrap() const - { - return static_cast<const T*>(m_private.get()); - } -#endif - -protected: - WebPrivatePtr<WebCore::Node> m_private; -}; - -inline bool operator==(const WebNode& a, const WebNode& b) -{ - return a.equals(b); -} - -inline bool operator!=(const WebNode& a, const WebNode& b) -{ - return !(a == b); -} - -inline bool operator<(const WebNode& a, const WebNode& b) -{ - return a.lessThan(b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNodeCollection.h b/WebKit/chromium/public/WebNodeCollection.h deleted file mode 100644 index fee4f44..0000000 --- a/WebKit/chromium/public/WebNodeCollection.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNodeCollection_h -#define WebNodeCollection_h - -#include "WebCommon.h" - -namespace WebCore { class HTMLCollection; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebNode; - -// Provides readonly access to some properties of a DOM node. -class WebNodeCollection { -public: - ~WebNodeCollection() { reset(); } - - WebNodeCollection() : m_private(0) { } - WebNodeCollection(const WebNodeCollection& n) : m_private(0) { assign(n); } - WebNodeCollection& operator=(const WebNodeCollection& n) - { - assign(n); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebNodeCollection&); - - WEBKIT_API unsigned length() const; - WEBKIT_API WebNode nextItem() const; - WEBKIT_API WebNode firstItem() const; - -#if WEBKIT_IMPLEMENTATION - WebNodeCollection(const WTF::PassRefPtr<WebCore::HTMLCollection>&); -#endif - -private: - void assign(WebCore::HTMLCollection*); - WebCore::HTMLCollection* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNodeList.h b/WebKit/chromium/public/WebNodeList.h deleted file mode 100644 index 23efab0..0000000 --- a/WebKit/chromium/public/WebNodeList.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNodeList_h -#define WebNodeList_h - -#include "WebCommon.h" - -namespace WebCore { class NodeList; } -#if WEBKIT_IMPLEMENTATION -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { -class WebNode; - -// Provides readonly access to some properties of a DOM node. -class WebNodeList { -public: - ~WebNodeList() { reset(); } - - WebNodeList() : m_private(0) { } - WebNodeList(const WebNodeList& n) : m_private(0) { assign(n); } - WebNodeList& operator=(const WebNodeList& n) - { - assign(n); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebNodeList&); - - WEBKIT_API unsigned length() const; - WEBKIT_API WebNode item(size_t) const; - -#if WEBKIT_IMPLEMENTATION - WebNodeList(const WTF::PassRefPtr<WebCore::NodeList>&); -#endif - -private: - void assign(WebCore::NodeList*); - WebCore::NodeList* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNonCopyable.h b/WebKit/chromium/public/WebNonCopyable.h deleted file mode 100644 index b0bd456..0000000 --- a/WebKit/chromium/public/WebNonCopyable.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNonCopyable_h -#define WebNonCopyable_h - -namespace WebKit { - -// A base class to extend from if you do not support copying. -class WebNonCopyable { -protected: - WebNonCopyable() { } - ~WebNonCopyable() { } - -private: - WebNonCopyable(const WebNonCopyable&); - WebNonCopyable& operator=(const WebNonCopyable&); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNotification.h b/WebKit/chromium/public/WebNotification.h deleted file mode 100644 index dbbde02..0000000 --- a/WebKit/chromium/public/WebNotification.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNotification_h -#define WebNotification_h - -#include "WebCommon.h" -#include "WebTextDirection.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Notification; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebNotificationPrivate; -class WebURL; -class WebString; - -// Represents access to a desktop notification. -class WebNotification { -public: - WebNotification() : m_private(0) { } - WebNotification(const WebNotification& other) : m_private(0) { assign(other); } - - ~WebNotification() { reset(); } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebNotification&); - - WebNotification& operator=(const WebNotification& other) - { - assign(other); - return *this; - } - - // Operators required to put WebNotification in an ordered map. - bool equals(const WebNotification& other) const { return m_private == other.m_private; } - WEBKIT_API bool lessThan(const WebNotification& other) const; - - // Is the notification HTML vs. icon-title-text? - WEBKIT_API bool isHTML() const; - - // If HTML, the URL which contains the contents of the notification. - WEBKIT_API WebURL url() const; - - WEBKIT_API WebURL iconURL() const; - WEBKIT_API WebString title() const; - WEBKIT_API WebString body() const; - - // FIXME: Remove dir() when no longer referenced. - // dir() is deprecated; use direction(). - WEBKIT_API WebString dir() const; - WEBKIT_API WebTextDirection direction() const; - - WEBKIT_API WebString replaceId() const; - - // Called if the presenter goes out of scope before the notification does. - WEBKIT_API void detachPresenter(); - - // Called to indicate the notification has been displayed. - WEBKIT_API void dispatchDisplayEvent(); - - // Called to indicate an error has occurred with this notification. - WEBKIT_API void dispatchErrorEvent(const WebString& errorMessage); - - // Called to indicate the notification has been closed. If it was - // closed by the user (as opposed to automatically by the system), - // the byUser parameter will be true. - WEBKIT_API void dispatchCloseEvent(bool byUser); - - // Called to indicate the notification was clicked on. - WEBKIT_API void dispatchClickEvent(); - -#if WEBKIT_IMPLEMENTATION - WebNotification(const WTF::PassRefPtr<WebCore::Notification>&); - WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&); - operator WTF::PassRefPtr<WebCore::Notification>() const; -#endif - -private: - void assign(WebNotificationPrivate*); - WebNotificationPrivate* m_private; -}; - -inline bool operator==(const WebNotification& a, const WebNotification& b) -{ - return a.equals(b); -} - -inline bool operator!=(const WebNotification& a, const WebNotification& b) -{ - return !a.equals(b); -} - -inline bool operator<(const WebNotification& a, const WebNotification& b) -{ - return a.lessThan(b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNotificationPermissionCallback.h b/WebKit/chromium/public/WebNotificationPermissionCallback.h deleted file mode 100644 index 07e85ee..0000000 --- a/WebKit/chromium/public/WebNotificationPermissionCallback.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNotificationPermissionCallback_h -#define WebNotificationPermissionCallback_h - -namespace WebKit { - -// Callback object used with WebNotificationPresenter. -class WebNotificationPermissionCallback { -public: - // Method to be invoked when the async permission request involving - // this object has been completed. - virtual void permissionRequestComplete() = 0; - -protected: - // This object is to be destroyed after the callback is invoked; - // it should not be directly destroyed. - ~WebNotificationPermissionCallback() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebNotificationPresenter.h b/WebKit/chromium/public/WebNotificationPresenter.h deleted file mode 100644 index 9fb7e6e..0000000 --- a/WebKit/chromium/public/WebNotificationPresenter.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebNotificationPresenter_h -#define WebNotificationPresenter_h - -#include "WebNotificationPermissionCallback.h" -#include "WebSecurityOrigin.h" -#include "WebString.h" - -namespace WebKit { - -class WebDocument; -class WebNotification; -class WebURL; - -// Provides the services to show desktop notifications to the user. -class WebNotificationPresenter { -public: - enum Permission { - PermissionAllowed, // User has allowed permission to the origin. - PermissionNotAllowed, // User has not taken an action on the origin (defaults to not allowed). - PermissionDenied // User has explicitly denied permission from the origin. - }; - - // Shows a notification. - virtual bool show(const WebNotification&) = 0; - - // Cancels a notification previously shown, and removes it if being shown. - virtual void cancel(const WebNotification&) = 0; - - // Indiciates that the notification object subscribed to events for a previously shown notification is - // being destroyed. Does _not_ remove the notification if being shown, but detaches it from receiving events. - virtual void objectDestroyed(const WebNotification&) = 0; - - // Checks the permission level for the given origin. - virtual Permission checkPermission(const WebURL&) = 0; - - // Requests permission for a given origin. This operation is asynchronous and the callback provided - // will be invoked when the permission decision is made. Callback pointer must remain - // valid until called. - virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPermissionCallback*) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebOptionElement.h b/WebKit/chromium/public/WebOptionElement.h deleted file mode 100644 index 24a6eaa..0000000 --- a/WebKit/chromium/public/WebOptionElement.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebOptionElement_h -#define WebOptionElement_h - -#include "WebFormControlElement.h" -#include "WebVector.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLOptionElement; } -#endif - -namespace WebKit { - -// Provides readonly access to some properties of a DOM option element node. -class WebOptionElement : public WebFormControlElement { -public: - WebOptionElement() : WebFormControlElement() { } - WebOptionElement(const WebOptionElement& element) : WebFormControlElement(element) { } - - WebOptionElement& operator=(const WebOptionElement& element) - { - WebFormControlElement::assign(element); - return *this; - } - void assign(const WebOptionElement& element) { WebFormControlElement::assign(element); } - - WEBKIT_API void setValue(const WebString&); - WEBKIT_API WebString value() const; - - WEBKIT_API int index() const; - WEBKIT_API WebString text() const; - WEBKIT_API bool defaultSelected() const; - WEBKIT_API void setDefaultSelected(bool); - WEBKIT_API WebString label() const; - WEBKIT_API bool isEnabled() const; - -#if WEBKIT_IMPLEMENTATION - WebOptionElement(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&); - WebOptionElement& operator=(const WTF::PassRefPtr<WebCore::HTMLOptionElement>&); - operator WTF::PassRefPtr<WebCore::HTMLOptionElement>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPageSerializer.h b/WebKit/chromium/public/WebPageSerializer.h deleted file mode 100644 index 94f7994..0000000 --- a/WebKit/chromium/public/WebPageSerializer.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPageSerializer_h -#define WebPageSerializer_h - -#include "WebCommon.h" - -namespace WebKit { -class WebFrame; -class WebPageSerializerClient; -class WebString; -class WebURL; -template <typename T> class WebVector; - -// Get html data by serializing all frames of current page with lists -// which contain all resource links that have local copy. -class WebPageSerializer { -public: - // This function will find out all frames and serialize them to HTML data. - // We have a data buffer to temporary saving generated html data. We will - // sequentially call WebPageSeriazlierClient once the data buffer is full. - // - // Return false means no available frame has been serialized, otherwise - // return true. - // - // The parameter frame specifies which frame need to be serialized. - // The parameter recursive specifies whether we need to - // serialize all sub frames of the specified frame or not. - // The parameter client specifies the pointer of interface - // WebPageSerializerClient providing a sink interface to receive the - // individual chunks of data to be saved. - // The parameter links contain original URLs of all saved links. - // The parameter localPaths contain corresponding local file paths of all - // saved links, which matched with vector:links one by one. - // The parameter localDirectoryName is relative path of directory which - // contain all saved auxiliary files included all sub frames and resources. - WEBKIT_API static bool serialize(WebFrame* frame, - bool recursive, - WebPageSerializerClient* client, - const WebVector<WebURL>& links, - const WebVector<WebString>& localPaths, - const WebString& localDirectoryName); - - // FIXME: The following are here for unit testing purposes. Consider - // changing the unit tests instead. - - // Generate the META for charset declaration. - WEBKIT_API static WebString generateMetaCharsetDeclaration(const WebString& charset); - // Generate the MOTW declaration. - WEBKIT_API static WebString generateMarkOfTheWebDeclaration(const WebURL& url); - // Generate the default base tag declaration. - WEBKIT_API static WebString generateBaseTagDeclaration(const WebString& baseTarget); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPageSerializerClient.h b/WebKit/chromium/public/WebPageSerializerClient.h deleted file mode 100644 index c30ddbc..0000000 --- a/WebKit/chromium/public/WebPageSerializerClient.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPageSerializerClient_h -#define WebPageSerializerClient_h - -namespace WebKit { -class WebCString; -class WebURL; - -// This class is used for providing sink interface that can be used to receive -// the individual chunks of data to be saved. -class WebPageSerializerClient { -public: - // This enum indicates This sink interface can receive the individual chunks - // of serialized data to be saved, so we use values of following enum - // definition to indicate the serialization status of serializing all html - // content. If current frame is not complete serialized, call - // didSerializeDataForFrame with URL of current frame, data, data length and - // flag CurrentFrameIsNotFinished. - // If current frame is complete serialized, call didSerializeDataForFrame - // with URL of current frame, data, data length and flag - // CurrentFrameIsFinished. - // If all frames of page are complete serialized, call - // didSerializeDataForFrame with empty URL, empty data, 0 and flag - // AllFramesAreFinished. - enum PageSerializationStatus { - CurrentFrameIsNotFinished, - CurrentFrameIsFinished, - AllFramesAreFinished, - }; - - // Receive the individual chunks of serialized and encoded data to be saved. - // The parameter frameURL specifies what frame the data belongs. The - // parameter data contains the available data for saving. The parameter - // status indicates the status of data serialization. - virtual void didSerializeDataForFrame(const WebURL& frameURL, - const WebCString& data, - PageSerializationStatus status) = 0; - WebPageSerializerClient() { } - -protected: - virtual ~WebPageSerializerClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPasswordAutocompleteListener.h b/WebKit/chromium/public/WebPasswordAutocompleteListener.h deleted file mode 100644 index fdc8476..0000000 --- a/WebKit/chromium/public/WebPasswordAutocompleteListener.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPasswordAutocompleteListener_h -#define WebPasswordAutocompleteListener_h - -namespace WebKit { -class WebString; - -class WebPasswordAutocompleteListener { -public: - virtual ~WebPasswordAutocompleteListener() {} - - virtual void didBlurInputElement( - const WebString& userInput) = 0; - - virtual void performInlineAutocomplete( - const WebString& userInput, - bool backSpaceOrDeletePressed, - bool showSuggestions) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPasswordFormData.h b/WebKit/chromium/public/WebPasswordFormData.h deleted file mode 100644 index 30ce5ca..0000000 --- a/WebKit/chromium/public/WebPasswordFormData.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPasswordFormData_h -#define WebPasswordFormData_h - -#include "WebFormElement.h" -#include "WebString.h" -#include "WebURL.h" - -namespace WebKit { - -struct WebPasswordFormData { - // If the provided form is suitable for password completion, isValid() will - // return true; - WEBKIT_API WebPasswordFormData(const WebFormElement&); - - // If creation failed, return false. - bool isValid() const { return action.isValid(); } - - // The action target of the form. This is the primary data used by the - // PasswordManager for form autofill; that is, the action of the saved - // credentials must match the action of the form on the page to be autofilled. - // If this is empty / not available, it will result in a "restricted" - // IE-like autofill policy, where we wait for the user to type in his - // username before autofilling the password. In these cases, after successful - // login the action URL will automatically be assigned by the - // PasswordManager. - // - // When parsing an HTML form, this must always be set. - WebURL action; - - // The "Realm" for the sign-on (scheme, host, port for SCHEME_HTML, and - // contains the HTTP realm for dialog-based forms). - // The signon_realm is effectively the primary key used for retrieving - // data from the database, so it must not be empty. - WebString signonRealm; - - // The URL (minus query parameters) containing the form. This is the primary - // data used by the PasswordManager to decide (in longest matching prefix - // fashion) whether or not a given PasswordForm result from the database is a - // good fit for a particular form on a page, so it must not be empty. - WebURL origin; - - // The name of the submit button used. Optional; only used in scoring - // of PasswordForm results from the database to make matches as tight as - // possible. - // - // When parsing an HTML form, this must always be set. - WebString submitElement; - - // The name of the username input element. Optional (improves scoring). - // - // When parsing an HTML form, this must always be set. - WebString userNameElement; - - // The username. Optional. - // - // When parsing an HTML form, this is typically empty unless the site - // has implemented some form of autofill. - WebString userNameValue; - - // The name of the password input element, Optional (improves scoring). - // - // When parsing an HTML form, this must always be set. - WebString passwordElement; - - // The password. Required. - // - // When parsing an HTML form, this is typically empty. - WebString passwordValue; - - // If the form was a change password form, the name of the - // 'old password' input element. Optional. - WebString oldPasswordElement; - - // The old password. Optional. - WebString oldPasswordValue; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPerformance.h b/WebKit/chromium/public/WebPerformance.h deleted file mode 100644 index c7a728e..0000000 --- a/WebKit/chromium/public/WebPerformance.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPerformance_h -#define WebPerformance_h - -#include "WebCommon.h" -#include "WebNavigationType.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class Performance; } - -namespace WebKit { - -class WebPerformance { -public: - ~WebPerformance() { reset(); } - - WebPerformance() { } - - WebPerformance(const WebPerformance& p) { assign(p); } - - WebPerformance& operator=(const WebPerformance& p) - { - assign(p); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebPerformance&); - - // This only returns one of {Other|Reload|BackForward}. - // Form submits and link clicks all fall under other. - WEBKIT_API WebNavigationType navigationType() const; - - WEBKIT_API double navigationStart() const; - WEBKIT_API double unloadEventEnd() const; - WEBKIT_API double redirectStart() const; - WEBKIT_API double redirectEnd() const; - WEBKIT_API unsigned short redirectCount() const; - WEBKIT_API double fetchStart() const; - WEBKIT_API double domainLookupStart() const; - WEBKIT_API double domainLookupEnd() const; - WEBKIT_API double connectStart() const; - WEBKIT_API double connectEnd() const; - WEBKIT_API double requestStart() const; - WEBKIT_API double responseStart() const; - WEBKIT_API double responseEnd() const; - WEBKIT_API double domLoading() const; - WEBKIT_API double domInteractive() const; - WEBKIT_API double domContentLoadedEventStart() const; - WEBKIT_API double domContentLoadedEventEnd() const; - WEBKIT_API double domComplete() const; - WEBKIT_API double loadEventStart() const; - WEBKIT_API double loadEventEnd() const; - -#if WEBKIT_IMPLEMENTATION - WebPerformance(const WTF::PassRefPtr<WebCore::Performance>&); - WebPerformance& operator=(const WTF::PassRefPtr<WebCore::Performance>&); - operator WTF::PassRefPtr<WebCore::Performance>() const; -#endif - -private: - WebPrivatePtr<WebCore::Performance> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h deleted file mode 100644 index 4a6f081..0000000 --- a/WebKit/chromium/public/WebPlugin.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPlugin_h -#define WebPlugin_h - -#include "WebCanvas.h" -#include "WebString.h" -#include "WebURL.h" - -struct NPObject; - -namespace WebKit { - -class WebDataSource; -class WebFrame; -class WebInputEvent; -class WebPluginContainer; -class WebURLResponse; -struct WebCursorInfo; -struct WebPluginParams; -struct WebPoint; -struct WebRect; -struct WebURLError; -template <typename T> class WebVector; - -class WebPlugin { -public: - virtual bool initialize(WebPluginContainer*) = 0; - virtual void destroy() = 0; - - virtual NPObject* scriptableObject() = 0; - - virtual void paint(WebCanvas*, const WebRect&) = 0; - - // Coordinates are relative to the containing window. - virtual void updateGeometry( - const WebRect& frameRect, const WebRect& clipRect, - const WebVector<WebRect>& cutOutsRects, bool isVisible) = 0; - - // If the plugin instance is backed by an OpenGL texture, return its ID in the - // compositors namespace. Otherwise return 0. Returns 0 by default. - virtual unsigned getBackingTextureId() { return 0; } - - virtual void updateFocus(bool) = 0; - virtual void updateVisibility(bool) = 0; - - virtual bool acceptsInputEvents() = 0; - virtual bool handleInputEvent(const WebInputEvent&, WebCursorInfo&) = 0; - - virtual void didReceiveResponse(const WebURLResponse&) = 0; - virtual void didReceiveData(const char* data, int dataLength) = 0; - virtual void didFinishLoading() = 0; - virtual void didFailLoading(const WebURLError&) = 0; - - // Called in response to WebPluginContainer::loadFrameRequest - virtual void didFinishLoadingFrameRequest( - const WebURL&, void* notifyData) = 0; - virtual void didFailLoadingFrameRequest( - const WebURL&, void* notifyData, const WebURLError&) = 0; - - // Printing interface. - // Whether the plugin supports its own paginated print. The other print - // interface methods are called only if this method returns true. - virtual bool supportsPaginatedPrint() { return false; } - // Sets up printing at the given print rect and printer DPI. printableArea - // is in points (a point is 1/72 of an inch).Returns the number of pages to - // be printed at these settings. - virtual int printBegin(const WebRect& printableArea, int printerDPI) { return 0; } - // Prints the page specified by pageNumber (0-based index) into the supplied canvas. - virtual bool printPage(int pageNumber, WebCanvas* canvas) { return false; } - // Ends the print operation. - virtual void printEnd() { } - - virtual bool hasSelection() const { return false; } - virtual WebString selectionAsText() const { return WebString(); } - virtual WebString selectionAsMarkup() const { return WebString(); } - - // If the given position is over a link, returns the absolute url. - // Otherwise an empty url is returned. - virtual WebURL linkAtPosition(const WebPoint& position) const { return WebURL(); } - - // Used for zooming of full page plugins. - virtual void setZoomLevel(double level, bool textOnly) { } - - // Find interface. - // Start a new search. The plugin should search for a little bit at a time so that it - // doesn't block the thread in case of a large document. The results, along with the - // find's identifier, should be sent asynchronously to WebFrameClient's reportFindInPage* methods. - // Returns true if the search started, or false if the plugin doesn't support search. - virtual bool startFind(const WebString& searchText, bool caseSensitive, int identifier) { return false; } - // Tells the plugin to jump forward or backward in the list of find results. - virtual void selectFindResult(bool forward) { } - // Tells the plugin that the user has stopped the find operation. - virtual void stopFind() { } - -protected: - ~WebPlugin() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPluginContainer.h b/WebKit/chromium/public/WebPluginContainer.h deleted file mode 100644 index c580f81..0000000 --- a/WebKit/chromium/public/WebPluginContainer.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginContainer_h -#define WebPluginContainer_h - -struct NPObject; - -namespace WebKit { - -class WebElement; -class WebPlugin; -class WebString; -class WebURL; -class WebURLRequest; -struct WebRect; - -class WebPluginContainer { -public: - // Returns the element containing this plugin. - virtual WebElement element() = 0; - - virtual void invalidate() = 0; - virtual void invalidateRect(const WebRect&) = 0; - virtual void scrollRect(int dx, int dy, const WebRect&) = 0; - - // Causes the container to report its current geometry via - // WebPlugin::updateGeometry. - virtual void reportGeometry() = 0; - - // Called when the backing texture is ready to be composited. - virtual void commitBackingTexture() {} - - // Drop any references to script objects allocated by the plugin. - // These are objects derived from WebPlugin::scriptableObject. This is - // called when the plugin is being destroyed or if it needs to be - // re-initialized. - virtual void clearScriptObjects() = 0; - - // Returns the scriptable object associated with the DOM element - // containing the plugin. - virtual NPObject* scriptableObjectForElement() = 0; - - // Executes a "javascript:" URL on behalf of the plugin in the context - // of the frame containing the plugin. Returns the result of script - // execution, if any. - virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; - - // Loads an URL in the specified frame (or the frame containing this - // plugin if target is empty). If notifyNeeded is true, then upon - // completion, WebPlugin::didFinishLoadingFrameRequest is called if the - // load was successful or WebPlugin::didFailLoadingFrameRequest is - // called if the load failed. The given notifyData is passed along to - // the callback. - virtual void loadFrameRequest( - const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0; - - // Notifies that the zoom level has changed. - virtual void zoomLevelChanged(double zoomLevel) = 0; - - virtual WebPlugin* plugin() = 0; - virtual void setPlugin(WebPlugin*) = 0; - -protected: - ~WebPluginContainer() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPluginDocument.h b/WebKit/chromium/public/WebPluginDocument.h deleted file mode 100644 index b772cf7..0000000 --- a/WebKit/chromium/public/WebPluginDocument.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginDocument_h -#define WebPluginDocument_h - -#include "WebDocument.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class PluginDocument; } -#endif - -namespace WebKit { -class WebPlugin; - -// Wraps a WebDocument for full page plugins. -class WebPluginDocument : public WebDocument { -public: - WebPluginDocument() { } - WebPluginDocument(const WebPluginDocument& e) : WebDocument(e) { } - - WebPluginDocument& operator=(const WebPluginDocument& e) - { - WebNode::assign(e); - return *this; - } - void assign(const WebPluginDocument& d) { WebNode::assign(d); } - - WEBKIT_API WebPlugin* plugin(); - -#if WEBKIT_IMPLEMENTATION - WebPluginDocument(const WTF::PassRefPtr<WebCore::PluginDocument>&); - WebPluginDocument& operator=(const WTF::PassRefPtr<WebCore::PluginDocument>&); - operator WTF::PassRefPtr<WebCore::PluginDocument>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPluginListBuilder.h b/WebKit/chromium/public/WebPluginListBuilder.h deleted file mode 100644 index 4bd427d..0000000 --- a/WebKit/chromium/public/WebPluginListBuilder.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginListBuilder_h -#define WebPluginListBuilder_h - -namespace WebKit { - -class WebString; - -// An interface for building a list of known plugins. -class WebPluginListBuilder { -public: - virtual void addPlugin( - const WebString& name, const WebString& description, - const WebString& fileName) = 0; - - virtual void addMediaTypeToLastPlugin( - const WebString& name, const WebString& description) = 0; - - virtual void addFileExtensionToLastMediaType( - const WebString& fileExtension) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPluginParams.h b/WebKit/chromium/public/WebPluginParams.h deleted file mode 100644 index 5d03204..0000000 --- a/WebKit/chromium/public/WebPluginParams.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginParams_h -#define WebPluginParams_h - -#include "WebString.h" -#include "WebURL.h" -#include "WebVector.h" - -namespace WebKit { - -struct WebPluginParams { - WebURL url; - WebString mimeType; - WebVector<WebString> attributeNames; - WebVector<WebString> attributeValues; - bool loadManually; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPoint.h b/WebKit/chromium/public/WebPoint.h deleted file mode 100644 index 20c52c2..0000000 --- a/WebKit/chromium/public/WebPoint.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPoint_h -#define WebPoint_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include "IntPoint.h" -#else -#include <gfx/point.h> -#endif - -namespace WebKit { - -struct WebPoint { - int x; - int y; - - WebPoint() - : x(0) - , y(0) - { - } - - WebPoint(int x, int y) - : x(x) - , y(y) - { - } - -#if WEBKIT_IMPLEMENTATION - WebPoint(const WebCore::IntPoint& p) - : x(p.x()) - , y(p.y()) - { - } - - WebPoint& operator=(const WebCore::IntPoint& p) - { - x = p.x(); - y = p.y(); - return *this; - } - - operator WebCore::IntPoint() const - { - return WebCore::IntPoint(x, y); - } -#else - WebPoint(const gfx::Point& p) - : x(p.x()) - , y(p.y()) - { - } - - WebPoint& operator=(const gfx::Point& p) - { - x = p.x(); - y = p.y(); - return *this; - } - - operator gfx::Point() const - { - return gfx::Point(x, y); - } -#endif -}; - -inline bool operator==(const WebPoint& a, const WebPoint& b) -{ - return a.x == b.x && a.y == b.y; -} - -inline bool operator!=(const WebPoint& a, const WebPoint& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPopupMenu.h b/WebKit/chromium/public/WebPopupMenu.h deleted file mode 100644 index c2cdec3..0000000 --- a/WebKit/chromium/public/WebPopupMenu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPopupMenu_h -#define WebPopupMenu_h - -#include "WebCommon.h" -#include "WebWidget.h" - -namespace WebKit { - -class WebWidgetClient; - -class WebPopupMenu : public WebWidget { -public: - WEBKIT_API static WebPopupMenu* create(WebWidgetClient*); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPopupMenuInfo.h b/WebKit/chromium/public/WebPopupMenuInfo.h deleted file mode 100644 index 7cf1b63..0000000 --- a/WebKit/chromium/public/WebPopupMenuInfo.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPopupMenuInfo_h -#define WebPopupMenuInfo_h - -#include "WebMenuItemInfo.h" -#include "WebVector.h" - -namespace WebKit { - -// Describes the contents of a popup menu. -struct WebPopupMenuInfo { - // FIXME: migrate clients to WebMenuItemInfo and remove this temporary Item typedef. - typedef WebMenuItemInfo Item; - int itemHeight; - int itemFontSize; - int selectedIndex; - WebVector<WebMenuItemInfo> items; - bool rightAligned; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPopupType.h b/WebKit/chromium/public/WebPopupType.h deleted file mode 100644 index 8a546ba..0000000 --- a/WebKit/chromium/public/WebPopupType.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPopupType_h -#define WebPopupType_h - -namespace WebKit { - -enum WebPopupType { - WebPopupTypeNone, // Not a popup. - WebPopupTypeSelect, // A HTML select (combo-box) popup. - WebPopupTypeSuggestion, // An autofill/autocomplete popup. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPrivateOwnPtr.h b/WebKit/chromium/public/WebPrivateOwnPtr.h deleted file mode 100644 index 4bcabcf..0000000 --- a/WebKit/chromium/public/WebPrivateOwnPtr.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPrivateOwnPtr_h -#define WebPrivateOwnPtr_h - -#include "WebCommon.h" - -namespace WebKit { - -// This class is an implementation detail of the WebKit API. It exists -// to help simplify the implementation of WebKit interfaces that merely -// wrap a pointer to a WebCore class. It's similar to WebPrivatePtr, but it -// wraps a naked pointer rather than a reference counted. -// Note: you must call reset(0) on the implementation side in order to delete -// the WebCore pointer. -template <typename T> -class WebPrivateOwnPtr { -public: - WebPrivateOwnPtr() : m_ptr(0) {} - ~WebPrivateOwnPtr() { WEBKIT_ASSERT(!m_ptr); } - -#if WEBKIT_IMPLEMENTATION - explicit WebPrivateOwnPtr(T* ptr) - : m_ptr(ptr) - { - } - - void reset(T* ptr) - { - delete m_ptr; - m_ptr = ptr; - } - - T* get() const { return m_ptr; } - - T* operator->() const - { - WEBKIT_ASSERT(m_ptr); - return m_ptr; - } -#endif // WEBKIT_IMPLEMENTATION - -private: - T* m_ptr; - - WebPrivateOwnPtr(const WebPrivateOwnPtr&); - void operator=(const WebPrivateOwnPtr&); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebPrivatePtr.h b/WebKit/chromium/public/WebPrivatePtr.h deleted file mode 100644 index 48ad7f2..0000000 --- a/WebKit/chromium/public/WebPrivatePtr.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPrivatePtr_h -#define WebPrivatePtr_h - -#if WEBKIT_IMPLEMENTATION -#include <wtf/PassRefPtr.h> -#endif - -namespace WebKit { - -// This class is an implementation detail of the WebKit API. It exists -// to help simplify the implementation of WebKit interfaces that merely -// wrap a reference counted WebCore class. -template <typename T> -class WebPrivatePtr { -public: - WebPrivatePtr() : m_ptr(0) { } - ~WebPrivatePtr() { WEBKIT_ASSERT(!m_ptr); } - - bool isNull() const { return !m_ptr; } - -#if WEBKIT_IMPLEMENTATION - WebPrivatePtr(const PassRefPtr<T>& prp) - : m_ptr(prp.releaseRef()) - { - } - - void reset() - { - assign(0); - } - - WebPrivatePtr<T>& operator=(const WebPrivatePtr<T>& other) - { - T* p = other.m_ptr; - if (p) - p->ref(); - assign(p); - return *this; - } - - WebPrivatePtr<T>& operator=(const PassRefPtr<T>& prp) - { - assign(prp.releaseRef()); - return *this; - } - - T* get() const - { - return m_ptr; - } - - T* operator->() const - { - ASSERT(m_ptr); - return m_ptr; - } -#endif - -private: -#if WEBKIT_IMPLEMENTATION - void assign(T* p) - { - // p is already ref'd for us by the caller - if (m_ptr) - m_ptr->deref(); - m_ptr = p; - } -#endif - - T* m_ptr; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebRange.h b/WebKit/chromium/public/WebRange.h deleted file mode 100644 index 89fc8f6..0000000 --- a/WebKit/chromium/public/WebRange.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebRange_h -#define WebRange_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class Range; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebNode; -class WebRangePrivate; -class WebString; - -// Provides readonly access to some properties of a DOM range. -class WebRange { -public: - ~WebRange() { reset(); } - - WebRange() : m_private(0) { } - WebRange(const WebRange& r) : m_private(0) { assign(r); } - WebRange& operator=(const WebRange& r) - { - assign(r); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebRange&); - - bool isNull() const { return !m_private; } - - WEBKIT_API int startOffset() const; - WEBKIT_API int endOffset() const; - WEBKIT_API WebNode startContainer(int& exceptionCode) const; - WEBKIT_API WebNode endContainer(int& exceptionCode) const; - - WEBKIT_API WebString toHTMLText() const; - WEBKIT_API WebString toPlainText() const; - -#if WEBKIT_IMPLEMENTATION - WebRange(const WTF::PassRefPtr<WebCore::Range>&); - WebRange& operator=(const WTF::PassRefPtr<WebCore::Range>&); - operator WTF::PassRefPtr<WebCore::Range>() const; -#endif - -private: - void assign(WebRangePrivate*); - WebRangePrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebRect.h b/WebKit/chromium/public/WebRect.h deleted file mode 100644 index 30381d7..0000000 --- a/WebKit/chromium/public/WebRect.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebRect_h -#define WebRect_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include "IntRect.h" -#else -#include <gfx/rect.h> -#endif - -namespace WebKit { - -struct WebRect { - int x; - int y; - int width; - int height; - - bool isEmpty() const { return width <= 0 || height <= 0; } - - WebRect() - : x(0) - , y(0) - , width(0) - , height(0) - { - } - - WebRect(int x, int y, int width, int height) - : x(x) - , y(y) - , width(width) - , height(height) - { - } - -#if WEBKIT_IMPLEMENTATION - WebRect(const WebCore::IntRect& r) - : x(r.x()) - , y(r.y()) - , width(r.width()) - , height(r.height()) - { - } - - WebRect& operator=(const WebCore::IntRect& r) - { - x = r.x(); - y = r.y(); - width = r.width(); - height = r.height(); - return *this; - } - - operator WebCore::IntRect() const - { - return WebCore::IntRect(x, y, width, height); - } -#else - WebRect(const gfx::Rect& r) - : x(r.x()) - , y(r.y()) - , width(r.width()) - , height(r.height()) - { - } - - WebRect& operator=(const gfx::Rect& r) - { - x = r.x(); - y = r.y(); - width = r.width(); - height = r.height(); - return *this; - } - - operator gfx::Rect() const - { - return gfx::Rect(x, y, width, height); - } -#endif -}; - -inline bool operator==(const WebRect& a, const WebRect& b) -{ - return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const WebRect& a, const WebRect& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebRegularExpression.h b/WebKit/chromium/public/WebRegularExpression.h deleted file mode 100644 index bdf72d8..0000000 --- a/WebKit/chromium/public/WebRegularExpression.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebRegularExpression_h -#define WebRegularExpression_h - -#include "WebCommon.h" -#include "WebNonCopyable.h" -#include "WebTextCaseSensitivity.h" - -namespace WebKit { - -class WebRegularExpressionPrivate; -class WebString; - -class WebRegularExpression : public WebNonCopyable { -public: - WEBKIT_API WebRegularExpression(const WebString& pattern, WebTextCaseSensitivity); - WEBKIT_API ~WebRegularExpression(); - - WEBKIT_API int match(const WebString&, int startFrom = 0, int* matchLength = 0) const; - -private: - WebRegularExpressionPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebRuntimeFeatures.h b/WebKit/chromium/public/WebRuntimeFeatures.h deleted file mode 100644 index 5537ee2..0000000 --- a/WebKit/chromium/public/WebRuntimeFeatures.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebRuntimeFeatures_h -#define WebRuntimeFeatures_h - -#include "WebCommon.h" - -namespace WebKit { - -// This class is used to enable runtime features of WebKit. It is unspecified -// whether a feature is enabled by default. In the future, a feature may be -// promoted from disabled by default to enabled by default once it reaches a -// certain level of maturity. -class WebRuntimeFeatures { -public: - WEBKIT_API static void enableDatabase(bool); - WEBKIT_API static bool isDatabaseEnabled(); - - WEBKIT_API static void enableLocalStorage(bool); - WEBKIT_API static bool isLocalStorageEnabled(); - - WEBKIT_API static void enableSessionStorage(bool); - WEBKIT_API static bool isSessionStorageEnabled(); - - WEBKIT_API static void enableMediaPlayer(bool); - WEBKIT_API static bool isMediaPlayerEnabled(); - - WEBKIT_API static void enableSockets(bool); - WEBKIT_API static bool isSocketsEnabled(); - - WEBKIT_API static void enableNotifications(bool); - WEBKIT_API static bool isNotificationsEnabled(); - - WEBKIT_API static void enableApplicationCache(bool); - WEBKIT_API static bool isApplicationCacheEnabled(); - - WEBKIT_API static void enableGeolocation(bool); - WEBKIT_API static bool isGeolocationEnabled(); - - WEBKIT_API static void enableIndexedDatabase(bool); - WEBKIT_API static bool isIndexedDatabaseEnabled(); - - WEBKIT_API static void enableWebGL(bool); - WEBKIT_API static bool isWebGLEnabled(); - - WEBKIT_API static void enablePushState(bool); - WEBKIT_API static bool isPushStateEnabled(bool); - - WEBKIT_API static void enableTouch(bool); - WEBKIT_API static bool isTouchEnabled(); - - WEBKIT_API static void enableDeviceMotion(bool); - WEBKIT_API static bool isDeviceMotionEnabled(); - - WEBKIT_API static void enableDeviceOrientation(bool); - WEBKIT_API static bool isDeviceOrientationEnabled(); - - WEBKIT_API static void enableSpeechInput(bool); - WEBKIT_API static bool isSpeechInputEnabled(); - - WEBKIT_API static void enableXHRResponseBlob(bool); - WEBKIT_API static bool isXHRResponseBlobEnabled(); - - WEBKIT_API static void enableFileSystem(bool); - WEBKIT_API static bool isFileSystemEnabled(); - -private: - WebRuntimeFeatures(); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebScreenInfo.h b/WebKit/chromium/public/WebScreenInfo.h deleted file mode 100644 index d3d268a..0000000 --- a/WebKit/chromium/public/WebScreenInfo.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScreenInfo_h -#define WebScreenInfo_h - -#include "WebRect.h" - -namespace WebKit { - -struct WebScreenInfo { - // The screen depth in bits per pixel - int depth; - - // The bits per colour component. This assumes that the colours are balanced - // equally. - int depthPerComponent; - - // This can be true for black and white printers - bool isMonochrome; - - // This is set from the rcMonitor member of MONITORINFOEX, to whit: - // "A RECT structure that specifies the display monitor rectangle, - // expressed in virtual-screen coordinates. Note that if the monitor - // is not the primary display monitor, some of the rectangle's - // coordinates may be negative values." - WebRect rect; - - // This is set from the rcWork member of MONITORINFOEX, to whit: - // "A RECT structure that specifies the work area rectangle of the - // display monitor that can be used by applications, expressed in - // virtual-screen coordinates. Windows uses this rectangle to - // maximize an application on the monitor. The rest of the area in - // rcMonitor contains system windows such as the task bar and side - // bars. Note that if the monitor is not the primary display monitor, - // some of the rectangle's coordinates may be negative values". - WebRect availableRect; - - WebScreenInfo() - : depth(0) - , depthPerComponent(0) - , isMonochrome(false) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h deleted file mode 100644 index 368f33d..0000000 --- a/WebKit/chromium/public/WebScriptController.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScriptController_h -#define WebScriptController_h - -#include "WebCommon.h" - -namespace v8 { -class Extension; -} - -namespace WebKit { - -class WebString; - -class WebScriptController { -public: - // Registers a v8 extension to be available on webpages. The three forms - // offer various restrictions on what types of contexts the extension is - // loaded into. If a scheme is provided, only pages whose URL has the given - // scheme will match. If extensionGroup is provided, the extension will only - // be loaded into scripts run via WebFrame::ExecuteInNewWorld with the - // matching group. - // Will only affect v8 contexts initialized after this call. Takes ownership - // of the v8::Extension object passed. - WEBKIT_API static void registerExtension(v8::Extension*); - - // Enables special settings which are only applicable if V8 is executed - // in the single thread which must be the main thread. - // FIXME: make a try to dynamically detect when this condition is broken - // and automatically switch off single thread mode. - WEBKIT_API static void enableV8SingleThreadMode(); - - // Process any pending JavaScript console messages. - WEBKIT_API static void flushConsoleMessages(); - -private: - WebScriptController(); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebScriptSource.h b/WebKit/chromium/public/WebScriptSource.h deleted file mode 100644 index 344815b..0000000 --- a/WebKit/chromium/public/WebScriptSource.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScriptSource_h -#define WebScriptSource_h - -#include "WebString.h" -#include "WebURL.h" - -namespace WebKit { - -struct WebScriptSource { - WebString code; - WebURL url; - int startLine; - - WebScriptSource(const WebString& code) - : code(code), startLine(1) { } - WebScriptSource(const WebString& code, const WebURL& url) - : code(code), url(url), startLine(1) { } - WebScriptSource(const WebString& code, const WebURL& url, int startLine) - : code(code), url(url), startLine(startLine) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebScrollbar.h b/WebKit/chromium/public/WebScrollbar.h deleted file mode 100644 index 6941f4d..0000000 --- a/WebKit/chromium/public/WebScrollbar.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScrollbar_h -#define WebScrollbar_h - -#include "WebCanvas.h" -#include "WebCommon.h" - -namespace WebKit { - -class WebInputEvent; -class WebScrollbarClient; -struct WebRect; - -class WebScrollbar { -public: - enum Orientation { - Horizontal, - Vertical - }; - - enum ScrollDirection { - ScrollBackward, - ScrollForward - }; - - enum ScrollGranularity { - ScrollByLine, - ScrollByPage, - ScrollByDocument, - ScrollByPixel - }; - - // Creates a WebScrollbar. - WEBKIT_API static WebScrollbar* create(WebScrollbarClient*, Orientation); - - virtual ~WebScrollbar() {} - - // Gets the thickness of the scrollbar in pixels. - WEBKIT_API static int defaultThickness(); - - // Sets the rectangle of the scrollbar. - virtual void setLocation(const WebRect&) = 0; - - // Gets the current value (i.e. position inside the region). - virtual int value() const = 0; - - // Sets the current value. - virtual void setValue(int position) = 0; - - // Sets the size of the scrollable region in pixels. i.e. if a document is - // 800x10000 pixels and the viewport is 1000x1000 pixels, then setLocation - // for the vertical scrollbar would have passed in a rectangle like: - // (800 - defaultThickness(), 0) (defaultThickness() x 10000) - // and setDocumentSize(10000) - virtual void setDocumentSize(int size) = 0; - - // Scroll back or forward with the given granularity. - virtual void scroll(ScrollDirection, ScrollGranularity, float multiplier) = 0; - - // Paint the given rectangle. - virtual void paint(WebCanvas*, const WebRect&) = 0; - - // Returns true iff the given event was used. - virtual bool handleInputEvent(const WebInputEvent&) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebScrollbarClient.h b/WebKit/chromium/public/WebScrollbarClient.h deleted file mode 100644 index d1825c8..0000000 --- a/WebKit/chromium/public/WebScrollbarClient.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScrollbarClient_h -#define WebScrollbarClient_h - -namespace WebKit { - -class WebScrollbar; -struct WebRect; -template <typename T> class WebVector; - -class WebScrollbarClient { -public: - virtual void valueChanged(WebScrollbar*) = 0; - virtual void invalidateScrollbarRect(WebScrollbar*, const WebRect&) = 0; - virtual void getTickmarks(WebScrollbar*, WebVector<WebRect>*) const = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSearchableFormData.h b/WebKit/chromium/public/WebSearchableFormData.h deleted file mode 100644 index 5cd1d9b..0000000 --- a/WebKit/chromium/public/WebSearchableFormData.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSearchableFormData_h -#define WebSearchableFormData_h - -#include "WebString.h" -#include "WebURL.h" - -namespace WebKit { -class WebFormElement; - -// SearchableFormData encapsulates a URL and encoding of an INPUT field that -// corresponds to a searchable form request. -class WebSearchableFormData { -public: - // If the provided form is suitable for automated searching, isValid() - // will return false. - WEBKIT_API WebSearchableFormData(const WebFormElement&); - - bool isValid() { return m_url.isValid(); } - - // URL for the searchable form request. - const WebURL& url() const - { - return m_url; - } - - // Encoding used to encode the form parameters; never empty. - const WebString& encoding() const - { - return m_encoding; - } - -private: - WebURL m_url; - WebString m_encoding; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSecurityOrigin.h b/WebKit/chromium/public/WebSecurityOrigin.h deleted file mode 100644 index a241682..0000000 --- a/WebKit/chromium/public/WebSecurityOrigin.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSecurityOrigin_h -#define WebSecurityOrigin_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class SecurityOrigin; } -namespace WTF { template <typename T> class PassRefPtr; } -#endif - -namespace WebKit { - -class WebSecurityOriginPrivate; -class WebString; -class WebURL; - -class WebSecurityOrigin { -public: - ~WebSecurityOrigin() { reset(); } - - WebSecurityOrigin() : m_private(0) { } - WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } - WebSecurityOrigin& operator=(const WebSecurityOrigin& s) - { - assign(s); - return *this; - } - - WEBKIT_API static WebSecurityOrigin createFromDatabaseIdentifier(const WebString& databaseIdentifier); - WEBKIT_API static WebSecurityOrigin createFromString(const WebString&); - WEBKIT_API static WebSecurityOrigin create(const WebURL&); - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebSecurityOrigin&); - - bool isNull() const { return !m_private; } - - WEBKIT_API WebString protocol() const; - WEBKIT_API WebString host() const; - WEBKIT_API unsigned short port() const; - - // The empty WebSecurityOrigin is the least privileged WebSecurityOrigin. - WEBKIT_API bool isEmpty() const; - - // Returns true if this WebSecurityOrigin can script objects in the given - // SecurityOrigin. For example, call this function before allowing - // script from one security origin to read or write objects from - // another SecurityOrigin. - WEBKIT_API bool canAccess(const WebSecurityOrigin&) const; - - // Returns true if this WebSecurityOrigin can read content retrieved from - // the given URL. For example, call this function before allowing script - // from a given security origin to receive contents from a given URL. - WEBKIT_API bool canRequest(const WebURL&) const; - - // Returns a string representation of the WebSecurityOrigin. The empty - // WebSecurityOrigin is represented by "null". The representation of a - // non-empty WebSecurityOrigin resembles a standard URL. - WEBKIT_API WebString toString() const; - - // Returns a string representation of this WebSecurityOrigin that can - // be used as a file. Should be used in storage APIs only. - WEBKIT_API WebString databaseIdentifier() const; - - // Returns true if this WebSecurityOrigin can access usernames and - // passwords stored in password manager. - WEBKIT_API bool canAccessPasswordManager() const; - -#if WEBKIT_IMPLEMENTATION - WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); - WebSecurityOrigin& operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>&); - operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const; - WebCore::SecurityOrigin* get() const; -#endif - -private: - void assign(WebSecurityOriginPrivate*); - WebSecurityOriginPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSecurityPolicy.h b/WebKit/chromium/public/WebSecurityPolicy.h deleted file mode 100644 index f15dd75..0000000 --- a/WebKit/chromium/public/WebSecurityPolicy.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSecurityPolicy_h -#define WebSecurityPolicy_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebString; -class WebURL; - -class WebSecurityPolicy { -public: - // Registers a URL scheme to be treated as a local scheme (i.e., with the - // same security rules as those applied to "file" URLs). This means that - // normal pages cannot link to or access URLs of this scheme. - WEBKIT_API static void registerURLSchemeAsLocal(const WebString&); - - // Registers a URL scheme to be treated as a noAccess scheme. This means - // that pages loaded with this URL scheme cannot access pages loaded with - // any other URL scheme. - WEBKIT_API static void registerURLSchemeAsNoAccess(const WebString&); - - // Registers a URL scheme to not generate mixed content warnings when - // included by an HTTPS page. - WEBKIT_API static void registerURLSchemeAsSecure(const WebString&); - - // Support for whitelisting access to origins beyond the same-origin policy. - WEBKIT_API static void addOriginAccessWhitelistEntry( - const WebURL& sourceOrigin, const WebString& destinationProtocol, - const WebString& destinationHost, bool allowDestinationSubdomains); - WEBKIT_API static void removeOriginAccessWhitelistEntry( - const WebURL& sourceOrigin, const WebString& destinationProtocol, - const WebString& destinationHost, bool allowDestinationSubdomains); - WEBKIT_API static void resetOriginAccessWhitelists(); - - // Returns whether the url should be allowed to see the referrer - // based on their respective protocols. - WEBKIT_API static bool shouldHideReferrer(const WebURL& url, const WebString& referrer); - -private: - WebSecurityPolicy(); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSelectElement.h b/WebKit/chromium/public/WebSelectElement.h deleted file mode 100644 index 97d3a78..0000000 --- a/WebKit/chromium/public/WebSelectElement.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSelectElement_h -#define WebSelectElement_h - -#include "WebFormControlElement.h" -#include "WebOptionElement.h" -#include "WebVector.h" - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class HTMLSelectElement; } -#endif - -namespace WebKit { - -// Provides readonly access to some properties of a DOM select element node. -class WebSelectElement : public WebFormControlElement { -public: - WebSelectElement() : WebFormControlElement() { } - WebSelectElement(const WebSelectElement& element) : WebFormControlElement(element) { } - - WebSelectElement& operator=(const WebSelectElement& element) - { - WebFormControlElement::assign(element); - return *this; - } - void assign(const WebSelectElement& element) { WebFormControlElement::assign(element); } - - WEBKIT_API void setValue(const WebString&); - WEBKIT_API WebString value(); - WEBKIT_API WebVector<WebElement> listItems(); - -#if WEBKIT_IMPLEMENTATION - WebSelectElement(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&); - WebSelectElement& operator=(const WTF::PassRefPtr<WebCore::HTMLSelectElement>&); - operator WTF::PassRefPtr<WebCore::HTMLSelectElement>() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSerializedScriptValue.h b/WebKit/chromium/public/WebSerializedScriptValue.h deleted file mode 100644 index 96e6d5b..0000000 --- a/WebKit/chromium/public/WebSerializedScriptValue.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSerializedScriptValue_h -#define WebSerializedScriptValue_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class SerializedScriptValue; } - -namespace WebKit { -class WebString; - -class WebSerializedScriptValue { -public: - ~WebSerializedScriptValue() { reset(); } - - WebSerializedScriptValue() { } - WebSerializedScriptValue(const WebSerializedScriptValue& d) { assign(d); } - WebSerializedScriptValue& operator=(const WebSerializedScriptValue& d) - { - assign(d); - return *this; - } - - WEBKIT_API static WebSerializedScriptValue fromString(const WebString&); - - // Create a WebSerializedScriptValue that represents a serialization error. - WEBKIT_API static WebSerializedScriptValue createInvalid(); - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebSerializedScriptValue&); - - bool isNull() const { return m_private.isNull(); } - - // Returns a string representation of the WebSerializedScriptValue. - WEBKIT_API WebString toString() const; - -#if WEBKIT_IMPLEMENTATION - WebSerializedScriptValue(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&); - WebSerializedScriptValue& operator=(const WTF::PassRefPtr<WebCore::SerializedScriptValue>&); - operator WTF::PassRefPtr<WebCore::SerializedScriptValue>() const; -#endif - -private: - WebPrivatePtr<WebCore::SerializedScriptValue> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h deleted file mode 100644 index 0467c96..0000000 --- a/WebKit/chromium/public/WebSettings.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSettings_h -#define WebSettings_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebString; -class WebURL; - -// WebSettings is owned by the WebView and allows code to modify the settings for -// the WebView's page without any knowledge of WebCore itself. For the most part, -// these functions have a 1:1 mapping with the methods in WebCore/page/settings.h. -class WebSettings { -public: - enum EditingBehavior { - EditingBehaviorMac, - EditingBehaviorWin, - EditingBehaviorUnix - }; - - virtual void setStandardFontFamily(const WebString&) = 0; - virtual void setFixedFontFamily(const WebString&) = 0; - virtual void setSerifFontFamily(const WebString&) = 0; - virtual void setSansSerifFontFamily(const WebString&) = 0; - virtual void setCursiveFontFamily(const WebString&) = 0; - virtual void setFantasyFontFamily(const WebString&) = 0; - virtual void setDefaultFontSize(int) = 0; - virtual void setDefaultFixedFontSize(int) = 0; - virtual void setMinimumFontSize(int) = 0; - virtual void setMinimumLogicalFontSize(int) = 0; - virtual void setDefaultTextEncodingName(const WebString&) = 0; - virtual void setJavaScriptEnabled(bool) = 0; - virtual void setWebSecurityEnabled(bool) = 0; - virtual void setJavaScriptCanOpenWindowsAutomatically(bool) = 0; - virtual void setLoadsImagesAutomatically(bool) = 0; - virtual void setImagesEnabled(bool) = 0; - virtual void setPluginsEnabled(bool) = 0; - virtual void setDOMPasteAllowed(bool) = 0; - virtual void setDeveloperExtrasEnabled(bool) = 0; - virtual void setNeedsSiteSpecificQuirks(bool) = 0; - virtual void setShrinksStandaloneImagesToFit(bool) = 0; - virtual void setUsesEncodingDetector(bool) = 0; - virtual void setTextAreasAreResizable(bool) = 0; - virtual void setJavaEnabled(bool) = 0; - virtual void setAllowScriptsToCloseWindows(bool) = 0; - virtual void setUserStyleSheetLocation(const WebURL&) = 0; - virtual void setAuthorAndUserStylesEnabled(bool) = 0; - virtual void setUsesPageCache(bool) = 0; - virtual void setDownloadableBinaryFontsEnabled(bool) = 0; - virtual void setJavaScriptCanAccessClipboard(bool) = 0; - virtual void setXSSAuditorEnabled(bool) = 0; - virtual void setLocalStorageEnabled(bool) = 0; - virtual void setEditableLinkBehaviorNeverLive() = 0; - virtual void setFrameFlatteningEnabled(bool) = 0; - virtual void setFontRenderingModeNormal() = 0; - virtual void setShouldPaintCustomScrollbars(bool) = 0; - virtual void setAllowUniversalAccessFromFileURLs(bool) = 0; - virtual void setAllowFileAccessFromFileURLs(bool) = 0; - virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0; - virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; - virtual void setExperimentalWebGLEnabled(bool) = 0; - virtual void setShowDebugBorders(bool) = 0; - virtual void setEditingBehavior(EditingBehavior) = 0; - virtual void setAcceleratedCompositingEnabled(bool) = 0; - virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool) = 0; - virtual void setAcceleratedCompositingForVideoEnabled(bool) = 0; - virtual void setAcceleratedCompositingForCanvasEnabled(bool) = 0; - virtual void setAcceleratedCompositingForPluginsEnabled(bool) = 0; - virtual void setAcceleratedCompositingForAnimationEnabled(bool) = 0; - virtual void setAccelerated2dCanvasEnabled(bool) = 0; - virtual void setMemoryInfoEnabled(bool) = 0; - virtual void setHyperlinkAuditingEnabled(bool) = 0; - virtual void setCaretBrowsingEnabled(bool) = 0; - -protected: - ~WebSettings() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSharedWorker.h b/WebKit/chromium/public/WebSharedWorker.h deleted file mode 100644 index 9492a4f..0000000 --- a/WebKit/chromium/public/WebSharedWorker.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSharedWorker_h -#define WebSharedWorker_h - -#include "WebCommon.h" - -namespace WebCore { -class ScriptExecutionContext; -} - -namespace WebKit { - -class WebString; -class WebMessagePortChannel; -class WebCommonWorkerClient; -class WebURL; - -// This is the interface to a SharedWorker thread. -// Since SharedWorkers communicate entirely through MessagePorts this interface only contains APIs for starting up a SharedWorker. -class WebSharedWorker { -public: - // Invoked from the worker thread to instantiate a WebSharedWorker that interacts with the WebKit worker components. - WEBKIT_API static WebSharedWorker* create(WebCommonWorkerClient*); - - virtual ~WebSharedWorker() {}; - - // Returns false if the thread hasn't been started yet (script loading has not taken place). - // FIXME(atwilson): Remove this when we move the initial script loading into the worker process. - virtual bool isStarted() = 0; - - virtual void startWorkerContext(const WebURL& scriptURL, - const WebString& name, - const WebString& userAgent, - const WebString& sourceCode, - long long scriptResourceAppCacheID) = 0; - - class ConnectListener { - public: - // Invoked once the connect event has been sent so the caller can free this object. - virtual void connected() = 0; - }; - - // Sends a connect event to the SharedWorker context. The listener is invoked when this async operation completes. - virtual void connect(WebMessagePortChannel*, ConnectListener*) = 0; - - // Invoked to shutdown the worker when there are no more associated documents. - virtual void terminateWorkerContext() = 0; - - // Notification when the WebCommonWorkerClient is destroyed. - virtual void clientDestroyed() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSharedWorkerRepository.h b/WebKit/chromium/public/WebSharedWorkerRepository.h deleted file mode 100644 index 9fe6890..0000000 --- a/WebKit/chromium/public/WebSharedWorkerRepository.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSharedWorkerRepository_h -#define WebSharedWorkerRepository_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebString; -class WebSharedWorker; -class WebURL; - -class WebSharedWorkerRepository { -public: - // Unique identifier for the parent document of a worker (unique within a given process). - typedef unsigned long long DocumentID; - - // Tracks a newly-created SharedWorker via the repository. - virtual void addSharedWorker(WebSharedWorker*, DocumentID) = 0; - - // Invoked when a document has been detached. DocumentID can be re-used after documentDetached() is invoked. - virtual void documentDetached(DocumentID) = 0; - - // Returns true if the passed document is associated with any SharedWorkers. - virtual bool hasSharedWorkers(DocumentID) = 0; -}; - -} // namespace WebKit - -#endif // WebSharedWorkerRepository_h diff --git a/WebKit/chromium/public/WebSize.h b/WebKit/chromium/public/WebSize.h deleted file mode 100644 index a7159b2..0000000 --- a/WebKit/chromium/public/WebSize.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSize_h -#define WebSize_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include "IntSize.h" -#else -#include <gfx/size.h> -#endif - -namespace WebKit { - -struct WebSize { - int width; - int height; - - bool isEmpty() const { return width <= 0 || height <= 0; } - - WebSize() - : width(0) - , height(0) - { - } - - WebSize(int width, int height) - : width(width) - , height(height) - { - } - -#if WEBKIT_IMPLEMENTATION - WebSize(const WebCore::IntSize& s) - : width(s.width()) - , height(s.height()) - { - } - - WebSize& operator=(const WebCore::IntSize& s) - { - width = s.width(); - height = s.height(); - return *this; - } - - operator WebCore::IntSize() const - { - return WebCore::IntSize(width, height); - } -#else - WebSize(const gfx::Size& s) - : width(s.width()) - , height(s.height()) - { - } - - WebSize& operator=(const gfx::Size& s) - { - width = s.width(); - height = s.height(); - return *this; - } - - operator gfx::Size() const - { - return gfx::Size(width, height); - } -#endif -}; - -inline bool operator==(const WebSize& a, const WebSize& b) -{ - return a.width == b.width && a.height == b.height; -} - -inline bool operator!=(const WebSize& a, const WebSize& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSocketStreamError.h b/WebKit/chromium/public/WebSocketStreamError.h deleted file mode 100644 index f52869b..0000000 --- a/WebKit/chromium/public/WebSocketStreamError.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSocketStreamError_h -#define WebSocketStreamError_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebSocketStreamError { -public: - // FIXME: Define SocketStream Error codes and accessor methods. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSocketStreamHandle.h b/WebKit/chromium/public/WebSocketStreamHandle.h deleted file mode 100644 index ededa0e..0000000 --- a/WebKit/chromium/public/WebSocketStreamHandle.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSocketStreamHandle_h -#define WebSocketStreamHandle_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebData; -class WebSocketStreamHandleClient; -class WebURL; - -class WebSocketStreamHandle { -public: - virtual ~WebSocketStreamHandle() { } - - // Connect new socket stream asynchronously. - virtual void connect(const WebURL&, WebSocketStreamHandleClient*) = 0; - - // Send web socket frame data on the socket stream. - virtual bool send(const WebData&) = 0; - - // Close the socket stream. - virtual void close() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSocketStreamHandleClient.h b/WebKit/chromium/public/WebSocketStreamHandleClient.h deleted file mode 100644 index 82f328c..0000000 --- a/WebKit/chromium/public/WebSocketStreamHandleClient.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSocketStreamHandleClient_h -#define WebSocketStreamHandleClient_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebData; -class WebSocketStreamError; -class WebSocketStreamHandle; -class WebURL; - -class WebSocketStreamHandleClient { -public: - - // Called when Socket Stream is opened. - virtual void didOpenStream(WebSocketStreamHandle*, int /* maxPendingSendAllowed */) = 0; - - // Called when |amountSent| bytes are sent. - virtual void didSendData(WebSocketStreamHandle*, int /* amountSent */) = 0; - - // Called when data are received. - virtual void didReceiveData(WebSocketStreamHandle*, const WebData&) = 0; - - // Called when Socket Stream is closed. - virtual void didClose(WebSocketStreamHandle*) = 0; - - // Called when Socket Stream has an error. - virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&) = 0; - - // FIXME: auth challenge for proxy -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSpeechInputController.h b/WebKit/chromium/public/WebSpeechInputController.h deleted file mode 100644 index 6ed546f..0000000 --- a/WebKit/chromium/public/WebSpeechInputController.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSpeechInputController_h -#define WebSpeechInputController_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebString; -struct WebRect; -class WebString; - -// Provides an embedder API called by WebKit. -class WebSpeechInputController { -public: - // Starts speech recognition. Speech will get recorded until the endpointer detects silence, - // runs to the limit or stopRecording is called. Progress indications and the recognized - // text are returned via the listener interface. - virtual bool startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar) - { - WEBKIT_ASSERT_NOT_REACHED(); - return false; - } - - // Cancels an ongoing recognition and discards any audio recorded so far. No partial - // recognition results are returned to the listener. - virtual void cancelRecognition(int) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Stops audio recording and performs recognition with the audio recorded until now - // (does not discard audio). This is an optional call and is typically invoked if the user - // wants to stop recording audio as soon as they finished speaking. Otherwise, the speech - // recording 'endpointer' should detect silence in the input and stop recording automatically. - // Call startRecognition() to record audio and recognize speech again. - virtual void stopRecording(int) { WEBKIT_ASSERT_NOT_REACHED(); } - -protected: - virtual ~WebSpeechInputController() { } -}; - -} // namespace WebKit - -#endif // WebSpeechInputController_h diff --git a/WebKit/chromium/public/WebSpeechInputControllerMock.h b/WebKit/chromium/public/WebSpeechInputControllerMock.h deleted file mode 100644 index e440b89..0000000 --- a/WebKit/chromium/public/WebSpeechInputControllerMock.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSpeechInputControllerMock_h -#define WebSpeechInputControllerMock_h - -#include "WebSpeechInputController.h" - -namespace WebKit { - -class WebString; -class WebSpeechInputListener; - -class WebSpeechInputControllerMock : public WebSpeechInputController { -public: - WEBKIT_API static WebSpeechInputControllerMock* create( - WebSpeechInputListener* listener); - virtual ~WebSpeechInputControllerMock() { } - - virtual void addMockRecognitionResult(const WebString& result, double confidence, const WebString& language) = 0; - - virtual void clearResults() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebSpeechInputListener.h b/WebKit/chromium/public/WebSpeechInputListener.h deleted file mode 100644 index 091f984..0000000 --- a/WebKit/chromium/public/WebSpeechInputListener.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSpeechInputListener_h -#define WebSpeechInputListener_h - -#include "WebSpeechInputResult.h" - -namespace WebKit { - -class WebString; - -// Provides a WebKit API called by the embedder. -// A typical sequence of calls to the listener would be -// 1 call to didCompleteRecording -// 0 or more calls to setRecognitionResult -// 1 call to didCompleteRecognition -class WebSpeechInputListener { -public: - // Informs that audio recording has completed and recognition is underway. This gets invoked - // irrespective of whether recording was stopped automatically by the 'endpointer' or if - // WebSpeechInputController::stopRecording() was called. - // Typically after this call the listener would update the UI to reflect that recognition is - // in progress. - virtual void didCompleteRecording(int) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Gives results from speech recognition, either partial or the final results. - // This method can potentially get called multiple times if there are partial results - // available as the user keeps speaking. If the speech could not be recognized properly - // or if there was any other errors in the process, this method may never be called. - virtual void setRecognitionResult(int, const WebSpeechInputResultArray&) { WEBKIT_ASSERT_NOT_REACHED(); } - - // Informs that speech recognition has completed. This gets invoked irrespective of whether - // recognition was succesful or not, whether setRecognitionResult() was invoked or not. The - // handler typically frees up any temporary resources allocated and waits for the next speech - // recognition request. - virtual void didCompleteRecognition(int) { WEBKIT_ASSERT_NOT_REACHED(); } - -protected: - ~WebSpeechInputListener() { } -}; - -} // namespace WebKit - -#endif // WebSpeechInputListener_h diff --git a/WebKit/chromium/public/WebSpeechInputResult.h b/WebKit/chromium/public/WebSpeechInputResult.h deleted file mode 100644 index 8f1a8f5..0000000 --- a/WebKit/chromium/public/WebSpeechInputResult.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSpeechInputResult_h -#define WebSpeechInputResult_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" -#include "WebString.h" -#include "WebVector.h" - -namespace WebCore { -class SpeechInputResult; -} - -namespace WebKit { - -// This class holds one speech recognition result including the text and other related -// fields, as received from the embedder. -class WebSpeechInputResult { -public: - WebSpeechInputResult() { } - ~WebSpeechInputResult() { reset(); } - - WEBKIT_API void set(const WebString& utterance, double confidence); - WEBKIT_API void reset(); - -#if WEBKIT_IMPLEMENTATION - WebSpeechInputResult(const WTF::PassRefPtr<WebCore::SpeechInputResult>&); - operator WTF::PassRefPtr<WebCore::SpeechInputResult>() const; -#endif - -private: - WebPrivatePtr<WebCore::SpeechInputResult> m_private; -}; - -typedef WebVector<WebSpeechInputResult> WebSpeechInputResultArray; - -} // namespace WebKit - -#endif // WebSpeechInputResult_h diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h deleted file mode 100644 index 86f708c..0000000 --- a/WebKit/chromium/public/WebStorageArea.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageArea_h -#define WebStorageArea_h - -#include "WebCommon.h" -#include "WebString.h" - -namespace WebKit { - -class WebFrame; -class WebURL; - -// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This -// class wraps a StorageArea. All the methods have obvious connections to the spec: -// http://dev.w3.org/html5/webstorage/ -class WebStorageArea { -public: - virtual ~WebStorageArea() { } - - enum Result { - ResultOK = 0, - ResultBlockedByQuota, - ResultBlockedByPolicy - }; - - // The number of key/value pairs in the storage area. - virtual unsigned length() = 0; - - // Get a value for a specific key. Valid key indices are 0 through length() - 1. - // Indexes may change on any set/removeItem call. Will return null if the index - // provided is out of range. - virtual WebString key(unsigned index) = 0; - - // Get the value that corresponds to a specific key. This returns null if there is - // no entry for that key. - virtual WebString getItem(const WebString& key) = 0; - - // Set the value that corresponds to a specific key. Result will either be ResultOK - // or some particular error. The value is NOT set when there's an error. url is the - // url that should be used if a storage event fires. - virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue, WebFrame*) - { - setItem(key, newValue, url, result, oldValue); - } - // FIXME: Remove soon (once Chrome has rolled past this revision). - virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue) - { - setItem(key, newValue, url, result, oldValue, 0); - } - - // Remove the value associated with a particular key. url is the url that should be used - // if a storage event fires. - virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue) = 0; - - // Clear all key/value pairs. url is the url that should be used if a storage event fires. - virtual void clear(const WebURL& url, bool& somethingCleared) = 0; -}; - -} // namespace WebKit - -#endif // WebStorageArea_h diff --git a/WebKit/chromium/public/WebStorageEventDispatcher.h b/WebKit/chromium/public/WebStorageEventDispatcher.h deleted file mode 100644 index 37ceb7c..0000000 --- a/WebKit/chromium/public/WebStorageEventDispatcher.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageEventDispatcher_h -#define WebStorageEventDispatcher_h - -#include "WebString.h" - -namespace WebKit { - -class WebURL; - -// This is used to dispatch storage events to all pages. -// FIXME: Make this (or something) work for SessionStorage! -class WebStorageEventDispatcher { -public: - WEBKIT_API static WebStorageEventDispatcher* create(); - - virtual ~WebStorageEventDispatcher() { } - - // Dispatch the actual event. Doesn't yet work for SessionStorage. - virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL& url, bool isLocalStorage) = 0; -}; - -} // namespace WebKit - -#endif // WebStorageEventDispatcher_h diff --git a/WebKit/chromium/public/WebStorageNamespace.h b/WebKit/chromium/public/WebStorageNamespace.h deleted file mode 100644 index 51d4e0b..0000000 --- a/WebKit/chromium/public/WebStorageNamespace.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageNamespace_h -#define WebStorageNamespace_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebStorageArea; -class WebString; - -// WebStorageNamespace represents a collection of StorageAreas. Typically, you'll have -// multiple StorageNamespaces to represent the SessionStorage for each tab and a single -// StorageNamespace to represent LocalStorage for the entire browser. -class WebStorageNamespace { -public: - // Create a new WebStorageNamespace. LocalStorageNamespaces require a path to specify - // where the SQLite databases that make LocalStorage data persistent are located. - // If path is empty, data will not persist. You should call delete on the returned - // object when you're finished. - WEBKIT_API static WebStorageNamespace* createLocalStorageNamespace(const WebString& backingDirectoryPath, unsigned quota); - WEBKIT_API static WebStorageNamespace* createSessionStorageNamespace(unsigned quota); - - // The quota for each storage area. Suggested by the spec. - static const unsigned m_localStorageQuota = 5 * 1024 * 1024; - - // Since SessionStorage memory is allocated in the browser process, we place a - // per-origin quota on it. Like LocalStorage there are known attacks against - // this, so it's more of a sanity check than a real security measure. - static const unsigned m_sessionStorageQuota = 5 * 1024 * 1024; - - static const unsigned noQuota = UINT_MAX; - - virtual ~WebStorageNamespace() { } - - // Create a new WebStorageArea object. Two subsequent calls with the same origin - // will return two different WebStorageArea objects that share the same backing store. - // You should call delete on the returned object when you're finished. - virtual WebStorageArea* createStorageArea(const WebString& origin) = 0; - - // Copy a StorageNamespace. This only makes sense in the case of SessionStorage. - virtual WebStorageNamespace* copy() = 0; - - // Shutdown the StorageNamespace. Write all StorageArea's to disk and disallow new - // write activity. - virtual void close() = 0; -}; - -} // namespace WebKit - -#endif // WebStorageNamespace_h diff --git a/WebKit/chromium/public/WebString.h b/WebKit/chromium/public/WebString.h deleted file mode 100644 index 4d5e502..0000000 --- a/WebKit/chromium/public/WebString.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebString_h -#define WebString_h - -#include "WebCommon.h" - -#if WEBKIT_IMPLEMENTATION -#include <wtf/Forward.h> -#else -#include <base/nullable_string16.h> -#include <base/string16.h> -#endif - -namespace WebKit { - -class WebCString; -class WebStringPrivate; - -// A UTF-16 string container. It is inexpensive to copy a WebString -// object. -// -// WARNING: It is not safe to pass a WebString across threads!!! -// -class WebString { -public: - ~WebString() { reset(); } - - WebString() : m_private(0) { } - - WebString(const WebUChar* data, size_t len) : m_private(0) - { - assign(data, len); - } - - WebString(const WebString& s) : m_private(0) { assign(s); } - - WebString& operator=(const WebString& s) - { - assign(s); - return *this; - } - - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebString&); - WEBKIT_API void assign(const WebUChar* data, size_t len); - - WEBKIT_API bool equals(const WebString& s) const; - - WEBKIT_API size_t length() const; - WEBKIT_API const WebUChar* data() const; - - bool isEmpty() const { return !length(); } - bool isNull() const { return !m_private; } - - WEBKIT_API WebCString utf8() const; - - WEBKIT_API static WebString fromUTF8(const char* data, size_t length); - WEBKIT_API static WebString fromUTF8(const char* data); - - template <int N> WebString(const char (&data)[N]) - : m_private(0) - { - assign(fromUTF8(data, N - 1)); - } - - template <int N> WebString& operator=(const char (&data)[N]) - { - assign(fromUTF8(data, N - 1)); - return *this; - } - -#if WEBKIT_IMPLEMENTATION - WebString(const WTF::String&); - WebString& operator=(const WTF::String&); - operator WTF::String() const; - - WebString(const WTF::AtomicString&); - WebString& operator=(const WTF::AtomicString&); - operator WTF::AtomicString() const; -#else - - WebString(const string16& s) : m_private(0) - { - assign(s.data(), s.length()); - } - - WebString& operator=(const string16& s) - { - assign(s.data(), s.length()); - return *this; - } - - operator string16() const - { - size_t len = length(); - return len ? string16(data(), len) : string16(); - } - - WebString(const NullableString16& s) : m_private(0) - { - if (s.is_null()) - reset(); - else - assign(s.string().data(), s.string().length()); - } - - WebString& operator=(const NullableString16& s) - { - if (s.is_null()) - reset(); - else - assign(s.string().data(), s.string().length()); - return *this; - } - - operator NullableString16() const - { - if (!m_private) - return NullableString16(string16(), true); - size_t len = length(); - return NullableString16(len ? string16(data(), len) : string16(), false); - } - - template <class UTF8String> - static WebString fromUTF8(const UTF8String& s) - { - return fromUTF8(s.data(), s.length()); - } -#endif - -private: - void assign(WebStringPrivate*); - WebStringPrivate* m_private; -}; - -inline bool operator==(const WebString& a, const WebString& b) -{ - return a.equals(b); -} - -inline bool operator!=(const WebString& a, const WebString& b) -{ - return !(a == b); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTextAffinity.h b/WebKit/chromium/public/WebTextAffinity.h deleted file mode 100644 index 1224f61..0000000 --- a/WebKit/chromium/public/WebTextAffinity.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTextAffinity_h -#define WebTextAffinity_h - -namespace WebKit { - -// These constants specify the preferred direction of selection. -enum WebTextAffinity { - WebTextAffinityUpstream, // The selection is moving toward the top of the document. - WebTextAffinityDownstream, // The selection is moving toward the bottom of the document. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTextCaseSensitivity.h b/WebKit/chromium/public/WebTextCaseSensitivity.h deleted file mode 100644 index ae5860c..0000000 --- a/WebKit/chromium/public/WebTextCaseSensitivity.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTextCaseSensitivity_h -#define WebTextCaseSensitivity_h - -namespace WebKit { - -// These constants specify the preferred case sensitivity. -enum WebTextCaseSensitivity { - WebTextCaseSensitive, // String matching is case-sensitive. - WebTextCaseInsensitive, // String matching is case-insensitive. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTextDirection.h b/WebKit/chromium/public/WebTextDirection.h deleted file mode 100644 index 3d51296..0000000 --- a/WebKit/chromium/public/WebTextDirection.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTextDirection_h -#define WebTextDirection_h - -namespace WebKit { - -// Represents text directions (or writing directions) of a DOM node. -enum WebTextDirection { - WebTextDirectionDefault, // Natural writing direction ("inherit") - WebTextDirectionLeftToRight, - WebTextDirectionRightToLeft, -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTextInputType.h b/WebKit/chromium/public/WebTextInputType.h deleted file mode 100644 index 2592f6f..0000000 --- a/WebKit/chromium/public/WebTextInputType.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTextInputType_h -#define WebTextInputType_h - -namespace WebKit { - -enum WebTextInputType { - // Input caret is not in an editable node, no input method shall be used. - WebTextInputTypeNone, - - // Input caret is in a normal editable node, any input method can be used. - WebTextInputTypeText, - - // Input caret is in a password box, an input method may be used only if - // it's suitable for password input. - WebTextInputTypePassword, - - // FIXME: Add more text input types when necessary, eg. Number, - // Date, Email, URL, etc. -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTextRun.h b/WebKit/chromium/public/WebTextRun.h deleted file mode 100644 index cb1373a..0000000 --- a/WebKit/chromium/public/WebTextRun.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTextRun_h -#define WebTextRun_h - -#include "WebString.h" - -#ifdef WEBKIT_IMPLEMENTATION -namespace WebCore { class TextRun; } -#endif - -namespace WebKit { - -struct WebTextRun { - WebTextRun(const WebString& t, bool isRTL, bool hasDirectionalOverride) - : text(t) - , rtl(isRTL) - , directionalOverride(hasDirectionalOverride) - { - } - WebTextRun() - : rtl(false) - , directionalOverride(false) - { - } - - WebString text; - bool rtl; - bool directionalOverride; - -#ifdef WEBKIT_IMPLEMENTATION - // The resulting WebCore::TextRun will refer to the text in this - // struct, so "this" must outlive the WebCore text run. - operator WebCore::TextRun() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebThreadSafeData.h b/WebKit/chromium/public/WebThreadSafeData.h deleted file mode 100755 index a000b39..0000000 --- a/WebKit/chromium/public/WebThreadSafeData.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebThreadSafeData_h -#define WebThreadSafeData_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -#if !WEBKIT_IMPLEMENTATION -#include <string> -#endif - -namespace WebCore { class RawData; } - -namespace WebKit { - -// A container for raw bytes. It is inexpensive to copy a WebThreadSafeData object. -// It is safe to pass a WebThreadSafeData across threads!!! -class WebThreadSafeData { -public: - WebThreadSafeData() { } - ~WebThreadSafeData() { reset(); } - - WEBKIT_API void assign(const WebThreadSafeData&); - WEBKIT_API void reset(); - - WEBKIT_API size_t size() const; - WEBKIT_API const char* data() const; - - bool isEmpty() const { return !size(); } - -#if WEBKIT_IMPLEMENTATION - WebThreadSafeData(const WTF::PassRefPtr<WebCore::RawData>&); - WebThreadSafeData& operator=(const WTF::PassRefPtr<WebCore::RawData>&); -#else - operator std::string() const - { - size_t len = size(); - return len ? std::string(data(), len) : std::string(); - } -#endif - -private: - WebPrivatePtr<WebCore::RawData> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebTouchPoint.h b/WebKit/chromium/public/WebTouchPoint.h deleted file mode 100644 index ddfa26f..0000000 --- a/WebKit/chromium/public/WebTouchPoint.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebTouchPoint_h -#define WebTouchPoint_h - -#include "WebCommon.h" -#include "WebPoint.h" - -namespace WebKit { - -class WebTouchPoint { -public: - WebTouchPoint() - : id(0) - , state(StateUndefined) { } - - enum State { - StateUndefined, - StateReleased, - StatePressed, - StateMoved, - StateStationary, - StateCancelled, - }; - - int id; - State state; - WebPoint screenPosition; - WebPoint position; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURL.h b/WebKit/chromium/public/WebURL.h deleted file mode 100644 index bb90e32..0000000 --- a/WebKit/chromium/public/WebURL.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURL_h -#define WebURL_h - -#include "WebCString.h" -#include <googleurl/src/url_parse.h> - -#if WEBKIT_IMPLEMENTATION -namespace WebCore { class KURL; } -#else -#include <googleurl/src/gurl.h> -#endif - -namespace WebKit { - -class WebURL { -public: - ~WebURL() - { - } - - WebURL() : m_isValid(false) - { - } - - WebURL(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid) - : m_spec(spec) - , m_parsed(parsed) - , m_isValid(isValid) - { - } - - WebURL(const WebURL& s) - : m_spec(s.m_spec) - , m_parsed(s.m_parsed) - , m_isValid(s.m_isValid) - { - } - - WebURL& operator=(const WebURL& s) - { - m_spec = s.m_spec; - m_parsed = s.m_parsed; - m_isValid = s.m_isValid; - return *this; - } - - void assign(const WebCString& spec, const url_parse::Parsed& parsed, bool isValid) - { - m_spec = spec; - m_parsed = parsed; - m_isValid = isValid; - } - - const WebCString& spec() const - { - return m_spec; - } - - const url_parse::Parsed& parsed() const - { - return m_parsed; - } - - bool isValid() const - { - return m_isValid; - } - - bool isEmpty() const - { - return m_spec.isEmpty(); - } - - bool isNull() const - { - return m_spec.isEmpty(); - } - -#if WEBKIT_IMPLEMENTATION - WebURL(const WebCore::KURL&); - WebURL& operator=(const WebCore::KURL&); - operator WebCore::KURL() const; -#else - WebURL(const GURL& g) - : m_spec(g.possibly_invalid_spec()) - , m_parsed(g.parsed_for_possibly_invalid_spec()) - , m_isValid(g.is_valid()) - { - } - - WebURL& operator=(const GURL& g) - { - m_spec = g.possibly_invalid_spec(); - m_parsed = g.parsed_for_possibly_invalid_spec(); - m_isValid = g.is_valid(); - return *this; - } - - operator GURL() const - { - return isNull() ? GURL() : GURL(m_spec.data(), m_spec.length(), m_parsed, m_isValid); - } -#endif - -private: - WebCString m_spec; // UTF-8 encoded - url_parse::Parsed m_parsed; - bool m_isValid; -}; - -inline bool operator<(const WebURL& a, const WebURL& b) -{ - return a.spec() < b.spec(); -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLError.h b/WebKit/chromium/public/WebURLError.h deleted file mode 100644 index de88e3e..0000000 --- a/WebKit/chromium/public/WebURLError.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLError_h -#define WebURLError_h - -#include "WebString.h" -#include "WebURL.h" - -#if defined(WEBKIT_IMPLEMENTATION) -namespace WebCore { class ResourceError; } -#endif - -namespace WebKit { - -struct WebURLError { - // A namespace for "reason" to support various layers generating - // resource errors. WebKit does not care about the value of this - // string as it will just be passed via callbacks to the consumer. - WebString domain; - - // A numeric error code detailing the reason for this error. A value - // of 0 means no error. WebKit does not interpret the meaning of other - // values and normally just forwards this error information back to the - // embedder (see for example WebFrameClient). - int reason; - - // The url that failed to load. - WebURL unreachableURL; - - WebURLError() : reason(0) { } - -#if defined(WEBKIT_IMPLEMENTATION) - WebURLError(const WebCore::ResourceError&); - WebURLError& operator=(const WebCore::ResourceError&); - operator WebCore::ResourceError() const; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLLoadTiming.h b/WebKit/chromium/public/WebURLLoadTiming.h deleted file mode 100644 index 9412d14..0000000 --- a/WebKit/chromium/public/WebURLLoadTiming.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLLoadTiming_h -#define WebURLLoadTiming_h - -#include "WebCommon.h" -#include "WebPrivatePtr.h" - -namespace WebCore { class ResourceLoadTiming; } - -namespace WebKit { -class WebString; - -class WebURLLoadTiming { -public: - ~WebURLLoadTiming() { reset(); } - - WebURLLoadTiming() { } - WebURLLoadTiming(const WebURLLoadTiming& d) { assign(d); } - WebURLLoadTiming& operator=(const WebURLLoadTiming& d) - { - assign(d); - return *this; - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebURLLoadTiming&); - - bool isNull() const { return m_private.isNull(); } - - WEBKIT_API double requestTime() const; - WEBKIT_API void setRequestTime(double time); - - WEBKIT_API int proxyStart() const; - WEBKIT_API void setProxyStart(int start); - - WEBKIT_API int proxyEnd() const; - WEBKIT_API void setProxyEnd(int end); - - WEBKIT_API int dnsStart() const; - WEBKIT_API void setDNSStart(int start); - - WEBKIT_API int dnsEnd() const; - WEBKIT_API void setDNSEnd(int end); - - WEBKIT_API int connectStart() const; - WEBKIT_API void setConnectStart(int start); - - WEBKIT_API int connectEnd() const; - WEBKIT_API void setConnectEnd(int end); - - WEBKIT_API int sendStart() const; - WEBKIT_API void setSendStart(int start); - - WEBKIT_API int sendEnd() const; - WEBKIT_API void setSendEnd(int end); - - WEBKIT_API int receiveHeadersEnd() const; - WEBKIT_API void setReceiveHeadersEnd(int end); - - WEBKIT_API int sslStart() const; - WEBKIT_API void setSSLStart(int start); - - WEBKIT_API int sslEnd() const; - WEBKIT_API void setSSLEnd(int end); - -#if WEBKIT_IMPLEMENTATION - WebURLLoadTiming(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&); - WebURLLoadTiming& operator=(const WTF::PassRefPtr<WebCore::ResourceLoadTiming>&); - operator WTF::PassRefPtr<WebCore::ResourceLoadTiming>() const; -#endif - -private: - WebPrivatePtr<WebCore::ResourceLoadTiming> m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLLoader.h b/WebKit/chromium/public/WebURLLoader.h deleted file mode 100644 index 54d105e..0000000 --- a/WebKit/chromium/public/WebURLLoader.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLLoader_h -#define WebURLLoader_h - -#include "WebCommon.h" - -namespace WebKit { - -class WebData; -class WebURLLoaderClient; -class WebURLRequest; -class WebURLResponse; -struct WebURLError; - -class WebURLLoader { -public: - // The WebURLLoader may be deleted in a call to its client. - virtual ~WebURLLoader() {} - - // Load the request synchronously, returning results directly to the - // caller upon completion. There is no mechanism to interrupt a - // synchronous load!! - virtual void loadSynchronously(const WebURLRequest&, - WebURLResponse&, WebURLError&, WebData& data) = 0; - - // Load the request asynchronously, sending notifications to the given - // client. The client will receive no further notifications if the - // loader is disposed before it completes its work. - virtual void loadAsynchronously(const WebURLRequest&, - WebURLLoaderClient*) = 0; - - // Cancels an asynchronous load. This will appear as a load error to - // the client. - virtual void cancel() = 0; - - // Suspends/resumes an asynchronous load. - virtual void setDefersLoading(bool) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLLoaderClient.h b/WebKit/chromium/public/WebURLLoaderClient.h deleted file mode 100644 index 87d100f..0000000 --- a/WebKit/chromium/public/WebURLLoaderClient.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLLoaderClient_h -#define WebURLLoaderClient_h - -namespace WebKit { - -class WebURLLoader; -class WebURLRequest; -class WebURLResponse; -struct WebURLError; - -class WebURLLoaderClient { -public: - // Called when following a redirect. |newRequest| contains the request - // generated by the redirect. The client may modify |newRequest|. - virtual void willSendRequest( - WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) { } - - // Called to report upload progress. The bytes reported correspond to - // the HTTP message body. - virtual void didSendData( - WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) { } - - // Called when response headers are received. - virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&) { } - - // Called when a chunk of response data is downloaded. This is only called - // if WebURLRequest's downloadToFile flag was set to true. - virtual void didDownloadData(WebURLLoader*, int dataLength) { } - - // Called when a chunk of response data is received. - virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength) { } - - // Called when a chunk of renderer-generated metadata is received from the cache. - virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) { } - - // Called when the load completes successfully. - virtual void didFinishLoading(WebURLLoader*, double finishTime) { } - - // Called when the load completes with an error. - virtual void didFail(WebURLLoader*, const WebURLError&) { } - -protected: - ~WebURLLoaderClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h deleted file mode 100644 index 7dd97ca..0000000 --- a/WebKit/chromium/public/WebURLRequest.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLRequest_h -#define WebURLRequest_h - -#include "WebCommon.h" -#include "WebHTTPBody.h" - -#if defined(WEBKIT_IMPLEMENTATION) -namespace WebCore { class ResourceRequest; } -#endif - -namespace WebKit { - -class WebCString; -class WebHTTPBody; -class WebHTTPHeaderVisitor; -class WebString; -class WebURL; -class WebURLRequestPrivate; - -class WebURLRequest { -public: - enum CachePolicy { - UseProtocolCachePolicy, // normal load - ReloadIgnoringCacheData, // reload - ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data - ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache - }; - - enum TargetType { - TargetIsMainFrame = 0, - TargetIsSubframe = 1, - TargetIsSubresource = 2, - TargetIsStyleSheet = 3, - TargetIsScript = 4, - TargetIsFontResource = 5, - TargetIsImage = 6, - TargetIsObject = 7, - TargetIsMedia = 8, - TargetIsWorker = 9, - TargetIsSharedWorker = 10, - TargetIsPrefetch = 11, - }; - - ~WebURLRequest() { reset(); } - - WebURLRequest() : m_private(0) { } - WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); } - WebURLRequest& operator=(const WebURLRequest& r) - { - assign(r); - return *this; - } - - explicit WebURLRequest(const WebURL& url) : m_private(0) - { - initialize(); - setURL(url); - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebURLRequest&); - - WEBKIT_API bool isNull() const; - - WEBKIT_API WebURL url() const; - WEBKIT_API void setURL(const WebURL&); - - // Used to implement third-party cookie blocking. - WEBKIT_API WebURL firstPartyForCookies() const; - WEBKIT_API void setFirstPartyForCookies(const WebURL&); - - WEBKIT_API bool allowCookies() const; - WEBKIT_API void setAllowCookies(bool allowCookies); - - // Controls whether user name, password, and cookies may be sent with the - // request. (If false, this overrides allowCookies.) - WEBKIT_API bool allowStoredCredentials() const; - WEBKIT_API void setAllowStoredCredentials(bool allowStoredCredentials); - - WEBKIT_API CachePolicy cachePolicy() const; - WEBKIT_API void setCachePolicy(CachePolicy); - - WEBKIT_API WebString httpMethod() const; - WEBKIT_API void setHTTPMethod(const WebString&); - - WEBKIT_API WebString httpHeaderField(const WebString& name) const; - WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value); - WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value); - WEBKIT_API void clearHTTPHeaderField(const WebString& name); - WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; - - WEBKIT_API WebHTTPBody httpBody() const; - WEBKIT_API void setHTTPBody(const WebHTTPBody&); - - // Controls whether upload progress events are generated when a request - // has a body. - WEBKIT_API bool reportUploadProgress() const; - WEBKIT_API void setReportUploadProgress(bool); - - // Controls whether load timing info is collected for the request. - WEBKIT_API bool reportLoadTiming() const; - WEBKIT_API void setReportLoadTiming(bool); - - // Controls whether actual headers sent and received for request are - // collected and reported. - WEBKIT_API bool reportRawHeaders() const; - WEBKIT_API void setReportRawHeaders(bool); - - WEBKIT_API TargetType targetType() const; - WEBKIT_API void setTargetType(TargetType); - - // True if the request was user initiated. - WEBKIT_API bool hasUserGesture() const; - WEBKIT_API void setHasUserGesture(bool); - - // A consumer controlled value intended to be used to identify the - // requestor. - WEBKIT_API int requestorID() const; - WEBKIT_API void setRequestorID(int); - - // A consumer controlled value intended to be used to identify the - // process of the requestor. - WEBKIT_API int requestorProcessID() const; - WEBKIT_API void setRequestorProcessID(int); - - // Allows the request to be matched up with its app cache host. - WEBKIT_API int appCacheHostID() const; - WEBKIT_API void setAppCacheHostID(int id); - - // If true, the response body will be downloaded to a file managed by the - // WebURLLoader. See WebURLResponse::downloadedFilePath. - WEBKIT_API bool downloadToFile() const; - WEBKIT_API void setDownloadToFile(bool); - -#if defined(WEBKIT_IMPLEMENTATION) - WebCore::ResourceRequest& toMutableResourceRequest(); - const WebCore::ResourceRequest& toResourceRequest() const; -#endif - -protected: - void assign(WebURLRequestPrivate*); - -private: - WebURLRequestPrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h deleted file mode 100644 index c50f88e..0000000 --- a/WebKit/chromium/public/WebURLResponse.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLResponse_h -#define WebURLResponse_h - -#include "WebCommon.h" -#include "WebPrivateOwnPtr.h" - -#if defined(WEBKIT_IMPLEMENTATION) -namespace WebCore { class ResourceResponse; } -#endif - -namespace WebKit { - -class WebCString; -class WebHTTPHeaderVisitor; -class WebHTTPLoadInfo; -class WebString; -class WebURL; -class WebURLLoadTiming; -class WebURLResponsePrivate; - -class WebURLResponse { -public: - ~WebURLResponse() { reset(); } - - WebURLResponse() : m_private(0) { } - WebURLResponse(const WebURLResponse& r) : m_private(0) { assign(r); } - WebURLResponse& operator=(const WebURLResponse& r) - { - assign(r); - return *this; - } - - explicit WebURLResponse(const WebURL& url) : m_private(0) - { - initialize(); - setURL(url); - } - - WEBKIT_API void initialize(); - WEBKIT_API void reset(); - WEBKIT_API void assign(const WebURLResponse&); - - WEBKIT_API bool isNull() const; - - WEBKIT_API WebURL url() const; - WEBKIT_API void setURL(const WebURL&); - - WEBKIT_API unsigned connectionID() const; - WEBKIT_API void setConnectionID(unsigned); - - WEBKIT_API bool connectionReused() const; - WEBKIT_API void setConnectionReused(bool); - - WEBKIT_API WebURLLoadTiming loadTiming(); - WEBKIT_API void setLoadTiming(const WebURLLoadTiming&); - - WEBKIT_API WebHTTPLoadInfo httpLoadInfo(); - WEBKIT_API void setHTTPLoadInfo(const WebHTTPLoadInfo&); - - WEBKIT_API double responseTime() const; - WEBKIT_API void setResponseTime(double); - - WEBKIT_API WebString mimeType() const; - WEBKIT_API void setMIMEType(const WebString&); - - WEBKIT_API long long expectedContentLength() const; - WEBKIT_API void setExpectedContentLength(long long); - - WEBKIT_API WebString textEncodingName() const; - WEBKIT_API void setTextEncodingName(const WebString&); - - WEBKIT_API WebString suggestedFileName() const; - WEBKIT_API void setSuggestedFileName(const WebString&); - - WEBKIT_API int httpStatusCode() const; - WEBKIT_API void setHTTPStatusCode(int); - - WEBKIT_API WebString httpStatusText() const; - WEBKIT_API void setHTTPStatusText(const WebString&); - - WEBKIT_API WebString httpHeaderField(const WebString& name) const; - WEBKIT_API void setHTTPHeaderField(const WebString& name, const WebString& value); - WEBKIT_API void addHTTPHeaderField(const WebString& name, const WebString& value); - WEBKIT_API void clearHTTPHeaderField(const WebString& name); - WEBKIT_API void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; - - WEBKIT_API double lastModifiedDate() const; - WEBKIT_API void setLastModifiedDate(double); - - WEBKIT_API bool isContentFiltered() const; - WEBKIT_API void setIsContentFiltered(bool); - - WEBKIT_API long long appCacheID() const; - WEBKIT_API void setAppCacheID(long long); - - WEBKIT_API WebURL appCacheManifestURL() const; - WEBKIT_API void setAppCacheManifestURL(const WebURL&); - - // A consumer controlled value intended to be used to record opaque - // security info related to this request. - WEBKIT_API WebCString securityInfo() const; - WEBKIT_API void setSecurityInfo(const WebCString&); - -#if defined(WEBKIT_IMPLEMENTATION) - WebCore::ResourceResponse& toMutableResourceResponse(); - const WebCore::ResourceResponse& toResourceResponse() const; -#endif - - // Flag whether this request was served from the disk cache entry. - WEBKIT_API bool wasCached() const; - WEBKIT_API void setWasCached(bool); - - // Flag whether this request was loaded via the SPDY protocol or not. - // SPDY is an experimental web protocol, see http://dev.chromium.org/spdy - WEBKIT_API bool wasFetchedViaSPDY() const; - WEBKIT_API void setWasFetchedViaSPDY(bool); - - // Flag whether this request was loaded after the TLS/Next-Protocol-Negotiation was used. - // This is related to SPDY. - WEBKIT_API bool wasNpnNegotiated() const; - WEBKIT_API void setWasNpnNegotiated(bool); - - // Flag whether this request was made when "Alternate-Protocol: xxx" - // is present in server's response. - WEBKIT_API bool wasAlternateProtocolAvailable() const; - WEBKIT_API void setWasAlternateProtocolAvailable(bool); - - // Flag whether this request was loaded via an explicit proxy (HTTP, SOCKS, etc). - WEBKIT_API bool wasFetchedViaProxy() const; - WEBKIT_API void setWasFetchedViaProxy(bool); - - // Flag whether this request is part of a multipart response. - WEBKIT_API bool isMultipartPayload() const; - WEBKIT_API void setIsMultipartPayload(bool); - - // This indicates the location of a downloaded response if the - // WebURLRequest had the downloadToFile flag set to true. This file path - // remains valid for the lifetime of the WebURLLoader used to create it. - WEBKIT_API WebString downloadFilePath() const; - WEBKIT_API void setDownloadFilePath(const WebString&); - -protected: - void assign(WebURLResponsePrivate*); - -private: - WebURLResponsePrivate* m_private; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebVector.h b/WebKit/chromium/public/WebVector.h deleted file mode 100644 index cf3ec95..0000000 --- a/WebKit/chromium/public/WebVector.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebVector_h -#define WebVector_h - -#include "WebCommon.h" - -#include <algorithm> - -namespace WebKit { - -// A simple vector class. -// -// Sample usage: -// -// void Foo(WebVector<int>& result) -// { -// WebVector<int> data(10); -// for (size_t i = 0; i < data.size(); ++i) -// data[i] = ... -// result.swap(data); -// } -// -// It is also possible to assign from other types of random access -// containers: -// -// void Foo(const std::vector<std::string>& input) -// { -// WebVector<WebCString> cstrings = input; -// ... -// } -// -template <typename T> -class WebVector { -public: - typedef T ValueType; - - ~WebVector() - { - destroy(); - } - - explicit WebVector(size_t size = 0) - { - initialize(size); - } - - WebVector(const WebVector<T>& other) - { - initializeFrom(other.m_ptr, other.m_size); - } - - template <typename C> - WebVector(const C& other) - { - initializeFrom(other.size() ? &other[0] : 0, other.size()); - } - - WebVector& operator=(const WebVector& other) - { - if (this != &other) - assign(other); - return *this; - } - - template <typename C> - WebVector<T>& operator=(const C& other) - { - if (this != reinterpret_cast<const WebVector<T>*>(&other)) - assign(other); - return *this; - } - - template <typename C> - void assign(const C& other) - { - assign(other.size() ? &other[0] : 0, other.size()); - } - - template <typename U> - void assign(const U* values, size_t size) - { - destroy(); - initializeFrom(values, size); - } - - size_t size() const { return m_size; } - bool isEmpty() const { return !m_size; } - - T& operator[](size_t i) - { - WEBKIT_ASSERT(i < m_size); - return m_ptr[i]; - } - const T& operator[](size_t i) const - { - WEBKIT_ASSERT(i < m_size); - return m_ptr[i]; - } - - T* data() { return m_ptr; } - const T* data() const { return m_ptr; } - - void swap(WebVector<T>& other) - { - std::swap(m_ptr, other.m_ptr); - std::swap(m_size, other.m_size); - } - -private: - void initialize(size_t size) - { - m_size = size; - if (!m_size) - m_ptr = 0; - else { - m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size)); - for (size_t i = 0; i < m_size; ++i) - new (&m_ptr[i]) T(); - } - } - - template <typename U> - void initializeFrom(const U* values, size_t size) - { - m_size = size; - if (!m_size) - m_ptr = 0; - else { - m_ptr = static_cast<T*>(::operator new(sizeof(T) * m_size)); - for (size_t i = 0; i < m_size; ++i) - new (&m_ptr[i]) T(values[i]); - } - } - - void destroy() - { - for (size_t i = 0; i < m_size; ++i) - m_ptr[i].~T(); - ::operator delete(m_ptr); - } - - T* m_ptr; - size_t m_size; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebVideoFrame.h b/WebKit/chromium/public/WebVideoFrame.h deleted file mode 100644 index 58f1111..0000000 --- a/WebKit/chromium/public/WebVideoFrame.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebVideoFrame_h -#define WebVideoFrame_h - -namespace WebKit { - -// A proxy video frame interface to communicate frame data between chromium -// and WebKit. -class WebVideoFrame { -public: - enum Format { - FormatInvalid, - FormatRGB555, - FormatRGB565, - FormatRGB24, - FormatRGB32, - FormatRGBA, - FormatYV12, - FormatYV16, - FormatNV12, - FormatEmpty, - FormatASCII, - }; - - enum SurfaceType { - SurfaceTypeSystemMemory, - SurfaceTypeTexture, - }; - - virtual SurfaceType surfaceType() const = 0; - virtual Format format() const = 0; - virtual unsigned width() const = 0; - virtual unsigned height() const = 0; - virtual unsigned planes() const = 0; - virtual int stride(unsigned plane) const = 0; - virtual const void* data(unsigned plane) const = 0; - virtual unsigned texture(unsigned plane) const = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h deleted file mode 100644 index a18a64e..0000000 --- a/WebKit/chromium/public/WebView.h +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebView_h -#define WebView_h - -#include "WebDragOperation.h" -#include "WebString.h" -#include "WebVector.h" -#include "WebWidget.h" - -namespace WebKit { - -class WebAccessibilityObject; -class WebDevToolsAgent; -class WebDevToolsAgentClient; -class WebDragData; -class WebFrame; -class WebFrameClient; -class WebGraphicsContext3D; -class WebNode; -class WebSettings; -class WebString; -class WebViewClient; -struct WebMediaPlayerAction; -struct WebPoint; - -class WebView : public WebWidget { -public: - WEBKIT_API static const double textSizeMultiplierRatio; - WEBKIT_API static const double minTextSizeMultiplier; - WEBKIT_API static const double maxTextSizeMultiplier; - - // Controls the time that user scripts injected into the document run. - enum UserScriptInjectAt { - UserScriptInjectAtDocumentStart, - UserScriptInjectAtDocumentEnd - }; - - // Controls which frames user content is injected into. - enum UserContentInjectIn { - UserContentInjectInAllFrames, - UserContentInjectInTopFrameOnly - }; - - // Controls which documents user styles are injected into. - enum UserStyleInjectionTime { - UserStyleInjectInExistingDocuments, - UserStyleInjectInSubsequentDocuments - }; - - - // Initialization ------------------------------------------------------ - - // Creates a WebView that is NOT yet initialized. You will need to - // call initializeMainFrame to finish the initialization. It is valid - // to pass null WebViewClient and WebDevToolsAgentClient pointers. - WEBKIT_API static WebView* create(WebViewClient*, WebDevToolsAgentClient*); - - // After creating a WebView, you should immediately call this method. - // You can optionally modify the settings before calling this method. - // The WebFrameClient will receive events for the main frame and any - // child frames. It is valid to pass a null WebFrameClient pointer. - virtual void initializeMainFrame(WebFrameClient*) = 0; - - - // Options ------------------------------------------------------------- - - // The returned pointer is valid for the lifetime of the WebView. - virtual WebSettings* settings() = 0; - - // Corresponds to the encoding of the main frame. Setting the page - // encoding may cause the main frame to reload. - virtual WebString pageEncoding() const = 0; - virtual void setPageEncoding(const WebString&) = 0; - - // Makes the WebView transparent. This is useful if you want to have - // some custom background rendered behind it. - virtual bool isTransparent() const = 0; - virtual void setIsTransparent(bool) = 0; - - // Controls whether pressing Tab key advances focus to links. - virtual bool tabsToLinks() const = 0; - virtual void setTabsToLinks(bool) = 0; - - // Method that controls whether pressing Tab key cycles through page - // elements or inserts a '\t' char in the focused text area. - virtual bool tabKeyCyclesThroughElements() const = 0; - virtual void setTabKeyCyclesThroughElements(bool) = 0; - - // Controls the WebView's active state, which may affect the rendering - // of elements on the page (i.e., tinting of input elements). - virtual bool isActive() const = 0; - virtual void setIsActive(bool) = 0; - - // Allows disabling domain relaxation. - virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) = 0; - - - // Closing ------------------------------------------------------------- - - // Runs beforeunload handlers for the current page, returning false if - // any handler suppressed unloading. - virtual bool dispatchBeforeUnloadEvent() = 0; - - // Runs unload handlers for the current page. - virtual void dispatchUnloadEvent() = 0; - - - // Frames -------------------------------------------------------------- - - virtual WebFrame* mainFrame() = 0; - - // Returns the frame identified by the given name. This method - // supports pseudo-names like _self, _top, and _blank. It traverses - // the entire frame tree containing this tree looking for a frame that - // matches the given name. If the optional relativeToFrame parameter - // is specified, then the search begins with the given frame and its - // children. - virtual WebFrame* findFrameByName( - const WebString& name, WebFrame* relativeToFrame = 0) = 0; - - - // Focus --------------------------------------------------------------- - - virtual WebFrame* focusedFrame() = 0; - virtual void setFocusedFrame(WebFrame*) = 0; - - // Focus the first (last if reverse is true) focusable node. - virtual void setInitialFocus(bool reverse) = 0; - - // Clears the focused node (and selection if a text field is focused) - // to ensure that a text field on the page is not eating keystrokes we - // send it. - virtual void clearFocusedNode() = 0; - - // Scrolls the node currently in focus into view. - virtual void scrollFocusedNodeIntoView() = 0; - - - // Zoom ---------------------------------------------------------------- - - // Returns the current zoom level. 0 is "original size", and each increment - // above or below represents zooming 20% larger or smaller to default limits - // of 300% and 50% of original size, respectively. Only plugins use - // non whole-numbers, since they might choose to have specific zoom level so - // that fixed-width content is fit-to-page-width, for example. - virtual double zoomLevel() = 0; - - // Changes the zoom level to the specified level, clamping at the limits - // noted above, and returns the current zoom level after applying the - // change. - // - // If |textOnly| is set, only the text will be zoomed; otherwise the entire - // page will be zoomed. You can only have either text zoom or full page zoom - // at one time. Changing the mode while the page is zoomed will have odd - // effects. - virtual double setZoomLevel(bool textOnly, double zoomLevel) = 0; - - // Updates the zoom limits for this view. - virtual void zoomLimitsChanged(double minimumZoomLevel, - double maximumZoomLevel) = 0; - - // Helper functions to convert between zoom level and zoom factor. zoom - // factor is zoom percent / 100, so 300% = 3.0. - WEBKIT_API static double zoomLevelToZoomFactor(double zoomLevel); - WEBKIT_API static double zoomFactorToZoomLevel(double factor); - - - // Media --------------------------------------------------------------- - - // Performs the specified action on the node at the given location. - virtual void performMediaPlayerAction( - const WebMediaPlayerAction&, const WebPoint& location) = 0; - - - // Data exchange ------------------------------------------------------- - - // Copy to the clipboard the image located at a particular point in the - // WebView (if there is such an image) - virtual void copyImageAt(const WebPoint&) = 0; - - // Notifies the WebView that a drag has terminated. - virtual void dragSourceEndedAt( - const WebPoint& clientPoint, const WebPoint& screenPoint, - WebDragOperation operation) = 0; - - // Notifies the WebView that a drag is going on. - virtual void dragSourceMovedTo( - const WebPoint& clientPoint, const WebPoint& screenPoint, - WebDragOperation operation) = 0; - - // Notfies the WebView that the system drag and drop operation has ended. - virtual void dragSourceSystemDragEnded() = 0; - - // Callback methods when a drag-and-drop operation is trying to drop - // something on the WebView. - virtual WebDragOperation dragTargetDragEnter( - const WebDragData&, int identity, - const WebPoint& clientPoint, const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) = 0; - virtual WebDragOperation dragTargetDragEnterNew( - int identity, const WebPoint& clientPoint, const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) = 0; - virtual WebDragOperation dragTargetDragOver( - const WebPoint& clientPoint, const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) = 0; - virtual void dragTargetDragLeave() = 0; - virtual void dragTargetDrop( - const WebPoint& clientPoint, const WebPoint& screenPoint) = 0; - - virtual int dragIdentity() = 0; - - // Helper method for drag and drop target operations: override the - // default drop effect with either a "copy" (accept true) or "none" - // (accept false) effect. Return true on success. - virtual bool setDropEffect(bool accept) = 0; - - - // Support for resource loading initiated by plugins ------------------- - - // Returns next unused request identifier which is unique within the - // parent Page. - virtual unsigned long createUniqueIdentifierForRequest() = 0; - - - // Developer tools ----------------------------------------------------- - - // Inspect a particular point in the WebView. (x = -1 || y = -1) is a - // special case, meaning inspect the current page and not a specific - // point. - virtual void inspectElementAt(const WebPoint&) = 0; - - // Settings used by the inspector. - virtual WebString inspectorSettings() const = 0; - virtual void setInspectorSettings(const WebString&) = 0; - virtual bool inspectorSetting(const WebString& key, - WebString* value) const = 0; - virtual void setInspectorSetting(const WebString& key, - const WebString& value) = 0; - - // The embedder may optionally engage a WebDevToolsAgent. This may only - // be set once per WebView. - virtual WebDevToolsAgent* devToolsAgent() = 0; - - - // Accessibility ------------------------------------------------------- - - // Returns the accessibility object for this view. - virtual WebAccessibilityObject accessibilityObject() = 0; - - - // AutoFill ----------------------------------------------------------- - - // Notifies the WebView that AutoFill suggestions are available for a node. - // |uniqueIDs| is a vector of IDs that represent the unique ID of each - // AutoFill profile in the suggestions popup. If a unique ID is 0, then the - // corresponding suggestion comes from Autocomplete rather than AutoFill. - // If a unique ID is negative, then the corresponding "suggestion" is - // actually a user-facing warning, e.g. explaining why AutoFill is - // unavailable for the current form. - virtual void applyAutoFillSuggestions( - const WebNode&, - const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex) = 0; - - // Hides any popup (suggestions, selects...) that might be showing. - virtual void hidePopups() = 0; - - - // Context menu -------------------------------------------------------- - - virtual void performCustomContextMenuAction(unsigned action) = 0; - - - // Popup menu ---------------------------------------------------------- - - // Sets whether select popup menus should be rendered by the browser. - WEBKIT_API static void setUseExternalPopupMenus(bool); - - - // Visited link state -------------------------------------------------- - - // Tells all WebView instances to update the visited link state for the - // specified hash. - WEBKIT_API static void updateVisitedLinkState(unsigned long long hash); - - // Tells all WebView instances to update the visited state for all - // their links. - WEBKIT_API static void resetVisitedLinkState(); - - - // Custom colors ------------------------------------------------------- - - virtual void setScrollbarColors(unsigned inactiveColor, - unsigned activeColor, - unsigned trackColor) = 0; - - virtual void setSelectionColors(unsigned activeBackgroundColor, - unsigned activeForegroundColor, - unsigned inactiveBackgroundColor, - unsigned inactiveForegroundColor) = 0; - - // User scripts -------------------------------------------------------- - WEBKIT_API static void addUserScript(const WebString& sourceCode, - const WebVector<WebString>& patterns, - UserScriptInjectAt injectAt, - UserContentInjectIn injectIn); - WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode, - const WebVector<WebString>& patterns, - UserContentInjectIn injectIn, - UserStyleInjectionTime injectionTime = UserStyleInjectInSubsequentDocuments); - WEBKIT_API static void removeAllUserContent(); - - // Modal dialog support ------------------------------------------------ - - // Call these methods before and after running a nested, modal event loop - // to suspend script callbacks and resource loads. - WEBKIT_API static void willEnterModalLoop(); - WEBKIT_API static void didExitModalLoop(); - - // GPU acceleration support -------------------------------------------- - - // Returns the (on-screen) WebGraphicsContext3D associated with - // this WebView. One will be created if it doesn't already exist. - // This is used to set up sharing between this context (which is - // that used by the compositor) and contexts for WebGL and other - // APIs. - virtual WebGraphicsContext3D* graphicsContext3D() = 0; - -protected: - ~WebView() {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h deleted file mode 100644 index 033e120..0000000 --- a/WebKit/chromium/public/WebViewClient.h +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebViewClient_h -#define WebViewClient_h - -#include "WebAccessibilityNotification.h" -#include "WebDragOperation.h" -#include "WebEditingAction.h" -#include "WebFileChooserCompletion.h" -#include "WebFileChooserParams.h" -#include "WebPopupType.h" -#include "WebString.h" -#include "WebTextAffinity.h" -#include "WebTextDirection.h" -#include "WebWidgetClient.h" - -namespace WebKit { - -class WebAccessibilityObject; -class WebDeviceOrientationClient; -class WebDragData; -class WebElement; -class WebExternalPopupMenu; -class WebExternalPopupMenuClient; -class WebFileChooserCompletion; -class WebFrame; -class WebGeolocationClient; -class WebGeolocationService; -class WebImage; -class WebInputElement; -class WebKeyboardEvent; -class WebNode; -class WebNotificationPresenter; -class WebRange; -class WebSpeechInputController; -class WebSpeechInputListener; -class WebStorageNamespace; -class WebURL; -class WebView; -class WebWidget; -struct WebConsoleMessage; -struct WebContextMenuData; -struct WebPoint; -struct WebPopupMenuInfo; -struct WebWindowFeatures; - -// Since a WebView is a WebWidget, a WebViewClient is a WebWidgetClient. -// Virtual inheritance allows an implementation of WebWidgetClient to be -// easily reused as part of an implementation of WebViewClient. -class WebViewClient : virtual public WebWidgetClient { -public: - // Factory methods ----------------------------------------------------- - - // Create a new related WebView. This method must clone its session storage - // so any subsequent calls to createSessionStorageNamespace conform to the - // WebStorage specification. - virtual WebView* createView(WebFrame* creator, - const WebWindowFeatures& features, - const WebString& name) { return 0; } - - // Create a new WebPopupMenu. In the second form, the client is - // responsible for rendering the contents of the popup menu. - virtual WebWidget* createPopupMenu(WebPopupType) { return 0; } - virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; } - virtual WebExternalPopupMenu* createExternalPopupMenu( - const WebPopupMenuInfo&, WebExternalPopupMenuClient*) { return 0; } - - // Create a session storage namespace object associated with this WebView. - virtual WebStorageNamespace* createSessionStorageNamespace(unsigned quota) { return 0; } - - // Misc ---------------------------------------------------------------- - - // A new message was added to the console. - virtual void didAddMessageToConsole( - const WebConsoleMessage&, const WebString& sourceName, unsigned sourceLine) { } - - // Called when script in the page calls window.print(). If frame is - // non-null, then it selects a particular frame, including its - // children, to print. Otherwise, the main frame and its children - // should be printed. - virtual void printPage(WebFrame*) { } - - // Called to retrieve the provider of desktop notifications. - virtual WebNotificationPresenter* notificationPresenter() { return 0; } - - - // Navigational -------------------------------------------------------- - - // These notifications bracket any loading that occurs in the WebView. - virtual void didStartLoading() { } - virtual void didStopLoading() { } - - // Notification that some progress was made loading the current page. - // loadProgress is a value between 0 (nothing loaded) and 1.0 (frame fully - // loaded). - virtual void didChangeLoadProgress(WebFrame*, double loadProgress) { } - - // Editing ------------------------------------------------------------- - - // These methods allow the client to intercept and overrule editing - // operations. - virtual bool shouldBeginEditing(const WebRange&) { return true; } - virtual bool shouldEndEditing(const WebRange&) { return true; } - virtual bool shouldInsertNode( - const WebNode&, const WebRange&, WebEditingAction) { return true; } - virtual bool shouldInsertText( - const WebString&, const WebRange&, WebEditingAction) { return true; } - virtual bool shouldChangeSelectedRange( - const WebRange& from, const WebRange& to, WebTextAffinity, - bool stillSelecting) { return true; } - virtual bool shouldDeleteRange(const WebRange&) { return true; } - virtual bool shouldApplyStyle(const WebString& style, const WebRange&) { return true; } - - virtual bool isSmartInsertDeleteEnabled() { return true; } - virtual bool isSelectTrailingWhitespaceEnabled() { return true; } - - virtual void didBeginEditing() { } - virtual void didChangeSelection(bool isSelectionEmpty) { } - virtual void didChangeContents() { } - virtual void didExecuteCommand(const WebString& commandName) { } - virtual void didEndEditing() { } - - // These methods are called when the users edits a text-field. - virtual void textFieldDidBeginEditing(const WebInputElement&) { } - virtual void textFieldDidEndEditing(const WebInputElement&) { } - virtual void textFieldDidChange(const WebInputElement&) { } - virtual void textFieldDidReceiveKeyDown(const WebInputElement&, const WebKeyboardEvent&) { } - - // This method is called in response to WebView's handleInputEvent() - // when the default action for the current keyboard event is not - // suppressed by the page, to give the embedder a chance to handle - // the keyboard event specially. - // - // Returns true if the keyboard event was handled by the embedder, - // indicating that the default action should be suppressed. - virtual bool handleCurrentKeyboardEvent() { return false; } - - - // Spellchecker -------------------------------------------------------- - - // The client should perform spell-checking on the given text. If the - // text contains a misspelled word, then upon return misspelledOffset - // will point to the start of the misspelled word, and misspelledLength - // will indicates its length. Otherwise, if there was not a spelling - // error, then upon return misspelledLength is 0. - virtual void spellCheck( - const WebString& text, int& misspelledOffset, int& misspelledLength) { } - - // Computes an auto-corrected replacement for a misspelled word. If no - // replacement is found, then an empty string is returned. - virtual WebString autoCorrectWord(const WebString& misspelledWord) { return WebString(); } - - // Show or hide the spelling UI. - virtual void showSpellingUI(bool show) { } - - // Returns true if the spelling UI is showing. - virtual bool isShowingSpellingUI() { return false; } - - // Update the spelling UI with the given word. - virtual void updateSpellingUIWithMisspelledWord(const WebString& word) { } - - - // Dialogs ------------------------------------------------------------- - - // This method returns immediately after showing the dialog. When the - // dialog is closed, it should call the WebFileChooserCompletion to - // pass the results of the dialog. Returns false if - // WebFileChooseCompletion will never be called. - virtual bool runFileChooser(const WebFileChooserParams&, - WebFileChooserCompletion*) { return false; } - - // Displays a modal alert dialog containing the given message. Returns - // once the user dismisses the dialog. - virtual void runModalAlertDialog( - WebFrame*, const WebString& message) { } - - // Displays a modal confirmation dialog with the given message as - // description and OK/Cancel choices. Returns true if the user selects - // 'OK' or false otherwise. - virtual bool runModalConfirmDialog( - WebFrame*, const WebString& message) { return false; } - - // Displays a modal input dialog with the given message as description - // and OK/Cancel choices. The input field is pre-filled with - // defaultValue. Returns true if the user selects 'OK' or false - // otherwise. Upon returning true, actualValue contains the value of - // the input field. - virtual bool runModalPromptDialog( - WebFrame*, const WebString& message, const WebString& defaultValue, - WebString* actualValue) { return false; } - - // Displays a modal confirmation dialog containing the given message as - // description and OK/Cancel choices, where 'OK' means that it is okay - // to proceed with closing the view. Returns true if the user selects - // 'OK' or false otherwise. - virtual bool runModalBeforeUnloadDialog( - WebFrame*, const WebString& message) { return true; } - - virtual bool supportsFullscreen() { return false; } - virtual void enterFullscreenForNode(const WebNode&) { } - virtual void exitFullscreenForNode(const WebNode&) { } - - // UI ------------------------------------------------------------------ - - // Called when script modifies window.status - virtual void setStatusText(const WebString&) { } - - // Called when hovering over an anchor with the given URL. - virtual void setMouseOverURL(const WebURL&) { } - - // Called when keyboard focus switches to an anchor with the given URL. - virtual void setKeyboardFocusURL(const WebURL&) { } - - // Called when a tooltip should be shown at the current cursor position. - virtual void setToolTipText(const WebString&, WebTextDirection hint) { } - - // Shows a context menu with commands relevant to a specific element on - // the given frame. Additional context data is supplied. - virtual void showContextMenu(WebFrame*, const WebContextMenuData&) { } - - // Called when a drag-n-drop operation should begin. - virtual void startDragging( - const WebDragData&, WebDragOperationsMask, const WebImage&, const WebPoint&) { } - - // Called to determine if drag-n-drop operations may initiate a page - // navigation. - virtual bool acceptsLoadDrops() { return true; } - - // Take focus away from the WebView by focusing an adjacent UI element - // in the containing window. - virtual void focusNext() { } - virtual void focusPrevious() { } - - // Called when a new node gets focused. - virtual void focusedNodeChanged(const WebNode&) { } - - - // Session history ----------------------------------------------------- - - // Tells the embedder to navigate back or forward in session history by - // the given offset (relative to the current position in session - // history). - virtual void navigateBackForwardSoon(int offset) { } - - // Returns the number of history items before/after the current - // history item. - virtual int historyBackListCount() { return 0; } - virtual int historyForwardListCount() { return 0; } - - // Called to notify the embedder when a new history item is added. - virtual void didAddHistoryItem() { } - - - // Accessibility ------------------------------------------------------- - - // Notifies embedder about an accessibility notification. - virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { } - - - // Developer tools ----------------------------------------------------- - - // Called to notify the client that the inspector's settings were - // changed and should be saved. See WebView::inspectorSettings. - virtual void didUpdateInspectorSettings() { } - - virtual void didUpdateInspectorSetting(const WebString& key, const WebString& value) { } - - - // AutoFill ------------------------------------------------------------ - - // Queries the browser for suggestions to be shown for the form text - // field named |name|. |value| is the text entered by the user so - // far and the WebNode corresponds to the input field. - virtual void queryAutofillSuggestions(const WebNode&, - const WebString& name, - const WebString& value) { } - - // Instructs the browser to remove the Autocomplete entry specified from - // its DB. - // FIXME: This method should be named removeAutocompleteSugestion. - virtual void removeAutofillSuggestions(const WebString& name, - const WebString& value) { } - - // Informs the browser that the user has accepted an AutoFill suggestion for - // a WebNode. |uniqueID| is used as a key into the set of AutoFill profiles, - // and should never be negative. If it is 0, then the suggestion is an - // Autocomplete suggestion; and |value| stores the suggested text. |index| - // is an index of the selected suggestion in the list of suggestions provided - // by the client. - virtual void didAcceptAutoFillSuggestion(const WebNode&, - const WebString& value, - const WebString& label, - int uniqueID, - unsigned index) { } - - // Informs the browser that the user has selected an AutoFill suggestion for - // a WebNode. This happens when the user hovers over a suggestion or uses - // the arrow keys to navigate to a suggestion. - virtual void didSelectAutoFillSuggestion(const WebNode&, - const WebString& name, - const WebString& label, - int uniqueID) { } - - // Informs the browser that the user has cleared the selection from the - // AutoFill suggestions popup. This happens when a user uses the arrow - // keys to navigate outside the range of possible selections. - virtual void didClearAutoFillSelection(const WebNode&) { } - - // Informs the browser that the user has selected an autocomplete (password - // or field) suggestion from the drop-down. The input element text has - // already been set to the selected suggestion. - virtual void didAcceptAutocompleteSuggestion(const WebInputElement&) { } - - // Geolocation --------------------------------------------------------- - - // Access the embedder API for (client-based) geolocation client . - virtual WebGeolocationClient* geolocationClient() { return 0; } - // Access the embedder API for (non-client-based) geolocation services. - virtual WebGeolocationService* geolocationService() { return 0; } - - // Speech -------------------------------------------------------------- - - // Access the embedder API for speech input services. - virtual WebSpeechInputController* speechInputController( - WebSpeechInputListener*) { return 0; } - - // Device Orientation -------------------------------------------------- - - // Access the embedder API for device orientation services. - virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; } - - - // Zoom ---------------------------------------------------------------- - - // Informs the browser that the zoom levels for this frame have changed from - // the default values. - virtual void zoomLimitsChanged(double minimumLevel, double maximumLevel) { } - - // Informs the browser that the zoom level has changed as a result of an - // action that wasn't initiated by the client. - virtual void zoomLevelChanged() { } - -protected: - ~WebViewClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h deleted file mode 100644 index ccad134..0000000 --- a/WebKit/chromium/public/WebWidget.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWidget_h -#define WebWidget_h - -#include "WebCanvas.h" -#include "WebCommon.h" -#include "WebCompositionUnderline.h" -#include "WebTextInputType.h" -#include "WebTextDirection.h" - -namespace WebKit { - -class WebInputEvent; -class WebString; -struct WebRect; -struct WebSize; -template <typename T> class WebVector; - -class WebWidget { -public: - // This method closes and deletes the WebWidget. - virtual void close() = 0; - - // Returns the current size of the WebWidget. - virtual WebSize size() = 0; - - // Called to resize the WebWidget. - virtual void resize(const WebSize&) = 0; - - // Called to layout the WebWidget. This MUST be called before Paint, - // and it may result in calls to WebWidgetClient::didInvalidateRect. - virtual void layout() = 0; - - // Called to paint the rectangular region within the WebWidget - // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call - // Layout before calling this method. It is okay to call paint - // multiple times once layout has been called, assuming no other - // changes are made to the WebWidget (e.g., once events are - // processed, it should be assumed that another call to layout is - // warranted before painting again). - virtual void paint(WebCanvas*, const WebRect& viewPort) = 0; - - // Triggers compositing of the current layers onto the screen. - // The finish argument controls whether the compositor will wait for the - // GPU to finish rendering before returning. You MUST call Layout - // before calling this method, for the same reasons described in - // the paint method above. - virtual void composite(bool finish) = 0; - - // Called to inform the WebWidget of a change in theme. - // Implementors that cache rendered copies of widgets need to re-render - // on receiving this message - virtual void themeChanged() = 0; - - // Called to inform the WebWidget of an input event. Returns true if - // the event has been processed, false otherwise. - virtual bool handleInputEvent(const WebInputEvent&) = 0; - - // Called to inform the WebWidget that mouse capture was lost. - virtual void mouseCaptureLost() = 0; - - // Called to inform the WebWidget that it has gained or lost keyboard focus. - virtual void setFocus(bool) = 0; - - // Called to inform the WebWidget of a new composition text. - // If selectionStart and selectionEnd has the same value, then it indicates - // the input caret position. If the text is empty, then the existing - // composition text will be cancelled. - // Returns true if the composition text was set successfully. - virtual bool setComposition( - const WebString& text, - const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, - int selectionEnd) = 0; - - // Called to inform the WebWidget to confirm an ongoing composition. - // This method is same as confirmComposition(WebString()); - // Returns true if there is an ongoing composition. - virtual bool confirmComposition() = 0; - - // Called to inform the WebWidget to confirm an ongoing composition with a - // new composition text. If the text is empty then the current composition - // text is confirmed. If there is no ongoing composition, then deletes the - // current selection and inserts the text. This method has no effect if - // there is no ongoing composition and the text is empty. - // Returns true if there is an ongoing composition or the text is inserted. - virtual bool confirmComposition(const WebString& text) = 0; - - // Returns the current text input type of this WebWidget. - virtual WebTextInputType textInputType() = 0; - - // Returns the current caret bounds of this WebWidget. The selection bounds - // will be returned if a selection range is available. - virtual WebRect caretOrSelectionBounds() = 0; - - // Changes the text direction of the selected input node. - virtual void setTextDirection(WebTextDirection) = 0; - - // Returns true if the WebWidget uses GPU accelerated compositing - // to render its contents. - virtual bool isAcceleratedCompositingActive() const = 0; - -protected: - ~WebWidget() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebWidgetClient.h b/WebKit/chromium/public/WebWidgetClient.h deleted file mode 100644 index 373426d..0000000 --- a/WebKit/chromium/public/WebWidgetClient.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWidgetClient_h -#define WebWidgetClient_h - -#include "WebCommon.h" -#include "WebNavigationPolicy.h" -#include "WebRect.h" -#include "WebScreenInfo.h" - -namespace WebKit { - -class WebWidget; -struct WebCursorInfo; - -class WebWidgetClient { -public: - // Called when a region of the WebWidget needs to be re-painted. - virtual void didInvalidateRect(const WebRect&) { } - - // Called when a region of the WebWidget, given by clipRect, should be - // scrolled by the specified dx and dy amounts. - virtual void didScrollRect(int dx, int dy, const WebRect& clipRect) { } - - // Called when the compositor enables or disables. - virtual void didActivateAcceleratedCompositing(bool active) { } - - // Called when a call to WebWidget::composite is required - virtual void scheduleComposite() { } - - // Called when the widget acquires or loses focus, respectively. - virtual void didFocus() { } - virtual void didBlur() { } - - // Called when the cursor for the widget changes. - virtual void didChangeCursor(const WebCursorInfo&) { } - - // Called when the widget should be closed. WebWidget::close() should - // be called asynchronously as a result of this notification. - virtual void closeWidgetSoon() { } - - // Called to show the widget according to the given policy. - virtual void show(WebNavigationPolicy) { } - - // Called to block execution of the current thread until the widget is - // closed. - virtual void runModal() { } - - // Called to get/set the position of the widget in screen coordinates. - virtual WebRect windowRect() { return WebRect(); } - virtual void setWindowRect(const WebRect&) { } - - // Called to get the position of the resizer rect in window coordinates. - virtual WebRect windowResizerRect() { return WebRect(); } - - // Called to get the position of the root window containing the widget - // in screen coordinates. - virtual WebRect rootWindowRect() { return WebRect(); } - - // Called to query information about the screen where this widget is - // displayed. - virtual WebScreenInfo screenInfo() { return WebScreenInfo(); } - - // When this method gets called, WebWidgetClient implementation should - // reset the input method by cancelling any ongoing composition. - virtual void resetInputMethod() { } - -protected: - ~WebWidgetClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebWindowFeatures.h b/WebKit/chromium/public/WebWindowFeatures.h deleted file mode 100644 index 99d8580..0000000 --- a/WebKit/chromium/public/WebWindowFeatures.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWindowFeatures_h -#define WebWindowFeatures_h - -#include "WebCommon.h" -#include "WebString.h" -#include "WebVector.h" - -#if WEBKIT_IMPLEMENTATION -#include "WindowFeatures.h" -#endif - -namespace WebKit { - -struct WebWindowFeatures { - float x; - bool xSet; - float y; - bool ySet; - float width; - bool widthSet; - float height; - bool heightSet; - - bool menuBarVisible; - bool statusBarVisible; - bool toolBarVisible; - bool locationBarVisible; - bool scrollbarsVisible; - bool resizable; - - bool fullscreen; - bool dialog; - WebVector<WebString> additionalFeatures; - - WebWindowFeatures() - : xSet(false) - , ySet(false) - , widthSet(false) - , heightSet(false) - , menuBarVisible(true) - , statusBarVisible(true) - , toolBarVisible(true) - , locationBarVisible(true) - , scrollbarsVisible(true) - , resizable(true) - , fullscreen(false) - , dialog(false) - { - } - - -#if WEBKIT_IMPLEMENTATION - WebWindowFeatures(const WebCore::WindowFeatures& f) - : x(f.x) - , xSet(f.xSet) - , y(f.y) - , ySet(f.ySet) - , width(f.width) - , widthSet(f.widthSet) - , height(f.height) - , heightSet(f.heightSet) - , menuBarVisible(f.menuBarVisible) - , statusBarVisible(f.statusBarVisible) - , toolBarVisible(f.toolBarVisible) - , locationBarVisible(f.locationBarVisible) - , scrollbarsVisible(f.scrollbarsVisible) - , resizable(f.resizable) - , fullscreen(f.fullscreen) - , dialog(f.dialog) - , additionalFeatures(f.additionalFeatures) - { - } -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebWorker.h b/WebKit/chromium/public/WebWorker.h deleted file mode 100644 index 9397bcd..0000000 --- a/WebKit/chromium/public/WebWorker.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWorker_h -#define WebWorker_h - -#include "WebMessagePortChannel.h" - -namespace WebKit { - -class WebString; -class WebURL; -class WebWorkerClient; - -// Provides an interface to the script execution context for a worker. -class WebWorker { -public: - // Instantiates a built-in WebWorker. - WEBKIT_API static WebWorker* create(WebWorkerClient*); - - virtual ~WebWorker() { } - virtual void startWorkerContext(const WebURL& scriptURL, - const WebString& userAgent, - const WebString& sourceCode) = 0; - virtual void terminateWorkerContext() = 0; - virtual void postMessageToWorkerContext( - const WebString&, - const WebMessagePortChannelArray&) = 0; - virtual void workerObjectDestroyed() = 0; - virtual void clientDestroyed() = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/WebWorkerClient.h b/WebKit/chromium/public/WebWorkerClient.h deleted file mode 100644 index eb2e63e..0000000 --- a/WebKit/chromium/public/WebWorkerClient.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWorkerClient_h -#define WebWorkerClient_h - -#include "WebCommonWorkerClient.h" -#include "WebMessagePortChannel.h" - -namespace WebKit { - -class WebNotificationPresenter; -class WebString; -class WebWorker; - -// Provides an interface back to the in-page script object for a worker. -// All functions are expected to be called back on the thread that created -// the Worker object, unless noted. -class WebWorkerClient : public WebCommonWorkerClient { -public: - virtual void postMessageToWorkerObject( - const WebString&, - const WebMessagePortChannelArray&) = 0; - - virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) = 0; - virtual void reportPendingActivity(bool hasPendingActivity) = 0; - -protected: - ~WebWorkerClient() { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/gtk/WebFontInfo.h b/WebKit/chromium/public/gtk/WebFontInfo.h deleted file mode 100644 index fae792d..0000000 --- a/WebKit/chromium/public/gtk/WebFontInfo.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontInfo_h -#define WebFontInfo_h - -#include "../WebCString.h" -#include "../linux/WebFontRenderStyle.h" - -#include <string.h> -#include <unistd.h> - -namespace WebKit { - -class WebFontInfo { -public: - // Return a font family which provides glyphs for the Unicode code points - // specified by |utf16| - // characters: a native-endian UTF16 string - // numCharacters: the number of 16-bit words in |utf16| - // - // Returns: the font family or an empty string if the request could not be - // satisfied. - WEBKIT_API static WebCString familyForChars(const WebUChar* characters, size_t numCharacters); - - // Fill out the given WebFontRenderStyle with the user's preferences for - // rendering the given font at the given size. - // family: i.e. "Times New Roman" - // sizeAndStyle: - // 3322222222221111111111 - // 10987654321098765432109876543210 - // +--------------------------------+ - // |..............Size............IB| - // +--------------------------------+ - // I: italic flag - // B: bold flag - WEBKIT_API static void renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* result); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/gtk/WebInputEventFactory.h b/WebKit/chromium/public/gtk/WebInputEventFactory.h deleted file mode 100644 index 463bd28..0000000 --- a/WebKit/chromium/public/gtk/WebInputEventFactory.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputEventFactory_h -#define WebInputEventFactory_h - -#include "../WebCommon.h" - -typedef struct _GdkEventButton GdkEventButton; -typedef struct _GdkEventMotion GdkEventMotion; -typedef struct _GdkEventCrossing GdkEventCrossing; -typedef struct _GdkEventScroll GdkEventScroll; -typedef struct _GdkEventKey GdkEventKey; - -namespace WebKit { - -class WebKeyboardEvent; -class WebMouseEvent; -class WebMouseWheelEvent; - -class WebInputEventFactory { -public: - WEBKIT_API static WebKeyboardEvent keyboardEvent(const GdkEventKey*); - WEBKIT_API static WebKeyboardEvent keyboardEvent(wchar_t character, int state, double timeStampSeconds); - WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventButton*); - WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventMotion*); - WEBKIT_API static WebMouseEvent mouseEvent(const GdkEventCrossing*); - WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(const GdkEventScroll*); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/linux/WebFontRenderStyle.h b/WebKit/chromium/public/linux/WebFontRenderStyle.h deleted file mode 100644 index a3b180f..0000000 --- a/WebKit/chromium/public/linux/WebFontRenderStyle.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontRenderStyle_h -#define WebFontRenderStyle_h - -#include "../WebCommon.h" - -namespace WebCore { struct FontRenderStyle; } - -namespace WebKit { - -struct WebFontRenderStyle { - // Each of the use* members below can take one of three values: - // 0: off - // 1: on - // 2: no preference expressed - char useBitmaps; // use embedded bitmap strike if possible - char useAutoHint; // use 'auto' hinting (FreeType specific) - char useHinting; // hint glyphs to the pixel grid - char hintStyle; // level of hinting, 0..3 - char useAntiAlias; // antialias glyph shapes - char useSubpixel; // use subpixel antialias - -#ifdef WEBKIT_IMPLEMENTATION - // Translates the members of this struct to a FontRenderStyle - void toFontRenderStyle(WebCore::FontRenderStyle*); -#endif - - void setDefaults(); -}; - -} // namespace WebKit - -#endif // WebFontRenderStyle_h diff --git a/WebKit/chromium/public/linux/WebFontRendering.h b/WebKit/chromium/public/linux/WebFontRendering.h deleted file mode 100644 index 9b61bdc..0000000 --- a/WebKit/chromium/public/linux/WebFontRendering.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontRendering_h -#define WebFontRendering_h - -#include "../WebCommon.h" -#include <SkFontHost.h> -#include <SkPaint.h> - -namespace WebKit { - -class WebFontRendering { -public: - // Set global font renderering preferences. - - WEBKIT_API static void setHinting(SkPaint::Hinting); - WEBKIT_API static void setAntiAlias(bool on); - WEBKIT_API static void setSubpixelGlyphs(bool on); - WEBKIT_API static void setLCDOrder(SkFontHost::LCDOrder); - WEBKIT_API static void setLCDOrientation(SkFontHost::LCDOrientation); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/linux/WebRenderTheme.h b/WebKit/chromium/public/linux/WebRenderTheme.h deleted file mode 100644 index e3be69d..0000000 --- a/WebKit/chromium/public/linux/WebRenderTheme.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2009 Joel Stanley. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebRenderTheme_h -#define WebRenderTheme_h - -#include "../WebCommon.h" - -namespace WebKit { - -// Set caret blink interval for text input areas. -WEBKIT_API void setCaretBlinkInterval(double); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/linux/WebSandboxSupport.h b/WebKit/chromium/public/linux/WebSandboxSupport.h deleted file mode 100644 index 6990abe..0000000 --- a/WebKit/chromium/public/linux/WebSandboxSupport.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -#include "../WebCommon.h" -#include "../WebString.h" - -namespace WebKit { - -struct WebFontRenderStyle; - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Fonts --------------------------------------------------------------- - - // Get a font family which contains glyphs for the given Unicode - // code-points. - // characters: a UTF-16 encoded string - // numCharacters: the number of 16-bit words in |characters| - // - // Returns a string with the font family on an empty string if the - // request cannot be satisfied. - virtual WebString getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters) = 0; - virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/linux/WebThemeEngine.h b/WebKit/chromium/public/linux/WebThemeEngine.h deleted file mode 100644 index 6f8cdc7..0000000 --- a/WebKit/chromium/public/linux/WebThemeEngine.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" -#include "../WebColor.h" -#include "../WebSize.h" - -namespace WebKit { - -struct WebRect; - -// FIXME: Remove once webkit/glue/webthemeengine_impl_linux.c has been updated to use the correct spelling. -#define PartScrollbarHoriztonalTrack PartScrollbarHorizontalTrack - -class WebThemeEngine { -public: - // The UI part which is being accessed. - enum Part { - PartScrollbarDownArrow, - PartScrollbarLeftArrow, - PartScrollbarRightArrow, - PartScrollbarUpArrow, - PartScrollbarHorizontalThumb, - PartScrollbarVerticalThumb, - PartScrollbarHorizontalTrack, - PartScrollbarVerticalTrack - }; - - // The current state of the associated Part. - enum State { - StateDisabled, - StateHover, - StateNormal, - StatePressed, - }; - - // Extra parameters for drawing the PartScrollbarHorizontalTrack and - // PartScrollbarVerticalTrack. - struct ScrollbarTrackExtraParams { - // The bounds of the entire track, as opposed to the part being painted. - int trackX; - int trackY; - int trackWidth; - int trackHeight; - }; - - union ExtraParams { - ScrollbarTrackExtraParams scrollbarTrack; - }; - - // Gets the size of the given theme part. For variable sized items - // like vertical scrollbar thumbs, the width will be the required width of - // the track while the height will be the minimum height. - virtual WebSize getSize(Part) { return WebSize(); } - // Paint the given the given theme part. - virtual void paint( - WebCanvas*, Part, State, const WebRect&, const ExtraParams*) {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/mac/WebInputEventFactory.h b/WebKit/chromium/public/mac/WebInputEventFactory.h deleted file mode 100644 index cbf213c..0000000 --- a/WebKit/chromium/public/mac/WebInputEventFactory.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputEventFactory_h -#define WebInputEventFactory_h - -#include "../WebCommon.h" - -#ifdef __OBJC__ -@class NSEvent; -@class NSView; -#else -class NSEvent; -class NSView; -#endif - -namespace WebKit { - -class WebKeyboardEvent; -class WebMouseEvent; -class WebMouseWheelEvent; - -class WebInputEventFactory { -public: - WEBKIT_API static WebKeyboardEvent keyboardEvent(NSEvent*); - WEBKIT_API static WebKeyboardEvent keyboardEvent(wchar_t character, int modifiers, double timeStampSeconds); - WEBKIT_API static WebMouseEvent mouseEvent(NSEvent*, NSView*); - WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(NSEvent*, NSView*); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/mac/WebSandboxSupport.h b/WebKit/chromium/public/mac/WebSandboxSupport.h deleted file mode 100644 index 57d48aa..0000000 --- a/WebKit/chromium/public/mac/WebSandboxSupport.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -typedef uintptr_t ATSFontContainerRef; - -#ifdef __OBJC__ -@class NSFont; -#else -class NSFont; -#endif - -namespace WebKit { - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Given an input font - |srcFont| [which can't be loaded due to sandbox - // restrictions]. Return a font container belonging to an equivalent - // font file that can be used to access the font. - // - // Note that a font container may contain multiple fonts, the caller is - // responsible for retreiving the appropriate font from the container. - // - // If this function succeeds, the caller assumes ownership of the |out| - // parameter and must call ATSFontDeactivate() to unload it when done. - // - // Returns: true on success, false on error. - virtual bool loadFont(NSFont* srcFont, ATSFontContainerRef* out) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/mac/WebScreenInfoFactory.h b/WebKit/chromium/public/mac/WebScreenInfoFactory.h deleted file mode 100644 index 485e77f..0000000 --- a/WebKit/chromium/public/mac/WebScreenInfoFactory.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScreenInfoFactory_h -#define WebScreenInfoFactory_h - -#include "../WebCommon.h" - -#ifdef __OBJC__ -@class NSView; -#else -class NSView; -#endif - -namespace WebKit { - -struct WebScreenInfo; - -class WebScreenInfoFactory { -public: - WEBKIT_API static WebScreenInfo screenInfo(NSView*); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/mac/WebThemeEngine.h b/WebKit/chromium/public/mac/WebThemeEngine.h deleted file mode 100644 index 8938816..0000000 --- a/WebKit/chromium/public/mac/WebThemeEngine.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" - -namespace WebKit { - -struct WebRect; - -class WebThemeEngine { -public: - enum State { - StateDisabled, - StateInactive, - StateActive, - StatePressed, - }; - - enum Size { - SizeRegular, - SizeSmall, - }; - - enum ScrollbarOrientation { - ScrollbarOrientationHorizontal, - ScrollbarOrientationVertical, - }; - - enum ScrollbarParent { - ScrollbarParentScrollView, - ScrollbarParentRenderLayer, - }; - - struct ScrollbarInfo { - ScrollbarOrientation orientation; - ScrollbarParent parent; - int maxValue; - int currentValue; - int visibleSize; - int totalSize; - }; - - virtual void paintScrollbarThumb(WebCanvas*, State, Size, const WebRect&, const ScrollbarInfo&) {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/win/WebInputEventFactory.h b/WebKit/chromium/public/win/WebInputEventFactory.h deleted file mode 100644 index ae02464..0000000 --- a/WebKit/chromium/public/win/WebInputEventFactory.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputEventFactory_h -#define WebInputEventFactory_h - -#include "../WebCommon.h" - -#include <windows.h> - -namespace WebKit { - -class WebKeyboardEvent; -class WebMouseEvent; -class WebMouseWheelEvent; - -class WebInputEventFactory { -public: - WEBKIT_API static WebKeyboardEvent keyboardEvent(HWND, UINT, WPARAM, LPARAM); - WEBKIT_API static WebMouseEvent mouseEvent(HWND, UINT, WPARAM, LPARAM); - WEBKIT_API static WebMouseWheelEvent mouseWheelEvent(HWND, UINT, WPARAM, LPARAM); - - // Windows only provides information on whether a click was a single or - // double click, while we need to know the click count past two. The - // WebInputEventFactory keeps internal state to allow it to synthesize - // that information. In some cases, like fast-running tests, that - // information is known to be stale and needs to be reset; that is the - // function of resetLastClickState(). - WEBKIT_API static void resetLastClickState(); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/win/WebSandboxSupport.h b/WebKit/chromium/public/win/WebSandboxSupport.h deleted file mode 100644 index 88d5362..0000000 --- a/WebKit/chromium/public/win/WebSandboxSupport.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -typedef struct HFONT__* HFONT; - -namespace WebKit { - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Sometimes a Win32 API call will fail because a font is not loaded, - // and due to sandbox restrictions, the current process may be unable - // to access the filesystem to load the font. So, this call serves as - // a failover to ask the embedder to try some other way to load the - // font (usually by delegating to an empowered process to have it load - // the font). Returns true if the font was successfully loaded. - virtual bool ensureFontLoaded(HFONT) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/win/WebScreenInfoFactory.h b/WebKit/chromium/public/win/WebScreenInfoFactory.h deleted file mode 100644 index a7040ea..0000000 --- a/WebKit/chromium/public/win/WebScreenInfoFactory.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScreenInfoFactory_h -#define WebScreenInfoFactory_h - -#include "../WebCommon.h" - -typedef struct HWND__* HWND; - -namespace WebKit { - -struct WebScreenInfo; - -class WebScreenInfoFactory { -public: - WEBKIT_API static WebScreenInfo screenInfo(HWND); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/win/WebThemeEngine.h b/WebKit/chromium/public/win/WebThemeEngine.h deleted file mode 100644 index 1890db6..0000000 --- a/WebKit/chromium/public/win/WebThemeEngine.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebThemeEngine_h -#define WebThemeEngine_h - -#include "../WebCanvas.h" -#include "../WebColor.h" -#include "../WebSize.h" - -namespace WebKit { - -struct WebRect; -struct WebSize; - -class WebThemeEngine { -public: -// The part and state parameters correspond to values defined by the -// Windows Theme API (see -// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ). -// The classicState parameter corresponds to the uState -// parameter of the Windows DrawFrameControl() function. -// See the definitions in <vsstyle.h> and <winuser.h>. - virtual void paintButton( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintMenuList( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarArrow( - WebCanvas*, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarThumb( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintScrollbarTrack( - WebCanvas*, int part, int state, int classicState, - const WebRect&, const WebRect& alignRect) = 0; - - virtual void paintSpinButton( - WebCanvas*, int part, int state, int classicState, - const WebRect&) {} - - virtual void paintTextField( - WebCanvas*, int part, int state, int classicState, - const WebRect&, WebColor, bool fillContentArea, bool drawEdges) = 0; - - virtual void paintTrackbar( - WebCanvas*, int part, int state, int classicState, - const WebRect&) = 0; - - virtual void paintProgressBar( - WebCanvas*, const WebRect& barRect, const WebRect& valueRect, - bool determinate, double animatedSeconds) {} -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/public/x11/WebScreenInfoFactory.h b/WebKit/chromium/public/x11/WebScreenInfoFactory.h deleted file mode 100644 index 5e30da8..0000000 --- a/WebKit/chromium/public/x11/WebScreenInfoFactory.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScreenInfoFactory_h -#define WebScreenInfoFactory_h - -#include "../WebCommon.h" - -typedef struct _XDisplay Display; - -namespace WebKit { - -struct WebScreenInfo; - -class WebScreenInfoFactory { -public: - WEBKIT_API static WebScreenInfo screenInfo(Display*, int screenNumber); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/scripts/concatenate_css_files.py b/WebKit/chromium/scripts/concatenate_css_files.py deleted file mode 100644 index 0aa5ef3..0000000 --- a/WebKit/chromium/scripts/concatenate_css_files.py +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# This script concatenates in place CSS files in the order specified -# using <link> tags in a given 'order.html' file. - -from HTMLParser import HTMLParser -from cStringIO import StringIO -import os.path -import sys - - -class OrderedCSSFilesExtractor(HTMLParser): - - def __init__(self, order_html_name): - HTMLParser.__init__(self) - self.ordered_css_files = [] - order_html = open(order_html_name, 'r') - self.feed(order_html.read()) - - def handle_starttag(self, tag, attrs): - if tag == 'link': - attrs_dict = dict(attrs) - if ('type' in attrs_dict and attrs_dict['type'] == 'text/css' and - 'href' in attrs_dict): - self.ordered_css_files.append(attrs_dict['href']) - - -class PathExpander: - - def __init__(self, paths): - self.paths = paths - - def expand(self, filename): - last_path = None - expanded_name = None - for path in self.paths: - fname = "%s/%s" % (path, filename) - if (os.access(fname, os.F_OK)): - if (last_path != None): - raise Exception('Ambiguous file %s: found in %s and %s' % - (filename, last_path, path)) - expanded_name = fname - last_path = path - return expanded_name - - -def main(argv): - - if len(argv) < 3: - print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' - 'output_file' % argv[0]) - return 1 - - output_file_name = argv.pop() - input_order_file_name = argv[1] - extractor = OrderedCSSFilesExtractor(input_order_file_name) - # Unconditionally append devTools.css. It will contain concatenated files. - extractor.ordered_css_files.append('devTools.css') - - expander = PathExpander(argv[2:]) - output = StringIO() - - for input_file_name in extractor.ordered_css_files: - full_path = expander.expand(input_file_name) - if (full_path is None): - raise Exception('File %s referenced in %s not found on any source paths, ' - 'check source tree for consistency' % - (input_file_name, input_order_file_name)) - output.write('/* %s */\n\n' % input_file_name) - input_file = open(full_path, 'r') - output.write(input_file.read()) - output.write('\n') - input_file.close() - - output_file = open(output_file_name, 'w') - output_file.write(output.getvalue()) - output_file.close() - output.close() - - # Touch output file directory to make sure that Xcode will copy - # modified resource files. - if sys.platform == 'darwin': - output_dir_name = os.path.dirname(output_file_name) - os.utime(output_dir_name, None) - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/WebKit/chromium/scripts/concatenate_js_files.py b/WebKit/chromium/scripts/concatenate_js_files.py deleted file mode 100644 index 209660a..0000000 --- a/WebKit/chromium/scripts/concatenate_js_files.py +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# This script concatenates in place JS files in the order specified -# using <script> tags in a given 'order.html' file. - -from HTMLParser import HTMLParser -from cStringIO import StringIO - -import jsmin -import os.path -import sys - - -class OrderedJSFilesExtractor(HTMLParser): - - def __init__(self, order_html_name): - HTMLParser.__init__(self) - self.ordered_js_files = [] - order_html = open(order_html_name, 'r') - self.feed(order_html.read()) - - def handle_starttag(self, tag, attrs): - if tag == 'script': - attrs_dict = dict(attrs) - if ('type' in attrs_dict and attrs_dict['type'] == 'text/javascript' and 'src' in attrs_dict): - self.ordered_js_files.append(attrs_dict['src']) - - -class PathExpander: - - def __init__(self, paths): - self.paths = paths - - def expand(self, filename): - last_path = None - expanded_name = None - for path in self.paths: - fname = "%s/%s" % (path, filename) - if (os.access(fname, os.F_OK)): - if (last_path != None): - raise Exception('Ambiguous file %s: found in %s and %s' % - (filename, last_path, path)) - expanded_name = fname - last_path = path - return expanded_name - - -def main(argv): - - if len(argv) < 3: - print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' - 'output_file' % argv[0]) - return 1 - - output_file_name = argv.pop() - input_order_file_name = argv[1] - extractor = OrderedJSFilesExtractor(input_order_file_name) - extractor.ordered_js_files.append('DevTools.js') - extractor.ordered_js_files.append('Tests.js') - - expander = PathExpander(argv[2:]) - output = StringIO() - - for input_file_name in extractor.ordered_js_files: - full_path = expander.expand(input_file_name) - if (full_path is None): - raise Exception('File %s referenced in %s not found on any source paths, ' - 'check source tree for consistency' % - (input_file_name, input_order_file_name)) - output.write('/* %s */\n\n' % input_file_name) - input_file = open(full_path, 'r') - output.write(input_file.read()) - output.write('\n') - input_file.close() - - output_file = open(output_file_name, 'w') - output_file.write(jsmin.jsmin(output.getvalue())) - output_file.close() - output.close() - - # Touch output file directory to make sure that Xcode will copy - # modified resource files. - if sys.platform == 'darwin': - output_dir_name = os.path.dirname(output_file_name) - os.utime(output_dir_name, None) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/WebKit/chromium/scripts/generate_devtools_html.py b/WebKit/chromium/scripts/generate_devtools_html.py deleted file mode 100644 index b9b5fff..0000000 --- a/WebKit/chromium/scripts/generate_devtools_html.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -import os.path -import sys - - -def GenerateIncludeTag(resource_path): - (dir_name, file_name) = os.path.split(resource_path) - if (file_name.endswith('.js')): - return ' <script type="text/javascript" src="%s"></script>\n' % file_name - elif (file_name.endswith('.css')): - return ' <link rel="stylesheet" type="text/css" href="%s">\n' % file_name - else: - assert resource_path - - -def main(argv): - - if len(argv) < 5: - print('usage: %s ignored inspector_html devtools_html debug' - ' css_and_js_files_list' % argv[0]) - return 1 - - # The first argument is ignored. We put 'webkit.gyp' in the inputs list - # for this script, so every time the list of script gets changed, our html - # file is rebuilt. - inspector_html_name = argv[2] - devtools_html_name = argv[3] - debug = argv[4] != '0' - inspector_html = open(inspector_html_name, 'r') - devtools_html = open(devtools_html_name, 'w') - - for line in inspector_html: - if not debug and '<script ' in line: - continue - if not debug and '<link ' in line: - continue - if '</head>' in line: - if debug: - for resource in argv[5:]: - devtools_html.write(GenerateIncludeTag(resource)) - else: - devtools_html.write(GenerateIncludeTag("devTools.css")) - devtools_html.write(GenerateIncludeTag("DevTools.js")) - devtools_html.write(line) - - devtools_html.close() - inspector_html.close() - - # Touch output file directory to make sure that Xcode will copy - # modified resource files. - if sys.platform == 'darwin': - output_dir_name = os.path.dirname(devtools_html_name) - os.utime(output_dir_name, None) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/WebKit/chromium/scripts/jsmin.py b/WebKit/chromium/scripts/jsmin.py deleted file mode 100644 index c2583a4..0000000 --- a/WebKit/chromium/scripts/jsmin.py +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2010 Google Inc. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# This is a Python port of Douglas Crockford's jsmin.cc. See original -# copyright notice below. -# -# Copyright (c) 2002 Douglas Crockford (www.crockford.com) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is furnished to do -# so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -from cStringIO import StringIO -import sys - - -class UnterminatedComment(Exception): - pass - - -class UnterminatedStringLiteral(Exception): - pass - - -class UnterminatedRegularExpression(Exception): - pass - - -EOF = '' - - -def jsmin(text): - minifier = JavaScriptMinifier() - minifier.input = StringIO(text) - minifier.output = StringIO() - minifier.jsmin() - return minifier.output.getvalue() - - -class JavaScriptMinifier(object): - - def isAlphanum(self, c): - """ return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. - """ - return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or - (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or - c > 126) - - def get(self): - """ return the next character from stdin. Watch out for lookahead. If - the character is a control character, translate it to a space or - linefeed. - """ - c = self.theLookahead - self.theLookahead = EOF - if c == EOF: - c = self.input.read(1) - if c >= ' ' or c == '\n' or c == EOF: - return c - if c == '\r': - return '\n' - return ' ' - - def peek(self): - """ get the next character without getting it. """ - self.theLookahead = self.get() - return self.theLookahead - - def next(self): - """ get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. - """ - c = self.get() - if c == '/': - peek = self.peek() - if peek == '/': - while True: - c = self.get() - if c <= '\n': - return c - elif peek == '*': - self.get() - while True: - get = self.get() - if get == '*': - if self.peek() == '/': - self.get() - return ' ' - elif get == EOF: - raise UnterminatedComment() - else: - return c - return c - - def putc(self, c): - self.output.write(c) - - def action(self, d): - """ do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. - """ - if d <= 1: - self.putc(self.theA) - if d <= 2: - self.theA = self.theB - if self.theA == '\'' or self.theA == '"': - while True: - self.putc(self.theA) - self.theA = self.get() - if self.theA == self.theB: - break - if self.theA == '\\': - self.putc(self.theA) - self.theA = self.get() - if self.theA == EOF: - raise UnterminatedString() - if d <= 3: - self.theB = self.next() - if self.theB == '/' and self.theA in ['(', ',', '=', ':', '[', '!', '&', '|', '?', '{', '}', ';', '\n']: - self.putc(self.theA) - self.putc(self.theB) - while True: - self.theA = self.get() - if self.theA == '/': - break - if self.theA == '\\': - self.putc(self.theA) - self.theA = self.get() - if self.theA == EOF: - raise UnterminatedRegularExpression() - self.putc(self.theA) - self.theB = self.next() - - def jsmin(self): - """ Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with linefeeds. - Most spaces and linefeeds will be removed. - """ - self.theA = '\n' - self.theLookahead = EOF - self.action(3) - while self.theA != EOF: - if self.theA == ' ': - if self.isAlphanum(self.theB): - self.action(1) - else: - self.action(2) - elif self.theA == '\n': - if self.theB in ['{', '[', '(', '+', '-']: - self.action(1) - elif self.theB == ' ': - self.action(3) - else: - if self.isAlphanum(self.theB): - self.action(1) - else: - self.action(2) - else: - if self.theB == ' ': - if self.isAlphanum(self.theA): - self.action(1) - else: - self.action(3) - elif self.theB == '\n': - if self.theA in ['}', ']', ')', '+', '-', '"', '\'']: - self.action(1) - else: - if self.isAlphanum(self.theA): - self.action(1) - else: - self.action(3) - else: - self.action(1) - - -if __name__ == '__main__': - minifier = JavaScriptMinifier() - minifier.input = sys.stdin - minifier.output = sys.stdout - minifier.jsmin() - sys.stdin.close() diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp deleted file mode 100644 index 85dfd20..0000000 --- a/WebKit/chromium/src/ApplicationCacheHost.cpp +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ApplicationCacheHost.h" - -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - -#include "ApplicationCacheHostInternal.h" -#include "DocumentLoader.h" -#include "DOMApplicationCache.h" -#include "Frame.h" -#include "InspectorApplicationCacheAgent.h" -#include "InspectorController.h" -#include "Page.h" -#include "ProgressEvent.h" -#include "Settings.h" -#include "WebURL.h" -#include "WebURLError.h" -#include "WebURLResponse.h" -#include "WebVector.h" -#include "WrappedResourceRequest.h" -#include "WrappedResourceResponse.h" - -using namespace WebKit; - -namespace WebCore { - -// We provide a custom implementation of this class that calls out to the -// embedding application instead of using WebCore's built in appcache system. -// This file replaces webcore/appcache/ApplicationCacheHost.cpp in our build. - -ApplicationCacheHost::ApplicationCacheHost(DocumentLoader* documentLoader) - : m_domApplicationCache(0) - , m_documentLoader(documentLoader) - , m_defersEvents(true) -{ - ASSERT(m_documentLoader); -} - -ApplicationCacheHost::~ApplicationCacheHost() -{ -} - -void ApplicationCacheHost::maybeLoadMainResource(ResourceRequest& request, SubstituteData&) -{ - // We defer creating the outer host object to avoid spurious creation/destruction - // around creating empty documents. At this point, we're initiating a main resource - // load for the document, so its for real. - - if (!isApplicationCacheEnabled()) - return; - - m_internal.set(new ApplicationCacheHostInternal(this)); - if (m_internal->m_outerHost) { - WrappedResourceRequest wrapped(request); - m_internal->m_outerHost->willStartMainResourceRequest(wrapped); - } else - m_internal.clear(); - - // NOTE: The semantics of this method, and others in this interface, are subtly different - // than the method names would suggest. For example, in this method never returns an appcached - // response in the SubstituteData out argument, instead we return the appcached response thru - // the usual resource loading pipeline. -} - -void ApplicationCacheHost::selectCacheWithoutManifest() -{ - if (m_internal) - m_internal->m_outerHost->selectCacheWithoutManifest(); -} - -void ApplicationCacheHost::selectCacheWithManifest(const KURL& manifestURL) -{ - if (m_internal) { - if (!m_internal->m_outerHost->selectCacheWithManifest(manifestURL)) { - // It's a foreign entry, restart the current navigation from the top - // of the navigation algorithm. The navigation will not result in the - // same resource being loaded, because "foreign" entries are never picked - // during navigation. - // see WebCore::ApplicationCacheGroup::selectCache() - Frame* frame = m_documentLoader->frame(); - frame->navigationScheduler()->scheduleLocationChange(frame->document()->securityOrigin(), - frame->document()->url(), frame->loader()->referrer()); - } - } -} - -void ApplicationCacheHost::maybeLoadMainResourceForRedirect(ResourceRequest&, SubstituteData&) -{ - // N/A to the chromium port -} - -bool ApplicationCacheHost::maybeLoadFallbackForMainResponse(const ResourceRequest&, const ResourceResponse& response) -{ - if (m_internal) { - WrappedResourceResponse wrapped(response); - m_internal->m_outerHost->didReceiveResponseForMainResource(wrapped); - } - return false; -} - -bool ApplicationCacheHost::maybeLoadFallbackForMainError(const ResourceRequest&, const ResourceError& error) -{ - // N/A to the chromium port - return false; -} - -void ApplicationCacheHost::mainResourceDataReceived(const char* data, int length, long long, bool) -{ - if (m_internal) - m_internal->m_outerHost->didReceiveDataForMainResource(data, length); -} - -void ApplicationCacheHost::failedLoadingMainResource() -{ - if (m_internal) - m_internal->m_outerHost->didFinishLoadingMainResource(false); -} - -void ApplicationCacheHost::finishedLoadingMainResource() -{ - if (m_internal) - m_internal->m_outerHost->didFinishLoadingMainResource(true); -} - -bool ApplicationCacheHost::maybeLoadResource(ResourceLoader*, ResourceRequest& request, const KURL&) -{ - // FIXME: look into the purpose of the unused KURL& originalURL parameter - if (m_internal) { - WrappedResourceRequest wrapped(request); - m_internal->m_outerHost->willStartSubResourceRequest(wrapped); - } - return false; -} - -bool ApplicationCacheHost::maybeLoadFallbackForRedirect(ResourceLoader*, ResourceRequest&, const ResourceResponse&) -{ - // N/A to the chromium port - return false; -} - -bool ApplicationCacheHost::maybeLoadFallbackForResponse(ResourceLoader*, const ResourceResponse&) -{ - // N/A to the chromium port - return false; -} - -bool ApplicationCacheHost::maybeLoadFallbackForError(ResourceLoader*, const ResourceError&) -{ - // N/A to the chromium port - return false; -} - -bool ApplicationCacheHost::maybeLoadSynchronously(ResourceRequest& request, ResourceError&, ResourceResponse&, Vector<char>&) -{ - if (m_internal) { - WrappedResourceRequest wrapped(request); - m_internal->m_outerHost->willStartSubResourceRequest(wrapped); - } - return false; -} - -void ApplicationCacheHost::maybeLoadFallbackSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector<char>&) -{ - // N/A to the chromium port -} - -bool ApplicationCacheHost::canCacheInPageCache() const -{ - // N/A to the chromium port which doesn't use the page cache. - return false; -} - -void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplicationCache) -{ - ASSERT(!m_domApplicationCache || !domApplicationCache); - m_domApplicationCache = domApplicationCache; -} - -void ApplicationCacheHost::notifyDOMApplicationCache(EventID id, int total, int done) -{ -#if ENABLE(INSPECTOR) - // If host's frame is main frame and inspector frontend is connected, update appcache status. - if (id != PROGRESS_EVENT && m_documentLoader->frame()) { - Page* page = m_documentLoader->frame()->page(); - if (page && page->inspectorController()->applicationCacheAgent() && page->mainFrame() == m_documentLoader->frame()) - page->inspectorController()->applicationCacheAgent()->updateApplicationCacheStatus(status()); - } -#endif - - if (m_defersEvents) { - // Event dispatching is deferred until document.onload has fired. - m_deferredEvents.append(DeferredEvent(id, total, done)); - return; - } - dispatchDOMEvent(id, total, done); -} - -#if ENABLE(INSPECTOR) -ApplicationCacheHost::CacheInfo ApplicationCacheHost::applicationCacheInfo() -{ - if (!m_internal) - return CacheInfo(KURL(), 0, 0, 0); - - WebKit::WebApplicationCacheHost::CacheInfo webInfo; - m_internal->m_outerHost->getAssociatedCacheInfo(&webInfo); - return CacheInfo(webInfo.manifestURL, webInfo.creationTime, webInfo.updateTime, webInfo.totalSize); -} - -void ApplicationCacheHost::fillResourceList(ResourceInfoList* resources) -{ - if (!m_internal) - return; - - WebKit::WebVector<WebKit::WebApplicationCacheHost::ResourceInfo> webResources; - m_internal->m_outerHost->getResourceList(&webResources); - for (size_t i = 0; i < webResources.size(); ++i) { - resources->append(ResourceInfo( - webResources[i].url, webResources[i].isMaster, webResources[i].isManifest, webResources[i].isFallback, - webResources[i].isForeign, webResources[i].isExplicit, webResources[i].size)); - } -} -#endif - -void ApplicationCacheHost::stopDeferringEvents() -{ - RefPtr<DocumentLoader> protect(documentLoader()); - for (unsigned i = 0; i < m_deferredEvents.size(); ++i) { - const DeferredEvent& deferred = m_deferredEvents[i]; - dispatchDOMEvent(deferred.eventID, deferred.progressTotal, deferred.progressDone); - } - m_deferredEvents.clear(); - m_defersEvents = false; -} - -void ApplicationCacheHost::stopLoadingInFrame(Frame* frame) -{ - // FIXME: Implement this method. -} - -void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done) -{ - if (m_domApplicationCache) { - const AtomicString& eventType = DOMApplicationCache::toEventType(id); - ExceptionCode ec = 0; - RefPtr<Event> event; - if (id == PROGRESS_EVENT) - event = ProgressEvent::create(eventType, true, done, total); - else - event = Event::create(eventType, false, false); - m_domApplicationCache->dispatchEvent(event, ec); - ASSERT(!ec); - } -} - -ApplicationCacheHost::Status ApplicationCacheHost::status() const -{ - return m_internal ? static_cast<Status>(m_internal->m_outerHost->status()) : UNCACHED; -} - -bool ApplicationCacheHost::update() -{ - return m_internal ? m_internal->m_outerHost->startUpdate() : false; -} - -bool ApplicationCacheHost::swapCache() -{ - return m_internal ? m_internal->m_outerHost->swapCache() : false; -} - -bool ApplicationCacheHost::isApplicationCacheEnabled() -{ - ASSERT(m_documentLoader->frame()); - return m_documentLoader->frame()->settings() - && m_documentLoader->frame()->settings()->offlineWebApplicationCacheEnabled(); -} - -} // namespace WebCore - -#endif // ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/WebKit/chromium/src/ApplicationCacheHostInternal.h b/WebKit/chromium/src/ApplicationCacheHostInternal.h deleted file mode 100644 index c88420b..0000000 --- a/WebKit/chromium/src/ApplicationCacheHostInternal.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ApplicationCacheHost.h" - -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - -#include "DocumentLoader.h" -#include "WebApplicationCacheHostClient.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebURL.h" - -namespace WebCore { - -class ApplicationCacheHostInternal : public WebKit::WebApplicationCacheHostClient { -public: - ApplicationCacheHostInternal(ApplicationCacheHost* host) - : m_innerHost(host) - { - WebKit::WebFrameImpl* webFrame = WebKit::WebFrameImpl::fromFrame(host->m_documentLoader->frame()); - ASSERT(webFrame); - m_outerHost.set(webFrame->client()->createApplicationCacheHost(webFrame, this)); - } - - virtual void didChangeCacheAssociation() - { - // FIXME: Prod the inspector to update it's notion of what cache the page is using. - } - - virtual void notifyEventListener(WebKit::WebApplicationCacheHost::EventID eventID) - { - m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID), 0, 0); - } - - virtual void notifyProgressEventListener(const WebKit::WebURL&, int progressTotal, int progressDone) - { - m_innerHost->notifyDOMApplicationCache(ApplicationCacheHost::PROGRESS_EVENT, progressTotal, progressDone); - } - - static WebKit::WebApplicationCacheHost* toWebApplicationCacheHost(ApplicationCacheHost* innerHost) - { - if (innerHost && innerHost->m_internal.get()) - return innerHost->m_internal->m_outerHost.get(); - return 0; - } - -private: - friend class ApplicationCacheHost; - ApplicationCacheHost* m_innerHost; - OwnPtr<WebKit::WebApplicationCacheHost> m_outerHost; -}; - -} - -#endif // ENABLE(OFFLINE_WEB_APPLICATIONS) diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp deleted file mode 100644 index 936b8db..0000000 --- a/WebKit/chromium/src/AssertMatchingEnums.cpp +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Use this file to assert that various WebKit API enum values continue -// matching WebCore defined enum values. - -#include "config.h" - -#include "AccessibilityObject.h" -#include "ApplicationCacheHost.h" -#include "AsyncFileSystem.h" -#include "EditorInsertAction.h" -#include "FileError.h" -#include "FileMetadata.h" -#include "FontDescription.h" -#include "FontSmoothingMode.h" -#include "GeolocationError.h" -#include "GeolocationPosition.h" -#include "HTMLInputElement.h" -#include "IDBKey.h" -#include "MediaPlayer.h" -#include "NotificationPresenter.h" -#include "PasteboardPrivate.h" -#include "PlatformCursor.h" -#include "Settings.h" -#include "TextAffinity.h" -#include "UserContentTypes.h" -#include "UserScriptTypes.h" -#include "UserStyleSheetTypes.h" -#include "VideoFrameChromium.h" -#include "WebAccessibilityObject.h" -#include "WebApplicationCacheHost.h" -#include "WebClipboard.h" -#include "WebCursorInfo.h" -#include "WebEditingAction.h" -#include "WebFileError.h" -#include "WebFileInfo.h" -#include "WebFileSystem.h" -#include "WebFontDescription.h" -#include "WebGeolocationError.h" -#include "WebGeolocationPosition.h" -#include "WebIDBKey.h" -#include "WebInputElement.h" -#include "WebMediaPlayer.h" -#include "WebNotificationPresenter.h" -#include "WebScrollbar.h" -#include "WebSettings.h" -#include "WebTextAffinity.h" -#include "WebTextCaseSensitivity.h" -#include "WebVideoFrame.h" -#include "WebView.h" -#include <wtf/Assertions.h> -#include <wtf/text/StringImpl.h> - -#if OS(DARWIN) -#include "ChromiumBridge.h" -#include "mac/WebThemeEngine.h" -#endif - -#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \ - COMPILE_ASSERT(int(WebKit::webkit_name) == int(WebCore::webcore_name), mismatching_enums) - -// These constants are in WTF, bring them into WebCore so the ASSERT still works for them! -namespace WebCore { - using WTF::TextCaseSensitive; - using WTF::TextCaseInsensitive; -}; - -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUnknown, UnknownRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleButton, ButtonRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRadioButton, RadioButtonRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCheckBox, CheckBoxRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSlider, SliderRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabGroup, TabGroupRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTextField, TextFieldRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleStaticText, StaticTextRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTextArea, TextAreaRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleScrollArea, ScrollAreaRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRolePopUpButton, PopUpButtonRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuButton, MenuButtonRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTable, TableRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplication, ApplicationRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleGroup, GroupRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRadioGroup, RadioGroupRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleList, ListRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleScrollBar, ScrollBarRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleValueIndicator, ValueIndicatorRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImage, ImageRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuBar, MenuBarRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenu, MenuRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuItem, MenuItemRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleColumn, ColumnRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRow, RowRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleToolbar, ToolbarRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleBusyIndicator, BusyIndicatorRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleProgressIndicator, ProgressIndicatorRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWindow, WindowRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDrawer, DrawerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSystemWide, SystemWideRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleOutline, OutlineRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleIncrementor, IncrementorRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleBrowser, BrowserRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleComboBox, ComboBoxRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSplitGroup, SplitGroupRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSplitter, SplitterRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleColorWell, ColorWellRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleGrowArea, GrowAreaRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSheet, SheetRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleHelpTag, HelpTagRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMatte, MatteRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRuler, RulerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRulerMarker, RulerMarkerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLink, LinkRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDisclosureTriangle, DisclosureTriangleRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleGrid, GridRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCell, CellRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleColumnHeader, ColumnHeaderRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleRowHeader, RowHeaderRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebCoreLink, WebCoreLinkRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImageMapLink, ImageMapLinkRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleImageMap, ImageMapRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListMarker, ListMarkerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleWebArea, WebAreaRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleHeading, HeadingRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBox, ListBoxRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListBoxOption, ListBoxOptionRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListOption, MenuListOptionRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleMenuListPopup, MenuListPopupRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTableHeaderContainer, TableHeaderContainerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListTerm, DefinitionListTermRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDefinitionListDefinition, DefinitionListDefinitionRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleAnnotation, AnnotationRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleSliderThumb, SliderThumbRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleIgnored, IgnoredRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRolePresentational, PresentationalRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTab, TabRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabList, TabListRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTabPanel, TabPanelRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeRole, TreeRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeGrid, TreeGridRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleTreeItemRole, TreeItemRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDirectory, DirectoryRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleEditableText, EditableTextRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleListItem, ListItemRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkApplication, LandmarkApplicationRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkBanner, LandmarkBannerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkComplementary, LandmarkComplementaryRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkContentInfo, LandmarkContentInfoRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkMain, LandmarkMainRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkNavigation, LandmarkNavigationRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLandmarkSearch, LandmarkSearchRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationAlert, ApplicationAlertRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationAlertDialog, ApplicationAlertDialogRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationDialog, ApplicationDialogRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationLog, ApplicationLogRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationMarquee, ApplicationMarqueeRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationStatus, ApplicationStatusRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleApplicationTimer, ApplicationTimerRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocument, DocumentRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentArticle, DocumentArticleRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentMath, DocumentMathRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentNote, DocumentNoteRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentRegion, DocumentRegionRole); -COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUserInterfaceTooltip, UserInterfaceTooltipRole); - -#if ENABLE(OFFLINE_WEB_APPLICATIONS) -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Idle, ApplicationCacheHost::IDLE); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Checking, ApplicationCacheHost::CHECKING); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Downloading, ApplicationCacheHost::DOWNLOADING); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::UpdateReady, ApplicationCacheHost::UPDATEREADY); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Obsolete, ApplicationCacheHost::OBSOLETE); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CheckingEvent, ApplicationCacheHost::CHECKING_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ErrorEvent, ApplicationCacheHost::ERROR_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::NoUpdateEvent, ApplicationCacheHost::NOUPDATE_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::DownloadingEvent, ApplicationCacheHost::DOWNLOADING_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ProgressEvent, ApplicationCacheHost::PROGRESS_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::UpdateReadyEvent, ApplicationCacheHost::UPDATEREADY_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::CachedEvent, ApplicationCacheHost::CACHED_EVENT); -COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::ObsoleteEvent, ApplicationCacheHost::OBSOLETE_EVENT); -#endif - -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatHTML, PasteboardPrivate::HTMLFormat); -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatBookmark, PasteboardPrivate::BookmarkFormat); -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::FormatSmartPaste, PasteboardPrivate::WebSmartPasteFormat); - -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferStandard, PasteboardPrivate::StandardBuffer); -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferSelection, PasteboardPrivate::SelectionBuffer); -COMPILE_ASSERT_MATCHING_ENUM(WebClipboard::BufferDrag, PasteboardPrivate::DragBuffer); - -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypePointer, PlatformCursor::TypePointer); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCross, PlatformCursor::TypeCross); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHand, PlatformCursor::TypeHand); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeIBeam, PlatformCursor::TypeIBeam); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWait, PlatformCursor::TypeWait); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeHelp, PlatformCursor::TypeHelp); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastResize, PlatformCursor::TypeEastResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthResize, PlatformCursor::TypeNorthResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastResize, PlatformCursor::TypeNorthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestResize, PlatformCursor::TypeNorthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthResize, PlatformCursor::TypeSouthResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastResize, PlatformCursor::TypeSouthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestResize, PlatformCursor::TypeSouthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestResize, PlatformCursor::TypeWestResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthSouthResize, PlatformCursor::TypeNorthSouthResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastWestResize, PlatformCursor::TypeEastWestResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastSouthWestResize, PlatformCursor::TypeNorthEastSouthWestResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestSouthEastResize, PlatformCursor::TypeNorthWestSouthEastResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeColumnResize, PlatformCursor::TypeColumnResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeRowResize, PlatformCursor::TypeRowResize); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMiddlePanning, PlatformCursor::TypeMiddlePanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeEastPanning, PlatformCursor::TypeEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthPanning, PlatformCursor::TypeNorthPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthEastPanning, PlatformCursor::TypeNorthEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNorthWestPanning, PlatformCursor::TypeNorthWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthPanning, PlatformCursor::TypeSouthPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthEastPanning, PlatformCursor::TypeSouthEastPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeSouthWestPanning, PlatformCursor::TypeSouthWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeWestPanning, PlatformCursor::TypeWestPanning); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeMove, PlatformCursor::TypeMove); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeVerticalText, PlatformCursor::TypeVerticalText); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCell, PlatformCursor::TypeCell); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeContextMenu, PlatformCursor::TypeContextMenu); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeAlias, PlatformCursor::TypeAlias); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeProgress, PlatformCursor::TypeProgress); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNoDrop, PlatformCursor::TypeNoDrop); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCopy, PlatformCursor::TypeCopy); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNone, PlatformCursor::TypeNone); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeNotAllowed, PlatformCursor::TypeNotAllowed); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomIn, PlatformCursor::TypeZoomIn); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeZoomOut, PlatformCursor::TypeZoomOut); -COMPILE_ASSERT_MATCHING_ENUM(WebCursorInfo::TypeCustom, PlatformCursor::TypeCustom); - -COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionTyped, EditorInsertActionTyped); -COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionPasted, EditorInsertActionPasted); -COMPILE_ASSERT_MATCHING_ENUM(WebEditingActionDropped, EditorInsertActionDropped); - -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyNone, FontDescription::NoFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyStandard, FontDescription::StandardFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySerif, FontDescription::SerifFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilySansSerif, FontDescription::SansSerifFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyMonospace, FontDescription::MonospaceFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyCursive, FontDescription::CursiveFamily); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::GenericFamilyFantasy, FontDescription::FantasyFamily); - -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingAuto, AutoSmoothing); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingNone, NoSmoothing); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingGrayscale, Antialiased); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::SmoothingSubpixel, SubpixelAntialiased); - -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight100, FontWeight100); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight200, FontWeight200); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight300, FontWeight300); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight400, FontWeight400); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight500, FontWeight500); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight600, FontWeight600); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight700, FontWeight700); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight800, FontWeight800); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight900, FontWeight900); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal); -COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold); - -COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::CDataSectionNode, Node::CDATA_SECTION_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityReferenceNode, Node::ENTITY_REFERENCE_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::EntityNode, Node::ENTITY_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::ProcessingInstructionsNode, Node::PROCESSING_INSTRUCTION_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::CommentNode, Node::COMMENT_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentNode, Node::DOCUMENT_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentTypeNode, Node::DOCUMENT_TYPE_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::DocumentFragmentNode, Node::DOCUMENT_FRAGMENT_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::NotationNode, Node::NOTATION_NODE); -COMPILE_ASSERT_MATCHING_ENUM(WebNode::XPathNamespaceNode, Node::XPATH_NAMESPACE_NODE); - -#if ENABLE(VIDEO) -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Empty, MediaPlayer::Empty); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Idle, MediaPlayer::Idle); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loading, MediaPlayer::Loading); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Loaded, MediaPlayer::Loaded); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::FormatError, MediaPlayer::FormatError); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::NetworkError, MediaPlayer::NetworkError); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::DecodeError, MediaPlayer::DecodeError); - -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveNothing, MediaPlayer::HaveNothing); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveMetadata, MediaPlayer::HaveMetadata); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveCurrentData, MediaPlayer::HaveCurrentData); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveFutureData, MediaPlayer::HaveFutureData); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::HaveEnoughData, MediaPlayer::HaveEnoughData); - -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Unknown, MediaPlayer::Unknown); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Download, MediaPlayer::Download); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::StoredStream, MediaPlayer::StoredStream); -COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::LiveStream, MediaPlayer::LiveStream); - -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatInvalid, VideoFrameChromium::Invalid); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB555, VideoFrameChromium::RGB555); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB565, VideoFrameChromium::RGB565); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB24, VideoFrameChromium::RGB24); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB32, VideoFrameChromium::RGB32); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGBA, VideoFrameChromium::RGBA); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV12, VideoFrameChromium::YV12); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV16, VideoFrameChromium::YV16); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatNV12, VideoFrameChromium::NV12); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatEmpty, VideoFrameChromium::Empty); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatASCII, VideoFrameChromium::ASCII); - -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeSystemMemory, VideoFrameChromium::TypeSystemMemory); -COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeTexture, VideoFrameChromium::TypeTexture); -#endif - -#if ENABLE(NOTIFICATIONS) -COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionAllowed, NotificationPresenter::PermissionAllowed); -COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionNotAllowed, NotificationPresenter::PermissionNotAllowed); -COMPILE_ASSERT_MATCHING_ENUM(WebNotificationPresenter::PermissionDenied, NotificationPresenter::PermissionDenied); -#endif - -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::Horizontal, HorizontalScrollbar); -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::Vertical, VerticalScrollbar); - -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::ScrollByLine, ScrollByLine); -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::ScrollByPage, ScrollByPage); -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::ScrollByDocument, ScrollByDocument); -COMPILE_ASSERT_MATCHING_ENUM(WebScrollbar::ScrollByPixel, ScrollByPixel); - -COMPILE_ASSERT_MATCHING_ENUM(WebSettings::EditingBehaviorMac, EditingMacBehavior); -COMPILE_ASSERT_MATCHING_ENUM(WebSettings::EditingBehaviorWin, EditingWindowsBehavior); -COMPILE_ASSERT_MATCHING_ENUM(WebSettings::EditingBehaviorUnix, EditingUnixBehavior); - -COMPILE_ASSERT_MATCHING_ENUM(WebTextAffinityUpstream, UPSTREAM); -COMPILE_ASSERT_MATCHING_ENUM(WebTextAffinityDownstream, DOWNSTREAM); - -COMPILE_ASSERT_MATCHING_ENUM(WebTextCaseSensitive, TextCaseSensitive); -COMPILE_ASSERT_MATCHING_ENUM(WebTextCaseInsensitive, TextCaseInsensitive); - -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentStart, InjectAtDocumentStart); -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentEnd, InjectAtDocumentEnd); -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInAllFrames, InjectInAllFrames); -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInTopFrameOnly); -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInExistingDocuments, InjectInExistingDocuments); -COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, InjectInSubsequentDocuments); - -COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType); -COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType); -COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::DateType, IDBKey::DateType); -COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType); - -#if ENABLE(FILE_SYSTEM) -COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary); -COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent); -COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeUnknown, FileMetadata::TypeUnknown); -COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeFile, FileMetadata::TypeFile); -COMPILE_ASSERT_MATCHING_ENUM(WebFileInfo::TypeDirectory, FileMetadata::TypeDirectory); -#endif - -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNotFound, FileError::NOT_FOUND_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorSecurity, FileError::SECURITY_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorAbort, FileError::ABORT_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNotReadable, FileError::NOT_READABLE_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorEncoding, FileError::ENCODING_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNoModificationAllowed, FileError::NO_MODIFICATION_ALLOWED_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidState, FileError::INVALID_STATE_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorSyntax, FileError::SYNTAX_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidModification, FileError::INVALID_MODIFICATION_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorQuotaExceeded, FileError::QUOTA_EXCEEDED_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorTypeMismatch, FileError::TYPE_MISMATCH_ERR); -COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR); - -#if ENABLE(CLIENT_BASED_GEOLOCATION) -COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied); -COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable); -#endif - -#if OS(DARWIN) -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, ChromiumBridge::StateDisabled); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateInactive, ChromiumBridge::StateInactive); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateActive, ChromiumBridge::StateActive); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StatePressed, ChromiumBridge::StatePressed); - -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeRegular, ChromiumBridge::SizeRegular); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::SizeSmall, ChromiumBridge::SizeSmall); - -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationHorizontal, ChromiumBridge::ScrollbarOrientationHorizontal); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarOrientationVertical, ChromiumBridge::ScrollbarOrientationVertical); - -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentScrollView, ChromiumBridge::ScrollbarParentScrollView); -COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::ScrollbarParentRenderLayer, ChromiumBridge::ScrollbarParentRenderLayer); -#endif diff --git a/WebKit/chromium/src/AssociatedURLLoader.cpp b/WebKit/chromium/src/AssociatedURLLoader.cpp deleted file mode 100644 index 34a4055..0000000 --- a/WebKit/chromium/src/AssociatedURLLoader.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "AssociatedURLLoader.h" - -#include "WebApplicationCacheHost.h" -#include "WebDataSource.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebURLRequest.h" - -namespace WebKit { - -AssociatedURLLoader::AssociatedURLLoader(PassRefPtr<WebFrameImpl> frameImpl) - : m_frameImpl(frameImpl), - m_realLoader(webKitClient()->createURLLoader()), - m_realClient(0) -{ -} - -AssociatedURLLoader::~AssociatedURLLoader() -{ -} - -void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURLResponse& response, WebURLError& error, WebData& data) -{ - ASSERT(!m_realClient); - - WebURLRequest requestCopy(request); - prepareRequest(requestCopy); - - m_realLoader->loadSynchronously(requestCopy, response, error, data); -} - -void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebURLLoaderClient* client) -{ - ASSERT(!m_realClient); - - WebURLRequest requestCopy(request); - prepareRequest(requestCopy); - - m_realClient = client; - m_realLoader->loadAsynchronously(requestCopy, this); -} - -void AssociatedURLLoader::cancel() -{ - m_realLoader->cancel(); -} - -void AssociatedURLLoader::setDefersLoading(bool defersLoading) -{ - m_realLoader->setDefersLoading(defersLoading); -} - -void AssociatedURLLoader::prepareRequest(WebURLRequest& request) -{ - WebApplicationCacheHost* applicationCacheHost = m_frameImpl->dataSource()->applicationCacheHost(); - if (applicationCacheHost) - applicationCacheHost->willStartSubResourceRequest(request); - m_frameImpl->dispatchWillSendRequest(request); -} - -void AssociatedURLLoader::willSendRequest(WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse) -{ - m_realClient->willSendRequest(this, newRequest, redirectResponse); -} - -void AssociatedURLLoader::didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) -{ - m_realClient->didSendData(this, bytesSent, totalBytesToBeSent); -} - -void AssociatedURLLoader::didReceiveResponse(WebURLLoader*, const WebURLResponse& response) -{ - m_realClient->didReceiveResponse(this, response); -} - -void AssociatedURLLoader::didDownloadData(WebURLLoader*, int dataLength) -{ - m_realClient->didDownloadData(this, dataLength); -} - -void AssociatedURLLoader::didReceiveData(WebURLLoader*, const char* data, int dataLength) -{ - m_realClient->didReceiveData(this, data, dataLength); -} - -void AssociatedURLLoader::didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) -{ - m_realClient->didReceiveCachedMetadata(this, data, dataLength); -} - -void AssociatedURLLoader::didFinishLoading(WebURLLoader*, double finishTime) -{ - m_realClient->didFinishLoading(this, finishTime); -} - -void AssociatedURLLoader::didFail(WebURLLoader*, const WebURLError& error) -{ - m_realClient->didFail(this, error); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/AssociatedURLLoader.h b/WebKit/chromium/src/AssociatedURLLoader.h deleted file mode 100644 index 91cb0bf..0000000 --- a/WebKit/chromium/src/AssociatedURLLoader.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef AssociatedURLLoader_h -#define AssociatedURLLoader_h - -#include "WebURLLoader.h" -#include "WebURLLoaderClient.h" -#include <wtf/OwnPtr.h> -#include <wtf/RefPtr.h> - -namespace WebKit { - -class WebFrameImpl; - -// This class is used to implement WebFrame::createAssociatedURLLoader. -// FIXME: Implement in terms of WebCore::SubresourceLoader. -class AssociatedURLLoader : public WebURLLoader, - public WebURLLoaderClient { -public: - AssociatedURLLoader(PassRefPtr<WebFrameImpl>); - ~AssociatedURLLoader(); - - // WebURLLoader methods: - virtual void loadSynchronously(const WebURLRequest&, WebURLResponse&, WebURLError&, WebData&); - virtual void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*); - virtual void cancel(); - virtual void setDefersLoading(bool); - - // WebURLLoaderClient methods: - virtual void willSendRequest(WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse); - virtual void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent); - virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&); - virtual void didDownloadData(WebURLLoader*, int dataLength); - virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength); - virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength); - virtual void didFinishLoading(WebURLLoader*, double finishTime); - virtual void didFail(WebURLLoader*, const WebURLError&); - -private: - void prepareRequest(WebURLRequest&); - - RefPtr<WebFrameImpl> m_frameImpl; - OwnPtr<WebURLLoader> m_realLoader; - WebURLLoaderClient* m_realClient; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp deleted file mode 100644 index 5975e72..0000000 --- a/WebKit/chromium/src/AsyncFileSystemChromium.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "config.h" -#include "AsyncFileSystemChromium.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystemCallbacks.h" -#include "AsyncFileWriterChromium.h" -#include "WebFileInfo.h" -#include "WebFileSystem.h" -#include "WebFileSystemCallbacksImpl.h" -#include "WebFileWriter.h" -#include "WebKit.h" -#include "WebKitClient.h" - -#include <wtf/text/CString.h> - -namespace WebCore { - -bool AsyncFileSystem::isAvailable() -{ - return true; -} - -AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath) - : AsyncFileSystem(rootPath) - , m_webFileSystem(WebKit::webKitClient()->fileSystem()) -{ - ASSERT(m_webFileSystem); -} - -AsyncFileSystemChromium::~AsyncFileSystemChromium() -{ -} - -void AsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->move(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->copy(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->removeRecursively(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->createFile(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->createDirectory(path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->fileExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->directoryExists(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks)); -} - -class FileWriterHelperCallbacks : public WebKit::WebFileSystemCallbacks { -public: - FileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks) - : m_client(client) - , m_path(path) - , m_webFileSystem(webFileSystem) - , m_callbacks(callbacks) - { - } - - virtual void didSucceed() - { - ASSERT_NOT_REACHED(); - delete this; - } - virtual void didReadMetadata(const WebKit::WebFileInfo& info) - { - ASSERT(m_callbacks); - if (info.type != WebKit::WebFileInfo::TypeFile || info.length < 0) - m_callbacks->didFail(WebKit::WebFileErrorInvalidState); - else { - OwnPtr<AsyncFileWriterChromium> asyncFileWriterChromium = adoptPtr(new AsyncFileWriterChromium(m_client)); - OwnPtr<WebKit::WebFileWriter> webFileWriter = adoptPtr(m_webFileSystem->createFileWriter(m_path, asyncFileWriterChromium.get())); - asyncFileWriterChromium->setWebFileWriter(webFileWriter.release()); - m_callbacks->didCreateFileWriter(asyncFileWriterChromium.release(), info.length); - } - delete this; - } - - virtual void didReadDirectory(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries, bool hasMore) - { - ASSERT_NOT_REACHED(); - delete this; - } - virtual void didOpenFileSystem(const WebKit::WebString& name, const WebKit::WebString& rootPath) - { - ASSERT_NOT_REACHED(); - delete this; - } - - virtual void didFail(WebKit::WebFileError error) - { - ASSERT(m_callbacks); - m_callbacks->didFail(error); - delete this; - } - -private: - AsyncFileWriterClient* m_client; - String m_path; - WebKit::WebFileSystem* m_webFileSystem; - OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; -}; - -void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - m_webFileSystem->readMetadata(path, new FileWriterHelperCallbacks(client, path, m_webFileSystem, callbacks)); -} - -} // namespace WebCore - -#endif diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h deleted file mode 100644 index 6205609..0000000 --- a/WebKit/chromium/src/AsyncFileSystemChromium.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef AsyncFileSystemChromium_h -#define AsyncFileSystemChromium_h - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystem.h" -#include <wtf/PassOwnPtr.h> - -namespace WebKit { -class WebFileSystem; -} - -namespace WebCore { - -class AsyncFileSystemCallbacks; - -class AsyncFileSystemChromium : public AsyncFileSystem { -public: - static PassOwnPtr<AsyncFileSystem> create(const String& rootPath) - { - return adoptPtr(new AsyncFileSystemChromium(rootPath)); - } - - virtual ~AsyncFileSystemChromium(); - - virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - -private: - explicit AsyncFileSystemChromium(const String& rootPath); - WebKit::WebFileSystem* m_webFileSystem; -}; - -} // namespace WebCore - -#endif - -#endif // AsyncFileSystemChromium_h diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.cpp b/WebKit/chromium/src/AsyncFileWriterChromium.cpp deleted file mode 100644 index 71cf3b5..0000000 --- a/WebKit/chromium/src/AsyncFileWriterChromium.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "AsyncFileWriterChromium.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileWriterClient.h" -#include "Blob.h" -#include "WebFileWriter.h" -#include "WebURL.h" - -namespace WebCore { - -AsyncFileWriterChromium::AsyncFileWriterChromium(AsyncFileWriterClient* client) - : m_client(client) -{ -} - -AsyncFileWriterChromium::~AsyncFileWriterChromium() -{ -} - -void AsyncFileWriterChromium::setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer) -{ - m_writer = writer; -} - -void AsyncFileWriterChromium::write(long long position, Blob* data) -{ - ASSERT(m_writer); - m_writer->write(position, WebKit::WebURL(data->url())); -} - -void AsyncFileWriterChromium::truncate(long long length) -{ - ASSERT(m_writer); - m_writer->truncate(length); -} - -void AsyncFileWriterChromium::abort() -{ - ASSERT(m_writer); - m_writer->cancel(); -} - -void AsyncFileWriterChromium::didWrite(long long bytes, bool complete) -{ - ASSERT(m_writer); - m_client->didWrite(bytes, complete); -} - -void AsyncFileWriterChromium::didTruncate() -{ - m_client->didTruncate(); -} - -void AsyncFileWriterChromium::didFail(WebKit::WebFileError error) -{ - m_client->didFail(static_cast<FileError::ErrorCode>(error)); -} - -} // namespace - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.h b/WebKit/chromium/src/AsyncFileWriterChromium.h deleted file mode 100644 index 71a2f18..0000000 --- a/WebKit/chromium/src/AsyncFileWriterChromium.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef AsyncFileWriterChromium_h -#define AsyncFileWriterChromium_h - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileWriter.h" -#include "WebFileError.h" -#include "WebFileWriterClient.h" -#include <wtf/PassOwnPtr.h> - -namespace WebKit { -class WebFileWriter; -} - -namespace WebCore { - -class Blob; -class AsyncFileWriterClient; - -class AsyncFileWriterChromium : public AsyncFileWriter, public WebKit::WebFileWriterClient { -public: - AsyncFileWriterChromium(AsyncFileWriterClient* client); - ~AsyncFileWriterChromium(); - - void setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer); - - // FileWriter - virtual void write(long long position, Blob* data); - virtual void truncate(long long length); - virtual void abort(); - - // WebFileWriterClient - virtual void didWrite(long long bytes, bool complete); - virtual void didTruncate(); - virtual void didFail(WebKit::WebFileError); - -private: - OwnPtr<WebKit::WebFileWriter> m_writer; - AsyncFileWriterClient* m_client; -}; - -} // namespace - -#endif // ENABLE(FILE_SYSTEM) - -#endif // AsyncFileWriterChromium_h diff --git a/WebKit/chromium/src/AudioDestinationChromium.cpp b/WebKit/chromium/src/AudioDestinationChromium.cpp deleted file mode 100644 index bed2562..0000000 --- a/WebKit/chromium/src/AudioDestinationChromium.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(WEB_AUDIO) - -#include "AudioDestinationChromium.h" - -#include "AudioSourceProvider.h" -#include "WebKit.h" -#include "WebKitClient.h" - -using namespace WebKit; - -namespace WebCore { - -// Buffer size that the Chromium audio system will call us back with. -// This value may need to be tuned based on the OS. -// FIXME: It may be possible to reduce this value once real-time threads -// and other Chromium audio improvements are made. -const unsigned callbackBufferSize = 2048; - -// Buffer size at which the web audio engine will render. -const unsigned renderBufferSize = 128; - -const unsigned renderCountPerCallback = callbackBufferSize / renderBufferSize; - -// FIXME: add support for multi-channel. -const unsigned numberOfChannels = 2; - -// Factory method: Chromium-implementation -PassOwnPtr<AudioDestination> AudioDestination::create(AudioSourceProvider& provider, double sampleRate) -{ - return adoptPtr(new AudioDestinationChromium(provider, sampleRate)); -} - -AudioDestinationChromium::AudioDestinationChromium(AudioSourceProvider& provider, double sampleRate) - : m_provider(provider) - , m_renderBus(numberOfChannels, renderBufferSize, false) - , m_sampleRate(sampleRate) - , m_isPlaying(false) -{ - m_audioDevice = adoptPtr(webKitClient()->createAudioDevice(callbackBufferSize, numberOfChannels, sampleRate, this)); - ASSERT(m_audioDevice.get()); -} - -AudioDestinationChromium::~AudioDestinationChromium() -{ - stop(); -} - -void AudioDestinationChromium::start() -{ - if (!m_isPlaying && m_audioDevice.get()) { - m_audioDevice->start(); - m_isPlaying = true; - } -} - -void AudioDestinationChromium::stop() -{ - if (m_isPlaying && m_audioDevice.get()) { - m_audioDevice->stop(); - m_isPlaying = false; - } -} - -double AudioDestination::hardwareSampleRate() -{ - // FIXME: implement this properly for Chromium. - return 44100.0; -} - -// Pulls on our provider to get the rendered audio stream. -void AudioDestinationChromium::render(const WebVector<float*>& audioData, size_t numberOfFrames) -{ - bool isNumberOfChannelsGood = audioData.size() == numberOfChannels; - if (!isNumberOfChannelsGood) { - ASSERT_NOT_REACHED(); - return; - } - - bool isBufferSizeGood = numberOfFrames == callbackBufferSize; - if (!isBufferSizeGood) { - ASSERT_NOT_REACHED(); - return; - } - - // Split up the callback buffer into smaller chunks which we'll render one after the other. - for (unsigned i = 0; i < renderCountPerCallback; ++i) { - m_renderBus.setChannelMemory(0, audioData[0] + i * renderBufferSize, renderBufferSize); - m_renderBus.setChannelMemory(1, audioData[1] + i * renderBufferSize, renderBufferSize); - m_provider.provideInput(&m_renderBus, renderBufferSize); - } -} - -} // namespace WebCore - -#endif // ENABLE(WEB_AUDIO) diff --git a/WebKit/chromium/src/AudioDestinationChromium.h b/WebKit/chromium/src/AudioDestinationChromium.h deleted file mode 100644 index a2a2b58..0000000 --- a/WebKit/chromium/src/AudioDestinationChromium.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef AudioDestinationChromium_h -#define AudioDestinationChromium_h - -#include "AudioBus.h" -#include "AudioDestination.h" -#include "WebAudioDevice.h" -#include "WebVector.h" - -namespace WebKit { class WebAudioDevice; } - -namespace WebCore { - -// An AudioDestination using Chromium's audio system - -class AudioDestinationChromium : public AudioDestination, public WebKit::WebAudioDevice::RenderCallback { -public: - AudioDestinationChromium(AudioSourceProvider&, double sampleRate); - virtual ~AudioDestinationChromium(); - - virtual void start(); - virtual void stop(); - bool isPlaying() { return m_isPlaying; } - - double sampleRate() const { return m_sampleRate; } - - // WebKit::WebAudioDevice::RenderCallback - virtual void render(const WebKit::WebVector<float*>& audioData, size_t numberOfFrames); - -private: - AudioSourceProvider& m_provider; - AudioBus m_renderBus; - double m_sampleRate; - bool m_isPlaying; - OwnPtr<WebKit::WebAudioDevice> m_audioDevice; -}; - -} // namespace WebCore - -#endif // AudioDestinationChromium_h diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp deleted file mode 100644 index 704ba69..0000000 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "AutoFillPopupMenuClient.h" - -#include "CSSStyleSelector.h" -#include "CSSValueKeywords.h" -#include "Chrome.h" -#include "FrameView.h" -#include "HTMLInputElement.h" -#include "RenderTheme.h" -#include "WebNode.h" -#include "WebString.h" -#include "WebVector.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -using namespace WebCore; - -namespace WebKit { - -AutoFillPopupMenuClient::AutoFillPopupMenuClient() - : m_separatorIndex(-1) - , m_selectedIndex(-1) - , m_textField(0) -{ -} - -AutoFillPopupMenuClient::~AutoFillPopupMenuClient() -{ -} - -unsigned AutoFillPopupMenuClient::getSuggestionsCount() const -{ - return m_names.size() + ((m_separatorIndex == -1) ? 0 : 1); -} - -WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const -{ - int index = convertListIndexToInternalIndex(listIndex); - if (index == -1) - return WebString(); - - ASSERT(index >= 0 && static_cast<size_t>(index) < m_names.size()); - return m_names[index]; -} - -WebString AutoFillPopupMenuClient::getLabel(unsigned listIndex) const -{ - int index = convertListIndexToInternalIndex(listIndex); - if (index == -1) - return WebString(); - - ASSERT(index >= 0 && static_cast<size_t>(index) < m_labels.size()); - return m_labels[index]; -} - -WebString AutoFillPopupMenuClient::getIcon(unsigned listIndex) const -{ - int index = convertListIndexToInternalIndex(listIndex); - if (index == -1) - return WebString(); - - ASSERT(index >= 0 && static_cast<size_t>(index) < m_icons.size()); - return m_icons[index]; -} - -void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex) -{ - if (!canRemoveSuggestionAtIndex(listIndex)) - return; - - int index = convertListIndexToInternalIndex(listIndex); - - ASSERT(static_cast<unsigned>(index) < m_names.size()); - - m_names.remove(index); - m_labels.remove(index); - m_icons.remove(index); - m_uniqueIDs.remove(index); - - // Shift the separator index if necessary. - if (m_separatorIndex != -1) - m_separatorIndex--; -} - -bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex) -{ - // Only allow deletion of items before the separator that have unique id 0 - // (i.e. are autocomplete rather than autofill items). - int index = convertListIndexToInternalIndex(listIndex); - return !m_uniqueIDs[index] && (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex)); -} - -void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents) -{ - WebViewImpl* webView = getWebView(); - if (!webView) - return; - - if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex)) - --listIndex; - - ASSERT(listIndex < m_names.size()); - - webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()), - m_names[listIndex], - m_labels[listIndex], - m_uniqueIDs[listIndex], - listIndex); -} - -void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents) -{ - WebViewImpl* webView = getWebView(); - if (!webView) - return; - - if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex)) - --listIndex; - - ASSERT(listIndex < m_names.size()); - - webView->client()->didSelectAutoFillSuggestion(WebNode(getTextField()), - m_names[listIndex], - m_labels[listIndex], - m_uniqueIDs[listIndex]); -} - -void AutoFillPopupMenuClient::selectionCleared() -{ - WebViewImpl* webView = getWebView(); - if (webView) - webView->client()->didClearAutoFillSelection(WebNode(getTextField())); -} - -String AutoFillPopupMenuClient::itemText(unsigned listIndex) const -{ - return getSuggestion(listIndex); -} - -String AutoFillPopupMenuClient::itemLabel(unsigned listIndex) const -{ - return getLabel(listIndex); -} - -String AutoFillPopupMenuClient::itemIcon(unsigned listIndex) const -{ - return getIcon(listIndex); -} - -bool AutoFillPopupMenuClient::itemIsEnabled(unsigned listIndex) const -{ - return !itemIsWarning(listIndex); -} - -PopupMenuStyle AutoFillPopupMenuClient::itemStyle(unsigned listIndex) const -{ - return itemIsWarning(listIndex) ? *m_warningStyle : *m_regularStyle; -} - -PopupMenuStyle AutoFillPopupMenuClient::menuStyle() const -{ - return *m_regularStyle; -} - -int AutoFillPopupMenuClient::clientPaddingLeft() const -{ - // Bug http://crbug.com/7708 seems to indicate the style can be 0. - RenderStyle* style = textFieldStyle(); - if (!style) - return 0; - - return RenderTheme::defaultTheme()->popupInternalPaddingLeft(style); -} - -int AutoFillPopupMenuClient::clientPaddingRight() const -{ - // Bug http://crbug.com/7708 seems to indicate the style can be 0. - RenderStyle* style = textFieldStyle(); - if (!style) - return 0; - - return RenderTheme::defaultTheme()->popupInternalPaddingRight(style); -} - -void AutoFillPopupMenuClient::popupDidHide() -{ - WebViewImpl* webView = getWebView(); - if (!webView) - return; - - webView->autoFillPopupDidHide(); - webView->client()->didClearAutoFillSelection(WebNode(getTextField())); -} - -bool AutoFillPopupMenuClient::itemIsSeparator(unsigned listIndex) const -{ - return (m_separatorIndex != -1 && static_cast<unsigned>(m_separatorIndex) == listIndex); -} - -bool AutoFillPopupMenuClient::itemIsWarning(unsigned listIndex) const -{ - int index = convertListIndexToInternalIndex(listIndex); - if (index == -1) - return false; - - ASSERT(index >= 0 && static_cast<size_t>(index) < m_uniqueIDs.size()); - return m_uniqueIDs[index] < 0; -} - -void AutoFillPopupMenuClient::setTextFromItem(unsigned listIndex) -{ - m_textField->setValue(getSuggestion(listIndex)); -} - -FontSelector* AutoFillPopupMenuClient::fontSelector() const -{ - return m_textField->document()->styleSelector()->fontSelector(); -} - -HostWindow* AutoFillPopupMenuClient::hostWindow() const -{ - return m_textField->document()->view()->hostWindow(); -} - -PassRefPtr<Scrollbar> AutoFillPopupMenuClient::createScrollbar( - ScrollbarClient* client, - ScrollbarOrientation orientation, - ScrollbarControlSize size) -{ - return Scrollbar::createNativeScrollbar(client, orientation, size); -} - -void AutoFillPopupMenuClient::initialize( - HTMLInputElement* textField, - const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex) -{ - ASSERT(names.size() == labels.size()); - ASSERT(names.size() == icons.size()); - ASSERT(names.size() == uniqueIDs.size()); - ASSERT(separatorIndex < static_cast<int>(names.size())); - - m_selectedIndex = -1; - m_textField = textField; - - // The suggestions must be set before initializing the - // AutoFillPopupMenuClient. - setSuggestions(names, labels, icons, uniqueIDs, separatorIndex); - - FontDescription regularFontDescription; - RenderTheme::defaultTheme()->systemFont(CSSValueWebkitControl, - regularFontDescription); - RenderStyle* style = m_textField->computedStyle(); - regularFontDescription.setComputedSize(style->fontDescription().computedSize()); - - Font regularFont(regularFontDescription, 0, 0); - regularFont.update(textField->document()->styleSelector()->fontSelector()); - // The direction of text in popup menu is set the same as the direction of - // the input element: textField. - m_regularStyle.set(new PopupMenuStyle(Color::black, Color::white, regularFont, - true, false, Length(WebCore::Fixed), - textField->renderer()->style()->direction())); - - FontDescription warningFontDescription = regularFont.fontDescription(); - warningFontDescription.setItalic(true); - Font warningFont(warningFontDescription, regularFont.letterSpacing(), regularFont.wordSpacing()); - warningFont.update(regularFont.fontSelector()); - m_warningStyle.set(new PopupMenuStyle(Color::darkGray, - m_regularStyle->backgroundColor(), - warningFont, - m_regularStyle->isVisible(), - m_regularStyle->isDisplayNone(), - m_regularStyle->textIndent(), - m_regularStyle->textDirection())); -} - -void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex) -{ - ASSERT(names.size() == labels.size()); - ASSERT(names.size() == icons.size()); - ASSERT(names.size() == uniqueIDs.size()); - ASSERT(separatorIndex < static_cast<int>(names.size())); - - m_names.clear(); - m_labels.clear(); - m_icons.clear(); - m_uniqueIDs.clear(); - for (size_t i = 0; i < names.size(); ++i) { - m_names.append(names[i]); - m_labels.append(labels[i]); - m_icons.append(icons[i]); - m_uniqueIDs.append(uniqueIDs[i]); - } - - m_separatorIndex = separatorIndex; - - // Try to preserve selection if possible. - if (getSelectedIndex() >= static_cast<int>(names.size())) - setSelectedIndex(-1); -} - -int AutoFillPopupMenuClient::convertListIndexToInternalIndex(unsigned listIndex) const -{ - if (listIndex == static_cast<unsigned>(m_separatorIndex)) - return -1; - - if (m_separatorIndex == -1 || listIndex < static_cast<unsigned>(m_separatorIndex)) - return listIndex; - return listIndex - 1; -} - -WebViewImpl* AutoFillPopupMenuClient::getWebView() const -{ - Frame* frame = m_textField->document()->frame(); - if (!frame) - return 0; - - Page* page = frame->page(); - if (!page) - return 0; - - return static_cast<ChromeClientImpl*>(page->chrome()->client())->webView(); -} - -RenderStyle* AutoFillPopupMenuClient::textFieldStyle() const -{ - RenderStyle* style = m_textField->computedStyle(); - if (!style) { - // It seems we can only have a 0 style in a TextField if the - // node is detached, in which case we the popup should not be - // showing. Please report this in http://crbug.com/7708 and - // include the page you were visiting. - ASSERT_NOT_REACHED(); - } - return style; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h deleted file mode 100644 index 0129a81..0000000 --- a/WebKit/chromium/src/AutoFillPopupMenuClient.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef AutoFillPopupMenuClient_h -#define AutoFillPopupMenuClient_h - -#include "PopupMenuClient.h" - -namespace WebCore { -class HTMLInputElement; -class PopupMenuStyle; -class RenderStyle; -} - -namespace WebKit { -class WebString; -class WebViewImpl; -template <typename T> class WebVector; - -// The AutoFill suggestions popup menu client, used to display name suggestions -// with right-justified labels. -class AutoFillPopupMenuClient : public WebCore::PopupMenuClient { -public: - AutoFillPopupMenuClient(); - virtual ~AutoFillPopupMenuClient(); - - // Returns the number of suggestions available. - virtual unsigned getSuggestionsCount() const; - - // Returns the suggestion at |listIndex|. - virtual WebString getSuggestion(unsigned listIndex) const; - - // Returns the label at |listIndex|. - virtual WebString getLabel(unsigned listIndex) const; - - // Returns the icon at |listIndex|. - virtual WebString getIcon(unsigned listIndex) const; - - // Removes the suggestion at |listIndex| from the list of suggestions. - virtual void removeSuggestionAtIndex(unsigned listIndex); - - // Returns true if the suggestion at |listIndex| can be removed. - bool canRemoveSuggestionAtIndex(unsigned listIndex); - - // WebCore::PopupMenuClient methods: - virtual void valueChanged(unsigned listIndex, bool fireEvents = true); - virtual void selectionChanged(unsigned, bool); - virtual void selectionCleared(); - virtual WTF::String itemText(unsigned listIndex) const; - virtual WTF::String itemLabel(unsigned listIndex) const; - virtual WTF::String itemIcon(unsigned listIndex) const; - virtual WTF::String itemToolTip(unsigned lastIndex) const { return WTF::String(); } - virtual WTF::String itemAccessibilityText(unsigned lastIndex) const { return WTF::String(); } - virtual bool itemIsEnabled(unsigned listIndex) const; - virtual WebCore::PopupMenuStyle itemStyle(unsigned listIndex) const; - virtual WebCore::PopupMenuStyle menuStyle() const; - virtual int clientInsetLeft() const { return 0; } - virtual int clientInsetRight() const { return 0; } - virtual int clientPaddingLeft() const; - virtual int clientPaddingRight() const; - virtual int listSize() const { return getSuggestionsCount(); } - virtual int selectedIndex() const { return m_selectedIndex; } - virtual void popupDidHide(); - virtual bool itemIsSeparator(unsigned listIndex) const; - virtual bool itemIsLabel(unsigned listIndex) const { return false; } - virtual bool itemIsSelected(unsigned listIndex) const { return false; } - virtual bool shouldPopOver() const { return false; } - virtual bool valueShouldChangeOnHotTrack() const { return false; } - virtual void setTextFromItem(unsigned listIndex); - virtual WebCore::FontSelector* fontSelector() const; - virtual WebCore::HostWindow* hostWindow() const; - virtual PassRefPtr<WebCore::Scrollbar> createScrollbar( - WebCore::ScrollbarClient* client, - WebCore::ScrollbarOrientation orientation, - WebCore::ScrollbarControlSize size); - - void initialize(WebCore::HTMLInputElement*, - const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex); - - void setSuggestions(const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex); - -private: - // Convert the specified index from an index into the visible list (which might - // include a separator entry) to an index to |m_names| and |m_labels|. - // Returns -1 if the given index points to the separator. - int convertListIndexToInternalIndex(unsigned) const; - WebViewImpl* getWebView() const; - WebCore::HTMLInputElement* getTextField() const { return m_textField.get(); } - WebCore::RenderStyle* textFieldStyle() const; - - int getSelectedIndex() const { return m_selectedIndex; } - void setSelectedIndex(int index) { m_selectedIndex = index; } - - bool itemIsWarning(unsigned listIndex) const; - - // The names, labels and icons that make up the contents of the menu items. - Vector<WTF::String> m_names; - Vector<WTF::String> m_labels; - Vector<WTF::String> m_icons; - Vector<int> m_uniqueIDs; - - // The index of the separator. -1 if there is no separator. - int m_separatorIndex; - - // The index of the selected item. -1 if there is no selected item. - int m_selectedIndex; - - RefPtr<WebCore::HTMLInputElement> m_textField; - OwnPtr<WebCore::PopupMenuStyle> m_regularStyle; - OwnPtr<WebCore::PopupMenuStyle> m_warningStyle; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/BackForwardListClientImpl.cpp b/WebKit/chromium/src/BackForwardListClientImpl.cpp deleted file mode 100644 index af659bc..0000000 --- a/WebKit/chromium/src/BackForwardListClientImpl.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "BackForwardListClientImpl.h" - -#include "HistoryItem.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include <wtf/text/StringConcatenate.h> - -using namespace WebCore; - -namespace WebKit { - -const char backForwardNavigationScheme[] = "chrome-back-forward"; - -BackForwardListClientImpl::BackForwardListClientImpl(WebViewImpl* webView) - : m_webView(webView) -{ -} - -BackForwardListClientImpl::~BackForwardListClientImpl() -{ -} - -void BackForwardListClientImpl::setCurrentHistoryItem(HistoryItem* item) -{ - m_previousItem = m_currentItem; - m_currentItem = item; -} - -HistoryItem* BackForwardListClientImpl::previousHistoryItem() const -{ - return m_previousItem.get(); -} - -void BackForwardListClientImpl::addItem(PassRefPtr<HistoryItem> item) -{ - m_previousItem = m_currentItem; - m_currentItem = item; - - // If WebCore adds a new HistoryItem, it means this is a new navigation (ie, - // not a reload or back/forward). - m_webView->observeNewNavigation(); - - if (m_webView->client()) - m_webView->client()->didAddHistoryItem(); -} - -void BackForwardListClientImpl::goToItem(HistoryItem* item) -{ - m_previousItem = m_currentItem; - m_currentItem = item; - - if (m_pendingHistoryItem == item) - m_pendingHistoryItem = 0; -} - -HistoryItem* BackForwardListClientImpl::itemAtIndex(int index) -{ - if (!m_webView->client()) - return 0; - - if (!index) - return m_currentItem.get(); - - if (index > forwardListCount() || -index > backListCount()) - return 0; - - // Since we don't keep the entire back/forward list, we have no way to - // properly implement this method. We return a dummy entry instead that we - // intercept in our FrameLoaderClient implementation in case WebCore asks - // to navigate to this HistoryItem. - - // FIXME: We should change WebCore to handle history.{back,forward,go} - // differently. It should perhaps just ask the FrameLoaderClient to - // perform those navigations. - - String urlString = makeString(backForwardNavigationScheme, "://go/", String::number(index)); - m_pendingHistoryItem = HistoryItem::create(urlString, String(), 0); - return m_pendingHistoryItem.get(); -} - -int BackForwardListClientImpl::backListCount() -{ - if (!m_webView->client()) - return 0; - - return m_webView->client()->historyBackListCount(); -} - -int BackForwardListClientImpl::forwardListCount() -{ - if (!m_webView->client()) - return 0; - - return m_webView->client()->historyForwardListCount(); -} - -void BackForwardListClientImpl::close() -{ - m_currentItem = 0; - m_previousItem = 0; - m_pendingHistoryItem = 0; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/BackForwardListClientImpl.h b/WebKit/chromium/src/BackForwardListClientImpl.h deleted file mode 100644 index b795ecf..0000000 --- a/WebKit/chromium/src/BackForwardListClientImpl.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BackForwardListClientImpl_h -#define BackForwardListClientImpl_h - -#include "BackForwardListImpl.h" - -namespace WebKit { -class WebViewImpl; - -extern const char backForwardNavigationScheme[]; - -class BackForwardListClientImpl : public WebCore::BackForwardListClient { -public: - BackForwardListClientImpl(WebViewImpl* webview); - ~BackForwardListClientImpl(); - - void setCurrentHistoryItem(WebCore::HistoryItem* item); - WebCore::HistoryItem* previousHistoryItem() const; - -private: - // WebCore::BackForwardListClient methods: - virtual void addItem(PassRefPtr<WebCore::HistoryItem>); - virtual void goToItem(WebCore::HistoryItem*); - virtual WebCore::HistoryItem* itemAtIndex(int index); - virtual int backListCount(); - virtual int forwardListCount(); - virtual void close(); - - WebViewImpl* m_webView; - - RefPtr<WebCore::HistoryItem> m_previousItem; - RefPtr<WebCore::HistoryItem> m_currentItem; - - // The last history item that was accessed via itemAtIndex(). We keep track - // of this until goToItem() is called, so we can track the navigation. - RefPtr<WebCore::HistoryItem> m_pendingHistoryItem; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/BlobRegistryProxy.cpp b/WebKit/chromium/src/BlobRegistryProxy.cpp deleted file mode 100644 index 84fcb4d..0000000 --- a/WebKit/chromium/src/BlobRegistryProxy.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(BLOB) - -#include "BlobRegistryProxy.h" - -#include "BlobData.h" -#include "KURL.h" -#include "ResourceHandle.h" -#include "WebBlobData.h" -#include "WebBlobRegistry.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebURL.h" -#include <wtf/MainThread.h> -#include <wtf/StdLibExtras.h> - -// We are part of the WebKit implementation. -using namespace WebKit; - -namespace WebCore { - -BlobRegistry& blobRegistry() -{ - ASSERT(isMainThread()); - DEFINE_STATIC_LOCAL(BlobRegistryProxy, instance, ()); - return instance; -} - -BlobRegistryProxy::BlobRegistryProxy() - : m_webBlobRegistry(WebKit::webKitClient()->blobRegistry()) -{ -} - -void BlobRegistryProxy::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blobData) -{ - if (m_webBlobRegistry) { - WebBlobData webBlobData(blobData); - m_webBlobRegistry->registerBlobURL(url, webBlobData); - } -} - -void BlobRegistryProxy::registerBlobURL(const KURL& url, const KURL& srcURL) -{ - if (m_webBlobRegistry) - m_webBlobRegistry->registerBlobURL(url, srcURL); -} - -void BlobRegistryProxy::unregisterBlobURL(const KURL& url) -{ - if (m_webBlobRegistry) - m_webBlobRegistry->unregisterBlobURL(url); -} - -} // namespace WebCore - -#endif diff --git a/WebKit/chromium/src/BlobRegistryProxy.h b/WebKit/chromium/src/BlobRegistryProxy.h deleted file mode 100644 index 6f2ebb2..0000000 --- a/WebKit/chromium/src/BlobRegistryProxy.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BlobRegistryProxy_h -#define BlobRegistryProxy_h - -#if ENABLE(BLOB) - -#include "BlobRegistry.h" - -namespace WebKit { class WebBlobRegistry; } - -namespace WebCore { - -class BlobRegistryProxy : public BlobRegistry { -public: - BlobRegistryProxy(); - - virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>); - virtual void registerBlobURL(const KURL&, const KURL& srcURL); - virtual void unregisterBlobURL(const KURL&); - - virtual PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*) { return 0; } - virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector<char>& data) { return false; } - -private: - virtual ~BlobRegistryProxy() { } - - WebKit::WebBlobRegistry* m_webBlobRegistry; -}; - -} // namespace WebCore - -#endif // ENABLE(BLOB) - -#endif // BlobRegistryProxy_h diff --git a/WebKit/chromium/src/BoundObject.cpp b/WebKit/chromium/src/BoundObject.cpp deleted file mode 100644 index 90096c2..0000000 --- a/WebKit/chromium/src/BoundObject.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "BoundObject.h" - -#include "V8Proxy.h" - -namespace WebKit { - -BoundObject::BoundObject(v8::Handle<v8::Context> context, void* v8This, const char* objectName) - : m_objectName(objectName) - , m_context(context) - , m_v8This(v8This) -{ - v8::Context::Scope contextScope(context); - v8::Local<v8::FunctionTemplate> localTemplate = v8::FunctionTemplate::New(WebCore::V8Proxy::checkNewLegal); - m_hostTemplate = v8::Persistent<v8::FunctionTemplate>::New(localTemplate); - m_hostTemplate->SetClassName(v8::String::New(objectName)); -} - -BoundObject::~BoundObject() -{ - m_hostTemplate.Dispose(); -} - -void BoundObject::addProtoFunction(const char* name, v8::InvocationCallback callback) -{ - v8::Context::Scope contextScope(m_context); - v8::Local<v8::Signature> signature = v8::Signature::New(m_hostTemplate); - v8::Local<v8::ObjectTemplate> proto = m_hostTemplate->PrototypeTemplate(); - v8::Local<v8::External> v8This = v8::External::New(m_v8This); - proto->Set( - v8::String::New(name), - v8::FunctionTemplate::New( - callback, - v8This, - signature), - static_cast<v8::PropertyAttribute>(v8::DontDelete)); -} - -void BoundObject::build() -{ - v8::Context::Scope contextScope(m_context); - v8::Local<v8::Function> constructor = m_hostTemplate->GetFunction(); - v8::Local<v8::Object> boundObject = WebCore::SafeAllocation::newInstance(constructor); - - v8::Handle<v8::Object> global = m_context->Global(); - global->Set(v8::String::New(m_objectName), boundObject); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/BoundObject.h b/WebKit/chromium/src/BoundObject.h deleted file mode 100644 index 769e83f..0000000 --- a/WebKit/chromium/src/BoundObject.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BoundObject_h -#define BoundObject_h - -#include <v8.h> -#include <wtf/Noncopyable.h> - -namespace WebKit { - -// BoundObject is a helper class that lets you map JavaScript method calls -// directly to C++ method calls. It should be destroyed once JS object is -// built. -class BoundObject : public Noncopyable { -public: - BoundObject(v8::Handle<v8::Context> context, void* v8This, const char* objectName); - virtual ~BoundObject(); - - void addProtoFunction(const char* name, v8::InvocationCallback callback); - void build(); - -private: - v8::HandleScope m_handleScope; - const char* m_objectName; - v8::Handle<v8::Context> m_context; - v8::Persistent<v8::FunctionTemplate> m_hostTemplate; - void* m_v8This; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp deleted file mode 100644 index 28d78d0..0000000 --- a/WebKit/chromium/src/ChromeClientImpl.cpp +++ /dev/null @@ -1,870 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ChromeClientImpl.h" - -#include "AXObjectCache.h" -#include "AccessibilityObject.h" -#include "CharacterNames.h" -#include "Console.h" -#include "Cursor.h" -#include "DatabaseTracker.h" -#include "Document.h" -#include "DocumentLoader.h" -#include "ExternalPopupMenu.h" -#include "FileChooser.h" -#include "FloatRect.h" -#include "FrameLoadRequest.h" -#include "FrameView.h" -#include "Geolocation.h" -#include "GeolocationService.h" -#include "GeolocationServiceChromium.h" -#include "GraphicsLayer.h" -#include "HTMLNames.h" -#include "HitTestResult.h" -#include "IntRect.h" -#include "NavigationAction.h" -#include "Node.h" -#include "NotificationPresenterImpl.h" -#include "Page.h" -#include "PopupMenuChromium.h" -#include "RenderWidget.h" -#include "ScriptController.h" -#include "SearchPopupMenuChromium.h" -#include "SecurityOrigin.h" -#include "Settings.h" -#if USE(V8) -#include "V8Proxy.h" -#endif -#include "WebAccessibilityObject.h" -#include "WebConsoleMessage.h" -#include "WebCursorInfo.h" -#include "WebFileChooserCompletionImpl.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebGeolocationService.h" -#include "WebInputEvent.h" -#include "WebKit.h" -#include "WebNode.h" -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" -#include "WebPopupMenuImpl.h" -#include "WebPopupMenuInfo.h" -#include "WebPopupType.h" -#include "WebRect.h" -#include "WebTextDirection.h" -#include "WebURLRequest.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include "WebWindowFeatures.h" -#include "WindowFeatures.h" -#include "WrappedResourceRequest.h" - -using namespace WebCore; - -namespace WebKit { - -// Converts a WebCore::PopupContainerType to a WebKit::WebPopupType. -static WebPopupType convertPopupType(PopupContainer::PopupType type) -{ - switch (type) { - case PopupContainer::Select: - return WebPopupTypeSelect; - case PopupContainer::Suggestion: - return WebPopupTypeSuggestion; - default: - ASSERT_NOT_REACHED(); - return WebPopupTypeNone; - } -} - -// Converts a WebCore::AXObjectCache::AXNotification to a WebKit::WebAccessibilityNotification -static WebAccessibilityNotification toWebAccessibilityNotification(AXObjectCache::AXNotification notification) -{ - switch (notification) { - case AXObjectCache::AXActiveDescendantChanged: - return WebAccessibilityNotificationActiveDescendantChanged; - case AXObjectCache::AXCheckedStateChanged: - return WebAccessibilityNotificationCheckedStateChanged; - case AXObjectCache::AXChildrenChanged: - return WebAccessibilityNotificationChildrenChanged; - case AXObjectCache::AXFocusedUIElementChanged: - return WebAccessibilityNotificationFocusedUIElementChanged; - case AXObjectCache::AXLayoutComplete: - return WebAccessibilityNotificationLayoutComplete; - case AXObjectCache::AXLoadComplete: - return WebAccessibilityNotificationLoadComplete; - case AXObjectCache::AXSelectedChildrenChanged: - return WebAccessibilityNotificationSelectedChildrenChanged; - case AXObjectCache::AXSelectedTextChanged: - return WebAccessibilityNotificationSelectedTextChanged; - case AXObjectCache::AXValueChanged: - return WebAccessibilityNotificationValueChanged; - case AXObjectCache::AXScrolledToAnchor: - return WebAccessibilityNotificationScrolledToAnchor; - case AXObjectCache::AXLiveRegionChanged: - return WebAccessibilityNotificationLiveRegionChanged; - case AXObjectCache::AXMenuListValueChanged: - return WebAccessibilityNotificationMenuListValueChanged; - case AXObjectCache::AXRowCountChanged: - return WebAccessibilityNotificationRowCountChanged; - case AXObjectCache::AXRowCollapsed: - return WebAccessibilityNotificationRowCollapsed; - case AXObjectCache::AXRowExpanded: - return WebAccessibilityNotificationRowExpanded; - default: - ASSERT_NOT_REACHED(); - return WebAccessibilityNotificationInvalid; - } -} - -ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) - : m_webView(webView) - , m_toolbarsVisible(true) - , m_statusbarVisible(true) - , m_scrollbarsVisible(true) - , m_menubarVisible(true) - , m_resizable(true) -{ -} - -ChromeClientImpl::~ChromeClientImpl() -{ -} - -void ChromeClientImpl::chromeDestroyed() -{ - // Our lifetime is bound to the WebViewImpl. -} - -void ChromeClientImpl::setWindowRect(const FloatRect& r) -{ - if (m_webView->client()) - m_webView->client()->setWindowRect(IntRect(r)); -} - -FloatRect ChromeClientImpl::windowRect() -{ - WebRect rect; - if (m_webView->client()) - rect = m_webView->client()->rootWindowRect(); - else { - // These numbers will be fairly wrong. The window's x/y coordinates will - // be the top left corner of the screen and the size will be the content - // size instead of the window size. - rect.width = m_webView->size().width; - rect.height = m_webView->size().height; - } - return FloatRect(rect); -} - -FloatRect ChromeClientImpl::pageRect() -{ - // We hide the details of the window's border thickness from the web page by - // simple re-using the window position here. So, from the point-of-view of - // the web page, the window has no border. - return windowRect(); -} - -float ChromeClientImpl::scaleFactor() -{ - // This is supposed to return the scale factor of the web page. It looks like - // the implementor of the graphics layer is responsible for doing most of the - // operations associated with scaling. However, this value is used ins some - // cases by WebCore. For example, this is used as a scaling factor in canvas - // so that things drawn in it are scaled just like the web page is. - // - // We don't currently implement scaling, so just return 1.0 (no scaling). - return 1.0; -} - -void ChromeClientImpl::focus() -{ - if (m_webView->client()) - m_webView->client()->didFocus(); -} - -void ChromeClientImpl::unfocus() -{ - if (m_webView->client()) - m_webView->client()->didBlur(); -} - -bool ChromeClientImpl::canTakeFocus(FocusDirection) -{ - // For now the browser can always take focus if we're not running layout - // tests. - return !layoutTestMode(); -} - -void ChromeClientImpl::takeFocus(FocusDirection direction) -{ - if (!m_webView->client()) - return; - if (direction == FocusDirectionBackward) - m_webView->client()->focusPrevious(); - else - m_webView->client()->focusNext(); -} - -void ChromeClientImpl::focusedNodeChanged(Node* node) -{ - m_webView->client()->focusedNodeChanged(WebNode(node)); - - WebURL focusURL; - if (node && node->isLink()) { - // This HitTestResult hack is the easiest way to get a link URL out of a - // WebCore::Node. - HitTestResult hitTest(IntPoint(0, 0)); - // This cast must be valid because of the isLink() check. - hitTest.setURLElement(static_cast<Element*>(node)); - if (hitTest.isLiveLink()) - focusURL = hitTest.absoluteLinkURL(); - } - m_webView->client()->setKeyboardFocusURL(focusURL); -} - -void ChromeClientImpl::focusedFrameChanged(Frame*) -{ -} - -Page* ChromeClientImpl::createWindow( - Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, const NavigationAction&) -{ - if (!m_webView->client()) - return 0; - - WebViewImpl* newView = static_cast<WebViewImpl*>( - m_webView->client()->createView(WebFrameImpl::fromFrame(frame), features, r.frameName())); - if (!newView) - return 0; - - // The request is empty when we are just being asked to open a blank window. - // This corresponds to window.open(""), for example. - if (!r.resourceRequest().isEmpty()) { - WrappedResourceRequest request(r.resourceRequest()); - newView->mainFrame()->loadRequest(request); - } - - return newView->page(); -} - -static inline bool currentEventShouldCauseBackgroundTab(const WebInputEvent* inputEvent) -{ - if (!inputEvent) - return false; - - if (inputEvent->type != WebInputEvent::MouseUp) - return false; - - const WebMouseEvent* mouseEvent = static_cast<const WebMouseEvent*>(inputEvent); - - WebNavigationPolicy policy; - unsigned short buttonNumber; - switch (mouseEvent->button) { - case WebMouseEvent::ButtonLeft: - buttonNumber = 0; - break; - case WebMouseEvent::ButtonMiddle: - buttonNumber = 1; - break; - case WebMouseEvent::ButtonRight: - buttonNumber = 2; - break; - default: - return false; - } - bool ctrl = mouseEvent->modifiers & WebMouseEvent::ControlKey; - bool shift = mouseEvent->modifiers & WebMouseEvent::ShiftKey; - bool alt = mouseEvent->modifiers & WebMouseEvent::AltKey; - bool meta = mouseEvent->modifiers & WebMouseEvent::MetaKey; - - if (!WebViewImpl::navigationPolicyFromMouseEvent(buttonNumber, ctrl, shift, alt, meta, &policy)) - return false; - - return policy == WebNavigationPolicyNewBackgroundTab; -} - -void ChromeClientImpl::show() -{ - if (!m_webView->client()) - return; - - // If our default configuration was modified by a script or wasn't - // created by a user gesture, then show as a popup. Else, let this - // new window be opened as a toplevel window. - bool asPopup = !m_toolbarsVisible - || !m_statusbarVisible - || !m_scrollbarsVisible - || !m_menubarVisible - || !m_resizable; - - WebNavigationPolicy policy = WebNavigationPolicyNewForegroundTab; - if (asPopup) - policy = WebNavigationPolicyNewPopup; - if (currentEventShouldCauseBackgroundTab(WebViewImpl::currentInputEvent())) - policy = WebNavigationPolicyNewBackgroundTab; - - m_webView->client()->show(policy); -} - -bool ChromeClientImpl::canRunModal() -{ - return !!m_webView->client(); -} - -void ChromeClientImpl::runModal() -{ - if (m_webView->client()) - m_webView->client()->runModal(); -} - -void ChromeClientImpl::setToolbarsVisible(bool value) -{ - m_toolbarsVisible = value; -} - -bool ChromeClientImpl::toolbarsVisible() -{ - return m_toolbarsVisible; -} - -void ChromeClientImpl::setStatusbarVisible(bool value) -{ - m_statusbarVisible = value; -} - -bool ChromeClientImpl::statusbarVisible() -{ - return m_statusbarVisible; -} - -void ChromeClientImpl::setScrollbarsVisible(bool value) -{ - m_scrollbarsVisible = value; - WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame()); - if (webFrame) - webFrame->setCanHaveScrollbars(value); -} - -bool ChromeClientImpl::scrollbarsVisible() -{ - return m_scrollbarsVisible; -} - -void ChromeClientImpl::setMenubarVisible(bool value) -{ - m_menubarVisible = value; -} - -bool ChromeClientImpl::menubarVisible() -{ - return m_menubarVisible; -} - -void ChromeClientImpl::setResizable(bool value) -{ - m_resizable = value; -} - -void ChromeClientImpl::addMessageToConsole(MessageSource source, - MessageType type, - MessageLevel level, - const String& message, - unsigned lineNumber, - const String& sourceID) -{ - if (m_webView->client()) { - m_webView->client()->didAddMessageToConsole( - WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), message), - sourceID, - lineNumber); - } -} - -bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() -{ - return !!m_webView->client(); -} - -bool ChromeClientImpl::runBeforeUnloadConfirmPanel(const String& message, Frame* frame) -{ - if (m_webView->client()) { - return m_webView->client()->runModalBeforeUnloadDialog( - WebFrameImpl::fromFrame(frame), message); - } - return false; -} - -void ChromeClientImpl::closeWindowSoon() -{ - // Make sure this Page can no longer be found by JS. - m_webView->page()->setGroupName(String()); - - // Make sure that all loading is stopped. Ensures that JS stops executing! - m_webView->mainFrame()->stopLoading(); - - if (m_webView->client()) - m_webView->client()->closeWidgetSoon(); -} - -// Although a Frame is passed in, we don't actually use it, since we -// already know our own m_webView. -void ChromeClientImpl::runJavaScriptAlert(Frame* frame, const String& message) -{ - if (m_webView->client()) { -#if USE(V8) - // Before showing the JavaScript dialog, we give the proxy implementation - // a chance to process any pending console messages. - V8Proxy::processConsoleMessages(); -#endif - m_webView->client()->runModalAlertDialog( - WebFrameImpl::fromFrame(frame), message); - } -} - -// See comments for runJavaScriptAlert(). -bool ChromeClientImpl::runJavaScriptConfirm(Frame* frame, const String& message) -{ - if (m_webView->client()) { - return m_webView->client()->runModalConfirmDialog( - WebFrameImpl::fromFrame(frame), message); - } - return false; -} - -// See comments for runJavaScriptAlert(). -bool ChromeClientImpl::runJavaScriptPrompt(Frame* frame, - const String& message, - const String& defaultValue, - String& result) -{ - if (m_webView->client()) { - WebString actualValue; - bool ok = m_webView->client()->runModalPromptDialog( - WebFrameImpl::fromFrame(frame), - message, - defaultValue, - &actualValue); - if (ok) - result = actualValue; - return ok; - } - return false; -} - -void ChromeClientImpl::setStatusbarText(const String& message) -{ - if (m_webView->client()) - m_webView->client()->setStatusText(message); -} - -bool ChromeClientImpl::shouldInterruptJavaScript() -{ - // FIXME: implement me - return false; -} - -bool ChromeClientImpl::tabsToLinks() const -{ - // Returns true if anchors should accept keyboard focus with the tab key. - // This method is used in a convoluted fashion by EventHandler::tabsToLinks. - // It's a twisted path (self-evident, but more complicated than seems - // necessary), but the net result is that returning true from here, on a - // platform other than MAC or QT, lets anchors get keyboard focus. - return m_webView->tabsToLinks(); -} - -IntRect ChromeClientImpl::windowResizerRect() const -{ - IntRect result; - if (m_webView->client()) - result = m_webView->client()->windowResizerRect(); - return result; -} - -void ChromeClientImpl::invalidateWindow(const IntRect&, bool) -{ - notImplemented(); -} - -void ChromeClientImpl::invalidateContentsAndWindow(const IntRect& updateRect, bool /*immediate*/) -{ - if (updateRect.isEmpty()) - return; -#if USE(ACCELERATED_COMPOSITING) - if (!m_webView->isAcceleratedCompositingActive()) { -#endif - if (m_webView->client()) - m_webView->client()->didInvalidateRect(updateRect); -#if USE(ACCELERATED_COMPOSITING) - } else - m_webView->invalidateRootLayerRect(updateRect); -#endif -} - -void ChromeClientImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) -{ - m_webView->hidePopups(); - invalidateContentsAndWindow(updateRect, immediate); -} - -void ChromeClientImpl::scroll( - const IntSize& scrollDelta, const IntRect& scrollRect, - const IntRect& clipRect) -{ - m_webView->hidePopups(); -#if USE(ACCELERATED_COMPOSITING) - if (!m_webView->isAcceleratedCompositingActive()) { -#endif - if (m_webView->client()) { - int dx = scrollDelta.width(); - int dy = scrollDelta.height(); - m_webView->client()->didScrollRect(dx, dy, clipRect); - } -#if USE(ACCELERATED_COMPOSITING) - } else - m_webView->scrollRootLayerRect(scrollDelta, clipRect); -#endif -} - -IntPoint ChromeClientImpl::screenToWindow(const IntPoint&) const -{ - notImplemented(); - return IntPoint(); -} - -IntRect ChromeClientImpl::windowToScreen(const IntRect& rect) const -{ - IntRect screenRect(rect); - - if (m_webView->client()) { - WebRect windowRect = m_webView->client()->windowRect(); - screenRect.move(windowRect.x, windowRect.y); - } - - return screenRect; -} - -void ChromeClientImpl::contentsSizeChanged(Frame* frame, const IntSize& size) const -{ - WebFrameImpl* webframe = WebFrameImpl::fromFrame(frame); - if (webframe->client()) - webframe->client()->didChangeContentsSize(webframe, size); -} - -void ChromeClientImpl::scrollbarsModeDidChange() const -{ -} - -void ChromeClientImpl::mouseDidMoveOverElement( - const HitTestResult& result, unsigned modifierFlags) -{ - if (!m_webView->client()) - return; - - WebURL url; - // Find out if the mouse is over a link, and if so, let our UI know... - if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) - url = result.absoluteLinkURL(); - else if (result.innerNonSharedNode() - && (result.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) - || result.innerNonSharedNode()->hasTagName(HTMLNames::embedTag))) { - RenderObject* object = result.innerNonSharedNode()->renderer(); - if (object && object->isWidget()) { - Widget* widget = toRenderWidget(object)->widget(); - if (widget && widget->isPluginContainer()) { - WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget); - url = plugin->plugin()->linkAtPosition(result.point()); - } - } - } - - m_webView->client()->setMouseOverURL(url); -} - -void ChromeClientImpl::setToolTip(const String& tooltipText, TextDirection dir) -{ - if (!m_webView->client()) - return; - WebTextDirection textDirection = (dir == RTL) ? - WebTextDirectionRightToLeft : - WebTextDirectionLeftToRight; - m_webView->client()->setToolTipText( - tooltipText, textDirection); -} - -void ChromeClientImpl::print(Frame* frame) -{ - if (m_webView->client()) - m_webView->client()->printPage(WebFrameImpl::fromFrame(frame)); -} - -void ChromeClientImpl::exceededDatabaseQuota(Frame* frame, const String& databaseName) -{ - // Chromium users cannot currently change the default quota -} - -#if ENABLE(OFFLINE_WEB_APPLICATIONS) -void ChromeClientImpl::reachedMaxAppCacheSize(int64_t spaceNeeded) -{ - ASSERT_NOT_REACHED(); -} - -void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*) -{ - ASSERT_NOT_REACHED(); -} -#endif - -void ChromeClientImpl::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> fileChooser) -{ - WebViewClient* client = m_webView->client(); - if (!client) - return; - - WebFileChooserParams params; - params.multiSelect = fileChooser->allowsMultipleFiles(); -#if ENABLE(DIRECTORY_UPLOAD) - params.directory = fileChooser->allowsDirectoryUpload(); -#else - params.directory = false; -#endif - params.acceptTypes = fileChooser->acceptTypes(); - params.selectedFiles = fileChooser->filenames(); - if (params.selectedFiles.size() > 0) - params.initialValue = params.selectedFiles[0]; - WebFileChooserCompletionImpl* chooserCompletion = - new WebFileChooserCompletionImpl(fileChooser); - - if (client->runFileChooser(params, chooserCompletion)) - return; - - // Choosing failed, so do callback with an empty list. - chooserCompletion->didChooseFile(WebVector<WebString>()); -} - -void ChromeClientImpl::chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*) -{ - notImplemented(); -} - -void ChromeClientImpl::popupOpened(PopupContainer* popupContainer, - const IntRect& bounds, - bool handleExternally) -{ - if (!m_webView->client()) - return; - - WebWidget* webwidget; - if (handleExternally) { - WebPopupMenuInfo popupInfo; - getPopupMenuInfo(popupContainer, &popupInfo); - webwidget = m_webView->client()->createPopupMenu(popupInfo); - } else { - webwidget = m_webView->client()->createPopupMenu( - convertPopupType(popupContainer->popupType())); - // We only notify when the WebView has to handle the popup, as when - // the popup is handled externally, the fact that a popup is showing is - // transparent to the WebView. - m_webView->popupOpened(popupContainer); - } - static_cast<WebPopupMenuImpl*>(webwidget)->Init(popupContainer, bounds); -} - -void ChromeClientImpl::popupClosed(WebCore::PopupContainer* popupContainer) -{ - m_webView->popupClosed(popupContainer); -} - -void ChromeClientImpl::setCursor(const WebCursorInfo& cursor) -{ - if (m_webView->client()) - m_webView->client()->didChangeCursor(cursor); -} - -void ChromeClientImpl::setCursorForPlugin(const WebCursorInfo& cursor) -{ - setCursor(cursor); -} - -void ChromeClientImpl::formStateDidChange(const Node* node) -{ - // The current history item is not updated yet. That happens lazily when - // WebFrame::currentHistoryItem is requested. - WebFrameImpl* webframe = WebFrameImpl::fromFrame(node->document()->frame()); - if (webframe->client()) - webframe->client()->didUpdateCurrentHistoryItem(webframe); -} - -void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer, - WebPopupMenuInfo* info) -{ - const Vector<PopupItem*>& inputItems = popupContainer->popupData(); - - WebVector<WebPopupMenuInfo::Item> outputItems(inputItems.size()); - - for (size_t i = 0; i < inputItems.size(); ++i) { - const PopupItem& inputItem = *inputItems[i]; - WebPopupMenuInfo::Item& outputItem = outputItems[i]; - - outputItem.label = inputItem.label; - outputItem.enabled = inputItem.enabled; - - switch (inputItem.type) { - case PopupItem::TypeOption: - outputItem.type = WebPopupMenuInfo::Item::Option; - break; - case PopupItem::TypeGroup: - outputItem.type = WebPopupMenuInfo::Item::Group; - break; - case PopupItem::TypeSeparator: - outputItem.type = WebPopupMenuInfo::Item::Separator; - break; - default: - ASSERT_NOT_REACHED(); - } - } - - info->itemHeight = popupContainer->menuItemHeight(); - info->itemFontSize = popupContainer->menuItemFontSize(); - info->selectedIndex = popupContainer->selectedIndex(); - info->items.swap(outputItems); - info->rightAligned = popupContainer->menuStyle().textDirection() == RTL; -} - -void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification) -{ - // Alert assistive technology about the accessibility object notification. - if (obj) - m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification)); -} - -#if ENABLE(NOTIFICATIONS) -NotificationPresenter* ChromeClientImpl::notificationPresenter() const -{ - return m_webView->notificationPresenterImpl(); -} -#endif - -// FIXME: Remove ChromeClientImpl::requestGeolocationPermissionForFrame and ChromeClientImpl::cancelGeolocationPermissionRequestForFrame -// once all ports have moved to client-based geolocation (see https://bugs.webkit.org/show_bug.cgi?id=40373 ). -// For client-based geolocation, these methods are now implemented as WebGeolocationClient::requestPermission and WebGeolocationClient::cancelPermissionRequest. -// (see https://bugs.webkit.org/show_bug.cgi?id=50061 ). -void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation) -{ -#if !ENABLE(CLIENT_BASED_GEOLOCATION) - GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); - geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded(); - m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); -#endif -} - -void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation) -{ -#if !ENABLE(CLIENT_BASED_GEOLOCATION) - GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService()); - m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url()); -#endif -} - -#if USE(ACCELERATED_COMPOSITING) -void ChromeClientImpl::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer) -{ - m_webView->setRootGraphicsLayer(graphicsLayer ? graphicsLayer->platformLayer() : 0); -} - -void ChromeClientImpl::scheduleCompositingLayerSync() -{ - m_webView->setRootLayerNeedsDisplay(); -} - -ChromeClient::CompositingTriggerFlags ChromeClientImpl::allowedCompositingTriggers() const -{ - if (!m_webView->allowsAcceleratedCompositing()) - return 0; - - CompositingTriggerFlags flags = 0; - Settings* settings = m_webView->page()->settings(); - if (settings->acceleratedCompositingFor3DTransformsEnabled()) - flags |= ThreeDTransformTrigger; - if (settings->acceleratedCompositingForVideoEnabled()) - flags |= VideoTrigger; - if (settings->acceleratedCompositingForPluginsEnabled()) - flags |= PluginTrigger; - if (settings->acceleratedCompositingForAnimationEnabled()) - flags |= AnimationTrigger; - if (settings->acceleratedCompositingForCanvasEnabled()) - flags |= CanvasTrigger; - - return flags; -} -#endif - -bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node) -{ - if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag)) - return m_webView->client()->supportsFullscreen(); - return false; -} - -void ChromeClientImpl::enterFullscreenForNode(WebCore::Node* node) -{ - if (m_webView->client()) - m_webView->client()->enterFullscreenForNode(WebNode(node)); -} - -void ChromeClientImpl::exitFullscreenForNode(WebCore::Node* node) -{ - if (m_webView->client()) - m_webView->client()->exitFullscreenForNode(WebNode(node)); -} - -bool ChromeClientImpl::selectItemWritingDirectionIsNatural() -{ - return false; -} - -PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(PopupMenuClient* client) const -{ - if (WebViewImpl::useExternalPopupMenus()) - return adoptRef(new ExternalPopupMenu(client, m_webView->client())); - - return adoptRef(new PopupMenuChromium(client)); -} - -PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuClient* client) const -{ - return adoptRef(new SearchPopupMenuChromium(client)); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h deleted file mode 100644 index b024bc0..0000000 --- a/WebKit/chromium/src/ChromeClientImpl.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ChromeClientImpl_h -#define ChromeClientImpl_h - -#include "ChromeClientChromium.h" -#include "PopupMenu.h" -#include "SearchPopupMenu.h" - -namespace WebCore { -class AccessibilityObject; -class FileChooser; -class HTMLParserQuirks; -class PopupContainer; -class PopupMenuClient; -class SecurityOrigin; -struct WindowFeatures; -} - -namespace WebKit { -class WebViewImpl; -struct WebCursorInfo; -struct WebPopupMenuInfo; - -// Handles window-level notifications from WebCore on behalf of a WebView. -class ChromeClientImpl : public WebCore::ChromeClientChromium { -public: - explicit ChromeClientImpl(WebViewImpl* webView); - virtual ~ChromeClientImpl(); - - WebViewImpl* webView() const { return m_webView; } - - // ChromeClient methods: - virtual void chromeDestroyed(); - virtual void setWindowRect(const WebCore::FloatRect&); - virtual WebCore::FloatRect windowRect(); - virtual WebCore::FloatRect pageRect(); - virtual float scaleFactor(); - virtual void focus(); - virtual void unfocus(); - virtual bool canTakeFocus(WebCore::FocusDirection); - virtual void takeFocus(WebCore::FocusDirection); - virtual void focusedNodeChanged(WebCore::Node*); - virtual void focusedFrameChanged(WebCore::Frame*); - virtual WebCore::Page* createWindow( - WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&, const WebCore::NavigationAction&); - virtual void show(); - virtual bool canRunModal(); - virtual void runModal(); - virtual void setToolbarsVisible(bool); - virtual bool toolbarsVisible(); - virtual void setStatusbarVisible(bool); - virtual bool statusbarVisible(); - virtual void setScrollbarsVisible(bool); - virtual bool scrollbarsVisible(); - virtual void setMenubarVisible(bool); - virtual bool menubarVisible(); - virtual void setResizable(bool); - virtual void addMessageToConsole( - WebCore::MessageSource, WebCore::MessageType, WebCore::MessageLevel, - const WTF::String& message, unsigned lineNumber, - const WTF::String& sourceID); - virtual bool canRunBeforeUnloadConfirmPanel(); - virtual bool runBeforeUnloadConfirmPanel( - const WTF::String& message, WebCore::Frame*); - virtual void closeWindowSoon(); - virtual void runJavaScriptAlert(WebCore::Frame*, const WTF::String&); - virtual bool runJavaScriptConfirm(WebCore::Frame*, const WTF::String&); - virtual bool runJavaScriptPrompt( - WebCore::Frame*, const WTF::String& message, - const WTF::String& defaultValue, WTF::String& result); - virtual void setStatusbarText(const WTF::String& message); - virtual bool shouldInterruptJavaScript(); - virtual bool tabsToLinks() const; - virtual WebCore::IntRect windowResizerRect() const; - virtual void invalidateWindow(const WebCore::IntRect&, bool); - virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); - virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); - virtual void scroll( - const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, - const WebCore::IntRect& clipRect); - virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const; - virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const; - virtual PlatformPageClient platformPageClient() const { return 0; } - virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const; - virtual void scrollRectIntoView( - const WebCore::IntRect&, const WebCore::ScrollView*) const { } - virtual void scrollbarsModeDidChange() const; - virtual void mouseDidMoveOverElement( - const WebCore::HitTestResult& result, unsigned modifierFlags); - virtual void setToolTip(const WTF::String& tooltipText, WebCore::TextDirection); - virtual void print(WebCore::Frame*); - virtual void exceededDatabaseQuota( - WebCore::Frame*, const WTF::String& databaseName); -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); - virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*); -#endif -#if ENABLE(NOTIFICATIONS) - virtual WebCore::NotificationPresenter* notificationPresenter() const; -#endif - virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*); - virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*); - virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); - virtual void chooseIconForFiles(const Vector<WTF::String>&, WebCore::FileChooser*); - virtual void setCursor(const WebCore::Cursor&) { } - virtual void formStateDidChange(const WebCore::Node*); - virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } -#if ENABLE(TOUCH_EVENTS) - // FIXME: All touch events are forwarded regardless of whether or not they are needed. - virtual void needTouchEvents(bool needTouchEvents) { } -#endif - -#if USE(ACCELERATED_COMPOSITING) - // Pass 0 as the GraphicsLayer to detatch the root layer. - virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*); - - // Sets a flag to specify that the next time content is drawn to the window, - // the changes appear on the screen in synchrony with updates to GraphicsLayers. - virtual void setNeedsOneShotDrawingSynchronization() { } - - // Sets a flag to specify that the view needs to be updated, so we need - // to do an eager layout before the drawing. - virtual void scheduleCompositingLayerSync(); - - virtual CompositingTriggerFlags allowedCompositingTriggers() const; -#endif - - virtual bool supportsFullscreenForNode(const WebCore::Node*); - virtual void enterFullscreenForNode(WebCore::Node*); - virtual void exitFullscreenForNode(WebCore::Node*); - - // ChromeClientChromium methods: - virtual void popupOpened(WebCore::PopupContainer* popupContainer, - const WebCore::IntRect& bounds, - bool handleExternally); - virtual void popupClosed(WebCore::PopupContainer* popupContainer); - virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification); - - // ChromeClientImpl: - void setCursor(const WebCursorInfo& cursor); - void setCursorForPlugin(const WebCursorInfo& cursor); - - virtual bool selectItemWritingDirectionIsNatural(); - virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const; - virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const; - -#if ENABLE(CONTEXT_MENUS) - virtual void showContextMenu() { } -#endif - -private: - void getPopupMenuInfo(WebCore::PopupContainer*, WebPopupMenuInfo*); - - WebViewImpl* m_webView; // weak pointer - bool m_toolbarsVisible; - bool m_statusbarVisible; - bool m_scrollbarsVisible; - bool m_menubarVisible; - bool m_resizable; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp deleted file mode 100644 index 38a3f1d..0000000 --- a/WebKit/chromium/src/ChromiumBridge.cpp +++ /dev/null @@ -1,1018 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ChromiumBridge.h" - -#include <googleurl/src/url_util.h> - -#include "Chrome.h" -#include "ChromeClientImpl.h" -#include "WebAudioBus.h" -#include "WebClipboard.h" -#include "WebCookie.h" -#include "WebCookieJar.h" -#include "WebCursorInfo.h" -#include "WebData.h" -#include "WebDragData.h" -#include "WebFileUtilities.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebIDBKey.h" -#include "WebImage.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMimeRegistry.h" -#include "WebPluginContainerImpl.h" -#include "WebPluginListBuilderImpl.h" -#include "WebSandboxSupport.h" -#include "WebSerializedScriptValue.h" -#include "WebScreenInfo.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebVector.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include "WebWorkerClientImpl.h" - -#if PLATFORM(CG) -#include <CoreGraphics/CGContext.h> -#endif - -#if OS(WINDOWS) -#include "WebRect.h" -#include "win/WebThemeEngine.h" -#endif - -#if OS(LINUX) || OS(FREEBSD) -#include "linux/WebThemeEngine.h" -#include "WebFontInfo.h" -#include "WebFontRenderStyle.h" -#endif - -#if OS(DARWIN) -#include "mac/WebThemeEngine.h" -#endif - -#if WEBKIT_USING_SKIA -#include "NativeImageSkia.h" -#endif - -#include "BitmapImage.h" -#include "Cookie.h" -#include "FrameView.h" -#include "GraphicsContext.h" -#include "IDBFactoryBackendProxy.h" -#include "KURL.h" -#include "NotImplemented.h" -#include "PlatformContextSkia.h" -#include "PluginData.h" -#include "SharedBuffer.h" - -#if !ENABLE(CLIENT_BASED_GEOLOCATION) -#include "WebGeolocationServiceBridgeImpl.h" -#endif - -#include "Worker.h" -#include "WorkerContextProxy.h" -#include <wtf/Assertions.h> - -// We are part of the WebKit implementation. -using namespace WebKit; - -namespace WebCore { - -static ChromeClientImpl* toChromeClientImpl(Widget* widget) -{ - if (!widget) - return 0; - - FrameView* view; - if (widget->isFrameView()) - view = static_cast<FrameView*>(widget); - else if (widget->parent() && widget->parent()->isFrameView()) - view = static_cast<FrameView*>(widget->parent()); - else - return 0; - - Page* page = view->frame() ? view->frame()->page() : 0; - if (!page) - return 0; - - return static_cast<ChromeClientImpl*>(page->chrome()->client()); -} - -static WebWidgetClient* toWebWidgetClient(Widget* widget) -{ - ChromeClientImpl* chromeClientImpl = toChromeClientImpl(widget); - if (!chromeClientImpl || !chromeClientImpl->webView()) - return 0; - return chromeClientImpl->webView()->client(); -} - -static WebCookieJar* getCookieJar(const Document* document) -{ - WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame()); - if (!frameImpl || !frameImpl->client()) - return 0; - WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl); - if (!cookieJar) - cookieJar = webKitClient()->cookieJar(); - return cookieJar; -} - -// Cache ---------------------------------------------------------------------- - -void ChromiumBridge::cacheMetadata(const KURL& url, double responseTime, const Vector<char>& data) -{ - webKitClient()->cacheMetadata(url, responseTime, data.data(), data.size()); -} - -// Clipboard ------------------------------------------------------------------ - -bool ChromiumBridge::clipboardIsFormatAvailable( - PasteboardPrivate::ClipboardFormat format, - PasteboardPrivate::ClipboardBuffer buffer) -{ - return webKitClient()->clipboard()->isFormatAvailable( - static_cast<WebClipboard::Format>(format), - static_cast<WebClipboard::Buffer>(buffer)); -} - -String ChromiumBridge::clipboardReadPlainText( - PasteboardPrivate::ClipboardBuffer buffer) -{ - return webKitClient()->clipboard()->readPlainText( - static_cast<WebClipboard::Buffer>(buffer)); -} - -void ChromiumBridge::clipboardReadHTML( - PasteboardPrivate::ClipboardBuffer buffer, - String* htmlText, KURL* sourceURL) -{ - WebURL url; - *htmlText = webKitClient()->clipboard()->readHTML( - static_cast<WebClipboard::Buffer>(buffer), &url); - *sourceURL = url; -} - -void ChromiumBridge::clipboardWriteSelection(const String& htmlText, - const KURL& sourceURL, - const String& plainText, - bool writeSmartPaste) -{ - webKitClient()->clipboard()->writeHTML( - htmlText, sourceURL, plainText, writeSmartPaste); -} - -void ChromiumBridge::clipboardWritePlainText(const String& plainText) -{ - webKitClient()->clipboard()->writePlainText(plainText); -} - -void ChromiumBridge::clipboardWriteURL(const KURL& url, const String& title) -{ - webKitClient()->clipboard()->writeURL(url, title); -} - -void ChromiumBridge::clipboardWriteImage(NativeImagePtr image, - const KURL& sourceURL, - const String& title) -{ -#if WEBKIT_USING_SKIA - WebImage webImage(*image); -#else - WebImage webImage(image); -#endif - webKitClient()->clipboard()->writeImage(webImage, sourceURL, title); -} - -void ChromiumBridge::clipboardWriteData(const String& type, - const String& data, - const String& metadata) -{ - webKitClient()->clipboard()->writeData(type, data, metadata); -} - -HashSet<String> ChromiumBridge::clipboardReadAvailableTypes( - PasteboardPrivate::ClipboardBuffer buffer, bool* containsFilenames) -{ - WebVector<WebString> result = webKitClient()->clipboard()->readAvailableTypes( - static_cast<WebClipboard::Buffer>(buffer), containsFilenames); - HashSet<String> types; - for (size_t i = 0; i < result.size(); ++i) - types.add(result[i]); - return types; -} - -bool ChromiumBridge::clipboardReadData(PasteboardPrivate::ClipboardBuffer buffer, - const String& type, String& data, String& metadata) -{ - WebString resultData; - WebString resultMetadata; - bool succeeded = webKitClient()->clipboard()->readData( - static_cast<WebClipboard::Buffer>(buffer), type, &resultData, &resultMetadata); - if (succeeded) { - data = resultData; - metadata = resultMetadata; - } - return succeeded; -} - -Vector<String> ChromiumBridge::clipboardReadFilenames(PasteboardPrivate::ClipboardBuffer buffer) -{ - WebVector<WebString> result = webKitClient()->clipboard()->readFilenames( - static_cast<WebClipboard::Buffer>(buffer)); - Vector<String> convertedResult; - for (size_t i = 0; i < result.size(); ++i) - convertedResult.append(result[i]); - return convertedResult; -} - -// Cookies -------------------------------------------------------------------- - -void ChromiumBridge::setCookies(const Document* document, const KURL& url, - const String& value) -{ - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - cookieJar->setCookie(url, document->firstPartyForCookies(), value); -} - -String ChromiumBridge::cookies(const Document* document, const KURL& url) -{ - String result; - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - result = cookieJar->cookies(url, document->firstPartyForCookies()); - return result; -} - -String ChromiumBridge::cookieRequestHeaderFieldValue(const Document* document, - const KURL& url) -{ - String result; - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - result = cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); - return result; -} - -bool ChromiumBridge::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) -{ - rawCookies.clear(); - WebVector<WebCookie> webCookies; - - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - cookieJar->rawCookies(url, document->firstPartyForCookies(), webCookies); - - for (unsigned i = 0; i < webCookies.size(); ++i) { - const WebCookie& webCookie = webCookies[i]; - Cookie cookie(webCookie.name, - webCookie.value, - webCookie.domain, - webCookie.path, - webCookie.expires, - webCookie.httpOnly, - webCookie.secure, - webCookie.session); - rawCookies.append(cookie); - } - return true; -} - -void ChromiumBridge::deleteCookie(const Document* document, const KURL& url, const String& cookieName) -{ - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - cookieJar->deleteCookie(url, cookieName); -} - -bool ChromiumBridge::cookiesEnabled(const Document* document) -{ - bool result = false; - WebCookieJar* cookieJar = getCookieJar(document); - if (cookieJar) - result = cookieJar->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); - return result; -} - -// DNS ------------------------------------------------------------------------ - -void ChromiumBridge::prefetchDNS(const String& hostname) -{ - webKitClient()->prefetchHostName(hostname); -} - -// File ------------------------------------------------------------------------ - -bool ChromiumBridge::fileExists(const String& path) -{ - return webKitClient()->fileUtilities()->fileExists(path); -} - -bool ChromiumBridge::deleteFile(const String& path) -{ - return webKitClient()->fileUtilities()->deleteFile(path); -} - -bool ChromiumBridge::deleteEmptyDirectory(const String& path) -{ - return webKitClient()->fileUtilities()->deleteEmptyDirectory(path); -} - -bool ChromiumBridge::getFileSize(const String& path, long long& result) -{ - return webKitClient()->fileUtilities()->getFileSize(path, result); -} - -void ChromiumBridge::revealFolderInOS(const String& path) -{ - webKitClient()->fileUtilities()->revealFolderInOS(path); -} - -bool ChromiumBridge::getFileModificationTime(const String& path, time_t& result) -{ - double modificationTime; - if (!webKitClient()->fileUtilities()->getFileModificationTime(path, modificationTime)) - return false; - result = static_cast<time_t>(modificationTime); - return true; -} - -String ChromiumBridge::directoryName(const String& path) -{ - return webKitClient()->fileUtilities()->directoryName(path); -} - -String ChromiumBridge::pathByAppendingComponent(const String& path, const String& component) -{ - return webKitClient()->fileUtilities()->pathByAppendingComponent(path, component); -} - -bool ChromiumBridge::makeAllDirectories(const String& path) -{ - return webKitClient()->fileUtilities()->makeAllDirectories(path); -} - -String ChromiumBridge::getAbsolutePath(const String& path) -{ - return webKitClient()->fileUtilities()->getAbsolutePath(path); -} - -bool ChromiumBridge::isDirectory(const String& path) -{ - return webKitClient()->fileUtilities()->isDirectory(path); -} - -KURL ChromiumBridge::filePathToURL(const String& path) -{ - return webKitClient()->fileUtilities()->filePathToURL(path); -} - -PlatformFileHandle ChromiumBridge::openFile(const String& path, FileOpenMode mode) -{ - return webKitClient()->fileUtilities()->openFile(path, mode); -} - -void ChromiumBridge::closeFile(PlatformFileHandle& handle) -{ - webKitClient()->fileUtilities()->closeFile(handle); -} - -long long ChromiumBridge::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin) -{ - return webKitClient()->fileUtilities()->seekFile(handle, offset, origin); -} - -bool ChromiumBridge::truncateFile(PlatformFileHandle handle, long long offset) -{ - return webKitClient()->fileUtilities()->truncateFile(handle, offset); -} - -int ChromiumBridge::readFromFile(PlatformFileHandle handle, char* data, int length) -{ - return webKitClient()->fileUtilities()->readFromFile(handle, data, length); -} - -int ChromiumBridge::writeToFile(PlatformFileHandle handle, const char* data, int length) -{ - return webKitClient()->fileUtilities()->writeToFile(handle, data, length); -} - -// Font ----------------------------------------------------------------------- - -#if OS(WINDOWS) -bool ChromiumBridge::ensureFontLoaded(HFONT font) -{ - WebSandboxSupport* ss = webKitClient()->sandboxSupport(); - - // if there is no sandbox, then we can assume the font - // was able to be loaded successfully already - return ss ? ss->ensureFontLoaded(font) : true; -} -#endif - -#if OS(LINUX) || OS(FREEBSD) -String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters) -{ - if (webKitClient()->sandboxSupport()) - return webKitClient()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters); - - WebCString family = WebFontInfo::familyForChars(characters, numCharacters); - if (family.data()) - return WebString::fromUTF8(family.data()); - - return WebString(); -} - -void ChromiumBridge::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result) -{ - WebFontRenderStyle style; - - if (webKitClient()->sandboxSupport()) - webKitClient()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); - else - WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); - - style.toFontRenderStyle(result); -} -#endif - -#if OS(DARWIN) -bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out) -{ - WebSandboxSupport* ss = webKitClient()->sandboxSupport(); - if (ss) - return ss->loadFont(srcFont, out); - - // This function should only be called in response to an error loading a - // font due to being blocked by the sandbox. - // This by definition shouldn't happen if there is no sandbox support. - ASSERT_NOT_REACHED(); - *out = 0; - return false; -} -#endif - -#if !ENABLE(CLIENT_BASED_GEOLOCATION) -// Geolocation ---------------------------------------------------------------- - -GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium) -{ - return createGeolocationServiceBridgeImpl(geolocationServiceChromium); -} -#endif - -// Databases ------------------------------------------------------------------ - -PlatformFileHandle ChromiumBridge::databaseOpenFile(const String& vfsFileName, int desiredFlags) -{ - return webKitClient()->databaseOpenFile(WebString(vfsFileName), desiredFlags); -} - -int ChromiumBridge::databaseDeleteFile(const String& vfsFileName, bool syncDir) -{ - return webKitClient()->databaseDeleteFile(WebString(vfsFileName), syncDir); -} - -long ChromiumBridge::databaseGetFileAttributes(const String& vfsFileName) -{ - return webKitClient()->databaseGetFileAttributes(WebString(vfsFileName)); -} - -long long ChromiumBridge::databaseGetFileSize(const String& vfsFileName) -{ - return webKitClient()->databaseGetFileSize(WebString(vfsFileName)); -} - -// Indexed Database ----------------------------------------------------------- - -PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory() -{ - // There's no reason why we need to allocate a new proxy each time, but - // there's also no strong reason not to. - return IDBFactoryBackendProxy::create(); -} - -void ChromiumBridge::idbShutdown() -{ - // In the browser process, this shuts down the utility process. In the renderer process, it does nothing. - webKitClient()->idbShutdown(); -} - -void ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys) -{ - WebVector<WebSerializedScriptValue> webValues = values; - WebVector<WebIDBKey> webKeys; - webKitClient()->createIDBKeysFromSerializedValuesAndKeyPath(webValues, WebString(keyPath), webKeys); - - size_t webKeysSize = webKeys.size(); - keys.reserveCapacity(webKeysSize); - for (size_t i = 0; i < webKeysSize; ++i) - keys.append(PassRefPtr<IDBKey>(webKeys[i])); -} - -// Keygen --------------------------------------------------------------------- - -String ChromiumBridge::signedPublicKeyAndChallengeString( - unsigned keySizeIndex, const String& challenge, const KURL& url) -{ - return webKitClient()->signedPublicKeyAndChallengeString(keySizeIndex, - WebString(challenge), - WebURL(url)); -} - -// Language ------------------------------------------------------------------- - -String ChromiumBridge::computedDefaultLanguage() -{ - return webKitClient()->defaultLocale(); -} - -// LayoutTestMode ------------------------------------------------------------- - -bool ChromiumBridge::layoutTestMode() -{ - return WebKit::layoutTestMode(); -} - -// MimeType ------------------------------------------------------------------- - -bool ChromiumBridge::isSupportedImageMIMEType(const String& mimeType) -{ - return webKitClient()->mimeRegistry()->supportsImageMIMEType(mimeType) - != WebMimeRegistry::IsNotSupported; -} - -bool ChromiumBridge::isSupportedJavaScriptMIMEType(const String& mimeType) -{ - return webKitClient()->mimeRegistry()->supportsJavaScriptMIMEType(mimeType) - != WebMimeRegistry::IsNotSupported; -} - -bool ChromiumBridge::isSupportedNonImageMIMEType(const String& mimeType) -{ - return webKitClient()->mimeRegistry()->supportsNonImageMIMEType(mimeType) - != WebMimeRegistry::IsNotSupported; -} - -String ChromiumBridge::mimeTypeForExtension(const String& extension) -{ - return webKitClient()->mimeRegistry()->mimeTypeForExtension(extension); -} - -String ChromiumBridge::mimeTypeFromFile(const String& path) -{ - return webKitClient()->mimeRegistry()->mimeTypeFromFile(path); -} - -String ChromiumBridge::preferredExtensionForMIMEType(const String& mimeType) -{ - return webKitClient()->mimeRegistry()->preferredExtensionForMIMEType(mimeType); -} - -// Plugin --------------------------------------------------------------------- - -bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo>* results) -{ - WebPluginListBuilderImpl builder(results); - webKitClient()->getPluginList(refresh, &builder); - return true; // FIXME: There is no need for this function to return a value. -} - -NPObject* ChromiumBridge::pluginScriptableObject(Widget* widget) -{ - if (!widget || !widget->isPluginContainer()) - return 0; - - return static_cast<WebPluginContainerImpl*>(widget)->scriptableObject(); -} - -// Resources ------------------------------------------------------------------ - -PassRefPtr<Image> ChromiumBridge::loadPlatformImageResource(const char* name) -{ - const WebData& resource = webKitClient()->loadResource(name); - if (resource.isEmpty()) - return Image::nullImage(); - - RefPtr<Image> image = BitmapImage::create(); - image->setData(resource, true); - return image; -} - -#if ENABLE(WEB_AUDIO) - -PassOwnPtr<AudioBus> ChromiumBridge::loadPlatformAudioResource(const char* name, double sampleRate) -{ - const WebData& resource = webKitClient()->loadResource(name); - if (resource.isEmpty()) - return 0; - - return decodeAudioFileData(resource.data(), resource.size(), sampleRate); -} - -PassOwnPtr<AudioBus> ChromiumBridge::decodeAudioFileData(const char* data, size_t size, double sampleRate) -{ - WebAudioBus webAudioBus; - if (webKitClient()->loadAudioResource(&webAudioBus, data, size, sampleRate)) - return webAudioBus.release(); - return 0; -} - -#endif // ENABLE(WEB_AUDIO) - -// Sandbox -------------------------------------------------------------------- - -bool ChromiumBridge::sandboxEnabled() -{ - return webKitClient()->sandboxEnabled(); -} - -// SharedTimers --------------------------------------------------------------- - -void ChromiumBridge::setSharedTimerFiredFunction(void (*func)()) -{ - webKitClient()->setSharedTimerFiredFunction(func); -} - -void ChromiumBridge::setSharedTimerFireTime(double fireTime) -{ - webKitClient()->setSharedTimerFireTime(fireTime); -} - -void ChromiumBridge::stopSharedTimer() -{ - webKitClient()->stopSharedTimer(); -} - -// StatsCounters -------------------------------------------------------------- - -void ChromiumBridge::decrementStatsCounter(const char* name) -{ - webKitClient()->decrementStatsCounter(name); -} - -void ChromiumBridge::incrementStatsCounter(const char* name) -{ - webKitClient()->incrementStatsCounter(name); -} - -void ChromiumBridge::histogramCustomCounts(const char* name, int sample, int min, int max, int bucketCount) -{ - webKitClient()->histogramCustomCounts(name, sample, min, max, bucketCount); -} - -void ChromiumBridge::histogramEnumeration(const char* name, int sample, int boundaryValue) -{ - webKitClient()->histogramEnumeration(name, sample, boundaryValue); -} - -// Sudden Termination --------------------------------------------------------- - -void ChromiumBridge::suddenTerminationChanged(bool enabled) -{ - webKitClient()->suddenTerminationChanged(enabled); -} - -// SystemTime ----------------------------------------------------------------- - -double ChromiumBridge::currentTime() -{ - return webKitClient()->currentTime(); -} - -// Theming -------------------------------------------------------------------- - -#if OS(WINDOWS) - -void ChromiumBridge::paintButton( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintButton( - gc->platformContext()->canvas(), part, state, classicState, rect); -} - -void ChromiumBridge::paintMenuList( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintMenuList( - gc->platformContext()->canvas(), part, state, classicState, rect); -} - -void ChromiumBridge::paintScrollbarArrow( - GraphicsContext* gc, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintScrollbarArrow( - gc->platformContext()->canvas(), state, classicState, rect); -} - -void ChromiumBridge::paintScrollbarThumb( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintScrollbarThumb( - gc->platformContext()->canvas(), part, state, classicState, rect); -} - -void ChromiumBridge::paintScrollbarTrack( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect, const IntRect& alignRect) -{ - webKitClient()->themeEngine()->paintScrollbarTrack( - gc->platformContext()->canvas(), part, state, classicState, rect, - alignRect); -} - -void ChromiumBridge::paintSpinButton( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintSpinButton( - gc->platformContext()->canvas(), part, state, classicState, rect); -} - -void ChromiumBridge::paintTextField( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect, const Color& color, bool fillContentArea, - bool drawEdges) -{ - // Fallback to white when |color| is invalid. - RGBA32 backgroundColor = color.isValid() ? color.rgb() : Color::white; - - webKitClient()->themeEngine()->paintTextField( - gc->platformContext()->canvas(), part, state, classicState, rect, - backgroundColor, fillContentArea, drawEdges); -} - -void ChromiumBridge::paintTrackbar( - GraphicsContext* gc, int part, int state, int classicState, - const IntRect& rect) -{ - webKitClient()->themeEngine()->paintTrackbar( - gc->platformContext()->canvas(), part, state, classicState, rect); -} - -void ChromiumBridge::paintProgressBar( - GraphicsContext* gc, const IntRect& barRect, const IntRect& valueRect, bool determinate, double animatedSeconds) -{ - webKitClient()->themeEngine()->paintProgressBar( - gc->platformContext()->canvas(), barRect, valueRect, determinate, animatedSeconds); -} - -#elif OS(LINUX) - -static WebThemeEngine::Part WebThemePart(ChromiumBridge::ThemePart part) -{ - switch (part) { - case ChromiumBridge::PartScrollbarDownArrow: return WebThemeEngine::PartScrollbarDownArrow; - case ChromiumBridge::PartScrollbarLeftArrow: return WebThemeEngine::PartScrollbarLeftArrow; - case ChromiumBridge::PartScrollbarRightArrow: return WebThemeEngine::PartScrollbarRightArrow; - case ChromiumBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow; - case ChromiumBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb; - case ChromiumBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb; - case ChromiumBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack; - case ChromiumBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack; - } - ASSERT_NOT_REACHED(); - return WebThemeEngine::PartScrollbarDownArrow; -} - -static WebThemeEngine::State WebThemeState(ChromiumBridge::ThemePaintState state) -{ - switch (state) { - case ChromiumBridge::StateDisabled: return WebThemeEngine::StateDisabled; - case ChromiumBridge::StateHover: return WebThemeEngine::StateHover; - case ChromiumBridge::StateNormal: return WebThemeEngine::StateNormal; - case ChromiumBridge::StatePressed: return WebThemeEngine::StatePressed; - } - ASSERT_NOT_REACHED(); - return WebThemeEngine::StateDisabled; -} - -static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridge::ThemePaintState state, const ChromiumBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams) -{ - if (part == ChromiumBridge::PartScrollbarHorizontalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) { - webThemeExtraParams->scrollbarTrack.trackX = extraParams->scrollbarTrack.trackX; - webThemeExtraParams->scrollbarTrack.trackY = extraParams->scrollbarTrack.trackY; - webThemeExtraParams->scrollbarTrack.trackWidth = extraParams->scrollbarTrack.trackWidth; - webThemeExtraParams->scrollbarTrack.trackHeight = extraParams->scrollbarTrack.trackHeight; - } -} - -IntSize ChromiumBridge::getThemePartSize(ThemePart part) -{ - return webKitClient()->themeEngine()->getSize(WebThemePart(part)); -} - -void ChromiumBridge::paintThemePart( - GraphicsContext* gc, ThemePart part, ThemePaintState state, const IntRect& rect, const ThemePaintExtraParams* extraParams) -{ - WebThemeEngine::ExtraParams webThemeExtraParams; - GetWebThemeExtraParams(part, state, extraParams, &webThemeExtraParams); - webKitClient()->themeEngine()->paint( - gc->platformContext()->canvas(), WebThemePart(part), WebThemeState(state), rect, &webThemeExtraParams); -} - -#elif OS(DARWIN) - -void ChromiumBridge::paintScrollbarThumb( - GraphicsContext* gc, ThemePaintState state, ThemePaintSize size, const IntRect& rect, const ThemePaintScrollbarInfo& scrollbarInfo) -{ - WebThemeEngine::ScrollbarInfo webThemeScrollbarInfo; - - webThemeScrollbarInfo.orientation = static_cast<WebThemeEngine::ScrollbarOrientation>(scrollbarInfo.orientation); - webThemeScrollbarInfo.parent = static_cast<WebThemeEngine::ScrollbarParent>(scrollbarInfo.parent); - webThemeScrollbarInfo.maxValue = scrollbarInfo.maxValue; - webThemeScrollbarInfo.currentValue = scrollbarInfo.currentValue; - webThemeScrollbarInfo.visibleSize = scrollbarInfo.visibleSize; - webThemeScrollbarInfo.totalSize = scrollbarInfo.totalSize; - - webKitClient()->themeEngine()->paintScrollbarThumb( - gc->platformContext(), - static_cast<WebThemeEngine::State>(state), - static_cast<WebThemeEngine::Size>(size), - rect, - webThemeScrollbarInfo); -} - -#endif - -// Trace Event ---------------------------------------------------------------- - -void ChromiumBridge::traceEventBegin(const char* name, void* id, const char* extra) -{ - webKitClient()->traceEventBegin(name, id, extra); -} - -void ChromiumBridge::traceEventEnd(const char* name, void* id, const char* extra) -{ - webKitClient()->traceEventEnd(name, id, extra); -} - -// Visited Links -------------------------------------------------------------- - -LinkHash ChromiumBridge::visitedLinkHash(const UChar* url, unsigned length) -{ - url_canon::RawCanonOutput<2048> buffer; - url_parse::Parsed parsed; - if (!url_util::Canonicalize(url, length, 0, &buffer, &parsed)) - return 0; // Invalid URLs are unvisited. - return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); -} - -LinkHash ChromiumBridge::visitedLinkHash(const KURL& base, - const AtomicString& attributeURL) -{ - // Resolve the relative URL using googleurl and pass the absolute URL up to - // the embedder. We could create a GURL object from the base and resolve - // the relative URL that way, but calling the lower-level functions - // directly saves us the string allocation in most cases. - url_canon::RawCanonOutput<2048> buffer; - url_parse::Parsed parsed; - -#if USE(GOOGLEURL) - const CString& cstr = base.utf8String(); - const char* data = cstr.data(); - int length = cstr.length(); - const url_parse::Parsed& srcParsed = base.parsed(); -#else - // When we're not using GoogleURL, first canonicalize it so we can resolve it - // below. - url_canon::RawCanonOutput<2048> srcCanon; - url_parse::Parsed srcParsed; - String str = base.string(); - if (!url_util::Canonicalize(str.characters(), str.length(), 0, &srcCanon, &srcParsed)) - return 0; - const char* data = srcCanon.data(); - int length = srcCanon.length(); -#endif - - if (!url_util::ResolveRelative(data, length, srcParsed, attributeURL.characters(), - attributeURL.length(), 0, &buffer, &parsed)) - return 0; // Invalid resolved URL. - - return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); -} - -bool ChromiumBridge::isLinkVisited(LinkHash visitedLinkHash) -{ - return webKitClient()->isLinkVisited(visitedLinkHash); -} - -// These are temporary methods that the WebKit layer can use to call to the -// Glue layer. Once the Glue layer moves entirely into the WebKit layer, these -// methods will be deleted. - -void ChromiumBridge::notifyJSOutOfMemory(Frame* frame) -{ - if (!frame) - return; - - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); - if (!webFrame->client()) - return; - webFrame->client()->didExhaustMemoryAvailableForScript(webFrame); -} - -int ChromiumBridge::memoryUsageMB() -{ - return static_cast<int>(webKitClient()->memoryUsageMB()); -} - -int ChromiumBridge::actualMemoryUsageMB() -{ - return static_cast<int>(webKitClient()->actualMemoryUsageMB()); -} - -int ChromiumBridge::screenDepth(Widget* widget) -{ - WebWidgetClient* client = toWebWidgetClient(widget); - if (!client) - return 0; - return client->screenInfo().depth; -} - -int ChromiumBridge::screenDepthPerComponent(Widget* widget) -{ - WebWidgetClient* client = toWebWidgetClient(widget); - if (!client) - return 0; - return client->screenInfo().depthPerComponent; -} - -bool ChromiumBridge::screenIsMonochrome(Widget* widget) -{ - WebWidgetClient* client = toWebWidgetClient(widget); - if (!client) - return 0; - return client->screenInfo().isMonochrome; -} - -IntRect ChromiumBridge::screenRect(Widget* widget) -{ - WebWidgetClient* client = toWebWidgetClient(widget); - if (!client) - return IntRect(); - return client->screenInfo().rect; -} - -IntRect ChromiumBridge::screenAvailableRect(Widget* widget) -{ - WebWidgetClient* client = toWebWidgetClient(widget); - if (!client) - return IntRect(); - return client->screenInfo().availableRect; -} - -bool ChromiumBridge::popupsAllowed(NPP npp) -{ - // FIXME: Give the embedder a way to control this. - return false; -} - -void ChromiumBridge::widgetSetCursor(Widget* widget, const Cursor& cursor) -{ - ChromeClientImpl* client = toChromeClientImpl(widget); - if (client) - client->setCursor(WebCursorInfo(cursor)); -} - -WorkerContextProxy* WorkerContextProxy::create(Worker* worker) -{ - return WebWorkerClientImpl::createWorkerContextProxy(worker); -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/ChromiumCurrentTime.cpp b/WebKit/chromium/src/ChromiumCurrentTime.cpp deleted file mode 100644 index 1eccc41..0000000 --- a/WebKit/chromium/src/ChromiumCurrentTime.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include <wtf/CurrentTime.h> - -#include "WebKit.h" -#include "WebKitClient.h" - -namespace WTF { - -double currentTime() -{ - return WebKit::webKitClient()->currentTime(); -} - -} // namespace WTF diff --git a/WebKit/chromium/src/ChromiumThreading.cpp b/WebKit/chromium/src/ChromiumThreading.cpp deleted file mode 100644 index c6fefac..0000000 --- a/WebKit/chromium/src/ChromiumThreading.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include <wtf/chromium/ChromiumThreading.h> - -#include "WebKit.h" -#include "WebKitClient.h" - -#include <wtf/MainThread.h> - -namespace WTF { - -void ChromiumThreading::callOnMainThread(void (*func)(void*), void* context) -{ - WebKit::webKitClient()->callOnMainThread(func, context); -} - -} // namespace WTF diff --git a/WebKit/chromium/src/CompositionUnderlineBuilder.h b/WebKit/chromium/src/CompositionUnderlineBuilder.h deleted file mode 100644 index ce62474..0000000 --- a/WebKit/chromium/src/CompositionUnderlineBuilder.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef CompositionUnderlineBuilder_h -#define CompositionUnderlineBuilder_h - -#include "Editor.h" -#include "Vector.h" -#include "WebCompositionUnderline.h" -#include "WebVector.h" - -namespace WebKit { - -// This class is used for converting from WebCompositionUnderline to -// WebCore::CompositionUnderline. - -class CompositionUnderlineBuilder : public WebCore::CompositionUnderline { -public: - CompositionUnderlineBuilder(const WebCompositionUnderline& u) - : WebCore::CompositionUnderline(u.startOffset, u.endOffset, - WebCore::Color(u.color), u.thick) { } -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp deleted file mode 100644 index 55dca85..0000000 --- a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "CompositionUnderlineVectorBuilder.h" - -#include "CompositionUnderlineBuilder.h" - -using namespace WebCore; - -namespace WebKit { - -CompositionUnderlineVectorBuilder::CompositionUnderlineVectorBuilder( - const WebVector<WebCompositionUnderline>& underlines) -{ - size_t size = underlines.size(); - reserveCapacity(size); - for (size_t i = 0; i < size; ++i) - append(CompositionUnderlineBuilder(underlines[i])); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h b/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h deleted file mode 100644 index 8050f02..0000000 --- a/WebKit/chromium/src/CompositionUnderlineVectorBuilder.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef CompositionUnderlineVectorBuilder_h -#define CompositionUnderlineVectorBuilder_h - -#include "Editor.h" -#include "Vector.h" -#include "WebCompositionUnderline.h" -#include "WebVector.h" - -namespace WebKit { - -// This classes are used for converting from std::vector<WebCompositionUnderline> -// to Vector<WebCore::CompositionUnderline>. - -class CompositionUnderlineVectorBuilder : - public Vector<WebCore::CompositionUnderline> { -public: - CompositionUnderlineVectorBuilder( - const WebVector<WebCompositionUnderline>&); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp deleted file mode 100644 index 7bd1a2b..0000000 --- a/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ContextMenuClientImpl.h" - -#include "CSSPropertyNames.h" -#include "CSSStyleDeclaration.h" -#include "ContextMenu.h" -#include "ContextMenuController.h" -#include "Document.h" -#include "DocumentLoader.h" -#include "Editor.h" -#include "EventHandler.h" -#include "FrameLoader.h" -#include "FrameView.h" -#include "HitTestResult.h" -#include "HTMLMediaElement.h" -#include "HTMLNames.h" -#include "KURL.h" -#include "MediaError.h" -#include "Page.h" -#include "PlatformString.h" -#include "RenderWidget.h" -#include "TextBreakIterator.h" -#include "Widget.h" - -#include "WebContextMenuData.h" -#include "WebDataSourceImpl.h" -#include "WebFrameImpl.h" -#include "WebMenuItemInfo.h" -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" -#include "WebPoint.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebURLResponse.h" -#include "WebVector.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -using namespace WebCore; - -namespace WebKit { - -// Figure out the URL of a page or subframe. Returns |page_type| as the type, -// which indicates page or subframe, or ContextNodeType::NONE if the URL could not -// be determined for some reason. -static WebURL urlFromFrame(Frame* frame) -{ - if (frame) { - DocumentLoader* dl = frame->loader()->documentLoader(); - if (dl) { - WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); - if (ds) - return ds->hasUnreachableURL() ? ds->unreachableURL() : ds->request().url(); - } - } - return WebURL(); -} - -// Helper function to determine whether text is a single word. -static bool isASingleWord(const String& text) -{ - TextBreakIterator* it = wordBreakIterator(text.characters(), text.length()); - return it && textBreakNext(it) == static_cast<int>(text.length()); -} - -// Helper function to get misspelled word on which context menu -// is to be evolked. This function also sets the word on which context menu -// has been evoked to be the selected word, as required. This function changes -// the selection only when there were no selected characters on OS X. -static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* selectedFrame) -{ - // First select from selectedText to check for multiple word selection. - String misspelledWord = selectedFrame->editor()->selectedText().stripWhiteSpace(); - - // If some texts were already selected, we don't change the selection. - if (!misspelledWord.isEmpty()) { - // Don't provide suggestions for multiple words. - if (!isASingleWord(misspelledWord)) - return String(); - return misspelledWord; - } - - // Selection is empty, so change the selection to the word under the cursor. - HitTestResult hitTestResult = selectedFrame->eventHandler()-> - hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().point(), true); - Node* innerNode = hitTestResult.innerNode(); - VisiblePosition pos(innerNode->renderer()->positionForPoint( - hitTestResult.localPoint())); - - if (pos.isNull()) - return misspelledWord; // It is empty. - - WebFrameImpl::selectWordAroundPosition(selectedFrame, pos); - misspelledWord = selectedFrame->editor()->selectedText().stripWhiteSpace(); - -#if OS(DARWIN) - // If misspelled word is still empty, then that portion should not be - // selected. Set the selection to that position only, and do not expand. - if (misspelledWord.isEmpty()) - selectedFrame->selection()->setSelection(VisibleSelection(pos)); -#else - // On non-Mac, right-click should not make a range selection in any case. - selectedFrame->selection()->setSelection(VisibleSelection(pos)); -#endif - return misspelledWord; -} - -PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( - ContextMenu* defaultMenu) -{ - // Displaying the context menu in this function is a big hack as we don't - // have context, i.e. whether this is being invoked via a script or in - // response to user input (Mouse event WM_RBUTTONDOWN, - // Keyboard events KeyVK_APPS, Shift+F10). Check if this is being invoked - // in response to the above input events before popping up the context menu. - if (!m_webView->contextMenuAllowed()) - return 0; - - HitTestResult r = m_webView->page()->contextMenuController()->hitTestResult(); - Frame* selectedFrame = r.innerNonSharedNode()->document()->frame(); - - WebContextMenuData data; - data.mousePosition = selectedFrame->view()->contentsToWindow(r.point()); - - // Compute edit flags. - data.editFlags = WebContextMenuData::CanDoNone; - if (m_webView->focusedWebCoreFrame()->editor()->canUndo()) - data.editFlags |= WebContextMenuData::CanUndo; - if (m_webView->focusedWebCoreFrame()->editor()->canRedo()) - data.editFlags |= WebContextMenuData::CanRedo; - if (m_webView->focusedWebCoreFrame()->editor()->canCut()) - data.editFlags |= WebContextMenuData::CanCut; - if (m_webView->focusedWebCoreFrame()->editor()->canCopy()) - data.editFlags |= WebContextMenuData::CanCopy; - if (m_webView->focusedWebCoreFrame()->editor()->canPaste()) - data.editFlags |= WebContextMenuData::CanPaste; - if (m_webView->focusedWebCoreFrame()->editor()->canDelete()) - data.editFlags |= WebContextMenuData::CanDelete; - // We can always select all... - data.editFlags |= WebContextMenuData::CanSelectAll; - data.editFlags |= WebContextMenuData::CanTranslate; - - // Links, Images, Media tags, and Image/Media-Links take preference over - // all else. - data.linkURL = r.absoluteLinkURL(); - - if (!r.absoluteImageURL().isEmpty()) { - data.srcURL = r.absoluteImageURL(); - data.mediaType = WebContextMenuData::MediaTypeImage; - } else if (!r.absoluteMediaURL().isEmpty()) { - data.srcURL = r.absoluteMediaURL(); - - // We know that if absoluteMediaURL() is not empty, then this - // is a media element. - HTMLMediaElement* mediaElement = - static_cast<HTMLMediaElement*>(r.innerNonSharedNode()); - if (mediaElement->hasTagName(HTMLNames::videoTag)) - data.mediaType = WebContextMenuData::MediaTypeVideo; - else if (mediaElement->hasTagName(HTMLNames::audioTag)) - data.mediaType = WebContextMenuData::MediaTypeAudio; - - if (mediaElement->error()) - data.mediaFlags |= WebContextMenuData::MediaInError; - if (mediaElement->paused()) - data.mediaFlags |= WebContextMenuData::MediaPaused; - if (mediaElement->muted()) - data.mediaFlags |= WebContextMenuData::MediaMuted; - if (mediaElement->loop()) - data.mediaFlags |= WebContextMenuData::MediaLoop; - if (mediaElement->supportsSave()) - data.mediaFlags |= WebContextMenuData::MediaCanSave; - if (mediaElement->hasAudio()) - data.mediaFlags |= WebContextMenuData::MediaHasAudio; - if (mediaElement->hasVideo()) - data.mediaFlags |= WebContextMenuData::MediaHasVideo; - if (mediaElement->controls()) - data.mediaFlags |= WebContextMenuData::MediaControls; - } else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) - || r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) { - RenderObject* object = r.innerNonSharedNode()->renderer(); - if (object && object->isWidget()) { - Widget* widget = toRenderWidget(object)->widget(); - if (widget && widget->isPluginContainer()) { - WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget); - WebString text = plugin->plugin()->selectionAsText(); - if (!text.isEmpty()) { - data.selectedText = text; - data.editFlags |= WebContextMenuData::CanCopy; - } - data.editFlags &= ~WebContextMenuData::CanTranslate; - data.linkURL = plugin->plugin()->linkAtPosition(data.mousePosition); - } - } - } - - data.isImageBlocked = - (data.mediaType == WebContextMenuData::MediaTypeImage) && !r.image(); - - // If it's not a link, an image, a media element, or an image/media link, - // show a selection menu or a more generic page menu. - data.frameEncoding = selectedFrame->loader()->writer()->encoding(); - - // Send the frame and page URLs in any case. - data.pageURL = urlFromFrame(m_webView->mainFrameImpl()->frame()); - if (selectedFrame != m_webView->mainFrameImpl()->frame()) - data.frameURL = urlFromFrame(selectedFrame); - - if (r.isSelected()) - data.selectedText = selectedFrame->editor()->selectedText().stripWhiteSpace(); - - if (r.isContentEditable()) { - data.isEditable = true; - if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) { - data.isSpellCheckingEnabled = true; - // Spellchecking might be enabled for the field, but could be disabled on the node. - if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) - data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame); - } - } - -#if OS(DARWIN) - ExceptionCode ec = 0; - RefPtr<CSSStyleDeclaration> style = selectedFrame->document()->createCSSStyleDeclaration(); - style->setProperty(CSSPropertyDirection, "ltr", false, ec); - if (selectedFrame->editor()->selectionHasStyle(style.get()) != FalseTriState) - data.writingDirectionLeftToRight |= WebContextMenuData::CheckableMenuItemChecked; - style->setProperty(CSSPropertyDirection, "rtl", false, ec); - if (selectedFrame->editor()->selectionHasStyle(style.get()) != FalseTriState) - data.writingDirectionRightToLeft |= WebContextMenuData::CheckableMenuItemChecked; -#endif // OS(DARWIN) - - // Now retrieve the security info. - DocumentLoader* dl = selectedFrame->loader()->documentLoader(); - WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); - if (ds) - data.securityInfo = ds->response().securityInfo(); - - // Filter out custom menu elements and add them into the data. - populateCustomMenuItems(defaultMenu, &data); - - WebFrame* selected_web_frame = WebFrameImpl::fromFrame(selectedFrame); - if (m_webView->client()) - m_webView->client()->showContextMenu(selected_web_frame, data); - - return 0; -} - -void ContextMenuClientImpl::populateCustomMenuItems(WebCore::ContextMenu* defaultMenu, WebContextMenuData* data) -{ - Vector<WebMenuItemInfo> customItems; - for (size_t i = 0; i < defaultMenu->itemCount(); ++i) { - ContextMenuItem* inputItem = defaultMenu->itemAtIndex(i, defaultMenu->platformDescription()); - if (inputItem->action() < ContextMenuItemBaseCustomTag || inputItem->action() > ContextMenuItemLastCustomTag) - continue; - - WebMenuItemInfo outputItem; - outputItem.label = inputItem->title(); - outputItem.enabled = inputItem->enabled(); - outputItem.checked = inputItem->checked(); - outputItem.action = static_cast<unsigned>(inputItem->action() - ContextMenuItemBaseCustomTag); - switch (inputItem->type()) { - case ActionType: - outputItem.type = WebMenuItemInfo::Option; - break; - case CheckableActionType: - outputItem.type = WebMenuItemInfo::CheckableOption; - break; - case SeparatorType: - outputItem.type = WebMenuItemInfo::Separator; - break; - case SubmenuType: - outputItem.type = WebMenuItemInfo::Group; - break; - } - customItems.append(outputItem); - } - - WebVector<WebMenuItemInfo> outputItems(customItems.size()); - for (size_t i = 0; i < customItems.size(); ++i) - outputItems[i] = customItems[i]; - data->customItems.swap(outputItems); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/ContextMenuClientImpl.h b/WebKit/chromium/src/ContextMenuClientImpl.h deleted file mode 100644 index 97ea967..0000000 --- a/WebKit/chromium/src/ContextMenuClientImpl.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ContextMenuClientImpl_h -#define ContextMenuClientImpl_h - -#include "ContextMenuClient.h" - -namespace WebKit { - -class WebViewImpl; -struct WebContextMenuData; - -class ContextMenuClientImpl : public WebCore::ContextMenuClient { -public: - ContextMenuClientImpl(WebViewImpl* webView) : m_webView(webView) {} - virtual ~ContextMenuClientImpl() {} - virtual void copyImageToClipboard(const WebCore::HitTestResult&) {} - virtual void contextMenuDestroyed() {} - virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*) {} - virtual void downloadURL(const WebCore::KURL&) {} - virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*); - virtual bool isSpeaking() { return false; } - virtual void lookUpInDictionary(WebCore::Frame*) {} - virtual void searchWithGoogle(const WebCore::Frame*) {} - virtual bool shouldIncludeInspectElementItem() { return false; } - virtual void speak(const WTF::String&) {} - virtual void stopSpeaking() {} -private: - void populateCustomMenuItems(WebCore::ContextMenu*, WebContextMenuData*); - WebViewImpl* m_webView; -}; - -} // namespace WebKit - -#endif // ContextMenuClientImpl_h diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp b/WebKit/chromium/src/DOMUtilitiesPrivate.cpp deleted file mode 100644 index 6f952f7..0000000 --- a/WebKit/chromium/src/DOMUtilitiesPrivate.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DOMUtilitiesPrivate.h" - -#include "Element.h" -#include "HTMLInputElement.h" -#include "HTMLLinkElement.h" -#include "HTMLMetaElement.h" -#include "HTMLNames.h" -#include "HTMLOptionElement.h" -#include "Node.h" - -#include "WebInputElement.h" - -using namespace WebCore; - -namespace { - -template <class HTMLNodeType> -HTMLNodeType* toHTMLElement(Node* node, const QualifiedName& name) -{ - if (node->isHTMLElement() - && static_cast<HTMLElement*>(node)->hasTagName(name)) { - return static_cast<HTMLNodeType*>(node); - } - return 0; -} - -} // namespace - -namespace WebKit { - -HTMLInputElement* toHTMLInputElement(Node* node) -{ - return toHTMLElement<HTMLInputElement>(node, HTMLNames::inputTag); -} - -HTMLLinkElement* toHTMLLinkElement(Node* node) -{ - return toHTMLElement<HTMLLinkElement>(node, HTMLNames::linkTag); -} - -HTMLMetaElement* toHTMLMetaElement(Node* node) -{ - return toHTMLElement<HTMLMetaElement>(node, HTMLNames::metaTag); -} - -HTMLOptionElement* toHTMLOptionElement(Node* node) -{ - return toHTMLElement<HTMLOptionElement>(node, HTMLNames::optionTag); -} - -String nameOfInputElement(HTMLInputElement* element) -{ - return WebInputElement(element).nameForAutofill(); -} - -bool elementHasLegalLinkAttribute(const Element* element, - const QualifiedName& attrName) -{ - if (attrName == HTMLNames::srcAttr) { - // Check src attribute. - if (element->hasTagName(HTMLNames::imgTag) - || element->hasTagName(HTMLNames::scriptTag) - || element->hasTagName(HTMLNames::iframeTag) - || element->hasTagName(HTMLNames::frameTag)) - return true; - if (element->hasTagName(HTMLNames::inputTag)) { - const HTMLInputElement* input = - static_cast<const HTMLInputElement*>(element); - if (input->isImageButton()) - return true; - } - } else if (attrName == HTMLNames::hrefAttr) { - // Check href attribute. - if (element->hasTagName(HTMLNames::linkTag) - || element->hasTagName(HTMLNames::aTag) - || element->hasTagName(HTMLNames::areaTag)) - return true; - } else if (attrName == HTMLNames::actionAttr) { - if (element->hasTagName(HTMLNames::formTag)) - return true; - } else if (attrName == HTMLNames::backgroundAttr) { - if (element->hasTagName(HTMLNames::bodyTag) - || element->hasTagName(HTMLNames::tableTag) - || element->hasTagName(HTMLNames::trTag) - || element->hasTagName(HTMLNames::tdTag)) - return true; - } else if (attrName == HTMLNames::citeAttr) { - if (element->hasTagName(HTMLNames::blockquoteTag) - || element->hasTagName(HTMLNames::qTag) - || element->hasTagName(HTMLNames::delTag) - || element->hasTagName(HTMLNames::insTag)) - return true; - } else if (attrName == HTMLNames::classidAttr - || attrName == HTMLNames::dataAttr) { - if (element->hasTagName(HTMLNames::objectTag)) - return true; - } else if (attrName == HTMLNames::codebaseAttr) { - if (element->hasTagName(HTMLNames::objectTag) - || element->hasTagName(HTMLNames::appletTag)) - return true; - } - return false; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DOMUtilitiesPrivate.h b/WebKit/chromium/src/DOMUtilitiesPrivate.h deleted file mode 100644 index f5d03a5..0000000 --- a/WebKit/chromium/src/DOMUtilitiesPrivate.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DOMUtilitiesPrivate_h -#define DOMUtilitiesPrivate_h - -#include <wtf/Forward.h> - -namespace WebCore { -class Element; -class HTMLInputElement; -class HTMLLinkElement; -class HTMLMetaElement; -class HTMLOptionElement; -class Node; -class QualifiedName; -} - -// This file is an aggregate of useful WebCore operations. -namespace WebKit { - -// If node is an HTML node with a tag name of name it is casted and returned. -// If node is not an HTML node or the tag name is not name, 0 is returned. -WebCore::HTMLInputElement* toHTMLInputElement(WebCore::Node*); -WebCore::HTMLLinkElement* toHTMLLinkElement(WebCore::Node*); -WebCore::HTMLMetaElement* toHTMLMetaElement(WebCore::Node*); -WebCore::HTMLOptionElement* toHTMLOptionElement(WebCore::Node*); - -// FIXME: Deprecate. Use WebInputElement::nameForAutofill instead. -WTF::String nameOfInputElement(WebCore::HTMLInputElement*); - -// For img, script, iframe, frame element, when attribute name is src, -// for link, a, area element, when attribute name is href, -// for form element, when attribute name is action, -// for input, type=image, when attribute name is src, -// for body, table, tr, td, when attribute name is background, -// for blockquote, q, del, ins, when attribute name is cite, -// we can consider the attribute value has legal link. -bool elementHasLegalLinkAttribute(const WebCore::Element* element, - const WebCore::QualifiedName& attrName); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/DatabaseObserver.cpp b/WebKit/chromium/src/DatabaseObserver.cpp deleted file mode 100644 index f43c9bd..0000000 --- a/WebKit/chromium/src/DatabaseObserver.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DatabaseObserver.h" - -#if ENABLE(DATABASE) - -#include "AbstractDatabase.h" -#include "Document.h" -#include "ScriptExecutionContext.h" -#include "WebDatabase.h" -#include "WebDatabaseObserver.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebSecurityOrigin.h" -#include "WebWorkerImpl.h" -#include "WorkerContext.h" -#include "WorkerThread.h" - -using namespace WebKit; - -namespace WebCore { - -bool DatabaseObserver::canEstablishDatabase(ScriptExecutionContext* scriptExecutionContext, const String& name, const String& displayName, unsigned long estimatedSize) -{ - ASSERT(scriptExecutionContext->isContextThread()); - ASSERT(scriptExecutionContext->isDocument() || scriptExecutionContext->isWorkerContext()); - if (scriptExecutionContext->isDocument()) { - Document* document = static_cast<Document*>(scriptExecutionContext); - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - return webFrame->client()->allowDatabase(webFrame, name, displayName, estimatedSize); - } else { - WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext); - WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy(); - WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy); - return webWorker->allowDatabase(0, name, displayName, estimatedSize); - } - - return true; -} - -void DatabaseObserver::databaseOpened(AbstractDatabase* database) -{ - ASSERT(database->scriptExecutionContext()->isContextThread()); - WebDatabase::observer()->databaseOpened(WebDatabase(database)); -} - -void DatabaseObserver::databaseModified(AbstractDatabase* database) -{ - ASSERT(database->scriptExecutionContext()->isContextThread()); - WebDatabase::observer()->databaseModified(WebDatabase(database)); -} - -void DatabaseObserver::databaseClosed(AbstractDatabase* database) -{ - ASSERT(database->scriptExecutionContext()->isContextThread()); - WebDatabase::observer()->databaseClosed(WebDatabase(database)); -} - -} // namespace WebCore - -#endif // ENABLE(DATABASE) diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp deleted file mode 100644 index 5dd5c58..0000000 --- a/WebKit/chromium/src/DebuggerAgentImpl.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DebuggerAgentImpl.h" - -#include "DebuggerAgentManager.h" -#include "WebDevToolsAgentClient.h" -#include "WebDevToolsAgentImpl.h" -#include "WebViewImpl.h" - -using WTF::String; - -namespace WebKit { - -DebuggerAgentImpl::DebuggerAgentImpl( - WebViewImpl* webViewImpl, - WebDevToolsAgentImpl* webdevtoolsAgent, - WebDevToolsAgentClient* webdevtoolsAgentClient) - : m_webViewImpl(webViewImpl) - , m_webdevtoolsAgent(webdevtoolsAgent) - , m_webdevtoolsAgentClient(webdevtoolsAgentClient) - , m_autoContinueOnException(false) -{ - DebuggerAgentManager::debugAttach(this); -} - -DebuggerAgentImpl::~DebuggerAgentImpl() -{ - DebuggerAgentManager::debugDetach(this); -} - -void DebuggerAgentImpl::debuggerOutput(const String& command) -{ - m_webdevtoolsAgentClient->sendDebuggerOutput(command); -} - -WebCore::Page* DebuggerAgentImpl::page() -{ - return m_webViewImpl->page(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DebuggerAgentImpl.h b/WebKit/chromium/src/DebuggerAgentImpl.h deleted file mode 100644 index a8fcc4e..0000000 --- a/WebKit/chromium/src/DebuggerAgentImpl.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DebuggerAgentImpl_h -#define DebuggerAgentImpl_h - -#include <wtf/Forward.h> - -namespace WebCore { -class Page; -} - -namespace WebKit { - -class WebDevToolsAgentClient; -class WebDevToolsAgentImpl; -class WebViewImpl; - -class DebuggerAgentImpl { -public: - DebuggerAgentImpl(WebKit::WebViewImpl* webViewImpl, - WebDevToolsAgentImpl* webdevtoolsAgent, - WebDevToolsAgentClient* webdevtoolsAgentClient); - virtual ~DebuggerAgentImpl(); - - void debuggerOutput(const WTF::String& out); - - void setAutoContinueOnException(bool autoContinue) { m_autoContinueOnException = autoContinue; } - - bool autoContinueOnException() { return m_autoContinueOnException; } - - WebCore::Page* page(); - WebDevToolsAgentImpl* webdevtoolsAgent() { return m_webdevtoolsAgent; } - - WebKit::WebViewImpl* webView() { return m_webViewImpl; } - -private: - WebKit::WebViewImpl* m_webViewImpl; - WebDevToolsAgentImpl* m_webdevtoolsAgent; - WebDevToolsAgentClient* m_webdevtoolsAgentClient; - bool m_autoContinueOnException; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp deleted file mode 100644 index 0860cb1..0000000 --- a/WebKit/chromium/src/DebuggerAgentManager.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DebuggerAgentManager.h" - -#include "DebuggerAgentImpl.h" -#include "Frame.h" -#include "PageGroupLoadDeferrer.h" -#include "ScriptDebugServer.h" -#include "V8Proxy.h" -#include "WebDevToolsAgentImpl.h" -#include "WebFrameImpl.h" -#include "WebViewImpl.h" -#include <wtf/HashSet.h> -#include <wtf/Noncopyable.h> -#include <wtf/text/StringConcatenate.h> - -namespace WebKit { - -WebDevToolsAgent::MessageLoopDispatchHandler DebuggerAgentManager::s_messageLoopDispatchHandler = 0; - -bool DebuggerAgentManager::s_inHostDispatchHandler = false; - -DebuggerAgentManager::DeferrersMap DebuggerAgentManager::s_pageDeferrers; - -bool DebuggerAgentManager::s_exposeV8DebuggerProtocol = false; - -namespace { - -class CallerIdWrapper : public v8::Debug::ClientData, public Noncopyable { -public: - CallerIdWrapper() : m_callerIsMananager(true), m_callerId(0) { } - explicit CallerIdWrapper(int callerId) - : m_callerIsMananager(false) - , m_callerId(callerId) { } - ~CallerIdWrapper() { } - bool callerIsMananager() const { return m_callerIsMananager; } - int callerId() const { return m_callerId; } -private: - bool m_callerIsMananager; - int m_callerId; -}; - -} // namespace - - -void DebuggerAgentManager::debugHostDispatchHandler() -{ - if (!s_messageLoopDispatchHandler || !s_attachedAgentsMap) - return; - - if (s_inHostDispatchHandler) - return; - - s_inHostDispatchHandler = true; - - Vector<WebViewImpl*> views; - // 1. Disable active objects and input events. - for (AttachedAgentsMap::iterator it = s_attachedAgentsMap->begin(); it != s_attachedAgentsMap->end(); ++it) { - DebuggerAgentImpl* agent = it->second; - s_pageDeferrers.set(agent->webView(), new WebCore::PageGroupLoadDeferrer(agent->page(), true)); - views.append(agent->webView()); - agent->webView()->setIgnoreInputEvents(true); - } - - // 2. Process messages. - s_messageLoopDispatchHandler(); - - // 3. Bring things back. - for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end(); ++it) { - if (s_pageDeferrers.contains(*it)) { - // The view was not closed during the dispatch. - (*it)->setIgnoreInputEvents(false); - } - } - deleteAllValues(s_pageDeferrers); - s_pageDeferrers.clear(); - - s_inHostDispatchHandler = false; - if (!s_attachedAgentsMap) { - // Remove handlers if all agents were detached within host dispatch. - v8::Debug::SetMessageHandler(0); - v8::Debug::SetHostDispatchHandler(0); - } -} - -DebuggerAgentManager::AttachedAgentsMap* DebuggerAgentManager::s_attachedAgentsMap = 0; - -void DebuggerAgentManager::debugAttach(DebuggerAgentImpl* debuggerAgent) -{ - if (!s_exposeV8DebuggerProtocol) - return; - if (!s_attachedAgentsMap) { - s_attachedAgentsMap = new AttachedAgentsMap(); - v8::Debug::SetMessageHandler2(&DebuggerAgentManager::onV8DebugMessage); - v8::Debug::SetHostDispatchHandler(&DebuggerAgentManager::debugHostDispatchHandler, 100 /* ms */); - } - int hostId = debuggerAgent->webdevtoolsAgent()->hostId(); - ASSERT(hostId); - s_attachedAgentsMap->set(hostId, debuggerAgent); -} - -void DebuggerAgentManager::debugDetach(DebuggerAgentImpl* debuggerAgent) -{ - if (!s_exposeV8DebuggerProtocol) - return; - if (!s_attachedAgentsMap) { - ASSERT_NOT_REACHED(); - return; - } - int hostId = debuggerAgent->webdevtoolsAgent()->hostId(); - ASSERT(s_attachedAgentsMap->get(hostId) == debuggerAgent); - bool isOnBreakpoint = (findAgentForCurrentV8Context() == debuggerAgent); - s_attachedAgentsMap->remove(hostId); - - if (s_attachedAgentsMap->isEmpty()) { - delete s_attachedAgentsMap; - s_attachedAgentsMap = 0; - // Note that we do not empty handlers while in dispatch - we schedule - // continue and do removal once we are out of the dispatch. Also there is - // no need to send continue command in this case since removing message - // handler will cause debugger unload and all breakpoints will be cleared. - if (!s_inHostDispatchHandler) { - v8::Debug::SetMessageHandler2(0); - v8::Debug::SetHostDispatchHandler(0); - } - } else { - // Remove all breakpoints set by the agent. - String clearBreakpointGroupCmd = makeString( - "{\"seq\":1,\"type\":\"request\",\"command\":\"clearbreakpointgroup\"," - "\"arguments\":{\"groupId\":", String::number(hostId), "}}"); - sendCommandToV8(clearBreakpointGroupCmd, new CallerIdWrapper()); - - if (isOnBreakpoint) { - // Force continue if detach happened in nessted message loop while - // debugger was paused on a breakpoint(as long as there are other - // attached agents v8 will wait for explicit'continue' message). - sendContinueCommandToV8(); - } - } -} - -void DebuggerAgentManager::onV8DebugMessage(const v8::Debug::Message& message) -{ - v8::HandleScope scope; - v8::String::Value value(message.GetJSON()); - WTF::String out(reinterpret_cast<const UChar*>(*value), value.length()); - - // If callerData is not 0 the message is a response to a debugger command. - if (v8::Debug::ClientData* callerData = message.GetClientData()) { - CallerIdWrapper* wrapper = static_cast<CallerIdWrapper*>(callerData); - if (wrapper->callerIsMananager()) { - // Just ignore messages sent by this manager. - return; - } - DebuggerAgentImpl* debuggerAgent = debuggerAgentForHostId(wrapper->callerId()); - if (debuggerAgent) - debuggerAgent->debuggerOutput(out); - else if (!message.WillStartRunning()) { - // Autocontinue execution if there is no handler. - sendContinueCommandToV8(); - } - return; - } // Otherwise it's an event message. - ASSERT(message.IsEvent()); - - // Ignore unsupported event types. - if (message.GetEvent() != v8::AfterCompile && message.GetEvent() != v8::Break && message.GetEvent() != v8::Exception) - return; - - v8::Handle<v8::Context> context = message.GetEventContext(); - // If the context is from one of the inpected tabs it should have its context - // data. - if (context.IsEmpty()) { - // Unknown context, skip the event. - return; - } - - // If the context is from one of the inpected tabs or injected extension - // scripts it must have hostId in the data field. - int hostId = WebCore::V8Proxy::contextDebugId(context); - if (hostId != -1) { - DebuggerAgentImpl* agent = debuggerAgentForHostId(hostId); - if (agent) { - if (agent->autoContinueOnException() - && message.GetEvent() == v8::Exception) { - sendContinueCommandToV8(); - return; - } - - agent->debuggerOutput(out); - return; - } - } - - if (!message.WillStartRunning()) { - // Autocontinue execution on break and exception events if there is no - // handler. - sendContinueCommandToV8(); - } -} - -void DebuggerAgentManager::pauseScript() -{ - v8::Debug::DebugBreak(); -} - -void DebuggerAgentManager::executeDebuggerCommand(const WTF::String& command, int callerId) -{ - sendCommandToV8(command, new CallerIdWrapper(callerId)); -} - -void DebuggerAgentManager::setMessageLoopDispatchHandler(WebDevToolsAgent::MessageLoopDispatchHandler handler) -{ - s_messageLoopDispatchHandler = handler; -} - -void DebuggerAgentManager::setExposeV8DebuggerProtocol(bool value) -{ - s_exposeV8DebuggerProtocol = value; - WebCore::ScriptDebugServer::shared().setEnabled(!s_exposeV8DebuggerProtocol); -} - -void DebuggerAgentManager::setHostId(WebFrameImpl* webframe, int hostId) -{ - ASSERT(hostId > 0); - WebCore::V8Proxy* proxy = WebCore::V8Proxy::retrieve(webframe->frame()); - if (proxy) - proxy->setContextDebugId(hostId); -} - -void DebuggerAgentManager::onWebViewClosed(WebViewImpl* webview) -{ - if (s_pageDeferrers.contains(webview)) { - delete s_pageDeferrers.get(webview); - s_pageDeferrers.remove(webview); - } -} - -void DebuggerAgentManager::onNavigate() -{ - if (s_inHostDispatchHandler) - DebuggerAgentManager::sendContinueCommandToV8(); -} - -void DebuggerAgentManager::sendCommandToV8(const WTF::String& cmd, v8::Debug::ClientData* data) -{ - v8::Debug::SendCommand(reinterpret_cast<const uint16_t*>(cmd.characters()), cmd.length(), data); -} - -void DebuggerAgentManager::sendContinueCommandToV8() -{ - WTF::String continueCmd("{\"seq\":1,\"type\":\"request\",\"command\":\"continue\"}"); - sendCommandToV8(continueCmd, new CallerIdWrapper()); -} - -DebuggerAgentImpl* DebuggerAgentManager::findAgentForCurrentV8Context() -{ - if (!s_attachedAgentsMap) - return 0; - ASSERT(!s_attachedAgentsMap->isEmpty()); - - WebCore::Frame* frame = WebCore::V8Proxy::retrieveFrameForEnteredContext(); - if (!frame) - return 0; - WebCore::Page* page = frame->page(); - for (AttachedAgentsMap::iterator it = s_attachedAgentsMap->begin(); it != s_attachedAgentsMap->end(); ++it) { - if (it->second->page() == page) - return it->second; - } - return 0; -} - -DebuggerAgentImpl* DebuggerAgentManager::debuggerAgentForHostId(int hostId) -{ - if (!s_attachedAgentsMap) - return 0; - return s_attachedAgentsMap->get(hostId); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DebuggerAgentManager.h b/WebKit/chromium/src/DebuggerAgentManager.h deleted file mode 100644 index 66bd714..0000000 --- a/WebKit/chromium/src/DebuggerAgentManager.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DebuggerAgentManager_h -#define DebuggerAgentManager_h - -#include "WebCString.h" -#include "WebDevToolsAgent.h" -#include <v8-debug.h> -#include <wtf/Forward.h> -#include <wtf/HashMap.h> -#include <wtf/Noncopyable.h> -#include <wtf/Vector.h> - -namespace WebCore { -class Page; -class PageGroupLoadDeferrer; -} - -namespace WebKit { - -class DebuggerAgentImpl; -class DictionaryValue; -class WebFrameImpl; -class WebViewImpl; - -// There is single v8 instance per render process. Also there may be several -// RenderViews and consequently devtools agents in the process that want to talk -// to the v8 debugger. This class coordinates communication between the debug -// agents and v8 debugger. It will set debug output handler as long as at least -// one debugger agent is attached and remove it when last debugger agent is -// detached. When message is received from debugger it will route it to the -// right debugger agent if there is one otherwise the message will be ignored. -// -// v8 may send a message(e.g. exception event) after which it -// would expect some actions from the handler. If there is no appropriate -// debugger agent to handle such messages the manager will perform the action -// itself, otherwise v8 may hang waiting for the action. -class DebuggerAgentManager : public Noncopyable { -public: - static void debugAttach(DebuggerAgentImpl* debuggerAgent); - static void debugDetach(DebuggerAgentImpl* debuggerAgent); - static void pauseScript(); - static void executeDebuggerCommand(const WTF::String& command, int callerId); - static void setMessageLoopDispatchHandler(WebDevToolsAgent::MessageLoopDispatchHandler handler); - static void setExposeV8DebuggerProtocol(bool); - - // Sets |hostId| as the frame context data. This id is used to filter scripts - // related to the inspected page. - static void setHostId(WebFrameImpl* webframe, int hostId); - - static void onWebViewClosed(WebViewImpl* webview); - - static void onNavigate(); - -private: - DebuggerAgentManager(); - ~DebuggerAgentManager(); - - static void debugHostDispatchHandler(); - static void onV8DebugMessage(const v8::Debug::Message& message); - static void sendCommandToV8(const WTF::String& cmd, - v8::Debug::ClientData* data); - static void sendContinueCommandToV8(); - - static DebuggerAgentImpl* findAgentForCurrentV8Context(); - static DebuggerAgentImpl* debuggerAgentForHostId(int hostId); - - typedef HashMap<int, DebuggerAgentImpl*> AttachedAgentsMap; - static AttachedAgentsMap* s_attachedAgentsMap; - - static WebDevToolsAgent::MessageLoopDispatchHandler s_messageLoopDispatchHandler; - static bool s_inHostDispatchHandler; - typedef HashMap<WebViewImpl*, WebCore::PageGroupLoadDeferrer*> DeferrersMap; - static DeferrersMap s_pageDeferrers; - - static bool s_exposeV8DebuggerProtocol; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp b/WebKit/chromium/src/DeviceOrientationClientProxy.cpp deleted file mode 100644 index 29b43ba..0000000 --- a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DeviceOrientationClientProxy.h" - -#include "DeviceOrientation.h" -#include "WebDeviceOrientation.h" -#include "WebDeviceOrientationController.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { -class DeviceOrientationController; -} - -namespace WebKit { - -void DeviceOrientationClientProxy::setController(WebCore::DeviceOrientationController* c) -{ - if (!m_client) // FIXME: Get rid of these null checks once device orientation is enabled by default. - return; - m_client->setController(new WebDeviceOrientationController(c)); -} - -void DeviceOrientationClientProxy::startUpdating() -{ - if (!m_client) - return; - m_client->startUpdating(); -} - -void DeviceOrientationClientProxy::stopUpdating() -{ - if (!m_client) - return; - m_client->stopUpdating(); -} - -WebCore::DeviceOrientation* DeviceOrientationClientProxy::lastOrientation() const -{ - if (!m_client) - return 0; - - // Cache the DeviceOrientation pointer so its reference count does not drop to zero upon return. - m_lastOrientation = m_client->lastOrientation(); - - return m_lastOrientation.get(); -} - -void DeviceOrientationClientProxy::deviceOrientationControllerDestroyed() -{ - // Our lifetime is bound to the WebViewImpl. -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.h b/WebKit/chromium/src/DeviceOrientationClientProxy.h deleted file mode 100644 index e90d77f..0000000 --- a/WebKit/chromium/src/DeviceOrientationClientProxy.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DeviceOrientationClientProxy_h -#define DeviceOrientationClientProxy_h - -#include "DeviceOrientation.h" -#include "DeviceOrientationClient.h" -#include "WebDeviceOrientationClient.h" -#include <wtf/RefPtr.h> - -namespace WebCore { -class DeviceOrientationController; -} - -namespace WebKit { - -class DeviceOrientationClientProxy : public WebCore::DeviceOrientationClient { -public: - DeviceOrientationClientProxy(WebDeviceOrientationClient* client) - : m_client(client) - { - } - - void setController(WebCore::DeviceOrientationController*); - void startUpdating(); - void stopUpdating(); - WebCore::DeviceOrientation* lastOrientation() const; - virtual void deviceOrientationControllerDestroyed(); - -private: - WebDeviceOrientationClient* m_client; - mutable RefPtr<WebCore::DeviceOrientation> m_lastOrientation; -}; - -} // namespace WebKit - -#endif // DeviceOrientationClientProxy_h diff --git a/WebKit/chromium/src/DragClientImpl.cpp b/WebKit/chromium/src/DragClientImpl.cpp deleted file mode 100644 index 9874401..0000000 --- a/WebKit/chromium/src/DragClientImpl.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragClientImpl.h" -#include "DragImageRef.h" -#include "ChromiumDataObject.h" -#include "ClipboardChromium.h" -#include "Frame.h" -#include "NativeImageSkia.h" -#include "WebCommon.h" -#include "WebDragData.h" -#include "WebImage.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -using namespace WebCore; - -namespace WebKit { - -void DragClientImpl::willPerformDragDestinationAction(DragDestinationAction, DragData*) -{ - // FIXME -} - -void DragClientImpl::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) -{ - // FIXME -} - -DragDestinationAction DragClientImpl::actionMaskForDrag(DragData*) -{ - if (m_webView->client() && m_webView->client()->acceptsLoadDrops()) - return DragDestinationActionAny; - - return static_cast<DragDestinationAction>( - DragDestinationActionDHTML | DragDestinationActionEdit); -} - -DragSourceAction DragClientImpl::dragSourceActionMaskForPoint(const IntPoint& windowPoint) -{ - // We want to handle drag operations for all source types. - return DragSourceActionAny; -} - -void DragClientImpl::startDrag(DragImageRef dragImage, - const IntPoint& dragImageOrigin, - const IntPoint& eventPos, - Clipboard* clipboard, - Frame* frame, - bool isLinkDrag) -{ - // Add a ref to the frame just in case a load occurs mid-drag. - RefPtr<Frame> frameProtector = frame; - - WebDragData dragData = static_cast<ClipboardChromium*>(clipboard)->dataObject(); - - DragOperation dragOperationMask = clipboard->sourceOperation(); - - IntSize offsetSize(eventPos - dragImageOrigin); - WebPoint offsetPoint(offsetSize.width(), offsetSize.height()); - m_webView->startDragging( - dragData, static_cast<WebDragOperationsMask>(dragOperationMask), -#if WEBKIT_USING_SKIA - dragImage ? WebImage(*dragImage) : WebImage(), -#else - dragImage ? WebImage(dragImage) : WebImage(), -#endif - offsetPoint); -} - -DragImageRef DragClientImpl::createDragImageForLink(KURL&, const String& label, Frame*) -{ - // FIXME - return 0; -} - -void DragClientImpl::dragControllerDestroyed() -{ - // Our lifetime is bound to the WebViewImpl. -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DragClientImpl.h b/WebKit/chromium/src/DragClientImpl.h deleted file mode 100644 index dac7acd..0000000 --- a/WebKit/chromium/src/DragClientImpl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DragClientImpl_h -#define DragClientImpl_h - -#include "DragActions.h" -#include "DragClient.h" - -namespace WebCore { -class ClipBoard; -class DragData; -class IntPoint; -class KURL; -} - -namespace WebKit { -class WebViewImpl; - -class DragClientImpl : public WebCore::DragClient { -public: - DragClientImpl(WebViewImpl* webView) : m_webView(webView) { } - - virtual void willPerformDragDestinationAction( - WebCore::DragDestinationAction, WebCore::DragData*); - virtual void willPerformDragSourceAction( - WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*); - virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*); - virtual WebCore::DragSourceAction dragSourceActionMaskForPoint( - const WebCore::IntPoint& windowPoint); - virtual void startDrag( - WebCore::DragImageRef dragImage, - const WebCore::IntPoint& dragImageOrigin, - const WebCore::IntPoint& eventPos, - WebCore::Clipboard* clipboard, - WebCore::Frame* frame, - bool isLinkDrag = false); - virtual WebCore::DragImageRef createDragImageForLink( - WebCore::KURL&, const WTF::String& label, WebCore::Frame*); - virtual void dragControllerDestroyed(); - -private: - WebViewImpl* m_webView; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/DragScrollTimer.cpp b/WebKit/chromium/src/DragScrollTimer.cpp deleted file mode 100644 index 83b81b7..0000000 --- a/WebKit/chromium/src/DragScrollTimer.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "DragScrollTimer.h" - -#include "FrameView.h" - -using namespace WebCore; - -namespace WebKit { - -// Computes the distance from a point outside a rect to the nearest edge of the rect. -static IntSize distanceToRect(const IntPoint& point, const IntRect& rect) -{ - int dx = 0, dy = 0; - if (point.x() < rect.x()) - dx = point.x() - rect.x(); - else if (rect.right() < point.x()) - dx = point.x() - rect.right(); - if (point.y() < rect.y()) - dy = point.y() - rect.y(); - else if (rect.bottom() < point.y()) - dy = point.y() - rect.bottom(); - return IntSize(dx, dy); -} - -DragScrollTimer::DragScrollTimer() - : m_timer(this, &DragScrollTimer::fired) - , m_view(0) - , m_scrolling(false) -{ -} - -DragScrollTimer::~DragScrollTimer() -{ - // We do this for detecting dead object earlier - stop(); -} - -void DragScrollTimer::stop() -{ - m_timer.stop(); - m_view = 0; - m_scrolling = false; -} - -void DragScrollTimer::scroll() -{ - m_view->scrollBy(m_lastDistance); - m_scrolling = true; -} - -void DragScrollTimer::update() -{ - if (shouldScroll()) - scroll(); - else - stop(); -} - -void DragScrollTimer::triggerScroll(FrameView* view, const WebPoint& location) -{ - if (!view) - return; - - // Approximates Safari - static const double scrollStartDelay = 0.2; - - m_view = view; - m_lastDistance = scrollDistanceFor(view, location); - - if (m_scrolling) - update(); - else if (shouldScroll() && !m_timer.isActive()) - m_timer.startOneShot(scrollStartDelay); -} - -IntSize DragScrollTimer::scrollDistanceFor(FrameView* view, const WebPoint& location) const -{ - static const int scrollMargin = 30; - - IntRect bounds(0, 0, view->visibleWidth(), view->visibleHeight()); - if (!bounds.contains(location)) - return IntSize(0, 0); // The location is outside the border belt. - - bounds.setY(bounds.y() + scrollMargin); - bounds.setHeight(bounds.height() - scrollMargin * 2); - bounds.setX(bounds.x() + scrollMargin); - bounds.setWidth(bounds.width() - scrollMargin * 2); - - if (bounds.contains(location)) - return IntSize(0, 0); // The location is inside the border belt. - - // The location is over the border belt. - return distanceToRect(location, bounds); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/DragScrollTimer.h b/WebKit/chromium/src/DragScrollTimer.h deleted file mode 100644 index a4090e0..0000000 --- a/WebKit/chromium/src/DragScrollTimer.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DragScrollTimer_h -#define DragScrollTimer_h - -#include "IntSize.h" -#include "Timer.h" -#include "WebPoint.h" - -namespace WebCore { class FrameView; } - -namespace WebKit { - -// -// Encapsulating a timer and associated state management for -// scroll-on-drag behaviour. -// -class DragScrollTimer { -public: - DragScrollTimer(); - ~DragScrollTimer(); - - void fired(WebCore::Timer<DragScrollTimer>*) { update(); } - void triggerScroll(WebCore::FrameView*, const WebPoint&); - void stop(); - -private: - void scroll(); - void update(); - WebCore::IntSize scrollDistanceFor(WebCore::FrameView*, const WebPoint&) const; - bool shouldScroll() const { return !m_lastDistance.isZero(); } - - WebCore::Timer<DragScrollTimer> m_timer; - WebCore::FrameView* m_view; - WebCore::IntSize m_lastDistance; - bool m_scrolling; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp deleted file mode 100644 index 6f1739f..0000000 --- a/WebKit/chromium/src/EditorClientImpl.cpp +++ /dev/null @@ -1,949 +0,0 @@ -/* - * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. - * Copyright (C) 2010 Google, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "EditorClientImpl.h" - -#include "Document.h" -#include "EditCommand.h" -#include "Editor.h" -#include "EventHandler.h" -#include "EventNames.h" -#include "Frame.h" -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "KeyboardCodes.h" -#include "KeyboardEvent.h" -#include "PlatformKeyboardEvent.h" -#include "PlatformString.h" -#include "RenderObject.h" - -#include "DOMUtilitiesPrivate.h" -#include "WebEditingAction.h" -#include "WebElement.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebInputElement.h" -#include "WebInputEventConversion.h" -#include "WebNode.h" -#include "WebPasswordAutocompleteListener.h" -#include "WebRange.h" -#include "WebTextAffinity.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -using namespace WebCore; - -namespace WebKit { - -// Arbitrary depth limit for the undo stack, to keep it from using -// unbounded memory. This is the maximum number of distinct undoable -// actions -- unbroken stretches of typed characters are coalesced -// into a single action. -static const size_t maximumUndoStackDepth = 1000; - -// The size above which we stop triggering autofill for an input text field -// (so to avoid sending long strings through IPC). -static const size_t maximumTextSizeForAutofill = 1000; - -EditorClientImpl::EditorClientImpl(WebViewImpl* webview) - : m_webView(webview) - , m_inRedo(false) - , m_backspaceOrDeletePressed(false) - , m_spellCheckThisFieldStatus(SpellCheckAutomatic) - , m_autofillTimer(this, &EditorClientImpl::doAutofill) -{ -} - -EditorClientImpl::~EditorClientImpl() -{ -} - -void EditorClientImpl::pageDestroyed() -{ - // Our lifetime is bound to the WebViewImpl. -} - -bool EditorClientImpl::shouldShowDeleteInterface(HTMLElement* elem) -{ - // Normally, we don't care to show WebCore's deletion UI, so we only enable - // it if in testing mode and the test specifically requests it by using this - // magic class name. - return layoutTestMode() - && elem->getAttribute(HTMLNames::classAttr) == "needsDeletionUI"; -} - -bool EditorClientImpl::smartInsertDeleteEnabled() -{ - if (m_webView->client()) - return m_webView->client()->isSmartInsertDeleteEnabled(); - return true; -} - -bool EditorClientImpl::isSelectTrailingWhitespaceEnabled() -{ - if (m_webView->client()) - return m_webView->client()->isSelectTrailingWhitespaceEnabled(); -#if OS(WINDOWS) - return true; -#else - return false; -#endif -} - -bool EditorClientImpl::shouldSpellcheckByDefault() -{ - // Spellcheck should be enabled for all editable areas (such as textareas, - // contentEditable regions, and designMode docs), except text inputs. - const Frame* frame = m_webView->focusedWebCoreFrame(); - if (!frame) - return false; - const Editor* editor = frame->editor(); - if (!editor) - return false; - if (editor->isSpellCheckingEnabledInFocusedNode()) - return true; - const Document* document = frame->document(); - if (!document) - return false; - const Node* node = document->focusedNode(); - // If |node| is null, we default to allowing spellchecking. This is done in - // order to mitigate the issue when the user clicks outside the textbox, as a - // result of which |node| becomes null, resulting in all the spell check - // markers being deleted. Also, the Frame will decide not to do spellchecking - // if the user can't edit - so returning true here will not cause any problems - // to the Frame's behavior. - if (!node) - return true; - const RenderObject* renderer = node->renderer(); - if (!renderer) - return false; - - return !renderer->isTextField(); -} - -bool EditorClientImpl::isContinuousSpellCheckingEnabled() -{ - if (m_spellCheckThisFieldStatus == SpellCheckForcedOff) - return false; - if (m_spellCheckThisFieldStatus == SpellCheckForcedOn) - return true; - return shouldSpellcheckByDefault(); -} - -void EditorClientImpl::toggleContinuousSpellChecking() -{ - if (isContinuousSpellCheckingEnabled()) - m_spellCheckThisFieldStatus = SpellCheckForcedOff; - else - m_spellCheckThisFieldStatus = SpellCheckForcedOn; -} - -bool EditorClientImpl::isGrammarCheckingEnabled() -{ - return false; -} - -void EditorClientImpl::toggleGrammarChecking() -{ - notImplemented(); -} - -int EditorClientImpl::spellCheckerDocumentTag() -{ - ASSERT_NOT_REACHED(); - return 0; -} - -bool EditorClientImpl::isEditable() -{ - return false; -} - -bool EditorClientImpl::shouldBeginEditing(Range* range) -{ - if (m_webView->client()) - return m_webView->client()->shouldBeginEditing(WebRange(range)); - return true; -} - -bool EditorClientImpl::shouldEndEditing(Range* range) -{ - if (m_webView->client()) - return m_webView->client()->shouldEndEditing(WebRange(range)); - return true; -} - -bool EditorClientImpl::shouldInsertNode(Node* node, - Range* range, - EditorInsertAction action) -{ - if (m_webView->client()) { - return m_webView->client()->shouldInsertNode(WebNode(node), - WebRange(range), - static_cast<WebEditingAction>(action)); - } - return true; -} - -bool EditorClientImpl::shouldInsertText(const String& text, - Range* range, - EditorInsertAction action) -{ - if (m_webView->client()) { - return m_webView->client()->shouldInsertText(WebString(text), - WebRange(range), - static_cast<WebEditingAction>(action)); - } - return true; -} - - -bool EditorClientImpl::shouldDeleteRange(Range* range) -{ - if (m_webView->client()) - return m_webView->client()->shouldDeleteRange(WebRange(range)); - return true; -} - -bool EditorClientImpl::shouldChangeSelectedRange(Range* fromRange, - Range* toRange, - EAffinity affinity, - bool stillSelecting) -{ - if (m_webView->client()) { - return m_webView->client()->shouldChangeSelectedRange(WebRange(fromRange), - WebRange(toRange), - static_cast<WebTextAffinity>(affinity), - stillSelecting); - } - return true; -} - -bool EditorClientImpl::shouldApplyStyle(CSSStyleDeclaration* style, - Range* range) -{ - if (m_webView->client()) { - // FIXME: Pass a reference to the CSSStyleDeclaration somehow. - return m_webView->client()->shouldApplyStyle(WebString(), - WebRange(range)); - } - return true; -} - -bool EditorClientImpl::shouldMoveRangeAfterDelete(Range* range, - Range* rangeToBeReplaced) -{ - return true; -} - -void EditorClientImpl::didBeginEditing() -{ - if (m_webView->client()) - m_webView->client()->didBeginEditing(); -} - -void EditorClientImpl::respondToChangedSelection() -{ - if (m_webView->client()) { - Frame* frame = m_webView->focusedWebCoreFrame(); - if (frame) - m_webView->client()->didChangeSelection(!frame->selection()->isRange()); - } -} - -void EditorClientImpl::respondToChangedContents() -{ - if (m_webView->client()) - m_webView->client()->didChangeContents(); -} - -void EditorClientImpl::didEndEditing() -{ - if (m_webView->client()) - m_webView->client()->didEndEditing(); -} - -void EditorClientImpl::didWriteSelectionToPasteboard() -{ -} - -void EditorClientImpl::didSetSelectionTypesForPasteboard() -{ -} - -void EditorClientImpl::registerCommandForUndo(PassRefPtr<EditCommand> command) -{ - if (m_undoStack.size() == maximumUndoStackDepth) - m_undoStack.removeFirst(); // drop oldest item off the far end - if (!m_inRedo) - m_redoStack.clear(); - m_undoStack.append(command); -} - -void EditorClientImpl::registerCommandForRedo(PassRefPtr<EditCommand> command) -{ - m_redoStack.append(command); -} - -void EditorClientImpl::clearUndoRedoOperations() -{ - m_undoStack.clear(); - m_redoStack.clear(); -} - -bool EditorClientImpl::canUndo() const -{ - return !m_undoStack.isEmpty(); -} - -bool EditorClientImpl::canRedo() const -{ - return !m_redoStack.isEmpty(); -} - -void EditorClientImpl::undo() -{ - if (canUndo()) { - EditCommandStack::iterator back = --m_undoStack.end(); - RefPtr<EditCommand> command(*back); - m_undoStack.remove(back); - command->unapply(); - // unapply will call us back to push this command onto the redo stack. - } -} - -void EditorClientImpl::redo() -{ - if (canRedo()) { - EditCommandStack::iterator back = --m_redoStack.end(); - RefPtr<EditCommand> command(*back); - m_redoStack.remove(back); - - ASSERT(!m_inRedo); - m_inRedo = true; - command->reapply(); - // reapply will call us back to push this command onto the undo stack. - m_inRedo = false; - } -} - -// -// The below code was adapted from the WebKit file webview.cpp -// - -static const unsigned CtrlKey = 1 << 0; -static const unsigned AltKey = 1 << 1; -static const unsigned ShiftKey = 1 << 2; -static const unsigned MetaKey = 1 << 3; -#if OS(DARWIN) -// Aliases for the generic key defintions to make kbd shortcuts definitions more -// readable on OS X. -static const unsigned OptionKey = AltKey; - -// Do not use this constant for anything but cursor movement commands. Keys -// with cmd set have their |isSystemKey| bit set, so chances are the shortcut -// will not be executed. Another, less important, reason is that shortcuts -// defined in the renderer do not blink the menu item that they triggered. See -// http://crbug.com/25856 and the bugs linked from there for details. -static const unsigned CommandKey = MetaKey; -#endif - -// Keys with special meaning. These will be delegated to the editor using -// the execCommand() method -struct KeyDownEntry { - unsigned virtualKey; - unsigned modifiers; - const char* name; -}; - -struct KeyPressEntry { - unsigned charCode; - unsigned modifiers; - const char* name; -}; - -static const KeyDownEntry keyDownEntries[] = { - { VKEY_LEFT, 0, "MoveLeft" }, - { VKEY_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, -#if OS(DARWIN) - { VKEY_LEFT, OptionKey, "MoveWordLeft" }, - { VKEY_LEFT, OptionKey | ShiftKey, - "MoveWordLeftAndModifySelection" }, -#else - { VKEY_LEFT, CtrlKey, "MoveWordLeft" }, - { VKEY_LEFT, CtrlKey | ShiftKey, - "MoveWordLeftAndModifySelection" }, -#endif - { VKEY_RIGHT, 0, "MoveRight" }, - { VKEY_RIGHT, ShiftKey, "MoveRightAndModifySelection" }, -#if OS(DARWIN) - { VKEY_RIGHT, OptionKey, "MoveWordRight" }, - { VKEY_RIGHT, OptionKey | ShiftKey, - "MoveWordRightAndModifySelection" }, -#else - { VKEY_RIGHT, CtrlKey, "MoveWordRight" }, - { VKEY_RIGHT, CtrlKey | ShiftKey, - "MoveWordRightAndModifySelection" }, -#endif - { VKEY_UP, 0, "MoveUp" }, - { VKEY_UP, ShiftKey, "MoveUpAndModifySelection" }, - { VKEY_PRIOR, ShiftKey, "MovePageUpAndModifySelection" }, - { VKEY_DOWN, 0, "MoveDown" }, - { VKEY_DOWN, ShiftKey, "MoveDownAndModifySelection" }, - { VKEY_NEXT, ShiftKey, "MovePageDownAndModifySelection" }, -#if !OS(DARWIN) - { VKEY_PRIOR, 0, "MovePageUp" }, - { VKEY_NEXT, 0, "MovePageDown" }, -#endif - { VKEY_HOME, 0, "MoveToBeginningOfLine" }, - { VKEY_HOME, ShiftKey, - "MoveToBeginningOfLineAndModifySelection" }, -#if OS(DARWIN) - { VKEY_LEFT, CommandKey, "MoveToBeginningOfLine" }, - { VKEY_LEFT, CommandKey | ShiftKey, - "MoveToBeginningOfLineAndModifySelection" }, - { VKEY_PRIOR, OptionKey, "MovePageUp" }, - { VKEY_NEXT, OptionKey, "MovePageDown" }, -#endif -#if OS(DARWIN) - { VKEY_UP, CommandKey, "MoveToBeginningOfDocument" }, - { VKEY_UP, CommandKey | ShiftKey, - "MoveToBeginningOfDocumentAndModifySelection" }, -#else - { VKEY_HOME, CtrlKey, "MoveToBeginningOfDocument" }, - { VKEY_HOME, CtrlKey | ShiftKey, - "MoveToBeginningOfDocumentAndModifySelection" }, -#endif - { VKEY_END, 0, "MoveToEndOfLine" }, - { VKEY_END, ShiftKey, "MoveToEndOfLineAndModifySelection" }, -#if OS(DARWIN) - { VKEY_DOWN, CommandKey, "MoveToEndOfDocument" }, - { VKEY_DOWN, CommandKey | ShiftKey, - "MoveToEndOfDocumentAndModifySelection" }, -#else - { VKEY_END, CtrlKey, "MoveToEndOfDocument" }, - { VKEY_END, CtrlKey | ShiftKey, - "MoveToEndOfDocumentAndModifySelection" }, -#endif -#if OS(DARWIN) - { VKEY_RIGHT, CommandKey, "MoveToEndOfLine" }, - { VKEY_RIGHT, CommandKey | ShiftKey, - "MoveToEndOfLineAndModifySelection" }, -#endif - { VKEY_BACK, 0, "DeleteBackward" }, - { VKEY_BACK, ShiftKey, "DeleteBackward" }, - { VKEY_DELETE, 0, "DeleteForward" }, -#if OS(DARWIN) - { VKEY_BACK, OptionKey, "DeleteWordBackward" }, - { VKEY_DELETE, OptionKey, "DeleteWordForward" }, -#else - { VKEY_BACK, CtrlKey, "DeleteWordBackward" }, - { VKEY_DELETE, CtrlKey, "DeleteWordForward" }, -#endif - { 'B', CtrlKey, "ToggleBold" }, - { 'I', CtrlKey, "ToggleItalic" }, - { 'U', CtrlKey, "ToggleUnderline" }, - { VKEY_ESCAPE, 0, "Cancel" }, - { VKEY_OEM_PERIOD, CtrlKey, "Cancel" }, - { VKEY_TAB, 0, "InsertTab" }, - { VKEY_TAB, ShiftKey, "InsertBacktab" }, - { VKEY_RETURN, 0, "InsertNewline" }, - { VKEY_RETURN, CtrlKey, "InsertNewline" }, - { VKEY_RETURN, AltKey, "InsertNewline" }, - { VKEY_RETURN, AltKey | ShiftKey, "InsertNewline" }, - { VKEY_RETURN, ShiftKey, "InsertLineBreak" }, - { VKEY_INSERT, CtrlKey, "Copy" }, - { VKEY_INSERT, ShiftKey, "Paste" }, - { VKEY_DELETE, ShiftKey, "Cut" }, -#if !OS(DARWIN) - // On OS X, we pipe these back to the browser, so that it can do menu item - // blinking. - { 'C', CtrlKey, "Copy" }, - { 'V', CtrlKey, "Paste" }, - { 'V', CtrlKey | ShiftKey, "PasteAndMatchStyle" }, - { 'X', CtrlKey, "Cut" }, - { 'A', CtrlKey, "SelectAll" }, - { 'Z', CtrlKey, "Undo" }, - { 'Z', CtrlKey | ShiftKey, "Redo" }, - { 'Y', CtrlKey, "Redo" }, -#endif -}; - -static const KeyPressEntry keyPressEntries[] = { - { '\t', 0, "InsertTab" }, - { '\t', ShiftKey, "InsertBacktab" }, - { '\r', 0, "InsertNewline" }, - { '\r', CtrlKey, "InsertNewline" }, - { '\r', ShiftKey, "InsertLineBreak" }, - { '\r', AltKey, "InsertNewline" }, - { '\r', AltKey | ShiftKey, "InsertNewline" }, -}; - -const char* EditorClientImpl::interpretKeyEvent(const KeyboardEvent* evt) -{ - const PlatformKeyboardEvent* keyEvent = evt->keyEvent(); - if (!keyEvent) - return ""; - - static HashMap<int, const char*>* keyDownCommandsMap = 0; - static HashMap<int, const char*>* keyPressCommandsMap = 0; - - if (!keyDownCommandsMap) { - keyDownCommandsMap = new HashMap<int, const char*>; - keyPressCommandsMap = new HashMap<int, const char*>; - - for (unsigned i = 0; i < arraysize(keyDownEntries); i++) { - keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, - keyDownEntries[i].name); - } - - for (unsigned i = 0; i < arraysize(keyPressEntries); i++) { - keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, - keyPressEntries[i].name); - } - } - - unsigned modifiers = 0; - if (keyEvent->shiftKey()) - modifiers |= ShiftKey; - if (keyEvent->altKey()) - modifiers |= AltKey; - if (keyEvent->ctrlKey()) - modifiers |= CtrlKey; - if (keyEvent->metaKey()) - modifiers |= MetaKey; - - if (keyEvent->type() == PlatformKeyboardEvent::RawKeyDown) { - int mapKey = modifiers << 16 | evt->keyCode(); - return mapKey ? keyDownCommandsMap->get(mapKey) : 0; - } - - int mapKey = modifiers << 16 | evt->charCode(); - return mapKey ? keyPressCommandsMap->get(mapKey) : 0; -} - -bool EditorClientImpl::handleEditingKeyboardEvent(KeyboardEvent* evt) -{ - const PlatformKeyboardEvent* keyEvent = evt->keyEvent(); - // do not treat this as text input if it's a system key event - if (!keyEvent || keyEvent->isSystemKey()) - return false; - - Frame* frame = evt->target()->toNode()->document()->frame(); - if (!frame) - return false; - - String commandName = interpretKeyEvent(evt); - Editor::Command command = frame->editor()->command(commandName); - - if (keyEvent->type() == PlatformKeyboardEvent::RawKeyDown) { - // WebKit doesn't have enough information about mode to decide how - // commands that just insert text if executed via Editor should be treated, - // so we leave it upon WebCore to either handle them immediately - // (e.g. Tab that changes focus) or let a keypress event be generated - // (e.g. Tab that inserts a Tab character, or Enter). - if (command.isTextInsertion() || commandName.isEmpty()) - return false; - if (command.execute(evt)) { - if (m_webView->client()) - m_webView->client()->didExecuteCommand(WebString(commandName)); - return true; - } - return false; - } - - if (command.execute(evt)) { - if (m_webView->client()) - m_webView->client()->didExecuteCommand(WebString(commandName)); - return true; - } - - // Here we need to filter key events. - // On Gtk/Linux, it emits key events with ASCII text and ctrl on for ctrl-<x>. - // In Webkit, EditorClient::handleKeyboardEvent in - // WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp drop such events. - // On Mac, it emits key events with ASCII text and meta on for Command-<x>. - // These key events should not emit text insert event. - // Alt key would be used to insert alternative character, so we should let - // through. Also note that Ctrl-Alt combination equals to AltGr key which is - // also used to insert alternative character. - // http://code.google.com/p/chromium/issues/detail?id=10846 - // Windows sets both alt and meta are on when "Alt" key pressed. - // http://code.google.com/p/chromium/issues/detail?id=2215 - // Also, we should not rely on an assumption that keyboards don't - // send ASCII characters when pressing a control key on Windows, - // which may be configured to do it so by user. - // See also http://en.wikipedia.org/wiki/Keyboard_Layout - // FIXME(ukai): investigate more detail for various keyboard layout. - if (evt->keyEvent()->text().length() == 1) { - UChar ch = evt->keyEvent()->text()[0U]; - - // Don't insert null or control characters as they can result in - // unexpected behaviour - if (ch < ' ') - return false; -#if !OS(WINDOWS) - // Don't insert ASCII character if ctrl w/o alt or meta is on. - // On Mac, we should ignore events when meta is on (Command-<x>). - if (ch < 0x80) { - if (evt->keyEvent()->ctrlKey() && !evt->keyEvent()->altKey()) - return false; -#if OS(DARWIN) - if (evt->keyEvent()->metaKey()) - return false; -#endif - } -#endif - } - - if (!frame->editor()->canEdit()) - return false; - - return frame->editor()->insertText(evt->keyEvent()->text(), evt); -} - -void EditorClientImpl::handleKeyboardEvent(KeyboardEvent* evt) -{ - if (evt->keyCode() == VKEY_DOWN - || evt->keyCode() == VKEY_UP) { - ASSERT(evt->target()->toNode()); - showFormAutofillForNode(evt->target()->toNode()); - } - - // Give the embedder a chance to handle the keyboard event. - if ((m_webView->client() - && m_webView->client()->handleCurrentKeyboardEvent()) - || handleEditingKeyboardEvent(evt)) - evt->setDefaultHandled(); -} - -void EditorClientImpl::handleInputMethodKeydown(KeyboardEvent* keyEvent) -{ - // We handle IME within chrome. -} - -void EditorClientImpl::textFieldDidBeginEditing(Element* element) -{ - HTMLInputElement* inputElement = toHTMLInputElement(element); - if (m_webView->client() && inputElement) - m_webView->client()->textFieldDidBeginEditing(WebInputElement(inputElement)); -} - -void EditorClientImpl::textFieldDidEndEditing(Element* element) -{ - HTMLInputElement* inputElement = toHTMLInputElement(element); - if (m_webView->client() && inputElement) - m_webView->client()->textFieldDidEndEditing(WebInputElement(inputElement)); - - // Notification that focus was lost. Be careful with this, it's also sent - // when the page is being closed. - - // Cancel any pending DoAutofill call. - m_autofillArgs.clear(); - m_autofillTimer.stop(); - - // Hide any showing popup. - m_webView->hideAutoFillPopup(); - - if (!m_webView->client()) - return; // The page is getting closed, don't fill the password. - - // Notify any password-listener of the focus change. - if (!inputElement) - return; - - WebFrameImpl* webframe = WebFrameImpl::fromFrame(inputElement->document()->frame()); - if (!webframe) - return; - - WebPasswordAutocompleteListener* listener = webframe->getPasswordListener(inputElement); - if (!listener) - return; - - listener->didBlurInputElement(inputElement->value()); -} - -void EditorClientImpl::textDidChangeInTextField(Element* element) -{ - ASSERT(element->hasLocalName(HTMLNames::inputTag)); - HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element); - if (m_webView->client()) - m_webView->client()->textFieldDidChange(WebInputElement(inputElement)); - - // Note that we only show the autofill popup in this case if the caret is at - // the end. This matches FireFox and Safari but not IE. - autofill(inputElement, false, false, true); -} - -bool EditorClientImpl::showFormAutofillForNode(Node* node) -{ - HTMLInputElement* inputElement = toHTMLInputElement(node); - if (inputElement) - return autofill(inputElement, true, true, false); - return false; -} - -bool EditorClientImpl::autofill(HTMLInputElement* inputElement, - bool autofillFormOnly, - bool autofillOnEmptyValue, - bool requireCaretAtEnd) -{ - // Cancel any pending DoAutofill call. - m_autofillArgs.clear(); - m_autofillTimer.stop(); - - // FIXME: Remove the extraneous isEnabledFormControl call below. - // Let's try to trigger autofill for that field, if applicable. - if (!inputElement->isEnabledFormControl() || !inputElement->isTextField() - || inputElement->isPasswordField() || !inputElement->autoComplete() - || !inputElement->isEnabledFormControl() - || inputElement->isReadOnlyFormControl()) - return false; - - WebString name = WebInputElement(inputElement).nameForAutofill(); - if (name.isEmpty()) // If the field has no name, then we won't have values. - return false; - - // Don't attempt to autofill with values that are too large. - if (inputElement->value().length() > maximumTextSizeForAutofill) - return false; - - m_autofillArgs = new AutofillArgs(); - m_autofillArgs->inputElement = inputElement; - m_autofillArgs->autofillFormOnly = autofillFormOnly; - m_autofillArgs->autofillOnEmptyValue = autofillOnEmptyValue; - m_autofillArgs->requireCaretAtEnd = requireCaretAtEnd; - m_autofillArgs->backspaceOrDeletePressed = m_backspaceOrDeletePressed; - - if (!requireCaretAtEnd) - doAutofill(0); - else { - // We post a task for doing the autofill as the caret position is not set - // properly at this point (http://bugs.webkit.org/show_bug.cgi?id=16976) - // and we need it to determine whether or not to trigger autofill. - m_autofillTimer.startOneShot(0.0); - } - return true; -} - -void EditorClientImpl::doAutofill(Timer<EditorClientImpl>* timer) -{ - OwnPtr<AutofillArgs> args(m_autofillArgs.release()); - HTMLInputElement* inputElement = args->inputElement.get(); - - const String& value = inputElement->value(); - - // Enforce autofill_on_empty_value and caret_at_end. - - bool isCaretAtEnd = true; - if (args->requireCaretAtEnd) - isCaretAtEnd = inputElement->selectionStart() == inputElement->selectionEnd() - && inputElement->selectionEnd() == static_cast<int>(value.length()); - - if ((!args->autofillOnEmptyValue && value.isEmpty()) || !isCaretAtEnd) { - m_webView->hideAutoFillPopup(); - return; - } - - // First let's see if there is a password listener for that element. - // We won't trigger form autofill in that case, as having both behavior on - // a node would be confusing. - WebFrameImpl* webframe = WebFrameImpl::fromFrame(inputElement->document()->frame()); - if (!webframe) - return; - WebPasswordAutocompleteListener* listener = webframe->getPasswordListener(inputElement); - if (listener) { - if (args->autofillFormOnly) - return; - - listener->performInlineAutocomplete(value, - args->backspaceOrDeletePressed, - true); - return; - } - - // Then trigger form autofill. - WebString name = WebInputElement(inputElement).nameForAutofill(); - ASSERT(static_cast<int>(name.length()) > 0); - - if (m_webView->client()) - m_webView->client()->queryAutofillSuggestions(WebNode(inputElement), - name, WebString(value)); -} - -void EditorClientImpl::cancelPendingAutofill() -{ - m_autofillArgs.clear(); - m_autofillTimer.stop(); -} - -void EditorClientImpl::onAutocompleteSuggestionAccepted(HTMLInputElement* textField) -{ - if (m_webView->client()) - m_webView->client()->didAcceptAutocompleteSuggestion(WebInputElement(textField)); - - WebFrameImpl* webframe = WebFrameImpl::fromFrame(textField->document()->frame()); - if (!webframe) - return; - - webframe->notifiyPasswordListenerOfAutocomplete(WebInputElement(textField)); -} - -bool EditorClientImpl::doTextFieldCommandFromEvent(Element* element, - KeyboardEvent* event) -{ - HTMLInputElement* inputElement = toHTMLInputElement(element); - if (m_webView->client() && inputElement) { - m_webView->client()->textFieldDidReceiveKeyDown(WebInputElement(inputElement), - WebKeyboardEventBuilder(*event)); - } - - // Remember if backspace was pressed for the autofill. It is not clear how to - // find if backspace was pressed from textFieldDidBeginEditing and - // textDidChangeInTextField as when these methods are called the value of the - // input element already contains the type character. - m_backspaceOrDeletePressed = event->keyCode() == VKEY_BACK || event->keyCode() == VKEY_DELETE; - - // The Mac code appears to use this method as a hook to implement special - // keyboard commands specific to Safari's auto-fill implementation. We - // just return false to allow the default action. - return false; -} - -void EditorClientImpl::textWillBeDeletedInTextField(Element*) -{ -} - -void EditorClientImpl::textDidChangeInTextArea(Element*) -{ -} - -void EditorClientImpl::ignoreWordInSpellDocument(const String&) -{ - notImplemented(); -} - -void EditorClientImpl::learnWord(const String&) -{ - notImplemented(); -} - -void EditorClientImpl::checkSpellingOfString(const UChar* text, int length, - int* misspellingLocation, - int* misspellingLength) -{ - // SpellCheckWord will write (0, 0) into the output vars, which is what our - // caller expects if the word is spelled correctly. - int spellLocation = -1; - int spellLength = 0; - - // Check to see if the provided text is spelled correctly. - if (isContinuousSpellCheckingEnabled() && m_webView->client()) - m_webView->client()->spellCheck(WebString(text, length), spellLocation, spellLength); - else { - spellLocation = 0; - spellLength = 0; - } - - // Note: the Mac code checks if the pointers are null before writing to them, - // so we do too. - if (misspellingLocation) - *misspellingLocation = spellLocation; - if (misspellingLength) - *misspellingLength = spellLength; -} - -String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord) -{ - if (!(isContinuousSpellCheckingEnabled() && m_webView->client())) - return String(); - - // Do not autocorrect words with capital letters in it except the - // first letter. This will remove cases changing "IMB" to "IBM". - for (size_t i = 1; i < misspelledWord.length(); i++) { - if (u_isupper(static_cast<UChar32>(misspelledWord[i]))) - return String(); - } - - return m_webView->client()->autoCorrectWord(WebString(misspelledWord)); -} - -void EditorClientImpl::checkGrammarOfString(const UChar*, int length, - WTF::Vector<GrammarDetail>&, - int* badGrammarLocation, - int* badGrammarLength) -{ - notImplemented(); - if (badGrammarLocation) - *badGrammarLocation = 0; - if (badGrammarLength) - *badGrammarLength = 0; -} - -void EditorClientImpl::updateSpellingUIWithGrammarString(const String&, - const GrammarDetail& detail) -{ - notImplemented(); -} - -void EditorClientImpl::updateSpellingUIWithMisspelledWord(const String& misspelledWord) -{ - if (m_webView->client()) - m_webView->client()->updateSpellingUIWithMisspelledWord(WebString(misspelledWord)); -} - -void EditorClientImpl::showSpellingUI(bool show) -{ - if (m_webView->client()) - m_webView->client()->showSpellingUI(show); -} - -bool EditorClientImpl::spellingUIIsShowing() -{ - if (m_webView->client()) - return m_webView->client()->isShowingSpellingUI(); - return false; -} - -void EditorClientImpl::getGuessesForWord(const String& word, - const String& context, - WTF::Vector<String>& guesses) -{ - notImplemented(); -} - -void EditorClientImpl::willSetInputMethodState() -{ - if (m_webView->client()) - m_webView->client()->resetInputMethod(); -} - -void EditorClientImpl::setInputMethodState(bool) -{ -} - -} // namesace WebKit diff --git a/WebKit/chromium/src/EditorClientImpl.h b/WebKit/chromium/src/EditorClientImpl.h deleted file mode 100644 index 9dbd6af..0000000 --- a/WebKit/chromium/src/EditorClientImpl.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef EditorClientImpl_h -#define EditorClientImpl_h - -#include "EditorClient.h" -#include "Timer.h" -#include <wtf/Deque.h> - -namespace WebCore { -class HTMLInputElement; -} - -namespace WebKit { -class WebViewImpl; - -class EditorClientImpl : public WebCore::EditorClient { -public: - EditorClientImpl(WebViewImpl* webView); - - virtual ~EditorClientImpl(); - virtual void pageDestroyed(); - - virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*); - virtual bool smartInsertDeleteEnabled(); - virtual bool isSelectTrailingWhitespaceEnabled(); - virtual bool isContinuousSpellCheckingEnabled(); - virtual void toggleContinuousSpellChecking(); - virtual bool isGrammarCheckingEnabled(); - virtual void toggleGrammarChecking(); - virtual int spellCheckerDocumentTag(); - virtual bool isEditable(); - virtual bool shouldBeginEditing(WebCore::Range*); - virtual bool shouldEndEditing(WebCore::Range*); - virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction); - virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction); - virtual bool shouldDeleteRange(WebCore::Range*); - virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, - WebCore::Range* toRange, - WebCore::EAffinity, - bool stillSelecting); - virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*); - virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*); - virtual void didBeginEditing(); - virtual void respondToChangedContents(); - virtual void respondToChangedSelection(); - virtual void didEndEditing(); - virtual void didWriteSelectionToPasteboard(); - virtual void didSetSelectionTypesForPasteboard(); - virtual void registerCommandForUndo(PassRefPtr<WebCore::EditCommand>); - virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>); - virtual void clearUndoRedoOperations(); - virtual bool canUndo() const; - virtual bool canRedo() const; - virtual void undo(); - virtual void redo(); - virtual const char* interpretKeyEvent(const WebCore::KeyboardEvent*); - virtual bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*); - virtual void handleKeyboardEvent(WebCore::KeyboardEvent*); - virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*); - virtual void textFieldDidBeginEditing(WebCore::Element*); - virtual void textFieldDidEndEditing(WebCore::Element*); - virtual void textDidChangeInTextField(WebCore::Element*); - virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*); - virtual void textWillBeDeletedInTextField(WebCore::Element*); - virtual void textDidChangeInTextArea(WebCore::Element*); - virtual void ignoreWordInSpellDocument(const WTF::String&); - virtual void learnWord(const WTF::String&); - virtual void checkSpellingOfString(const UChar*, int length, - int* misspellingLocation, - int* misspellingLength); - virtual void checkGrammarOfString(const UChar*, int length, - WTF::Vector<WebCore::GrammarDetail>&, - int* badGrammarLocation, - int* badGrammarLength); - virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&); - virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&); - virtual void updateSpellingUIWithMisspelledWord(const WTF::String&); - virtual void showSpellingUI(bool show); - virtual bool spellingUIIsShowing(); - virtual void getGuessesForWord(const WTF::String& word, - const WTF::String& context, - WTF::Vector<WTF::String>& guesses); - virtual void willSetInputMethodState(); - virtual void setInputMethodState(bool enabled); - virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {} - - // Shows the form autofill popup for |node| if it is an HTMLInputElement and - // it is empty. This is called when you press the up or down arrow in a - // text-field or when clicking an already focused text-field. - // Returns true if the autofill popup has been scheduled to be shown, false - // otherwise. - virtual bool showFormAutofillForNode(WebCore::Node*); - - // Notification that the text changed due to acceptance of a suggestion - // provided by an Autocomplete popup. Having a separate callback in this - // case is a simple way to break the cycle that would otherwise occur if - // textDidChangeInTextField was called. - virtual void onAutocompleteSuggestionAccepted(WebCore::HTMLInputElement*); - -private: - void modifySelection(WebCore::Frame*, WebCore::KeyboardEvent*); - - // Triggers autofill for an input element if applicable. This can be form - // autofill (via a popup-menu) or password autofill depending on the - // input element. If |formAutofillOnly| is true, password autofill is not - // triggered. - // |autofillOnEmptyValue| indicates whether the autofill should be shown - // when the text-field is empty. - // If |requiresCaretAtEnd| is true, the autofill popup is only shown if the - // caret is located at the end of the entered text. - // Returns true if the autofill popup has been scheduled to be shown, false - // otherwise. - bool autofill(WebCore::HTMLInputElement*, - bool formAutofillOnly, bool autofillOnEmptyValue, - bool requiresCaretAtEnd); - - // Called to process the autofill described by m_autofillArgs. - // This method is invoked asynchronously if the caret position is not - // reflecting the last text change yet, and we need it to decide whether or - // not to show the autofill popup. - void doAutofill(WebCore::Timer<EditorClientImpl>*); - - void cancelPendingAutofill(); - - // Returns whether or not the focused control needs spell-checking. - // Currently, this function just retrieves the focused node and determines - // whether or not it is a <textarea> element or an element whose - // contenteditable attribute is true. - // FIXME: Bug 740540: This code just implements the default behavior - // proposed in this issue. We should also retrieve "spellcheck" attributes - // for text fields and create a flag to over-write the default behavior. - bool shouldSpellcheckByDefault(); - - WebViewImpl* m_webView; - bool m_inRedo; - - typedef Deque<RefPtr<WebCore::EditCommand> > EditCommandStack; - EditCommandStack m_undoStack; - EditCommandStack m_redoStack; - - // Whether the last entered key was a backspace. - bool m_backspaceOrDeletePressed; - - // This flag is set to false if spell check for this editor is manually - // turned off. The default setting is SpellCheckAutomatic. - enum { - SpellCheckAutomatic, - SpellCheckForcedOn, - SpellCheckForcedOff - }; - int m_spellCheckThisFieldStatus; - - // Used to delay autofill processing. - WebCore::Timer<EditorClientImpl> m_autofillTimer; - - struct AutofillArgs { - RefPtr<WebCore::HTMLInputElement> inputElement; - bool autofillFormOnly; - bool autofillOnEmptyValue; - bool requireCaretAtEnd; - bool backspaceOrDeletePressed; - }; - OwnPtr<AutofillArgs> m_autofillArgs; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/EventListenerWrapper.cpp b/WebKit/chromium/src/EventListenerWrapper.cpp deleted file mode 100644 index 6360932..0000000 --- a/WebKit/chromium/src/EventListenerWrapper.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "EventListenerWrapper.h" - -#include "Event.h" -#include "EventListener.h" - -#include "WebDOMEvent.h" -#include "WebDOMEventListener.h" - -namespace WebKit { - -EventListenerWrapper::EventListenerWrapper(WebDOMEventListener* webDOMEventListener) - : EventListener(EventListener::NativeEventListenerType) - , m_webDOMEventListener(webDOMEventListener) -{ -} - -EventListenerWrapper::~EventListenerWrapper() -{ - if (m_webDOMEventListener) - m_webDOMEventListener->notifyEventListenerDeleted(this); -} - -bool EventListenerWrapper::operator==(const EventListener& listener) -{ - return this == &listener; -} - -void EventListenerWrapper::handleEvent(ScriptExecutionContext* context, Event* event) -{ - if (!m_webDOMEventListener) - return; - WebDOMEvent webDOMEvent(event); - m_webDOMEventListener->handleEvent(webDOMEvent); -} - -void EventListenerWrapper::webDOMEventListenerDeleted() -{ - m_webDOMEventListener = 0; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/EventListenerWrapper.h b/WebKit/chromium/src/EventListenerWrapper.h deleted file mode 100644 index 75b6a95..0000000 --- a/WebKit/chromium/src/EventListenerWrapper.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef EventListenerWrapper_h -#define EventListenerWrapper_h - -#include "EventListener.h" - -namespace WebCore { -class ScriptExecutionContext; -} - -using namespace WebCore; - -namespace WebKit { - -class WebDOMEventListener; - -// FIXME: Remove the DeprecatedEventListenerWrapper class below once Chromium -// switched to using WebDOMEvent. -class EventListenerWrapper : public EventListener { -public: - EventListenerWrapper(WebDOMEventListener*); - ~EventListenerWrapper(); - - virtual bool operator==(const EventListener&); - virtual void handleEvent(ScriptExecutionContext*, Event*); - - void webDOMEventListenerDeleted(); - -private: - WebDOMEventListener* m_webDOMEventListener; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/Extensions3DChromium.cpp b/WebKit/chromium/src/Extensions3DChromium.cpp deleted file mode 100644 index ca2215e..0000000 --- a/WebKit/chromium/src/Extensions3DChromium.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(3D_CANVAS) - -#include "Extensions3DChromium.h" - -#include "GraphicsContext3D.h" -#include "GraphicsContext3DInternal.h" - -namespace WebCore { - -Extensions3DChromium::Extensions3DChromium(GraphicsContext3DInternal* internal) - : m_internal(internal) -{ -} - -Extensions3DChromium::~Extensions3DChromium() -{ -} - -bool Extensions3DChromium::supports(const String& name) -{ - return m_internal->supportsExtension(name); -} - -void Extensions3DChromium::ensureEnabled(const String& name) -{ -#ifndef NDEBUG - bool result = -#endif - m_internal->ensureExtensionEnabled(name); - ASSERT(result); -} - -int Extensions3DChromium::getGraphicsResetStatusARB() -{ - return m_internal->isContextLost() ? static_cast<int>(Extensions3D::UNKNOWN_CONTEXT_RESET_ARB) : static_cast<int>(GraphicsContext3D::NO_ERROR); -} - -void* Extensions3DChromium::mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) -{ - return m_internal->mapBufferSubDataCHROMIUM(target, offset, size, access); -} - -void Extensions3DChromium::unmapBufferSubDataCHROMIUM(const void* data) -{ - m_internal->unmapBufferSubDataCHROMIUM(data); -} - -void* Extensions3DChromium::mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) -{ - return m_internal->mapTexSubImage2DCHROMIUM(target, level, xoffset, yoffset, width, height, format, type, access); -} - -void Extensions3DChromium::unmapTexSubImage2DCHROMIUM(const void* data) -{ - m_internal->unmapTexSubImage2DCHROMIUM(data); -} - -void Extensions3DChromium::copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) -{ - m_internal->copyTextureToParentTextureCHROMIUM(texture, parentTexture); -} - -} // namespace WebCore - -#endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/ExternalPopupMenu.cpp b/WebKit/chromium/src/ExternalPopupMenu.cpp deleted file mode 100644 index f7f9862..0000000 --- a/WebKit/chromium/src/ExternalPopupMenu.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ExternalPopupMenu.h" - -#include "FrameView.h" -#include "IntPoint.h" -#include "PopupMenuClient.h" -#include "TextDirection.h" -#include "WebExternalPopupMenu.h" -#include "WebMenuItemInfo.h" -#include "WebPopupMenuInfo.h" -#include "WebVector.h" -#include "WebViewClient.h" - -using namespace WebCore; - -namespace WebKit { - -ExternalPopupMenu::ExternalPopupMenu(PopupMenuClient* popupMenuClient, - WebViewClient* webViewClient) - : m_popupMenuClient(popupMenuClient) - , m_webViewClient(webViewClient) - , m_webExternalPopupMenu(0) -{ -} - -ExternalPopupMenu::~ExternalPopupMenu() -{ -} - -void ExternalPopupMenu::show(const IntRect& rect, FrameView* v, int index) -{ - // WebCore reuses the PopupMenu of a page. - // For simplicity, we do recreate the actual external popup everytime. - hide(); - - WebPopupMenuInfo info; - getPopupMenuInfo(&info); - if (info.items.isEmpty()) - return; - m_webExternalPopupMenu = - m_webViewClient->createExternalPopupMenu(info, this); - m_webExternalPopupMenu->show(v->contentsToWindow(rect)); -} - -void ExternalPopupMenu::hide() -{ - if (m_popupMenuClient) - m_popupMenuClient->popupDidHide(); - if (!m_webExternalPopupMenu) - return; - m_webExternalPopupMenu->close(); - m_webExternalPopupMenu = 0; -} - -void ExternalPopupMenu::updateFromElement() -{ -} - -void ExternalPopupMenu::disconnectClient() -{ - hide(); - m_popupMenuClient = 0; -} - -void ExternalPopupMenu::didChangeSelection(int index) -{ - if (m_popupMenuClient) - m_popupMenuClient->selectionChanged(index); -} - -void ExternalPopupMenu::didAcceptIndex(int index) -{ - // Calling methods on the PopupMenuClient might lead to this object being - // derefed. This ensures it does not get deleted while we are running this - // method. - RefPtr<ExternalPopupMenu> guard(this); - - if (m_popupMenuClient) { - m_popupMenuClient->valueChanged(index); - // The call to valueChanged above might have lead to a call to - // disconnectClient, so we might not have a PopupMenuClient anymore. - if (m_popupMenuClient) - m_popupMenuClient->popupDidHide(); - } - m_webExternalPopupMenu = 0; -} - -void ExternalPopupMenu::didCancel() -{ - // See comment in didAcceptIndex on why we need this. - RefPtr<ExternalPopupMenu> guard(this); - - if (m_popupMenuClient) - m_popupMenuClient->popupDidHide(); - m_webExternalPopupMenu = 0; -} - -void ExternalPopupMenu::getPopupMenuInfo(WebPopupMenuInfo* info) -{ - int itemCount = m_popupMenuClient->listSize(); - WebVector<WebPopupMenuInfo::Item> items( - static_cast<size_t>(itemCount)); - for (int i = 0; i < itemCount; ++i) { - WebPopupMenuInfo::Item& popupItem = items[i]; - popupItem.label = m_popupMenuClient->itemText(i); - if (m_popupMenuClient->itemIsSeparator(i)) - popupItem.type = WebMenuItemInfo::Separator; - else if (m_popupMenuClient->itemIsLabel(i)) - popupItem.type = WebMenuItemInfo::Group; - else - popupItem.type = WebMenuItemInfo::Option; - popupItem.enabled = m_popupMenuClient->itemIsEnabled(i); - } - - info->itemHeight = m_popupMenuClient->menuStyle().font().height(); - info->itemFontSize = - static_cast<int>(m_popupMenuClient->menuStyle().font().size()); - info->selectedIndex = m_popupMenuClient->selectedIndex(); - info->rightAligned = - m_popupMenuClient->menuStyle().textDirection() == WebCore::RTL; - info->items.swap(items); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/ExternalPopupMenu.h b/WebKit/chromium/src/ExternalPopupMenu.h deleted file mode 100644 index 6963e8d..0000000 --- a/WebKit/chromium/src/ExternalPopupMenu.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ExternalPopupMenu_h -#define ExternalPopupMenu_h - -#include "PopupMenu.h" -#include "WebExternalPopupMenuClient.h" - -namespace WebCore { -class FrameView; -class IntRect; -class PopupMenuClient; -} - -namespace WebKit { - -class WebExternalPopupMenu; -class WebViewClient; -struct WebPopupMenuInfo; - -// The ExternalPopupMenu connects the actual implementation of the popup menu -// to the WebCore popup menu. -class ExternalPopupMenu : public WebCore::PopupMenu, - public WebExternalPopupMenuClient { -public: - ExternalPopupMenu(WebCore::PopupMenuClient*, WebViewClient*); - virtual ~ExternalPopupMenu(); - -private: - // WebCore::PopupMenu methods: - virtual void show(const WebCore::IntRect&, WebCore::FrameView*, int index); - virtual void hide(); - virtual void updateFromElement(); - virtual void disconnectClient(); - - // WebExternalPopupClient methods: - virtual void didChangeSelection(int index); - virtual void didAcceptIndex(int index); - virtual void didCancel(); - - // Fills |info| with the popup menu information contained in the - // WebCore::PopupMenuClient associated with this ExternalPopupMenu. - void getPopupMenuInfo(WebPopupMenuInfo* info); - - WebCore::PopupMenuClient* m_popupMenuClient; - WebViewClient* m_webViewClient; - - // The actual implementor of the show menu. - WebExternalPopupMenu* m_webExternalPopupMenu; -}; - -} // namespace WebKit - -#endif // ExternalPopupMenu_h diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp deleted file mode 100644 index c84889e..0000000 --- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp +++ /dev/null @@ -1,1560 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "FrameLoaderClientImpl.h" - -#include "Chrome.h" -#include "Document.h" -#include "DocumentLoader.h" -#include "FormState.h" -#include "FrameLoader.h" -#include "FrameLoadRequest.h" -#include "FrameNetworkingContextImpl.h" -#include "FrameView.h" -#include "HTTPParsers.h" -#include "HistoryItem.h" -#include "HitTestResult.h" -#include "HTMLAppletElement.h" -#include "HTMLFormElement.h" // needed by FormState.h -#include "HTMLNames.h" -#include "MIMETypeRegistry.h" -#include "MouseEvent.h" -#include "Page.h" -#include "PlatformString.h" -#include "PluginData.h" -#include "PluginDataChromium.h" -#include "ProgressTracker.h" -#include "Settings.h" -#include "StringExtras.h" -#include "WebDataSourceImpl.h" -#include "WebDevToolsAgentPrivate.h" -#include "WebFormElement.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMimeRegistry.h" -#include "WebNode.h" -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" -#include "WebPluginLoadObserver.h" -#include "WebPluginParams.h" -#include "WebSecurityOrigin.h" -#include "WebURL.h" -#include "WebURLError.h" -#include "WebVector.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include "WindowFeatures.h" -#include "WrappedResourceRequest.h" -#include "WrappedResourceResponse.h" -#include <wtf/text/CString.h> - -using namespace WebCore; - -namespace WebKit { - -// Domain for internal error codes. -static const char internalErrorDomain[] = "WebKit"; - -// An internal error code. Used to note a policy change error resulting from -// dispatchDecidePolicyForMIMEType not passing the PolicyUse option. -enum { - PolicyChangeError = -10000, -}; - -FrameLoaderClientImpl::FrameLoaderClientImpl(WebFrameImpl* frame) - : m_webFrame(frame) - , m_hasRepresentation(false) - , m_sentInitialResponseToPlugin(false) - , m_nextNavigationPolicy(WebNavigationPolicyIgnore) -{ -} - -FrameLoaderClientImpl::~FrameLoaderClientImpl() -{ -} - -void FrameLoaderClientImpl::frameLoaderDestroyed() -{ - // When the WebFrame was created, it had an extra reference given to it on - // behalf of the Frame. Since the WebFrame owns us, this extra ref also - // serves to keep us alive until the FrameLoader is done with us. The - // FrameLoader calls this method when it's going away. Therefore, we balance - // out that extra reference, which may cause 'this' to be deleted. - m_webFrame->closing(); - m_webFrame->deref(); -} - -void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*) -{ - if (m_webFrame->client()) - m_webFrame->client()->didClearWindowObject(m_webFrame); - - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview->devToolsAgentPrivate()) - webview->devToolsAgentPrivate()->didClearWindowObject(m_webFrame); -} - -void FrameLoaderClientImpl::documentElementAvailable() -{ - if (m_webFrame->client()) - m_webFrame->client()->didCreateDocumentElement(m_webFrame); -} - -void FrameLoaderClientImpl::didCreateScriptContextForFrame() -{ - if (m_webFrame->client()) - m_webFrame->client()->didCreateScriptContext(m_webFrame); -} - -void FrameLoaderClientImpl::didDestroyScriptContextForFrame() -{ - if (m_webFrame->client()) - m_webFrame->client()->didDestroyScriptContext(m_webFrame); -} - -void FrameLoaderClientImpl::didCreateIsolatedScriptContext() -{ - if (m_webFrame->client()) - m_webFrame->client()->didCreateIsolatedScriptContext(m_webFrame); -} - -bool FrameLoaderClientImpl::allowScriptExtension(const String& extensionName, - int extensionGroup) -{ - if (m_webFrame->client()) - return m_webFrame->client()->allowScriptExtension(m_webFrame, extensionName, extensionGroup); - return false; -} - -void FrameLoaderClientImpl::didPerformFirstNavigation() const -{ -} - -void FrameLoaderClientImpl::registerForIconNotification(bool) -{ -} - -void FrameLoaderClientImpl::didChangeScrollOffset() -{ - if (m_webFrame->client()) - m_webFrame->client()->didChangeScrollOffset(m_webFrame); -} - -bool FrameLoaderClientImpl::allowJavaScript(bool enabledPerSettings) -{ - if (m_webFrame->client()) - return m_webFrame->client()->allowScript(m_webFrame, enabledPerSettings); - - return enabledPerSettings; -} - -bool FrameLoaderClientImpl::allowPlugins(bool enabledPerSettings) -{ - if (m_webFrame->client()) - return m_webFrame->client()->allowPlugins(m_webFrame, enabledPerSettings); - - return enabledPerSettings; -} - -bool FrameLoaderClientImpl::allowImages(bool enabledPerSettings) -{ - if (m_webFrame->client()) - return m_webFrame->client()->allowImages(m_webFrame, enabledPerSettings); - - return enabledPerSettings; -} - -void FrameLoaderClientImpl::didNotAllowScript() -{ - if (m_webFrame->client()) - m_webFrame->client()->didNotAllowScript(m_webFrame); -} - -void FrameLoaderClientImpl::didNotAllowPlugins() -{ - if (m_webFrame->client()) - m_webFrame->client()->didNotAllowPlugins(m_webFrame); -} - -bool FrameLoaderClientImpl::hasWebView() const -{ - return m_webFrame->viewImpl(); -} - -bool FrameLoaderClientImpl::hasFrameView() const -{ - // The Mac port has this notion of a WebFrameView, which seems to be - // some wrapper around an NSView. Since our equivalent is HWND, I guess - // we have a "frameview" whenever we have the toplevel HWND. - return m_webFrame->viewImpl(); -} - -void FrameLoaderClientImpl::makeDocumentView() -{ - m_webFrame->createFrameView(); -} - -void FrameLoaderClientImpl::makeRepresentation(DocumentLoader*) -{ - m_hasRepresentation = true; -} - -void FrameLoaderClientImpl::forceLayout() -{ - // FIXME -} - -void FrameLoaderClientImpl::forceLayoutForNonHTML() -{ - // FIXME -} - -void FrameLoaderClientImpl::setCopiesOnScroll() -{ - // FIXME -} - -void FrameLoaderClientImpl::detachedFromParent2() -{ - // Nothing to do here. -} - -void FrameLoaderClientImpl::detachedFromParent3() -{ - // Close down the proxy. The purpose of this change is to make the - // call to ScriptController::clearWindowShell a no-op when called from - // Frame::pageDestroyed. Without this change, this call to clearWindowShell - // will cause a crash. If you remove/modify this, just ensure that you can - // go to a page and then navigate to a new page without getting any asserts - // or crashes. - m_webFrame->frame()->script()->proxy()->clearForClose(); - - // Alert the client that the frame is being detached. This is the last - // chance we have to communicate with the client. - if (m_webFrame->client()) - m_webFrame->client()->frameDetached(m_webFrame); - - // Stop communicating with the WebFrameClient at this point since we are no - // longer associated with the Page. - m_webFrame->setClient(0); -} - -// This function is responsible for associating the |identifier| with a given -// subresource load. The following functions that accept an |identifier| are -// called for each subresource, so they should not be dispatched to the -// WebFrame. -void FrameLoaderClientImpl::assignIdentifierToInitialRequest( - unsigned long identifier, DocumentLoader* loader, - const ResourceRequest& request) -{ - if (m_webFrame->client()) { - WrappedResourceRequest webreq(request); - m_webFrame->client()->assignIdentifierToRequest( - m_webFrame, identifier, webreq); - } -} - -// If the request being loaded by |loader| is a frame, update the ResourceType. -// A subresource in this context is anything other than a frame -- -// this includes images and xmlhttp requests. It is important to note that a -// subresource is NOT limited to stuff loaded through the frame's subresource -// loader. Synchronous xmlhttp requests for example, do not go through the -// subresource loader, but we still label them as TargetIsSubresource. -// -// The important edge cases to consider when modifying this function are -// how synchronous resource loads are treated during load/unload threshold. -static void setTargetTypeFromLoader(ResourceRequest& request, DocumentLoader* loader) -{ - if (loader == loader->frameLoader()->provisionalDocumentLoader()) { - ResourceRequest::TargetType type; - if (loader->frameLoader()->isLoadingMainFrame()) - type = ResourceRequest::TargetIsMainFrame; - else - type = ResourceRequest::TargetIsSubframe; - request.setTargetType(type); - } -} - -void FrameLoaderClientImpl::dispatchWillSendRequest( - DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, - const ResourceResponse& redirectResponse) -{ - if (loader) { - // We want to distinguish between a request for a document to be loaded into - // the main frame, a sub-frame, or the sub-objects in that document. - setTargetTypeFromLoader(request, loader); - - // Avoid repeating a form submission when navigating back or forward. - if (loader == loader->frameLoader()->provisionalDocumentLoader() - && request.httpMethod() == "POST" - && isBackForwardLoadType(loader->frameLoader()->loadType())) - request.setCachePolicy(ReturnCacheDataDontLoad); - } - - // FrameLoader::loadEmptyDocumentSynchronously() creates an empty document - // with no URL. We don't like that, so we'll rename it to about:blank. - if (request.url().isEmpty()) - request.setURL(KURL(ParsedURLString, "about:blank")); - if (request.firstPartyForCookies().isEmpty()) - request.setFirstPartyForCookies(KURL(ParsedURLString, "about:blank")); - - // Give the WebFrameClient a crack at the request. - if (m_webFrame->client()) { - WrappedResourceRequest webreq(request); - WrappedResourceResponse webresp(redirectResponse); - m_webFrame->client()->willSendRequest( - m_webFrame, identifier, webreq, webresp); - } -} - -bool FrameLoaderClientImpl::shouldUseCredentialStorage( - DocumentLoader*, unsigned long identifier) -{ - // FIXME - // Intended to pass through to a method on the resource load delegate. - // If implemented, that method controls whether the browser should ask the - // networking layer for a stored default credential for the page (say from - // the Mac OS keychain). If the method returns false, the user should be - // presented with an authentication challenge whether or not the networking - // layer has a credential stored. - // This returns true for backward compatibility: the ability to override the - // system credential store is new. (Actually, not yet fully implemented in - // WebKit, as of this writing.) - return true; -} - -void FrameLoaderClientImpl::dispatchDidReceiveAuthenticationChallenge( - DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) -{ - // FIXME -} - -void FrameLoaderClientImpl::dispatchDidCancelAuthenticationChallenge( - DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) -{ - // FIXME -} - -void FrameLoaderClientImpl::dispatchDidReceiveResponse(DocumentLoader* loader, - unsigned long identifier, - const ResourceResponse& response) -{ - if (m_webFrame->client()) { - WrappedResourceResponse webresp(response); - m_webFrame->client()->didReceiveResponse(m_webFrame, identifier, webresp); - } -} - -void FrameLoaderClientImpl::dispatchDidReceiveContentLength( - DocumentLoader* loader, - unsigned long identifier, - int lengthReceived) -{ -} - -// Called when a particular resource load completes -void FrameLoaderClientImpl::dispatchDidFinishLoading(DocumentLoader* loader, - unsigned long identifier) -{ - if (m_webFrame->client()) - m_webFrame->client()->didFinishResourceLoad(m_webFrame, identifier); -} - -void FrameLoaderClientImpl::dispatchDidFailLoading(DocumentLoader* loader, - unsigned long identifier, - const ResourceError& error) -{ - if (m_webFrame->client()) - m_webFrame->client()->didFailResourceLoad(m_webFrame, identifier, error); -} - -void FrameLoaderClientImpl::dispatchDidFinishDocumentLoad() -{ - // A frame may be reused. This call ensures we don't hold on to our password - // listeners and their associated HTMLInputElements. - m_webFrame->clearPasswordListeners(); - - if (m_webFrame->client()) - m_webFrame->client()->didFinishDocumentLoad(m_webFrame); -} - -bool FrameLoaderClientImpl::dispatchDidLoadResourceFromMemoryCache( - DocumentLoader* loader, - const ResourceRequest& request, - const ResourceResponse& response, - int length) -{ - if (m_webFrame->client()) { - WrappedResourceRequest webreq(request); - WrappedResourceResponse webresp(response); - m_webFrame->client()->didLoadResourceFromMemoryCache( - m_webFrame, webreq, webresp); - } - return false; // Do not suppress remaining notifications -} - -void FrameLoaderClientImpl::dispatchDidHandleOnloadEvents() -{ - if (m_webFrame->client()) - m_webFrame->client()->didHandleOnloadEvents(m_webFrame); -} - -// Redirect Tracking -// ================= -// We want to keep track of the chain of redirects that occur during page -// loading. There are two types of redirects, server redirects which are HTTP -// response codes, and client redirects which are document.location= and meta -// refreshes. -// -// This outlines the callbacks that we get in different redirect situations, -// and how each call modifies the redirect chain. -// -// Normal page load -// ---------------- -// dispatchDidStartProvisionalLoad() -> adds URL to the redirect list -// dispatchDidCommitLoad() -> DISPATCHES & clears list -// -// Server redirect (success) -// ------------------------- -// dispatchDidStartProvisionalLoad() -> adds source URL -// dispatchDidReceiveServerRedirectForProvisionalLoad() -> adds dest URL -// dispatchDidCommitLoad() -> DISPATCHES -// -// Client redirect (success) -// ------------------------- -// (on page) -// dispatchWillPerformClientRedirect() -> saves expected redirect -// dispatchDidStartProvisionalLoad() -> appends redirect source (since -// it matches the expected redirect) -// and the current page as the dest) -// dispatchDidCancelClientRedirect() -> clears expected redirect -// dispatchDidCommitLoad() -> DISPATCHES -// -// Client redirect (cancelled) -// (e.g meta-refresh trumped by manual doc.location change, or just cancelled -// because a link was clicked that requires the meta refresh to be rescheduled -// (the SOURCE URL may have changed). -// --------------------------- -// dispatchDidCancelClientRedirect() -> clears expected redirect -// dispatchDidStartProvisionalLoad() -> adds only URL to redirect list -// dispatchDidCommitLoad() -> DISPATCHES & clears list -// rescheduled ? dispatchWillPerformClientRedirect() -> saves expected redirect -// : nothing - -// Client redirect (failure) -// ------------------------- -// (on page) -// dispatchWillPerformClientRedirect() -> saves expected redirect -// dispatchDidStartProvisionalLoad() -> appends redirect source (since -// it matches the expected redirect) -// and the current page as the dest) -// dispatchDidCancelClientRedirect() -// dispatchDidFailProvisionalLoad() -// -// Load 1 -> Server redirect to 2 -> client redirect to 3 -> server redirect to 4 -// ------------------------------------------------------------------------------ -// dispatchDidStartProvisionalLoad() -> adds source URL 1 -// dispatchDidReceiveServerRedirectForProvisionalLoad() -> adds dest URL 2 -// dispatchDidCommitLoad() -> DISPATCHES 1+2 -// -- begin client redirect and NEW DATA SOURCE -// dispatchWillPerformClientRedirect() -> saves expected redirect -// dispatchDidStartProvisionalLoad() -> appends URL 2 and URL 3 -// dispatchDidReceiveServerRedirectForProvisionalLoad() -> appends destination URL 4 -// dispatchDidCancelClientRedirect() -> clears expected redirect -// dispatchDidCommitLoad() -> DISPATCHES -// -// Interesting case with multiple location changes involving anchors. -// Load page 1 containing future client-redirect (back to 1, e.g meta refresh) > Click -// on a link back to the same page (i.e an anchor href) > -// client-redirect finally fires (with new source, set to 1#anchor) -// ----------------------------------------------------------------------------- -// dispatchWillPerformClientRedirect(non-zero 'interval' param) -> saves expected redirect -// -- click on anchor href -// dispatchDidCancelClientRedirect() -> clears expected redirect -// dispatchDidStartProvisionalLoad() -> adds 1#anchor source -// dispatchDidCommitLoad() -> DISPATCHES 1#anchor -// dispatchWillPerformClientRedirect() -> saves exp. source (1#anchor) -// -- redirect timer fires -// dispatchDidStartProvisionalLoad() -> appends 1#anchor (src) and 1 (dest) -// dispatchDidCancelClientRedirect() -> clears expected redirect -// dispatchDidCommitLoad() -> DISPATCHES 1#anchor + 1 -// -void FrameLoaderClientImpl::dispatchDidReceiveServerRedirectForProvisionalLoad() -{ - WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); - if (!ds) { - // Got a server redirect when there is no provisional DS! - ASSERT_NOT_REACHED(); - return; - } - - // The server redirect may have been blocked. - if (ds->request().isNull()) - return; - - // A provisional load should have started already, which should have put an - // entry in our redirect chain. - ASSERT(ds->hasRedirectChain()); - - // The URL of the destination is on the provisional data source. We also need - // to update the redirect chain to account for this addition (we do this - // before the callback so the callback can look at the redirect chain to see - // what happened). - ds->appendRedirect(ds->request().url()); - - if (m_webFrame->client()) - m_webFrame->client()->didReceiveServerRedirectForProvisionalLoad(m_webFrame); -} - -// Called on both success and failure of a client redirect. -void FrameLoaderClientImpl::dispatchDidCancelClientRedirect() -{ - // No longer expecting a client redirect. - if (m_webFrame->client()) { - m_expectedClientRedirectSrc = KURL(); - m_expectedClientRedirectDest = KURL(); - m_webFrame->client()->didCancelClientRedirect(m_webFrame); - } - - // No need to clear the redirect chain, since that data source has already - // been deleted by the time this function is called. -} - -void FrameLoaderClientImpl::dispatchWillPerformClientRedirect( - const KURL& url, - double interval, - double fireDate) -{ - // Tells dispatchDidStartProvisionalLoad that if it sees this item it is a - // redirect and the source item should be added as the start of the chain. - m_expectedClientRedirectSrc = m_webFrame->url(); - m_expectedClientRedirectDest = url; - - // FIXME: bug 1135512. Webkit does not properly notify us of cancelling - // http > file client redirects. Since the FrameLoader's policy is to never - // carry out such a navigation anyway, the best thing we can do for now to - // not get confused is ignore this notification. - if (m_expectedClientRedirectDest.isLocalFile() - && m_expectedClientRedirectSrc.protocolInHTTPFamily()) { - m_expectedClientRedirectSrc = KURL(); - m_expectedClientRedirectDest = KURL(); - return; - } - - if (m_webFrame->client()) { - m_webFrame->client()->willPerformClientRedirect( - m_webFrame, - m_expectedClientRedirectSrc, - m_expectedClientRedirectDest, - static_cast<unsigned int>(interval), - static_cast<unsigned int>(fireDate)); - } -} - -void FrameLoaderClientImpl::dispatchDidNavigateWithinPage() -{ - // Anchor fragment navigations are not normal loads, so we need to synthesize - // some events for our delegate. - WebViewImpl* webView = m_webFrame->viewImpl(); - - // Flag of whether frame loader is completed. Generate didStartLoading and - // didStopLoading only when loader is completed so that we don't fire - // them for fragment redirection that happens in window.onload handler. - // See https://bugs.webkit.org/show_bug.cgi?id=31838 - bool loaderCompleted = - !webView->page()->mainFrame()->loader()->activeDocumentLoader()->isLoadingInAPISense(); - - // Generate didStartLoading if loader is completed. - if (webView->client() && loaderCompleted) - webView->client()->didStartLoading(); - - // We need to classify some hash changes as client redirects. - // FIXME: It seems wrong that the currentItem can sometimes be null. - HistoryItem* currentItem = m_webFrame->frame()->loader()->history()->currentItem(); - bool isHashChange = !currentItem || !currentItem->stateObject(); - - WebDataSourceImpl* ds = m_webFrame->dataSourceImpl(); - ASSERT(ds); // Should not be null when navigating to a reference fragment! - if (ds) { - KURL url = ds->request().url(); - KURL chainEnd; - if (ds->hasRedirectChain()) { - chainEnd = ds->endOfRedirectChain(); - ds->clearRedirectChain(); - } - - if (isHashChange) { - // Figure out if this location change is because of a JS-initiated - // client redirect (e.g onload/setTimeout document.location.href=). - // FIXME: (b/1085325, b/1046841) We don't get proper redirect - // performed/cancelled notifications across anchor navigations, so the - // other redirect-tracking code in this class (see - // dispatch*ClientRedirect() and dispatchDidStartProvisionalLoad) is - // insufficient to catch and properly flag these transitions. Once a - // proper fix for this bug is identified and applied the following - // block may no longer be required. - bool wasClientRedirect = - (url == m_expectedClientRedirectDest && chainEnd == m_expectedClientRedirectSrc) - || !m_webFrame->isProcessingUserGesture(); - - if (wasClientRedirect) { - if (m_webFrame->client()) - m_webFrame->client()->didCompleteClientRedirect(m_webFrame, chainEnd); - ds->appendRedirect(chainEnd); - // Make sure we clear the expected redirect since we just effectively - // completed it. - m_expectedClientRedirectSrc = KURL(); - m_expectedClientRedirectDest = KURL(); - } - } - - // Regardless of how we got here, we are navigating to a URL so we need to - // add it to the redirect chain. - ds->appendRedirect(url); - } - - bool isNewNavigation; - webView->didCommitLoad(&isNewNavigation); - if (m_webFrame->client()) - m_webFrame->client()->didNavigateWithinPage(m_webFrame, isNewNavigation); - - // Generate didStopLoading if loader is completed. - if (webView->client() && loaderCompleted) - webView->client()->didStopLoading(); -} - -void FrameLoaderClientImpl::dispatchDidChangeLocationWithinPage() -{ - if (m_webFrame) - m_webFrame->client()->didChangeLocationWithinPage(m_webFrame); -} - -void FrameLoaderClientImpl::dispatchDidPushStateWithinPage() -{ - dispatchDidNavigateWithinPage(); -} - -void FrameLoaderClientImpl::dispatchDidReplaceStateWithinPage() -{ - dispatchDidNavigateWithinPage(); -} - -void FrameLoaderClientImpl::dispatchDidPopStateWithinPage() -{ - // Ignored since dispatchDidNavigateWithinPage was already called. -} - -void FrameLoaderClientImpl::dispatchWillClose() -{ - if (m_webFrame->client()) - m_webFrame->client()->willClose(m_webFrame); -} - -void FrameLoaderClientImpl::dispatchDidReceiveIcon() -{ - // The icon database is disabled, so this should never be called. - ASSERT_NOT_REACHED(); -} - -void FrameLoaderClientImpl::dispatchDidStartProvisionalLoad() -{ - // In case a redirect occurs, we need this to be set so that the redirect - // handling code can tell where the redirect came from. Server redirects - // will occur on the provisional load, so we need to keep track of the most - // recent provisional load URL. - // See dispatchDidReceiveServerRedirectForProvisionalLoad. - WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); - if (!ds) { - ASSERT_NOT_REACHED(); - return; - } - KURL url = ds->request().url(); - - // Since the provisional load just started, we should have not gotten - // any redirects yet. - ASSERT(!ds->hasRedirectChain()); - - // If this load is what we expected from a client redirect, treat it as a - // redirect from that original page. The expected redirect urls will be - // cleared by DidCancelClientRedirect. - bool completingClientRedirect = false; - if (m_expectedClientRedirectSrc.isValid()) { - // m_expectedClientRedirectDest could be something like - // "javascript:history.go(-1)" thus we need to exclude url starts with - // "javascript:". See bug: 1080873 - ASSERT(m_expectedClientRedirectDest.protocolIs("javascript") - || m_expectedClientRedirectDest == url); - ds->appendRedirect(m_expectedClientRedirectSrc); - completingClientRedirect = true; - } - ds->appendRedirect(url); - - if (m_webFrame->client()) { - // Whatever information didCompleteClientRedirect contains should only - // be considered relevant until the next provisional load has started. - // So we first tell the client that the load started, and then tell it - // about the client redirect the load is responsible for completing. - m_webFrame->client()->didStartProvisionalLoad(m_webFrame); - if (completingClientRedirect) { - m_webFrame->client()->didCompleteClientRedirect( - m_webFrame, m_expectedClientRedirectSrc); - } - } -} - -void FrameLoaderClientImpl::dispatchDidReceiveTitle(const String& title) -{ - if (m_webFrame->client()) - m_webFrame->client()->didReceiveTitle(m_webFrame, title); -} - -void FrameLoaderClientImpl::dispatchDidChangeIcons() -{ - if (m_webFrame->client()) - m_webFrame->client()->didChangeIcons(m_webFrame); -} - -void FrameLoaderClientImpl::dispatchDidCommitLoad() -{ - WebViewImpl* webview = m_webFrame->viewImpl(); - bool isNewNavigation; - webview->didCommitLoad(&isNewNavigation); - - if (m_webFrame->client()) - m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, isNewNavigation); -} - -void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( - const ResourceError& error) -{ - - // If a policy change occured, then we do not want to inform the plugin - // delegate. See http://b/907789 for details. FIXME: This means the - // plugin won't receive NPP_URLNotify, which seems like it could result in - // a memory leak in the plugin!! - if (error.domain() == internalErrorDomain - && error.errorCode() == PolicyChangeError) { - m_webFrame->didFail(cancelledError(error.failingURL()), true); - return; - } - - OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(); - m_webFrame->didFail(error, true); - if (observer) - observer->didFailLoading(error); -} - -void FrameLoaderClientImpl::dispatchDidFailLoad(const ResourceError& error) -{ - OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(); - m_webFrame->didFail(error, false); - if (observer) - observer->didFailLoading(error); - - // Don't clear the redirect chain, this will happen in the middle of client - // redirects, and we need the context. The chain will be cleared when the - // provisional load succeeds or fails, not the "real" one. -} - -void FrameLoaderClientImpl::dispatchDidFinishLoad() -{ - OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(); - - if (m_webFrame->client()) - m_webFrame->client()->didFinishLoad(m_webFrame); - - if (observer) - observer->didFinishLoading(); - - // Don't clear the redirect chain, this will happen in the middle of client - // redirects, and we need the context. The chain will be cleared when the - // provisional load succeeds or fails, not the "real" one. -} - -void FrameLoaderClientImpl::dispatchDidFirstLayout() -{ - if (m_webFrame->client()) - m_webFrame->client()->didFirstLayout(m_webFrame); -} - -void FrameLoaderClientImpl::dispatchDidFirstVisuallyNonEmptyLayout() -{ - if (m_webFrame->client()) - m_webFrame->client()->didFirstVisuallyNonEmptyLayout(m_webFrame); -} - -Frame* FrameLoaderClientImpl::dispatchCreatePage(const NavigationAction& action) -{ - struct WindowFeatures features; - Page* newPage = m_webFrame->frame()->page()->chrome()->createWindow( - m_webFrame->frame(), FrameLoadRequest(m_webFrame->frame()->document()->securityOrigin()), - features, action); - - // Make sure that we have a valid disposition. This should have been set in - // the preceeding call to dispatchDecidePolicyForNewWindowAction. - ASSERT(m_nextNavigationPolicy != WebNavigationPolicyIgnore); - WebNavigationPolicy policy = m_nextNavigationPolicy; - m_nextNavigationPolicy = WebNavigationPolicyIgnore; - - // createWindow can return null (e.g., popup blocker denies the window). - if (!newPage) - return 0; - - WebViewImpl::fromPage(newPage)->setInitialNavigationPolicy(policy); - return newPage->mainFrame(); -} - -void FrameLoaderClientImpl::dispatchShow() -{ - WebViewImpl* webView = m_webFrame->viewImpl(); - if (webView && webView->client()) - webView->client()->show(webView->initialNavigationPolicy()); -} - -void FrameLoaderClientImpl::dispatchDecidePolicyForMIMEType( - FramePolicyFunction function, - const String& mimeType, - const ResourceRequest&) -{ - const ResourceResponse& response = - m_webFrame->frame()->loader()->activeDocumentLoader()->response(); - - PolicyAction action; - - int statusCode = response.httpStatusCode(); - if (statusCode == 204 || statusCode == 205) { - // The server does not want us to replace the page contents. - action = PolicyIgnore; - } else if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment) { - // The server wants us to download instead of replacing the page contents. - // Downloading is handled by the embedder, but we still get the initial - // response so that we can ignore it and clean up properly. - action = PolicyIgnore; - } else if (!canShowMIMEType(mimeType)) { - // Make sure that we can actually handle this type internally. - action = PolicyIgnore; - } else { - // OK, we will render this page. - action = PolicyUse; - } - - // NOTE: PolicyChangeError will be generated when action is not PolicyUse. - (m_webFrame->frame()->loader()->policyChecker()->*function)(action); -} - -void FrameLoaderClientImpl::dispatchDecidePolicyForNewWindowAction( - FramePolicyFunction function, - const NavigationAction& action, - const ResourceRequest& request, - PassRefPtr<FormState> formState, - const String& frameName) -{ - WebNavigationPolicy navigationPolicy; - if (!actionSpecifiesNavigationPolicy(action, &navigationPolicy)) - navigationPolicy = WebNavigationPolicyNewForegroundTab; - - PolicyAction policyAction; - if (navigationPolicy == WebNavigationPolicyDownload) - policyAction = PolicyDownload; - else { - policyAction = PolicyUse; - - // Remember the disposition for when dispatchCreatePage is called. It is - // unfortunate that WebCore does not provide us with any context when - // creating or showing the new window that would allow us to avoid having - // to keep this state. - m_nextNavigationPolicy = navigationPolicy; - } - (m_webFrame->frame()->loader()->policyChecker()->*function)(policyAction); -} - -void FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction( - FramePolicyFunction function, - const NavigationAction& action, - const ResourceRequest& request, - PassRefPtr<FormState> formState) { - PolicyAction policyAction = PolicyIgnore; - - // It is valid for this function to be invoked in code paths where the - // the webview is closed. - // The null check here is to fix a crash that seems strange - // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). - if (m_webFrame->client() && !request.url().isNull()) { - WebNavigationPolicy navigationPolicy = WebNavigationPolicyCurrentTab; - actionSpecifiesNavigationPolicy(action, &navigationPolicy); - - // Give the delegate a chance to change the navigation policy. - const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); - if (ds) { - KURL url = ds->request().url(); - ASSERT(!url.protocolIs(backForwardNavigationScheme)); - - bool isRedirect = ds->hasRedirectChain(); - - WebNavigationType webnavType = - WebDataSourceImpl::toWebNavigationType(action.type()); - - RefPtr<Node> node; - for (const Event* event = action.event(); event; event = event->underlyingEvent()) { - if (event->isMouseEvent()) { - const MouseEvent* mouseEvent = - static_cast<const MouseEvent*>(event); - node = m_webFrame->frame()->eventHandler()->hitTestResultAtPoint( - mouseEvent->absoluteLocation(), false).innerNonSharedNode(); - break; - } - } - WebNode originatingNode(node); - - navigationPolicy = m_webFrame->client()->decidePolicyForNavigation( - m_webFrame, ds->request(), webnavType, originatingNode, - navigationPolicy, isRedirect); - } - - if (navigationPolicy == WebNavigationPolicyCurrentTab) - policyAction = PolicyUse; - else if (navigationPolicy == WebNavigationPolicyDownload) - policyAction = PolicyDownload; - else { - if (navigationPolicy != WebNavigationPolicyIgnore) { - WrappedResourceRequest webreq(request); - m_webFrame->client()->loadURLExternally(m_webFrame, webreq, navigationPolicy); - } - policyAction = PolicyIgnore; - } - } - - (m_webFrame->frame()->loader()->policyChecker()->*function)(policyAction); -} - -void FrameLoaderClientImpl::cancelPolicyCheck() -{ - // FIXME -} - -void FrameLoaderClientImpl::dispatchUnableToImplementPolicy(const ResourceError& error) -{ - m_webFrame->client()->unableToImplementPolicyWithError(m_webFrame, error); -} - -void FrameLoaderClientImpl::dispatchWillSendSubmitEvent(HTMLFormElement* form) -{ - if (m_webFrame->client()) - m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(form)); -} - -void FrameLoaderClientImpl::dispatchWillSubmitForm(FramePolicyFunction function, - PassRefPtr<FormState> formState) -{ - if (m_webFrame->client()) - m_webFrame->client()->willSubmitForm(m_webFrame, WebFormElement(formState->form())); - (m_webFrame->frame()->loader()->policyChecker()->*function)(PolicyUse); -} - -void FrameLoaderClientImpl::dispatchDidLoadMainResource(DocumentLoader*) -{ - // FIXME -} - -void FrameLoaderClientImpl::revertToProvisionalState(DocumentLoader*) -{ - m_hasRepresentation = true; -} - -void FrameLoaderClientImpl::setMainDocumentError(DocumentLoader*, - const ResourceError& error) -{ - if (m_pluginWidget.get()) { - if (m_sentInitialResponseToPlugin) { - m_pluginWidget->didFailLoading(error); - m_sentInitialResponseToPlugin = false; - } - m_pluginWidget = 0; - } -} - -void FrameLoaderClientImpl::postProgressStartedNotification() -{ - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview && webview->client()) - webview->client()->didStartLoading(); -} - -void FrameLoaderClientImpl::postProgressEstimateChangedNotification() -{ - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview && webview->client()) { - webview->client()->didChangeLoadProgress( - m_webFrame, m_webFrame->frame()->page()->progress()->estimatedProgress()); - } - -} - -void FrameLoaderClientImpl::postProgressFinishedNotification() -{ - // FIXME: why might the webview be null? http://b/1234461 - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview && webview->client()) - webview->client()->didStopLoading(); -} - -void FrameLoaderClientImpl::setMainFrameDocumentReady(bool ready) -{ - // FIXME -} - -// Creates a new connection and begins downloading from that (contrast this -// with |download|). -void FrameLoaderClientImpl::startDownload(const ResourceRequest& request) -{ - if (m_webFrame->client()) { - WrappedResourceRequest webreq(request); - m_webFrame->client()->loadURLExternally( - m_webFrame, webreq, WebNavigationPolicyDownload); - } -} - -void FrameLoaderClientImpl::willChangeTitle(DocumentLoader*) -{ - // FIXME -} - -void FrameLoaderClientImpl::didChangeTitle(DocumentLoader*) -{ - // FIXME -} - -// Called whenever data is received. -void FrameLoaderClientImpl::committedLoad(DocumentLoader* loader, const char* data, int length) -{ - if (!m_pluginWidget.get()) { - if (m_webFrame->client()) { - bool preventDefault = false; - m_webFrame->client()->didReceiveDocumentData(m_webFrame, data, length, preventDefault); - if (!preventDefault) - m_webFrame->commitDocumentData(data, length); - } - } - - // If we are sending data to MediaDocument, we should stop here - // and cancel the request. - if (m_webFrame->frame()->document()->isMediaDocument()) - loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response())); - - // The plugin widget could have been created in the m_webFrame->DidReceiveData - // function. - if (m_pluginWidget.get()) { - if (!m_sentInitialResponseToPlugin) { - m_sentInitialResponseToPlugin = true; - m_pluginWidget->didReceiveResponse( - m_webFrame->frame()->loader()->activeDocumentLoader()->response()); - } - - // It's possible that the above call removed the pointer to the plugin, so - // check before calling it. - if (m_pluginWidget.get()) - m_pluginWidget->didReceiveData(data, length); - } -} - -void FrameLoaderClientImpl::finishedLoading(DocumentLoader* dl) -{ - if (m_pluginWidget.get()) { - m_pluginWidget->didFinishLoading(); - m_pluginWidget = 0; - m_sentInitialResponseToPlugin = false; - } else { - // This is necessary to create an empty document. See bug 634004. - // However, we only want to do this if makeRepresentation has been called, to - // match the behavior on the Mac. - if (m_hasRepresentation) - dl->frameLoader()->writer()->setEncoding("", false); - } -} - -void FrameLoaderClientImpl::updateGlobalHistory() -{ -} - -void FrameLoaderClientImpl::updateGlobalHistoryRedirectLinks() -{ -} - -bool FrameLoaderClientImpl::shouldGoToHistoryItem(HistoryItem* item) const -{ - const KURL& url = item->url(); - if (!url.protocolIs(backForwardNavigationScheme)) - return true; - - // Else, we'll punt this history navigation to the embedder. It is - // necessary that we intercept this here, well before the FrameLoader - // has made any state changes for this history traversal. - - bool ok; - int offset = url.lastPathComponent().toIntStrict(&ok); - if (!ok) { - ASSERT_NOT_REACHED(); - return false; - } - - WebViewImpl* webview = m_webFrame->viewImpl(); - if (webview->client()) - webview->client()->navigateBackForwardSoon(offset); - - return false; -} - -void FrameLoaderClientImpl::dispatchDidAddBackForwardItem(HistoryItem*) const -{ -} - -void FrameLoaderClientImpl::dispatchDidRemoveBackForwardItem(HistoryItem*) const -{ -} - -void FrameLoaderClientImpl::dispatchDidChangeBackForwardIndex() const -{ -} - -void FrameLoaderClientImpl::didDisplayInsecureContent() -{ - if (m_webFrame->client()) - m_webFrame->client()->didDisplayInsecureContent(m_webFrame); -} - -void FrameLoaderClientImpl::didRunInsecureContent(SecurityOrigin* origin) -{ - if (m_webFrame->client()) - m_webFrame->client()->didRunInsecureContent(m_webFrame, WebSecurityOrigin(origin)); -} - -ResourceError FrameLoaderClientImpl::blockedError(const ResourceRequest&) -{ - // FIXME - return ResourceError(); -} - -ResourceError FrameLoaderClientImpl::cancelledError(const ResourceRequest& request) -{ - if (!m_webFrame->client()) - return ResourceError(); - - return m_webFrame->client()->cancelledError( - m_webFrame, WrappedResourceRequest(request)); -} - -ResourceError FrameLoaderClientImpl::cannotShowURLError(const ResourceRequest& request) -{ - if (!m_webFrame->client()) - return ResourceError(); - - return m_webFrame->client()->cannotHandleRequestError( - m_webFrame, WrappedResourceRequest(request)); -} - -ResourceError FrameLoaderClientImpl::interruptForPolicyChangeError( - const ResourceRequest& request) -{ - return ResourceError(internalErrorDomain, PolicyChangeError, - request.url().string(), String()); -} - -ResourceError FrameLoaderClientImpl::cannotShowMIMETypeError(const ResourceResponse&) -{ - // FIXME - return ResourceError(); -} - -ResourceError FrameLoaderClientImpl::fileDoesNotExistError(const ResourceResponse&) -{ - // FIXME - return ResourceError(); -} - -ResourceError FrameLoaderClientImpl::pluginWillHandleLoadError(const ResourceResponse&) -{ - // FIXME - return ResourceError(); -} - -bool FrameLoaderClientImpl::shouldFallBack(const ResourceError& error) -{ - // This method is called when we fail to load the URL for an <object> tag - // that has fallback content (child elements) and is being loaded as a frame. - // The error parameter indicates the reason for the load failure. - // We should let the fallback content load only if this wasn't a cancelled - // request. - // Note: The mac version also has a case for "WebKitErrorPluginWillHandleLoad" - ResourceError c = cancelledError(ResourceRequest()); - return error.errorCode() != c.errorCode() || error.domain() != c.domain(); -} - -bool FrameLoaderClientImpl::canHandleRequest(const ResourceRequest& request) const -{ - return m_webFrame->client()->canHandleRequest( - m_webFrame, WrappedResourceRequest(request)); -} - -bool FrameLoaderClientImpl::canShowMIMETypeAsHTML(const String& MIMEType) const -{ - notImplemented(); - return false; -} - -bool FrameLoaderClientImpl::canShowMIMEType(const String& mimeType) const -{ - // This method is called to determine if the media type can be shown - // "internally" (i.e. inside the browser) regardless of whether or not the - // browser or a plugin is doing the rendering. - - // mimeType strings are supposed to be ASCII, but if they are not for some - // reason, then it just means that the mime type will fail all of these "is - // supported" checks and go down the path of an unhandled mime type. - if (webKitClient()->mimeRegistry()->supportsMIMEType(mimeType) == WebMimeRegistry::IsSupported) - return true; - - // If Chrome is started with the --disable-plugins switch, pluginData is null. - PluginData* pluginData = m_webFrame->frame()->page()->pluginData(); - - // See if the type is handled by an installed plugin, if so, we can show it. - // FIXME: (http://b/1085524) This is the place to stick a preference to - // disable full page plugins (optionally for certain types!) - return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mimeType); -} - -bool FrameLoaderClientImpl::representationExistsForURLScheme(const String&) const -{ - // FIXME - return false; -} - -String FrameLoaderClientImpl::generatedMIMETypeForURLScheme(const String& scheme) const -{ - // This appears to generate MIME types for protocol handlers that are handled - // internally. The only place I can find in the WebKit code that uses this - // function is WebView::registerViewClass, where it is used as part of the - // process by which custom view classes for certain document representations - // are registered. - String mimeType("x-apple-web-kit/"); - mimeType.append(scheme.lower()); - return mimeType; -} - -void FrameLoaderClientImpl::frameLoadCompleted() -{ - // FIXME: the mac port also conditionally calls setDrawsBackground:YES on - // it's ScrollView here. - - // This comment from the Mac port: - // Note: Can be called multiple times. - // Even if already complete, we might have set a previous item on a frame that - // didn't do any data loading on the past transaction. Make sure to clear these out. - - // FIXME: setPreviousHistoryItem() no longer exists. http://crbug.com/8566 - // m_webFrame->frame()->loader()->setPreviousHistoryItem(0); -} - -void FrameLoaderClientImpl::saveViewStateToItem(HistoryItem*) -{ - // FIXME -} - -void FrameLoaderClientImpl::restoreViewState() -{ - // FIXME: probably scrolls to last position when you go back or forward -} - -void FrameLoaderClientImpl::provisionalLoadStarted() -{ - // FIXME: On mac, this does various caching stuff -} - -void FrameLoaderClientImpl::didFinishLoad() -{ - OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(); - if (observer) - observer->didFinishLoading(); -} - -void FrameLoaderClientImpl::prepareForDataSourceReplacement() -{ - // FIXME -} - -PassRefPtr<DocumentLoader> FrameLoaderClientImpl::createDocumentLoader( - const ResourceRequest& request, - const SubstituteData& data) -{ - RefPtr<WebDataSourceImpl> ds = WebDataSourceImpl::create(request, data); - if (m_webFrame->client()) - m_webFrame->client()->didCreateDataSource(m_webFrame, ds.get()); - return ds.release(); -} - -void FrameLoaderClientImpl::setTitle(const String& title, const KURL& url) -{ - // FIXME: inform consumer of changes to the title. -} - -String FrameLoaderClientImpl::userAgent(const KURL& url) -{ - return webKitClient()->userAgent(url); -} - -void FrameLoaderClientImpl::savePlatformDataToCachedFrame(CachedFrame*) -{ - // The page cache should be disabled. - ASSERT_NOT_REACHED(); -} - -void FrameLoaderClientImpl::transitionToCommittedFromCachedFrame(CachedFrame*) -{ - ASSERT_NOT_REACHED(); -} - -// Called when the FrameLoader goes into a state in which a new page load -// will occur. -void FrameLoaderClientImpl::transitionToCommittedForNewPage() -{ - makeDocumentView(); -} - -void FrameLoaderClientImpl::didSaveToPageCache() -{ -} - -void FrameLoaderClientImpl::didRestoreFromPageCache() -{ -} - -void FrameLoaderClientImpl::dispatchDidBecomeFrameset(bool) -{ -} - -bool FrameLoaderClientImpl::canCachePage() const -{ - // Since we manage the cache, always report this page as non-cacheable to - // FrameLoader. - return false; -} - -// Downloading is handled in the browser process, not WebKit. If we get to this -// point, our download detection code in the ResourceDispatcherHost is broken! -void FrameLoaderClientImpl::download(ResourceHandle* handle, - const ResourceRequest& request, - const ResourceRequest& initialRequest, - const ResourceResponse& response) -{ - ASSERT_NOT_REACHED(); -} - -PassRefPtr<Frame> FrameLoaderClientImpl::createFrame( - const KURL& url, - const String& name, - HTMLFrameOwnerElement* ownerElement, - const String& referrer, - bool allowsScrolling, - int marginWidth, - int marginHeight) -{ - FrameLoadRequest frameRequest(m_webFrame->frame()->document()->securityOrigin(), - ResourceRequest(url, referrer), name); - return m_webFrame->createChildFrame(frameRequest, ownerElement); -} - -void FrameLoaderClientImpl::didTransferChildFrameToNewDocument(Page*) -{ - ASSERT(m_webFrame->frame()->ownerElement()); - - WebFrameImpl* newParent = static_cast<WebFrameImpl*>(m_webFrame->parent()); - if (!newParent || !newParent->client()) - return; - - // Replace the client since the old client may be destroyed when the - // previous page is closed. - m_webFrame->setClient(newParent->client()); -} - -void FrameLoaderClientImpl::transferLoadingResourceFromPage(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request, Page* oldPage) -{ - assignIdentifierToInitialRequest(identifier, loader, request); - - WebFrameImpl* oldWebFrame = WebFrameImpl::fromFrame(oldPage->mainFrame()); - if (oldWebFrame && oldWebFrame->client()) - oldWebFrame->client()->removeIdentifierForRequest(identifier); -} - -PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin( - const IntSize& size, // FIXME: how do we use this? - HTMLPlugInElement* element, - const KURL& url, - const Vector<String>& paramNames, - const Vector<String>& paramValues, - const String& mimeType, - bool loadManually) -{ - if (!m_webFrame->client()) - return 0; - - WebPluginParams params; - params.url = url; - params.mimeType = mimeType; - params.attributeNames = paramNames; - params.attributeValues = paramValues; - params.loadManually = loadManually; - - WebPlugin* webPlugin = m_webFrame->client()->createPlugin(m_webFrame, params); - if (!webPlugin) - return 0; - - // The container takes ownership of the WebPlugin. - RefPtr<WebPluginContainerImpl> container = - WebPluginContainerImpl::create(element, webPlugin); - - if (!webPlugin->initialize(container.get())) - return 0; - - // The element might have been removed during plugin initialization! - if (!element->renderer()) - return 0; - - return container; -} - -// This method gets called when a plugin is put in place of html content -// (e.g., acrobat reader). -void FrameLoaderClientImpl::redirectDataToPlugin(Widget* pluginWidget) -{ - if (pluginWidget->isPluginContainer()) - m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget); - ASSERT(m_pluginWidget.get()); -} - -PassRefPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( - const IntSize& size, - HTMLAppletElement* element, - const KURL& /* baseURL */, - const Vector<String>& paramNames, - const Vector<String>& paramValues) -{ - return createPlugin(size, element, KURL(), paramNames, paramValues, - "application/x-java-applet", false); -} - -ObjectContentType FrameLoaderClientImpl::objectContentType( - const KURL& url, - const String& explicitMimeType) -{ - // This code is based on Apple's implementation from - // WebCoreSupport/WebFrameBridge.mm. - - String mimeType = explicitMimeType; - if (mimeType.isEmpty()) { - // Try to guess the MIME type based off the extension. - String filename = url.lastPathComponent(); - int extensionPos = filename.reverseFind('.'); - if (extensionPos >= 0) { - String extension = filename.substring(extensionPos + 1); - mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension); - if (mimeType.isEmpty()) { - // If there's no mimetype registered for the extension, check to see - // if a plugin can handle the extension. - mimeType = getPluginMimeTypeFromExtension(extension); - } - } - - if (mimeType.isEmpty()) - return ObjectContentFrame; - } - - if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType)) - return ObjectContentImage; - - // If Chrome is started with the --disable-plugins switch, pluginData is 0. - PluginData* pluginData = m_webFrame->frame()->page()->pluginData(); - if (pluginData && pluginData->supportsMimeType(mimeType)) - return ObjectContentNetscapePlugin; - - if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) - return ObjectContentFrame; - - return ObjectContentNone; -} - -String FrameLoaderClientImpl::overrideMediaType() const -{ - // FIXME - return String(); -} - -bool FrameLoaderClientImpl::actionSpecifiesNavigationPolicy( - const NavigationAction& action, - WebNavigationPolicy* policy) -{ - const MouseEvent* event = 0; - if (action.type() == NavigationTypeLinkClicked - && action.event()->isMouseEvent()) - event = static_cast<const MouseEvent*>(action.event()); - else if (action.type() == NavigationTypeFormSubmitted - && action.event() - && action.event()->underlyingEvent() - && action.event()->underlyingEvent()->isMouseEvent()) - event = static_cast<const MouseEvent*>(action.event()->underlyingEvent()); - - if (!event) - return false; - - return WebViewImpl::navigationPolicyFromMouseEvent( - event->button(), event->ctrlKey(), event->shiftKey(), event->altKey(), - event->metaKey(), policy); -} - -PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver() -{ - WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( - m_webFrame->frame()->loader()->activeDocumentLoader()); - if (!ds) { - // We can arrive here if a popstate event handler detaches this frame. - // FIXME: Remove this code once http://webkit.org/b/36202 is fixed. - ASSERT(!m_webFrame->frame()->page()); - return 0; - } - return ds->releasePluginLoadObserver(); -} - -PassRefPtr<FrameNetworkingContext> FrameLoaderClientImpl::createNetworkingContext() -{ - return FrameNetworkingContextImpl::create(m_webFrame->frame()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h deleted file mode 100644 index 1d7a741..0000000 --- a/WebKit/chromium/src/FrameLoaderClientImpl.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef FrameLoaderClientImpl_h -#define FrameLoaderClientImpl_h - -#include "FrameLoaderClient.h" -#include "KURL.h" -#include "WebNavigationPolicy.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/RefPtr.h> - -namespace WebKit { - -class WebFrameImpl; -class WebPluginContainerImpl; -class WebPluginLoadObserver; - -class FrameLoaderClientImpl : public WebCore::FrameLoaderClient { -public: - FrameLoaderClientImpl(WebFrameImpl* webFrame); - ~FrameLoaderClientImpl(); - - WebFrameImpl* webFrame() const { return m_webFrame; } - - // WebCore::FrameLoaderClient ---------------------------------------------- - - virtual void frameLoaderDestroyed(); - - // Notifies the WebView delegate that the JS window object has been cleared, - // giving it a chance to bind native objects to the window before script - // parsing begins. - virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*); - virtual void documentElementAvailable(); - - // A frame's V8 context was created or destroyed. - virtual void didCreateScriptContextForFrame(); - virtual void didDestroyScriptContextForFrame(); - - // A context untied to a frame was created (through evaluateInIsolatedWorld). - // This context is not tied to the lifetime of its frame, and is destroyed - // in garbage collection. - virtual void didCreateIsolatedScriptContext(); - - // Returns true if we should allow the given V8 extension to be added to - // the script context at the currently loading page and given extension group. - virtual bool allowScriptExtension(const String& extensionName, int extensionGroup); - - virtual bool hasWebView() const; - virtual bool hasFrameView() const; - virtual void makeRepresentation(WebCore::DocumentLoader*); - virtual void forceLayout(); - virtual void forceLayoutForNonHTML(); - virtual void setCopiesOnScroll(); - virtual void detachedFromParent2(); - virtual void detachedFromParent3(); - virtual void assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&); - virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse); - virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier); - virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); - virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); - virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); - virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); - virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); - virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); - virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, int length); - virtual void dispatchDidHandleOnloadEvents(); - virtual void dispatchDidReceiveServerRedirectForProvisionalLoad(); - virtual void dispatchDidCancelClientRedirect(); - virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate); - virtual void dispatchDidNavigateWithinPage(); - virtual void dispatchDidChangeLocationWithinPage(); - virtual void dispatchDidPushStateWithinPage(); - virtual void dispatchDidReplaceStateWithinPage(); - virtual void dispatchDidPopStateWithinPage(); - virtual void dispatchWillClose(); - virtual void dispatchDidReceiveIcon(); - virtual void dispatchDidStartProvisionalLoad(); - virtual void dispatchDidReceiveTitle(const WTF::String& title); - virtual void dispatchDidChangeIcons(); - virtual void dispatchDidCommitLoad(); - virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&); - virtual void dispatchDidFailLoad(const WebCore::ResourceError&); - virtual void dispatchDidFinishDocumentLoad(); - virtual void dispatchDidFinishLoad(); - virtual void dispatchDidFirstLayout(); - virtual void dispatchDidFirstVisuallyNonEmptyLayout(); - virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&); - virtual void dispatchShow(); - virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction function, const WTF::String& mime_type, const WebCore::ResourceRequest&); - virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state, const WTF::String& frame_name); - virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction function, const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, PassRefPtr<WebCore::FormState> form_state); - virtual void cancelPolicyCheck(); - virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&); - virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*); - virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>); - virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*); - virtual void revertToProvisionalState(WebCore::DocumentLoader*); - virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&); - virtual void willChangeEstimatedProgress() { } - virtual void didChangeEstimatedProgress() { } - virtual void postProgressStartedNotification(); - virtual void postProgressEstimateChangedNotification(); - virtual void postProgressFinishedNotification(); - virtual void setMainFrameDocumentReady(bool); - virtual void startDownload(const WebCore::ResourceRequest&); - virtual void willChangeTitle(WebCore::DocumentLoader*); - virtual void didChangeTitle(WebCore::DocumentLoader*); - virtual void committedLoad(WebCore::DocumentLoader*, const char*, int); - virtual void finishedLoading(WebCore::DocumentLoader*); - virtual void updateGlobalHistory(); - virtual void updateGlobalHistoryRedirectLinks(); - virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; - virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; - virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; - virtual void dispatchDidChangeBackForwardIndex() const; - virtual void didDisplayInsecureContent(); - virtual void didRunInsecureContent(WebCore::SecurityOrigin*); - virtual WebCore::ResourceError blockedError(const WebCore::ResourceRequest&); - virtual WebCore::ResourceError cancelledError(const WebCore::ResourceRequest&); - virtual WebCore::ResourceError cannotShowURLError(const WebCore::ResourceRequest&); - virtual WebCore::ResourceError interruptForPolicyChangeError(const WebCore::ResourceRequest&); - virtual WebCore::ResourceError cannotShowMIMETypeError(const WebCore::ResourceResponse&); - virtual WebCore::ResourceError fileDoesNotExistError(const WebCore::ResourceResponse&); - virtual WebCore::ResourceError pluginWillHandleLoadError(const WebCore::ResourceResponse&); - virtual bool shouldFallBack(const WebCore::ResourceError&); - virtual bool canHandleRequest(const WebCore::ResourceRequest&) const; - virtual bool canShowMIMEType(const WTF::String& MIMEType) const; - virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const; - virtual bool representationExistsForURLScheme(const WTF::String& URLScheme) const; - virtual WTF::String generatedMIMETypeForURLScheme(const WTF::String& URLScheme) const; - virtual void frameLoadCompleted(); - virtual void saveViewStateToItem(WebCore::HistoryItem*); - virtual void restoreViewState(); - virtual void provisionalLoadStarted(); - virtual void didFinishLoad(); - virtual void prepareForDataSourceReplacement(); - virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader( - const WebCore::ResourceRequest&, const WebCore::SubstituteData&); - virtual void setTitle(const WTF::String& title, const WebCore::KURL&); - virtual WTF::String userAgent(const WebCore::KURL&); - virtual void savePlatformDataToCachedFrame(WebCore::CachedFrame*); - virtual void transitionToCommittedFromCachedFrame(WebCore::CachedFrame*); - virtual void transitionToCommittedForNewPage(); - virtual void didSaveToPageCache(); - virtual void didRestoreFromPageCache(); - virtual void dispatchDidBecomeFrameset(bool); - virtual bool canCachePage() const; - virtual void download( - WebCore::ResourceHandle*, const WebCore::ResourceRequest&, - const WebCore::ResourceRequest& initialRequest, - const WebCore::ResourceResponse&); - virtual PassRefPtr<WebCore::Frame> createFrame( - const WebCore::KURL& url, const WTF::String& name, - WebCore::HTMLFrameOwnerElement* ownerElement, - const WTF::String& referrer, bool allowsScrolling, - int marginWidth, int marginHeight); - virtual void didTransferChildFrameToNewDocument(WebCore::Page*); - virtual void transferLoadingResourceFromPage(unsigned long, WebCore::DocumentLoader*, const WebCore::ResourceRequest&, WebCore::Page*); - virtual PassRefPtr<WebCore::Widget> createPlugin( - const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, - const Vector<WTF::String>&, const Vector<WTF::String>&, - const WTF::String&, bool loadManually); - virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); - virtual PassRefPtr<WebCore::Widget> createJavaAppletWidget( - const WebCore::IntSize&, - WebCore::HTMLAppletElement*, - const WebCore::KURL& /* base_url */, - const Vector<WTF::String>& paramNames, - const Vector<WTF::String>& paramValues); - virtual WebCore::ObjectContentType objectContentType( - const WebCore::KURL& url, const WTF::String& mimeType); - virtual WTF::String overrideMediaType() const; - virtual void didPerformFirstNavigation() const; - virtual void registerForIconNotification(bool listen = true); - virtual void didChangeScrollOffset(); - virtual bool allowJavaScript(bool enabledPerSettings); - virtual bool allowPlugins(bool enabledPerSettings); - virtual bool allowImages(bool enabledPerSettings); - virtual void didNotAllowScript(); - virtual void didNotAllowPlugins(); - - virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext(); - -private: - void makeDocumentView(); - - // Given a NavigationAction, determine the associated WebNavigationPolicy. - // For example, a middle click means "open in background tab". - static bool actionSpecifiesNavigationPolicy( - const WebCore::NavigationAction& action, WebNavigationPolicy* policy); - - PassOwnPtr<WebPluginLoadObserver> pluginLoadObserver(); - - // The WebFrame that owns this object and manages its lifetime. Therefore, - // the web frame object is guaranteed to exist. - WebFrameImpl* m_webFrame; - - // True if makeRepresentation was called. We don't actually have a concept - // of a "representation", but we need to know when we're expected to have one. - // See finishedLoading(). - bool m_hasRepresentation; - - // Used to help track client redirects. When a provisional load starts, it - // has no redirects in its chain. But in the case of client redirects, we want - // to add that initial load as a redirect. When we get a new provisional load - // and the dest URL matches that load, we know that it was the result of a - // previous client redirect and the source should be added as a redirect. - // Both should be empty if unused. - WebCore::KURL m_expectedClientRedirectSrc; - WebCore::KURL m_expectedClientRedirectDest; - - // Contains a pointer to the plugin widget. - RefPtr<WebPluginContainerImpl> m_pluginWidget; - - // Indicates if we need to send over the initial notification to the plugin - // which specifies that the plugin should be ready to accept data. - bool m_sentInitialResponseToPlugin; - - // The navigation policy to use for the next call to dispatchCreatePage. - WebNavigationPolicy m_nextNavigationPolicy; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/FrameNetworkingContextImpl.h b/WebKit/chromium/src/FrameNetworkingContextImpl.h deleted file mode 100644 index 8670506..0000000 --- a/WebKit/chromium/src/FrameNetworkingContextImpl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef FrameNetworkingContextImpl_h -#define FrameNetworkingContextImpl_h - -#include "FrameNetworkingContext.h" - -namespace WebKit { - -class FrameNetworkingContextImpl : public WebCore::FrameNetworkingContext { -public: - static PassRefPtr<FrameNetworkingContextImpl> create(WebCore::Frame* frame) - { - return adoptRef(new FrameNetworkingContextImpl(frame)); - } - -private: - FrameNetworkingContextImpl(WebCore::Frame* frame) - : WebCore::FrameNetworkingContext(frame) - { - } -}; - -} - -#endif diff --git a/WebKit/chromium/src/GeolocationClientProxy.cpp b/WebKit/chromium/src/GeolocationClientProxy.cpp deleted file mode 100644 index b2536dd..0000000 --- a/WebKit/chromium/src/GeolocationClientProxy.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "GeolocationClientProxy.h" - -#include "Geolocation.h" -#include "GeolocationPosition.h" -#include "WebGeolocationClient.h" -#include "WebGeolocationController.h" -#include "WebGeolocationPermissionRequest.h" -#include "WebGeolocationPosition.h" - -namespace WebKit { - -GeolocationClientProxy::GeolocationClientProxy(WebGeolocationClient* client) - : m_client(client) -{ -} - -GeolocationClientProxy::~GeolocationClientProxy() -{ -} - -void GeolocationClientProxy::setController(WebCore::GeolocationController* controller) -{ - // We support there not being a client, provided we don't do any Geolocation. - if (m_client) { - // Ownership of the WebGeolocationController is transferred to the client. - m_client->setController(new WebGeolocationController(controller)); - } -} - -void GeolocationClientProxy::geolocationDestroyed() -{ - if (m_client) - m_client->geolocationDestroyed(); -} - -void GeolocationClientProxy::startUpdating() -{ - m_client->startUpdating(); -} - -void GeolocationClientProxy::stopUpdating() -{ - m_client->stopUpdating(); -} - -void GeolocationClientProxy::setEnableHighAccuracy(bool highAccuracy) -{ - m_client->setEnableHighAccuracy(highAccuracy); -} - -WebCore::GeolocationPosition* GeolocationClientProxy::lastPosition() -{ - WebGeolocationPosition webPosition; - if (m_client->lastPosition(webPosition)) - m_lastPosition = webPosition; - else - m_lastPosition.clear(); - - return m_lastPosition.get(); -} - -void GeolocationClientProxy::requestPermission(WebCore::Geolocation* geolocation) -{ - m_client->requestPermission(WebGeolocationPermissionRequest(geolocation)); -} - -void GeolocationClientProxy::cancelPermissionRequest(WebCore::Geolocation* geolocation) -{ - m_client->cancelPermissionRequest(WebGeolocationPermissionRequest(geolocation)); -} - -} diff --git a/WebKit/chromium/src/GeolocationClientProxy.h b/WebKit/chromium/src/GeolocationClientProxy.h deleted file mode 100644 index ee175dc..0000000 --- a/WebKit/chromium/src/GeolocationClientProxy.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef GeolocationClientProxy_h -#define GeolocationClientProxy_h - -#include "GeolocationClient.h" -#include "WebGeolocationController.h" -#include <wtf/RefPtr.h> - -namespace WebCore { -class GeolocationPosition; -} - -namespace WebKit { -class WebGeolocationClient; - -class GeolocationClientProxy : public WebCore::GeolocationClient { -public: - GeolocationClientProxy(WebGeolocationClient* client); - ~GeolocationClientProxy(); - void setController(WebCore::GeolocationController *controller); - virtual void geolocationDestroyed(); - virtual void startUpdating(); - virtual void stopUpdating(); - virtual void setEnableHighAccuracy(bool); - virtual WebCore::GeolocationPosition* lastPosition(); - - virtual void requestPermission(WebCore::Geolocation*); - virtual void cancelPermissionRequest(WebCore::Geolocation*); - -private: - WebGeolocationClient* m_client; - RefPtr<WebCore::GeolocationPosition> m_lastPosition; -}; - -} // namespace WebKit - -#endif // GeolocationClientProxy_h diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp deleted file mode 100644 index 686d01c..0000000 --- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp +++ /dev/null @@ -1,1079 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(3D_CANVAS) - -#include "GraphicsContext3D.h" - -#include "CachedImage.h" -#include "WebGLLayerChromium.h" -#include "CanvasRenderingContext.h" -#include "Chrome.h" -#include "ChromeClientImpl.h" -#include "Extensions3DChromium.h" -#include "GraphicsContext3DInternal.h" -#include "HTMLCanvasElement.h" -#include "HTMLImageElement.h" -#include "ImageBuffer.h" -#include "ImageData.h" -#include "WebGraphicsContext3D.h" -#include "WebGraphicsContext3DDefaultImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebViewImpl.h" - -#include <stdio.h> -#include <wtf/FastMalloc.h> -#include <wtf/text/CString.h> - -#if PLATFORM(CG) -#include "GraphicsContext.h" -#include "WebGLRenderingContext.h" -#include <CoreGraphics/CGContext.h> -#include <CoreGraphics/CGImage.h> -#endif - -// There are two levels of delegation in this file: -// -// 1. GraphicsContext3D delegates to GraphicsContext3DInternal. This is done -// so that we have some place to store data members common among -// implementations; GraphicsContext3D only provides us the m_internal -// pointer. We always delegate to the GraphicsContext3DInternal. While we -// could sidestep it and go directly to the WebGraphicsContext3D in some -// cases, it is better for consistency to always delegate through it. -// -// 2. GraphicsContext3DInternal delegates to an implementation of -// WebGraphicsContext3D. This is done so we have a place to inject an -// implementation which remotes the OpenGL calls across processes. -// -// The legacy, in-process, implementation uses WebGraphicsContext3DDefaultImpl. - -namespace WebCore { - -//---------------------------------------------------------------------- -// GraphicsContext3DInternal - -GraphicsContext3DInternal::GraphicsContext3DInternal() - : m_webViewImpl(0) - , m_initializedAvailableExtensions(false) -#if PLATFORM(SKIA) -#elif PLATFORM(CG) - , m_renderOutput(0) -#else -#error Must port to your platform -#endif -{ -} - -GraphicsContext3DInternal::~GraphicsContext3DInternal() -{ -#if PLATFORM(CG) - if (m_renderOutput) - delete[] m_renderOutput; -#endif -} - -bool GraphicsContext3DInternal::initialize(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, bool renderDirectlyToHostWindow) -{ - WebKit::WebGraphicsContext3D::Attributes webAttributes; - webAttributes.alpha = attrs.alpha; - webAttributes.depth = attrs.depth; - webAttributes.stencil = attrs.stencil; - webAttributes.antialias = attrs.antialias; - webAttributes.premultipliedAlpha = attrs.premultipliedAlpha; - webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss; - WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGraphicsContext3D(); - if (!webContext) - return false; - - Chrome* chrome = static_cast<Chrome*>(hostWindow); - WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(chrome->client()); - - m_webViewImpl = chromeClientImpl->webView(); - - if (!m_webViewImpl) - return false; - if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHostWindow)) { - delete webContext; - return false; - } - m_impl.set(webContext); - -#if USE(ACCELERATED_COMPOSITING) - m_compositingLayer = WebGLLayerChromium::create(0); -#endif - return true; -} - -WebKit::WebGraphicsContext3D* GraphicsContext3DInternal::extractWebGraphicsContext3D(GraphicsContext3D* context) -{ - if (!context) - return 0; - return context->m_internal->m_impl.get(); -} - -PlatformGraphicsContext3D GraphicsContext3DInternal::platformGraphicsContext3D() const -{ - return m_impl.get(); -} - -Platform3DObject GraphicsContext3DInternal::platformTexture() const -{ - return m_impl->getPlatformTextureId(); -} - -void GraphicsContext3DInternal::prepareTexture() -{ - m_impl->prepareTexture(); -} - -#if USE(ACCELERATED_COMPOSITING) -WebGLLayerChromium* GraphicsContext3DInternal::platformLayer() const -{ - return m_compositingLayer.get(); -} -#endif - -void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingContext* context) -{ - HTMLCanvasElement* canvas = context->canvas(); - ImageBuffer* imageBuffer = canvas->buffer(); - unsigned char* pixels = 0; -#if PLATFORM(SKIA) - const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap(); - const SkBitmap* readbackBitmap = 0; - ASSERT(canvasBitmap->config() == SkBitmap::kARGB_8888_Config); - if (canvasBitmap->width() == m_impl->width() && canvasBitmap->height() == m_impl->height()) { - // This is the fastest and most common case. We read back - // directly into the canvas's backing store. - readbackBitmap = canvasBitmap; - m_resizingBitmap.reset(); - } else { - // We need to allocate a temporary bitmap for reading back the - // pixel data. We will then use Skia to rescale this bitmap to - // the size of the canvas's backing store. - if (m_resizingBitmap.width() != m_impl->width() || m_resizingBitmap.height() != m_impl->height()) { - m_resizingBitmap.setConfig(SkBitmap::kARGB_8888_Config, - m_impl->width(), - m_impl->height()); - if (!m_resizingBitmap.allocPixels()) - return; - } - readbackBitmap = &m_resizingBitmap; - } - - // Read back the frame buffer. - SkAutoLockPixels bitmapLock(*readbackBitmap); - pixels = static_cast<unsigned char*>(readbackBitmap->getPixels()); -#elif PLATFORM(CG) - if (m_renderOutput) - pixels = m_renderOutput; -#else -#error Must port to your platform -#endif - - m_impl->readBackFramebuffer(pixels, 4 * m_impl->width() * m_impl->height()); - -#if PLATFORM(SKIA) - if (m_resizingBitmap.readyToDraw()) { - // We need to draw the resizing bitmap into the canvas's backing store. - SkCanvas canvas(*canvasBitmap); - SkRect dst; - dst.set(SkIntToScalar(0), SkIntToScalar(0), canvasBitmap->width(), canvasBitmap->height()); - canvas.drawBitmapRect(m_resizingBitmap, 0, dst); - } -#elif PLATFORM(CG) - if (m_renderOutput && context->is3d()) { - WebGLRenderingContext* webGLContext = static_cast<WebGLRenderingContext*>(context); - webGLContext->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(), canvas->width(), canvas->height(), imageBuffer->context()->platformContext()); - } -#else -#error Must port to your platform -#endif -} - -bool GraphicsContext3DInternal::paintsIntoCanvasBuffer() const -{ - // If the gpu compositor is on then skip the readback and software rendering path. - return !m_webViewImpl->isAcceleratedCompositingActive(); -} - -void GraphicsContext3DInternal::reshape(int width, int height) -{ - if (width == m_impl->width() && height == m_impl->height()) - return; - - m_impl->reshape(width, height); - -#if PLATFORM(CG) - // Need to reallocate the client-side backing store. - // FIXME: make this more efficient. - if (m_renderOutput) { - delete[] m_renderOutput; - m_renderOutput = 0; - } - int rowBytes = width * 4; - m_renderOutput = new unsigned char[height * rowBytes]; -#endif // PLATFORM(CG) -} - -IntSize GraphicsContext3DInternal::getInternalFramebufferSize() -{ - return IntSize(m_impl->width(), m_impl->height()); -} - -bool GraphicsContext3DInternal::isContextLost() -{ - return m_impl->isContextLost(); -} - -// Macros to assist in delegating from GraphicsContext3DInternal to -// WebGraphicsContext3D. - -#define DELEGATE_TO_IMPL(name) \ -void GraphicsContext3DInternal::name() \ -{ \ - m_impl->name(); \ -} - -#define DELEGATE_TO_IMPL_R(name, rt) \ -rt GraphicsContext3DInternal::name() \ -{ \ - return m_impl->name(); \ -} - -#define DELEGATE_TO_IMPL_1(name, t1) \ -void GraphicsContext3DInternal::name(t1 a1) \ -{ \ - m_impl->name(a1); \ -} - -#define DELEGATE_TO_IMPL_1R(name, t1, rt) \ -rt GraphicsContext3DInternal::name(t1 a1) \ -{ \ - return m_impl->name(a1); \ -} - -#define DELEGATE_TO_IMPL_2(name, t1, t2) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2) \ -{ \ - m_impl->name(a1, a2); \ -} - -#define DELEGATE_TO_IMPL_2R(name, t1, t2, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2) \ -{ \ - return m_impl->name(a1, a2); \ -} - -#define DELEGATE_TO_IMPL_3(name, t1, t2, t3) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3) \ -{ \ - m_impl->name(a1, a2, a3); \ -} - -#define DELEGATE_TO_IMPL_3R(name, t1, t2, t3, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3) \ -{ \ - return m_impl->name(a1, a2, a3); \ -} - -#define DELEGATE_TO_IMPL_4(name, t1, t2, t3, t4) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - m_impl->name(a1, a2, a3, a4); \ -} - -#define DELEGATE_TO_IMPL_4R(name, t1, t2, t3, t4, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - return m_impl->name(a1, a2, a3, a4); \ -} - -#define DELEGATE_TO_IMPL_5(name, t1, t2, t3, t4, t5) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - m_impl->name(a1, a2, a3, a4, a5); \ -} - -#define DELEGATE_TO_IMPL_5R(name, t1, t2, t3, t4, t5, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - return m_impl->name(a1, a2, a3, a4, a5); \ -} - -#define DELEGATE_TO_IMPL_6(name, t1, t2, t3, t4, t5, t6) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - m_impl->name(a1, a2, a3, a4, a5, a6); \ -} - -#define DELEGATE_TO_IMPL_6R(name, t1, t2, t3, t4, t5, t6, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - return m_impl->name(a1, a2, a3, a4, a5, a6); \ -} - -#define DELEGATE_TO_IMPL_7(name, t1, t2, t3, t4, t5, t6, t7) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ -{ \ - m_impl->name(a1, a2, a3, a4, a5, a6, a7); \ -} - -#define DELEGATE_TO_IMPL_7R(name, t1, t2, t3, t4, t5, t6, t7, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ -{ \ - return m_impl->name(a1, a2, a3, a4, a5, a6, a7); \ -} - -#define DELEGATE_TO_IMPL_8(name, t1, t2, t3, t4, t5, t6, t7, t8) \ -void GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ -{ \ - m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8); \ -} - -#define DELEGATE_TO_IMPL_9R(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, rt) \ -rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ -{ \ - return m_impl->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ -} - -DELEGATE_TO_IMPL_R(makeContextCurrent, bool) -DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int) - -bool GraphicsContext3DInternal::isGLES2Compliant() const -{ - return m_impl->isGLES2Compliant(); -} - -DELEGATE_TO_IMPL_1(activeTexture, GC3Denum) -DELEGATE_TO_IMPL_2(attachShader, Platform3DObject, Platform3DObject) - -void GraphicsContext3DInternal::bindAttribLocation(Platform3DObject program, GC3Duint index, const String& name) -{ - m_impl->bindAttribLocation(program, index, name.utf8().data()); -} - -DELEGATE_TO_IMPL_2(bindBuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_2(bindFramebuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_2(bindRenderbuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_2(bindTexture, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_4(blendColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_IMPL_1(blendEquation, GC3Denum) -DELEGATE_TO_IMPL_2(blendEquationSeparate, GC3Denum, GC3Denum) -DELEGATE_TO_IMPL_2(blendFunc, GC3Denum, GC3Denum) -DELEGATE_TO_IMPL_4(blendFuncSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum) - -void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, GC3Denum usage) -{ - m_impl->bufferData(target, size, 0, usage); -} - -void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage) -{ - m_impl->bufferData(target, size, data, usage); -} - -void GraphicsContext3DInternal::bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr size, const void* data) -{ - m_impl->bufferSubData(target, offset, size, data); -} - -DELEGATE_TO_IMPL_1R(checkFramebufferStatus, GC3Denum, GC3Denum) -DELEGATE_TO_IMPL_1(clear, GC3Dbitfield) -DELEGATE_TO_IMPL_4(clearColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_IMPL_1(clearDepth, GC3Dclampf) -DELEGATE_TO_IMPL_1(clearStencil, GC3Dint) -DELEGATE_TO_IMPL_4(colorMask, GC3Dboolean, GC3Dboolean, GC3Dboolean, GC3Dboolean) -DELEGATE_TO_IMPL_1(compileShader, Platform3DObject) - -DELEGATE_TO_IMPL_8(copyTexImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Dint) -DELEGATE_TO_IMPL_8(copyTexSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) -DELEGATE_TO_IMPL_1(cullFace, GC3Denum) -DELEGATE_TO_IMPL_1(depthFunc, GC3Denum) -DELEGATE_TO_IMPL_1(depthMask, GC3Dboolean) -DELEGATE_TO_IMPL_2(depthRange, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_IMPL_2(detachShader, Platform3DObject, Platform3DObject) -DELEGATE_TO_IMPL_1(disable, GC3Denum) -DELEGATE_TO_IMPL_1(disableVertexAttribArray, GC3Duint) -DELEGATE_TO_IMPL_3(drawArrays, GC3Denum, GC3Dint, GC3Dsizei) -DELEGATE_TO_IMPL_4(drawElements, GC3Denum, GC3Dsizei, GC3Denum, GC3Dsizeiptr) - -DELEGATE_TO_IMPL_1(enable, GC3Denum) -DELEGATE_TO_IMPL_1(enableVertexAttribArray, GC3Duint) -DELEGATE_TO_IMPL(finish) -DELEGATE_TO_IMPL(flush) -DELEGATE_TO_IMPL_4(framebufferRenderbuffer, GC3Denum, GC3Denum, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_5(framebufferTexture2D, GC3Denum, GC3Denum, GC3Denum, Platform3DObject, GC3Dint) -DELEGATE_TO_IMPL_1(frontFace, GC3Denum) -DELEGATE_TO_IMPL_1(generateMipmap, GC3Denum) - -bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, GC3Duint index, ActiveInfo& info) -{ - WebKit::WebGraphicsContext3D::ActiveInfo webInfo; - if (!m_impl->getActiveAttrib(program, index, webInfo)) - return false; - info.name = webInfo.name; - info.type = webInfo.type; - info.size = webInfo.size; - return true; -} - -bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, GC3Duint index, ActiveInfo& info) -{ - WebKit::WebGraphicsContext3D::ActiveInfo webInfo; - if (!m_impl->getActiveUniform(program, index, webInfo)) - return false; - info.name = webInfo.name; - info.type = webInfo.type; - info.size = webInfo.size; - return true; -} - -DELEGATE_TO_IMPL_4(getAttachedShaders, Platform3DObject, GC3Dsizei, GC3Dsizei*, Platform3DObject*) - -GC3Dint GraphicsContext3DInternal::getAttribLocation(Platform3DObject program, const String& name) -{ - return m_impl->getAttribLocation(program, name.utf8().data()); -} - -DELEGATE_TO_IMPL_2(getBooleanv, GC3Denum, GC3Dboolean*) - -DELEGATE_TO_IMPL_3(getBufferParameteriv, GC3Denum, GC3Denum, GC3Dint*) - -GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes() -{ - WebKit::WebGraphicsContext3D::Attributes webAttributes = m_impl->getContextAttributes(); - GraphicsContext3D::Attributes attributes; - attributes.alpha = webAttributes.alpha; - attributes.depth = webAttributes.depth; - attributes.stencil = webAttributes.stencil; - attributes.antialias = webAttributes.antialias; - attributes.premultipliedAlpha = webAttributes.premultipliedAlpha; - return attributes; -} - -DELEGATE_TO_IMPL_R(getError, GC3Denum) - -DELEGATE_TO_IMPL_2(getFloatv, GC3Denum, GC3Dfloat*) - -DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, GC3Denum, GC3Denum, GC3Denum, GC3Dint*) - -DELEGATE_TO_IMPL_2(getIntegerv, GC3Denum, GC3Dint*) - -DELEGATE_TO_IMPL_3(getProgramiv, Platform3DObject, GC3Denum, GC3Dint*) - -String GraphicsContext3DInternal::getProgramInfoLog(Platform3DObject program) -{ - return m_impl->getProgramInfoLog(program); -} - -DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*) - -DELEGATE_TO_IMPL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*) - -String GraphicsContext3DInternal::getShaderInfoLog(Platform3DObject shader) -{ - return m_impl->getShaderInfoLog(shader); -} - -String GraphicsContext3DInternal::getShaderSource(Platform3DObject shader) -{ - return m_impl->getShaderSource(shader); -} - -String GraphicsContext3DInternal::getString(GC3Denum name) -{ - return m_impl->getString(name); -} - -DELEGATE_TO_IMPL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*) -DELEGATE_TO_IMPL_3(getTexParameteriv, GC3Denum, GC3Denum, GC3Dint*) - -DELEGATE_TO_IMPL_3(getUniformfv, Platform3DObject, GC3Dint, GC3Dfloat*) -DELEGATE_TO_IMPL_3(getUniformiv, Platform3DObject, GC3Dint, GC3Dint*) - -GC3Dint GraphicsContext3DInternal::getUniformLocation(Platform3DObject program, const String& name) -{ - return m_impl->getUniformLocation(program, name.utf8().data()); -} - -DELEGATE_TO_IMPL_3(getVertexAttribfv, GC3Duint, GC3Denum, GC3Dfloat*) -DELEGATE_TO_IMPL_3(getVertexAttribiv, GC3Duint, GC3Denum, GC3Dint*) - -DELEGATE_TO_IMPL_2R(getVertexAttribOffset, GC3Duint, GC3Denum, GC3Dsizeiptr) - -DELEGATE_TO_IMPL_2(hint, GC3Denum, GC3Denum) -DELEGATE_TO_IMPL_1R(isBuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isEnabled, GC3Denum, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isFramebuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isProgram, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isRenderbuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isShader, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1R(isTexture, Platform3DObject, GC3Dboolean) -DELEGATE_TO_IMPL_1(lineWidth, GC3Dfloat) -DELEGATE_TO_IMPL_1(linkProgram, Platform3DObject) -DELEGATE_TO_IMPL_2(pixelStorei, GC3Denum, GC3Dint) -DELEGATE_TO_IMPL_2(polygonOffset, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_IMPL_7(readPixels, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, void*) -DELEGATE_TO_IMPL(releaseShaderCompiler) -DELEGATE_TO_IMPL_4(renderbufferStorage, GC3Denum, GC3Denum, GC3Dsizei, GC3Dsizei) -DELEGATE_TO_IMPL_2(sampleCoverage, GC3Dclampf, GC3Dboolean) -DELEGATE_TO_IMPL_4(scissor, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) - -void GraphicsContext3DInternal::shaderSource(Platform3DObject shader, const String& string) -{ - m_impl->shaderSource(shader, string.utf8().data()); -} - -DELEGATE_TO_IMPL_3(stencilFunc, GC3Denum, GC3Dint, GC3Duint) -DELEGATE_TO_IMPL_4(stencilFuncSeparate, GC3Denum, GC3Denum, GC3Dint, GC3Duint) -DELEGATE_TO_IMPL_1(stencilMask, GC3Duint) -DELEGATE_TO_IMPL_2(stencilMaskSeparate, GC3Denum, GC3Duint) -DELEGATE_TO_IMPL_3(stencilOp, GC3Denum, GC3Denum, GC3Denum) -DELEGATE_TO_IMPL_4(stencilOpSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum) - -bool GraphicsContext3DInternal::texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels) -{ - m_impl->texImage2D(target, level, internalformat, width, height, border, format, type, pixels); - return true; -} - -DELEGATE_TO_IMPL_3(texParameterf, GC3Denum, GC3Denum, GC3Dfloat) -DELEGATE_TO_IMPL_3(texParameteri, GC3Denum, GC3Denum, GC3Dint) - -void GraphicsContext3DInternal::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels) -{ - m_impl->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -DELEGATE_TO_IMPL_2(uniform1f, GC3Dint, GC3Dfloat) - -void GraphicsContext3DInternal::uniform1fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size) -{ - m_impl->uniform1fv(location, size, v); -} - -DELEGATE_TO_IMPL_2(uniform1i, GC3Dint, GC3Dint) - -void GraphicsContext3DInternal::uniform1iv(GC3Dint location, GC3Dint* v, GC3Dsizei size) -{ - m_impl->uniform1iv(location, size, v); -} - -DELEGATE_TO_IMPL_3(uniform2f, GC3Dint, GC3Dfloat, GC3Dfloat) - -void GraphicsContext3DInternal::uniform2fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size) -{ - m_impl->uniform2fv(location, size, v); -} - -DELEGATE_TO_IMPL_3(uniform2i, GC3Dint, GC3Dint, GC3Dint) - -void GraphicsContext3DInternal::uniform2iv(GC3Dint location, GC3Dint* v, GC3Dsizei size) -{ - m_impl->uniform2iv(location, size, v); -} - -DELEGATE_TO_IMPL_4(uniform3f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat) - -void GraphicsContext3DInternal::uniform3fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size) -{ - m_impl->uniform3fv(location, size, v); -} - -DELEGATE_TO_IMPL_4(uniform3i, GC3Dint, GC3Dint, GC3Dint, GC3Dint) - -void GraphicsContext3DInternal::uniform3iv(GC3Dint location, GC3Dint* v, GC3Dsizei size) -{ - m_impl->uniform3iv(location, size, v); -} - -DELEGATE_TO_IMPL_5(uniform4f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat) - -void GraphicsContext3DInternal::uniform4fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size) -{ - m_impl->uniform4fv(location, size, v); -} - -DELEGATE_TO_IMPL_5(uniform4i, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint) - -void GraphicsContext3DInternal::uniform4iv(GC3Dint location, GC3Dint* v, GC3Dsizei size) -{ - m_impl->uniform4iv(location, size, v); -} - -void GraphicsContext3DInternal::uniformMatrix2fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size) -{ - m_impl->uniformMatrix2fv(location, size, transpose, value); -} - -void GraphicsContext3DInternal::uniformMatrix3fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size) -{ - m_impl->uniformMatrix3fv(location, size, transpose, value); -} - -void GraphicsContext3DInternal::uniformMatrix4fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size) -{ - m_impl->uniformMatrix4fv(location, size, transpose, value); -} - -DELEGATE_TO_IMPL_1(useProgram, Platform3DObject) -DELEGATE_TO_IMPL_1(validateProgram, Platform3DObject) - -DELEGATE_TO_IMPL_2(vertexAttrib1f, GC3Duint, GC3Dfloat) -DELEGATE_TO_IMPL_2(vertexAttrib1fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_IMPL_3(vertexAttrib2f, GC3Duint, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_IMPL_2(vertexAttrib2fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_IMPL_4(vertexAttrib3f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_IMPL_2(vertexAttrib3fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_IMPL_5(vertexAttrib4f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_IMPL_2(vertexAttrib4fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_IMPL_6(vertexAttribPointer, GC3Duint, GC3Dint, GC3Denum, GC3Dboolean, GC3Dsizei, GC3Dsizeiptr) - -DELEGATE_TO_IMPL_4(viewport, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) - -DELEGATE_TO_IMPL_R(createBuffer, Platform3DObject) -DELEGATE_TO_IMPL_R(createFramebuffer, Platform3DObject) -DELEGATE_TO_IMPL_R(createProgram, Platform3DObject) -DELEGATE_TO_IMPL_R(createRenderbuffer, Platform3DObject) -DELEGATE_TO_IMPL_1R(createShader, GC3Denum, Platform3DObject) -DELEGATE_TO_IMPL_R(createTexture, Platform3DObject) - -DELEGATE_TO_IMPL_1(deleteBuffer, Platform3DObject) -DELEGATE_TO_IMPL_1(deleteFramebuffer, Platform3DObject) -DELEGATE_TO_IMPL_1(deleteProgram, Platform3DObject) -DELEGATE_TO_IMPL_1(deleteRenderbuffer, Platform3DObject) -DELEGATE_TO_IMPL_1(deleteShader, Platform3DObject) -DELEGATE_TO_IMPL_1(deleteTexture, Platform3DObject) - -DELEGATE_TO_IMPL_1(synthesizeGLError, GC3Denum) - -Extensions3D* GraphicsContext3DInternal::getExtensions() -{ - if (!m_extensions) - m_extensions = adoptPtr(new Extensions3DChromium(this)); - return m_extensions.get(); -} - -namespace { - -void splitStringHelper(const String& str, HashSet<String>& set) -{ - Vector<String> substrings; - str.split(" ", substrings); - for (size_t i = 0; i < substrings.size(); ++i) - set.add(substrings[i]); -} - -} // anonymous namespace - -void GraphicsContext3DInternal::initializeExtensions() -{ - if (!m_initializedAvailableExtensions) { - String extensionsString = getString(GraphicsContext3D::EXTENSIONS); - splitStringHelper(extensionsString, m_enabledExtensions); - - String requestableExtensionsString = m_impl->getRequestableExtensionsCHROMIUM(); - splitStringHelper(requestableExtensionsString, m_requestableExtensions); - - m_initializedAvailableExtensions = true; - } -} - - -bool GraphicsContext3DInternal::supportsExtension(const String& name) -{ - initializeExtensions(); - return m_enabledExtensions.contains(name) || m_requestableExtensions.contains(name); -} - -bool GraphicsContext3DInternal::ensureExtensionEnabled(const String& name) -{ - initializeExtensions(); - - if (m_enabledExtensions.contains(name)) - return true; - - if (m_requestableExtensions.contains(name)) { - m_impl->requestExtensionCHROMIUM(name.ascii().data()); - m_enabledExtensions.clear(); - m_requestableExtensions.clear(); - m_initializedAvailableExtensions = false; - } - - initializeExtensions(); - return m_enabledExtensions.contains(name); -} - -DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*) -DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*) -DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, GC3Denum, void*) -DELEGATE_TO_IMPL_1(unmapTexSubImage2DCHROMIUM, const void*) -DELEGATE_TO_IMPL_2(copyTextureToParentTextureCHROMIUM, Platform3DObject, Platform3DObject) - -//---------------------------------------------------------------------- -// GraphicsContext3D -// - -// Macros to assist in delegating from GraphicsContext3D to -// GraphicsContext3DInternal. - -#define DELEGATE_TO_INTERNAL(name) \ -void GraphicsContext3D::name() \ -{ \ - m_internal->name(); \ -} - -#define DELEGATE_TO_INTERNAL_R(name, rt) \ -rt GraphicsContext3D::name() \ -{ \ - return m_internal->name(); \ -} - -#define DELEGATE_TO_INTERNAL_1(name, t1) \ -void GraphicsContext3D::name(t1 a1) \ -{ \ - m_internal->name(a1); \ -} - -#define DELEGATE_TO_INTERNAL_1R(name, t1, rt) \ -rt GraphicsContext3D::name(t1 a1) \ -{ \ - return m_internal->name(a1); \ -} - -#define DELEGATE_TO_INTERNAL_2(name, t1, t2) \ -void GraphicsContext3D::name(t1 a1, t2 a2) \ -{ \ - m_internal->name(a1, a2); \ -} - -#define DELEGATE_TO_INTERNAL_2R(name, t1, t2, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2) \ -{ \ - return m_internal->name(a1, a2); \ -} - -#define DELEGATE_TO_INTERNAL_3(name, t1, t2, t3) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ -{ \ - m_internal->name(a1, a2, a3); \ -} - -#define DELEGATE_TO_INTERNAL_3R(name, t1, t2, t3, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3) \ -{ \ - return m_internal->name(a1, a2, a3); \ -} - -#define DELEGATE_TO_INTERNAL_4(name, t1, t2, t3, t4) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - m_internal->name(a1, a2, a3, a4); \ -} - -#define DELEGATE_TO_INTERNAL_4R(name, t1, t2, t3, t4, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - return m_internal->name(a1, a2, a3, a4); \ -} - -#define DELEGATE_TO_INTERNAL_5(name, t1, t2, t3, t4, t5) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - m_internal->name(a1, a2, a3, a4, a5); \ -} - -#define DELEGATE_TO_INTERNAL_6(name, t1, t2, t3, t4, t5, t6) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - m_internal->name(a1, a2, a3, a4, a5, a6); \ -} - -#define DELEGATE_TO_INTERNAL_6R(name, t1, t2, t3, t4, t5, t6, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - return m_internal->name(a1, a2, a3, a4, a5, a6); \ -} - -#define DELEGATE_TO_INTERNAL_7(name, t1, t2, t3, t4, t5, t6, t7) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ -{ \ - m_internal->name(a1, a2, a3, a4, a5, a6, a7); \ -} - -#define DELEGATE_TO_INTERNAL_7R(name, t1, t2, t3, t4, t5, t6, t7, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ -{ \ - return m_internal->name(a1, a2, a3, a4, a5, a6, a7); \ -} - -#define DELEGATE_TO_INTERNAL_8(name, t1, t2, t3, t4, t5, t6, t7, t8) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ -{ \ - m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8); \ -} - -#define DELEGATE_TO_INTERNAL_9(name, t1, t2, t3, t4, t5, t6, t7, t8, t9) \ -void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ -{ \ - m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ -} - -#define DELEGATE_TO_INTERNAL_9R(name, t1, t2, t3, t4, t5, t6, t7, t8, t9, rt) \ -rt GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ -{ \ - return m_internal->name(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ -} - -GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes, HostWindow*, bool) -{ -} - -GraphicsContext3D::~GraphicsContext3D() -{ -} - -PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle) -{ - OwnPtr<GraphicsContext3DInternal> internal = adoptPtr(new GraphicsContext3DInternal()); - if (!internal->initialize(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow)) { - return 0; - } - RefPtr<GraphicsContext3D> result = adoptRef(new GraphicsContext3D(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow)); - result->m_internal = internal.release(); - return result.release(); -} - -PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const -{ - return m_internal->platformGraphicsContext3D(); -} - -Platform3DObject GraphicsContext3D::platformTexture() const -{ - return m_internal->platformTexture(); -} - -void GraphicsContext3D::prepareTexture() -{ - return m_internal->prepareTexture(); -} - -#if USE(ACCELERATED_COMPOSITING) -PlatformLayer* GraphicsContext3D::platformLayer() const -{ - WebGLLayerChromium* canvasLayer = m_internal->platformLayer(); - canvasLayer->setContext(this); - return canvasLayer; -} -#endif - -DELEGATE_TO_INTERNAL(makeContextCurrent) -DELEGATE_TO_INTERNAL_1R(sizeInBytes, GC3Denum, unsigned int) -DELEGATE_TO_INTERNAL_2(reshape, int, int) -DELEGATE_TO_INTERNAL_R(getInternalFramebufferSize, IntSize) - -DELEGATE_TO_INTERNAL_1(activeTexture, GC3Denum) -DELEGATE_TO_INTERNAL_2(attachShader, Platform3DObject, Platform3DObject) -DELEGATE_TO_INTERNAL_3(bindAttribLocation, Platform3DObject, GC3Duint, const String&) - -DELEGATE_TO_INTERNAL_2(bindBuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_2(bindFramebuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_2(bindRenderbuffer, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_2(bindTexture, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_4(blendColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_INTERNAL_1(blendEquation, GC3Denum) -DELEGATE_TO_INTERNAL_2(blendEquationSeparate, GC3Denum, GC3Denum) -DELEGATE_TO_INTERNAL_2(blendFunc, GC3Denum, GC3Denum) -DELEGATE_TO_INTERNAL_4(blendFuncSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum) - -DELEGATE_TO_INTERNAL_3(bufferData, GC3Denum, GC3Dsizeiptr, GC3Denum) -DELEGATE_TO_INTERNAL_4(bufferData, GC3Denum, GC3Dsizeiptr, const void*, GC3Denum) -DELEGATE_TO_INTERNAL_4(bufferSubData, GC3Denum, GC3Dintptr, GC3Dsizeiptr, const void*) - -DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, GC3Denum, GC3Denum) -DELEGATE_TO_INTERNAL_1(clear, GC3Dbitfield) -DELEGATE_TO_INTERNAL_4(clearColor, GC3Dclampf, GC3Dclampf, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_INTERNAL_1(clearDepth, GC3Dclampf) -DELEGATE_TO_INTERNAL_1(clearStencil, GC3Dint) -DELEGATE_TO_INTERNAL_4(colorMask, GC3Dboolean, GC3Dboolean, GC3Dboolean, GC3Dboolean) -DELEGATE_TO_INTERNAL_1(compileShader, Platform3DObject) - -DELEGATE_TO_INTERNAL_8(copyTexImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Dint) -DELEGATE_TO_INTERNAL_8(copyTexSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) -DELEGATE_TO_INTERNAL_1(cullFace, GC3Denum) -DELEGATE_TO_INTERNAL_1(depthFunc, GC3Denum) -DELEGATE_TO_INTERNAL_1(depthMask, GC3Dboolean) -DELEGATE_TO_INTERNAL_2(depthRange, GC3Dclampf, GC3Dclampf) -DELEGATE_TO_INTERNAL_2(detachShader, Platform3DObject, Platform3DObject) -DELEGATE_TO_INTERNAL_1(disable, GC3Denum) -DELEGATE_TO_INTERNAL_1(disableVertexAttribArray, GC3Duint) -DELEGATE_TO_INTERNAL_3(drawArrays, GC3Denum, GC3Dint, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(drawElements, GC3Denum, GC3Dsizei, GC3Denum, GC3Dintptr) - -DELEGATE_TO_INTERNAL_1(enable, GC3Denum) -DELEGATE_TO_INTERNAL_1(enableVertexAttribArray, GC3Duint) -DELEGATE_TO_INTERNAL(finish) -DELEGATE_TO_INTERNAL(flush) -DELEGATE_TO_INTERNAL_4(framebufferRenderbuffer, GC3Denum, GC3Denum, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_5(framebufferTexture2D, GC3Denum, GC3Denum, GC3Denum, Platform3DObject, GC3Dint) -DELEGATE_TO_INTERNAL_1(frontFace, GC3Denum) -DELEGATE_TO_INTERNAL_1(generateMipmap, GC3Denum) - -DELEGATE_TO_INTERNAL_3R(getActiveAttrib, Platform3DObject, GC3Duint, ActiveInfo&, bool) -DELEGATE_TO_INTERNAL_3R(getActiveUniform, Platform3DObject, GC3Duint, ActiveInfo&, bool) -DELEGATE_TO_INTERNAL_4(getAttachedShaders, Platform3DObject, GC3Dsizei, GC3Dsizei*, Platform3DObject*) -DELEGATE_TO_INTERNAL_2R(getAttribLocation, Platform3DObject, const String&, GC3Dint) -DELEGATE_TO_INTERNAL_2(getBooleanv, GC3Denum, GC3Dboolean*) -DELEGATE_TO_INTERNAL_3(getBufferParameteriv, GC3Denum, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_R(getContextAttributes, GraphicsContext3D::Attributes) -DELEGATE_TO_INTERNAL_R(getError, GC3Denum) -DELEGATE_TO_INTERNAL_2(getFloatv, GC3Denum, GC3Dfloat*) -DELEGATE_TO_INTERNAL_4(getFramebufferAttachmentParameteriv, GC3Denum, GC3Denum, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_2(getIntegerv, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_3(getProgramiv, Platform3DObject, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_1R(getProgramInfoLog, Platform3DObject, String) -DELEGATE_TO_INTERNAL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_1R(getShaderInfoLog, Platform3DObject, String) -DELEGATE_TO_INTERNAL_1R(getShaderSource, Platform3DObject, String) -DELEGATE_TO_INTERNAL_1R(getString, GC3Denum, String) -DELEGATE_TO_INTERNAL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*) -DELEGATE_TO_INTERNAL_3(getTexParameteriv, GC3Denum, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_3(getUniformfv, Platform3DObject, GC3Dint, GC3Dfloat*) -DELEGATE_TO_INTERNAL_3(getUniformiv, Platform3DObject, GC3Dint, GC3Dint*) -DELEGATE_TO_INTERNAL_2R(getUniformLocation, Platform3DObject, const String&, GC3Dint) -DELEGATE_TO_INTERNAL_3(getVertexAttribfv, GC3Duint, GC3Denum, GC3Dfloat*) -DELEGATE_TO_INTERNAL_3(getVertexAttribiv, GC3Duint, GC3Denum, GC3Dint*) -DELEGATE_TO_INTERNAL_2R(getVertexAttribOffset, GC3Duint, GC3Denum, GC3Dsizeiptr) - -DELEGATE_TO_INTERNAL_2(hint, GC3Denum, GC3Denum) -DELEGATE_TO_INTERNAL_1R(isBuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isEnabled, GC3Denum, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isFramebuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isProgram, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isRenderbuffer, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isShader, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1R(isTexture, Platform3DObject, GC3Dboolean) -DELEGATE_TO_INTERNAL_1(lineWidth, GC3Dfloat) -DELEGATE_TO_INTERNAL_1(linkProgram, Platform3DObject) -DELEGATE_TO_INTERNAL_2(pixelStorei, GC3Denum, GC3Dint) -DELEGATE_TO_INTERNAL_2(polygonOffset, GC3Dfloat, GC3Dfloat) - -DELEGATE_TO_INTERNAL_7(readPixels, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, void*) - -DELEGATE_TO_INTERNAL(releaseShaderCompiler) -DELEGATE_TO_INTERNAL_4(renderbufferStorage, GC3Denum, GC3Denum, GC3Dsizei, GC3Dsizei) -DELEGATE_TO_INTERNAL_2(sampleCoverage, GC3Dclampf, GC3Dboolean) -DELEGATE_TO_INTERNAL_4(scissor, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) -DELEGATE_TO_INTERNAL_2(shaderSource, Platform3DObject, const String&) -DELEGATE_TO_INTERNAL_3(stencilFunc, GC3Denum, GC3Dint, GC3Duint) -DELEGATE_TO_INTERNAL_4(stencilFuncSeparate, GC3Denum, GC3Denum, GC3Dint, GC3Duint) -DELEGATE_TO_INTERNAL_1(stencilMask, GC3Duint) -DELEGATE_TO_INTERNAL_2(stencilMaskSeparate, GC3Denum, GC3Duint) -DELEGATE_TO_INTERNAL_3(stencilOp, GC3Denum, GC3Denum, GC3Denum) -DELEGATE_TO_INTERNAL_4(stencilOpSeparate, GC3Denum, GC3Denum, GC3Denum, GC3Denum) - -DELEGATE_TO_INTERNAL_9R(texImage2D, GC3Denum, GC3Dint, GC3Denum, GC3Dsizei, GC3Dsizei, GC3Dint, GC3Denum, GC3Denum, const void*, bool) -DELEGATE_TO_INTERNAL_3(texParameterf, GC3Denum, GC3Denum, GC3Dfloat) -DELEGATE_TO_INTERNAL_3(texParameteri, GC3Denum, GC3Denum, GC3Dint) -DELEGATE_TO_INTERNAL_9(texSubImage2D, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, const void*) - -DELEGATE_TO_INTERNAL_2(uniform1f, GC3Dint, GC3Dfloat) -DELEGATE_TO_INTERNAL_3(uniform1fv, GC3Dint, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_2(uniform1i, GC3Dint, GC3Dint) -DELEGATE_TO_INTERNAL_3(uniform1iv, GC3Dint, GC3Dint*, GC3Dsizei) -DELEGATE_TO_INTERNAL_3(uniform2f, GC3Dint, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_3(uniform2fv, GC3Dint, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_3(uniform2i, GC3Dint, GC3Dint, GC3Dint) -DELEGATE_TO_INTERNAL_3(uniform2iv, GC3Dint, GC3Dint*, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(uniform3f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_3(uniform3fv, GC3Dint, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(uniform3i, GC3Dint, GC3Dint, GC3Dint, GC3Dint) -DELEGATE_TO_INTERNAL_3(uniform3iv, GC3Dint, GC3Dint*, GC3Dsizei) -DELEGATE_TO_INTERNAL_5(uniform4f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_3(uniform4fv, GC3Dint, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_5(uniform4i, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint) -DELEGATE_TO_INTERNAL_3(uniform4iv, GC3Dint, GC3Dint*, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(uniformMatrix2fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(uniformMatrix3fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei) -DELEGATE_TO_INTERNAL_4(uniformMatrix4fv, GC3Dint, GC3Dboolean, GC3Dfloat*, GC3Dsizei) - -DELEGATE_TO_INTERNAL_1(useProgram, Platform3DObject) -DELEGATE_TO_INTERNAL_1(validateProgram, Platform3DObject) - -DELEGATE_TO_INTERNAL_2(vertexAttrib1f, GC3Duint, GC3Dfloat) -DELEGATE_TO_INTERNAL_2(vertexAttrib1fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_INTERNAL_3(vertexAttrib2f, GC3Duint, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_2(vertexAttrib2fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_INTERNAL_4(vertexAttrib3f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_2(vertexAttrib3fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_INTERNAL_5(vertexAttrib4f, GC3Duint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat) -DELEGATE_TO_INTERNAL_2(vertexAttrib4fv, GC3Duint, GC3Dfloat*) -DELEGATE_TO_INTERNAL_6(vertexAttribPointer, GC3Duint, GC3Dint, GC3Denum, GC3Dboolean, GC3Dsizei, GC3Dintptr) - -DELEGATE_TO_INTERNAL_4(viewport, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei) - -DELEGATE_TO_INTERNAL_1(paintRenderingResultsToCanvas, CanvasRenderingContext*) - -bool GraphicsContext3D::paintsIntoCanvasBuffer() const -{ - return m_internal->paintsIntoCanvasBuffer(); -} - -DELEGATE_TO_INTERNAL_R(createBuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_R(createFramebuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_R(createProgram, Platform3DObject) -DELEGATE_TO_INTERNAL_R(createRenderbuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_1R(createShader, GC3Denum, Platform3DObject) -DELEGATE_TO_INTERNAL_R(createTexture, Platform3DObject) - -DELEGATE_TO_INTERNAL_1(deleteBuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_1(deleteFramebuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_1(deleteProgram, Platform3DObject) -DELEGATE_TO_INTERNAL_1(deleteRenderbuffer, Platform3DObject) -DELEGATE_TO_INTERNAL_1(deleteShader, Platform3DObject) -DELEGATE_TO_INTERNAL_1(deleteTexture, Platform3DObject) - -DELEGATE_TO_INTERNAL_1(synthesizeGLError, GC3Denum) -DELEGATE_TO_INTERNAL_R(getExtensions, Extensions3D*) - -bool GraphicsContext3D::isGLES2Compliant() const -{ - return m_internal->isGLES2Compliant(); -} - -} // namespace WebCore - -#endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/GraphicsContext3DInternal.h b/WebKit/chromium/src/GraphicsContext3DInternal.h deleted file mode 100644 index 30a8e57..0000000 --- a/WebKit/chromium/src/GraphicsContext3DInternal.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef GraphicsContext3DInternal_h -#define GraphicsContext3DInternal_h - -#include "GraphicsContext3D.h" -#include <wtf/HashSet.h> -#include <wtf/OwnPtr.h> -#if PLATFORM(SKIA) -#include "SkBitmap.h" -#endif - -namespace WebKit { -class WebGraphicsContext3D; -class WebViewImpl; -} // namespace WebKit - -namespace WebCore { - -class Extensions3DChromium; -#if USE(ACCELERATED_COMPOSITING) -class WebGLLayerChromium; -#endif - -class GraphicsContext3DInternal { -public: - GraphicsContext3DInternal(); - ~GraphicsContext3DInternal(); - - bool initialize(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, bool renderDirectlyToHostWindow); - - // Helper function to provide access to the lower-level WebGraphicsContext3D, - // which is needed for subordinate contexts like WebGL's to share resources - // with the compositor's context. - static WebKit::WebGraphicsContext3D* extractWebGraphicsContext3D(GraphicsContext3D* context); - - PlatformGraphicsContext3D platformGraphicsContext3D() const; - Platform3DObject platformTexture() const; - - bool makeContextCurrent(); - - unsigned int sizeInBytes(GC3Denum type); - - void reshape(int width, int height); - IntSize getInternalFramebufferSize(); - - void paintRenderingResultsToCanvas(CanvasRenderingContext*); - bool paintsIntoCanvasBuffer() const; - - void prepareTexture(); - -#if USE(ACCELERATED_COMPOSITING) - WebGLLayerChromium* platformLayer() const; -#endif - bool isGLES2Compliant() const; - - void releaseShaderCompiler(); - bool isContextLost(); - - //---------------------------------------------------------------------- - // Entry points for WebGL. - // - void activeTexture(GC3Denum texture); - void attachShader(Platform3DObject program, Platform3DObject shader); - void bindAttribLocation(Platform3DObject, GC3Duint index, const String& name); - void bindBuffer(GC3Denum target, Platform3DObject); - void bindFramebuffer(GC3Denum target, Platform3DObject); - void bindRenderbuffer(GC3Denum target, Platform3DObject); - void bindTexture(GC3Denum target, Platform3DObject); - void blendColor(GC3Dclampf red, GC3Dclampf green, GC3Dclampf blue, GC3Dclampf alpha); - void blendEquation(GC3Denum mode); - void blendEquationSeparate(GC3Denum modeRGB, GC3Denum modeAlpha); - void blendFunc(GC3Denum sfactor, GC3Denum dfactor); - void blendFuncSeparate(GC3Denum srcRGB, GC3Denum dstRGB, GC3Denum srcAlpha, GC3Denum dstAlpha); - - void bufferData(GC3Denum target, GC3Dsizeiptr size, GC3Denum usage); - void bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage); - void bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr size, const void* data); - - GC3Denum checkFramebufferStatus(GC3Denum target); - void clear(GC3Dbitfield mask); - void clearColor(GC3Dclampf red, GC3Dclampf green, GC3Dclampf blue, GC3Dclampf alpha); - void clearDepth(GC3Dclampf depth); - void clearStencil(GC3Dint s); - void colorMask(GC3Dboolean red, GC3Dboolean green, GC3Dboolean blue, GC3Dboolean alpha); - void compileShader(Platform3DObject); - - void copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border); - void copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height); - void cullFace(GC3Denum mode); - void depthFunc(GC3Denum func); - void depthMask(GC3Dboolean flag); - void depthRange(GC3Dclampf zNear, GC3Dclampf zFar); - void detachShader(Platform3DObject, Platform3DObject); - void disable(GC3Denum cap); - void disableVertexAttribArray(GC3Duint index); - void drawArrays(GC3Denum mode, GC3Dint first, GC3Dsizei count); - void drawElements(GC3Denum mode, GC3Dsizei count, GC3Denum type, GC3Dintptr offset); - - void enable(GC3Denum cap); - void enableVertexAttribArray(GC3Duint index); - void finish(); - void flush(); - void framebufferRenderbuffer(GC3Denum target, GC3Denum attachment, GC3Denum renderbuffertarget, Platform3DObject); - void framebufferTexture2D(GC3Denum target, GC3Denum attachment, GC3Denum textarget, Platform3DObject, GC3Dint level); - void frontFace(GC3Denum mode); - void generateMipmap(GC3Denum target); - - bool getActiveAttrib(Platform3DObject program, GC3Duint index, ActiveInfo&); - bool getActiveUniform(Platform3DObject program, GC3Duint index, ActiveInfo&); - void getAttachedShaders(Platform3DObject program, GC3Dsizei maxCount, GC3Dsizei* count, Platform3DObject* shaders); - GC3Dint getAttribLocation(Platform3DObject, const String& name); - void getBooleanv(GC3Denum pname, GC3Dboolean* value); - void getBufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value); - GraphicsContext3D::Attributes getContextAttributes(); - GC3Denum getError(); - void getFloatv(GC3Denum pname, GC3Dfloat* value); - void getFramebufferAttachmentParameteriv(GC3Denum target, GC3Denum attachment, GC3Denum pname, GC3Dint* value); - void getIntegerv(GC3Denum pname, GC3Dint* value); - void getProgramiv(Platform3DObject program, GC3Denum pname, GC3Dint* value); - String getProgramInfoLog(Platform3DObject); - void getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value); - void getShaderiv(Platform3DObject, GC3Denum pname, GC3Dint* value); - String getShaderInfoLog(Platform3DObject); - - String getShaderSource(Platform3DObject); - String getString(GC3Denum name); - void getTexParameterfv(GC3Denum target, GC3Denum pname, GC3Dfloat* value); - void getTexParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value); - void getUniformfv(Platform3DObject program, GC3Dint location, GC3Dfloat* value); - void getUniformiv(Platform3DObject program, GC3Dint location, GC3Dint* value); - GC3Dint getUniformLocation(Platform3DObject, const String& name); - void getVertexAttribfv(GC3Duint index, GC3Denum pname, GC3Dfloat* value); - void getVertexAttribiv(GC3Duint index, GC3Denum pname, GC3Dint* value); - GC3Dsizeiptr getVertexAttribOffset(GC3Duint index, GC3Denum pname); - - void hint(GC3Denum target, GC3Denum mode); - GC3Dboolean isBuffer(Platform3DObject); - GC3Dboolean isEnabled(GC3Denum cap); - GC3Dboolean isFramebuffer(Platform3DObject); - GC3Dboolean isProgram(Platform3DObject); - GC3Dboolean isRenderbuffer(Platform3DObject); - GC3Dboolean isShader(Platform3DObject); - GC3Dboolean isTexture(Platform3DObject); - void lineWidth(GC3Dfloat); - void linkProgram(Platform3DObject); - void pixelStorei(GC3Denum pname, GC3Dint param); - void polygonOffset(GC3Dfloat factor, GC3Dfloat units); - - void readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, void* data); - - void renderbufferStorage(GC3Denum target, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height); - void sampleCoverage(GC3Dclampf value, GC3Dboolean invert); - void scissor(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height); - void shaderSource(Platform3DObject, const String& string); - void stencilFunc(GC3Denum func, GC3Dint ref, GC3Duint mask); - void stencilFuncSeparate(GC3Denum face, GC3Denum func, GC3Dint ref, GC3Duint mask); - void stencilMask(GC3Duint mask); - void stencilMaskSeparate(GC3Denum face, GC3Duint mask); - void stencilOp(GC3Denum fail, GC3Denum zfail, GC3Denum zpass); - void stencilOpSeparate(GC3Denum face, GC3Denum fail, GC3Denum zfail, GC3Denum zpass); - - // texImage2D return false on any error rather than using an ExceptionCode. - bool texImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, const void* pixels); - void texParameterf(GC3Denum target, GC3Denum pname, GC3Dfloat param); - void texParameteri(GC3Denum target, GC3Denum pname, GC3Dint param); - void texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, const void* pixels); - - void uniform1f(GC3Dint location, GC3Dfloat x); - void uniform1fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size); - void uniform1i(GC3Dint location, GC3Dint x); - void uniform1iv(GC3Dint location, GC3Dint* v, GC3Dsizei size); - void uniform2f(GC3Dint location, GC3Dfloat x, float y); - void uniform2fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size); - void uniform2i(GC3Dint location, GC3Dint x, GC3Dint y); - void uniform2iv(GC3Dint location, GC3Dint* v, GC3Dsizei size); - void uniform3f(GC3Dint location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z); - void uniform3fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size); - void uniform3i(GC3Dint location, GC3Dint x, GC3Dint y, GC3Dint z); - void uniform3iv(GC3Dint location, GC3Dint* v, GC3Dsizei size); - void uniform4f(GC3Dint location, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w); - void uniform4fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size); - void uniform4i(GC3Dint location, GC3Dint x, GC3Dint y, GC3Dint z, GC3Dint w); - void uniform4iv(GC3Dint location, GC3Dint* v, GC3Dsizei size); - void uniformMatrix2fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size); - void uniformMatrix3fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size); - void uniformMatrix4fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size); - - void useProgram(Platform3DObject); - void validateProgram(Platform3DObject); - - void vertexAttrib1f(GC3Duint index, GC3Dfloat x); - void vertexAttrib1fv(GC3Duint index, GC3Dfloat* values); - void vertexAttrib2f(GC3Duint index, GC3Dfloat x, GC3Dfloat y); - void vertexAttrib2fv(GC3Duint index, GC3Dfloat* values); - void vertexAttrib3f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z); - void vertexAttrib3fv(GC3Duint index, GC3Dfloat* values); - void vertexAttrib4f(GC3Duint index, GC3Dfloat x, GC3Dfloat y, GC3Dfloat z, GC3Dfloat w); - void vertexAttrib4fv(GC3Duint index, GC3Dfloat* values); - void vertexAttribPointer(GC3Duint index, GC3Dint size, GC3Denum type, GC3Dboolean normalized, - GC3Dsizei stride, GC3Dintptr offset); - - void viewport(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height); - - Platform3DObject createBuffer(); - Platform3DObject createFramebuffer(); - Platform3DObject createProgram(); - Platform3DObject createRenderbuffer(); - Platform3DObject createShader(GC3Denum); - Platform3DObject createTexture(); - - void deleteBuffer(Platform3DObject); - void deleteFramebuffer(Platform3DObject); - void deleteProgram(Platform3DObject); - void deleteRenderbuffer(Platform3DObject); - void deleteShader(Platform3DObject); - void deleteTexture(Platform3DObject); - - void synthesizeGLError(GC3Denum error); - - // Extensions3D support. - Extensions3D* getExtensions(); - bool supportsExtension(const String& name); - bool ensureExtensionEnabled(const String& name); - - // EXT_texture_format_BGRA8888 - bool supportsBGRA(); - - // GL_CHROMIUM_map_sub - bool supportsMapSubCHROMIUM(); - void* mapBufferSubDataCHROMIUM(GC3Denum target, GC3Dsizeiptr offset, GC3Dsizei size, GC3Denum access); - void unmapBufferSubDataCHROMIUM(const void*); - void* mapTexSubImage2DCHROMIUM(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, GC3Denum access); - void unmapTexSubImage2DCHROMIUM(const void*); - - // GL_CHROMIUM_copy_texture_to_parent_texture - bool supportsCopyTextureToParentTextureCHROMIUM(); - void copyTextureToParentTextureCHROMIUM(Platform3DObject texture, Platform3DObject parentTexture); - -private: - OwnPtr<WebKit::WebGraphicsContext3D> m_impl; - OwnPtr<Extensions3DChromium> m_extensions; - WebKit::WebViewImpl* m_webViewImpl; - bool m_initializedAvailableExtensions; - HashSet<String> m_enabledExtensions; - HashSet<String> m_requestableExtensions; -#if USE(ACCELERATED_COMPOSITING) - RefPtr<WebGLLayerChromium> m_compositingLayer; -#endif -#if PLATFORM(SKIA) - // If the width and height of the Canvas's backing store don't - // match those that we were given in the most recent call to - // reshape(), then we need an intermediate bitmap to read back the - // frame buffer into. This seems to happen when CSS styles are - // used to resize the Canvas. - SkBitmap m_resizingBitmap; -#endif - -#if PLATFORM(CG) - unsigned char* m_renderOutput; -#endif - - void initializeExtensions(); -}; - -} // namespace WebCore - -#endif // GraphicsContext3D_h diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp deleted file mode 100644 index 69051d0..0000000 --- a/WebKit/chromium/src/IDBCallbacksProxy.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBCallbacksProxy.h" - -#include "IDBDatabaseError.h" -#include "IDBDatabaseProxy.h" -#include "WebIDBCallbacks.h" -#include "WebIDBCursorImpl.h" -#include "WebIDBDatabaseImpl.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBIndexImpl.h" -#include "WebIDBKey.h" -#include "WebIDBObjectStoreImpl.h" -#include "WebIDBTransactionImpl.h" -#include "WebSerializedScriptValue.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -PassRefPtr<IDBCallbacksProxy> IDBCallbacksProxy::create(PassOwnPtr<WebKit::WebIDBCallbacks> callbacks) -{ - return adoptRef(new IDBCallbacksProxy(callbacks)); -} - -IDBCallbacksProxy::IDBCallbacksProxy(PassOwnPtr<WebKit::WebIDBCallbacks> callbacks) - : m_callbacks(callbacks) -{ -} - -IDBCallbacksProxy::~IDBCallbacksProxy() -{ -} - -void IDBCallbacksProxy::onError(PassRefPtr<IDBDatabaseError> idbDatabaseError) -{ - m_callbacks->onError(WebKit::WebIDBDatabaseError(idbDatabaseError)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess() -{ - m_callbacks->onSuccess(); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend) -{ - m_callbacks->onSuccess(new WebKit::WebIDBCursorImpl(idbCursorBackend)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBDatabaseBackendInterface> backend) -{ - m_callbacks->onSuccess(new WebKit::WebIDBDatabaseImpl(backend)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBIndexBackendInterface> backend) -{ - m_callbacks->onSuccess(new WebKit::WebIDBIndexImpl(backend)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey) -{ - m_callbacks->onSuccess(WebKit::WebIDBKey(idbKey)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStoreBackendInterface> backend) -{ - m_callbacks->onSuccess(new WebKit::WebIDBObjectStoreImpl(backend)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBTransactionBackendInterface> backend) -{ - m_callbacks->onSuccess(new WebKit::WebIDBTransactionImpl(backend)); - m_callbacks.clear(); -} - -void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue) -{ - m_callbacks->onSuccess(WebKit::WebSerializedScriptValue(serializedScriptValue)); - m_callbacks.clear(); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h deleted file mode 100644 index 8c26161..0000000 --- a/WebKit/chromium/src/IDBCallbacksProxy.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBCallbacksProxy_h -#define IDBCallbacksProxy_h - -#include "IDBCallbacks.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -namespace WebKit { -class WebIDBCallbacks; -} - -namespace WebCore { - -class IDBCallbacksProxy : public IDBCallbacks { -public: - static PassRefPtr<IDBCallbacksProxy> create(PassOwnPtr<WebKit::WebIDBCallbacks>); - virtual ~IDBCallbacksProxy(); - - virtual void onError(PassRefPtr<IDBDatabaseError>); - virtual void onSuccess(); // For "null". - virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>); - virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>); - virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>); - virtual void onSuccess(PassRefPtr<IDBKey>); - virtual void onSuccess(PassRefPtr<IDBObjectStoreBackendInterface>); - virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>); - virtual void onSuccess(PassRefPtr<SerializedScriptValue>); - -private: - IDBCallbacksProxy(PassOwnPtr<WebKit::WebIDBCallbacks>); - - OwnPtr<WebKit::WebIDBCallbacks> m_callbacks; -}; - - -} // namespace WebCore - -#endif - -#endif // IDBCallbacksProxy_h diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/WebKit/chromium/src/IDBCursorBackendProxy.cpp deleted file mode 100644 index ec7bf63..0000000 --- a/WebKit/chromium/src/IDBCursorBackendProxy.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBCursorBackendProxy.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBAny.h" -#include "IDBCallbacks.h" -#include "IDBKey.h" -#include "SerializedScriptValue.h" -#include "WebIDBCallbacksImpl.h" -#include "WebIDBKey.h" -#include "WebSerializedScriptValue.h" - -namespace WebCore { - -PassRefPtr<IDBCursorBackendInterface> IDBCursorBackendProxy::create(PassOwnPtr<WebKit::WebIDBCursor> idbCursor) -{ - return adoptRef(new IDBCursorBackendProxy(idbCursor)); -} - -IDBCursorBackendProxy::IDBCursorBackendProxy(PassOwnPtr<WebKit::WebIDBCursor> idbCursor) - : m_idbCursor(idbCursor) -{ -} - -IDBCursorBackendProxy::~IDBCursorBackendProxy() -{ -} - -unsigned short IDBCursorBackendProxy::direction() const -{ - return m_idbCursor->direction(); -} - -PassRefPtr<IDBKey> IDBCursorBackendProxy::key() const -{ - return m_idbCursor->key(); -} - -PassRefPtr<IDBAny> IDBCursorBackendProxy::value() const -{ - WebKit::WebSerializedScriptValue webScriptValue; - WebKit::WebIDBKey webKey; - m_idbCursor->value(webScriptValue, webKey); - if (!webScriptValue.isNull()) { - ASSERT(webKey.type() == WebKit::WebIDBKey::InvalidType); - return IDBAny::create<SerializedScriptValue>(webScriptValue); - } - ASSERT(webKey.type() != WebKit::WebIDBKey::InvalidType); - return IDBAny::create<IDBKey>(webKey); -} - -void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) -{ - m_idbCursor->update(value, new WebIDBCallbacksImpl(callbacks), ec); -} - -void IDBCursorBackendProxy::continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) -{ - m_idbCursor->continueFunction(key, new WebIDBCallbacksImpl(callbacks), ec); -} - -void IDBCursorBackendProxy::deleteFunction(PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) -{ - m_idbCursor->deleteFunction(new WebIDBCallbacksImpl(callbacks), ec); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.h b/WebKit/chromium/src/IDBCursorBackendProxy.h deleted file mode 100644 index 650dded..0000000 --- a/WebKit/chromium/src/IDBCursorBackendProxy.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBCursorBackendProxy_h -#define IDBCursorBackendProxy_h - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBCursorBackendInterface.h" -#include "WebIDBCursor.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { - -class IDBCursorBackendProxy : public IDBCursorBackendInterface { -public: - static PassRefPtr<IDBCursorBackendInterface> create(PassOwnPtr<WebKit::WebIDBCursor>); - virtual ~IDBCursorBackendProxy(); - - virtual unsigned short direction() const; - virtual PassRefPtr<IDBKey> key() const; - virtual PassRefPtr<IDBAny> value() const; - virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>, ExceptionCode&); - virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, ExceptionCode&); - virtual void deleteFunction(PassRefPtr<IDBCallbacks>, ExceptionCode&); - -private: - IDBCursorBackendProxy(PassOwnPtr<WebKit::WebIDBCursor>); - - OwnPtr<WebKit::WebIDBCursor> m_idbCursor; -}; - -} // namespace WebCore - -#endif - -#endif // IDBCursorBackendProxy_h diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp deleted file mode 100644 index f070d64..0000000 --- a/WebKit/chromium/src/IDBDatabaseProxy.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBDatabaseProxy.h" - -#include "DOMStringList.h" -#include "IDBCallbacks.h" -#include "IDBObjectStoreProxy.h" -#include "IDBTransactionBackendProxy.h" -#include "WebDOMStringList.h" -#include "WebFrameImpl.h" -#include "WebIDBCallbacksImpl.h" -#include "WebIDBDatabase.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBObjectStore.h" -#include "WebIDBTransaction.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -PassRefPtr<IDBDatabaseBackendInterface> IDBDatabaseProxy::create(PassOwnPtr<WebKit::WebIDBDatabase> database) -{ - return adoptRef(new IDBDatabaseProxy(database)); -} - -IDBDatabaseProxy::IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase> database) - : m_webIDBDatabase(database) -{ -} - -IDBDatabaseProxy::~IDBDatabaseProxy() -{ -} - -String IDBDatabaseProxy::name() const -{ - return m_webIDBDatabase->name(); -} - -String IDBDatabaseProxy::version() const -{ - return m_webIDBDatabase->version(); -} - -PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStoreNames() const -{ - return m_webIDBDatabase->objectStoreNames(); -} - -PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - WebKit::WebIDBObjectStore* objectStore = m_webIDBDatabase->createObjectStore(name, keyPath, autoIncrement, *transactionProxy->getWebIDBTransaction(), ec); - if (!objectStore) - return 0; - return IDBObjectStoreProxy::create(objectStore); -} - -void IDBDatabaseProxy::deleteObjectStore(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBDatabase->deleteObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec) -{ - m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec); -} - -PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode& ec) -{ - WebKit::WebDOMStringList names(storeNames); - WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout, ec); - if (!transaction) { - ASSERT(ec); - return 0; - } - return IDBTransactionBackendProxy::create(transaction); -} - -void IDBDatabaseProxy::close() -{ - m_webIDBDatabase->close(); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h deleted file mode 100644 index c51a604..0000000 --- a/WebKit/chromium/src/IDBDatabaseProxy.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBDatabaseProxy_h -#define IDBDatabaseProxy_h - -#include "IDBDatabaseBackendInterface.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -namespace WebKit { class WebIDBDatabase; } - -namespace WebCore { - -class IDBDatabaseProxy : public IDBDatabaseBackendInterface { -public: - static PassRefPtr<IDBDatabaseBackendInterface> create(PassOwnPtr<WebKit::WebIDBDatabase>); - virtual ~IDBDatabaseProxy(); - - virtual String name() const; - virtual String version() const; - virtual PassRefPtr<DOMStringList> objectStoreNames() const; - - virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void deleteObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, ExceptionCode&); - virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode&); - virtual void close(); - -private: - IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase>); - - OwnPtr<WebKit::WebIDBDatabase> m_webIDBDatabase; -}; - -} // namespace WebCore - -#endif - -#endif // IDBDatabaseProxy_h diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp deleted file mode 100755 index 67504a3..0000000 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBFactoryBackendProxy.h" - -#include "DOMStringList.h" -#include "IDBDatabaseError.h" -#include "IDBDatabaseProxy.h" -#include "WebFrameImpl.h" -#include "WebIDBCallbacksImpl.h" -#include "WebIDBDatabase.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBFactory.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebVector.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -PassRefPtr<IDBFactoryBackendInterface> IDBFactoryBackendProxy::create() -{ - return adoptRef(new IDBFactoryBackendProxy()); -} - -IDBFactoryBackendProxy::IDBFactoryBackendProxy() - : m_webIDBFactory(WebKit::webKitClient()->idbFactory()) -{ -} - -IDBFactoryBackendProxy::~IDBFactoryBackendProxy() -{ -} - -void IDBFactoryBackendProxy::open(const String& name, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir, int64_t maximumSize) -{ - WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - m_webIDBFactory->open(name, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) - diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h deleted file mode 100755 index 5950a68..0000000 --- a/WebKit/chromium/src/IDBFactoryBackendProxy.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBFactoryBackendProxy_h -#define IDBFactoryBackendProxy_h - -#include "IDBFactoryBackendInterface.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebKit { class WebIDBFactory; } - -namespace WebCore { - -class DOMStringList; - -class IDBFactoryBackendProxy : public IDBFactoryBackendInterface { -public: - static PassRefPtr<IDBFactoryBackendInterface> create(); - virtual ~IDBFactoryBackendProxy(); - - PassRefPtr<DOMStringList> databases(void) const; - virtual void open(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize); - -private: - IDBFactoryBackendProxy(); - - // We don't own this pointer (unlike all the other proxy classes which do). - WebKit::WebIDBFactory* m_webIDBFactory; -}; - -} // namespace WebCore - -#endif - -#endif // IDBFactoryBackendProxy_h - diff --git a/WebKit/chromium/src/IDBIndexBackendProxy.cpp b/WebKit/chromium/src/IDBIndexBackendProxy.cpp deleted file mode 100644 index 410750e..0000000 --- a/WebKit/chromium/src/IDBIndexBackendProxy.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBIndexBackendProxy.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBCallbacks.h" -#include "IDBKeyRange.h" -#include "IDBTransactionBackendProxy.h" -#include "WebIDBCallbacksImpl.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBIndex.h" -#include "WebIDBKey.h" -#include "WebIDBKeyRange.h" - -namespace WebCore { - -PassRefPtr<IDBIndexBackendInterface> IDBIndexBackendProxy::create(PassOwnPtr<WebKit::WebIDBIndex> index) -{ - return adoptRef(new IDBIndexBackendProxy(index)); -} - -IDBIndexBackendProxy::IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex> index) - : m_webIDBIndex(index) -{ -} - -IDBIndexBackendProxy::~IDBIndexBackendProxy() -{ -} - -String IDBIndexBackendProxy::name() -{ - return m_webIDBIndex->name(); -} - -String IDBIndexBackendProxy::storeName() -{ - return m_webIDBIndex->storeName(); -} - -String IDBIndexBackendProxy::keyPath() -{ - return m_webIDBIndex->keyPath(); -} - -bool IDBIndexBackendProxy::unique() -{ - return m_webIDBIndex->unique(); -} - -void IDBIndexBackendProxy::openCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBIndex->openObjectCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBIndexBackendProxy::openKeyCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBIndex->openKeyCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBIndexBackendProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBIndex->getObject(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBIndexBackendProxy::getKey(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBIndex->getKey(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBIndexBackendProxy.h b/WebKit/chromium/src/IDBIndexBackendProxy.h deleted file mode 100644 index e9de05a..0000000 --- a/WebKit/chromium/src/IDBIndexBackendProxy.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBIndexBackendProxy_h -#define IDBIndexBackendProxy_h - -#include "IDBIndexBackendInterface.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -namespace WebKit { class WebIDBIndex; } - -namespace WebCore { - -class IDBIndexBackendProxy : public IDBIndexBackendInterface { -public: - static PassRefPtr<IDBIndexBackendInterface> create(PassOwnPtr<WebKit::WebIDBIndex>); - virtual ~IDBIndexBackendProxy(); - - virtual String name(); - virtual String storeName(); - virtual String keyPath(); - virtual bool unique(); - - virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void openKeyCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void getKey(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - -private: - IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex>); - - OwnPtr<WebKit::WebIDBIndex> m_webIDBIndex; -}; - -} // namespace WebCore - -#endif - -#endif // IDBIndexBackendProxy_h diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp deleted file mode 100755 index e03cdc8..0000000 --- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBObjectStoreProxy.h" - -#include "DOMStringList.h" -#include "IDBCallbacks.h" -#include "IDBIndexBackendProxy.h" -#include "IDBKeyRange.h" -#include "IDBTransactionBackendProxy.h" -#include "WebIDBCallbacksImpl.h" -#include "WebIDBKeyRange.h" -#include "WebIDBIndex.h" -#include "WebIDBKey.h" -#include "WebIDBObjectStore.h" -#include "WebIDBTransactionImpl.h" -#include "WebSerializedScriptValue.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -PassRefPtr<IDBObjectStoreBackendInterface> IDBObjectStoreProxy::create(PassOwnPtr<WebKit::WebIDBObjectStore> objectStore) -{ - return adoptRef(new IDBObjectStoreProxy(objectStore)); -} - -IDBObjectStoreProxy::IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore> objectStore) - : m_webIDBObjectStore(objectStore) -{ -} - -IDBObjectStoreProxy::~IDBObjectStoreProxy() -{ -} - -String IDBObjectStoreProxy::name() const -{ - return m_webIDBObjectStore->name(); -} - -String IDBObjectStoreProxy::keyPath() const -{ - return m_webIDBObjectStore->keyPath(); -} - -PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const -{ - return m_webIDBObjectStore->indexNames(); -} - -void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBObjectStoreProxy::deleteFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->deleteFunction(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - WebKit::WebIDBIndex* index = m_webIDBObjectStore->createIndex(name, keyPath, unique, *transactionProxy->getWebIDBTransaction(), ec); - if (!index) - return 0; - return IDBIndexBackendProxy::create(index); -} - -PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& name, ExceptionCode& ec) -{ - WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name, ec); - if (!index) - return 0; - return IDBIndexBackendProxy::create(index); -} - -void IDBObjectStoreProxy::deleteIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->deleteIndex(name, *transactionProxy->getWebIDBTransaction(), ec); -} - -void IDBObjectStoreProxy::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec) -{ - // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer, - // all implementations of IDB interfaces are proxy objects. - IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction); - m_webIDBObjectStore->openCursor(range, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h deleted file mode 100755 index 348c794..0000000 --- a/WebKit/chromium/src/IDBObjectStoreProxy.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBObjectStoreProxy_h -#define IDBObjectStoreProxy_h - -#include "IDBObjectStoreBackendInterface.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -namespace WebKit { class WebIDBObjectStore; } - -namespace WebCore { - -class IDBObjectStoreProxy : public IDBObjectStoreBackendInterface { -public: - static PassRefPtr<IDBObjectStoreBackendInterface> create(PassOwnPtr<WebKit::WebIDBObjectStore>); - virtual ~IDBObjectStoreProxy(); - - virtual String name() const; - virtual String keyPath() const; - virtual PassRefPtr<DOMStringList> indexNames() const; - - virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, bool addOnly, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - virtual void deleteFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - - PassRefPtr<IDBIndexBackendInterface> createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface*, ExceptionCode&); - PassRefPtr<IDBIndexBackendInterface> index(const String& name, ExceptionCode&); - void deleteIndex(const String& name, IDBTransactionBackendInterface*, ExceptionCode&); - - virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&); - -private: - IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore>); - - OwnPtr<WebKit::WebIDBObjectStore> m_webIDBObjectStore; -}; - -} // namespace WebCore - -#endif - -#endif // IDBObjectStoreProxy_h - diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp deleted file mode 100644 index 95c90d5..0000000 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBTransactionBackendProxy.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBObjectStoreProxy.h" -#include "IDBTransactionCallbacks.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBObjectStore.h" -#include "WebIDBTransaction.h" -#include "WebIDBTransactionCallbacksImpl.h" - -namespace WebCore { - -PassRefPtr<IDBTransactionBackendInterface> IDBTransactionBackendProxy::create(PassOwnPtr<WebKit::WebIDBTransaction> transaction) -{ - return adoptRef(new IDBTransactionBackendProxy(transaction)); -} - -IDBTransactionBackendProxy::IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction> transaction) - : m_webIDBTransaction(transaction) -{ - ASSERT(m_webIDBTransaction); -} - -IDBTransactionBackendProxy::~IDBTransactionBackendProxy() -{ -} - -PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(const String& name, ExceptionCode& ec) -{ - WebKit::WebIDBObjectStore* objectStore = m_webIDBTransaction->objectStore(name, ec); - if (!objectStore) - return 0; - return IDBObjectStoreProxy::create(objectStore); -} - -unsigned short IDBTransactionBackendProxy::mode() const -{ - return m_webIDBTransaction->mode(); -} - -void IDBTransactionBackendProxy::abort() -{ - m_webIDBTransaction->abort(); -} - -bool IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>, PassOwnPtr<ScriptExecutionContext::Task>) -{ - // This should never be reached as it's the impl objects who get to - // execute tasks in the browser process. - ASSERT_NOT_REACHED(); - return false; -} - -void IDBTransactionBackendProxy::didCompleteTaskEvents() -{ - m_webIDBTransaction->didCompleteTaskEvents(); -} - -void IDBTransactionBackendProxy::setCallbacks(IDBTransactionCallbacks* callbacks) -{ - m_webIDBTransaction->setCallbacks(new WebIDBTransactionCallbacksImpl(callbacks)); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h deleted file mode 100644 index 96d7293..0000000 --- a/WebKit/chromium/src/IDBTransactionBackendProxy.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBTransactionBackendProxy_h -#define IDBTransactionBackendProxy_h - -#include "IDBTransactionBackendInterface.h" - -#if ENABLE(INDEXED_DATABASE) - -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebKit { class WebIDBTransaction; } - -namespace WebCore { - -class IDBTransactionBackendProxy : public IDBTransactionBackendInterface { -public: - static PassRefPtr<IDBTransactionBackendInterface> create(PassOwnPtr<WebKit::WebIDBTransaction>); - virtual ~IDBTransactionBackendProxy(); - - virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, ExceptionCode&); - virtual unsigned short mode() const; - virtual void abort(); - virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>, PassOwnPtr<ScriptExecutionContext::Task>); - virtual void didCompleteTaskEvents(); - virtual void setCallbacks(IDBTransactionCallbacks*); - - WebKit::WebIDBTransaction* getWebIDBTransaction() const { return m_webIDBTransaction.get(); } - -private: - IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction>); - - OwnPtr<WebKit::WebIDBTransaction> m_webIDBTransaction; -}; - -} // namespace WebCore - -#endif - -#endif // IDBTransactionBackendProxy_h diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp b/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp deleted file mode 100644 index 3a19fe2..0000000 --- a/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBTransactionCallbacksProxy.h" - -#include "WebIDBTransactionCallbacks.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -PassRefPtr<IDBTransactionCallbacksProxy> IDBTransactionCallbacksProxy::create(PassOwnPtr<WebKit::WebIDBTransactionCallbacks> callbacks) -{ - return adoptRef(new IDBTransactionCallbacksProxy(callbacks)); -} - -IDBTransactionCallbacksProxy::IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks> callbacks) - : m_callbacks(callbacks) -{ -} - -IDBTransactionCallbacksProxy::~IDBTransactionCallbacksProxy() -{ -} - -void IDBTransactionCallbacksProxy::onAbort() -{ - m_callbacks->onAbort(); - m_callbacks.clear(); -} - -void IDBTransactionCallbacksProxy::onComplete() -{ - m_callbacks->onComplete(); - m_callbacks.clear(); -} - -void IDBTransactionCallbacksProxy::onTimeout() -{ - m_callbacks->onTimeout(); - m_callbacks.clear(); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.h b/WebKit/chromium/src/IDBTransactionCallbacksProxy.h deleted file mode 100644 index 891d5c9..0000000 --- a/WebKit/chromium/src/IDBTransactionCallbacksProxy.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef IDBTransactionCallbacksProxy_h -#define IDBTransactionCallbacksProxy_h - -#include "IDBTransactionCallbacks.h" - -#if ENABLE(INDEXED_DATABASE) - -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> - -namespace WebKit { class WebIDBTransactionCallbacks; } - -namespace WebCore { - -class IDBTransactionCallbacksProxy : public IDBTransactionCallbacks { -public: - static PassRefPtr<IDBTransactionCallbacksProxy> create(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>); - virtual ~IDBTransactionCallbacksProxy(); - - virtual void onAbort(); - virtual void onComplete(); - virtual void onTimeout(); - -private: - IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>); - - OwnPtr<WebKit::WebIDBTransactionCallbacks> m_callbacks; -}; - - -} // namespace WebCore - -#endif - -#endif // IDBTransactionCallbacksProxy_h diff --git a/WebKit/chromium/src/InspectorClientImpl.cpp b/WebKit/chromium/src/InspectorClientImpl.cpp deleted file mode 100644 index 77150bb..0000000 --- a/WebKit/chromium/src/InspectorClientImpl.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "InspectorClientImpl.h" - -#include "DOMWindow.h" -#include "FloatRect.h" -#include "NotImplemented.h" -#include "Page.h" -#include "WebDevToolsAgentImpl.h" -#include "WebRect.h" -#include "WebURL.h" -#include "WebURLRequest.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include <wtf/Vector.h> - -using namespace WebCore; - -namespace WebKit { - -InspectorClientImpl::InspectorClientImpl(WebViewImpl* webView) - : m_inspectedWebView(webView) -{ - ASSERT(m_inspectedWebView); -} - -InspectorClientImpl::~InspectorClientImpl() -{ -} - -void InspectorClientImpl::inspectorDestroyed() -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->inspectorDestroyed(); -} - -void InspectorClientImpl::openInspectorFrontend(InspectorController* controller) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->openInspectorFrontend(controller); -} - -void InspectorClientImpl::highlight(Node* node) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->highlight(node); -} - -void InspectorClientImpl::hideHighlight() -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->hideHighlight(); -} - -void InspectorClientImpl::populateSetting(const String& key, String* value) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->populateSetting(key, value); -} - -void InspectorClientImpl::storeSetting(const String& key, const String& value) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->storeSetting(key, value); -} - -bool InspectorClientImpl::sendMessageToFrontend(const WTF::String& message) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - return agent->sendMessageToFrontend(message); - return false; -} - -void InspectorClientImpl::updateInspectorStateCookie(const WTF::String& inspectorState) -{ - if (WebDevToolsAgentImpl* agent = devToolsAgent()) - agent->updateInspectorStateCookie(inspectorState); -} - -WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent() -{ - return static_cast<WebDevToolsAgentImpl*>(m_inspectedWebView->devToolsAgent()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/InspectorClientImpl.h b/WebKit/chromium/src/InspectorClientImpl.h deleted file mode 100644 index 78d34e3..0000000 --- a/WebKit/chromium/src/InspectorClientImpl.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef InspectorClientImpl_h -#define InspectorClientImpl_h - -#include "InspectorClient.h" -#include "InspectorController.h" -#include <wtf/OwnPtr.h> - -namespace WebKit { - -class WebDevToolsAgentClient; -class WebDevToolsAgentImpl; -class WebViewImpl; - -class InspectorClientImpl : public WebCore::InspectorClient { -public: - InspectorClientImpl(WebViewImpl*); - ~InspectorClientImpl(); - - // InspectorClient methods: - virtual void inspectorDestroyed(); - virtual void openInspectorFrontend(WebCore::InspectorController*); - - virtual void highlight(WebCore::Node*); - virtual void hideHighlight(); - - virtual void populateSetting(const WTF::String& key, WTF::String* value); - virtual void storeSetting(const WTF::String& key, const WTF::String& value); - - virtual bool sendMessageToFrontend(const WTF::String&); - - virtual void updateInspectorStateCookie(const WTF::String&); -private: - WebDevToolsAgentImpl* devToolsAgent(); - - // The WebViewImpl of the page being inspected; gets passed to the constructor - WebViewImpl* m_inspectedWebView; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp b/WebKit/chromium/src/InspectorFrontendClientImpl.cpp deleted file mode 100644 index 51864f1..0000000 --- a/WebKit/chromium/src/InspectorFrontendClientImpl.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "InspectorFrontendClientImpl.h" - -#include "Document.h" -#include "Frame.h" -#include "InspectorFrontendHost.h" -#include "Page.h" -#include "PlatformString.h" -#include "V8InspectorFrontendHost.h" -#include "V8Proxy.h" -#include "WebDevToolsFrontendClient.h" -#include "WebDevToolsFrontendImpl.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -InspectorFrontendClientImpl::InspectorFrontendClientImpl(Page* frontendPage, WebDevToolsFrontendClient* client, WebDevToolsFrontendImpl* frontend) - : m_frontendPage(frontendPage) - , m_client(client) - , m_frontend(frontend) -{ -} - -InspectorFrontendClientImpl::~InspectorFrontendClientImpl() -{ - if (m_frontendHost) - m_frontendHost->disconnectClient(); - m_client = 0; -} - -void InspectorFrontendClientImpl::windowObjectCleared() -{ - v8::HandleScope handleScope; - v8::Handle<v8::Context> frameContext = V8Proxy::context(m_frontendPage->mainFrame()); - v8::Context::Scope contextScope(frameContext); - - ASSERT(!m_frontendHost); - m_frontendHost = InspectorFrontendHost::create(this, m_frontendPage); - v8::Handle<v8::Value> frontendHostObj = toV8(m_frontendHost.get()); - v8::Handle<v8::Object> global = frameContext->Global(); - - global->Set(v8::String::New("InspectorFrontendHost"), frontendHostObj); -} - -void InspectorFrontendClientImpl::frontendLoaded() -{ - m_frontend->frontendLoaded(); -} - -void InspectorFrontendClientImpl::moveWindowBy(float x, float y) -{ -} - -String InspectorFrontendClientImpl::localizedStringsURL() -{ - return ""; -} - -String InspectorFrontendClientImpl::hiddenPanels() -{ - if (m_client->shouldHideScriptsPanel()) - return "scripts"; - return ""; -} - -void InspectorFrontendClientImpl::bringToFront() -{ - m_client->activateWindow(); -} - -void InspectorFrontendClientImpl::closeWindow() -{ - m_client->closeWindow(); -} - -void InspectorFrontendClientImpl::disconnectFromBackend() -{ - m_client->closeWindow(); -} - -void InspectorFrontendClientImpl::requestAttachWindow() -{ - m_client->requestDockWindow(); -} - -void InspectorFrontendClientImpl::requestDetachWindow() -{ - m_client->requestUndockWindow(); -} - -void InspectorFrontendClientImpl::changeAttachedWindowHeight(unsigned) -{ - // Do nothing; -} - -void InspectorFrontendClientImpl::inspectedURLChanged(const String& url) -{ - m_frontendPage->mainFrame()->document()->setTitle("Developer Tools - " + url); -} - -void InspectorFrontendClientImpl::sendMessageToBackend(const String& message) -{ - m_client->sendMessageToBackend(message); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/InspectorFrontendClientImpl.h b/WebKit/chromium/src/InspectorFrontendClientImpl.h deleted file mode 100644 index fc21f3e..0000000 --- a/WebKit/chromium/src/InspectorFrontendClientImpl.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef InspectorFrontendClientImpl_h -#define InspectorFrontendClientImpl_h - -#include "InspectorFrontendClient.h" -#include <wtf/Noncopyable.h> - -namespace WebCore { -class InspectorFrontendHost; -class Page; -} - -namespace WebKit { - -class WebDevToolsFrontendClient; -class WebDevToolsFrontendImpl; - -class InspectorFrontendClientImpl : public WebCore::InspectorFrontendClient - , public Noncopyable { -public: - InspectorFrontendClientImpl(WebCore::Page*, WebDevToolsFrontendClient*, WebDevToolsFrontendImpl*); - virtual ~InspectorFrontendClientImpl(); - - // InspectorFrontendClient methods: - virtual void windowObjectCleared(); - virtual void frontendLoaded(); - - virtual void moveWindowBy(float x, float y); - - virtual WTF::String localizedStringsURL(); - virtual WTF::String hiddenPanels(); - - virtual void bringToFront(); - virtual void closeWindow(); - virtual void disconnectFromBackend(); - - virtual void requestAttachWindow(); - virtual void requestDetachWindow(); - virtual void changeAttachedWindowHeight(unsigned); - - virtual void inspectedURLChanged(const WTF::String&); - - virtual void sendMessageToBackend(const WTF::String&); -private: - WebCore::Page* m_frontendPage; - WebDevToolsFrontendClient* m_client; - WebDevToolsFrontendImpl* m_frontend; - RefPtr<WebCore::InspectorFrontendHost> m_frontendHost; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp deleted file mode 100644 index a9c61d0..0000000 --- a/WebKit/chromium/src/LocalFileSystemChromium.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "LocalFileSystem.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystem.h" -#include "ErrorCallback.h" -#include "FileSystemCallback.h" -#include "FileSystemCallbacks.h" -#include "PlatformString.h" -#include "WebFileSystem.h" -#include "WebFileSystemCallbacksImpl.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebWorkerImpl.h" -#include "WorkerContext.h" -#include "WorkerThread.h" -#include <wtf/Threading.h> - -using namespace WebKit; - -namespace WebCore { - -LocalFileSystem& LocalFileSystem::localFileSystem() -{ - AtomicallyInitializedStatic(LocalFileSystem*, localFileSystem = new LocalFileSystem("")); - return *localFileSystem; -} - -void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - ASSERT(context && context->isDocument()); - Document* document = static_cast<Document*>(context); - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, false, new WebFileSystemCallbacksImpl(callbacks)); -} - -void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous) -{ - ASSERT(context); - if (context->isDocument()) { - Document* document = static_cast<Document*>(context); - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, true, new WebFileSystemCallbacksImpl(callbacks)); - } else { - WorkerContext* workerContext = static_cast<WorkerContext*>(context); - WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy(); - WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy); - webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, context, synchronous), synchronous); - } -} - -} // namespace WebCore - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp deleted file mode 100644 index ab14009..0000000 --- a/WebKit/chromium/src/LocalizedStrings.cpp +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "LocalizedStrings.h" - -#include "IntSize.h" -#include "NotImplemented.h" - -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebLocalizedString.h" -#include "WebString.h" - -#include <wtf/text/StringBuilder.h> -#include <wtf/text/WTFString.h> - -using WebKit::WebLocalizedString; -using WebKit::WebString; - -namespace WebCore { - -static String query(WebLocalizedString::Name name) -{ - return WebKit::webKitClient()->queryLocalizedString(name); -} - -static String query(WebLocalizedString::Name name, const WebString& parameter) -{ - return WebKit::webKitClient()->queryLocalizedString(name, parameter); -} - -static String query(WebLocalizedString::Name name, const WebString& parameter1, const WebString& parameter2) -{ - return WebKit::webKitClient()->queryLocalizedString(name, parameter1, parameter2); -} - -String searchableIndexIntroduction() -{ - return query(WebLocalizedString::SearchableIndexIntroduction); -} - -String submitButtonDefaultLabel() -{ - return query(WebLocalizedString::SubmitButtonDefaultLabel); -} - -String inputElementAltText() -{ - return query(WebLocalizedString::InputElementAltText); -} - -String resetButtonDefaultLabel() -{ - return query(WebLocalizedString::ResetButtonDefaultLabel); -} - -String fileButtonChooseFileLabel() -{ - return query(WebLocalizedString::FileButtonChooseFileLabel); -} - -String fileButtonNoFileSelectedLabel() -{ - return query(WebLocalizedString::FileButtonNoFileSelectedLabel); -} - -String searchMenuNoRecentSearchesText() -{ - return query(WebLocalizedString::SearchMenuNoRecentSearchesText); -} -String searchMenuRecentSearchesText() -{ - return query(WebLocalizedString::SearchMenuRecentSearchesText); -} - -String searchMenuClearRecentSearchesText() -{ - return query(WebLocalizedString::SearchMenuClearRecentSearchesText); -} - -String AXWebAreaText() -{ - return query(WebLocalizedString::AXWebAreaText); -} - -String AXLinkText() -{ - return query(WebLocalizedString::AXLinkText); -} - -String AXListMarkerText() -{ - return query(WebLocalizedString::AXListMarkerText); -} - -String AXImageMapText() -{ - return query(WebLocalizedString::AXImageMapText); -} - -String AXHeadingText() -{ - return query(WebLocalizedString::AXHeadingText); -} - -String AXDefinitionListTermText() -{ - notImplemented(); - return String("term"); -} - -String AXDefinitionListDefinitionText() -{ - notImplemented(); - return String("definition"); -} - -String AXButtonActionVerb() -{ - return query(WebLocalizedString::AXButtonActionVerb); -} - -String AXRadioButtonActionVerb() -{ - return query(WebLocalizedString::AXRadioButtonActionVerb); -} - -String AXTextFieldActionVerb() -{ - return query(WebLocalizedString::AXTextFieldActionVerb); -} - -String AXCheckedCheckBoxActionVerb() -{ - return query(WebLocalizedString::AXCheckedCheckBoxActionVerb); -} - -String AXUncheckedCheckBoxActionVerb() -{ - return query(WebLocalizedString::AXUncheckedCheckBoxActionVerb); -} - -String AXLinkActionVerb() -{ - return query(WebLocalizedString::AXLinkActionVerb); -} - -String AXMenuListPopupActionVerb() -{ - return String(); -} - -String AXMenuListActionVerb() -{ - return String(); -} - -String missingPluginText() -{ - notImplemented(); - return String("Missing Plug-in"); -} - -String crashedPluginText() -{ - notImplemented(); - return String("Plug-in Failure"); -} - -String multipleFileUploadText(unsigned numberOfFiles) -{ - return query(WebLocalizedString::MultipleFileUploadText, String::number(numberOfFiles)); -} - -// Used in FTPDirectoryDocument.cpp -String unknownFileSizeText() -{ - return String(); -} - -// The following two functions are not declared in LocalizedStrings.h. -// They are used by the menu for the HTML keygen tag. -String keygenMenuHighGradeKeySize() -{ - return query(WebLocalizedString::KeygenMenuHighGradeKeySize); -} - -String keygenMenuMediumGradeKeySize() -{ - return query(WebLocalizedString::KeygenMenuMediumGradeKeySize); -} - -// Used in ImageDocument.cpp as the title for pages when that page is an image. -String imageTitle(const String& filename, const IntSize& size) -{ - StringBuilder result; - result.append(filename); - result.append(" ("); - result.append(String::number(size.width())); - result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign) - result.append(String::number(size.height())); - result.append(')'); - return result.toString(); -} - -// We don't use these strings, so they return an empty String. We can't just -// make them asserts because webcore still calls them. -String contextMenuItemTagOpenLinkInNewWindow() { return String(); } -String contextMenuItemTagDownloadLinkToDisk() { return String(); } -String contextMenuItemTagCopyLinkToClipboard() { return String(); } -String contextMenuItemTagOpenImageInNewWindow() { return String(); } -String contextMenuItemTagDownloadImageToDisk() { return String(); } -String contextMenuItemTagCopyImageToClipboard() { return String(); } -String contextMenuItemTagOpenFrameInNewWindow() { return String(); } -String contextMenuItemTagCopy() { return String(); } -String contextMenuItemTagGoBack() { return String(); } -String contextMenuItemTagGoForward() { return String(); } -String contextMenuItemTagStop() { return String(); } -String contextMenuItemTagReload() { return String(); } -String contextMenuItemTagCut() { return String(); } -String contextMenuItemTagPaste() { return String(); } -String contextMenuItemTagNoGuessesFound() { return String(); } -String contextMenuItemTagIgnoreSpelling() { return String(); } -String contextMenuItemTagLearnSpelling() { return String(); } -String contextMenuItemTagSearchWeb() { return String(); } -String contextMenuItemTagLookUpInDictionary() { return String(); } -String contextMenuItemTagOpenLink() { return String(); } -String contextMenuItemTagIgnoreGrammar() { return String(); } -String contextMenuItemTagSpellingMenu() { return String(); } -String contextMenuItemTagCheckSpelling() { return String(); } -String contextMenuItemTagCheckSpellingWhileTyping() { return String(); } -String contextMenuItemTagCheckGrammarWithSpelling() { return String(); } -String contextMenuItemTagFontMenu() { return String(); } -String contextMenuItemTagBold() { return String(); } -String contextMenuItemTagItalic() { return String(); } -String contextMenuItemTagUnderline() { return String(); } -String contextMenuItemTagOutline() { return String(); } -String contextMenuItemTagWritingDirectionMenu() { return String(); } -String contextMenuItemTagTextDirectionMenu() { return String(); } -String contextMenuItemTagDefaultDirection() { return String(); } -String contextMenuItemTagLeftToRight() { return String(); } -String contextMenuItemTagRightToLeft() { return String(); } -String contextMenuItemTagInspectElement() { return String(); } -String contextMenuItemTagShowSpellingPanel(bool show) { return String(); } -String mediaElementLiveBroadcastStateText() { return String(); } -String mediaElementLoadingStateText() { return String(); } -String contextMenuItemTagOpenVideoInNewWindow() { return String(); } -String contextMenuItemTagOpenAudioInNewWindow() { return String(); } -String contextMenuItemTagCopyVideoLinkToClipboard() { return String(); } -String contextMenuItemTagCopyAudioLinkToClipboard() { return String(); } -String contextMenuItemTagToggleMediaControls() { return String(); } -String contextMenuItemTagToggleMediaLoop() { return String(); } -String contextMenuItemTagEnterVideoFullscreen() { return String(); } -String contextMenuItemTagMediaPlay() { return String(); } -String contextMenuItemTagMediaPause() { return String(); } -String contextMenuItemTagMediaMute() { return String(); } - -String localizedMediaControlElementString(const String& /*name*/) -{ - // FIXME: to be fixed. - return String(); -} - -String localizedMediaControlElementHelpText(const String& /*name*/) -{ - // FIXME: to be fixed. - return String(); -} - -String localizedMediaTimeDescription(float /*time*/) -{ - // FIXME: to be fixed. - return String(); -} - -String validationMessageValueMissingText() -{ - return query(WebLocalizedString::ValidationValueMissing); -} - -String validationMessageValueMissingForCheckboxText() -{ - return query(WebLocalizedString::ValidationValueMissingForCheckbox); -} - -String validationMessageValueMissingForFileText() -{ - return query(WebLocalizedString::ValidationValueMissingForFile); -} - -String validationMessageValueMissingForMultipleFileText() -{ - return query(WebLocalizedString::ValidationValueMissingForMultipleFile); -} - -String validationMessageValueMissingForRadioText() -{ - return query(WebLocalizedString::ValidationValueMissingForRadio); -} - -String validationMessageValueMissingForSelectText() -{ - return query(WebLocalizedString::ValidationValueMissingForSelect); -} - -String validationMessageTypeMismatchText() -{ - return query(WebLocalizedString::ValidationTypeMismatch); -} - -String validationMessageTypeMismatchForEmailText() -{ - return query(WebLocalizedString::ValidationTypeMismatchForEmail); -} - -String validationMessageTypeMismatchForMultipleEmailText() -{ - return query(WebLocalizedString::ValidationTypeMismatchForMultipleEmail); -} - -String validationMessageTypeMismatchForURLText() -{ - return query(WebLocalizedString::ValidationTypeMismatchForURL); -} - -String validationMessagePatternMismatchText() -{ - return query(WebLocalizedString::ValidationPatternMismatch); -} - -String validationMessageTooLongText(int valueLength, int maxLength) -{ - return query(WebLocalizedString::ValidationTooLong, String::number(valueLength), String::number(maxLength)); -} - -String validationMessageRangeUnderflowText(const String& minimum) -{ - return query(WebLocalizedString::ValidationRangeUnderflow, minimum); -} - -String validationMessageRangeOverflowText(const String& maximum) -{ - return query(WebLocalizedString::ValidationRangeOverflow, maximum); -} - -String validationMessageStepMismatchText(const String& base, const String& step) -{ - return query(WebLocalizedString::ValidationStepMismatch, base, step); -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/MediaPlayerPrivateChromium.cpp b/WebKit/chromium/src/MediaPlayerPrivateChromium.cpp deleted file mode 100644 index 09d33d4..0000000 --- a/WebKit/chromium/src/MediaPlayerPrivateChromium.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "MediaPlayerPrivateChromium.h" - -#if ENABLE(VIDEO) - -#include "WebMediaPlayerClientImpl.h" - -namespace WebCore { - -void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar) -{ - WebKit::WebMediaPlayerClientImpl::registerSelf(registrar); -} - -} // namespace WebCore - -#endif diff --git a/WebKit/chromium/src/NotificationPresenterImpl.cpp b/WebKit/chromium/src/NotificationPresenterImpl.cpp deleted file mode 100644 index 1931465..0000000 --- a/WebKit/chromium/src/NotificationPresenterImpl.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "NotificationPresenterImpl.h" - -#if ENABLE(NOTIFICATIONS) - -#include "KURL.h" -#include "Notification.h" -#include "ScriptExecutionContext.h" -#include "SecurityOrigin.h" - -#include "WebNotification.h" -#include "WebNotificationPermissionCallback.h" -#include "WebNotificationPresenter.h" -#include "WebURL.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class VoidCallbackClient : public WebNotificationPermissionCallback { -public: - VoidCallbackClient(PassRefPtr<VoidCallback> callback) - : m_callback(callback) - { - } - - virtual void permissionRequestComplete() - { - if (m_callback) - m_callback->handleEvent(); - delete this; - } - -private: - RefPtr<VoidCallback> m_callback; -}; - -void NotificationPresenterImpl::initialize(WebNotificationPresenter* presenter) -{ - m_presenter = presenter; -} - -bool NotificationPresenterImpl::isInitialized() -{ - return !!m_presenter; -} - -bool NotificationPresenterImpl::show(Notification* notification) -{ - return m_presenter->show(PassRefPtr<Notification>(notification)); -} - -void NotificationPresenterImpl::cancel(Notification* notification) -{ - m_presenter->cancel(PassRefPtr<Notification>(notification)); -} - -void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notification) -{ - m_presenter->objectDestroyed(PassRefPtr<Notification>(notification)); -} - -NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(ScriptExecutionContext* context) -{ - int result = m_presenter->checkPermission(context->url()); - return static_cast<NotificationPresenter::Permission>(result); -} - -void NotificationPresenterImpl::requestPermission(ScriptExecutionContext* context, PassRefPtr<VoidCallback> callback) -{ - m_presenter->requestPermission(WebSecurityOrigin(context->securityOrigin()), new VoidCallbackClient(callback)); -} - -} // namespace WebKit - -#endif // ENABLE(NOTIFICATIONS) diff --git a/WebKit/chromium/src/NotificationPresenterImpl.h b/WebKit/chromium/src/NotificationPresenterImpl.h deleted file mode 100644 index bb156dd..0000000 --- a/WebKit/chromium/src/NotificationPresenterImpl.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef NotificationPresenterImpl_h -#define NotificationPresenterImpl_h - -#include "NotificationPresenter.h" -#include "VoidCallback.h" - -#include <wtf/HashMap.h> -#include <wtf/PassRefPtr.h> - -#if ENABLE(NOTIFICATIONS) - -namespace WebKit { - -class WebNotificationPresenter; - -class NotificationPresenterImpl : public WebCore::NotificationPresenter { -public: - NotificationPresenterImpl() : m_presenter(0) { } - - void initialize(WebNotificationPresenter* presenter); - bool isInitialized(); - - // WebCore::NotificationPresenter implementation. - virtual bool show(WebCore::Notification* object); - virtual void cancel(WebCore::Notification* object); - virtual void notificationObjectDestroyed(WebCore::Notification* object); - virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*); - virtual void requestPermission(WebCore::ScriptExecutionContext* , WTF::PassRefPtr<WebCore::VoidCallback> callback); - virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) {} - -private: - // WebNotificationPresenter that this object delegates to. - WebNotificationPresenter* m_presenter; -}; - -} // namespace WebKit - -#endif // ENABLE(NOTIFICATIONS) - -#endif diff --git a/WebKit/chromium/src/PlatformMessagePortChannel.cpp b/WebKit/chromium/src/PlatformMessagePortChannel.cpp deleted file mode 100644 index aa42a10..0000000 --- a/WebKit/chromium/src/PlatformMessagePortChannel.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "PlatformMessagePortChannel.h" - -#include "MessagePort.h" -#include "ScriptExecutionContext.h" -#include "SerializedScriptValue.h" - -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMessagePortChannel.h" -#include "WebString.h" - -using namespace WebKit; - -namespace WebCore { - -PassOwnPtr<MessagePortChannel> MessagePortChannel::create(PassRefPtr<PlatformMessagePortChannel> channel) -{ - return new MessagePortChannel(channel); -} - -void MessagePortChannel::createChannel(PassRefPtr<MessagePort> port1, PassRefPtr<MessagePort> port2) -{ - PlatformMessagePortChannel::createChannel(port1, port2); -} - -MessagePortChannel::MessagePortChannel(PassRefPtr<PlatformMessagePortChannel> channel) - : m_channel(channel) -{ -} - -MessagePortChannel::~MessagePortChannel() -{ - // Make sure we close our platform channel when the base is freed, to keep the channel objects from leaking. - m_channel->close(); -} - -bool MessagePortChannel::entangleIfOpen(MessagePort* port) -{ - return m_channel->entangleIfOpen(port); -} - -void MessagePortChannel::disentangle() -{ - m_channel->disentangle(); -} - -void MessagePortChannel::postMessageToRemote(PassOwnPtr<MessagePortChannel::EventData> message) -{ - m_channel->postMessageToRemote(message); -} - -bool MessagePortChannel::tryGetMessageFromRemote(OwnPtr<MessagePortChannel::EventData>& result) -{ - return m_channel->tryGetMessageFromRemote(result); -} - -void MessagePortChannel::close() -{ - m_channel->close(); -} - -bool MessagePortChannel::isConnectedTo(MessagePort* port) -{ - return m_channel->isConnectedTo(port); -} - -bool MessagePortChannel::hasPendingActivity() -{ - return m_channel->hasPendingActivity(); -} - -MessagePort* MessagePortChannel::locallyEntangledPort(const ScriptExecutionContext* context) -{ - // This is just an optimization, so return 0 always. - return 0; -} - - -PassRefPtr<PlatformMessagePortChannel> PlatformMessagePortChannel::create() -{ - return adoptRef(new PlatformMessagePortChannel()); -} - -PassRefPtr<PlatformMessagePortChannel> PlatformMessagePortChannel::create( - WebMessagePortChannel* channel) -{ - return adoptRef(new PlatformMessagePortChannel(channel)); -} - - -PlatformMessagePortChannel::PlatformMessagePortChannel() - : m_localPort(0) -{ - m_webChannel = webKitClient()->createMessagePortChannel(); - if (m_webChannel) - m_webChannel->setClient(this); -} - -PlatformMessagePortChannel::PlatformMessagePortChannel(WebMessagePortChannel* channel) - : m_localPort(0) - , m_webChannel(channel) -{ -} - -PlatformMessagePortChannel::~PlatformMessagePortChannel() -{ - if (m_webChannel) - m_webChannel->destroy(); -} - -void PlatformMessagePortChannel::createChannel(PassRefPtr<MessagePort> port1, PassRefPtr<MessagePort> port2) -{ - // Create proxies for each endpoint. - RefPtr<PlatformMessagePortChannel> channel1 = PlatformMessagePortChannel::create(); - RefPtr<PlatformMessagePortChannel> channel2 = PlatformMessagePortChannel::create(); - - // Entangle the two endpoints. - channel1->setEntangledChannel(channel2); - channel2->setEntangledChannel(channel1); - - // Now entangle the proxies with the appropriate local ports. - port1->entangle(MessagePortChannel::create(channel2)); - port2->entangle(MessagePortChannel::create(channel1)); -} - -void PlatformMessagePortChannel::messageAvailable() -{ - MutexLocker lock(m_mutex); - if (m_localPort) - m_localPort->messageAvailable(); -} - -bool PlatformMessagePortChannel::entangleIfOpen(MessagePort* port) -{ - MutexLocker lock(m_mutex); - m_localPort = port; - return true; -} - -void PlatformMessagePortChannel::disentangle() -{ - MutexLocker lock(m_mutex); - m_localPort = 0; -} - -void PlatformMessagePortChannel::postMessageToRemote(PassOwnPtr<MessagePortChannel::EventData> message) -{ - if (!m_localPort || !m_webChannel) - return; - - WebString messageString = message->message()->toWireString(); - OwnPtr<WebCore::MessagePortChannelArray> channels = message->channels(); - WebMessagePortChannelArray* webChannels = 0; - if (channels.get() && channels->size()) { - webChannels = new WebMessagePortChannelArray(channels->size()); - for (size_t i = 0; i < channels->size(); ++i) { - WebCore::PlatformMessagePortChannel* platformChannel = (*channels)[i]->channel(); - (*webChannels)[i] = platformChannel->webChannelRelease(); - (*webChannels)[i]->setClient(0); - } - } - m_webChannel->postMessage(messageString, webChannels); -} - -bool PlatformMessagePortChannel::tryGetMessageFromRemote(OwnPtr<MessagePortChannel::EventData>& result) -{ - if (!m_webChannel) - return false; - - WebString message; - WebMessagePortChannelArray webChannels; - bool rv = m_webChannel->tryGetMessage(&message, webChannels); - if (rv) { - OwnPtr<MessagePortChannelArray> channels; - if (webChannels.size()) { - channels = new MessagePortChannelArray(webChannels.size()); - for (size_t i = 0; i < webChannels.size(); ++i) { - RefPtr<PlatformMessagePortChannel> platformChannel = create(webChannels[i]); - webChannels[i]->setClient(platformChannel.get()); - (*channels)[i] = MessagePortChannel::create(platformChannel); - } - } - RefPtr<SerializedScriptValue> serializedMessage = SerializedScriptValue::createFromWire(message); - result = MessagePortChannel::EventData::create(serializedMessage.release(), channels.release()); - } - - return rv; -} - -void PlatformMessagePortChannel::close() -{ - MutexLocker lock(m_mutex); - // Disentangle ourselves from the other end. We still maintain a reference to m_webChannel, - // since previously-existing messages should still be delivered. - m_localPort = 0; - m_entangledChannel = 0; -} - -bool PlatformMessagePortChannel::isConnectedTo(MessagePort* port) -{ - MutexLocker lock(m_mutex); - return m_entangledChannel && m_entangledChannel->m_localPort == port; -} - -bool PlatformMessagePortChannel::hasPendingActivity() -{ - MutexLocker lock(m_mutex); - return m_localPort; -} - -void PlatformMessagePortChannel::setEntangledChannel(PassRefPtr<PlatformMessagePortChannel> remote) -{ - if (m_webChannel) - m_webChannel->entangle(remote->m_webChannel); - - MutexLocker lock(m_mutex); - m_entangledChannel = remote; -} - -WebMessagePortChannel* PlatformMessagePortChannel::webChannelRelease() -{ - WebMessagePortChannel* rv = m_webChannel; - m_webChannel = 0; - return rv; -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/PlatformMessagePortChannel.h b/WebKit/chromium/src/PlatformMessagePortChannel.h deleted file mode 100644 index 5416145..0000000 --- a/WebKit/chromium/src/PlatformMessagePortChannel.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef PlatformMessagePortChannel_h -#define PlatformMessagePortChannel_h - -#include "WebMessagePortChannelClient.h" - -#include "MessagePortChannel.h" -#include <wtf/PassRefPtr.h> -#include <wtf/Threading.h> - -namespace WebKit { -class WebMessagePortChannel; -} - -namespace WebCore { - -class MessagePort; - -// PlatformMessagePortChannel is a platform-dependent interface to the remote side of a message channel. -class PlatformMessagePortChannel : public ThreadSafeShared<PlatformMessagePortChannel>, - public WebKit::WebMessagePortChannelClient { -public: - static void createChannel(PassRefPtr<MessagePort>, PassRefPtr<MessagePort>); - static PassRefPtr<PlatformMessagePortChannel> create(); - static PassRefPtr<PlatformMessagePortChannel> create(WebKit::WebMessagePortChannel*); - - // APIs delegated from MessagePortChannel.h - bool entangleIfOpen(MessagePort*); - void disentangle(); - void postMessageToRemote(PassOwnPtr<MessagePortChannel::EventData>); - bool tryGetMessageFromRemote(OwnPtr<MessagePortChannel::EventData>&); - void close(); - bool isConnectedTo(MessagePort* port); - bool hasPendingActivity(); - - // Releases ownership of the contained web channel. - WebKit::WebMessagePortChannel* webChannelRelease(); - - ~PlatformMessagePortChannel(); - -private: - PlatformMessagePortChannel(); - PlatformMessagePortChannel(WebKit::WebMessagePortChannel*); - - void setEntangledChannel(PassRefPtr<PlatformMessagePortChannel>); - - // WebKit::WebMessagePortChannelClient implementation - virtual void messageAvailable(); - - // Mutex used to ensure exclusive access to the object internals. - Mutex m_mutex; - - // Pointer to our entangled pair - cleared when close() is called. - RefPtr<PlatformMessagePortChannel> m_entangledChannel; - - // The port we are connected to - this is the port that is notified when new messages arrive. - MessagePort* m_localPort; - - WebKit::WebMessagePortChannel* m_webChannel; -}; - -} // namespace WebCore - -#endif // PlatformMessagePortChannel_h diff --git a/WebKit/chromium/src/ResourceHandle.cpp b/WebKit/chromium/src/ResourceHandle.cpp deleted file mode 100644 index 83e0017..0000000 --- a/WebKit/chromium/src/ResourceHandle.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "ResourceHandle.h" - -#include "ChromiumBridge.h" -#include "ResourceHandleClient.h" -#include "ResourceRequest.h" -#include "SharedBuffer.h" - -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebURLError.h" -#include "WebURLLoader.h" -#include "WebURLLoaderClient.h" -#include "WebURLRequest.h" -#include "WebURLResponse.h" -#include "WrappedResourceRequest.h" -#include "WrappedResourceResponse.h" - -using namespace WebKit; - -namespace WebCore { - -// ResourceHandleInternal ----------------------------------------------------- - -class ResourceHandleInternal : public WebURLLoaderClient { -public: - ResourceHandleInternal(const ResourceRequest& request, ResourceHandleClient* client) - : m_request(request) - , m_owner(0) - , m_client(client) - , m_state(ConnectionStateNew) - { - } - - void start(); - void cancel(); - void setDefersLoading(bool); - bool allowStoredCredentials() const; - - // WebURLLoaderClient methods: - virtual void willSendRequest(WebURLLoader*, WebURLRequest&, const WebURLResponse&); - virtual void didSendData( - WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent); - virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&); - virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength); - virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength); - virtual void didFinishLoading(WebURLLoader*, double finishTime); - virtual void didFail(WebURLLoader*, const WebURLError&); - - enum ConnectionState { - ConnectionStateNew, - ConnectionStateStarted, - ConnectionStateReceivedResponse, - ConnectionStateReceivingData, - ConnectionStateFinishedLoading, - ConnectionStateCanceled, - ConnectionStateFailed, - }; - - ResourceRequest m_request; - ResourceHandle* m_owner; - ResourceHandleClient* m_client; - OwnPtr<WebURLLoader> m_loader; - - // Used for sanity checking to make sure we don't experience illegal state - // transitions. - ConnectionState m_state; -}; - -void ResourceHandleInternal::start() -{ - if (m_state != ConnectionStateNew) - CRASH(); - m_state = ConnectionStateStarted; - - m_loader.set(webKitClient()->createURLLoader()); - ASSERT(m_loader.get()); - - WrappedResourceRequest wrappedRequest(m_request); - wrappedRequest.setAllowStoredCredentials(allowStoredCredentials()); - m_loader->loadAsynchronously(wrappedRequest, this); -} - -void ResourceHandleInternal::cancel() -{ - m_state = ConnectionStateCanceled; - m_loader->cancel(); - - // Do not make any further calls to the client. - m_client = 0; -} - -void ResourceHandleInternal::setDefersLoading(bool value) -{ - m_loader->setDefersLoading(value); -} - -bool ResourceHandleInternal::allowStoredCredentials() const -{ - return m_client && m_client->shouldUseCredentialStorage(m_owner); -} - -void ResourceHandleInternal::willSendRequest( - WebURLLoader*, WebURLRequest& request, const WebURLResponse& response) -{ - ASSERT(m_client); - ASSERT(!request.isNull()); - ASSERT(!response.isNull()); - m_client->willSendRequest(m_owner, request.toMutableResourceRequest(), response.toResourceResponse()); -} - -void ResourceHandleInternal::didSendData( - WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent) -{ - ASSERT(m_client); - m_client->didSendData(m_owner, bytesSent, totalBytesToBeSent); -} - -void ResourceHandleInternal::didReceiveResponse(WebURLLoader*, const WebURLResponse& response) -{ - ASSERT(m_client); - ASSERT(!response.isNull()); - bool isMultipart = response.isMultipartPayload(); - bool isValidStateTransition = (m_state == ConnectionStateStarted || m_state == ConnectionStateReceivedResponse); - // In the case of multipart loads, calls to didReceiveData & didReceiveResponse can be interleaved. - if (!isMultipart && !isValidStateTransition) - CRASH(); - m_state = ConnectionStateReceivedResponse; - m_client->didReceiveResponse(m_owner, response.toResourceResponse()); -} - -void ResourceHandleInternal::didReceiveData( - WebURLLoader*, const char* data, int dataLength) -{ - ASSERT(m_client); - if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) - CRASH(); - m_state = ConnectionStateReceivingData; - - // FIXME(yurys): it looks like lengthReceived is always the same as - // dataLength and that the latter parameter can be eliminated. - // See WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=31019 - m_client->didReceiveData(m_owner, data, dataLength, dataLength); -} - -void ResourceHandleInternal::didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength) -{ - ASSERT(m_client); - if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) - CRASH(); - - m_client->didReceiveCachedMetadata(m_owner, data, dataLength); -} - -void ResourceHandleInternal::didFinishLoading(WebURLLoader*, double finishTime) -{ - ASSERT(m_client); - if (m_state != ConnectionStateReceivedResponse && m_state != ConnectionStateReceivingData) - CRASH(); - m_state = ConnectionStateFinishedLoading; - m_client->didFinishLoading(m_owner, finishTime); -} - -void ResourceHandleInternal::didFail(WebURLLoader*, const WebURLError& error) -{ - ASSERT(m_client); - m_state = ConnectionStateFailed; - m_client->didFail(m_owner, error); -} - -// ResourceHandle ------------------------------------------------------------- - -ResourceHandle::ResourceHandle(const ResourceRequest& request, - ResourceHandleClient* client, - bool defersLoading, - bool shouldContentSniff) - : d(new ResourceHandleInternal(request, client)) -{ - d->m_owner = this; - - // FIXME: Figure out what to do with the bool params. -} - -PassRefPtr<ResourceHandle> ResourceHandle::create(NetworkingContext* context, - const ResourceRequest& request, - ResourceHandleClient* client, - bool defersLoading, - bool shouldContentSniff) -{ - RefPtr<ResourceHandle> newHandle = adoptRef(new ResourceHandle( - request, client, defersLoading, shouldContentSniff)); - - if (newHandle->start(context)) - return newHandle.release(); - - return 0; -} - -ResourceRequest& ResourceHandle::firstRequest() -{ - return d->m_request; -} - -ResourceHandleClient* ResourceHandle::client() const -{ - return d->m_client; -} - -void ResourceHandle::setClient(ResourceHandleClient* client) -{ - d->m_client = client; -} - -void ResourceHandle::setDefersLoading(bool value) -{ - d->setDefersLoading(value); -} - -bool ResourceHandle::start(NetworkingContext* context) -{ - d->start(); - return true; -} - -bool ResourceHandle::hasAuthenticationChallenge() const -{ - return false; -} - -void ResourceHandle::clearAuthentication() -{ -} - -void ResourceHandle::cancel() -{ - d->cancel(); -} - -ResourceHandle::~ResourceHandle() -{ - d->m_owner = 0; -} - -PassRefPtr<SharedBuffer> ResourceHandle::bufferedData() -{ - return 0; -} - -bool ResourceHandle::loadsBlocked() -{ - return false; // This seems to be related to sync XMLHttpRequest... -} - -// static -bool ResourceHandle::supportsBufferedData() -{ - return false; // The loader will buffer manually if it needs to. -} - -// static -void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, - const ResourceRequest& request, - StoredCredentials storedCredentials, - ResourceError& error, - ResourceResponse& response, - Vector<char>& data) -{ - OwnPtr<WebURLLoader> loader(webKitClient()->createURLLoader()); - ASSERT(loader.get()); - - WrappedResourceRequest requestIn(request); - requestIn.setAllowStoredCredentials(storedCredentials == AllowStoredCredentials); - WrappedResourceResponse responseOut(response); - WebURLError errorOut; - WebData dataOut; - - loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); - - error = errorOut; - data.clear(); - data.append(dataOut.data(), dataOut.size()); -} - -// static -bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*) -{ - // This method is used to determine if a POST request can be repeated from - // cache, but you cannot really know until you actually try to read from the - // cache. Even if we checked now, something else could come along and wipe - // out the cache entry by the time we fetch it. - // - // So, we always say yes here, to prevent the FrameLoader from initiating a - // reload. Then in FrameLoaderClientImpl::dispatchWillSendRequest, we - // fix-up the cache policy of the request to force a load from the cache. - // - ASSERT(request.httpMethod() == "POST"); - return true; -} - -// static -void ResourceHandle::cacheMetadata(const ResourceResponse& response, const Vector<char>& data) -{ - ChromiumBridge::cacheMetadata(response.url(), response.responseTime(), data); -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/SharedWorkerRepository.cpp b/WebKit/chromium/src/SharedWorkerRepository.cpp deleted file mode 100644 index 88d3ec5..0000000 --- a/WebKit/chromium/src/SharedWorkerRepository.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(SHARED_WORKERS) - -#include "SharedWorkerRepository.h" - -#include "Event.h" -#include "EventNames.h" -#include "InspectorController.h" -#include "MessagePortChannel.h" -#include "PlatformMessagePortChannel.h" -#include "ScriptExecutionContext.h" -#include "SharedWorker.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMessagePortChannel.h" -#include "WebSharedWorker.h" -#include "WebSharedWorkerRepository.h" -#include "WebString.h" -#include "WebURL.h" -#include "WorkerScriptLoader.h" -#include "WorkerScriptLoaderClient.h" - -namespace WebCore { - -class Document; -using WebKit::WebFrameImpl; -using WebKit::WebMessagePortChannel; -using WebKit::WebSharedWorker; -using WebKit::WebSharedWorkerRepository; - -// Callback class that keeps the SharedWorker and WebSharedWorker objects alive while loads are potentially happening, and also translates load errors into error events on the worker. -class SharedWorkerScriptLoader : private WorkerScriptLoaderClient, private WebSharedWorker::ConnectListener { -public: - SharedWorkerScriptLoader(PassRefPtr<SharedWorker> worker, const KURL& url, const String& name, PassOwnPtr<MessagePortChannel> port, PassOwnPtr<WebSharedWorker> webWorker) - : m_worker(worker) - , m_url(url) - , m_name(name) - , m_webWorker(webWorker) - , m_port(port) - , m_scriptLoader(ResourceRequestBase::TargetIsSharedWorker) - , m_loading(false) - , m_responseAppCacheID(0) - { - } - - ~SharedWorkerScriptLoader(); - void load(); - static void stopAllLoadersForContext(ScriptExecutionContext*); - -private: - // WorkerScriptLoaderClient callback - virtual void didReceiveResponse(const ResourceResponse&); - virtual void notifyFinished(); - - virtual void connected(); - - const ScriptExecutionContext* loadingContext() { return m_worker->scriptExecutionContext(); } - - void sendConnect(); - - RefPtr<SharedWorker> m_worker; - KURL m_url; - String m_name; - OwnPtr<WebSharedWorker> m_webWorker; - OwnPtr<MessagePortChannel> m_port; - WorkerScriptLoader m_scriptLoader; - bool m_loading; - long long m_responseAppCacheID; -}; - -static Vector<SharedWorkerScriptLoader*>& pendingLoaders() -{ - AtomicallyInitializedStatic(Vector<SharedWorkerScriptLoader*>&, loaders = *new Vector<SharedWorkerScriptLoader*>); - return loaders; -} - -void SharedWorkerScriptLoader::stopAllLoadersForContext(ScriptExecutionContext* context) -{ - // Walk our list of pending loaders and shutdown any that belong to this context. - Vector<SharedWorkerScriptLoader*>& loaders = pendingLoaders(); - for (unsigned i = 0; i < loaders.size(); ) { - SharedWorkerScriptLoader* loader = loaders[i]; - if (context == loader->loadingContext()) { - loaders.remove(i); - delete loader; - } else - i++; - } -} - -SharedWorkerScriptLoader::~SharedWorkerScriptLoader() -{ - if (m_loading) - m_worker->unsetPendingActivity(m_worker.get()); -} - -void SharedWorkerScriptLoader::load() -{ - ASSERT(!m_loading); - // If the shared worker is not yet running, load the script resource for it, otherwise just send it a connect event. - if (m_webWorker->isStarted()) - sendConnect(); - else { - m_scriptLoader.loadAsynchronously(m_worker->scriptExecutionContext(), m_url, DenyCrossOriginRequests, this); - // Keep the worker + JS wrapper alive until the resource load is complete in case we need to dispatch an error event. - m_worker->setPendingActivity(m_worker.get()); - m_loading = true; - } -} - -// Extracts a WebMessagePortChannel from a MessagePortChannel. -static WebMessagePortChannel* getWebPort(PassOwnPtr<MessagePortChannel> port) -{ - // Extract the WebMessagePortChannel to send to the worker. - PlatformMessagePortChannel* platformChannel = port->channel(); - WebMessagePortChannel* webPort = platformChannel->webChannelRelease(); - webPort->setClient(0); - return webPort; -} - -void SharedWorkerScriptLoader::didReceiveResponse(const ResourceResponse& response) -{ - m_responseAppCacheID = response.appCacheID(); -} - -void SharedWorkerScriptLoader::notifyFinished() -{ - if (m_scriptLoader.failed()) { - m_worker->dispatchEvent(Event::create(eventNames().errorEvent, false, true)); - delete this; - } else { -#if ENABLE(INSPECTOR) - if (InspectorController* inspector = m_worker->scriptExecutionContext()->inspectorController()) - inspector->scriptImported(m_scriptLoader.identifier(), m_scriptLoader.script()); -#endif - // Pass the script off to the worker, then send a connect event. - m_webWorker->startWorkerContext(m_url, m_name, m_worker->scriptExecutionContext()->userAgent(m_url), m_scriptLoader.script(), m_responseAppCacheID); - sendConnect(); - } -} - -void SharedWorkerScriptLoader::sendConnect() -{ - // Send the connect event off, and linger until it is done sending. - m_webWorker->connect(getWebPort(m_port.release()), this); -} - -void SharedWorkerScriptLoader::connected() -{ - // Connect event has been sent, so free ourselves (this releases the SharedWorker so it can be freed as well if unreferenced). - delete this; -} - -bool SharedWorkerRepository::isAvailable() -{ - // Allow the WebKitClient to determine if SharedWorkers are available. - return WebKit::webKitClient()->sharedWorkerRepository(); -} - -static WebSharedWorkerRepository::DocumentID getId(void* document) -{ - ASSERT(document); - return reinterpret_cast<WebSharedWorkerRepository::DocumentID>(document); -} - -void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const KURL& url, const String& name, ExceptionCode& ec) -{ - // This should not be callable unless there's a SharedWorkerRepository for - // this context (since isAvailable() should have returned null). - ASSERT(WebKit::webKitClient()->sharedWorkerRepository()); - - // No nested workers (for now) - connect() should only be called from document context. - ASSERT(worker->scriptExecutionContext()->isDocument()); - Document* document = static_cast<Document*>(worker->scriptExecutionContext()); - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - OwnPtr<WebSharedWorker> webWorker; - webWorker = webFrame->client()->createSharedWorker(webFrame, url, name, getId(document)); - - if (!webWorker) { - // Existing worker does not match this url, so return an error back to the caller. - ec = URL_MISMATCH_ERR; - return; - } - - WebKit::webKitClient()->sharedWorkerRepository()->addSharedWorker( - webWorker.get(), getId(document)); - - // The loader object manages its own lifecycle (and the lifecycles of the two worker objects). - // It will free itself once loading is completed. - SharedWorkerScriptLoader* loader = new SharedWorkerScriptLoader(worker, url, name, port, webWorker.release()); - loader->load(); -} - -void SharedWorkerRepository::documentDetached(Document* document) -{ - WebSharedWorkerRepository* repo = WebKit::webKitClient()->sharedWorkerRepository(); - if (repo) - repo->documentDetached(getId(document)); - - // Stop the creation of any pending SharedWorkers for this context. - // FIXME: Need a way to invoke this for WorkerContexts as well when we support for nested workers. - SharedWorkerScriptLoader::stopAllLoadersForContext(document); -} - -bool SharedWorkerRepository::hasSharedWorkers(Document* document) -{ - WebSharedWorkerRepository* repo = WebKit::webKitClient()->sharedWorkerRepository(); - return repo && repo->hasSharedWorkers(getId(document)); -} - - - -} // namespace WebCore - -#endif // ENABLE(SHARED_WORKERS) diff --git a/WebKit/chromium/src/SocketStreamHandle.cpp b/WebKit/chromium/src/SocketStreamHandle.cpp deleted file mode 100644 index 9f19942..0000000 --- a/WebKit/chromium/src/SocketStreamHandle.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "SocketStreamHandle.h" - -#if ENABLE(WEB_SOCKETS) - -#include "Logging.h" -#include "NotImplemented.h" -#include "SocketStreamHandleClient.h" -#include "WebData.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebSocketStreamHandle.h" -#include "WebSocketStreamHandleClient.h" -#include "WebURL.h" -#include <wtf/PassOwnPtr.h> - -using namespace WebKit; - -namespace WebCore { - -class SocketStreamHandleInternal : public WebSocketStreamHandleClient { -public: - static PassOwnPtr<SocketStreamHandleInternal> create(SocketStreamHandle* handle) - { - return new SocketStreamHandleInternal(handle); - } - virtual ~SocketStreamHandleInternal(); - - void connect(const KURL&); - int send(const char*, int); - void close(); - - virtual void didOpenStream(WebSocketStreamHandle*, int); - virtual void didSendData(WebSocketStreamHandle*, int); - virtual void didReceiveData(WebSocketStreamHandle*, const WebData&); - virtual void didClose(WebSocketStreamHandle*); - virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&); - -private: - explicit SocketStreamHandleInternal(SocketStreamHandle*); - - SocketStreamHandle* m_handle; - OwnPtr<WebSocketStreamHandle> m_socket; - int m_maxPendingSendAllowed; - int m_pendingAmountSent; -}; - -SocketStreamHandleInternal::SocketStreamHandleInternal(SocketStreamHandle* handle) - : m_handle(handle) - , m_maxPendingSendAllowed(0) - , m_pendingAmountSent(0) -{ -} - -SocketStreamHandleInternal::~SocketStreamHandleInternal() -{ - m_handle = 0; -} - -void SocketStreamHandleInternal::connect(const KURL& url) -{ - m_socket.set(webKitClient()->createSocketStreamHandle()); - LOG(Network, "connect"); - ASSERT(m_socket.get()); - m_socket->connect(url, this); -} - -int SocketStreamHandleInternal::send(const char* data, int len) -{ - LOG(Network, "send len=%d", len); - ASSERT(m_socket.get()); - if (m_pendingAmountSent + len >= m_maxPendingSendAllowed) - len = m_maxPendingSendAllowed - m_pendingAmountSent - 1; - - if (len <= 0) - return len; - WebData webdata(data, len); - if (m_socket->send(webdata)) { - m_pendingAmountSent += len; - LOG(Network, "sent"); - return len; - } - LOG(Network, "busy. buffering"); - return 0; -} - -void SocketStreamHandleInternal::close() -{ - LOG(Network, "close"); - m_socket->close(); -} - -void SocketStreamHandleInternal::didOpenStream(WebSocketStreamHandle* socketHandle, int maxPendingSendAllowed) -{ - LOG(Network, "SocketStreamHandleInternal::didOpen %d", - maxPendingSendAllowed); - ASSERT(maxPendingSendAllowed > 0); - if (m_handle && m_socket.get()) { - ASSERT(socketHandle == m_socket.get()); - m_maxPendingSendAllowed = maxPendingSendAllowed; - m_handle->m_state = SocketStreamHandleBase::Open; - if (m_handle->m_client) { - m_handle->m_client->didOpen(m_handle); - return; - } - } - LOG(Network, "no m_handle or m_socket?"); -} - -void SocketStreamHandleInternal::didSendData(WebSocketStreamHandle* socketHandle, int amountSent) -{ - LOG(Network, "SocketStreamHandleInternal::didSendData %d", amountSent); - ASSERT(amountSent > 0); - if (m_handle && m_socket.get()) { - ASSERT(socketHandle == m_socket.get()); - m_pendingAmountSent -= amountSent; - ASSERT(m_pendingAmountSent >= 0); - m_handle->sendPendingData(); - } -} - -void SocketStreamHandleInternal::didReceiveData(WebSocketStreamHandle* socketHandle, const WebData& data) -{ - LOG(Network, "didReceiveData"); - if (m_handle && m_socket.get()) { - ASSERT(socketHandle == m_socket.get()); - if (m_handle->m_client) - m_handle->m_client->didReceiveData(m_handle, data.data(), data.size()); - } -} - -void SocketStreamHandleInternal::didClose(WebSocketStreamHandle* socketHandle) -{ - LOG(Network, "didClose"); - if (m_handle && m_socket.get()) { - ASSERT(socketHandle == m_socket.get()); - m_socket.clear(); - SocketStreamHandle* h = m_handle; - m_handle = 0; - if (h->m_client) - h->m_client->didClose(h); - } -} - -void SocketStreamHandleInternal::didFail(WebSocketStreamHandle* socketHandle, const WebSocketStreamError& err) -{ - LOG(Network, "didFail"); - if (m_handle && m_socket.get()) { - ASSERT(socketHandle == m_socket.get()); - m_socket.clear(); - SocketStreamHandle* h = m_handle; - m_handle = 0; - if (h->m_client) - h->m_client->didClose(h); // didFail(h, err); - } -} - -// FIXME: auth - -// SocketStreamHandle ---------------------------------------------------------- - -SocketStreamHandle::SocketStreamHandle(const KURL& url, SocketStreamHandleClient* client) - : SocketStreamHandleBase(url, client) -{ - m_internal = SocketStreamHandleInternal::create(this); - m_internal->connect(m_url); -} - -SocketStreamHandle::~SocketStreamHandle() -{ - setClient(0); - m_internal.clear(); -} - -int SocketStreamHandle::platformSend(const char* buf, int len) -{ - if (!m_internal.get()) - return 0; - return m_internal->send(buf, len); -} - -void SocketStreamHandle::platformClose() -{ - if (m_internal.get()) - m_internal->close(); -} - -void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge) -{ - if (m_client) - m_client->didReceiveAuthenticationChallenge(this, challenge); -} - -void SocketStreamHandle::receivedCredential(const AuthenticationChallenge& challenge, const Credential& credential) -{ - notImplemented(); -} - -void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge& challenge) -{ - notImplemented(); -} - -} // namespace WebCore - -#endif // ENABLE(WEB_SOCKETS) diff --git a/WebKit/chromium/src/SpeechInputClientImpl.cpp b/WebKit/chromium/src/SpeechInputClientImpl.cpp deleted file mode 100644 index b5ed384..0000000 --- a/WebKit/chromium/src/SpeechInputClientImpl.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "SpeechInputClientImpl.h" - -#include "PlatformString.h" -#include "SpeechInputListener.h" -#include "WebSpeechInputController.h" -#include "WebString.h" -#include "WebViewClient.h" -#include <wtf/PassOwnPtr.h> - -#if ENABLE(INPUT_SPEECH) - -namespace WebKit { - -PassOwnPtr<SpeechInputClientImpl> SpeechInputClientImpl::create(WebViewClient* client) -{ - return adoptPtr(new SpeechInputClientImpl(client)); -} - -SpeechInputClientImpl::SpeechInputClientImpl(WebViewClient* web_view_client) - : m_controller(web_view_client ? web_view_client->speechInputController(this) : 0) - , m_listener(0) -{ -} - -SpeechInputClientImpl::~SpeechInputClientImpl() -{ -} - -void SpeechInputClientImpl::setListener(WebCore::SpeechInputListener* listener) -{ - m_listener = listener; -} - -bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect, const AtomicString& language, const String& grammar) -{ - ASSERT(m_listener); - return m_controller->startRecognition(requestId, elementRect, language, grammar); -} - -void SpeechInputClientImpl::stopRecording(int requestId) -{ - ASSERT(m_listener); - m_controller->stopRecording(requestId); -} - -void SpeechInputClientImpl::cancelRecognition(int requestId) -{ - ASSERT(m_listener); - m_controller->cancelRecognition(requestId); -} - -void SpeechInputClientImpl::didCompleteRecording(int requestId) -{ - ASSERT(m_listener); - m_listener->didCompleteRecording(requestId); -} - -void SpeechInputClientImpl::didCompleteRecognition(int requestId) -{ - ASSERT(m_listener); - m_listener->didCompleteRecognition(requestId); -} - -void SpeechInputClientImpl::setRecognitionResult(int requestId, const WebSpeechInputResultArray& results) -{ - ASSERT(m_listener); - WebCore::SpeechInputResultArray webcoreResults(results.size()); - for (size_t i = 0; i < results.size(); ++i) - webcoreResults[i] = results[i]; - m_listener->setRecognitionResult(requestId, webcoreResults); -} - -} // namespace WebKit - -#endif // ENABLE(INPUT_SPEECH) diff --git a/WebKit/chromium/src/SpeechInputClientImpl.h b/WebKit/chromium/src/SpeechInputClientImpl.h deleted file mode 100644 index 520803a..0000000 --- a/WebKit/chromium/src/SpeechInputClientImpl.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SpeechInputClientImpl_h -#define SpeechInputClientImpl_h - -#if ENABLE(INPUT_SPEECH) - -#include "SpeechInputClient.h" -#include "WebSpeechInputListener.h" -#include <wtf/Forward.h> -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class SpeechInputListener; -} - -namespace WebKit { - -class WebSpeechInputController; -class WebViewClient; - -class SpeechInputClientImpl - : public WebCore::SpeechInputClient, - public WebSpeechInputListener { -public: - static PassOwnPtr<SpeechInputClientImpl> create(WebViewClient*); - virtual ~SpeechInputClientImpl(); - - // SpeechInputClient methods. - void setListener(WebCore::SpeechInputListener*); - bool startRecognition(int requestId, const WebCore::IntRect& elementRect, const AtomicString& language, const String& grammar); - void stopRecording(int); - void cancelRecognition(int); - - // WebSpeechInputListener methods. - void didCompleteRecording(int); - void setRecognitionResult(int, const WebSpeechInputResultArray&); - void didCompleteRecognition(int); - -private: - SpeechInputClientImpl(WebViewClient*); - - WebSpeechInputController* m_controller; // To call into the embedder. - WebCore::SpeechInputListener* m_listener; -}; - -} // namespace WebKit - -#endif // ENABLE(INPUT_SPEECH) - -#endif // SpeechInputClientImpl_h diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp deleted file mode 100644 index ed89b2c..0000000 --- a/WebKit/chromium/src/StorageAreaProxy.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All Rights Reserved. - * (C) 2008 Apple Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StorageAreaProxy.h" - -#if ENABLE(DOM_STORAGE) - -#include "DOMWindow.h" -#include "Document.h" -#include "EventNames.h" -#include "ExceptionCode.h" -#include "Frame.h" -#include "Page.h" -#include "PageGroup.h" -#include "SecurityOrigin.h" -#include "StorageAreaImpl.h" -#include "StorageEvent.h" - -#include "WebFrameImpl.h" -#include "WebStorageArea.h" -#include "WebString.h" -#include "WebURL.h" - -namespace WebCore { - -StorageAreaProxy::StorageAreaProxy(WebKit::WebStorageArea* storageArea, StorageType storageType) - : m_storageArea(storageArea) - , m_storageType(storageType) -{ -} - -StorageAreaProxy::~StorageAreaProxy() -{ -} - -unsigned StorageAreaProxy::length() const -{ - return m_storageArea->length(); -} - -String StorageAreaProxy::key(unsigned index) const -{ - return m_storageArea->key(index); -} - -String StorageAreaProxy::getItem(const String& key) const -{ - return m_storageArea->getItem(key); -} - -String StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame) -{ - WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK; - WebKit::WebString oldValue; - WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue, webFrame); - ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR; - String oldValueString = oldValue; - if (oldValueString != value && result == WebKit::WebStorageArea::ResultOK) - storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame); - return oldValue; -} - -String StorageAreaProxy::removeItem(const String& key, Frame* frame) -{ - WebKit::WebString oldValue; - m_storageArea->removeItem(key, frame->document()->url(), oldValue); - if (!oldValue.isNull()) - storageEvent(key, oldValue, String(), m_storageType, frame->document()->securityOrigin(), frame); - return oldValue; -} - -bool StorageAreaProxy::clear(Frame* frame) -{ - bool clearedSomething; - m_storageArea->clear(frame->document()->url(), clearedSomething); - if (clearedSomething) - storageEvent(String(), String(), String(), m_storageType, frame->document()->securityOrigin(), frame); - return clearedSomething; -} - -bool StorageAreaProxy::contains(const String& key) const -{ - return !getItem(key).isNull(); -} - -// Copied from WebCore/storage/StorageEventDispatcher.cpp out of necessity. It's probably best to keep it current. -void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Frame* sourceFrame) -{ - Page* page = sourceFrame->page(); - if (!page) - return; - - // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree - // of any given page in the group or mutate the page group itself. - Vector<RefPtr<Frame> > frames; - if (storageType == SessionStorage) { - // Send events only to our page. - for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) { - if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin)) - frames.append(frame); - } - - for (unsigned i = 0; i < frames.size(); ++i) { - ExceptionCode ec = 0; - Storage* storage = frames[i]->domWindow()->sessionStorage(ec); - if (!ec) - frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage)); - } - } else { - // Send events to every page. - const HashSet<Page*>& pages = page->group().pages(); - HashSet<Page*>::const_iterator end = pages.end(); - for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) { - for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) { - if (sourceFrame != frame && frame->document()->securityOrigin()->equal(securityOrigin)) - frames.append(frame); - } - } - - for (unsigned i = 0; i < frames.size(); ++i) { - ExceptionCode ec = 0; - Storage* storage = frames[i]->domWindow()->localStorage(ec); - if (!ec) - frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage)); - } - } -} - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/StorageAreaProxy.h b/WebKit/chromium/src/StorageAreaProxy.h deleted file mode 100644 index b169828..0000000 --- a/WebKit/chromium/src/StorageAreaProxy.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef StorageAreaProxy_h -#define StorageAreaProxy_h - -#if ENABLE(DOM_STORAGE) - -#include "StorageArea.h" - -namespace WebKit { class WebStorageArea; } - -namespace WebCore { - -class Frame; -class SecurityOrigin; - -class StorageAreaProxy : public StorageArea { -public: - StorageAreaProxy(WebKit::WebStorageArea*, StorageType); - virtual ~StorageAreaProxy(); - - // The HTML5 DOM Storage API - virtual unsigned length() const; - virtual String key(unsigned index) const; - virtual String getItem(const String& key) const; - virtual String setItem(const String& key, const String& value, ExceptionCode& ec, Frame* sourceFrame); - virtual String removeItem(const String& key, Frame* sourceFrame); - virtual bool clear(Frame* sourceFrame); - virtual bool contains(const String& key) const; - -private: - void storageEvent(const String& key, const String& oldValue, const String& newValue, StorageType, SecurityOrigin*, Frame* sourceFrame); - - OwnPtr<WebKit::WebStorageArea> m_storageArea; - StorageType m_storageType; -}; - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) - -#endif // StorageAreaProxy_h diff --git a/WebKit/chromium/src/StorageEventDispatcherChromium.cpp b/WebKit/chromium/src/StorageEventDispatcherChromium.cpp deleted file mode 100644 index 3286929..0000000 --- a/WebKit/chromium/src/StorageEventDispatcherChromium.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StorageEventDispatcher.h" - -#if ENABLE(DOM_STORAGE) - -#include "SecurityOrigin.h" -#include "StorageArea.h" - -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebString.h" -#include "WebURL.h" - -namespace WebCore { - -void StorageEventDispatcher::dispatch(const String& key, const String& oldValue, - const String& newValue, StorageType storageType, - SecurityOrigin* origin, Frame* sourceFrame) -{ - ASSERT(!sourceFrame); // Sad, but true. - WebKit::webKitClient()->dispatchStorageEvent(key, oldValue, newValue, origin->toString(), WebKit::WebURL(), storageType == LocalStorage); -} - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp b/WebKit/chromium/src/StorageEventDispatcherImpl.cpp deleted file mode 100644 index 631753b..0000000 --- a/WebKit/chromium/src/StorageEventDispatcherImpl.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StorageEventDispatcherImpl.h" - -#if ENABLE(DOM_STORAGE) - -#include "DOMWindow.h" -#include "EventNames.h" -#include "Frame.h" -#include "KURL.h" -#include "Page.h" -#include "PageGroup.h" -#include "SecurityOrigin.h" -#include "StorageEvent.h" - -namespace WebCore { - -StorageEventDispatcherImpl::StorageEventDispatcherImpl(const String& groupName) - : m_pageGroup(PageGroup::pageGroup(groupName)) -{ - ASSERT(m_pageGroup); -} - -void StorageEventDispatcherImpl::dispatchStorageEvent(const String& key, const String& oldValue, - const String& newValue, SecurityOrigin* securityOrigin, - const KURL& url, StorageType storageType) -{ - // FIXME: Implement - if (storageType == SessionStorage) - return; - - // We need to copy all relevant frames from every page to a vector since sending the event to one frame might mutate the frame tree - // of any given page in the group or mutate the page group itself. - Vector<RefPtr<Frame> > frames; - - const HashSet<Page*>& pages = m_pageGroup->pages(); - HashSet<Page*>::const_iterator end = pages.end(); - for (HashSet<Page*>::const_iterator it = pages.begin(); it != end; ++it) { - for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) { - if (frame->document()->securityOrigin()->equal(securityOrigin)) - frames.append(frame); - } - } - - for (unsigned i = 0; i < frames.size(); ++i) { - ExceptionCode ec = 0; - Storage* storage = frames[i]->domWindow()->localStorage(ec); - if (!ec) - frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage)); - } -} - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/StorageEventDispatcherImpl.h b/WebKit/chromium/src/StorageEventDispatcherImpl.h deleted file mode 100644 index 4c2db7c..0000000 --- a/WebKit/chromium/src/StorageEventDispatcherImpl.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef StorageEventDispatcherImpl_h -#define StorageEventDispatcherImpl_h - -#if ENABLE(DOM_STORAGE) - -#include "PlatformString.h" -#include "StorageArea.h" - -namespace WebCore { - -class KURL; -class PageGroup; -class SecurityOrigin; - -class StorageEventDispatcherImpl { -public: - StorageEventDispatcherImpl(const String& groupName); - - void dispatchStorageEvent(const String& key, const String& oldValue, - const String& newValue, SecurityOrigin*, - const KURL&, StorageType); - -private: - PageGroup* m_pageGroup; -}; - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) - -#endif // StorageEventDispatcherImpl_h diff --git a/WebKit/chromium/src/StorageNamespaceProxy.cpp b/WebKit/chromium/src/StorageNamespaceProxy.cpp deleted file mode 100644 index ec0dbce..0000000 --- a/WebKit/chromium/src/StorageNamespaceProxy.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "StorageNamespaceProxy.h" - -#if ENABLE(DOM_STORAGE) - -#include "Chrome.h" -#include "ChromeClientImpl.h" -#include "Page.h" -#include "SecurityOrigin.h" -#include "StorageAreaProxy.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebStorageNamespace.h" -#include "WebString.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -namespace WebCore { - -PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path, unsigned quota) -{ - return adoptRef(new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path, quota), LocalStorage)); -} - -PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page, unsigned quota) -{ - WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client()); - WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client(); - return adoptRef(new StorageNamespaceProxy(webViewClient->createSessionStorageNamespace(quota), SessionStorage)); -} - -StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace, StorageType storageType) - : m_storageNamespace(storageNamespace) - , m_storageType(storageType) -{ -} - -StorageNamespaceProxy::~StorageNamespaceProxy() -{ -} - -PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy() -{ - ASSERT(m_storageType == SessionStorage); - WebKit::WebStorageNamespace* newNamespace = m_storageNamespace->copy(); - // Some embedders hook into WebViewClient::createView to make the copy of - // session storage and then return the object lazily. Other embedders - // choose to make the copy now and return a pointer immediately. So handle - // both cases. - if (!newNamespace) - return 0; - return adoptRef(new StorageNamespaceProxy(newNamespace, m_storageType)); -} - -PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(PassRefPtr<SecurityOrigin> origin) -{ - return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString()), m_storageType)); -} - -void StorageNamespaceProxy::close() -{ - m_storageNamespace->close(); -} - -void StorageNamespaceProxy::unlock() -{ - // FIXME: Implement. -} - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/StorageNamespaceProxy.h b/WebKit/chromium/src/StorageNamespaceProxy.h deleted file mode 100644 index 28d7a23..0000000 --- a/WebKit/chromium/src/StorageNamespaceProxy.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef StorageNamespaceProxy_h -#define StorageNamespaceProxy_h - -#if ENABLE(DOM_STORAGE) - -#include "StorageArea.h" -#include "StorageNamespace.h" - -namespace WebKit { class WebStorageNamespace; } - -namespace WebCore { - -class StorageNamespaceProxy : public StorageNamespace { -public: - StorageNamespaceProxy(WebKit::WebStorageNamespace*, StorageType); - virtual ~StorageNamespaceProxy(); - virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>); - virtual PassRefPtr<StorageNamespace> copy(); - virtual void close(); - virtual void unlock(); - -private: - OwnPtr<WebKit::WebStorageNamespace> m_storageNamespace; - StorageType m_storageType; -}; - -} // namespace WebCore - -#endif // ENABLE(DOM_STORAGE) - -#endif // StorageNamespaceProxy_h diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp deleted file mode 100644 index 99e3e1e..0000000 --- a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "VideoFrameChromiumImpl.h" - -#include "VideoFrameChromium.h" -#include "WebVideoFrame.h" - -using namespace WebCore; - -namespace WebKit { - -WebVideoFrame* VideoFrameChromiumImpl::toWebVideoFrame(VideoFrameChromium* videoFrame) -{ - VideoFrameChromiumImpl* wrappedFrame = static_cast<VideoFrameChromiumImpl*>(videoFrame); - if (wrappedFrame) - return wrappedFrame->m_webVideoFrame; - return 0; -} - -VideoFrameChromiumImpl::VideoFrameChromiumImpl(WebVideoFrame* webVideoFrame) - : m_webVideoFrame(webVideoFrame) -{ -} - -VideoFrameChromium::SurfaceType VideoFrameChromiumImpl::surfaceType() const -{ - if (m_webVideoFrame) - return static_cast<VideoFrameChromium::SurfaceType>(m_webVideoFrame->surfaceType()); - return TypeSystemMemory; -} - -VideoFrameChromium::Format VideoFrameChromiumImpl::format() const -{ - if (m_webVideoFrame) - return static_cast<VideoFrameChromium::Format>(m_webVideoFrame->format()); - return Invalid; -} - -unsigned VideoFrameChromiumImpl::width() const -{ - if (m_webVideoFrame) - return m_webVideoFrame->width(); - return 0; -} - -unsigned VideoFrameChromiumImpl::height() const -{ - if (m_webVideoFrame) - return m_webVideoFrame->height(); - return 0; -} - -unsigned VideoFrameChromiumImpl::planes() const -{ - if (m_webVideoFrame) - return m_webVideoFrame->planes(); - return 0; -} - -int VideoFrameChromiumImpl::stride(unsigned plane) const -{ - if (m_webVideoFrame) - return m_webVideoFrame->stride(plane); - return 0; -} - -const void* VideoFrameChromiumImpl::data(unsigned plane) const -{ - if (m_webVideoFrame) - return m_webVideoFrame->data(plane); - return 0; -} - -unsigned VideoFrameChromiumImpl::texture(unsigned plane) const -{ - if (m_webVideoFrame) - return m_webVideoFrame->texture(plane); - return 0; -} - -const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const -{ - switch (format()) { - case RGBA: - return IntSize(stride(plane), height()); - case YV12: - if (plane == static_cast<unsigned>(yPlane)) - return IntSize(stride(plane), height()); - else if (plane == static_cast<unsigned>(uPlane)) - return IntSize(stride(plane), height() / 2); - else if (plane == static_cast<unsigned>(vPlane)) - return IntSize(stride(plane), height() / 2); - default: - break; - } - return IntSize(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.h b/WebKit/chromium/src/VideoFrameChromiumImpl.h deleted file mode 100644 index f86ee1c..0000000 --- a/WebKit/chromium/src/VideoFrameChromiumImpl.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VideoFrameChromiumImpl_h -#define VideoFrameChromiumImpl_h - -#include "VideoFrameChromium.h" -#include "WebVideoFrame.h" - -using namespace WebCore; - -namespace WebKit { - -// A wrapper class for WebKit::WebVideoFrame. Objects can be created in WebKit -// and used in WebCore because of the VideoFrameChromium interface. -class VideoFrameChromiumImpl : public VideoFrameChromium { -public: - // Converts a WebCore::VideoFrameChromium to a WebKit::WebVideoFrame. - static WebVideoFrame* toWebVideoFrame(VideoFrameChromium*); - - // Creates a VideoFrameChromiumImpl object to wrap the given WebVideoFrame. - // The VideoFrameChromiumImpl does not take ownership of the WebVideoFrame - // and should not free the frame's memory. - VideoFrameChromiumImpl(WebVideoFrame*); - virtual SurfaceType surfaceType() const; - virtual Format format() const; - virtual unsigned width() const; - virtual unsigned height() const; - virtual unsigned planes() const; - virtual int stride(unsigned plane) const; - virtual const void* data(unsigned plane) const; - virtual unsigned texture(unsigned plane) const; - virtual const IntSize requiredTextureSize(unsigned plane) const; - -private: - WebVideoFrame* m_webVideoFrame; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebAccessibilityCache.cpp b/WebKit/chromium/src/WebAccessibilityCache.cpp deleted file mode 100644 index ab8f814..0000000 --- a/WebKit/chromium/src/WebAccessibilityCache.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAccessibilityCache.h" - -#include "AXObjectCache.h" - -using namespace WebCore; - -namespace WebKit { - -void WebAccessibilityCache::enableAccessibility() -{ - AXObjectCache::enableAccessibility(); -} - -bool WebAccessibilityCache::accessibilityEnabled() -{ - return AXObjectCache::accessibilityEnabled(); -} - -} diff --git a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp b/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp deleted file mode 100644 index f91bd1c..0000000 --- a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAccessibilityCacheImpl.h" - -#include "AccessibilityObject.h" -#include "AXObjectCache.h" -#include "Document.h" -#include "Frame.h" - -#include "WebAccessibilityObject.h" -#include "WebFrameImpl.h" -#include "WebViewImpl.h" - -using namespace WebCore; - -namespace WebKit { - -const int invalidObjectId = -1; -const int firstObjectId = 1000; - -static PassRefPtr<AccessibilityObject> toAccessibilityObject(const WebAccessibilityObject& object) -{ - return object; -} - -// WebView ---------------------------------------------------------------- - -WebAccessibilityCache* WebAccessibilityCache::create() -{ - return new WebAccessibilityCacheImpl(); -} - -// WeakHandle ------------------------------------------------------------- - -PassRefPtr<WebAccessibilityCacheImpl::WeakHandle> WebAccessibilityCacheImpl::WeakHandle::create(AccessibilityObject* object) -{ - RefPtr<WebAccessibilityCacheImpl::WeakHandle> weakHandle = adoptRef(new WebAccessibilityCacheImpl::WeakHandle(object)); - weakHandle->m_object->setWrapper(weakHandle.get()); - - return weakHandle.release(); -} - -WebAccessibilityCacheImpl::WeakHandle::WeakHandle(AccessibilityObject* object) - : AccessibilityObjectWrapper(object) -{ -} - -// WebAccessibilityCacheImpl ---------------------------------------- - -void WebAccessibilityCacheImpl::WeakHandle::detach() -{ - if (m_object) - m_object = 0; -} - -WebAccessibilityCacheImpl::WebAccessibilityCacheImpl() - : m_nextNewId(firstObjectId) - , m_initialized(false) -{ -} - -WebAccessibilityCacheImpl::~WebAccessibilityCacheImpl() -{ -} - -void WebAccessibilityCacheImpl::initialize(WebView* view) -{ - AXObjectCache::enableAccessibility(); - WebAccessibilityObject root = view->accessibilityObject(); - if (root.isNull()) - return; - - RefPtr<AccessibilityObject> rootObject = toAccessibilityObject(root); - - // Insert root in hashmaps. - m_objectMap.set(m_nextNewId, WeakHandle::create(rootObject.get())); - m_idMap.set(rootObject.get(), m_nextNewId++); - - m_initialized = true; -} - -WebAccessibilityObject WebAccessibilityCacheImpl::getObjectById(int id) -{ - ObjectMap::iterator it = m_objectMap.find(id); - - if (it == m_objectMap.end() || !it->second) - return WebAccessibilityObject(); - - return WebAccessibilityObject(it->second->accessibilityObject()); -} - -void WebAccessibilityCacheImpl::remove(int id) -{ - ObjectMap::iterator it = m_objectMap.find(id); - - if (it == m_objectMap.end()) - return; - - if (it->second) { - // Erase element from reverse hashmap. - IdMap::iterator it2 = m_idMap.find(it->second->accessibilityObject()); - if (it2 != m_idMap.end()) - m_idMap.remove(it2); - } - - m_objectMap.remove(it); -} - -void WebAccessibilityCacheImpl::clear() -{ - m_objectMap.clear(); - m_idMap.clear(); -} - -int WebAccessibilityCacheImpl::addOrGetId(const WebAccessibilityObject& object) -{ - if (!object.isValid()) - return invalidObjectId; - - RefPtr<AccessibilityObject> o = toAccessibilityObject(object); - - IdMap::iterator it = m_idMap.find(o.get()); - - if (it != m_idMap.end()) - return it->second; - - // Insert new accessibility object in hashmaps and return its newly - // assigned accessibility object id. - m_objectMap.set(m_nextNewId, WeakHandle::create(o.get())); - m_idMap.set(o.get(), m_nextNewId); - - return m_nextNewId++; -} - -bool WebAccessibilityCacheImpl::isCached(const WebAccessibilityObject& object) -{ - if (!object.isValid()) - return false; - - RefPtr<AccessibilityObject> o = toAccessibilityObject(object); - IdMap::iterator it = m_idMap.find(o.get()); - if (it == m_idMap.end()) - return false; - - return true; -} - -} diff --git a/WebKit/chromium/src/WebAccessibilityCacheImpl.h b/WebKit/chromium/src/WebAccessibilityCacheImpl.h deleted file mode 100644 index c72c0fc..0000000 --- a/WebKit/chromium/src/WebAccessibilityCacheImpl.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAccessibilityCacheImpl_h -#define WebAccessibilityCacheImpl_h - -#include "AccessibilityObjectWrapper.h" -#include "WebAccessibilityCache.h" -#include <wtf/HashMap.h> -#include <wtf/PassRefPtr.h> - -namespace WebKit { - -// FIXME: Should be eliminated to use AXObjectCache instead. -class WebAccessibilityCacheImpl : public WebKit::WebAccessibilityCache { -public: - virtual void initialize(WebView* view); - virtual bool isInitialized() const { return m_initialized; } - - virtual WebAccessibilityObject getObjectById(int); - virtual int addOrGetId(const WebKit::WebAccessibilityObject&); - virtual bool isCached(const WebAccessibilityObject&); - - virtual void remove(int); - virtual void clear(); - -protected: - friend class WebKit::WebAccessibilityCache; - - WebAccessibilityCacheImpl(); - ~WebAccessibilityCacheImpl(); - -private: - // FIXME: This can be just part of Chromium's AccessibilityObjectWrapper. - class WeakHandle : public WebCore::AccessibilityObjectWrapper { - public: - static PassRefPtr<WeakHandle> create(WebCore::AccessibilityObject*); - virtual void detach(); - private: - WeakHandle(WebCore::AccessibilityObject*); - }; - - typedef HashMap<int, RefPtr<WeakHandle> > ObjectMap; - typedef HashMap<WebCore::AccessibilityObject*, int> IdMap; - - // Hashmap for caching of elements in use by the AT, mapping id (int) to - // WebAccessibilityObject. - ObjectMap m_objectMap; - // Hashmap for caching of elements in use by the AT, mapping a - // AccessibilityObject pointer to its id (int). Needed for reverse lookup, - // to ensure unnecessary duplicate entries are not created in the - // ObjectMap and for focus changes in WebKit. - IdMap m_idMap; - - // Unique identifier for retrieving an accessibility object from the page's - // hashmaps. Id is always 0 for the root of the accessibility object - // hierarchy (on a per-renderer process basis). - int m_nextNewId; - - bool m_initialized; -}; - -} - -#endif diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp deleted file mode 100644 index 50baa27..0000000 --- a/WebKit/chromium/src/WebAccessibilityObject.cpp +++ /dev/null @@ -1,556 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAccessibilityObject.h" - -#include "AccessibilityObject.h" -#include "CSSPrimitiveValueMappings.h" -#include "Document.h" -#include "EventHandler.h" -#include "FrameView.h" -#include "Node.h" -#include "PlatformKeyboardEvent.h" -#include "RenderStyle.h" -#include "WebDocument.h" -#include "WebNode.h" -#include "WebPoint.h" -#include "WebRect.h" -#include "WebString.h" -#include "WebURL.h" - -using namespace WebCore; - -namespace WebKit { - -class WebAccessibilityObjectPrivate : public WebCore::AccessibilityObject { -}; - -void WebAccessibilityObject::reset() -{ - assign(0); -} - -void WebAccessibilityObject::assign(const WebKit::WebAccessibilityObject& other) -{ - WebAccessibilityObjectPrivate* p = const_cast<WebAccessibilityObjectPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -WebString WebAccessibilityObject::accessibilityDescription() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - return m_private->accessibilityDescription(); -} - -WebString WebAccessibilityObject::actionVerb() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - return m_private->actionVerb(); -} - -bool WebAccessibilityObject::canSetFocusAttribute() const -{ - if (!m_private) - return false; - - m_private->updateBackingStore(); - return m_private->canSetFocusAttribute(); -} - -bool WebAccessibilityObject::canSetValueAttribute() const -{ - if (!m_private) - return false; - - m_private->updateBackingStore(); - return m_private->canSetValueAttribute(); -} - -bool WebAccessibilityObject::isValid() const -{ - if (!m_private) - return false; - - m_private->updateBackingStore(); - return m_private->axObjectID(); -} - -unsigned WebAccessibilityObject::childCount() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->children().size(); -} - -WebAccessibilityObject WebAccessibilityObject::childAt(unsigned index) const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - if (m_private->children().size() <= index) - return WebAccessibilityObject(); - - return WebAccessibilityObject(m_private->children()[index]); -} - -WebAccessibilityObject WebAccessibilityObject::firstChild() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - return WebAccessibilityObject(m_private->firstChild()); -} - -WebAccessibilityObject WebAccessibilityObject::focusedChild() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - RefPtr<AccessibilityObject> focused = m_private->focusedUIElement(); - if (m_private == focused.get() || focused->parentObject() == m_private) - return WebAccessibilityObject(focused); - - return WebAccessibilityObject(); -} - -WebAccessibilityObject WebAccessibilityObject::lastChild() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - return WebAccessibilityObject(m_private->lastChild()); -} - - -WebAccessibilityObject WebAccessibilityObject::nextSibling() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - return WebAccessibilityObject(m_private->nextSibling()); -} - -WebAccessibilityObject WebAccessibilityObject::parentObject() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - return WebAccessibilityObject(m_private->parentObject()); -} - - -WebAccessibilityObject WebAccessibilityObject::previousSibling() const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - return WebAccessibilityObject(m_private->previousSibling()); -} - -bool WebAccessibilityObject::canSetSelectedAttribute() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->canSetSelectedAttribute(); -} - -bool WebAccessibilityObject::isAnchor() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isAnchor(); -} - -bool WebAccessibilityObject::isChecked() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isChecked(); -} - -bool WebAccessibilityObject::isCollapsed() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isCollapsed(); -} - - -bool WebAccessibilityObject::isFocused() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isFocused(); -} - -bool WebAccessibilityObject::isEnabled() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isEnabled(); -} - -bool WebAccessibilityObject::isHovered() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isHovered(); -} - -bool WebAccessibilityObject::isIndeterminate() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isIndeterminate(); -} - -bool WebAccessibilityObject::isLinked() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isLinked(); -} - -bool WebAccessibilityObject::isMultiSelectable() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isMultiSelectable(); -} - -bool WebAccessibilityObject::isOffScreen() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isOffScreen(); -} - -bool WebAccessibilityObject::isPasswordField() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isPasswordField(); -} - -bool WebAccessibilityObject::isPressed() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isPressed(); -} - -bool WebAccessibilityObject::isReadOnly() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isReadOnly(); -} - -bool WebAccessibilityObject::isSelected() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isSelected(); -} - -bool WebAccessibilityObject::isVisible() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isVisible(); -} - -bool WebAccessibilityObject::isVisited() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->isVisited(); -} - -WebRect WebAccessibilityObject::boundingBoxRect() const -{ - if (!m_private) - return WebRect(); - - m_private->updateBackingStore(); - return m_private->boundingBoxRect(); -} - -WebString WebAccessibilityObject::helpText() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - return m_private->helpText(); -} - -int WebAccessibilityObject::headingLevel() const -{ - if (!m_private) - return 0; - - m_private->updateBackingStore(); - return m_private->headingLevel(); -} - -WebAccessibilityObject WebAccessibilityObject::hitTest(const WebPoint& point) const -{ - if (!m_private) - return WebAccessibilityObject(); - - m_private->updateBackingStore(); - IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(point); - RefPtr<AccessibilityObject> hit = m_private->accessibilityHitTest(contentsPoint); - - if (hit.get()) - return WebAccessibilityObject(hit); - - if (m_private->boundingBoxRect().contains(contentsPoint)) - return *this; - - return WebAccessibilityObject(); -} - -WebString WebAccessibilityObject::keyboardShortcut() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - String accessKey = m_private->accessKey(); - if (accessKey.isNull()) - return WebString(); - - static String modifierString; - if (modifierString.isNull()) { - unsigned modifiers = EventHandler::accessKeyModifiers(); - // Follow the same order as Mozilla MSAA implementation: - // Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings - // should not be localized and defines the separator as "+". - if (modifiers & PlatformKeyboardEvent::CtrlKey) - modifierString += "Ctrl+"; - if (modifiers & PlatformKeyboardEvent::AltKey) - modifierString += "Alt+"; - if (modifiers & PlatformKeyboardEvent::ShiftKey) - modifierString += "Shift+"; - if (modifiers & PlatformKeyboardEvent::MetaKey) - modifierString += "Win+"; - } - - return modifierString + accessKey; -} - -bool WebAccessibilityObject::performDefaultAction() const -{ - if (!m_private) - return false; - - m_private->updateBackingStore(); - return m_private->performDefaultAction(); -} - -WebAccessibilityRole WebAccessibilityObject::roleValue() const -{ - if (!m_private) - return WebKit::WebAccessibilityRoleUnknown; - - m_private->updateBackingStore(); - return static_cast<WebAccessibilityRole>(m_private->roleValue()); -} - -void WebAccessibilityObject::setFocused(bool on) const -{ - if (m_private) - m_private->setFocused(on); -} - -WebString WebAccessibilityObject::stringValue() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - return m_private->stringValue(); -} - -WebString WebAccessibilityObject::title() const -{ - if (!m_private) - return WebString(); - - m_private->updateBackingStore(); - return m_private->title(); -} - -WebURL WebAccessibilityObject::url() const -{ - if (!m_private) - return WebURL(); - - m_private->updateBackingStore(); - return m_private->url(); -} - -WebNode WebAccessibilityObject::node() const -{ - if (!m_private) - return WebNode(); - - m_private->updateBackingStore(); - - Node* node = m_private->node(); - if (!node) - return WebNode(); - - return WebNode(node); -} - -WebDocument WebAccessibilityObject::document() const -{ - if (!m_private) - return WebDocument(); - - m_private->updateBackingStore(); - - Document* document = m_private->document(); - if (!document) - return WebDocument(); - - return WebDocument(document); -} - -bool WebAccessibilityObject::hasComputedStyle() const -{ - Document* document = m_private->document(); - if (document) - document->updateStyleIfNeeded(); - - Node* node = m_private->node(); - if (!node) - return false; - - return node->computedStyle(); -} - -WebString WebAccessibilityObject::computedStyleDisplay() const -{ - Document* document = m_private->document(); - if (document) - document->updateStyleIfNeeded(); - - Node* node = m_private->node(); - if (!node) - return WebString(); - - RenderStyle* renderStyle = node->computedStyle(); - if (!renderStyle) - return WebString(); - - return WebString(CSSPrimitiveValue::create(renderStyle->display())->getStringValue()); -} - -WebAccessibilityObject::WebAccessibilityObject(const WTF::PassRefPtr<WebCore::AccessibilityObject>& object) - : m_private(static_cast<WebAccessibilityObjectPrivate*>(object.releaseRef())) -{ -} - -WebAccessibilityObject& WebAccessibilityObject::operator=(const WTF::PassRefPtr<WebCore::AccessibilityObject>& object) -{ - assign(static_cast<WebAccessibilityObjectPrivate*>(object.releaseRef())); - return *this; -} - -WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const -{ - return PassRefPtr<WebCore::AccessibilityObject>(const_cast<WebAccessibilityObjectPrivate*>(m_private)); -} - -void WebAccessibilityObject::assign(WebAccessibilityObjectPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.cpp b/WebKit/chromium/src/WebAnimationControllerImpl.cpp deleted file mode 100644 index e6eb828..0000000 --- a/WebKit/chromium/src/WebAnimationControllerImpl.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAnimationControllerImpl.h" - -#include "AnimationController.h" -#include "Element.h" - -#include "WebElement.h" -#include "WebFrameImpl.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -WebAnimationControllerImpl::WebAnimationControllerImpl(WebFrameImpl* frameImpl) - : m_frameImpl(frameImpl) -{ - ASSERT(m_frameImpl); -} - -AnimationController* WebAnimationControllerImpl::animationController() const -{ - if (!m_frameImpl->frame()) - return 0; - return m_frameImpl->frame()->animation(); -} - -bool WebAnimationControllerImpl::pauseAnimationAtTime(WebElement& element, - const WebString& animationName, - double time) -{ - AnimationController* controller = animationController(); - if (!controller) - return 0; - return controller->pauseAnimationAtTime(PassRefPtr<Element>(element)->renderer(), - animationName, - time); -} - -bool WebAnimationControllerImpl::pauseTransitionAtTime(WebElement& element, - const WebString& propertyName, - double time) -{ - AnimationController* controller = animationController(); - if (!controller) - return 0; - return controller->pauseTransitionAtTime(PassRefPtr<Element>(element)->renderer(), - propertyName, - time); -} - -unsigned WebAnimationControllerImpl::numberOfActiveAnimations() const -{ - AnimationController* controller = animationController(); - if (!controller) - return 0; - return controller->numberOfActiveAnimations(); -} - -void WebAnimationControllerImpl::suspendAnimations() const -{ - AnimationController* controller = animationController(); - if (!controller) - return; - if (!m_frameImpl->frame()) - return; - controller->suspendAnimations(); -} - -void WebAnimationControllerImpl::resumeAnimations() const -{ - AnimationController* controller = animationController(); - if (!controller) - return; - if (!m_frameImpl->frame()) - return; - controller->resumeAnimations(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebAnimationControllerImpl.h b/WebKit/chromium/src/WebAnimationControllerImpl.h deleted file mode 100644 index 62b89f0..0000000 --- a/WebKit/chromium/src/WebAnimationControllerImpl.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebAnimationControllerImpl_h -#define WebAnimationControllerImpl_h - -#include "WebAnimationController.h" - -namespace WebCore { -class AnimationController; -} - -namespace WebKit { -class WebFrameImpl; - -class WebAnimationControllerImpl : public WebAnimationController { -public: - explicit WebAnimationControllerImpl(WebFrameImpl*); - virtual ~WebAnimationControllerImpl() { } - - virtual bool pauseAnimationAtTime(WebElement&, - const WebString& animationName, - double time); - virtual bool pauseTransitionAtTime(WebElement&, - const WebString& propertyName, - double time); - virtual unsigned numberOfActiveAnimations() const; - virtual void suspendAnimations() const; - virtual void resumeAnimations() const; -private: - WebFrameImpl* m_frameImpl; - WebCore::AnimationController* animationController() const; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebAttribute.cpp b/WebKit/chromium/src/WebAttribute.cpp deleted file mode 100644 index 0bc3b91..0000000 --- a/WebKit/chromium/src/WebAttribute.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAttribute.h" - -#include "Attribute.h" -#include <wtf/PassRefPtr.h> - -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -void WebAttribute::reset() -{ - m_private.reset(); -} - -void WebAttribute::assign(const WebAttribute& other) -{ - m_private = other.m_private; -} - -WebAttribute::WebAttribute(const PassRefPtr<Attribute>& other) - : m_private(other) -{ -} - -WebString WebAttribute::localName() const -{ - return WebString(m_private->localName()); -} - -WebString WebAttribute::value() const -{ - return WebString(m_private->value()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebAudioBus.cpp b/WebKit/chromium/src/WebAudioBus.cpp deleted file mode 100644 index 9d4590e..0000000 --- a/WebKit/chromium/src/WebAudioBus.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebAudioBus.h" - -#if ENABLE(WEB_AUDIO) -#include "AudioBus.h" -#else -namespace WebCore { -class AudioBus { -}; -} // namespace WebCore -#endif - -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebAudioBusPrivate : public AudioBus { -}; - -void WebAudioBus::initialize(unsigned numberOfChannels, size_t length, double sampleRate) -{ -#if ENABLE(WEB_AUDIO) - AudioBus* audioBus = new AudioBus(numberOfChannels, length); - audioBus->setSampleRate(sampleRate); - - if (m_private) - delete m_private; - m_private = static_cast<WebAudioBusPrivate*>(audioBus); -#else - ASSERT_NOT_REACHED(); -#endif -} - -void WebAudioBus::reset() -{ -#if ENABLE(WEB_AUDIO) - delete m_private; - m_private = 0; -#else - ASSERT_NOT_REACHED(); -#endif -} - -unsigned WebAudioBus::numberOfChannels() const -{ -#if ENABLE(WEB_AUDIO) - if (!m_private) - return 0; - return m_private->numberOfChannels(); -#else - ASSERT_NOT_REACHED(); - return 0; -#endif -} - -size_t WebAudioBus::length() const -{ -#if ENABLE(WEB_AUDIO) - if (!m_private) - return 0; - return m_private->length(); -#else - ASSERT_NOT_REACHED(); - return 0; -#endif -} - -double WebAudioBus::sampleRate() const -{ -#if ENABLE(WEB_AUDIO) - if (!m_private) - return 0; - return m_private->sampleRate(); -#else - ASSERT_NOT_REACHED(); - return 0; -#endif -} - -float* WebAudioBus::channelData(unsigned channelIndex) -{ -#if ENABLE(WEB_AUDIO) - if (!m_private) - return 0; - ASSERT(channelIndex < numberOfChannels()); - return m_private->channel(channelIndex)->data(); -#else - ASSERT_NOT_REACHED(); - return 0; -#endif -} - -PassOwnPtr<AudioBus> WebAudioBus::release() -{ -#if ENABLE(WEB_AUDIO) - OwnPtr<AudioBus> audioBus(adoptPtr(static_cast<AudioBus*>(m_private))); - m_private = 0; - return audioBus.release(); -#else - ASSERT_NOT_REACHED(); - return 0; -#endif -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp deleted file mode 100644 index 0882e38..0000000 --- a/WebKit/chromium/src/WebBindings.cpp +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebBindings.h" - -#include "npruntime_impl.h" -#include "npruntime_priv.h" - -#if USE(V8) -#include "ChromiumDataObject.h" -#include "ClipboardChromium.h" -#include "EventNames.h" -#include "MouseEvent.h" -#include "NPV8Object.h" // for PrivateIdentifier -#include "Range.h" -#include "V8BindingState.h" -#include "V8DOMWrapper.h" -#include "V8Element.h" -#include "V8Event.h" -#include "V8Helpers.h" -#include "V8HiddenPropertyName.h" -#include "V8NPUtils.h" -#include "V8Proxy.h" -#include "V8Range.h" -#elif USE(JSC) -#include "bridge/c/c_utility.h" -#endif -#include "WebDragData.h" -#include "WebElement.h" -#include "WebRange.h" - -#if USE(JAVASCRIPTCORE_BINDINGS) -using JSC::Bindings::PrivateIdentifier; -#endif - -using namespace WebCore; - -namespace WebKit { - -bool WebBindings::construct(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant* result) -{ - return _NPN_Construct(npp, npobj, args, argCount, result); -} - -NPObject* WebBindings::createObject(NPP npp, NPClass* npClass) -{ - return _NPN_CreateObject(npp, npClass); -} - -bool WebBindings::enumerate(NPP id, NPObject* obj, NPIdentifier** identifier, uint32_t* val) -{ - return _NPN_Enumerate(id, obj, identifier, val); -} - -bool WebBindings::evaluate(NPP npp, NPObject* npObject, NPString* npScript, NPVariant* result) -{ - return _NPN_Evaluate(npp, npObject, npScript, result); -} - -bool WebBindings::evaluateHelper(NPP npp, bool popups_allowed, NPObject* npobj, NPString* npscript, NPVariant* result) -{ - return _NPN_EvaluateHelper(npp, popups_allowed, npobj, npscript, result); -} - -NPIdentifier WebBindings::getIntIdentifier(int32_t number) -{ - return _NPN_GetIntIdentifier(number); -} - -bool WebBindings::getProperty(NPP npp, NPObject* obj, NPIdentifier propertyName, NPVariant *result) -{ - return _NPN_GetProperty(npp, obj, propertyName, result); -} - -NPIdentifier WebBindings::getStringIdentifier(const NPUTF8* string) -{ - return _NPN_GetStringIdentifier(string); -} - -void WebBindings::getStringIdentifiers(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers) -{ - _NPN_GetStringIdentifiers(names, nameCount, identifiers); -} - -bool WebBindings::hasMethod(NPP npp, NPObject* npObject, NPIdentifier methodName) -{ - return _NPN_HasMethod(npp, npObject, methodName); -} - -bool WebBindings::hasProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName) -{ - return _NPN_HasProperty(npp, npObject, propertyName); -} - -bool WebBindings::identifierIsString(NPIdentifier identifier) -{ - return _NPN_IdentifierIsString(identifier); -} - -int32_t WebBindings::intFromIdentifier(NPIdentifier identifier) -{ - return _NPN_IntFromIdentifier(identifier); -} - -void WebBindings::initializeVariantWithStringCopy(NPVariant* variant, const NPString* value) -{ -#if USE(V8) - _NPN_InitializeVariantWithStringCopy(variant, value); -#else - NPN_InitializeVariantWithStringCopy(variant, value); -#endif -} - -bool WebBindings::invoke(NPP npp, NPObject* npObject, NPIdentifier methodName, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result) -{ - return _NPN_Invoke(npp, npObject, methodName, arguments, argumentCount, result); -} - -bool WebBindings::invokeDefault(NPP id, NPObject* obj, const NPVariant* args, uint32_t count, NPVariant* result) -{ - return _NPN_InvokeDefault(id, obj, args, count, result); -} - -void WebBindings::releaseObject(NPObject* npObject) -{ - return _NPN_ReleaseObject(npObject); -} - -void WebBindings::releaseVariantValue(NPVariant* variant) -{ - _NPN_ReleaseVariantValue(variant); -} - -bool WebBindings::removeProperty(NPP id, NPObject* object, NPIdentifier identifier) -{ - return _NPN_RemoveProperty(id, object, identifier); -} - -NPObject* WebBindings::retainObject(NPObject* npObject) -{ - return _NPN_RetainObject(npObject); -} - -void WebBindings::setException(NPObject* obj, const NPUTF8* message) -{ - _NPN_SetException(obj, message); -} - -bool WebBindings::setProperty(NPP id, NPObject* obj, NPIdentifier identifier, const NPVariant* variant) -{ - return _NPN_SetProperty(id, obj, identifier, variant); -} - -void WebBindings::unregisterObject(NPObject* npObject) -{ -#if USE(V8) - _NPN_UnregisterObject(npObject); -#endif -} - -NPUTF8* WebBindings::utf8FromIdentifier(NPIdentifier identifier) -{ - return _NPN_UTF8FromIdentifier(identifier); -} - -void WebBindings::extractIdentifierData(const NPIdentifier& identifier, const NPUTF8*& string, int32_t& number, bool& isString) -{ - PrivateIdentifier* priv = static_cast<PrivateIdentifier*>(identifier); - if (!priv) { - isString = false; - number = 0; - return; - } - - isString = priv->isString; - if (isString) - string = priv->value.string; - else - number = priv->value.number; -} - -#if USE(V8) - -static v8::Local<v8::Value> getEvent(const v8::Handle<v8::Context>& context) -{ - return context->Global()->GetHiddenValue(V8HiddenPropertyName::event()); -} - -static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data) -{ - if (!npobj) - return false; - if (npobj->_class != npScriptObjectClass) - return false; - - v8::HandleScope handleScope; - v8::Handle<v8::Context> context = v8::Context::GetEntered(); - if (context.IsEmpty()) - return false; - - // Get the current WebCore event. - v8::Handle<v8::Value> currentEvent(getEvent(context)); - Event* event = V8Event::toNative(v8::Handle<v8::Object>::Cast(currentEvent)); - if (!event) - return false; - - // Check that the given npobj is that event. - V8NPObject* object = reinterpret_cast<V8NPObject*>(npobj); - Event* given = V8Event::toNative(object->v8Object); - if (given != event) - return false; - - // Check the execution frames are same origin. - V8Proxy* current = V8Proxy::retrieve(V8Proxy::retrieveFrameForCurrentContext()); - Frame* frame = V8Proxy::retrieveFrame(context); - if (!current || !V8BindingSecurity::canAccessFrame(V8BindingState::Only(), frame, false)) - return false; - - const EventNames& names(eventNames()); - const AtomicString& eventType(event->type()); - - enum DragTargetMouseEventId { - DragEnterId = 1, DragOverId = 2, DragLeaveId = 3, DropId = 4 - }; - - // The event type should be a drag event. - if (eventType == names.dragenterEvent) - *eventId = DragEnterId; - else if (eventType == names.dragoverEvent) - *eventId = DragOverId; - else if (eventType == names.dragleaveEvent) - *eventId = DragLeaveId; - else if (eventType == names.dropEvent) - *eventId = DropId; - else - return false; - - // Drag events are mouse events and should have a clipboard. - MouseEvent* me = static_cast<MouseEvent*>(event); - Clipboard* clipboard = me->clipboard(); - if (!clipboard) - return false; - - // And that clipboard should be accessible by WebKit policy. - ClipboardChromium* chrome = static_cast<ClipboardChromium*>(clipboard); - HashSet<String> accessible(chrome->types()); - if (accessible.isEmpty()) - return false; - - RefPtr<ChromiumDataObject> dataObject(chrome->dataObject()); - if (dataObject && data) - *data = WebDragData(dataObject); - - return dataObject; -} - -static bool getRangeImpl(NPObject* npobj, WebRange* range) -{ - V8NPObject* v8npobject = reinterpret_cast<V8NPObject*>(npobj); - v8::Handle<v8::Object> v8object(v8npobject->v8Object); - if (!V8Range::info.equals(V8DOMWrapper::domWrapperType(v8object))) - return false; - - Range* native = V8Range::toNative(v8object); - if (!native) - return false; - - *range = WebRange(native); - return true; -} - -static bool getElementImpl(NPObject* npObj, WebElement* webElement) -{ - if (!npObj || (npObj->_class != npScriptObjectClass)) - return false; - - V8NPObject* v8NPObject = reinterpret_cast<V8NPObject*>(npObj); - v8::Handle<v8::Object> v8Object(v8NPObject->v8Object); - Element* native = V8Element::toNative(v8Object); - if (!native) - return false; - - *webElement = WebElement(native); - return true; -} - -static NPObject* makeIntArrayImpl(const WebVector<int>& data) -{ - v8::HandleScope handleScope; - v8::Handle<v8::Array> result = v8::Array::New(data.size()); - for (size_t i = 0; i < data.size(); i++) - result->Set(i, v8::Number::New(data[i])); - - WebCore::DOMWindow* window = WebCore::V8Proxy::retrieveWindow(WebCore::V8Proxy::currentContext()); - return npCreateV8ScriptObject(0, result, window); -} - -static NPObject* makeStringArrayImpl(const WebVector<WebString>& data) -{ - v8::HandleScope handleScope; - v8::Handle<v8::Array> result = v8::Array::New(data.size()); - for (size_t i = 0; i < data.size(); ++i) - result->Set(i, data[i].data() ? v8::String::New(reinterpret_cast<const uint16_t*>((data[i].data())), data[i].length()) : v8::String::New("")); - - WebCore::DOMWindow* window = WebCore::V8Proxy::retrieveWindow(WebCore::V8Proxy::currentContext()); - return npCreateV8ScriptObject(0, result, window); -} - -#endif - -bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data) -{ -#if USE(V8) - return getDragDataImpl(event, eventId, data); -#else - // Not supported on other ports (JSC, etc). - return false; -#endif -} - -bool WebBindings::isDragEvent(NPObject* event) -{ - int eventId; - return getDragData(event, &eventId, 0); -} - -bool WebBindings::getRange(NPObject* range, WebRange* webrange) -{ -#if USE(V8) - return getRangeImpl(range, webrange); -#else - // Not supported on other ports (JSC, etc). - return false; -#endif -} - -bool WebBindings::getElement(NPObject* element, WebElement* webElement) -{ -#if USE(V8) - return getElementImpl(element, webElement); -#else - // Not supported on other ports (JSC, etc.). - return false; -#endif -} - -NPObject* WebBindings::makeIntArray(const WebVector<int> & data) -{ -#if USE(V8) - return makeIntArrayImpl(data); -#else - // Not supported on other ports (JSC, etc.). - return 0; -#endif -} - -NPObject* WebBindings::makeStringArray(const WebVector<WebString>& data) -{ -#if USE(V8) - return makeStringArrayImpl(data); -#else - // Not supported on other ports (JSC, etc.). - return 0; -#endif -} - -void WebBindings::pushExceptionHandler(ExceptionHandler handler, void* data) -{ - WebCore::pushExceptionHandler(handler, data); -} - -void WebBindings::popExceptionHandler() -{ - WebCore::popExceptionHandler(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebBlobData.cpp b/WebKit/chromium/src/WebBlobData.cpp deleted file mode 100644 index 42018dd..0000000 --- a/WebKit/chromium/src/WebBlobData.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebBlobData.h" - -#include "BlobData.h" -#include <wtf/PassOwnPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebBlobDataPrivate : public BlobData { -}; - -void WebBlobData::initialize() -{ - assign(BlobData::create()); -} - -void WebBlobData::reset() -{ - assign(0); -} - -size_t WebBlobData::itemCount() const -{ - ASSERT(!isNull()); - return m_private->items().size(); -} - -bool WebBlobData::itemAt(size_t index, Item& result) const -{ - ASSERT(!isNull()); - - if (index >= m_private->items().size()) - return false; - - const BlobDataItem& item = m_private->items()[index]; - result.data.reset(); - result.filePath.reset(); - result.blobURL = KURL(); - result.offset = item.offset; - result.length = item.length; - result.expectedModificationTime = item.expectedModificationTime; - - switch (item.type) { - case BlobDataItem::Data: - result.type = Item::TypeData; - result.data = item.data; - return true; - case BlobDataItem::File: - result.type = Item::TypeFile; - result.filePath = item.path; - return true; - case BlobDataItem::Blob: - result.type = Item::TypeBlob; - result.blobURL = item.url; - return true; - } - ASSERT_NOT_REACHED(); - return false; -} - -WebString WebBlobData::contentType() const -{ - ASSERT(!isNull()); - return m_private->contentType(); -} - -WebString WebBlobData::contentDisposition() const -{ - ASSERT(!isNull()); - return m_private->contentDisposition(); -} - -WebBlobData::WebBlobData(const PassOwnPtr<BlobData>& data) - : m_private(0) -{ - assign(data); -} - -WebBlobData& WebBlobData::operator=(const PassOwnPtr<BlobData>& data) -{ - assign(data); - return *this; -} - -WebBlobData::operator PassOwnPtr<BlobData>() -{ - WebBlobDataPrivate* temp = m_private; - m_private = 0; - return adoptPtr(temp); -} - -void WebBlobData::assign(const PassOwnPtr<BlobData>& data) -{ - if (m_private) - delete m_private; - m_private = static_cast<WebBlobDataPrivate*>(data.leakPtr()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebCString.cpp b/WebKit/chromium/src/WebCString.cpp deleted file mode 100644 index f81d7f4..0000000 --- a/WebKit/chromium/src/WebCString.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebCString.h" - -#include "TextEncoding.h" -#include <wtf/text/CString.h> - -#include "WebString.h" - -namespace WebKit { - -class WebCStringPrivate : public WTF::CStringBuffer { -}; - -int WebCString::compare(const WebCString& other) const -{ - // A null string is always less than a non null one. - if (isNull() != other.isNull()) - return isNull() ? -1 : 1; - - if (isNull()) - return 0; // Both WebStrings are null. - - return strcmp(m_private->data(), other.m_private->data()); -} - -void WebCString::reset() -{ - if (m_private) { - m_private->deref(); - m_private = 0; - } -} - -void WebCString::assign(const WebCString& other) -{ - assign(const_cast<WebCStringPrivate*>(other.m_private)); -} - -void WebCString::assign(const char* data, size_t length) -{ - char* newData; - RefPtr<WTF::CStringBuffer> buffer = - WTF::CString::newUninitialized(length, newData).buffer(); - memcpy(newData, data, length); - assign(static_cast<WebCStringPrivate*>(buffer.get())); -} - -size_t WebCString::length() const -{ - if (!m_private) - return 0; - // NOTE: The buffer's length includes the null byte. - return const_cast<WebCStringPrivate*>(m_private)->length() - 1; -} - -const char* WebCString::data() const -{ - if (!m_private) - return 0; - return const_cast<WebCStringPrivate*>(m_private)->data(); -} - -WebString WebCString::utf16() const -{ - return WebCore::UTF8Encoding().decode(data(), length()); -} - -WebCString WebCString::fromUTF16(const WebUChar* data, size_t length) -{ - return WebCore::UTF8Encoding().encode( - data, length, WebCore::QuestionMarksForUnencodables); -} - -WebCString WebCString::fromUTF16(const WebUChar* data) -{ - size_t len = 0; - while (data[len] != WebUChar(0)) - len++; - return fromUTF16(data, len); -} - -WebCString::WebCString(const WTF::CString& s) - : m_private(static_cast<WebCStringPrivate*>(s.buffer())) -{ - if (m_private) - m_private->ref(); -} - -WebCString& WebCString::operator=(const WTF::CString& s) -{ - assign(static_cast<WebCStringPrivate*>(s.buffer())); - return *this; -} - -WebCString::operator WTF::CString() const -{ - return m_private; -} - -void WebCString::assign(WebCStringPrivate* p) -{ - // Take care to handle the case where m_private == p - if (p) - p->ref(); - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebCache.cpp b/WebKit/chromium/src/WebCache.cpp deleted file mode 100644 index 2203498..0000000 --- a/WebKit/chromium/src/WebCache.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebCache.h" - -// Instead of providing accessors, we make all members of MemoryCache public. -// This will make it easier to track WebCore changes to the MemoryCache class. -// FIXME: We should introduce public getters on the MemoryCache class. -#define private public -#include "MemoryCache.h" -#undef private - -using namespace WebCore; - -namespace WebKit { - -// A helper method for coverting a MemoryCache::TypeStatistic to a -// WebCache::ResourceTypeStat. -static void ToResourceTypeStat(const MemoryCache::TypeStatistic& from, - WebCache::ResourceTypeStat& to) -{ - to.count = static_cast<size_t>(from.count); - to.size = static_cast<size_t>(from.size); - to.liveSize = static_cast<size_t>(from.liveSize); - to.decodedSize = static_cast<size_t>(from.decodedSize); -} - -void WebCache::setCapacities( - size_t minDeadCapacity, size_t maxDeadCapacity, size_t capacity) -{ - MemoryCache* cache = WebCore::cache(); - if (cache) - cache->setCapacities(static_cast<unsigned int>(minDeadCapacity), - static_cast<unsigned int>(maxDeadCapacity), - static_cast<unsigned int>(capacity)); -} - -void WebCache::clear() -{ - MemoryCache* cache = WebCore::cache(); - if (cache && !cache->disabled()) { - cache->setDisabled(true); - cache->setDisabled(false); - } -} - -void WebCache::getUsageStats(UsageStats* result) -{ - ASSERT(result); - - MemoryCache* cache = WebCore::cache(); - if (cache) { - result->minDeadCapacity = cache->m_minDeadCapacity; - result->maxDeadCapacity = cache->m_maxDeadCapacity; - result->capacity = cache->m_capacity; - result->liveSize = cache->m_liveSize; - result->deadSize = cache->m_deadSize; - } else - memset(result, 0, sizeof(UsageStats)); -} - -void WebCache::getResourceTypeStats(ResourceTypeStats* result) -{ - MemoryCache* cache = WebCore::cache(); - if (cache) { - MemoryCache::Statistics stats = cache->getStatistics(); - ToResourceTypeStat(stats.images, result->images); - ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets); - ToResourceTypeStat(stats.scripts, result->scripts); -#if ENABLE(XSLT) - ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets); -#else - memset(&result->xslStyleSheets, 0, sizeof(result->xslStyleSheets)); -#endif - ToResourceTypeStat(stats.fonts, result->fonts); - } else - memset(result, 0, sizeof(WebCache::ResourceTypeStats)); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebColor.cpp b/WebKit/chromium/src/WebColor.cpp deleted file mode 100644 index 9323433..0000000 --- a/WebKit/chromium/src/WebColor.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebColor.h" - -#include "Color.h" -#include "CSSValueKeywords.h" -#include "RenderTheme.h" -#include "UnusedParam.h" -#include "WebColorName.h" - -using namespace::WebCore; - -namespace WebKit { - -static int toCSSValueKeyword(WebColorName in_value) -{ - switch (in_value) { - case WebColorActiveBorder: - return CSSValueActiveborder; - case WebColorActiveCaption: - return CSSValueActivecaption; - case WebColorAppworkspace: - return CSSValueAppworkspace; - case WebColorBackground: - return CSSValueBackground; - case WebColorButtonFace: - return CSSValueButtonface; - case WebColorButtonHighlight: - return CSSValueButtonhighlight; - case WebColorButtonShadow: - return CSSValueButtonshadow; - case WebColorButtonText: - return CSSValueButtontext; - case WebColorCaptionText: - return CSSValueCaptiontext; - case WebColorGrayText: - return CSSValueGraytext; - case WebColorHighlight: - return CSSValueHighlight; - case WebColorHighlightText: - return CSSValueHighlighttext; - case WebColorInactiveBorder: - return CSSValueInactiveborder; - case WebColorInactiveCaption: - return CSSValueInactivecaption; - case WebColorInactiveCaptionText: - return CSSValueInactivecaptiontext; - case WebColorInfoBackground: - return CSSValueInfobackground; - case WebColorInfoText: - return CSSValueInfotext; - case WebColorMenu: - return CSSValueMenu; - case WebColorMenuText: - return CSSValueMenutext; - case WebColorScrollbar: - return CSSValueScrollbar; - case WebColorText: - return CSSValueText; - case WebColorThreedDarkShadow: - return CSSValueThreeddarkshadow; - case WebColorThreedShadow: - return CSSValueThreedshadow; - case WebColorThreedFace: - return CSSValueThreedface; - case WebColorThreedHighlight: - return CSSValueThreedhighlight; - case WebColorThreedLightShadow: - return CSSValueThreedlightshadow; - case WebColorWebkitFocusRingColor: - return CSSValueWebkitFocusRingColor; - case WebColorWindow: - return CSSValueWindow; - case WebColorWindowFrame: - return CSSValueWindowframe; - case WebColorWindowText: - return CSSValueWindowtext; - default: - return CSSValueInvalid; - } -} - -void setNamedColors(const WebColorName* colorNames, const WebColor* colors, size_t length) -{ - for (size_t i = 0; i < length; ++i) { - WebColorName colorName = colorNames[i]; - WebColor color = colors[i]; - - // Convert color to internal value identifier. - int internalColorName = toCSSValueKeyword(colorName); - if (internalColorName == CSSValueWebkitFocusRingColor) { - RenderTheme::setCustomFocusRingColor(color); - continue; - } - } - - // TODO(jeremy): Tell RenderTheme to update colors. -} - -} // WebKit diff --git a/WebKit/chromium/src/WebCommon.cpp b/WebKit/chromium/src/WebCommon.cpp deleted file mode 100644 index f9457fb..0000000 --- a/WebKit/chromium/src/WebCommon.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebCommon.h" - -#include <wtf/Assertions.h> - -namespace WebKit { - -void failedAssertion(const char* file, int line, const char* function, const char* assertion) -{ - WTFReportAssertionFailure(file, line, function, assertion); - CRASH(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebCrossOriginPreflightResultCache.cpp b/WebKit/chromium/src/WebCrossOriginPreflightResultCache.cpp deleted file mode 100644 index 719316d..0000000 --- a/WebKit/chromium/src/WebCrossOriginPreflightResultCache.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebCrossOriginPreflightResultCache.h" - -#include "CrossOriginPreflightResultCache.h" - -namespace WebKit { - -void WebCrossOriginPreflightResultCache::clear() -{ - WebCore::CrossOriginPreflightResultCache::shared().empty(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebCursorInfo.cpp b/WebKit/chromium/src/WebCursorInfo.cpp deleted file mode 100644 index d4b0f81..0000000 --- a/WebKit/chromium/src/WebCursorInfo.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebCursorInfo.h" - -#include "Cursor.h" - -using namespace WebCore; - -namespace WebKit { - -WebCursorInfo::WebCursorInfo(const Cursor& cursor) -{ - type = static_cast<Type>(cursor.impl().type()); - hotSpot = cursor.impl().hotSpot(); - customImage = cursor.impl().customImage(); -#ifdef WIN32 - externalHandle = 0; -#endif -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMEvent.cpp b/WebKit/chromium/src/WebDOMEvent.cpp deleted file mode 100644 index 48e5268..0000000 --- a/WebKit/chromium/src/WebDOMEvent.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMEvent.h" - -#include "Event.h" -#include "Node.h" -#include <wtf/PassRefPtr.h> - -namespace WebKit { - -class WebDOMEventPrivate : public WebCore::Event { -}; - -void WebDOMEvent::reset() -{ - assign(0); -} - -void WebDOMEvent::assign(const WebDOMEvent& other) -{ - WebDOMEventPrivate* p = const_cast<WebDOMEventPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -void WebDOMEvent::assign(WebDOMEventPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -WebDOMEvent::WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>& event) - : m_private(static_cast<WebDOMEventPrivate*>(event.releaseRef())) -{ -} - -WebString WebDOMEvent::type() const -{ - ASSERT(m_private); - return m_private->type(); -} - -WebNode WebDOMEvent::target() const -{ - ASSERT(m_private); - return WebNode(m_private->target()->toNode()); -} - -WebNode WebDOMEvent::currentTarget() const -{ - ASSERT(m_private); - return WebNode(m_private->currentTarget()->toNode()); -} - -WebDOMEvent::PhaseType WebDOMEvent::eventPhase() const -{ - ASSERT(m_private); - return static_cast<WebDOMEvent::PhaseType>(m_private->eventPhase()); -} - -bool WebDOMEvent::bubbles() const -{ - ASSERT(m_private); - return m_private->bubbles(); -} - -bool WebDOMEvent::cancelable() const -{ - ASSERT(m_private); - return m_private->cancelable(); -} - -bool WebDOMEvent::isUIEvent() const -{ - ASSERT(m_private); - return m_private->isUIEvent(); -} - -bool WebDOMEvent::isMouseEvent() const -{ - ASSERT(m_private); - return m_private->isMouseEvent(); -} - -bool WebDOMEvent::isMutationEvent() const -{ - ASSERT(m_private); - return m_private->isMutationEvent(); -} - -bool WebDOMEvent::isKeyboardEvent() const -{ - ASSERT(m_private); - return m_private->isKeyboardEvent(); -} - -bool WebDOMEvent::isTextEvent() const -{ - ASSERT(m_private); - return m_private->isTextEvent(); -} - -bool WebDOMEvent::isCompositionEvent() const -{ - ASSERT(m_private); - return m_private->isCompositionEvent(); -} - -bool WebDOMEvent::isDragEvent() const -{ - ASSERT(m_private); - return m_private->isDragEvent(); -} - -bool WebDOMEvent::isClipboardEvent() const -{ - ASSERT(m_private); - return m_private->isClipboardEvent(); -} - -bool WebDOMEvent::isMessageEvent() const -{ - ASSERT(m_private); - return m_private->isMessageEvent(); -} - -bool WebDOMEvent::isWheelEvent() const -{ - ASSERT(m_private); - return m_private->isWheelEvent(); -} - -bool WebDOMEvent::isBeforeTextInsertedEvent() const -{ - ASSERT(m_private); - return m_private->isBeforeTextInsertedEvent(); -} - -bool WebDOMEvent::isOverflowEvent() const -{ - ASSERT(m_private); - return m_private->isOverflowEvent(); -} - -bool WebDOMEvent::isPageTransitionEvent() const -{ - ASSERT(m_private); - return m_private->isPageTransitionEvent(); -} - -bool WebDOMEvent::isPopStateEvent() const -{ - ASSERT(m_private); - return m_private->isPopStateEvent(); -} - -bool WebDOMEvent::isProgressEvent() const -{ - ASSERT(m_private); - return m_private->isProgressEvent(); -} - -bool WebDOMEvent::isXMLHttpRequestProgressEvent() const -{ - ASSERT(m_private); - return m_private->isXMLHttpRequestProgressEvent(); -} - -bool WebDOMEvent::isWebKitAnimationEvent() const -{ - ASSERT(m_private); - return m_private->isWebKitAnimationEvent(); -} - -bool WebDOMEvent::isWebKitTransitionEvent() const -{ - ASSERT(m_private); - return m_private->isWebKitTransitionEvent(); -} - -bool WebDOMEvent::isBeforeLoadEvent() const -{ - ASSERT(m_private); - return m_private->isBeforeLoadEvent(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMEventListener.cpp b/WebKit/chromium/src/WebDOMEventListener.cpp deleted file mode 100644 index 93c1640..0000000 --- a/WebKit/chromium/src/WebDOMEventListener.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMEventListener.h" - -#include "WebDOMEventListenerPrivate.h" - -namespace WebKit { - -WebDOMEventListener::WebDOMEventListener() - : m_private(new WebDOMEventListenerPrivate(this)) -{ -} - -WebDOMEventListener::~WebDOMEventListener() -{ - m_private->webDOMEventListenerDeleted(); - delete m_private; -} - -void WebDOMEventListener::notifyEventListenerDeleted(EventListenerWrapper* wrapper) -{ - m_private->eventListenerDeleted(wrapper); -} - -EventListenerWrapper* WebDOMEventListener::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node) -{ - return m_private->createEventListenerWrapper(eventType, useCapture, node); -} - -EventListenerWrapper* WebDOMEventListener::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node) -{ - return m_private->getEventListenerWrapper(eventType, useCapture, node); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMEventListenerPrivate.cpp b/WebKit/chromium/src/WebDOMEventListenerPrivate.cpp deleted file mode 100644 index 4edbeef..0000000 --- a/WebKit/chromium/src/WebDOMEventListenerPrivate.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMEventListenerPrivate.h" - -#include "EventListenerWrapper.h" -#include "WebDOMEventListener.h" - -namespace WebKit { - -WebDOMEventListenerPrivate::WebDOMEventListenerPrivate(WebDOMEventListener* webDOMEventListener) - : m_webDOMEventListener(webDOMEventListener) -{ -} - -WebDOMEventListenerPrivate::~WebDOMEventListenerPrivate() -{ -} - -EventListenerWrapper* WebDOMEventListenerPrivate::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node) -{ - EventListenerWrapper* listenerWrapper = new EventListenerWrapper(m_webDOMEventListener); - WebDOMEventListenerPrivate::ListenerInfo listenerInfo(eventType, useCapture, listenerWrapper, node); - m_listenerWrappers.append(listenerInfo); - return listenerWrapper; -} - -EventListenerWrapper* WebDOMEventListenerPrivate::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node) -{ - Vector<WebDOMEventListenerPrivate::ListenerInfo>::const_iterator iter; - for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) { - if (iter->node == node) - return iter->eventListenerWrapper; - } - ASSERT_NOT_REACHED(); - return 0; -} - -void WebDOMEventListenerPrivate::webDOMEventListenerDeleted() -{ - // Notifies all WebDOMEventListenerWrappers that we are going away so they can - // invalidate their pointer to us. - Vector<WebDOMEventListenerPrivate::ListenerInfo>::const_iterator iter; - for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) - iter->eventListenerWrapper->webDOMEventListenerDeleted(); -} - -void WebDOMEventListenerPrivate::eventListenerDeleted(EventListenerWrapper* eventListener) -{ - for (size_t i = 0; i < m_listenerWrappers.size(); ++i) { - if (m_listenerWrappers[i].eventListenerWrapper == eventListener) { - m_listenerWrappers.remove(i); - return; - } - } - ASSERT_NOT_REACHED(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMEventListenerPrivate.h b/WebKit/chromium/src/WebDOMEventListenerPrivate.h deleted file mode 100644 index c86f427..0000000 --- a/WebKit/chromium/src/WebDOMEventListenerPrivate.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDOMEventListenerPrivate_h -#define WebDOMEventListenerPrivate_h - -#include "WebString.h" - -#include <wtf/Vector.h> - -namespace WebCore { -class Node; -} - -using namespace WebCore; - -namespace WebKit { - -class EventListenerWrapper; -class WebDOMEventListener; - -class WebDOMEventListenerPrivate { -public: - WebDOMEventListenerPrivate(WebDOMEventListener* webDOMEventListener); - ~WebDOMEventListenerPrivate(); - - EventListenerWrapper* createEventListenerWrapper( - const WebString& eventType, bool useCapture, Node* node); - - // Gets the ListenerEventWrapper for a specific node. - // Used by WebNode::removeDOMEventListener(). - EventListenerWrapper* getEventListenerWrapper( - const WebString& eventType, bool useCapture, Node* node); - - // Called by the WebDOMEventListener when it is about to be deleted. - void webDOMEventListenerDeleted(); - - // Called by the EventListenerWrapper when it is about to be deleted. - void eventListenerDeleted(EventListenerWrapper* eventListener); - - struct ListenerInfo { - ListenerInfo(const WebString& eventType, bool useCapture, - EventListenerWrapper* eventListenerWrapper, - Node* node) - : eventType(eventType) - , useCapture(useCapture) - , eventListenerWrapper(eventListenerWrapper) - , node(node) - { - } - - WebString eventType; - bool useCapture; - EventListenerWrapper* eventListenerWrapper; - Node* node; - }; - -private: - WebDOMEventListener* m_webDOMEventListener; - - // We keep a list of the wrapper for the WebKit EventListener, it is needed - // to implement WebNode::removeEventListener(). - Vector<ListenerInfo> m_listenerWrappers; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebDOMMouseEvent.cpp b/WebKit/chromium/src/WebDOMMouseEvent.cpp deleted file mode 100644 index bfeae37..0000000 --- a/WebKit/chromium/src/WebDOMMouseEvent.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMMouseEvent.h" - -#include "MouseEvent.h" - -using namespace WebCore; - -namespace WebKit { - -int WebDOMMouseEvent::screenX() const -{ - return constUnwrap<MouseEvent>()->screenX(); -} - -int WebDOMMouseEvent::screenY() const -{ - return constUnwrap<MouseEvent>()->screenY(); -} - -int WebDOMMouseEvent::clientX() const -{ - return constUnwrap<MouseEvent>()->clientX(); -} - -int WebDOMMouseEvent::clientY() const -{ - return constUnwrap<MouseEvent>()->clientY(); -} - -int WebDOMMouseEvent::layerX() const -{ - return constUnwrap<MouseEvent>()->layerX(); -} - -int WebDOMMouseEvent::layerY() const -{ - return constUnwrap<MouseEvent>()->layerY(); -} - -int WebDOMMouseEvent::offsetX() const -{ - return constUnwrap<MouseEvent>()->offsetX(); -} - -int WebDOMMouseEvent::offsetY() const -{ - return constUnwrap<MouseEvent>()->offsetY(); -} - -int WebDOMMouseEvent::pageX() const -{ - return constUnwrap<MouseEvent>()->pageX(); -} - -int WebDOMMouseEvent::pageY() const -{ - return constUnwrap<MouseEvent>()->pageY(); -} - -int WebDOMMouseEvent::x() const -{ - return constUnwrap<MouseEvent>()->x(); -} - -int WebDOMMouseEvent::y() const -{ - return constUnwrap<MouseEvent>()->y(); -} - -int WebDOMMouseEvent::button() const -{ - return constUnwrap<MouseEvent>()->button(); -} - -bool WebDOMMouseEvent::buttonDown() const -{ - return constUnwrap<MouseEvent>()->buttonDown(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMMutationEvent.cpp b/WebKit/chromium/src/WebDOMMutationEvent.cpp deleted file mode 100644 index 8a6e592..0000000 --- a/WebKit/chromium/src/WebDOMMutationEvent.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMMutationEvent.h" - -#include "MutationEvent.h" - -using namespace WebCore; - -namespace WebKit { - -WebNode WebDOMMutationEvent::relatedNode() const -{ - return WebNode(constUnwrap<MutationEvent>()->relatedNode()); -} - -WebString WebDOMMutationEvent::prevValue() const -{ - return WebString(constUnwrap<MutationEvent>()->prevValue()); -} - -WebString WebDOMMutationEvent::newValue() const -{ - return WebString(constUnwrap<MutationEvent>()->newValue()); -} - -WebString WebDOMMutationEvent::attrName() const -{ - return WebString(constUnwrap<MutationEvent>()->attrName()); -} - -WebDOMMutationEvent::AttrChangeType WebDOMMutationEvent::attrChange() const -{ - return static_cast<AttrChangeType>(constUnwrap<MutationEvent>()->attrChange()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDOMStringList.cpp b/WebKit/chromium/src/WebDOMStringList.cpp deleted file mode 100644 index dc82331..0000000 --- a/WebKit/chromium/src/WebDOMStringList.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDOMStringList.h" - -#include "DOMStringList.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -WebDOMStringList::WebDOMStringList() -{ - m_private = WebCore::DOMStringList::create(); -} - -void WebDOMStringList::reset() -{ - m_private.reset(); -} - -void WebDOMStringList::assign(const WebDOMStringList& other) -{ - m_private = other.m_private; -} - -void WebDOMStringList::append(const WebString& string) -{ - m_private->append(string); -} - -unsigned WebDOMStringList::length() const -{ - if (m_private.isNull()) - return 0; - return m_private->length(); -} - -WebString WebDOMStringList::item(unsigned index) const -{ - return m_private->item(index); -} - -WebDOMStringList::WebDOMStringList(const WTF::PassRefPtr<WebCore::DOMStringList>& item) - : m_private(item) -{ -} - -WebDOMStringList& WebDOMStringList::operator=(const WTF::PassRefPtr<WebCore::DOMStringList>& item) -{ - m_private = item; - return *this; -} - -WebDOMStringList::operator WTF::PassRefPtr<WebCore::DOMStringList>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebData.cpp b/WebKit/chromium/src/WebData.cpp deleted file mode 100644 index 6aafe79..0000000 --- a/WebKit/chromium/src/WebData.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebData.h" - -#include "SharedBuffer.h" - -using namespace WebCore; - -namespace WebKit { - -class WebDataPrivate : public SharedBuffer { -}; - -void WebData::reset() -{ - if (m_private) { - m_private->deref(); - m_private = 0; - } -} - -void WebData::assign(const WebData& other) -{ - WebDataPrivate* p = const_cast<WebDataPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -void WebData::assign(const char* data, size_t size) -{ - assign(static_cast<WebDataPrivate*>( - SharedBuffer::create(data, size).releaseRef())); -} - -size_t WebData::size() const -{ - if (!m_private) - return 0; - return const_cast<WebDataPrivate*>(m_private)->size(); -} - -const char* WebData::data() const -{ - if (!m_private) - return 0; - return const_cast<WebDataPrivate*>(m_private)->data(); -} - -WebData::WebData(const PassRefPtr<SharedBuffer>& buffer) - : m_private(static_cast<WebDataPrivate*>(buffer.releaseRef())) -{ -} - -WebData& WebData::operator=(const PassRefPtr<SharedBuffer>& buffer) -{ - assign(static_cast<WebDataPrivate*>(buffer.releaseRef())); - return *this; -} - -WebData::operator PassRefPtr<SharedBuffer>() const -{ - return PassRefPtr<SharedBuffer>(const_cast<WebDataPrivate*>(m_private)); -} - -void WebData::assign(WebDataPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDataSourceImpl.cpp b/WebKit/chromium/src/WebDataSourceImpl.cpp deleted file mode 100644 index 65147fa..0000000 --- a/WebKit/chromium/src/WebDataSourceImpl.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDataSourceImpl.h" - -#include "ApplicationCacheHostInternal.h" -#include "WebURL.h" -#include "WebURLError.h" -#include "WebVector.h" - -using namespace WebCore; - -namespace WebKit { - -WebPluginLoadObserver* WebDataSourceImpl::m_nextPluginLoadObserver = 0; - -PassRefPtr<WebDataSourceImpl> WebDataSourceImpl::create(const ResourceRequest& request, const SubstituteData& data) -{ - return adoptRef(new WebDataSourceImpl(request, data)); -} - -const WebURLRequest& WebDataSourceImpl::originalRequest() const -{ - m_originalRequestWrapper.bind(DocumentLoader::originalRequest()); - return m_originalRequestWrapper; -} - -const WebURLRequest& WebDataSourceImpl::request() const -{ - m_requestWrapper.bind(DocumentLoader::request()); - return m_requestWrapper; -} - -const WebURLResponse& WebDataSourceImpl::response() const -{ - m_responseWrapper.bind(DocumentLoader::response()); - return m_responseWrapper; -} - -bool WebDataSourceImpl::hasUnreachableURL() const -{ - return !DocumentLoader::unreachableURL().isEmpty(); -} - -WebURL WebDataSourceImpl::unreachableURL() const -{ - return DocumentLoader::unreachableURL(); -} - -void WebDataSourceImpl::redirectChain(WebVector<WebURL>& result) const -{ - result.assign(m_redirectChain); -} - -WebString WebDataSourceImpl::pageTitle() const -{ - return title(); -} - -WebNavigationType WebDataSourceImpl::navigationType() const -{ - return toWebNavigationType(triggeringAction().type()); -} - -double WebDataSourceImpl::triggeringEventTime() const -{ - if (!triggeringAction().event()) - return 0.0; - - // DOMTimeStamp uses units of milliseconds. - return convertDOMTimeStampToSeconds(triggeringAction().event()->timeStamp()); -} - -WebDataSource::ExtraData* WebDataSourceImpl::extraData() const -{ - return m_extraData.get(); -} - -void WebDataSourceImpl::setExtraData(ExtraData* extraData) -{ - m_extraData.set(extraData); -} - -WebApplicationCacheHost* WebDataSourceImpl::applicationCacheHost() -{ -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - return ApplicationCacheHostInternal::toWebApplicationCacheHost(DocumentLoader::applicationCacheHost()); -#else - return 0; -#endif -} - -void WebDataSourceImpl::setDeferMainResourceDataLoad(bool defer) -{ - DocumentLoader::setDeferMainResourceDataLoad(defer); -} - -WebNavigationType WebDataSourceImpl::toWebNavigationType(NavigationType type) -{ - switch (type) { - case NavigationTypeLinkClicked: - return WebNavigationTypeLinkClicked; - case NavigationTypeFormSubmitted: - return WebNavigationTypeFormSubmitted; - case NavigationTypeBackForward: - return WebNavigationTypeBackForward; - case NavigationTypeReload: - return WebNavigationTypeReload; - case NavigationTypeFormResubmitted: - return WebNavigationTypeFormResubmitted; - case NavigationTypeOther: - default: - return WebNavigationTypeOther; - } -} - -const KURL& WebDataSourceImpl::endOfRedirectChain() const -{ - ASSERT(!m_redirectChain.isEmpty()); - return m_redirectChain.last(); -} - -void WebDataSourceImpl::clearRedirectChain() -{ - m_redirectChain.clear(); -} - -void WebDataSourceImpl::appendRedirect(const KURL& url) -{ - m_redirectChain.append(url); -} - -void WebDataSourceImpl::setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver> observer) -{ - // This call should always be followed up with the creation of a - // WebDataSourceImpl, so we should never leak this object. - m_nextPluginLoadObserver = observer.leakPtr(); -} - -WebDataSourceImpl::WebDataSourceImpl(const ResourceRequest& request, const SubstituteData& data) - : DocumentLoader(request, data) -{ - if (m_nextPluginLoadObserver) { - // When a new frame is created, it initially gets a data source for an - // empty document. Then it is navigated to the source URL of the - // frame, which results in a second data source being created. We want - // to wait to attach the WebPluginLoadObserver to that data source. - if (!request.url().isEmpty()) { - ASSERT(m_nextPluginLoadObserver->url() == request.url()); - m_pluginLoadObserver.set(m_nextPluginLoadObserver); - m_nextPluginLoadObserver = 0; - } - } -} - -WebDataSourceImpl::~WebDataSourceImpl() -{ -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDataSourceImpl.h b/WebKit/chromium/src/WebDataSourceImpl.h deleted file mode 100644 index 05329ff..0000000 --- a/WebKit/chromium/src/WebDataSourceImpl.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDataSourceImpl_h -#define WebDataSourceImpl_h - -#include "DocumentLoader.h" -#include "KURL.h" -#include "WebDataSource.h" -#include "WebPluginLoadObserver.h" -#include "WrappedResourceRequest.h" -#include "WrappedResourceResponse.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/Vector.h> - -namespace WebKit { - -class WebPluginLoadObserver; - -class WebDataSourceImpl : public WebCore::DocumentLoader, public WebDataSource { -public: - static PassRefPtr<WebDataSourceImpl> create(const WebCore::ResourceRequest&, - const WebCore::SubstituteData&); - - static WebDataSourceImpl* fromDocumentLoader(WebCore::DocumentLoader* loader) - { - return static_cast<WebDataSourceImpl*>(loader); - } - - // WebDataSource methods: - virtual const WebURLRequest& originalRequest() const; - virtual const WebURLRequest& request() const; - virtual const WebURLResponse& response() const; - virtual bool hasUnreachableURL() const; - virtual WebURL unreachableURL() const; - virtual void redirectChain(WebVector<WebURL>&) const; - virtual WebString pageTitle() const; - virtual WebNavigationType navigationType() const; - virtual double triggeringEventTime() const; - virtual ExtraData* extraData() const; - virtual void setExtraData(ExtraData*); - virtual WebApplicationCacheHost* applicationCacheHost(); - virtual void setDeferMainResourceDataLoad(bool); - - static WebNavigationType toWebNavigationType(WebCore::NavigationType type); - - bool hasRedirectChain() const { return !m_redirectChain.isEmpty(); } - const WebCore::KURL& endOfRedirectChain() const; - void clearRedirectChain(); - void appendRedirect(const WebCore::KURL& url); - - PassOwnPtr<WebPluginLoadObserver> releasePluginLoadObserver() { return m_pluginLoadObserver.release(); } - static void setNextPluginLoadObserver(PassOwnPtr<WebPluginLoadObserver>); - -private: - WebDataSourceImpl(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); - ~WebDataSourceImpl(); - - // Mutable because the const getters will magically sync these to the - // latest version from WebKit. - mutable WrappedResourceRequest m_originalRequestWrapper; - mutable WrappedResourceRequest m_requestWrapper; - mutable WrappedResourceResponse m_responseWrapper; - - // Lists all intermediate URLs that have redirected for the current provisional load. - // See WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad for a - // description of who modifies this when to keep it up to date. - Vector<WebCore::KURL> m_redirectChain; - - OwnPtr<ExtraData> m_extraData; - OwnPtr<WebPluginLoadObserver> m_pluginLoadObserver; - - static WebPluginLoadObserver* m_nextPluginLoadObserver; -}; - -} // namespace WebKit - -#endif // WebDataSourceImpl_h diff --git a/WebKit/chromium/src/WebDatabase.cpp b/WebKit/chromium/src/WebDatabase.cpp deleted file mode 100644 index 561d7c4..0000000 --- a/WebKit/chromium/src/WebDatabase.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDatabase.h" - -#include "AbstractDatabase.h" -#include "DatabaseTracker.h" -#include "QuotaTracker.h" -#include "SecurityOrigin.h" -#include "WebDatabaseObserver.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -#if !ENABLE(DATABASE) -namespace WebCore { -class AbstractDatabase { -public: - String stringIdentifier() const { return String(); } - String displayName() const { return String(); } - unsigned long long estimatedSize() const { return 0; } - SecurityOrigin* securityOrigin() const { return 0; } -}; -} -#endif // !ENABLE(DATABASE) - -using namespace WebCore; - -namespace WebKit { - -static WebDatabaseObserver* databaseObserver = 0; - -WebString WebDatabase::name() const -{ - ASSERT(m_database); - return m_database->stringIdentifier(); -} - -WebString WebDatabase::displayName() const -{ - ASSERT(m_database); - return m_database->displayName(); -} - -unsigned long WebDatabase::estimatedSize() const -{ - ASSERT(m_database); - return m_database->estimatedSize(); -} - -WebSecurityOrigin WebDatabase::securityOrigin() const -{ - ASSERT(m_database); - return WebSecurityOrigin(m_database->securityOrigin()); -} - -void WebDatabase::setObserver(WebDatabaseObserver* observer) -{ - databaseObserver = observer; -} - -WebDatabaseObserver* WebDatabase::observer() -{ - return databaseObserver; -} - -void WebDatabase::updateDatabaseSize( - const WebString& originIdentifier, const WebString& databaseName, - unsigned long long databaseSize, unsigned long long spaceAvailable) -{ -#if ENABLE(DATABASE) - WebCore::QuotaTracker::instance().updateDatabaseSizeAndSpaceAvailableToOrigin( - originIdentifier, databaseName, databaseSize, spaceAvailable); -#endif // ENABLE(DATABASE) -} - -void WebDatabase::closeDatabaseImmediately(const WebString& originIdentifier, const WebString& databaseName) -{ -#if ENABLE(DATABASE) - HashSet<RefPtr<AbstractDatabase> > databaseHandles; - RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromDatabaseIdentifier(originIdentifier); - DatabaseTracker::tracker().getOpenDatabases(origin.get(), databaseName, &databaseHandles); - for (HashSet<RefPtr<AbstractDatabase> >::iterator it = databaseHandles.begin(); it != databaseHandles.end(); ++it) - it->get()->closeImmediately(); -#endif // ENABLE(DATABASE) -} - -WebDatabase::WebDatabase(const AbstractDatabase* database) - : m_database(database) -{ -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp deleted file mode 100644 index 9f4ce87..0000000 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDevToolsAgentImpl.h" - -#include "DebuggerAgentImpl.h" -#include "DebuggerAgentManager.h" -#include "ExceptionCode.h" -#include "InjectedScriptHost.h" -#include "InspectorBackendDispatcher.h" -#include "InspectorController.h" -#include "Page.h" -#include "PageGroup.h" -#include "PlatformString.h" -#include "ResourceError.h" -#include "ResourceRequest.h" -#include "ResourceResponse.h" -#include "ScriptDebugServer.h" -#include "V8Binding.h" -#include "V8Node.h" -#include "V8Proxy.h" -#include "V8Utilities.h" -#include "WebDataSource.h" -#include "WebDevToolsAgentClient.h" -#include "WebFrameImpl.h" -#include "WebRect.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebURLError.h" -#include "WebURLRequest.h" -#include "WebURLResponse.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" -#include <wtf/CurrentTime.h> -#include <wtf/Noncopyable.h> -#include <wtf/OwnPtr.h> - -using WebCore::DocumentLoader; -using WebCore::FrameLoader; -using WebCore::InjectedScriptHost; -using WebCore::InspectorArray; -using WebCore::InspectorBackendDispatcher; -using WebCore::InspectorController; -using WebCore::Node; -using WebCore::Page; -using WebCore::ResourceError; -using WebCore::ResourceRequest; -using WebCore::ResourceResponse; -using WTF::String; -using WebCore::V8DOMWrapper; -using WebCore::V8Node; -using WebCore::V8Proxy; - -namespace WebKit { - -namespace { - -static const char kApuAgentFeatureName[] = "apu-agent"; -static const char kFrontendConnectedFeatureName[] = "frontend-connected"; -static const char kInspectorStateFeatureName[] = "inspector-state"; - -class ClientMessageLoopAdapter : public WebCore::ScriptDebugServer::ClientMessageLoop { -public: - static void ensureClientMessageLoopCreated(WebDevToolsAgentClient* client) - { - if (s_instance) - return; - s_instance = new ClientMessageLoopAdapter(client->createClientMessageLoop()); - WebCore::ScriptDebugServer::shared().setClientMessageLoop(s_instance); - } - - static void inspectedViewClosed(WebViewImpl* view) - { - if (s_instance) - s_instance->m_frozenViews.remove(view); - } - - static void didNavigate() - { - // Release render thread if necessary. - if (s_instance && s_instance->m_running) - WebCore::ScriptDebugServer::shared().continueProgram(); - } - -private: - ClientMessageLoopAdapter(PassOwnPtr<WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop> messageLoop) - : m_running(false) - , m_messageLoop(messageLoop) { } - - - virtual void run(Page* page) - { - if (m_running) - return; - m_running = true; - - Vector<WebViewImpl*> views; - - // 1. Disable input events. - HashSet<Page*>::const_iterator end = page->group().pages().end(); - for (HashSet<Page*>::const_iterator it = page->group().pages().begin(); it != end; ++it) { - WebViewImpl* view = WebViewImpl::fromPage(*it); - m_frozenViews.add(view); - views.append(view); - view->setIgnoreInputEvents(true); - } - - // 2. Disable active objects - WebView::willEnterModalLoop(); - - // 3. Process messages until quitNow is called. - m_messageLoop->run(); - - // 4. Resume active objects - WebView::didExitModalLoop(); - - // 5. Resume input events. - for (Vector<WebViewImpl*>::iterator it = views.begin(); it != views.end(); ++it) { - if (m_frozenViews.contains(*it)) { - // The view was not closed during the dispatch. - (*it)->setIgnoreInputEvents(false); - } - } - - // 6. All views have been resumed, clear the set. - m_frozenViews.clear(); - - m_running = false; - } - - virtual void quitNow() - { - m_messageLoop->quitNow(); - } - - bool m_running; - OwnPtr<WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop> m_messageLoop; - typedef HashSet<WebViewImpl*> FrozenViewsSet; - FrozenViewsSet m_frozenViews; - static ClientMessageLoopAdapter* s_instance; - -}; - -ClientMessageLoopAdapter* ClientMessageLoopAdapter::s_instance = 0; - -} // namespace - -WebDevToolsAgentImpl::WebDevToolsAgentImpl( - WebViewImpl* webViewImpl, - WebDevToolsAgentClient* client) - : m_hostId(client->hostIdentifier()) - , m_client(client) - , m_webViewImpl(webViewImpl) - , m_apuAgentEnabled(false) - , m_attached(false) -{ - DebuggerAgentManager::setExposeV8DebuggerProtocol( - client->exposeV8DebuggerProtocol()); -} - -WebDevToolsAgentImpl::~WebDevToolsAgentImpl() -{ - DebuggerAgentManager::onWebViewClosed(m_webViewImpl); - ClientMessageLoopAdapter::inspectedViewClosed(m_webViewImpl); -} - -void WebDevToolsAgentImpl::attach() -{ - if (m_attached) - return; - - if (!m_client->exposeV8DebuggerProtocol()) - ClientMessageLoopAdapter::ensureClientMessageLoopCreated(m_client); - - m_debuggerAgentImpl.set( - new DebuggerAgentImpl(m_webViewImpl, this, m_client)); - WebCString debuggerScriptJs = m_client->debuggerScriptSource(); - WebCore::ScriptDebugServer::shared().setDebuggerScriptSource( - WTF::String(debuggerScriptJs.data(), debuggerScriptJs.length())); - m_attached = true; -} - -void WebDevToolsAgentImpl::detach() -{ - // Prevent controller from sending messages to the frontend. - InspectorController* ic = inspectorController(); - ic->disconnectFrontend(); - ic->hideHighlight(); - ic->close(); - m_debuggerAgentImpl.set(0); - m_attached = false; - m_apuAgentEnabled = false; -} - -void WebDevToolsAgentImpl::frontendLoaded() -{ - connectFrontend(false); -} - -void WebDevToolsAgentImpl::didNavigate() -{ - ClientMessageLoopAdapter::didNavigate(); - DebuggerAgentManager::onNavigate(); -} - -void WebDevToolsAgentImpl::didClearWindowObject(WebFrameImpl* webframe) -{ - DebuggerAgentManager::setHostId(webframe, m_hostId); -} - -void WebDevToolsAgentImpl::dispatchOnInspectorBackend(const WebString& message) -{ - inspectorController()->inspectorBackendDispatcher()->dispatch(message); -} - -void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point) -{ - m_webViewImpl->inspectElementAt(point); -} - -void WebDevToolsAgentImpl::inspectNode(v8::Handle<v8::Value> node) -{ - if (!V8Node::HasInstance(node)) - V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR); - else - inspectorController()->inspect(V8Node::toNative(v8::Handle<v8::Object>::Cast(node))); -} - -void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebString& value) -{ - if (name == kApuAgentFeatureName) - setApuAgentEnabled(value == "true"); - else if (name == kInspectorStateFeatureName) { - InspectorController* ic = inspectorController(); - ic->restoreInspectorStateFromCookie(value); - } else if (name == kFrontendConnectedFeatureName && !inspectorController()->hasFrontend()) { - inspectorController()->injectedScriptHost()->setInjectedScriptSource(value); - connectFrontend(true); - } -} - -void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled) -{ - m_apuAgentEnabled = enabled; - InspectorController* ic = inspectorController(); - if (enabled) { - if (!ic->hasFrontend()) - connectFrontend(true); - - ic->startTimelineProfiler(); - m_debuggerAgentImpl->setAutoContinueOnException(true); - } else - ic->stopTimelineProfiler(); - - m_client->runtimePropertyChanged( - kApuAgentFeatureName, - enabled ? String("true") : String("false")); -} - -void WebDevToolsAgentImpl::connectFrontend(bool afterNavigation) -{ - if (afterNavigation) - inspectorController()->reuseFrontend(); - else - inspectorController()->connectFrontend(); - // We know that by this time injected script has already been pushed to the backend. - m_client->runtimePropertyChanged(kFrontendConnectedFeatureName, inspectorController()->injectedScriptHost()->injectedScriptSource()); -} - -WebCore::InspectorController* WebDevToolsAgentImpl::inspectorController() -{ - if (Page* page = m_webViewImpl->page()) - return page->inspectorController(); - return 0; -} - - -//------- plugin resource load notifications --------------- -void WebDevToolsAgentImpl::identifierForInitialRequest( - unsigned long resourceId, - WebFrame* frame, - const WebURLRequest& request) -{ - if (InspectorController* ic = inspectorController()) { - WebFrameImpl* webFrameImpl = static_cast<WebFrameImpl*>(frame); - FrameLoader* frameLoader = webFrameImpl->frame()->loader(); - DocumentLoader* loader = frameLoader->activeDocumentLoader(); - ic->identifierForInitialRequest(resourceId, loader, request.toResourceRequest()); - } -} - -void WebDevToolsAgentImpl::willSendRequest(unsigned long resourceId, WebURLRequest& request) -{ - if (InspectorController* ic = inspectorController()) { - ic->willSendRequest(resourceId, request.toMutableResourceRequest(), ResourceResponse()); - if (ic->hasFrontend() && request.reportLoadTiming()) - request.setReportRawHeaders(true); - } -} - -void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, int length) -{ - if (InspectorController* ic = inspectorController()) - ic->didReceiveContentLength(resourceId, length); -} - -void WebDevToolsAgentImpl::didReceiveResponse(unsigned long resourceId, const WebURLResponse& response) -{ - if (InspectorController* ic = inspectorController()) - ic->didReceiveResponse(resourceId, 0, response.toResourceResponse()); -} - -void WebDevToolsAgentImpl::didFinishLoading(unsigned long resourceId) -{ - if (InspectorController* ic = inspectorController()) - ic->didFinishLoading(resourceId, 0); -} - -void WebDevToolsAgentImpl::didFailLoading(unsigned long resourceId, const WebURLError& error) -{ - ResourceError resourceError; - if (InspectorController* ic = inspectorController()) - ic->didFailLoading(resourceId, resourceError); -} - -void WebDevToolsAgentImpl::inspectorDestroyed() -{ - // Our lifetime is bound to the WebViewImpl. -} - -void WebDevToolsAgentImpl::openInspectorFrontend(InspectorController*) -{ -} - -void WebDevToolsAgentImpl::highlight(Node* node) -{ - // InspectorController does the actuall tracking of the highlighted node - // and the drawing of the highlight. Here we just make sure to invalidate - // the rects of the old and new nodes. - hideHighlight(); -} - -void WebDevToolsAgentImpl::hideHighlight() -{ - // FIXME: able to invalidate a smaller rect. - // FIXME: Is it important to just invalidate the rect of the node region - // given that this is not on a critical codepath? In order to do so, we'd - // have to take scrolling into account. - const WebSize& size = m_webViewImpl->size(); - WebRect damagedRect(0, 0, size.width, size.height); - if (m_webViewImpl->client()) - m_webViewImpl->client()->didInvalidateRect(damagedRect); -} - -void WebDevToolsAgentImpl::populateSetting(const String& key, String* value) -{ - WebString string; - m_webViewImpl->inspectorSetting(key, &string); - *value = string; -} - -void WebDevToolsAgentImpl::storeSetting(const String& key, const String& value) -{ - m_webViewImpl->setInspectorSetting(key, value); -} - -bool WebDevToolsAgentImpl::sendMessageToFrontend(const WTF::String& message) -{ - WebDevToolsAgentImpl* devToolsAgent = static_cast<WebDevToolsAgentImpl*>(m_webViewImpl->devToolsAgent()); - if (!devToolsAgent) - return false; - - if (devToolsAgent->m_apuAgentEnabled) { - m_client->sendDispatchToAPU(message); - return true; - } - - m_client->sendMessageToInspectorFrontend(message); - return true; -} - -void WebDevToolsAgentImpl::updateInspectorStateCookie(const WTF::String& state) -{ - m_client->runtimePropertyChanged(kInspectorStateFeatureName, state); -} - -void WebDevToolsAgentImpl::evaluateInWebInspector(long callId, const WebString& script) -{ - InspectorController* ic = inspectorController(); - ic->evaluateForTestInFrontend(callId, script); -} - -void WebDevToolsAgentImpl::setTimelineProfilingEnabled(bool enabled) -{ - InspectorController* ic = inspectorController(); - if (enabled) - ic->startTimelineProfiler(); - else - ic->stopTimelineProfiler(); -} - -void WebDevToolsAgent::executeDebuggerCommand(const WebString& command, int callerId) -{ - DebuggerAgentManager::executeDebuggerCommand(command, callerId); -} - -void WebDevToolsAgent::debuggerPauseScript() -{ - DebuggerAgentManager::pauseScript(); -} - -void WebDevToolsAgent::interruptAndDispatch(MessageDescriptor* d) -{ - class DebuggerTask : public WebCore::ScriptDebugServer::Task { - public: - DebuggerTask(WebDevToolsAgent::MessageDescriptor* descriptor) : m_descriptor(descriptor) { } - virtual ~DebuggerTask() { } - virtual void run() - { - if (WebDevToolsAgent* webagent = m_descriptor->agent()) - webagent->dispatchOnInspectorBackend(m_descriptor->message()); - } - private: - OwnPtr<WebDevToolsAgent::MessageDescriptor> m_descriptor; - }; - WebCore::ScriptDebugServer::interruptAndRun(new DebuggerTask(d)); -} - -bool WebDevToolsAgent::shouldInterruptForMessage(const WebString& message) -{ - String commandName; - if (!InspectorBackendDispatcher::getCommandName(message, &commandName)) - return false; - return commandName == InspectorBackendDispatcher::pauseCmd - || commandName == InspectorBackendDispatcher::setBreakpointCmd - || commandName == InspectorBackendDispatcher::removeBreakpointCmd - || commandName == InspectorBackendDispatcher::activateBreakpointsCmd - || commandName == InspectorBackendDispatcher::deactivateBreakpointsCmd - || commandName == InspectorBackendDispatcher::startProfilingCmd - || commandName == InspectorBackendDispatcher::stopProfilingCmd - || commandName == InspectorBackendDispatcher::getProfileCmd; -} - -void WebDevToolsAgent::processPendingMessages() -{ - WebCore::ScriptDebugServer::shared().runPendingTasks(); -} - -void WebDevToolsAgent::setMessageLoopDispatchHandler(MessageLoopDispatchHandler handler) -{ - DebuggerAgentManager::setMessageLoopDispatchHandler(handler); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h deleted file mode 100644 index 487cf0c..0000000 --- a/WebKit/chromium/src/WebDevToolsAgentImpl.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsAgentImpl_h -#define WebDevToolsAgentImpl_h - -#include "InspectorClient.h" - -#include "WebDevToolsAgentPrivate.h" - -#include <v8.h> -#include <wtf/Forward.h> -#include <wtf/OwnPtr.h> - -namespace WebCore { -class Document; -class InspectorClient; -class InspectorController; -class Node; -} - -namespace WebKit { - -class DebuggerAgentImpl; -class WebDevToolsAgentClient; -class WebFrame; -class WebFrameImpl; -class WebString; -class WebURLRequest; -class WebURLResponse; -class WebViewImpl; -struct WebURLError; -struct WebDevToolsMessageData; - -class WebDevToolsAgentImpl : public WebDevToolsAgentPrivate, - public WebCore::InspectorClient { -public: - WebDevToolsAgentImpl(WebViewImpl* webViewImpl, WebDevToolsAgentClient* client); - virtual ~WebDevToolsAgentImpl(); - - // WebDevToolsAgentPrivate implementation. - virtual void didClearWindowObject(WebFrameImpl* frame); - - // WebDevToolsAgent implementation. - virtual void attach(); - virtual void detach(); - virtual void frontendLoaded(); - virtual void didNavigate(); - virtual void dispatchOnInspectorBackend(const WebString& message); - virtual void inspectElementAt(const WebPoint& point); - virtual void inspectNode(v8::Handle<v8::Value> node); - virtual void evaluateInWebInspector(long callId, const WebString& script); - virtual void setRuntimeProperty(const WebString& name, const WebString& value); - virtual void setTimelineProfilingEnabled(bool enable); - - virtual void identifierForInitialRequest(unsigned long, WebFrame*, const WebURLRequest&); - virtual void willSendRequest(unsigned long, WebURLRequest&); - virtual void didReceiveData(unsigned long, int length); - virtual void didReceiveResponse(unsigned long, const WebURLResponse&); - virtual void didFinishLoading(unsigned long); - virtual void didFailLoading(unsigned long, const WebURLError&); - - // InspectorClient implementation. - virtual void inspectorDestroyed(); - virtual void openInspectorFrontend(WebCore::InspectorController*); - virtual void highlight(WebCore::Node*); - virtual void hideHighlight(); - virtual void populateSetting(const WTF::String& key, WTF::String* value); - virtual void storeSetting(const WTF::String& key, const WTF::String& value); - virtual void updateInspectorStateCookie(const WTF::String&); - virtual bool sendMessageToFrontend(const WTF::String&); - - int hostId() { return m_hostId; } - -private: - void setApuAgentEnabled(bool enabled); - void connectFrontend(bool afterNavigation); - - WebCore::InspectorController* inspectorController(); - - int m_hostId; - WebDevToolsAgentClient* m_client; - WebViewImpl* m_webViewImpl; - OwnPtr<DebuggerAgentImpl> m_debuggerAgentImpl; - bool m_apuAgentEnabled; - bool m_attached; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebDevToolsAgentPrivate.h b/WebKit/chromium/src/WebDevToolsAgentPrivate.h deleted file mode 100644 index 7038a5e..0000000 --- a/WebKit/chromium/src/WebDevToolsAgentPrivate.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsAgentPrivate_h -#define WebDevToolsAgentPrivate_h - -#include "WebDevToolsAgent.h" - -namespace WebKit { -class WebFrameImpl; - -class WebDevToolsAgentPrivate : public WebDevToolsAgent { -public: - // Notifications from FrameLoaderClientImpl: - - // The window object for the frame has been cleared of any extra properties - // that may have been set by script from the previously loaded document. - virtual void didClearWindowObject(WebFrameImpl*) = 0; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp deleted file mode 100644 index caeffb6..0000000 --- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDevToolsFrontendImpl.h" - -#include "BoundObject.h" -#include "ContextMenuController.h" -#include "ContextMenuItem.h" -#include "DOMWindow.h" -#include "Document.h" -#include "Event.h" -#include "Frame.h" -#include "InspectorController.h" -#include "InspectorFrontendClientImpl.h" -#include "InspectorFrontendHost.h" -#include "Node.h" -#include "Page.h" -#include "Pasteboard.h" -#include "PlatformString.h" -#include "SecurityOrigin.h" -#include "Settings.h" -#include "V8Binding.h" -#include "V8DOMWrapper.h" -#include "V8InspectorFrontendHost.h" -#include "V8MouseEvent.h" -#include "V8Node.h" -#include "V8Proxy.h" -#include "V8Utilities.h" -#include "WebDevToolsFrontendClient.h" -#include "WebFrameImpl.h" -#include "WebScriptSource.h" -#include "WebViewImpl.h" -#include <wtf/OwnPtr.h> -#include <wtf/Vector.h> - -using namespace WebCore; - -namespace WebKit { - -static v8::Local<v8::String> ToV8String(const String& s) -{ - if (s.isNull()) - return v8::Local<v8::String>(); - - return v8::String::New(reinterpret_cast<const uint16_t*>(s.characters()), s.length()); -} - -WebDevToolsFrontend* WebDevToolsFrontend::create( - WebView* view, - WebDevToolsFrontendClient* client, - const WebString& applicationLocale) -{ - return new WebDevToolsFrontendImpl( - static_cast<WebViewImpl*>(view), - client, - applicationLocale); -} - -WebDevToolsFrontendImpl::WebDevToolsFrontendImpl( - WebViewImpl* webViewImpl, - WebDevToolsFrontendClient* client, - const String& applicationLocale) - : m_webViewImpl(webViewImpl) - , m_client(client) - , m_applicationLocale(applicationLocale) -{ - InspectorController* ic = m_webViewImpl->page()->inspectorController(); - ic->setInspectorFrontendClient(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this)); - - // Put each DevTools frontend Page into its own (single page) group so that it's not - // deferred along with the inspected page. - m_webViewImpl->page()->setGroupName(String()); -} - -WebDevToolsFrontendImpl::~WebDevToolsFrontendImpl() -{ -} - -void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& message) -{ - WebFrameImpl* frame = m_webViewImpl->mainFrameImpl(); - v8::HandleScope scope; - v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame()); - v8::Context::Scope contextScope(frameContext); - v8::Handle<v8::Value> inspectorBackendValue = frameContext->Global()->Get(v8::String::New("InspectorBackend")); - if (!inspectorBackendValue->IsObject()) - return; - v8::Handle<v8::Object> inspectorBackend = v8::Handle<v8::Object>::Cast(inspectorBackendValue); - v8::Handle<v8::Value> dispatchFunction = inspectorBackend->Get(v8::String::New("dispatch")); - // The frame might have navigated away from the front-end page (which is still weird). - if (!dispatchFunction->IsFunction()) - return; - v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchFunction); - Vector< v8::Handle<v8::Value> > args; - args.append(ToV8String(message)); - v8::TryCatch tryCatch; - tryCatch.SetVerbose(true); - function->Call(inspectorBackend, args.size(), args.data()); -} - -void WebDevToolsFrontendImpl::frontendLoaded() -{ - m_client->sendFrontendLoaded(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.h b/WebKit/chromium/src/WebDevToolsFrontendImpl.h deleted file mode 100644 index 866a1cb..0000000 --- a/WebKit/chromium/src/WebDevToolsFrontendImpl.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebDevToolsFrontendImpl_h -#define WebDevToolsFrontendImpl_h - -#include "PlatformString.h" -#include "WebDevToolsFrontend.h" -#include <v8.h> -#include <wtf/Forward.h> -#include <wtf/HashMap.h> -#include <wtf/Noncopyable.h> -#include <wtf/OwnPtr.h> -#include <wtf/RefPtr.h> -#include <wtf/Vector.h> - -namespace WebCore { -class ContextMenuItem; -class Node; -class Page; -} - -namespace WebKit { - -class WebDevToolsClientDelegate; -class WebViewImpl; -struct WebDevToolsMessageData; - -using WTF::String; - -class WebDevToolsFrontendImpl : public WebKit::WebDevToolsFrontend - , public Noncopyable { -public: - WebDevToolsFrontendImpl( - WebKit::WebViewImpl* webViewImpl, - WebKit::WebDevToolsFrontendClient* client, - const String& applicationLocale); - virtual ~WebDevToolsFrontendImpl(); - - // WebDevToolsFrontend implementation. - virtual void dispatchOnInspectorFrontend(const WebString& message); - - void frontendLoaded(); - -private: - WebKit::WebViewImpl* m_webViewImpl; - WebKit::WebDevToolsFrontendClient* m_client; - String m_applicationLocale; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebDeviceOrientation.cpp b/WebKit/chromium/src/WebDeviceOrientation.cpp deleted file mode 100644 index 47f6bd1..0000000 --- a/WebKit/chromium/src/WebDeviceOrientation.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDeviceOrientation.h" - -#include "DeviceOrientation.h" -#include <wtf/PassRefPtr.h> - -namespace WebKit { - -WebDeviceOrientation::WebDeviceOrientation(const PassRefPtr<WebCore::DeviceOrientation>& orientation) -{ - if (!orientation) { - m_isNull = true; - m_canProvideAlpha = false; - m_alpha = 0; - m_canProvideBeta = false; - m_beta = 0; - m_canProvideGamma = false; - m_gamma = 0; - return; - } - - m_isNull = false; - m_canProvideAlpha = orientation->canProvideAlpha(); - m_alpha = orientation->alpha(); - m_canProvideBeta = orientation->canProvideBeta(); - m_beta = orientation->beta(); - m_canProvideGamma = orientation->canProvideGamma(); - m_gamma = orientation->gamma(); -} - -WebDeviceOrientation& WebDeviceOrientation::operator=(const PassRefPtr<WebCore::DeviceOrientation>& orientation) -{ - if (!orientation) { - m_isNull = true; - m_canProvideAlpha = false; - m_alpha = 0; - m_canProvideBeta = false; - m_beta = 0; - m_canProvideGamma = false; - m_gamma = 0; - return *this; - } - - m_isNull = false; - m_canProvideAlpha = orientation->canProvideAlpha(); - m_alpha = orientation->alpha(); - m_canProvideBeta = orientation->canProvideBeta(); - m_beta = orientation->beta(); - m_canProvideGamma = orientation->canProvideGamma(); - m_gamma = orientation->gamma(); - return *this; -} - -WebDeviceOrientation::operator PassRefPtr<WebCore::DeviceOrientation>() const -{ - if (m_isNull) - return 0; - return WebCore::DeviceOrientation::create(m_canProvideAlpha, m_alpha, m_canProvideBeta, m_beta, m_canProvideGamma, m_gamma); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp b/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp deleted file mode 100644 index 8a75ca1..0000000 --- a/WebKit/chromium/src/WebDeviceOrientationClientMock.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDeviceOrientationClientMock.h" - -#include "DeviceOrientationClientMock.h" -#include "WebDeviceOrientation.h" -#include "WebDeviceOrientationController.h" - -namespace WebKit { - -WebDeviceOrientationClientMock* WebDeviceOrientationClientMock::create() -{ - return new WebDeviceOrientationClientMock(); -} - -void WebDeviceOrientationClientMock::setController(WebDeviceOrientationController* controller) -{ - m_clientMock->setController(controller->controller()); - delete controller; -} - -void WebDeviceOrientationClientMock::startUpdating() -{ - m_clientMock->startUpdating(); -} - -void WebDeviceOrientationClientMock::stopUpdating() -{ - m_clientMock->stopUpdating(); -} - -WebDeviceOrientation WebDeviceOrientationClientMock::lastOrientation() const -{ - return WebDeviceOrientation(m_clientMock->lastOrientation()); -} - -void WebDeviceOrientationClientMock::setOrientation(WebDeviceOrientation& orientation) -{ - m_clientMock->setOrientation(orientation); -} - -void WebDeviceOrientationClientMock::initialize() -{ - m_clientMock.reset(new WebCore::DeviceOrientationClientMock()); -} - -void WebDeviceOrientationClientMock::reset() -{ - m_clientMock.reset(0); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDeviceOrientationController.cpp b/WebKit/chromium/src/WebDeviceOrientationController.cpp deleted file mode 100644 index aa9249f..0000000 --- a/WebKit/chromium/src/WebDeviceOrientationController.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDeviceOrientationController.h" - -#include "DeviceOrientation.h" -#include "DeviceOrientationController.h" -#include "WebDeviceOrientation.h" -#include <wtf/PassRefPtr.h> - -namespace WebKit { - -void WebDeviceOrientationController::didChangeDeviceOrientation(const WebDeviceOrientation& orientation) -{ - PassRefPtr<WebCore::DeviceOrientation> deviceOrientation(orientation); - m_controller->didChangeDeviceOrientation(deviceOrientation.get()); -} - -WebCore::DeviceOrientationController* WebDeviceOrientationController::controller() const -{ - return m_controller; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDocument.cpp b/WebKit/chromium/src/WebDocument.cpp deleted file mode 100644 index a983bf7..0000000 --- a/WebKit/chromium/src/WebDocument.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDocument.h" - -#include "Document.h" -#include "DocumentType.h" -#include "Element.h" -#include "HTMLAllCollection.h" -#include "HTMLBodyElement.h" -#include "HTMLCollection.h" -#include "HTMLElement.h" -#include "HTMLHeadElement.h" -#include "NodeList.h" - -#include "WebDocumentType.h" -#include "WebElement.h" -#include "WebFrameImpl.h" -#include "WebNodeCollection.h" -#include "WebNodeList.h" -#include "WebURL.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebFrame* WebDocument::frame() const -{ - return WebFrameImpl::fromFrame(constUnwrap<Document>()->frame()); -} - -bool WebDocument::isHTMLDocument() const -{ - return constUnwrap<Document>()->isHTMLDocument(); -} - -bool WebDocument::isXHTMLDocument() const -{ - return constUnwrap<Document>()->isXHTMLDocument(); -} - -bool WebDocument::isPluginDocument() const -{ - return constUnwrap<Document>()->isPluginDocument(); -} - -WebURL WebDocument::baseURL() const -{ - return constUnwrap<Document>()->baseURL(); -} - -WebURL WebDocument::firstPartyForCookies() const -{ - return constUnwrap<Document>()->firstPartyForCookies(); -} - -WebElement WebDocument::documentElement() const -{ - return WebElement(constUnwrap<Document>()->documentElement()); -} - -WebElement WebDocument::body() const -{ - return WebElement(constUnwrap<Document>()->body()); -} - -WebElement WebDocument::head() -{ - return WebElement(unwrap<Document>()->head()); -} - -WebString WebDocument::title() const -{ - return WebString(constUnwrap<Document>()->title()); -} - -WebNodeCollection WebDocument::all() -{ - return WebNodeCollection(unwrap<Document>()->all()); -} - -WebURL WebDocument::completeURL(const WebString& partialURL) const -{ - return constUnwrap<Document>()->completeURL(partialURL); -} - -WebElement WebDocument::getElementById(const WebString& id) const -{ - return WebElement(constUnwrap<Document>()->getElementById(id)); -} - -WebNode WebDocument::focusedNode() const -{ - return WebNode(constUnwrap<Document>()->focusedNode()); -} - -WebDocumentType WebDocument::doctype() const -{ - return WebDocumentType(constUnwrap<Document>()->doctype()); -} - -WebDocument::WebDocument(const PassRefPtr<Document>& elem) - : WebNode(elem) -{ -} - -WebDocument& WebDocument::operator=(const PassRefPtr<Document>& elem) -{ - m_private = elem; - return *this; -} - -WebDocument::operator PassRefPtr<Document>() const -{ - return static_cast<Document*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDocumentType.cpp b/WebKit/chromium/src/WebDocumentType.cpp deleted file mode 100644 index bbf28e7..0000000 --- a/WebKit/chromium/src/WebDocumentType.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDocumentType.h" - -#include "DocumentType.h" -#include "WebString.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebString WebDocumentType::name() const -{ - return WebString(constUnwrap<DocumentType>()->name()); -} - -WebDocumentType::WebDocumentType(const PassRefPtr<DocumentType>& elem) - : WebNode(elem) -{ -} - -WebDocumentType& WebDocumentType::operator=(const PassRefPtr<DocumentType>& elem) -{ - m_private = elem; - return *this; -} - -WebDocumentType::operator PassRefPtr<DocumentType>() const -{ - return static_cast<DocumentType*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp deleted file mode 100644 index 9167c69..0000000 --- a/WebKit/chromium/src/WebDragData.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebDragData.h" - -#include "ChromiumDataObject.h" -#include "ChromiumDataObjectLegacy.h" -#include "ClipboardMimeTypes.h" -#include "WebData.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebVector.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebDragDataPrivate : public ChromiumDataObject { -}; - -void WebDragData::initialize() -{ - assign(static_cast<WebDragDataPrivate*>(ChromiumDataObject::create(ChromiumDataObjectLegacy::create(Clipboard::DragAndDrop)).releaseRef())); -} - -void WebDragData::reset() -{ - assign(0); -} - -void WebDragData::assign(const WebDragData& other) -{ - WebDragDataPrivate* p = const_cast<WebDragDataPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -WebString WebDragData::url() const -{ - ASSERT(!isNull()); - bool ignoredSuccess; - return m_private->getData(mimeTypeURL, ignoredSuccess); -} - -void WebDragData::setURL(const WebURL& url) -{ - ensureMutable(); - m_private->setData(mimeTypeURL, KURL(url).string()); -} - -WebString WebDragData::urlTitle() const -{ - ASSERT(!isNull()); - return m_private->urlTitle(); -} - -void WebDragData::setURLTitle(const WebString& urlTitle) -{ - ensureMutable(); - m_private->setUrlTitle(urlTitle); -} - -WebString WebDragData::downloadMetadata() const -{ - ASSERT(!isNull()); - bool ignoredSuccess; - return m_private->getData(mimeTypeDownloadURL, ignoredSuccess); -} - -void WebDragData::setDownloadMetadata(const WebString& downloadMetadata) -{ - ensureMutable(); - m_private->setData(mimeTypeDownloadURL, downloadMetadata); -} - -WebString WebDragData::fileExtension() const -{ - ASSERT(!isNull()); - return m_private->fileExtension(); -} - -void WebDragData::setFileExtension(const WebString& fileExtension) -{ - ensureMutable(); - m_private->setFileExtension(fileExtension); -} - -bool WebDragData::containsFilenames() const -{ - ASSERT(!isNull()); - return m_private->containsFilenames(); -} - -void WebDragData::filenames(WebVector<WebString>& filenames) const -{ - ASSERT(!isNull()); - filenames = m_private->filenames(); -} - -void WebDragData::setFilenames(const WebVector<WebString>& filenames) -{ - ensureMutable(); - Vector<String> filenamesCopy; - filenamesCopy.append(filenames.data(), filenames.size()); - m_private->setFilenames(filenamesCopy); -} - -void WebDragData::appendToFilenames(const WebString& filename) -{ - ensureMutable(); - Vector<String> filenames = m_private->filenames(); - filenames.append(filename); - m_private->setFilenames(filenames); -} - -WebString WebDragData::plainText() const -{ - ASSERT(!isNull()); - bool ignoredSuccess; - return m_private->getData(mimeTypeTextPlain, ignoredSuccess); -} - -void WebDragData::setPlainText(const WebString& plainText) -{ - ensureMutable(); - m_private->setData(mimeTypeTextPlain, plainText); -} - -WebString WebDragData::htmlText() const -{ - ASSERT(!isNull()); - bool ignoredSuccess; - return m_private->getData(mimeTypeTextHTML, ignoredSuccess); -} - -void WebDragData::setHTMLText(const WebString& htmlText) -{ - ensureMutable(); - m_private->setData(mimeTypeTextHTML, htmlText); -} - -WebURL WebDragData::htmlBaseURL() const -{ - ASSERT(!isNull()); - return m_private->htmlBaseUrl(); -} - -void WebDragData::setHTMLBaseURL(const WebURL& htmlBaseURL) -{ - ensureMutable(); - m_private->setHtmlBaseUrl(htmlBaseURL); -} - -WebString WebDragData::fileContentFilename() const -{ - ASSERT(!isNull()); - return m_private->fileContentFilename(); -} - -void WebDragData::setFileContentFilename(const WebString& filename) -{ - ensureMutable(); - m_private->setFileContentFilename(filename); -} - -WebData WebDragData::fileContent() const -{ - ASSERT(!isNull()); - return WebData(m_private->fileContent()); -} - -void WebDragData::setFileContent(const WebData& fileContent) -{ - ensureMutable(); - m_private->setFileContent(fileContent); -} - -WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>& data) - : m_private(static_cast<WebDragDataPrivate*>(data.releaseRef())) -{ -} - -WebDragData& WebDragData::operator=(const WTF::PassRefPtr<WebCore::ChromiumDataObject>& data) -{ - assign(static_cast<WebDragDataPrivate*>(data.releaseRef())); - return *this; -} - -WebDragData::operator WTF::PassRefPtr<WebCore::ChromiumDataObject>() const -{ - return PassRefPtr<ChromiumDataObject>(const_cast<WebDragDataPrivate*>(m_private)); -} - -void WebDragData::assign(WebDragDataPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -void WebDragData::ensureMutable() -{ - ASSERT(!isNull()); - ASSERT(m_private->hasOneRef()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp deleted file mode 100644 index 34daa34..0000000 --- a/WebKit/chromium/src/WebElement.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebElement.h" - -#include "Element.h" -#include "RenderBoxModelObject.h" -#include "RenderObject.h" -#include <wtf/PassRefPtr.h> - -#include "WebNamedNodeMap.h" - -using namespace WebCore; - -namespace WebKit { - -bool WebElement::isFormControlElement() const -{ - return constUnwrap<Element>()->isFormControlElement(); -} - -bool WebElement::isTextFormControlElement() const -{ - return constUnwrap<Element>()->isTextFormControl(); -} - -WebString WebElement::tagName() const -{ - return constUnwrap<Element>()->tagName(); -} - -bool WebElement::hasTagName(const WebString& tagName) const -{ - return equalIgnoringCase(constUnwrap<Element>()->tagName(), - tagName.operator String()); -} - -bool WebElement::hasAttribute(const WebString& attrName) const -{ - return constUnwrap<Element>()->hasAttribute(attrName); -} - -WebString WebElement::getAttribute(const WebString& attrName) const -{ - return constUnwrap<Element>()->getAttribute(attrName); -} - -bool WebElement::setAttribute(const WebString& attrName, const WebString& attrValue) -{ - ExceptionCode exceptionCode = 0; - unwrap<Element>()->setAttribute(attrName, attrValue, exceptionCode); - return !exceptionCode; -} - -WebNamedNodeMap WebElement::attributes() const -{ - return WebNamedNodeMap(m_private->attributes()); -} - -WebString WebElement::innerText() const -{ - return constUnwrap<Element>()->innerText(); -} - -WebString WebElement::computeInheritedLanguage() const -{ - return WebString(constUnwrap<Element>()->computeInheritedLanguage()); -} - -WebElement::WebElement(const PassRefPtr<Element>& elem) - : WebNode(elem) -{ -} - -WebElement& WebElement::operator=(const PassRefPtr<Element>& elem) -{ - m_private = elem; - return *this; -} - -WebElement::operator PassRefPtr<Element>() const -{ - return static_cast<Element*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp deleted file mode 100644 index 4e37dde..0000000 --- a/WebKit/chromium/src/WebEntities.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebEntities.h" - -#include "WebString.h" - -#include <string.h> -#include <wtf/HashMap.h> -#include <wtf/text/StringBuilder.h> -#include <wtf/text/WTFString.h> - -namespace WebKit { - -WebEntities::WebEntities(bool xmlEntities) -{ - ASSERT(m_entitiesMap.isEmpty()); - m_entitiesMap.set(0x003c, "lt"); - m_entitiesMap.set(0x003e, "gt"); - m_entitiesMap.set(0x0026, "amp"); - m_entitiesMap.set(0x0027, "apos"); - m_entitiesMap.set(0x0022, "quot"); - // We add #39 for test-compatibility reason. - if (!xmlEntities) - m_entitiesMap.set(0x0027, String("#39")); -} - -String WebEntities::entityNameByCode(int code) const -{ - if (m_entitiesMap.contains(code)) - return m_entitiesMap.get(code); - return ""; -} - -String WebEntities::convertEntitiesInString(const String& value) const -{ - unsigned len = value.length(); - const UChar* startPos = value.characters(); - const UChar* curPos = startPos; - - // FIXME: Optimize - create StringBuilder only if value has any entities. - StringBuilder result; - while (len--) { - if (m_entitiesMap.contains(*curPos)) { - // Append content before entity code. - if (curPos > startPos) - result.append(String(startPos, curPos - startPos)); - result.append('&'); - result.append(m_entitiesMap.get(*curPos)); - result.append(';'); - startPos = ++curPos; - } else - curPos++; - } - // Append the remaining content. - if (curPos > startPos) - result.append(String(startPos, curPos - startPos)); - - return result.toString(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebEntities.h b/WebKit/chromium/src/WebEntities.h deleted file mode 100644 index f210566..0000000 --- a/WebKit/chromium/src/WebEntities.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebEntities_h -#define WebEntities_h - -#include "PlatformString.h" -#include <wtf/HashMap.h> - -namespace WebKit { - -// FIXME: This class is wrong and needs to be removed. -class WebEntities { -public: - // ', %, ⊅, &supl; are not defined by the HTML standards. - // - IE does not support ' as an HTML entity (but support it as an XML - // entity.) - // - Firefox supports ' as an HTML entity. - // - Both of IE and Firefox don't support %, ⊅ and &supl;. - // - // A web page saved by Chromium should be able to be read by other browsers - // such as IE and Firefox. Chromium should produce only the standard entity - // references which other browsers can recognize. - // So if standard_html_entities_ is true, we will use a numeric character - // reference for ', and don't use entity references for %, ⊅ - // and &supl; for serialization. - // - // If xmlEntities is true, WebEntities will only contain standard XML - // entities. - explicit WebEntities(bool xmlEntities); - - // Check whether specified unicode has corresponding html or xml built-in - // entity name. If yes, return the entity notation. If not, returns an - // empty string. Parameter isHTML indicates check the code in html entity - // map or in xml entity map. - WTF::String entityNameByCode(int code) const; - - // Returns a new string with corresponding entity names replaced. - WTF::String convertEntitiesInString(const WTF::String&) const; -private: - typedef HashMap<int, WTF::String> EntitiesMapType; - // An internal object that maps the Unicode character to corresponding - // entity notation. - EntitiesMapType m_entitiesMap; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp b/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp deleted file mode 100644 index ef2409c..0000000 --- a/WebKit/chromium/src/WebFileChooserCompletionImpl.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFileChooserCompletionImpl.h" - -namespace WebKit { - -WebFileChooserCompletionImpl::WebFileChooserCompletionImpl(PassRefPtr<WebCore::FileChooser> chooser) - : m_fileChooser(chooser) -{ -} - -WebFileChooserCompletionImpl::~WebFileChooserCompletionImpl() -{ -} - -void WebFileChooserCompletionImpl::didChooseFile(const WebVector<WebString>& fileNames) -{ - if (fileNames.size() == 1) - m_fileChooser->chooseFile(fileNames[0]); - else { - // This clause handles a case of file_names.size()==0 too. - Vector<WTF::String> paths; - for (size_t i = 0; i < fileNames.size(); ++i) - paths.append(fileNames[i]); - m_fileChooser->chooseFiles(paths); - } - // This object is no longer needed. - delete this; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFileChooserCompletionImpl.h b/WebKit/chromium/src/WebFileChooserCompletionImpl.h deleted file mode 100644 index 147d1f7..0000000 --- a/WebKit/chromium/src/WebFileChooserCompletionImpl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileChooserCompletionImpl_h -#define WebFileChooserCompletionImpl_h - -#include "WebFileChooserCompletion.h" -#include "WebString.h" -#include "WebVector.h" - -#include "FileChooser.h" -#include <wtf/PassRefPtr.h> - -using WebKit::WebFileChooserCompletion; -using WebKit::WebString; -using WebKit::WebVector; - -namespace WebKit { - -class WebFileChooserCompletionImpl : public WebFileChooserCompletion { -public: - WebFileChooserCompletionImpl(PassRefPtr<WebCore::FileChooser> chooser); - ~WebFileChooserCompletionImpl(); - virtual void didChooseFile(const WebVector<WebString>& fileNames); -private: - RefPtr<WebCore::FileChooser> m_fileChooser; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp deleted file mode 100644 index 52a4032..0000000 --- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "config.h" -#include "WebFileSystemCallbacksImpl.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystemCallbacks.h" -#include "AsyncFileSystemChromium.h" -#include "FileMetadata.h" -#include "ScriptExecutionContext.h" -#include "WebFileSystemEntry.h" -#include "WebFileInfo.h" -#include "WebString.h" -#include "WorkerAsyncFileSystemChromium.h" -#include <wtf/Vector.h> - -using namespace WebCore; - -namespace WebKit { - -WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WebCore::ScriptExecutionContext* context, bool synchronous) - : m_callbacks(callbacks) - , m_context(context) - , m_synchronous(synchronous) -{ - ASSERT(m_callbacks); -} - -WebFileSystemCallbacksImpl::~WebFileSystemCallbacksImpl() -{ -} - -void WebFileSystemCallbacksImpl::didSucceed() -{ - m_callbacks->didSucceed(); - delete this; -} - -void WebFileSystemCallbacksImpl::didReadMetadata(const WebFileInfo& webFileInfo) -{ - FileMetadata fileMetadata; - fileMetadata.modificationTime = webFileInfo.modificationTime; - fileMetadata.length = webFileInfo.length; - fileMetadata.type = static_cast<FileMetadata::Type>(webFileInfo.type); - m_callbacks->didReadMetadata(fileMetadata); - delete this; -} - -void WebFileSystemCallbacksImpl::didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore) -{ - for (size_t i = 0; i < entries.size(); ++i) - m_callbacks->didReadDirectoryEntry(entries[i].name, entries[i].isDirectory); - m_callbacks->didReadDirectoryEntries(hasMore); - delete this; -} - -void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path) -{ - if (m_context && m_context->isWorkerContext()) - m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, path, m_synchronous)); - else - m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(path)); - delete this; -} - -void WebFileSystemCallbacksImpl::didFail(WebFileError error) -{ - m_callbacks->didFail(error); - delete this; -} - -} // namespace WebKit - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h deleted file mode 100644 index 75fa2bb..0000000 --- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFileSystemCallbacksImpl_h -#define WebFileSystemCallbacksImpl_h - -#include "WebFileSystemCallbacks.h" -#include "WebVector.h" -#include <wtf/OwnPtr.h> -#include <wtf/PassOwnPtr.h> - -namespace WebCore { -class AsyncFileSystemCallbacks; -class ScriptExecutionContext; -} - -namespace WebKit { - -struct WebFileInfo; -struct WebFileSystemEntry; -class WebString; - -class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks { -public: - WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::ScriptExecutionContext* = 0, bool synchronous = false); - virtual ~WebFileSystemCallbacksImpl(); - - virtual void didSucceed(); - virtual void didReadMetadata(const WebFileInfo& info); - virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore); - virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath); - virtual void didFail(WebFileError error); - -private: - OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; - - // Used for worker's openFileSystem callbacks. - WebCore::ScriptExecutionContext* m_context; - bool m_synchronous; -}; - -} // namespace WebKit - -#endif // WebFileSystemCallbacksImpl_h diff --git a/WebKit/chromium/src/WebFontCache.cpp b/WebKit/chromium/src/WebFontCache.cpp deleted file mode 100644 index 52358ec..0000000 --- a/WebKit/chromium/src/WebFontCache.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontCache.h" - -#include "FontCache.h" - -using namespace WebCore; - -namespace WebKit { - -// static -size_t WebFontCache::fontDataCount() -{ - return fontCache()->fontDataCount(); -} - -// static -size_t WebFontCache::inactiveFontDataCount() -{ - return fontCache()->inactiveFontDataCount(); -} - -// static -void WebFontCache::clear() -{ - fontCache()->invalidate(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFontDescription.cpp b/WebKit/chromium/src/WebFontDescription.cpp deleted file mode 100644 index 18f6830..0000000 --- a/WebKit/chromium/src/WebFontDescription.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontDescription.h" - -#include "FontDescription.h" - -using namespace WebCore; - -namespace WebKit { - -WebFontDescription::WebFontDescription(const FontDescription& desc, - short fontLetterSpacing, short fontWordSpacing) -{ - family = desc.family().family(); - genericFamily = static_cast<GenericFamily>(desc.genericFamily()); - size = desc.specifiedSize(); - italic = desc.italic(); - smallCaps = desc.smallCaps(); - weight = static_cast<Weight>(desc.weight()); - smoothing = static_cast<Smoothing>(desc.fontSmoothing()); - letterSpacing = fontLetterSpacing; - wordSpacing = fontWordSpacing; -} - -WebFontDescription::operator WebCore::FontDescription() const -{ - FontFamily fontFamily; - fontFamily.setFamily(family); - - FontDescription desc; - desc.setFamily(fontFamily); - desc.setGenericFamily(static_cast<FontDescription::GenericFamilyType>(genericFamily)); - desc.setSpecifiedSize(size); - desc.setComputedSize(size); - desc.setItalic(italic); - desc.setSmallCaps(smallCaps); - desc.setWeight(static_cast<FontWeight>(weight)); - desc.setFontSmoothing(static_cast<FontSmoothingMode>(smoothing)); - return desc; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFontImpl.cpp b/WebKit/chromium/src/WebFontImpl.cpp deleted file mode 100644 index 8c61997..0000000 --- a/WebKit/chromium/src/WebFontImpl.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontImpl.h" - -#include "Font.h" -#include "FontDescription.h" -#include "GraphicsContext.h" -#include "PlatformContextSkia.h" -#include "WebFloatPoint.h" -#include "WebFloatRect.h" -#include "WebFontDescription.h" -#include "WebRect.h" -#include "WebTextRun.h" - -using namespace WebCore; - -namespace WebKit { - -WebFont* WebFont::create(const WebFontDescription& desc) -{ - return new WebFontImpl(desc, desc.letterSpacing, desc.wordSpacing); -} - -WebFontImpl::WebFontImpl(const FontDescription& desc, short letterSpacing, short wordSpacing) - : m_font(desc, letterSpacing, wordSpacing) -{ - m_font.update(0); -} - -WebFontDescription WebFontImpl::fontDescription() const -{ - return WebFontDescription(m_font.fontDescription(), m_font.letterSpacing(), m_font.wordSpacing()); -} - -int WebFontImpl::ascent() const -{ - return m_font.ascent(); -} - -int WebFontImpl::descent() const -{ - return m_font.descent(); -} - -int WebFontImpl::height() const -{ - return m_font.height(); -} - -int WebFontImpl::lineSpacing() const -{ - return m_font.lineSpacing(); -} - -float WebFontImpl::xHeight() const -{ - return m_font.xHeight(); -} - -void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFloatPoint& leftBaseline, - WebColor color, const WebRect& clip, bool canvasIsOpaque, - int from, int to) const -{ - // FIXME hook canvasIsOpaque up to the platform-specific indicators for - // whether subpixel AA can be used for this draw. On Windows, this is - // PlatformContextSkia::setDrawingToImageBuffer. -#if WEBKIT_USING_CG - GraphicsContext gc(canvas); -#elif WEBKIT_USING_SKIA - PlatformContextSkia context(canvas); - // PlatformGraphicsContext is actually a pointer to PlatformContextSkia. - GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context)); -#else - notImplemented(); -#endif - - gc.save(); - gc.setFillColor(color, ColorSpaceDeviceRGB); - gc.clip(WebCore::FloatRect(clip)); - m_font.drawText(&gc, run, leftBaseline, from, to); - gc.restore(); -} - -int WebFontImpl::calculateWidth(const WebTextRun& run) const -{ - return m_font.width(run, 0); -} - -int WebFontImpl::offsetForPosition(const WebTextRun& run, float position) const -{ - return m_font.offsetForPosition(run, position, true); -} - -WebFloatRect WebFontImpl::selectionRectForText(const WebTextRun& run, const WebFloatPoint& leftBaseline, int height, int from, int to) const -{ - return m_font.selectionRectForText(run, leftBaseline, height, from, to); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFontImpl.h b/WebKit/chromium/src/WebFontImpl.h deleted file mode 100644 index 3ac9031..0000000 --- a/WebKit/chromium/src/WebFontImpl.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFontImpl_h -#define WebFontImpl_h - -#include "Font.h" -#include "WebFont.h" - -namespace WebCore { class FontDescription; } - -namespace WebKit { - -class WebFontImpl : public WebFont { -public: - WebFontImpl(const WebCore::FontDescription&, short letterSpacing, short wordSpacing); - - virtual WebFontDescription fontDescription() const; - - virtual int ascent() const; - virtual int descent() const; - virtual int height() const; - virtual int lineSpacing() const; - virtual float xHeight() const; - - virtual void drawText(WebCanvas*, const WebTextRun&, const WebFloatPoint& leftBaseline, WebColor, - const WebRect& clip, bool canvasIsOpaque, int from = 0, int to = -1) const; - virtual int calculateWidth(const WebTextRun&) const; - virtual int offsetForPosition(const WebTextRun&, float position) const; - virtual WebFloatRect selectionRectForText(const WebTextRun&, const WebFloatPoint& leftBaseline, - int height, int from = 0, int to = -1) const; - -private: - WebCore::Font m_font; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebFormControlElement.cpp b/WebKit/chromium/src/WebFormControlElement.cpp deleted file mode 100644 index a75fe5c..0000000 --- a/WebKit/chromium/src/WebFormControlElement.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFormControlElement.h" - -#include "HTMLFormControlElement.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -bool WebFormControlElement::isEnabled() const -{ - return constUnwrap<HTMLFormControlElement>()->isEnabledFormControl(); -} - -WebString WebFormControlElement::formControlName() const -{ - return constUnwrap<HTMLFormControlElement>()->name(); -} - -WebString WebFormControlElement::formControlType() const -{ - return constUnwrap<HTMLFormControlElement>()->type(); -} - -WebString WebFormControlElement::nameForAutofill() const -{ - String name = constUnwrap<HTMLFormControlElement>()->name(); - String trimmedName = name.stripWhiteSpace(); - if (!trimmedName.isEmpty()) - return trimmedName; - name = constUnwrap<HTMLFormControlElement>()->getIdAttribute(); - trimmedName = name.stripWhiteSpace(); - if (!trimmedName.isEmpty()) - return trimmedName; - return String(); -} - -WebFormControlElement::WebFormControlElement(const PassRefPtr<HTMLFormControlElement>& elem) - : WebElement(elem) -{ -} - -WebFormControlElement& WebFormControlElement::operator=(const PassRefPtr<HTMLFormControlElement>& elem) -{ - m_private = elem; - return *this; -} - -WebFormControlElement::operator PassRefPtr<HTMLFormControlElement>() const -{ - return static_cast<HTMLFormControlElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp deleted file mode 100644 index 6b6e9be..0000000 --- a/WebKit/chromium/src/WebFormElement.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFormElement.h" - -#include "FormState.h" -#include "HTMLFormControlElement.h" -#include "HTMLFormElement.h" -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "WebFormControlElement.h" -#include "WebInputElement.h" -#include "WebString.h" -#include "WebURL.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -bool WebFormElement::autoComplete() const -{ - return constUnwrap<HTMLFormElement>()->autoComplete(); -} - -WebString WebFormElement::action() const -{ - return constUnwrap<HTMLFormElement>()->action(); -} - -WebString WebFormElement::name() const -{ - return constUnwrap<HTMLFormElement>()->name(); -} - -WebString WebFormElement::method() const -{ - return constUnwrap<HTMLFormElement>()->method(); -} - -bool WebFormElement::wasUserSubmitted() const -{ - return constUnwrap<HTMLFormElement>()->wasUserSubmitted(); -} - -void WebFormElement::submit() -{ - unwrap<HTMLFormElement>()->submit(); -} - -void WebFormElement::getNamedElements(const WebString& name, - WebVector<WebNode>& result) -{ - Vector<RefPtr<Node> > tempVector; - unwrap<HTMLFormElement>()->getNamedElements(name, tempVector); - result.assign(tempVector); -} - -void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const -{ - const HTMLFormElement* form = constUnwrap<HTMLFormElement>(); - Vector<RefPtr<HTMLFormControlElement> > tempVector; - // FIXME: We should move the for-loop condition into a variable instead of - // re-evaluating size each time. Also, consider refactoring this code so that - // we don't call form->associatedElements() multiple times. - for (size_t i = 0; i < form->associatedElements().size(); i++) { - if (!form->associatedElements()[i]->isFormControlElement()) - continue; - HTMLFormControlElement* element = static_cast<HTMLFormControlElement*>(form->associatedElements()[i]); - if (element->hasLocalName(HTMLNames::inputTag) - || element->hasLocalName(HTMLNames::selectTag)) - tempVector.append(element); - } - result.assign(tempVector); -} - -WebFormElement::WebFormElement(const PassRefPtr<HTMLFormElement>& e) - : WebElement(e) -{ -} - -WebFormElement& WebFormElement::operator=(const PassRefPtr<HTMLFormElement>& e) -{ - m_private = e; - return *this; -} - -WebFormElement::operator PassRefPtr<HTMLFormElement>() const -{ - return static_cast<HTMLFormElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp deleted file mode 100644 index 5baf73b..0000000 --- a/WebKit/chromium/src/WebFrameImpl.cpp +++ /dev/null @@ -1,2281 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// How ownership works -// ------------------- -// -// Big oh represents a refcounted relationship: owner O--- ownee -// -// WebView (for the toplevel frame only) -// O -// | -// Page O------- Frame (m_mainFrame) O-------O FrameView -// || -// || -// FrameLoader O-------- WebFrame (via FrameLoaderClient) -// -// FrameLoader and Frame are formerly one object that was split apart because -// it got too big. They basically have the same lifetime, hence the double line. -// -// WebFrame is refcounted and has one ref on behalf of the FrameLoader/Frame. -// This is not a normal reference counted pointer because that would require -// changing WebKit code that we don't control. Instead, it is created with this -// ref initially and it is removed when the FrameLoader is getting destroyed. -// -// WebFrames are created in two places, first in WebViewImpl when the root -// frame is created, and second in WebFrame::CreateChildFrame when sub-frames -// are created. WebKit will hook up this object to the FrameLoader/Frame -// and the refcount will be correct. -// -// How frames are destroyed -// ------------------------ -// -// The main frame is never destroyed and is re-used. The FrameLoader is re-used -// and a reference to the main frame is kept by the Page. -// -// When frame content is replaced, all subframes are destroyed. This happens -// in FrameLoader::detachFromParent for each subframe. -// -// Frame going away causes the FrameLoader to get deleted. In FrameLoader's -// destructor, it notifies its client with frameLoaderDestroyed. This calls -// WebFrame::Closing and then derefs the WebFrame and will cause it to be -// deleted (unless an external someone is also holding a reference). - -#include "config.h" -#include "WebFrameImpl.h" - -#include "AssociatedURLLoader.h" -#include "Chrome.h" -#include "ChromiumBridge.h" -#include "ClipboardUtilitiesChromium.h" -#include "Console.h" -#include "DOMUtilitiesPrivate.h" -#include "DOMWindow.h" -#include "Document.h" -#include "DocumentFragment.h" // Only needed for ReplaceSelectionCommand.h :( -#include "DocumentLoader.h" -#include "DocumentMarker.h" -#include "DocumentMarkerController.h" -#include "Editor.h" -#include "EventHandler.h" -#include "FormState.h" -#include "FrameLoadRequest.h" -#include "FrameLoader.h" -#include "FrameTree.h" -#include "FrameView.h" -#include "GraphicsContext.h" -#include "HTMLCollection.h" -#include "HTMLFormElement.h" -#include "HTMLFrameOwnerElement.h" -#include "HTMLHeadElement.h" -#include "HTMLInputElement.h" -#include "HTMLLinkElement.h" -#include "HTMLNames.h" -#include "HistoryItem.h" -#include "InspectorController.h" -#include "Page.h" -#include "Performance.h" -#include "PlatformContextSkia.h" -#include "PluginDocument.h" -#include "PrintContext.h" -#include "RenderFrame.h" -#include "RenderTreeAsText.h" -#include "RenderView.h" -#include "RenderWidget.h" -#include "ReplaceSelectionCommand.h" -#include "ResourceHandle.h" -#include "ResourceRequest.h" -#include "SVGSMILElement.h" -#include "ScriptController.h" -#include "ScriptSourceCode.h" -#include "ScriptValue.h" -#include "ScrollTypes.h" -#include "ScrollbarTheme.h" -#include "SelectionController.h" -#include "Settings.h" -#include "SkiaUtils.h" -#include "SubstituteData.h" -#include "TextAffinity.h" -#include "TextIterator.h" -#include "WebAnimationControllerImpl.h" -#include "WebConsoleMessage.h" -#include "WebDataSourceImpl.h" -#include "WebDocument.h" -#include "WebFindOptions.h" -#include "WebFormElement.h" -#include "WebFrameClient.h" -#include "WebHistoryItem.h" -#include "WebInputElement.h" -#include "WebPasswordAutocompleteListener.h" -#include "WebPerformance.h" -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" -#include "WebRange.h" -#include "WebRect.h" -#include "WebScriptSource.h" -#include "WebSecurityOrigin.h" -#include "WebSize.h" -#include "WebURLError.h" -#include "WebVector.h" -#include "WebViewImpl.h" -#include "XPathResult.h" -#include "markup.h" - -#include <algorithm> -#include <wtf/CurrentTime.h> - - -#if OS(DARWIN) -#include "LocalCurrentGraphicsContext.h" -#endif - -#if OS(LINUX) || OS(FREEBSD) -#include <gdk/gdk.h> -#endif - -using namespace WebCore; - -namespace WebKit { - -static int frameCount = 0; - -// Key for a StatsCounter tracking how many WebFrames are active. -static const char* const webFrameActiveCount = "WebFrameActiveCount"; - -static const char* const osdType = "application/opensearchdescription+xml"; -static const char* const osdRel = "search"; - -// Backend for contentAsPlainText, this is a recursive function that gets -// the text for the current frame and all of its subframes. It will append -// the text of each frame in turn to the |output| up to |maxChars| length. -// -// The |frame| must be non-null. -static void frameContentAsPlainText(size_t maxChars, Frame* frame, - Vector<UChar>* output) -{ - Document* doc = frame->document(); - if (!doc) - return; - - if (!frame->view()) - return; - - // TextIterator iterates over the visual representation of the DOM. As such, - // it requires you to do a layout before using it (otherwise it'll crash). - if (frame->view()->needsLayout()) - frame->view()->layout(); - - // Select the document body. - RefPtr<Range> range(doc->createRange()); - ExceptionCode exception = 0; - range->selectNodeContents(doc->body(), exception); - - if (!exception) { - // The text iterator will walk nodes giving us text. This is similar to - // the plainText() function in TextIterator.h, but we implement the maximum - // size and also copy the results directly into a wstring, avoiding the - // string conversion. - for (TextIterator it(range.get()); !it.atEnd(); it.advance()) { - const UChar* chars = it.characters(); - if (!chars) { - if (it.length()) { - // It appears from crash reports that an iterator can get into a state - // where the character count is nonempty but the character pointer is - // null. advance()ing it will then just add that many to the null - // pointer which won't be caught in a null check but will crash. - // - // A null pointer and 0 length is common for some nodes. - // - // IF YOU CATCH THIS IN A DEBUGGER please let brettw know. We don't - // currently understand the conditions for this to occur. Ideally, the - // iterators would never get into the condition so we should fix them - // if we can. - ASSERT_NOT_REACHED(); - break; - } - - // Just got a null node, we can forge ahead! - continue; - } - size_t toAppend = - std::min(static_cast<size_t>(it.length()), maxChars - output->size()); - output->append(chars, toAppend); - if (output->size() >= maxChars) - return; // Filled up the buffer. - } - } - - // The separator between frames when the frames are converted to plain text. - const UChar frameSeparator[] = { '\n', '\n' }; - const size_t frameSeparatorLen = 2; - - // Recursively walk the children. - FrameTree* frameTree = frame->tree(); - for (Frame* curChild = frameTree->firstChild(); curChild; curChild = curChild->tree()->nextSibling()) { - // Ignore the text of non-visible frames. - RenderView* contentRenderer = curChild->contentRenderer(); - RenderPart* ownerRenderer = curChild->ownerRenderer(); - if (!contentRenderer || !contentRenderer->width() || !contentRenderer->height() - || (contentRenderer->x() + contentRenderer->width() <= 0) || (contentRenderer->y() + contentRenderer->height() <= 0) - || (ownerRenderer && ownerRenderer->style() && ownerRenderer->style()->visibility() != VISIBLE)) { - continue; - } - - // Make sure the frame separator won't fill up the buffer, and give up if - // it will. The danger is if the separator will make the buffer longer than - // maxChars. This will cause the computation above: - // maxChars - output->size() - // to be a negative number which will crash when the subframe is added. - if (output->size() >= maxChars - frameSeparatorLen) - return; - - output->append(frameSeparator, frameSeparatorLen); - frameContentAsPlainText(maxChars, curChild, output); - if (output->size() >= maxChars) - return; // Filled up the buffer. - } -} - -static long long generateFrameIdentifier() -{ - static long long next = 0; - return ++next; -} - -WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame) -{ - if (!frame) - return 0; - if (!frame->document() || !frame->document()->isPluginDocument()) - return 0; - PluginDocument* pluginDocument = static_cast<PluginDocument*>(frame->document()); - return static_cast<WebPluginContainerImpl *>(pluginDocument->pluginWidget()); -} - -// Simple class to override some of PrintContext behavior. Some of the methods -// made virtual so that they can be overriden by ChromePluginPrintContext. -class ChromePrintContext : public PrintContext, public Noncopyable { -public: - ChromePrintContext(Frame* frame) - : PrintContext(frame) - , m_printedPageWidth(0) - { - } - - virtual void begin(float width, float height) - { - ASSERT(!m_printedPageWidth); - m_printedPageWidth = width; - PrintContext::begin(m_printedPageWidth, height); - } - - virtual void end() - { - PrintContext::end(); - } - - virtual float getPageShrink(int pageNumber) const - { - IntRect pageRect = m_pageRects[pageNumber]; - return m_printedPageWidth / pageRect.width(); - } - - // Spools the printed page, a subrect of m_frame. Skip the scale step. - // NativeTheme doesn't play well with scaling. Scaling is done browser side - // instead. Returns the scale to be applied. - // On Linux, we don't have the problem with NativeTheme, hence we let WebKit - // do the scaling and ignore the return value. - virtual float spoolPage(GraphicsContext& ctx, int pageNumber) - { - IntRect pageRect = m_pageRects[pageNumber]; - float scale = m_printedPageWidth / pageRect.width(); - - ctx.save(); -#if OS(LINUX) || OS(FREEBSD) - ctx.scale(WebCore::FloatSize(scale, scale)); -#endif - ctx.translate(static_cast<float>(-pageRect.x()), - static_cast<float>(-pageRect.y())); - ctx.clip(pageRect); - m_frame->view()->paintContents(&ctx, pageRect); - ctx.restore(); - return scale; - } - - virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) - { - return PrintContext::computePageRects(printRect, headerHeight, footerHeight, userScaleFactor, outPageHeight); - } - - virtual int pageCount() const - { - return PrintContext::pageCount(); - } - - virtual bool shouldUseBrowserOverlays() const - { - return true; - } - -private: - // Set when printing. - float m_printedPageWidth; -}; - -// Simple class to override some of PrintContext behavior. This is used when -// the frame hosts a plugin that supports custom printing. In this case, we -// want to delegate all printing related calls to the plugin. -class ChromePluginPrintContext : public ChromePrintContext { -public: - ChromePluginPrintContext(Frame* frame, int printerDPI) - : ChromePrintContext(frame), m_pageCount(0), m_printerDPI(printerDPI) - { - // This HAS to be a frame hosting a full-mode plugin - ASSERT(frame->document()->isPluginDocument()); - } - - virtual void begin(float width) - { - } - - virtual void end() - { - WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); - if (pluginContainer && pluginContainer->supportsPaginatedPrint()) - pluginContainer->printEnd(); - else - ASSERT_NOT_REACHED(); - } - - virtual float getPageShrink(int pageNumber) const - { - // We don't shrink the page (maybe we should ask the widget ??) - return 1.0; - } - - virtual void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight) - { - WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); - if (pluginContainer && pluginContainer->supportsPaginatedPrint()) - m_pageCount = pluginContainer->printBegin(IntRect(printRect), m_printerDPI); - else - ASSERT_NOT_REACHED(); - } - - virtual int pageCount() const - { - return m_pageCount; - } - - // Spools the printed page, a subrect of m_frame. Skip the scale step. - // NativeTheme doesn't play well with scaling. Scaling is done browser side - // instead. Returns the scale to be applied. - virtual float spoolPage(GraphicsContext& ctx, int pageNumber) - { - WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(m_frame); - if (pluginContainer && pluginContainer->supportsPaginatedPrint()) - pluginContainer->printPage(pageNumber, &ctx); - else - ASSERT_NOT_REACHED(); - return 1.0; - } - - virtual bool shouldUseBrowserOverlays() const - { - return false; - } - -private: - // Set when printing. - int m_pageCount; - int m_printerDPI; -}; - -static WebDataSource* DataSourceForDocLoader(DocumentLoader* loader) -{ - return loader ? WebDataSourceImpl::fromDocumentLoader(loader) : 0; -} - - -// WebFrame ------------------------------------------------------------------- - -class WebFrameImpl::DeferredScopeStringMatches { -public: - DeferredScopeStringMatches(WebFrameImpl* webFrame, - int identifier, - const WebString& searchText, - const WebFindOptions& options, - bool reset) - : m_timer(this, &DeferredScopeStringMatches::doTimeout) - , m_webFrame(webFrame) - , m_identifier(identifier) - , m_searchText(searchText) - , m_options(options) - , m_reset(reset) - { - m_timer.startOneShot(0.0); - } - -private: - void doTimeout(Timer<DeferredScopeStringMatches>*) - { - m_webFrame->callScopeStringMatches( - this, m_identifier, m_searchText, m_options, m_reset); - } - - Timer<DeferredScopeStringMatches> m_timer; - RefPtr<WebFrameImpl> m_webFrame; - int m_identifier; - WebString m_searchText; - WebFindOptions m_options; - bool m_reset; -}; - - -// WebFrame ------------------------------------------------------------------- - -int WebFrame::instanceCount() -{ - return frameCount; -} - -WebFrame* WebFrame::frameForEnteredContext() -{ - Frame* frame = - ScriptController::retrieveFrameForEnteredContext(); - return WebFrameImpl::fromFrame(frame); -} - -WebFrame* WebFrame::frameForCurrentContext() -{ - Frame* frame = - ScriptController::retrieveFrameForCurrentContext(); - return WebFrameImpl::fromFrame(frame); -} - -WebFrame* WebFrame::fromFrameOwnerElement(const WebElement& element) -{ - return WebFrameImpl::fromFrameOwnerElement( - PassRefPtr<Element>(element).get()); -} - -WebString WebFrameImpl::name() const -{ - return m_frame->tree()->uniqueName(); -} - -void WebFrameImpl::setName(const WebString& name) -{ - m_frame->tree()->setName(name); -} - -long long WebFrameImpl::identifier() const -{ - return m_identifier; -} - -WebURL WebFrameImpl::url() const -{ - const WebDataSource* ds = dataSource(); - if (!ds) - return WebURL(); - return ds->request().url(); -} - -WebURL WebFrameImpl::favIconURL() const -{ - FrameLoader* frameLoader = m_frame->loader(); - // The URL to the favicon may be in the header. As such, only - // ask the loader for the favicon if it's finished loading. - if (frameLoader->state() == FrameStateComplete) { - const KURL& url = frameLoader->iconURL(); - if (!url.isEmpty()) - return url; - } - return WebURL(); -} - -WebURL WebFrameImpl::openSearchDescriptionURL() const -{ - FrameLoader* frameLoader = m_frame->loader(); - if (frameLoader->state() == FrameStateComplete - && m_frame->document() && m_frame->document()->head() - && !m_frame->tree()->parent()) { - HTMLHeadElement* head = m_frame->document()->head(); - if (head) { - RefPtr<HTMLCollection> children = head->children(); - for (Node* child = children->firstItem(); child; child = children->nextItem()) { - HTMLLinkElement* linkElement = toHTMLLinkElement(child); - if (linkElement - && linkElement->type() == osdType - && linkElement->rel() == osdRel - && !linkElement->href().isEmpty()) - return linkElement->href(); - } - } - } - return WebURL(); -} - -WebString WebFrameImpl::encoding() const -{ - return frame()->loader()->writer()->encoding(); -} - -WebSize WebFrameImpl::scrollOffset() const -{ - FrameView* view = frameView(); - if (view) - return view->scrollOffset(); - - return WebSize(); -} - -WebSize WebFrameImpl::contentsSize() const -{ - return frame()->view()->contentsSize(); -} - -int WebFrameImpl::contentsPreferredWidth() const -{ - if (m_frame->document() && m_frame->document()->renderView()) - return m_frame->document()->renderView()->minPreferredLogicalWidth(); - return 0; -} - -int WebFrameImpl::documentElementScrollHeight() const -{ - if (m_frame->document() && m_frame->document()->documentElement()) - return m_frame->document()->documentElement()->scrollHeight(); - return 0; -} - -bool WebFrameImpl::hasVisibleContent() const -{ - return frame()->view()->visibleWidth() > 0 && frame()->view()->visibleHeight() > 0; -} - -WebView* WebFrameImpl::view() const -{ - return viewImpl(); -} - -WebFrame* WebFrameImpl::opener() const -{ - Frame* opener = 0; - if (m_frame) - opener = m_frame->loader()->opener(); - return fromFrame(opener); -} - -WebFrame* WebFrameImpl::parent() const -{ - Frame* parent = 0; - if (m_frame) - parent = m_frame->tree()->parent(); - return fromFrame(parent); -} - -WebFrame* WebFrameImpl::top() const -{ - if (m_frame) - return fromFrame(m_frame->tree()->top()); - - return 0; -} - -WebFrame* WebFrameImpl::firstChild() const -{ - return fromFrame(frame()->tree()->firstChild()); -} - -WebFrame* WebFrameImpl::lastChild() const -{ - return fromFrame(frame()->tree()->lastChild()); -} - -WebFrame* WebFrameImpl::nextSibling() const -{ - return fromFrame(frame()->tree()->nextSibling()); -} - -WebFrame* WebFrameImpl::previousSibling() const -{ - return fromFrame(frame()->tree()->previousSibling()); -} - -WebFrame* WebFrameImpl::traverseNext(bool wrap) const -{ - return fromFrame(frame()->tree()->traverseNextWithWrap(wrap)); -} - -WebFrame* WebFrameImpl::traversePrevious(bool wrap) const -{ - return fromFrame(frame()->tree()->traversePreviousWithWrap(wrap)); -} - -WebFrame* WebFrameImpl::findChildByName(const WebString& name) const -{ - return fromFrame(frame()->tree()->child(name)); -} - -WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const -{ - if (xpath.isEmpty()) - return 0; - - Document* document = m_frame->document(); - - ExceptionCode ec = 0; - PassRefPtr<XPathResult> xpathResult = - document->evaluate(xpath, - document, - 0, // namespace - XPathResult::ORDERED_NODE_ITERATOR_TYPE, - 0, // XPathResult object - ec); - if (!xpathResult.get()) - return 0; - - Node* node = xpathResult->iterateNext(ec); - - if (!node || !node->isFrameOwnerElement()) - return 0; - HTMLFrameOwnerElement* frameElement = - static_cast<HTMLFrameOwnerElement*>(node); - return fromFrame(frameElement->contentFrame()); -} - -WebDocument WebFrameImpl::document() const -{ - if (!m_frame || !m_frame->document()) - return WebDocument(); - return WebDocument(m_frame->document()); -} - -void WebFrameImpl::forms(WebVector<WebFormElement>& results) const -{ - if (!m_frame) - return; - - RefPtr<HTMLCollection> forms = m_frame->document()->forms(); - size_t formCount = 0; - for (size_t i = 0; i < forms->length(); ++i) { - Node* node = forms->item(i); - if (node && node->isHTMLElement()) - ++formCount; - } - - WebVector<WebFormElement> temp(formCount); - for (size_t i = 0; i < formCount; ++i) { - Node* node = forms->item(i); - // Strange but true, sometimes item can be 0. - if (node && node->isHTMLElement()) - temp[i] = static_cast<HTMLFormElement*>(node); - } - results.swap(temp); -} - -WebAnimationController* WebFrameImpl::animationController() -{ - return &m_animationController; -} - -WebPerformance WebFrameImpl::performance() const -{ - if (!m_frame || !m_frame->domWindow()) - return WebPerformance(); - - return WebPerformance(m_frame->domWindow()->performance()); -} - -WebSecurityOrigin WebFrameImpl::securityOrigin() const -{ - if (!m_frame || !m_frame->document()) - return WebSecurityOrigin(); - - return WebSecurityOrigin(m_frame->document()->securityOrigin()); -} - -void WebFrameImpl::grantUniversalAccess() -{ - ASSERT(m_frame && m_frame->document()); - if (m_frame && m_frame->document()) - m_frame->document()->securityOrigin()->grantUniversalAccess(); -} - -NPObject* WebFrameImpl::windowObject() const -{ - if (!m_frame) - return 0; - - return m_frame->script()->windowScriptNPObject(); -} - -void WebFrameImpl::bindToWindowObject(const WebString& name, NPObject* object) -{ - ASSERT(m_frame); - if (!m_frame || !m_frame->script()->canExecuteScripts(NotAboutToExecuteScript)) - return; - - String key = name; -#if USE(V8) - m_frame->script()->bindToWindowObject(m_frame, key, object); -#else - notImplemented(); -#endif -} - -void WebFrameImpl::executeScript(const WebScriptSource& source) -{ - TextPosition1 position(WTF::OneBasedNumber::fromOneBasedInt(source.startLine), WTF::OneBasedNumber::base()); - m_frame->script()->executeScript( - ScriptSourceCode(source.code, source.url, position)); -} - -void WebFrameImpl::executeScriptInIsolatedWorld( - int worldId, const WebScriptSource* sourcesIn, unsigned numSources, - int extensionGroup) -{ - Vector<ScriptSourceCode> sources; - - for (unsigned i = 0; i < numSources; ++i) { - TextPosition1 position(WTF::OneBasedNumber::fromOneBasedInt(sourcesIn[i].startLine), WTF::OneBasedNumber::base()); - sources.append(ScriptSourceCode( - sourcesIn[i].code, sourcesIn[i].url, position)); - } - - m_frame->script()->evaluateInIsolatedWorld(worldId, sources, extensionGroup); -} - -void WebFrameImpl::addMessageToConsole(const WebConsoleMessage& message) -{ - ASSERT(frame()); - - MessageLevel webCoreMessageLevel; - switch (message.level) { - case WebConsoleMessage::LevelTip: - webCoreMessageLevel = TipMessageLevel; - break; - case WebConsoleMessage::LevelLog: - webCoreMessageLevel = LogMessageLevel; - break; - case WebConsoleMessage::LevelWarning: - webCoreMessageLevel = WarningMessageLevel; - break; - case WebConsoleMessage::LevelError: - webCoreMessageLevel = ErrorMessageLevel; - break; - default: - ASSERT_NOT_REACHED(); - return; - } - - frame()->domWindow()->console()->addMessage( - OtherMessageSource, LogMessageType, webCoreMessageLevel, message.text, - 1, String()); -} - -void WebFrameImpl::collectGarbage() -{ - if (!m_frame) - return; - if (!m_frame->settings()->isJavaScriptEnabled()) - return; - // FIXME: Move this to the ScriptController and make it JS neutral. -#if USE(V8) - m_frame->script()->collectGarbage(); -#else - notImplemented(); -#endif -} - -#if USE(V8) -v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue( - const WebScriptSource& source) -{ - TextPosition1 position(WTF::OneBasedNumber::fromOneBasedInt(source.startLine), WTF::OneBasedNumber::base()); - return m_frame->script()->executeScript( - ScriptSourceCode(source.code, source.url, position)).v8Value(); -} - -// Returns the V8 context for this frame, or an empty handle if there is none. -v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const -{ - if (!m_frame) - return v8::Local<v8::Context>(); - - return V8Proxy::mainWorldContext(m_frame); -} -#endif - -bool WebFrameImpl::insertStyleText( - const WebString& css, const WebString& id) { - Document* document = frame()->document(); - if (!document) - return false; - Element* documentElement = document->documentElement(); - if (!documentElement) - return false; - - ExceptionCode err = 0; - - if (!id.isEmpty()) { - Element* oldElement = document->getElementById(id); - if (oldElement) { - Node* parent = oldElement->parentNode(); - if (!parent) - return false; - parent->removeChild(oldElement, err); - } - } - - RefPtr<Element> stylesheet = document->createElement( - HTMLNames::styleTag, false); - if (!id.isEmpty()) - stylesheet->setAttribute(HTMLNames::idAttr, id); - stylesheet->setTextContent(css, err); - ASSERT(!err); - Node* first = documentElement->firstChild(); - bool success = documentElement->insertBefore(stylesheet, first, err); - ASSERT(success); - return success; -} - -void WebFrameImpl::reload(bool ignoreCache) -{ - m_frame->loader()->history()->saveDocumentAndScrollState(); - m_frame->loader()->reload(ignoreCache); -} - -void WebFrameImpl::loadRequest(const WebURLRequest& request) -{ - ASSERT(!request.isNull()); - const ResourceRequest& resourceRequest = request.toResourceRequest(); - - if (resourceRequest.url().protocolIs("javascript")) { - loadJavaScriptURL(resourceRequest.url()); - return; - } - - m_frame->loader()->load(resourceRequest, false); -} - -void WebFrameImpl::loadHistoryItem(const WebHistoryItem& item) -{ - RefPtr<HistoryItem> historyItem = PassRefPtr<HistoryItem>(item); - ASSERT(historyItem.get()); - - // If there is no currentItem, which happens when we are navigating in - // session history after a crash, we need to manufacture one otherwise WebKit - // hoarks. This is probably the wrong thing to do, but it seems to work. - RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem(); - if (!currentItem) { - currentItem = HistoryItem::create(); - currentItem->setLastVisitWasFailure(true); - m_frame->loader()->history()->setCurrentItem(currentItem.get()); - viewImpl()->setCurrentHistoryItem(currentItem.get()); - } - - m_frame->loader()->history()->goToItem( - historyItem.get(), FrameLoadTypeIndexedBackForward); -} - -void WebFrameImpl::loadData(const WebData& data, - const WebString& mimeType, - const WebString& textEncoding, - const WebURL& baseURL, - const WebURL& unreachableURL, - bool replace) -{ - SubstituteData substData(data, mimeType, textEncoding, unreachableURL); - ASSERT(substData.isValid()); - - // If we are loading substitute data to replace an existing load, then - // inherit all of the properties of that original request. This way, - // reload will re-attempt the original request. It is essential that - // we only do this when there is an unreachableURL since a non-empty - // unreachableURL informs FrameLoader::reload to load unreachableURL - // instead of the currently loaded URL. - ResourceRequest request; - if (replace && !unreachableURL.isEmpty()) - request = m_frame->loader()->originalRequest(); - request.setURL(baseURL); - - m_frame->loader()->load(request, substData, false); - if (replace) { - // Do this to force WebKit to treat the load as replacing the currently - // loaded page. - m_frame->loader()->setReplacing(); - } -} - -void WebFrameImpl::loadHTMLString(const WebData& data, - const WebURL& baseURL, - const WebURL& unreachableURL, - bool replace) -{ - loadData(data, - WebString::fromUTF8("text/html"), - WebString::fromUTF8("UTF-8"), - baseURL, - unreachableURL, - replace); -} - -bool WebFrameImpl::isLoading() const -{ - if (!m_frame) - return false; - return m_frame->loader()->isLoading(); -} - -void WebFrameImpl::stopLoading() -{ - if (!m_frame) - return; - - // FIXME: Figure out what we should really do here. It seems like a bug - // that FrameLoader::stopLoading doesn't call stopAllLoaders. - m_frame->loader()->stopAllLoaders(); - m_frame->loader()->stopLoading(UnloadEventPolicyNone); -} - -WebDataSource* WebFrameImpl::provisionalDataSource() const -{ - FrameLoader* frameLoader = m_frame->loader(); - - // We regard the policy document loader as still provisional. - DocumentLoader* docLoader = frameLoader->provisionalDocumentLoader(); - if (!docLoader) - docLoader = frameLoader->policyDocumentLoader(); - - return DataSourceForDocLoader(docLoader); -} - -WebDataSource* WebFrameImpl::dataSource() const -{ - return DataSourceForDocLoader(m_frame->loader()->documentLoader()); -} - -WebHistoryItem WebFrameImpl::previousHistoryItem() const -{ - // We use the previous item here because documentState (filled-out forms) - // only get saved to history when it becomes the previous item. The caller - // is expected to query the history item after a navigation occurs, after - // the desired history item has become the previous entry. - return WebHistoryItem(m_frame->loader()->history()->previousItem()); -} - -WebHistoryItem WebFrameImpl::currentHistoryItem() const -{ - // If we are still loading, then we don't want to clobber the current - // history item as this could cause us to lose the scroll position and - // document state. However, it is OK for new navigations. - if (m_frame->loader()->loadType() == FrameLoadTypeStandard - || !m_frame->loader()->activeDocumentLoader()->isLoadingInAPISense()) - m_frame->loader()->history()->saveDocumentAndScrollState(); - - return WebHistoryItem(m_frame->page()->backForwardList()->currentItem()); -} - -void WebFrameImpl::enableViewSourceMode(bool enable) -{ - if (m_frame) - m_frame->setInViewSourceMode(enable); -} - -bool WebFrameImpl::isViewSourceModeEnabled() const -{ - if (m_frame) - return m_frame->inViewSourceMode(); - - return false; -} - -void WebFrameImpl::setReferrerForRequest( - WebURLRequest& request, const WebURL& referrerURL) { - String referrer; - if (referrerURL.isEmpty()) - referrer = m_frame->loader()->outgoingReferrer(); - else - referrer = referrerURL.spec().utf16(); - if (SecurityOrigin::shouldHideReferrer(request.url(), referrer)) - return; - request.setHTTPHeaderField(WebString::fromUTF8("Referer"), referrer); -} - -void WebFrameImpl::dispatchWillSendRequest(WebURLRequest& request) -{ - ResourceResponse response; - m_frame->loader()->client()->dispatchWillSendRequest( - 0, 0, request.toMutableResourceRequest(), response); -} - -WebURLLoader* WebFrameImpl::createAssociatedURLLoader() -{ - return new AssociatedURLLoader(this); -} - -void WebFrameImpl::commitDocumentData(const char* data, size_t length) -{ - m_frame->loader()->documentLoader()->commitData(data, length); -} - -unsigned WebFrameImpl::unloadListenerCount() const -{ - return frame()->domWindow()->pendingUnloadEventListeners(); -} - -bool WebFrameImpl::isProcessingUserGesture() const -{ - return frame()->loader()->isProcessingUserGesture(); -} - -bool WebFrameImpl::willSuppressOpenerInNewFrame() const -{ - return frame()->loader()->suppressOpenerInNewFrame(); -} - -void WebFrameImpl::replaceSelection(const WebString& text) -{ - RefPtr<DocumentFragment> fragment = createFragmentFromText( - frame()->selection()->toNormalizedRange().get(), text); - applyCommand(ReplaceSelectionCommand::create( - frame()->document(), fragment.get(), false, true, true)); -} - -void WebFrameImpl::insertText(const WebString& text) -{ - Editor* editor = frame()->editor(); - - if (editor->hasComposition()) - editor->confirmComposition(text); - else - editor->insertText(text, 0); -} - -void WebFrameImpl::setMarkedText( - const WebString& text, unsigned location, unsigned length) -{ - Editor* editor = frame()->editor(); - - Vector<CompositionUnderline> decorations; - editor->setComposition(text, decorations, location, length); -} - -void WebFrameImpl::unmarkText() -{ - frame()->editor()->confirmCompositionWithoutDisturbingSelection(); -} - -bool WebFrameImpl::hasMarkedText() const -{ - return frame()->editor()->hasComposition(); -} - -WebRange WebFrameImpl::markedRange() const -{ - return frame()->editor()->compositionRange(); -} - -bool WebFrameImpl::firstRectForCharacterRange(unsigned location, unsigned length, WebRect& rect) const -{ - if ((location + length < location) && (location + length)) - length = 0; - - Element* selectionRoot = frame()->selection()->rootEditableElement(); - Element* scope = selectionRoot ? selectionRoot : frame()->document()->documentElement(); - RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(scope, location, length); - if (!range) - return false; - IntRect intRect = frame()->editor()->firstRectForRange(range.get()); - rect = WebRect(intRect.x(), intRect.y(), intRect.width(), intRect.height()); - - return true; -} - -bool WebFrameImpl::executeCommand(const WebString& name) -{ - ASSERT(frame()); - - if (name.length() <= 2) - return false; - - // Since we don't have NSControl, we will convert the format of command - // string and call the function on Editor directly. - String command = name; - - // Make sure the first letter is upper case. - command.replace(0, 1, command.substring(0, 1).upper()); - - // Remove the trailing ':' if existing. - if (command[command.length() - 1] == UChar(':')) - command = command.substring(0, command.length() - 1); - - if (command == "Copy") { - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); - if (pluginContainer) { - pluginContainer->copy(); - return true; - } - } - - bool rv = true; - - // Specially handling commands that Editor::execCommand does not directly - // support. - if (command == "DeleteToEndOfParagraph") { - Editor* editor = frame()->editor(); - if (!editor->deleteWithDirection(DirectionForward, - ParagraphBoundary, - true, - false)) { - editor->deleteWithDirection(DirectionForward, - CharacterGranularity, - true, - false); - } - } else if (command == "Indent") - frame()->editor()->indent(); - else if (command == "Outdent") - frame()->editor()->outdent(); - else if (command == "DeleteBackward") - rv = frame()->editor()->command(AtomicString("BackwardDelete")).execute(); - else if (command == "DeleteForward") - rv = frame()->editor()->command(AtomicString("ForwardDelete")).execute(); - else if (command == "AdvanceToNextMisspelling") { - // False must be passed here, or the currently selected word will never be - // skipped. - frame()->editor()->advanceToNextMisspelling(false); - } else if (command == "ToggleSpellPanel") - frame()->editor()->showSpellingGuessPanel(); - else - rv = frame()->editor()->command(command).execute(); - return rv; -} - -bool WebFrameImpl::executeCommand(const WebString& name, const WebString& value) -{ - ASSERT(frame()); - String webName = name; - - // moveToBeginningOfDocument and moveToEndfDocument are only handled by WebKit - // for editable nodes. - if (!frame()->editor()->canEdit() && webName == "moveToBeginningOfDocument") - return viewImpl()->propagateScroll(ScrollUp, ScrollByDocument); - - if (!frame()->editor()->canEdit() && webName == "moveToEndOfDocument") - return viewImpl()->propagateScroll(ScrollDown, ScrollByDocument); - - return frame()->editor()->command(webName).execute(value); -} - -bool WebFrameImpl::isCommandEnabled(const WebString& name) const -{ - ASSERT(frame()); - return frame()->editor()->command(name).isEnabled(); -} - -void WebFrameImpl::enableContinuousSpellChecking(bool enable) -{ - if (enable == isContinuousSpellCheckingEnabled()) - return; - frame()->editor()->toggleContinuousSpellChecking(); -} - -bool WebFrameImpl::isContinuousSpellCheckingEnabled() const -{ - return frame()->editor()->isContinuousSpellCheckingEnabled(); -} - -bool WebFrameImpl::hasSelection() const -{ - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); - if (pluginContainer) - return pluginContainer->plugin()->hasSelection(); - - // frame()->selection()->isNone() never returns true. - return (frame()->selection()->start() != frame()->selection()->end()); -} - -WebRange WebFrameImpl::selectionRange() const -{ - return frame()->selection()->toNormalizedRange(); -} - -WebString WebFrameImpl::selectionAsText() const -{ - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); - if (pluginContainer) - return pluginContainer->plugin()->selectionAsText(); - - RefPtr<Range> range = frame()->selection()->toNormalizedRange(); - if (!range.get()) - return WebString(); - - String text = range->text(); -#if OS(WINDOWS) - replaceNewlinesWithWindowsStyleNewlines(text); -#endif - replaceNBSPWithSpace(text); - return text; -} - -WebString WebFrameImpl::selectionAsMarkup() const -{ - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); - if (pluginContainer) - return pluginContainer->plugin()->selectionAsMarkup(); - - RefPtr<Range> range = frame()->selection()->toNormalizedRange(); - if (!range.get()) - return WebString(); - - return createMarkup(range.get(), 0); -} - -void WebFrameImpl::selectWordAroundPosition(Frame* frame, VisiblePosition pos) -{ - VisibleSelection selection(pos); - selection.expandUsingGranularity(WordGranularity); - - if (frame->selection()->shouldChangeSelection(selection)) { - TextGranularity granularity = selection.isRange() ? WordGranularity : CharacterGranularity; - frame->selection()->setSelection(selection, granularity); - } -} - -bool WebFrameImpl::selectWordAroundCaret() -{ - SelectionController* controller = frame()->selection(); - ASSERT(!controller->isNone()); - if (controller->isNone() || controller->isRange()) - return false; - selectWordAroundPosition(frame(), controller->selection().visibleStart()); - return true; -} - -int WebFrameImpl::printBegin(const WebSize& pageSize, int printerDPI, bool *useBrowserOverlays) -{ - ASSERT(!frame()->document()->isFrameSet()); - // If this is a plugin document, check if the plugin supports its own - // printing. If it does, we will delegate all printing to that. - WebPluginContainerImpl* pluginContainer = pluginContainerFromFrame(frame()); - if (pluginContainer && pluginContainer->supportsPaginatedPrint()) - m_printContext.set(new ChromePluginPrintContext(frame(), printerDPI)); - else - m_printContext.set(new ChromePrintContext(frame())); - - FloatRect rect(0, 0, static_cast<float>(pageSize.width), - static_cast<float>(pageSize.height)); - m_printContext->begin(rect.width(), rect.height()); - float pageHeight; - // We ignore the overlays calculation for now since they are generated in the - // browser. pageHeight is actually an output parameter. - m_printContext->computePageRects(rect, 0, 0, 1.0, pageHeight); - if (useBrowserOverlays) - *useBrowserOverlays = m_printContext->shouldUseBrowserOverlays(); - - return m_printContext->pageCount(); -} - -float WebFrameImpl::getPrintPageShrink(int page) -{ - // Ensure correct state. - if (!m_printContext.get() || page < 0) { - ASSERT_NOT_REACHED(); - return 0; - } - - return m_printContext->getPageShrink(page); -} - -float WebFrameImpl::printPage(int page, WebCanvas* canvas) -{ - // Ensure correct state. - if (!m_printContext.get() || page < 0 || !frame() || !frame()->document()) { - ASSERT_NOT_REACHED(); - return 0; - } - -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) || OS(SOLARIS) - PlatformContextSkia context(canvas); - GraphicsContext spool(&context); -#elif OS(DARWIN) - GraphicsContext spool(canvas); - LocalCurrentGraphicsContext localContext(&spool); -#endif - - return m_printContext->spoolPage(spool, page); -} - -void WebFrameImpl::printEnd() -{ - ASSERT(m_printContext.get()); - if (m_printContext.get()) - m_printContext->end(); - m_printContext.clear(); -} - -bool WebFrameImpl::isPageBoxVisible(int pageIndex) -{ - return frame()->document()->isPageBoxVisible(pageIndex); -} - -void WebFrameImpl::pageSizeAndMarginsInPixels(int pageIndex, - WebSize& pageSize, - int& marginTop, - int& marginRight, - int& marginBottom, - int& marginLeft) -{ - IntSize size(pageSize.width, pageSize.height); - frame()->document()->pageSizeAndMarginsInPixels(pageIndex, - size, - marginTop, - marginRight, - marginBottom, - marginLeft); - pageSize = size; -} - -bool WebFrameImpl::find(int identifier, - const WebString& searchText, - const WebFindOptions& options, - bool wrapWithinFrame, - WebRect* selectionRect) -{ - WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); - - if (!options.findNext) - frame()->page()->unmarkAllTextMatches(); - else - setMarkerActive(m_activeMatch.get(), false); // Active match is changing. - - // Starts the search from the current selection. - bool startInSelection = true; - - // If the user has selected something since the last Find operation we want - // to start from there. Otherwise, we start searching from where the last Find - // operation left off (either a Find or a FindNext operation). - VisibleSelection selection(frame()->selection()->selection()); - bool activeSelection = !selection.isNone(); - if (!activeSelection && m_activeMatch) { - selection = VisibleSelection(m_activeMatch.get()); - frame()->selection()->setSelection(selection); - } - - ASSERT(frame() && frame()->view()); - bool found = frame()->editor()->findString( - searchText, options.forward, options.matchCase, wrapWithinFrame, - startInSelection); - if (found) { - // Store which frame was active. This will come in handy later when we - // change the active match ordinal below. - WebFrameImpl* oldActiveFrame = mainFrameImpl->m_activeMatchFrame; - // Set this frame as the active frame (the one with the active highlight). - mainFrameImpl->m_activeMatchFrame = this; - - // We found something, so we can now query the selection for its position. - VisibleSelection newSelection(frame()->selection()->selection()); - IntRect currSelectionRect; - - // If we thought we found something, but it couldn't be selected (perhaps - // because it was marked -webkit-user-select: none), we can't set it to - // be active but we still continue searching. This matches Safari's - // behavior, including some oddities when selectable and un-selectable text - // are mixed on a page: see https://bugs.webkit.org/show_bug.cgi?id=19127. - if (newSelection.isNone() || (newSelection.start() == newSelection.end())) - m_activeMatch = 0; - else { - m_activeMatch = newSelection.toNormalizedRange(); - currSelectionRect = m_activeMatch->boundingBox(); - setMarkerActive(m_activeMatch.get(), true); // Active. - // WebKit draws the highlighting for all matches. - executeCommand(WebString::fromUTF8("Unselect")); - } - - // Make sure no node is focused. See http://crbug.com/38700. - frame()->document()->setFocusedNode(0); - - if (!options.findNext || activeSelection) { - // This is either a Find operation or a Find-next from a new start point - // due to a selection, so we set the flag to ask the scoping effort - // to find the active rect for us so we can update the ordinal (n of m). - m_locatingActiveRect = true; - } else { - if (oldActiveFrame != this) { - // If the active frame has changed it means that we have a multi-frame - // page and we just switch to searching in a new frame. Then we just - // want to reset the index. - if (options.forward) - m_activeMatchIndex = 0; - else - m_activeMatchIndex = m_lastMatchCount - 1; - } else { - // We are still the active frame, so increment (or decrement) the - // |m_activeMatchIndex|, wrapping if needed (on single frame pages). - options.forward ? ++m_activeMatchIndex : --m_activeMatchIndex; - if (m_activeMatchIndex + 1 > m_lastMatchCount) - m_activeMatchIndex = 0; - if (m_activeMatchIndex == -1) - m_activeMatchIndex = m_lastMatchCount - 1; - } - if (selectionRect) { - WebRect rect = frame()->view()->convertToContainingWindow(currSelectionRect); - rect.x -= frameView()->scrollOffset().width(); - rect.y -= frameView()->scrollOffset().height(); - *selectionRect = rect; - - reportFindInPageSelection(rect, m_activeMatchIndex + 1, identifier); - } - } - } else { - // Nothing was found in this frame. - m_activeMatch = 0; - - // Erase all previous tickmarks and highlighting. - invalidateArea(InvalidateAll); - } - - return found; -} - -void WebFrameImpl::stopFinding(bool clearSelection) -{ - if (!clearSelection) - setFindEndstateFocusAndSelection(); - cancelPendingScopingEffort(); - - // Remove all markers for matches found and turn off the highlighting. - frame()->document()->markers()->removeMarkers(DocumentMarker::TextMatch); - frame()->editor()->setMarkedTextMatchesAreHighlighted(false); - - // Let the frame know that we don't want tickmarks or highlighting anymore. - invalidateArea(InvalidateAll); -} - -void WebFrameImpl::scopeStringMatches(int identifier, - const WebString& searchText, - const WebFindOptions& options, - bool reset) -{ - if (!shouldScopeMatches(searchText)) - return; - - WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); - - if (reset) { - // This is a brand new search, so we need to reset everything. - // Scoping is just about to begin. - m_scopingComplete = false; - // Clear highlighting for this frame. - if (frame()->editor()->markedTextMatchesAreHighlighted()) - frame()->page()->unmarkAllTextMatches(); - // Clear the counters from last operation. - m_lastMatchCount = 0; - m_nextInvalidateAfter = 0; - - m_resumeScopingFromRange = 0; - - mainFrameImpl->m_framesScopingCount++; - - // Now, defer scoping until later to allow find operation to finish quickly. - scopeStringMatchesSoon( - identifier, - searchText, - options, - false); // false=we just reset, so don't do it again. - return; - } - - RefPtr<Range> searchRange(rangeOfContents(frame()->document())); - - ExceptionCode ec = 0, ec2 = 0; - if (m_resumeScopingFromRange.get()) { - // This is a continuation of a scoping operation that timed out and didn't - // complete last time around, so we should start from where we left off. - searchRange->setStart(m_resumeScopingFromRange->startContainer(), - m_resumeScopingFromRange->startOffset(ec2) + 1, - ec); - if (ec || ec2) { - if (ec2) // A non-zero |ec| happens when navigating during search. - ASSERT_NOT_REACHED(); - return; - } - } - - // This timeout controls how long we scope before releasing control. This - // value does not prevent us from running for longer than this, but it is - // periodically checked to see if we have exceeded our allocated time. - const double maxScopingDuration = 0.1; // seconds - - int matchCount = 0; - bool timedOut = false; - double startTime = currentTime(); - do { - // Find next occurrence of the search string. - // FIXME: (http://b/1088245) This WebKit operation may run for longer - // than the timeout value, and is not interruptible as it is currently - // written. We may need to rewrite it with interruptibility in mind, or - // find an alternative. - RefPtr<Range> resultRange(findPlainText(searchRange.get(), - searchText, - true, - options.matchCase)); - if (resultRange->collapsed(ec)) { - if (!resultRange->startContainer()->isInShadowTree()) - break; - - searchRange = rangeOfContents(frame()->document()); - searchRange->setStartAfter( - resultRange->startContainer()->shadowAncestorNode(), ec); - continue; - } - - // A non-collapsed result range can in some funky whitespace cases still not - // advance the range's start position (4509328). Break to avoid infinite - // loop. (This function is based on the implementation of - // Frame::markAllMatchesForText, which is where this safeguard comes from). - VisiblePosition newStart = endVisiblePosition(resultRange.get(), DOWNSTREAM); - if (newStart == startVisiblePosition(searchRange.get(), DOWNSTREAM)) - break; - - // Only treat the result as a match if it is visible - if (frame()->editor()->insideVisibleArea(resultRange.get())) { - ++matchCount; - - setStart(searchRange.get(), newStart); - Node* shadowTreeRoot = searchRange->shadowTreeRootNode(); - if (searchRange->collapsed(ec) && shadowTreeRoot) - searchRange->setEnd(shadowTreeRoot, shadowTreeRoot->childNodeCount(), ec); - - // Catch a special case where Find found something but doesn't know what - // the bounding box for it is. In this case we set the first match we find - // as the active rect. - IntRect resultBounds = resultRange->boundingBox(); - IntRect activeSelectionRect; - if (m_locatingActiveRect) { - activeSelectionRect = m_activeMatch.get() ? - m_activeMatch->boundingBox() : resultBounds; - } - - // If the Find function found a match it will have stored where the - // match was found in m_activeSelectionRect on the current frame. If we - // find this rect during scoping it means we have found the active - // tickmark. - bool foundActiveMatch = false; - if (m_locatingActiveRect && (activeSelectionRect == resultBounds)) { - // We have found the active tickmark frame. - mainFrameImpl->m_activeMatchFrame = this; - foundActiveMatch = true; - // We also know which tickmark is active now. - m_activeMatchIndex = matchCount - 1; - // To stop looking for the active tickmark, we set this flag. - m_locatingActiveRect = false; - - // Notify browser of new location for the selected rectangle. - resultBounds.move(-frameView()->scrollOffset().width(), - -frameView()->scrollOffset().height()); - reportFindInPageSelection( - frame()->view()->convertToContainingWindow(resultBounds), - m_activeMatchIndex + 1, - identifier); - } - - addMarker(resultRange.get(), foundActiveMatch); - } - - m_resumeScopingFromRange = resultRange; - timedOut = (currentTime() - startTime) >= maxScopingDuration; - } while (!timedOut); - - // Remember what we search for last time, so we can skip searching if more - // letters are added to the search string (and last outcome was 0). - m_lastSearchString = searchText; - - if (matchCount > 0) { - frame()->editor()->setMarkedTextMatchesAreHighlighted(true); - - m_lastMatchCount += matchCount; - - // Let the mainframe know how much we found during this pass. - mainFrameImpl->increaseMatchCount(matchCount, identifier); - } - - if (timedOut) { - // If we found anything during this pass, we should redraw. However, we - // don't want to spam too much if the page is extremely long, so if we - // reach a certain point we start throttling the redraw requests. - if (matchCount > 0) - invalidateIfNecessary(); - - // Scoping effort ran out of time, lets ask for another time-slice. - scopeStringMatchesSoon( - identifier, - searchText, - options, - false); // don't reset. - return; // Done for now, resume work later. - } - - // This frame has no further scoping left, so it is done. Other frames might, - // of course, continue to scope matches. - m_scopingComplete = true; - mainFrameImpl->m_framesScopingCount--; - - // If this is the last frame to finish scoping we need to trigger the final - // update to be sent. - if (!mainFrameImpl->m_framesScopingCount) - mainFrameImpl->increaseMatchCount(0, identifier); - - // This frame is done, so show any scrollbar tickmarks we haven't drawn yet. - invalidateArea(InvalidateScrollbar); -} - -void WebFrameImpl::cancelPendingScopingEffort() -{ - deleteAllValues(m_deferredScopingWork); - m_deferredScopingWork.clear(); - - m_activeMatchIndex = -1; -} - -void WebFrameImpl::increaseMatchCount(int count, int identifier) -{ - // This function should only be called on the mainframe. - ASSERT(!parent()); - - m_totalMatchCount += count; - - // Update the UI with the latest findings. - if (client()) - client()->reportFindInPageMatchCount(identifier, m_totalMatchCount, !m_framesScopingCount); -} - -void WebFrameImpl::reportFindInPageSelection(const WebRect& selectionRect, - int activeMatchOrdinal, - int identifier) -{ - // Update the UI with the latest selection rect. - if (client()) - client()->reportFindInPageSelection(identifier, ordinalOfFirstMatchForFrame(this) + activeMatchOrdinal, selectionRect); -} - -void WebFrameImpl::resetMatchCount() -{ - m_totalMatchCount = 0; - m_framesScopingCount = 0; -} - -WebString WebFrameImpl::contentAsText(size_t maxChars) const -{ - if (!m_frame) - return WebString(); - - Vector<UChar> text; - frameContentAsPlainText(maxChars, m_frame, &text); - return String::adopt(text); -} - -WebString WebFrameImpl::contentAsMarkup() const -{ - return createFullMarkup(m_frame->document()); -} - -WebString WebFrameImpl::renderTreeAsText() const -{ - return externalRepresentation(m_frame); -} - -WebString WebFrameImpl::counterValueForElementById(const WebString& id) const -{ - if (!m_frame) - return WebString(); - - Element* element = m_frame->document()->getElementById(id); - if (!element) - return WebString(); - - return counterValueForElement(element); -} - -WebString WebFrameImpl::markerTextForListItem(const WebElement& webElement) const -{ - return WebCore::markerTextForListItem(const_cast<Element*>(webElement.constUnwrap<Element>())); -} - -int WebFrameImpl::pageNumberForElementById(const WebString& id, - float pageWidthInPixels, - float pageHeightInPixels) const -{ - if (!m_frame) - return -1; - - Element* element = m_frame->document()->getElementById(id); - if (!element) - return -1; - - FloatSize pageSize(pageWidthInPixels, pageHeightInPixels); - return PrintContext::pageNumberForElement(element, pageSize); -} - -WebRect WebFrameImpl::selectionBoundsRect() const -{ - if (hasSelection()) - return IntRect(frame()->selection()->bounds(false)); - - return WebRect(); -} - -bool WebFrameImpl::selectionStartHasSpellingMarkerFor(int from, int length) const -{ - if (!m_frame) - return false; - return m_frame->editor()->selectionStartHasSpellingMarkerFor(from, length); -} - -bool WebFrameImpl::pauseSVGAnimation(const WebString& animationId, double time, const WebString& elementId) -{ -#if !ENABLE(SVG) - return false; -#else - if (!m_frame) - return false; - - Document* document = m_frame->document(); - if (!document || !document->svgExtensions()) - return false; - - Node* coreNode = document->getElementById(animationId); - if (!coreNode || !SVGSMILElement::isSMILElement(coreNode)) - return false; - - return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time); -#endif -} - -WebString WebFrameImpl::layerTreeAsText() const -{ - if (!m_frame) - return WebString(); - return WebString(m_frame->layerTreeAsText()); -} - -// WebFrameImpl public --------------------------------------------------------- - -PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client) -{ - return adoptRef(new WebFrameImpl(client)); -} - -WebFrameImpl::WebFrameImpl(WebFrameClient* client) - : m_frameLoaderClient(this) - , m_client(client) - , m_activeMatchFrame(0) - , m_activeMatchIndex(-1) - , m_locatingActiveRect(false) - , m_resumeScopingFromRange(0) - , m_lastMatchCount(-1) - , m_totalMatchCount(-1) - , m_framesScopingCount(-1) - , m_scopingComplete(false) - , m_nextInvalidateAfter(0) - , m_animationController(this) - , m_identifier(generateFrameIdentifier()) -{ - ChromiumBridge::incrementStatsCounter(webFrameActiveCount); - frameCount++; -} - -WebFrameImpl::~WebFrameImpl() -{ - ChromiumBridge::decrementStatsCounter(webFrameActiveCount); - frameCount--; - - cancelPendingScopingEffort(); - clearPasswordListeners(); -} - -void WebFrameImpl::initializeAsMainFrame(WebViewImpl* webViewImpl) -{ - RefPtr<Frame> frame = Frame::create(webViewImpl->page(), 0, &m_frameLoaderClient); - m_frame = frame.get(); - - // Add reference on behalf of FrameLoader. See comments in - // WebFrameLoaderClient::frameLoaderDestroyed for more info. - ref(); - - // We must call init() after m_frame is assigned because it is referenced - // during init(). - m_frame->init(); -} - -PassRefPtr<Frame> WebFrameImpl::createChildFrame( - const FrameLoadRequest& request, HTMLFrameOwnerElement* ownerElement) -{ - RefPtr<WebFrameImpl> webframe(adoptRef(new WebFrameImpl(m_client))); - - // Add an extra ref on behalf of the Frame/FrameLoader, which references the - // WebFrame via the FrameLoaderClient interface. See the comment at the top - // of this file for more info. - webframe->ref(); - - RefPtr<Frame> childFrame = Frame::create( - m_frame->page(), ownerElement, &webframe->m_frameLoaderClient); - webframe->m_frame = childFrame.get(); - - childFrame->tree()->setName(request.frameName()); - - m_frame->tree()->appendChild(childFrame); - - // Frame::init() can trigger onload event in the parent frame, - // which may detach this frame and trigger a null-pointer access - // in FrameTree::removeChild. Move init() after appendChild call - // so that webframe->mFrame is in the tree before triggering - // onload event handler. - // Because the event handler may set webframe->mFrame to null, - // it is necessary to check the value after calling init() and - // return without loading URL. - // (b:791612) - childFrame->init(); // create an empty document - if (!childFrame->tree()->parent()) - return 0; - - m_frame->loader()->loadURLIntoChildFrame( - request.resourceRequest().url(), - request.resourceRequest().httpReferrer(), - childFrame.get()); - - // A synchronous navigation (about:blank) would have already processed - // onload, so it is possible for the frame to have already been destroyed by - // script in the page. - if (!childFrame->tree()->parent()) - return 0; - - return childFrame.release(); -} - -void WebFrameImpl::layout() -{ - // layout this frame - FrameView* view = m_frame->view(); - if (view) - view->updateLayoutAndStyleIfNeededRecursive(); -} - -void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect) -{ - IntRect dirtyRect(rect); - gc.save(); - if (m_frame->document() && frameView()) { - gc.clip(dirtyRect); - frameView()->paint(&gc, dirtyRect); - m_frame->page()->inspectorController()->drawNodeHighlight(gc); - } else - gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB); - gc.restore(); -} - -void WebFrameImpl::paint(WebCanvas* canvas, const WebRect& rect) -{ - if (rect.isEmpty()) - return; -#if WEBKIT_USING_CG - GraphicsContext gc(canvas); - LocalCurrentGraphicsContext localContext(&gc); -#elif WEBKIT_USING_SKIA - PlatformContextSkia context(canvas); - - // PlatformGraphicsContext is actually a pointer to PlatformContextSkia - GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context)); -#else - notImplemented(); -#endif - paintWithContext(gc, rect); -} - -void WebFrameImpl::createFrameView() -{ - ASSERT(m_frame); // If m_frame doesn't exist, we probably didn't init properly. - - Page* page = m_frame->page(); - ASSERT(page); - ASSERT(page->mainFrame()); - - bool isMainFrame = m_frame == page->mainFrame(); - if (isMainFrame && m_frame->view()) - m_frame->view()->setParentVisible(false); - - m_frame->setView(0); - - WebViewImpl* webView = viewImpl(); - - RefPtr<FrameView> view; - if (isMainFrame) - view = FrameView::create(m_frame, webView->size()); - else - view = FrameView::create(m_frame); - - m_frame->setView(view); - - if (webView->isTransparent()) - view->setTransparent(true); - - // FIXME: The Mac code has a comment about this possibly being unnecessary. - // See installInFrame in WebCoreFrameBridge.mm - if (m_frame->ownerRenderer()) - m_frame->ownerRenderer()->setWidget(view.get()); - - if (HTMLFrameOwnerElement* owner = m_frame->ownerElement()) - view->setCanHaveScrollbars(owner->scrollingMode() != ScrollbarAlwaysOff); - - if (isMainFrame) - view->setParentVisible(true); -} - -WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame) -{ - if (!frame) - return 0; - - return static_cast<FrameLoaderClientImpl*>(frame->loader()->client())->webFrame(); -} - -WebFrameImpl* WebFrameImpl::fromFrameOwnerElement(Element* element) -{ - if (!element - || !element->isFrameOwnerElement() - || (!element->hasTagName(HTMLNames::iframeTag) - && !element->hasTagName(HTMLNames::frameTag))) - return 0; - - HTMLFrameOwnerElement* frameElement = - static_cast<HTMLFrameOwnerElement*>(element); - return fromFrame(frameElement->contentFrame()); -} - -WebViewImpl* WebFrameImpl::viewImpl() const -{ - if (!m_frame) - return 0; - - return WebViewImpl::fromPage(m_frame->page()); -} - -WebDataSourceImpl* WebFrameImpl::dataSourceImpl() const -{ - return static_cast<WebDataSourceImpl*>(dataSource()); -} - -WebDataSourceImpl* WebFrameImpl::provisionalDataSourceImpl() const -{ - return static_cast<WebDataSourceImpl*>(provisionalDataSource()); -} - -void WebFrameImpl::setFindEndstateFocusAndSelection() -{ - WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); - - if (this == mainFrameImpl->activeMatchFrame() && m_activeMatch.get()) { - // If the user has set the selection since the match was found, we - // don't focus anything. - VisibleSelection selection(frame()->selection()->selection()); - if (!selection.isNone()) - return; - - // Try to find the first focusable node up the chain, which will, for - // example, focus links if we have found text within the link. - Node* node = m_activeMatch->firstNode(); - while (node && !node->isFocusable() && node != frame()->document()) - node = node->parentNode(); - - if (node && node != frame()->document()) { - // Found a focusable parent node. Set focus to it. - frame()->document()->setFocusedNode(node); - return; - } - - // Iterate over all the nodes in the range until we find a focusable node. - // This, for example, sets focus to the first link if you search for - // text and text that is within one or more links. - node = m_activeMatch->firstNode(); - while (node && node != m_activeMatch->pastLastNode()) { - if (node->isFocusable()) { - frame()->document()->setFocusedNode(node); - return; - } - node = node->traverseNextNode(); - } - - // No node related to the active match was focusable, so set the - // active match as the selection (so that when you end the Find session, - // you'll have the last thing you found highlighted) and make sure that - // we have nothing focused (otherwise you might have text selected but - // a link focused, which is weird). - frame()->selection()->setSelection(m_activeMatch.get()); - frame()->document()->setFocusedNode(0); - } -} - -void WebFrameImpl::didFail(const ResourceError& error, bool wasProvisional) -{ - if (!client()) - return; - WebURLError webError = error; - if (wasProvisional) - client()->didFailProvisionalLoad(this, webError); - else - client()->didFailLoad(this, webError); -} - -void WebFrameImpl::setCanHaveScrollbars(bool canHaveScrollbars) -{ - m_frame->view()->setCanHaveScrollbars(canHaveScrollbars); -} - -bool WebFrameImpl::registerPasswordListener( - WebInputElement inputElement, - WebPasswordAutocompleteListener* listener) -{ - RefPtr<HTMLInputElement> element(inputElement.unwrap<HTMLInputElement>()); - if (!m_passwordListeners.add(element, listener).second) { - delete listener; - return false; - } - return true; -} - -void WebFrameImpl::notifiyPasswordListenerOfAutocomplete( - const WebInputElement& inputElement) -{ - const HTMLInputElement* element = inputElement.constUnwrap<HTMLInputElement>(); - WebPasswordAutocompleteListener* listener = getPasswordListener(element); - // Password listeners need to autocomplete other fields that depend on the - // input element with autofill suggestions. - if (listener) - listener->performInlineAutocomplete(element->value(), false, false); -} - -WebPasswordAutocompleteListener* WebFrameImpl::getPasswordListener( - const HTMLInputElement* inputElement) -{ - return m_passwordListeners.get(RefPtr<HTMLInputElement>(const_cast<HTMLInputElement*>(inputElement))); -} - -// WebFrameImpl private -------------------------------------------------------- - -void WebFrameImpl::closing() -{ - m_frame = 0; -} - -void WebFrameImpl::invalidateArea(AreaToInvalidate area) -{ - ASSERT(frame() && frame()->view()); - FrameView* view = frame()->view(); - - if ((area & InvalidateAll) == InvalidateAll) - view->invalidateRect(view->frameRect()); - else { - if ((area & InvalidateContentArea) == InvalidateContentArea) { - IntRect contentArea( - view->x(), view->y(), view->visibleWidth(), view->visibleHeight()); - IntRect frameRect = view->frameRect(); - contentArea.move(-frameRect.topLeft().x(), -frameRect.topLeft().y()); - view->invalidateRect(contentArea); - } - - if ((area & InvalidateScrollbar) == InvalidateScrollbar) { - // Invalidate the vertical scroll bar region for the view. - IntRect scrollBarVert( - view->x() + view->visibleWidth(), view->y(), - ScrollbarTheme::nativeTheme()->scrollbarThickness(), - view->visibleHeight()); - IntRect frameRect = view->frameRect(); - scrollBarVert.move(-frameRect.topLeft().x(), -frameRect.topLeft().y()); - view->invalidateRect(scrollBarVert); - } - } -} - -void WebFrameImpl::addMarker(Range* range, bool activeMatch) -{ - // Use a TextIterator to visit the potentially multiple nodes the range - // covers. - TextIterator markedText(range); - for (; !markedText.atEnd(); markedText.advance()) { - RefPtr<Range> textPiece = markedText.range(); - int exception = 0; - - DocumentMarker marker = { - DocumentMarker::TextMatch, - textPiece->startOffset(exception), - textPiece->endOffset(exception), - "", - activeMatch - }; - - if (marker.endOffset > marker.startOffset) { - // Find the node to add a marker to and add it. - Node* node = textPiece->startContainer(exception); - frame()->document()->markers()->addMarker(node, marker); - - // Rendered rects for markers in WebKit are not populated until each time - // the markers are painted. However, we need it to happen sooner, because - // the whole purpose of tickmarks on the scrollbar is to show where - // matches off-screen are (that haven't been painted yet). - Vector<DocumentMarker> markers = frame()->document()->markers()->markersForNode(node); - frame()->document()->markers()->setRenderedRectForMarker( - textPiece->startContainer(exception), - markers[markers.size() - 1], - range->boundingBox()); - } - } -} - -void WebFrameImpl::setMarkerActive(Range* range, bool active) -{ - WebCore::ExceptionCode ec; - if (!range || range->collapsed(ec)) - return; - - frame()->document()->markers()->setMarkersActive(range, active); -} - -int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const -{ - int ordinal = 0; - WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); - // Iterate from the main frame up to (but not including) |frame| and - // add up the number of matches found so far. - for (WebFrameImpl* it = mainFrameImpl; - it != frame; - it = static_cast<WebFrameImpl*>(it->traverseNext(true))) { - if (it->m_lastMatchCount > 0) - ordinal += it->m_lastMatchCount; - } - return ordinal; -} - -bool WebFrameImpl::shouldScopeMatches(const String& searchText) -{ - // Don't scope if we can't find a frame or a view or if the frame is not visible. - // The user may have closed the tab/application, so abort. - if (!frame() || !frame()->view() || !hasVisibleContent()) - return false; - - ASSERT(frame()->document() && frame()->view()); - - // If the frame completed the scoping operation and found 0 matches the last - // time it was searched, then we don't have to search it again if the user is - // just adding to the search string or sending the same search string again. - if (m_scopingComplete && !m_lastSearchString.isEmpty() && !m_lastMatchCount) { - // Check to see if the search string prefixes match. - String previousSearchPrefix = - searchText.substring(0, m_lastSearchString.length()); - - if (previousSearchPrefix == m_lastSearchString) - return false; // Don't search this frame, it will be fruitless. - } - - return true; -} - -void WebFrameImpl::scopeStringMatchesSoon(int identifier, const WebString& searchText, - const WebFindOptions& options, bool reset) -{ - m_deferredScopingWork.append(new DeferredScopeStringMatches( - this, identifier, searchText, options, reset)); -} - -void WebFrameImpl::callScopeStringMatches(DeferredScopeStringMatches* caller, - int identifier, const WebString& searchText, - const WebFindOptions& options, bool reset) -{ - m_deferredScopingWork.remove(m_deferredScopingWork.find(caller)); - - scopeStringMatches(identifier, searchText, options, reset); - - // This needs to happen last since searchText is passed by reference. - delete caller; -} - -void WebFrameImpl::invalidateIfNecessary() -{ - if (m_lastMatchCount > m_nextInvalidateAfter) { - // FIXME: (http://b/1088165) Optimize the drawing of the tickmarks and - // remove this. This calculation sets a milestone for when next to - // invalidate the scrollbar and the content area. We do this so that we - // don't spend too much time drawing the scrollbar over and over again. - // Basically, up until the first 500 matches there is no throttle. - // After the first 500 matches, we set set the milestone further and - // further out (750, 1125, 1688, 2K, 3K). - static const int startSlowingDownAfter = 500; - static const int slowdown = 750; - int i = (m_lastMatchCount / startSlowingDownAfter); - m_nextInvalidateAfter += i * slowdown; - - invalidateArea(InvalidateScrollbar); - } -} - -void WebFrameImpl::clearPasswordListeners() -{ - deleteAllValues(m_passwordListeners); - m_passwordListeners.clear(); -} - -void WebFrameImpl::loadJavaScriptURL(const KURL& url) -{ - // This is copied from ScriptController::executeIfJavaScriptURL. - // Unfortunately, we cannot just use that method since it is private, and - // it also doesn't quite behave as we require it to for bookmarklets. The - // key difference is that we need to suppress loading the string result - // from evaluating the JS URL if executing the JS URL resulted in a - // location change. We also allow a JS URL to be loaded even if scripts on - // the page are otherwise disabled. - - if (!m_frame->document() || !m_frame->page()) - return; - - String script = decodeURLEscapeSequences(url.string().substring(strlen("javascript:"))); - ScriptValue result = m_frame->script()->executeScript(script, true); - - String scriptResult; - if (!result.getString(scriptResult)) - return; - - if (!m_frame->navigationScheduler()->locationChangePending()) - m_frame->loader()->writer()->replaceDocument(scriptResult); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h deleted file mode 100644 index 52d9db4..0000000 --- a/WebKit/chromium/src/WebFrameImpl.h +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebFrameImpl_h -#define WebFrameImpl_h - -#include "WebAnimationControllerImpl.h" -#include "WebFrame.h" - -#include "Frame.h" -#include "FrameLoaderClientImpl.h" -#include "PlatformString.h" -#include <wtf/OwnPtr.h> -#include <wtf/RefCounted.h> - -namespace WebCore { -class GraphicsContext; -class HistoryItem; -class KURL; -class Node; -class Range; -class SubstituteData; -struct WindowFeatures; -} - -namespace WebKit { -class ChromePrintContext; -class WebDataSourceImpl; -class WebInputElement; -class WebFrameClient; -class WebPasswordAutocompleteListener; -class WebPerformance; -class WebPluginContainerImpl; -class WebView; -class WebViewImpl; - -// Implementation of WebFrame, note that this is a reference counted object. -class WebFrameImpl : public WebFrame, public RefCounted<WebFrameImpl> { -public: - // WebFrame methods: - virtual WebString name() const; - virtual void setName(const WebString&); - virtual long long identifier() const; - virtual WebURL url() const; - virtual WebURL favIconURL() const; - virtual WebURL openSearchDescriptionURL() const; - virtual WebString encoding() const; - virtual WebSize scrollOffset() const; - virtual WebSize contentsSize() const; - virtual int contentsPreferredWidth() const; - virtual int documentElementScrollHeight() const; - virtual bool hasVisibleContent() const; - virtual WebView* view() const; - virtual WebFrame* opener() const; - virtual WebFrame* parent() const; - virtual WebFrame* top() const; - virtual WebFrame* firstChild() const; - virtual WebFrame* lastChild() const; - virtual WebFrame* nextSibling() const; - virtual WebFrame* previousSibling() const; - virtual WebFrame* traverseNext(bool wrap) const; - virtual WebFrame* traversePrevious(bool wrap) const; - virtual WebFrame* findChildByName(const WebString&) const; - virtual WebFrame* findChildByExpression(const WebString&) const; - virtual WebDocument document() const; - virtual void forms(WebVector<WebFormElement>&) const; - virtual WebAnimationController* animationController(); - virtual WebPerformance performance() const; - virtual WebSecurityOrigin securityOrigin() const; - virtual void grantUniversalAccess(); - virtual NPObject* windowObject() const; - virtual void bindToWindowObject(const WebString& name, NPObject*); - virtual void executeScript(const WebScriptSource&); - virtual void executeScriptInIsolatedWorld( - int worldId, const WebScriptSource* sources, unsigned numSources, - int extensionGroup); - virtual void addMessageToConsole(const WebConsoleMessage&); - virtual void collectGarbage(); -#if WEBKIT_USING_V8 - virtual v8::Handle<v8::Value> executeScriptAndReturnValue( - const WebScriptSource&); - virtual v8::Local<v8::Context> mainWorldScriptContext() const; -#endif - virtual bool insertStyleText(const WebString& css, const WebString& id); - virtual void reload(bool ignoreCache); - virtual void loadRequest(const WebURLRequest&); - virtual void loadHistoryItem(const WebHistoryItem&); - virtual void loadData( - const WebData&, const WebString& mimeType, const WebString& textEncoding, - const WebURL& baseURL, const WebURL& unreachableURL, bool replace); - virtual void loadHTMLString( - const WebData& html, const WebURL& baseURL, const WebURL& unreachableURL, - bool replace); - virtual bool isLoading() const; - virtual void stopLoading(); - virtual WebDataSource* provisionalDataSource() const; - virtual WebDataSource* dataSource() const; - virtual WebHistoryItem previousHistoryItem() const; - virtual WebHistoryItem currentHistoryItem() const; - virtual void enableViewSourceMode(bool enable); - virtual bool isViewSourceModeEnabled() const; - virtual void setReferrerForRequest(WebURLRequest&, const WebURL& referrer); - virtual void dispatchWillSendRequest(WebURLRequest&); - virtual WebURLLoader* createAssociatedURLLoader(); - virtual void commitDocumentData(const char* data, size_t length); - virtual unsigned unloadListenerCount() const; - virtual bool isProcessingUserGesture() const; - virtual bool willSuppressOpenerInNewFrame() const; - virtual void replaceSelection(const WebString&); - virtual void insertText(const WebString&); - virtual void setMarkedText(const WebString&, unsigned location, unsigned length); - virtual void unmarkText(); - virtual bool hasMarkedText() const; - virtual WebRange markedRange() const; - virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const; - virtual bool executeCommand(const WebString&); - virtual bool executeCommand(const WebString&, const WebString& value); - virtual bool isCommandEnabled(const WebString&) const; - virtual void enableContinuousSpellChecking(bool); - virtual bool isContinuousSpellCheckingEnabled() const; - virtual bool hasSelection() const; - virtual WebRange selectionRange() const; - virtual WebString selectionAsText() const; - virtual WebString selectionAsMarkup() const; - virtual bool selectWordAroundCaret(); - virtual int printBegin(const WebSize& pageSize, int printerDPI, - bool* useBrowserOverlays); - virtual float printPage(int pageToPrint, WebCanvas*); - virtual float getPrintPageShrink(int page); - virtual void printEnd(); - virtual bool isPageBoxVisible(int pageIndex); - virtual void pageSizeAndMarginsInPixels(int pageIndex, - WebSize& pageSize, - int& marginTop, - int& marginRight, - int& marginBottom, - int& marginLeft); - virtual bool find( - int identifier, const WebString& searchText, const WebFindOptions&, - bool wrapWithinFrame, WebRect* selectionRect); - virtual void stopFinding(bool clearSelection); - virtual void scopeStringMatches( - int identifier, const WebString& searchText, const WebFindOptions&, - bool reset); - virtual void cancelPendingScopingEffort(); - virtual void increaseMatchCount(int count, int identifier); - virtual void resetMatchCount(); - virtual bool registerPasswordListener( - WebInputElement, WebPasswordAutocompleteListener*); - virtual void notifiyPasswordListenerOfAutocomplete( - const WebInputElement&); - - virtual WebString contentAsText(size_t maxChars) const; - virtual WebString contentAsMarkup() const; - virtual WebString renderTreeAsText() const; - virtual WebString counterValueForElementById(const WebString& id) const; - virtual WebString markerTextForListItem(const WebElement&) const; - virtual int pageNumberForElementById(const WebString& id, - float pageWidthInPixels, - float pageHeightInPixels) const; - virtual WebRect selectionBoundsRect() const; - - virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const; - virtual bool pauseSVGAnimation(const WebString& animationId, - double time, - const WebString& elementId); - virtual WebString layerTreeAsText() const; - - static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); - ~WebFrameImpl(); - - // Called by the WebViewImpl to initialize its main frame: - void initializeAsMainFrame(WebViewImpl*); - - PassRefPtr<WebCore::Frame> createChildFrame( - const WebCore::FrameLoadRequest&, WebCore::HTMLFrameOwnerElement*); - - void layout(); - void paint(WebCanvas*, const WebRect&); - void paintWithContext(WebCore::GraphicsContext&, const WebRect&); - void createFrameView(); - - static WebFrameImpl* fromFrame(WebCore::Frame* frame); - static WebFrameImpl* fromFrameOwnerElement(WebCore::Element* element); - - // If the frame hosts a PluginDocument, this method returns the WebPluginContainerImpl - // that hosts the plugin. - static WebPluginContainerImpl* pluginContainerFromFrame(WebCore::Frame*); - - WebViewImpl* viewImpl() const; - - WebCore::Frame* frame() const { return m_frame; } - WebCore::FrameView* frameView() const { return m_frame ? m_frame->view() : 0; } - - // Getters for the impls corresponding to Get(Provisional)DataSource. They - // may return 0 if there is no corresponding data source. - WebDataSourceImpl* dataSourceImpl() const; - WebDataSourceImpl* provisionalDataSourceImpl() const; - - // Returns which frame has an active match. This function should only be - // called on the main frame, as it is the only frame keeping track. Returned - // value can be 0 if no frame has an active match. - const WebFrameImpl* activeMatchFrame() const { return m_activeMatchFrame; } - - // When a Find operation ends, we want to set the selection to what was active - // and set focus to the first focusable node we find (starting with the first - // node in the matched range and going up the inheritance chain). If we find - // nothing to focus we focus the first focusable node in the range. This - // allows us to set focus to a link (when we find text inside a link), which - // allows us to navigate by pressing Enter after closing the Find box. - void setFindEndstateFocusAndSelection(); - - void didFail(const WebCore::ResourceError&, bool wasProvisional); - - // Sets whether the WebFrameImpl allows its document to be scrolled. - // If the parameter is true, allow the document to be scrolled. - // Otherwise, disallow scrolling. - void setCanHaveScrollbars(bool); - - // Returns the password autocomplete listener associated with the passed - // user name input element, or 0 if none available. - // Note that the returned listener is owner by the WebFrameImpl and should not - // be kept around as it is deleted when the page goes away. - WebPasswordAutocompleteListener* getPasswordListener(const WebCore::HTMLInputElement*); - - WebFrameClient* client() const { return m_client; } - void setClient(WebFrameClient* client) { m_client = client; } - - static void selectWordAroundPosition(WebCore::Frame*, WebCore::VisiblePosition); - -private: - class DeferredScopeStringMatches; - friend class DeferredScopeStringMatches; - friend class FrameLoaderClientImpl; - - // A bit mask specifying area of the frame to invalidate. - enum AreaToInvalidate { - InvalidateNothing, - InvalidateContentArea, - InvalidateScrollbar, // Vertical scrollbar only. - InvalidateAll // Both content area and the scrollbar. - }; - - WebFrameImpl(WebFrameClient*); - - // Informs the WebFrame that the Frame is being closed, called by the - // WebFrameLoaderClient - void closing(); - - // Notifies the delegate about a new selection rect. - void reportFindInPageSelection( - const WebRect& selectionRect, int activeMatchOrdinal, int identifier); - - // Invalidates a certain area within the frame. - void invalidateArea(AreaToInvalidate); - - // Add a WebKit TextMatch-highlight marker to nodes in a range. - void addMarker(WebCore::Range*, bool activeMatch); - - // Sets the markers within a range as active or inactive. - void setMarkerActive(WebCore::Range*, bool active); - - // Returns the ordinal of the first match in the frame specified. This - // function enumerates the frames, starting with the main frame and up to (but - // not including) the frame passed in as a parameter and counts how many - // matches have been found. - int ordinalOfFirstMatchForFrame(WebFrameImpl*) const; - - // Determines whether the scoping effort is required for a particular frame. - // It is not necessary if the frame is invisible, for example, or if this - // is a repeat search that already returned nothing last time the same prefix - // was searched. - bool shouldScopeMatches(const WTF::String& searchText); - - // Queue up a deferred call to scopeStringMatches. - void scopeStringMatchesSoon( - int identifier, const WebString& searchText, const WebFindOptions&, - bool reset); - - // Called by a DeferredScopeStringMatches instance. - void callScopeStringMatches( - DeferredScopeStringMatches*, int identifier, const WebString& searchText, - const WebFindOptions&, bool reset); - - // Determines whether to invalidate the content area and scrollbar. - void invalidateIfNecessary(); - - // Clears the map of password listeners. - void clearPasswordListeners(); - - void loadJavaScriptURL(const WebCore::KURL&); - - FrameLoaderClientImpl m_frameLoaderClient; - - WebFrameClient* m_client; - - // This is a weak pointer to our corresponding WebCore frame. A reference to - // ourselves is held while frame_ is valid. See our Closing method. - WebCore::Frame* m_frame; - - // A way for the main frame to keep track of which frame has an active - // match. Should be 0 for all other frames. - WebFrameImpl* m_activeMatchFrame; - - // The range of the active match for the current frame. - RefPtr<WebCore::Range> m_activeMatch; - - // The index of the active match. - int m_activeMatchIndex; - - // This flag is used by the scoping effort to determine if we need to figure - // out which rectangle is the active match. Once we find the active - // rectangle we clear this flag. - bool m_locatingActiveRect; - - // The scoping effort can time out and we need to keep track of where we - // ended our last search so we can continue from where we left of. - RefPtr<WebCore::Range> m_resumeScopingFromRange; - - // Keeps track of the last string this frame searched for. This is used for - // short-circuiting searches in the following scenarios: When a frame has - // been searched and returned 0 results, we don't need to search that frame - // again if the user is just adding to the search (making it more specific). - WTF::String m_lastSearchString; - - // Keeps track of how many matches this frame has found so far, so that we - // don't loose count between scoping efforts, and is also used (in conjunction - // with m_lastSearchString and m_scopingComplete) to figure out if we need to - // search the frame again. - int m_lastMatchCount; - - // This variable keeps a cumulative total of matches found so far for ALL the - // frames on the page, and is only incremented by calling IncreaseMatchCount - // (on the main frame only). It should be -1 for all other frames. - size_t m_totalMatchCount; - - // This variable keeps a cumulative total of how many frames are currently - // scoping, and is incremented/decremented on the main frame only. - // It should be -1 for all other frames. - int m_framesScopingCount; - - // Keeps track of whether the scoping effort was completed (the user may - // interrupt it before it completes by submitting a new search). - bool m_scopingComplete; - - // Keeps track of when the scoping effort should next invalidate the scrollbar - // and the frame area. - int m_nextInvalidateAfter; - - // A list of all of the pending calls to scopeStringMatches. - Vector<DeferredScopeStringMatches*> m_deferredScopingWork; - - // Valid between calls to BeginPrint() and EndPrint(). Containts the print - // information. Is used by PrintPage(). - OwnPtr<ChromePrintContext> m_printContext; - - // The input fields that are interested in edit events and their associated - // listeners. - typedef HashMap<RefPtr<WebCore::HTMLInputElement>, - WebPasswordAutocompleteListener*> PasswordListenerMap; - PasswordListenerMap m_passwordListeners; - - // Keeps a reference to the frame's WebAnimationController. - WebAnimationControllerImpl m_animationController; - - // The identifier of this frame. - long long m_identifier; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebGeolocationClientMock.cpp b/WebKit/chromium/src/WebGeolocationClientMock.cpp deleted file mode 100644 index 1ec3dd1..0000000 --- a/WebKit/chromium/src/WebGeolocationClientMock.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationClientMock.h" - -#include "CurrentTime.h" -#include "Geolocation.h" -#include "GeolocationClientMock.h" -#include "GeolocationError.h" -#include "GeolocationPosition.h" -#include "PositionError.h" -#include "WebGeolocationController.h" -#include "WebGeolocationError.h" -#include "WebGeolocationPermissionRequest.h" -#include "WebGeolocationPosition.h" - -using namespace WebCore; - -namespace WebKit { - -WebGeolocationClientMock* WebGeolocationClientMock::create() -{ - return new WebGeolocationClientMock(); -} - -void WebGeolocationClientMock::setPosition(double latitude, double longitude, double accuracy) -{ - WebGeolocationPosition webPosition(currentTime(), latitude, longitude, accuracy, - false, 0, false, 0, false, 0, false, 0); - m_clientMock->setPosition(webPosition); -} - -void WebGeolocationClientMock::setError(int errorCode, const WebString& message) -{ - WebGeolocationError::Error code; - switch (errorCode) { - case PositionError::PERMISSION_DENIED: - code = WebGeolocationError::ErrorPermissionDenied; - break; - case PositionError::POSITION_UNAVAILABLE: - code = WebGeolocationError::ErrorPositionUnavailable; - break; - default: - ASSERT_NOT_REACHED(); - return; - } - - WebGeolocationError webError(code, message); - m_clientMock->setError(webError); -} - -void WebGeolocationClientMock::setPermission(bool allowed) -{ - m_clientMock->setPermission(allowed); -} - -void WebGeolocationClientMock::resetMock() -{ - m_clientMock->reset(); -} - -void WebGeolocationClientMock::startUpdating() -{ - m_clientMock->startUpdating(); -} - -void WebGeolocationClientMock::stopUpdating() -{ - m_clientMock->stopUpdating(); -} - -void WebGeolocationClientMock::setEnableHighAccuracy(bool accuracy) -{ - m_clientMock->setEnableHighAccuracy(accuracy); -} - -void WebGeolocationClientMock::geolocationDestroyed() -{ - m_clientMock->geolocationDestroyed(); -} - -void WebGeolocationClientMock::setController(WebGeolocationController* controller) -{ - m_clientMock->setController(controller->controller()); - delete controller; -} - -void WebGeolocationClientMock::requestPermission(const WebGeolocationPermissionRequest& request) -{ - m_clientMock->requestPermission(request.geolocation()); -} - -void WebGeolocationClientMock::cancelPermissionRequest(const WebGeolocationPermissionRequest& request) -{ - m_clientMock->cancelPermissionRequest(request.geolocation()); -} - -bool WebGeolocationClientMock::lastPosition(WebGeolocationPosition& webPosition) -{ - RefPtr<GeolocationPosition> position = m_clientMock->lastPosition(); - if (!position) - return false; - - webPosition = position.release(); - return true; -} - -WebGeolocationClientMock::WebGeolocationClientMock() -{ - m_clientMock.reset(new GeolocationClientMock()); -} - -void WebGeolocationClientMock::reset() -{ - m_clientMock.reset(0); -} - -} // WebKit diff --git a/WebKit/chromium/src/WebGeolocationController.cpp b/WebKit/chromium/src/WebGeolocationController.cpp deleted file mode 100644 index 12cbaa0..0000000 --- a/WebKit/chromium/src/WebGeolocationController.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationController.h" - -#include "GeolocationController.h" -#include "GeolocationError.h" -#include "GeolocationPosition.h" -#include "WebGeolocationError.h" -#include "WebGeolocationPosition.h" - -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -void WebGeolocationController::positionChanged(const WebGeolocationPosition& webPosition) -{ - m_private->positionChanged(PassRefPtr<GeolocationPosition>(webPosition).get()); -} - -void WebGeolocationController::errorOccurred(const WebGeolocationError& webError) -{ - m_private->errorOccurred(PassRefPtr<GeolocationError>(webError).get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebGeolocationError.cpp b/WebKit/chromium/src/WebGeolocationError.cpp deleted file mode 100644 index 9acb676..0000000 --- a/WebKit/chromium/src/WebGeolocationError.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationError.h" - -#include "GeolocationError.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -void WebGeolocationError::assign(Error code, const WebString& message) -{ - m_private = GeolocationError::create(static_cast<GeolocationError::ErrorCode>(code), message); -} - -void WebGeolocationError::assign(const WebGeolocationError& other) -{ - m_private = other.m_private; -} - -void WebGeolocationError::reset() -{ - m_private.reset(); -} - -WebGeolocationError::WebGeolocationError(PassRefPtr<GeolocationError> error) -{ - m_private = error; -} - -WebGeolocationError& WebGeolocationError::operator=(PassRefPtr<GeolocationError> error) -{ - m_private = error; - return *this; -} - -WebGeolocationError::operator PassRefPtr<GeolocationError>() const -{ - return m_private.get(); -} - -} diff --git a/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp b/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp deleted file mode 100644 index 8d8c53e..0000000 --- a/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationPermissionRequest.h" - -#include "Document.h" -#include "Frame.h" -#include "Geolocation.h" -#include "WebSecurityOrigin.h" -#include "WebURL.h" - -using namespace WebCore; - -namespace WebKit { - -WebSecurityOrigin WebGeolocationPermissionRequest::securityOrigin() const -{ - return WebSecurityOrigin::create(m_private->frame()->document()->url()); -} - -void WebGeolocationPermissionRequest::setIsAllowed(bool allowed) -{ - m_private->setIsAllowed(allowed); -} - -} diff --git a/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp b/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp deleted file mode 100644 index 4c0ed9c..0000000 --- a/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationPermissionRequestManager.h" - -#include "WebGeolocationPermissionRequest.h" -#include <wtf/HashMap.h> - -namespace WebCore { -class Geolocation; -} - -using namespace WebCore; - -typedef HashMap<Geolocation*, int> GeolocationIdMap; -typedef HashMap<int, Geolocation*> IdGeolocationMap; - -namespace WebKit { -class WebGeolocationPermissionRequestManagerPrivate { -public: - GeolocationIdMap m_geolocationIdMap; - IdGeolocationMap m_idGeolocationMap; -}; -} - -using namespace WebKit; - -int WebGeolocationPermissionRequestManager::add(const WebKit::WebGeolocationPermissionRequest& permissionRequest) -{ - Geolocation* geolocation = permissionRequest.geolocation(); - ASSERT(!m_private->m_geolocationIdMap.contains(geolocation)); - int id = ++m_lastId; - m_private->m_geolocationIdMap.add(geolocation, id); - m_private->m_idGeolocationMap.add(id, geolocation); - return id; -} - -bool WebGeolocationPermissionRequestManager::remove(const WebKit::WebGeolocationPermissionRequest& permissionRequest, int& id) -{ - Geolocation* geolocation = permissionRequest.geolocation(); - GeolocationIdMap::iterator it = m_private->m_geolocationIdMap.find(geolocation); - if (it == m_private->m_geolocationIdMap.end()) - return false; - id = it->second; - m_private->m_geolocationIdMap.remove(it); - m_private->m_idGeolocationMap.remove(id); - return true; -} - -bool WebGeolocationPermissionRequestManager::remove(int id, WebKit::WebGeolocationPermissionRequest& permissionRequest) -{ - IdGeolocationMap::iterator it = m_private->m_idGeolocationMap.find(id); - if (it == m_private->m_idGeolocationMap.end()) - return false; - Geolocation* geolocation = it->second; - permissionRequest = WebGeolocationPermissionRequest(geolocation); - m_private->m_idGeolocationMap.remove(it); - m_private->m_geolocationIdMap.remove(geolocation); - return true; -} - -void WebGeolocationPermissionRequestManager::init() -{ - m_lastId = 0; - m_private.reset(new WebGeolocationPermissionRequestManagerPrivate); -} - -void WebGeolocationPermissionRequestManager::reset() -{ - m_private.reset(0); -} - diff --git a/WebKit/chromium/src/WebGeolocationPosition.cpp b/WebKit/chromium/src/WebGeolocationPosition.cpp deleted file mode 100644 index 75b3306..0000000 --- a/WebKit/chromium/src/WebGeolocationPosition.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationPosition.h" - -#include "GeolocationPosition.h" - -using namespace WebCore; - -namespace WebKit { - -void WebGeolocationPosition::assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) -{ - m_private = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed); -} - -void WebGeolocationPosition::assign(const WebGeolocationPosition& other) -{ - m_private = other.m_private; -} - -void WebGeolocationPosition::reset() -{ - m_private.reset(); -} - -WebGeolocationPosition& WebGeolocationPosition::operator=(PassRefPtr<GeolocationPosition> position) -{ - m_private = position; - return *this; -} - -WebGeolocationPosition::operator PassRefPtr<GeolocationPosition>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp deleted file mode 100644 index bbc852f..0000000 --- a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationServiceBridgeImpl.h" - -#include "Chrome.h" -#include "ChromeClientImpl.h" -#include "Frame.h" -#include "Geolocation.h" -#include "GeolocationServiceChromium.h" -#include "Geoposition.h" -#include "Page.h" -#include "PositionError.h" -#include "PositionOptions.h" -#include "WebFrame.h" -#include "WebFrameImpl.h" -#include "WebGeolocationService.h" -#include "WebGeolocationServiceBridge.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -#if ENABLE(GEOLOCATION) - -using WebCore::Coordinates; -using WebCore::Frame; -using WebCore::Geolocation; -using WebCore::GeolocationServiceBridge; -using WebCore::GeolocationServiceChromium; -using WebCore::GeolocationServiceClient; -using WebCore::Geoposition; -using WebCore::PositionError; -using WebCore::PositionOptions; -using WTF::String; - -namespace WebKit { - -class WebGeolocationServiceBridgeImpl : public GeolocationServiceBridge, public WebGeolocationServiceBridge { -public: - explicit WebGeolocationServiceBridgeImpl(GeolocationServiceChromium*); - virtual ~WebGeolocationServiceBridgeImpl(); - - // GeolocationServiceBridge - virtual bool startUpdating(PositionOptions*); - virtual void stopUpdating(); - virtual void suspend(); - virtual void resume(); - virtual int getBridgeId() const; - virtual void attachBridgeIfNeeded(); - - // WebGeolocationServiceBridge - virtual void setIsAllowed(bool allowed); - virtual void setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp); - virtual void setLastError(int errorCode, const WebString& message); - virtual void didDestroyGeolocationService(); - -private: - bool isAttached() const; - // Pointer back to the WebKit geolocation client. We obtain this via the frame's page, but need to cache it - // as it may still be alive after the page has detached from the frame. - WebGeolocationService* m_webGeolocationService; - // GeolocationServiceChromium owns us, we only have a pointer back to it. - GeolocationServiceChromium* m_geolocationServiceChromium; - int m_bridgeId; -}; - -GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) -{ - return new WebGeolocationServiceBridgeImpl(geolocationServiceChromium); -} - -WebGeolocationServiceBridgeImpl::WebGeolocationServiceBridgeImpl(GeolocationServiceChromium* geolocationServiceChromium) - : m_webGeolocationService(0) - , m_geolocationServiceChromium(geolocationServiceChromium) - , m_bridgeId(0) -{ -} - -WebGeolocationServiceBridgeImpl::~WebGeolocationServiceBridgeImpl() -{ - if (isAttached()) - m_webGeolocationService->detachBridge(m_bridgeId); -} - -bool WebGeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOptions) -{ - attachBridgeIfNeeded(); - if (!isAttached()) - return false; - m_webGeolocationService->startUpdating(m_bridgeId, m_geolocationServiceChromium->frame()->document()->url(), positionOptions->enableHighAccuracy()); - return true; -} - -void WebGeolocationServiceBridgeImpl::stopUpdating() -{ - if (isAttached()) { - m_webGeolocationService->stopUpdating(m_bridgeId); - m_webGeolocationService->detachBridge(m_bridgeId); - m_bridgeId = 0; - m_webGeolocationService = 0; - } -} - -void WebGeolocationServiceBridgeImpl::suspend() -{ - if (isAttached()) - m_webGeolocationService->suspend(m_bridgeId); -} - -void WebGeolocationServiceBridgeImpl::resume() -{ - if (isAttached()) - m_webGeolocationService->resume(m_bridgeId); -} - -int WebGeolocationServiceBridgeImpl::getBridgeId() const -{ - return m_bridgeId; -} - -void WebGeolocationServiceBridgeImpl::attachBridgeIfNeeded() -{ - if (isAttached()) - return; - // Lazy attach to the geolocation service of the associated page if there is one. - Frame* frame = m_geolocationServiceChromium->frame(); - if (!frame || !frame->page()) - return; - WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(frame->page()->chrome()->client()); - WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client(); - m_webGeolocationService = webViewClient->geolocationService(); - ASSERT(m_webGeolocationService); - m_bridgeId = m_webGeolocationService->attachBridge(this); - if (!m_bridgeId) { - // Attach failed. Release association with this service. - m_webGeolocationService = 0; - } -} - -void WebGeolocationServiceBridgeImpl::setIsAllowed(bool allowed) -{ - m_geolocationServiceChromium->setIsAllowed(allowed); -} - -void WebGeolocationServiceBridgeImpl::setLastPosition(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed, long long timestamp) -{ - RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed), timestamp); - m_geolocationServiceChromium->setLastPosition(geoposition); -} - -void WebGeolocationServiceBridgeImpl::setLastError(int errorCode, const WebString& message) -{ - m_geolocationServiceChromium->setLastError(errorCode, message); -} - -void WebGeolocationServiceBridgeImpl::didDestroyGeolocationService() -{ - m_bridgeId = 0; - m_webGeolocationService = 0; -} - -bool WebGeolocationServiceBridgeImpl::isAttached() const -{ - // Test the class invariant. - if (m_webGeolocationService) - ASSERT(m_bridgeId); - else - ASSERT(!m_bridgeId); - - return m_webGeolocationService; -} - -} // namespace WebKit - -#endif // ENABLE(GEOLOCATION) diff --git a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h b/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h deleted file mode 100644 index 2c37bcb..0000000 --- a/WebKit/chromium/src/WebGeolocationServiceBridgeImpl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2010, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGeolocationServiceBridgeImpl_h -#define WebGeolocationServiceBridgeImpl_h - -namespace WebCore { -class GeolocationServiceBridge; -class GeolocationServiceChromium; -} - -namespace WebKit { -WebCore::GeolocationServiceBridge* createGeolocationServiceBridgeImpl(WebCore::GeolocationServiceChromium*); -} // namespace WebKit - -#endif // WebGeolocationServiceBridgeImpl_h diff --git a/WebKit/chromium/src/WebGeolocationServiceMock.cpp b/WebKit/chromium/src/WebGeolocationServiceMock.cpp deleted file mode 100644 index 667b8b1..0000000 --- a/WebKit/chromium/src/WebGeolocationServiceMock.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGeolocationServiceMock.h" - -#include "GeolocationService.h" -#include "GeolocationServiceChromium.h" -#include "GeolocationServiceMock.h" -#include "WebGeolocationServiceBridge.h" -#include "WebString.h" -#include <wtf/CurrentTime.h> -#include <wtf/HashMap.h> -#include <wtf/Vector.h> - -#if ENABLE(GEOLOCATION) -using WebCore::Coordinates; -using WebCore::Frame; -using WebCore::Geolocation; -using WebCore::GeolocationServiceBridge; -using WebCore::GeolocationServiceChromium; -using WebCore::GeolocationServiceClient; -using WebCore::GeolocationServiceMock; -using WebCore::Geoposition; -using WebCore::PositionError; -using WebCore::PositionOptions; -using WTF::String; -using WTF::Vector; - -namespace WebCore { -class GeolocationServiceChromiumMock : public GeolocationServiceChromium, public GeolocationServiceClient { -public: - static GeolocationService* create(GeolocationServiceClient*); - virtual bool startUpdating(PositionOptions*); - virtual void stopUpdating(); - virtual Geoposition* lastPosition() const; - virtual PositionError* lastError() const; - - virtual void geolocationServicePositionChanged(GeolocationService*); - virtual void geolocationServiceErrorOccurred(GeolocationService*); - -private: - explicit GeolocationServiceChromiumMock(GeolocationServiceClient*); - - GeolocationServiceClient* m_geolocationServiceClient; - OwnPtr<GeolocationService> m_geolocationServiceMock; -}; - -GeolocationService* GeolocationServiceChromiumMock::create(GeolocationServiceClient* geolocationServiceClient) -{ - return new GeolocationServiceChromiumMock(geolocationServiceClient); -} - -GeolocationServiceChromiumMock::GeolocationServiceChromiumMock(GeolocationServiceClient* geolocationServiceClient) - : GeolocationServiceChromium(geolocationServiceClient), - m_geolocationServiceClient(geolocationServiceClient) -{ - m_geolocationServiceMock.set(GeolocationServiceMock::create(this)); -} - -bool GeolocationServiceChromiumMock::startUpdating(PositionOptions* positionOptions) -{ - GeolocationServiceChromium::startUpdating(positionOptions); - return m_geolocationServiceMock->startUpdating(positionOptions); -} - -void GeolocationServiceChromiumMock::stopUpdating() -{ - GeolocationServiceChromium::stopUpdating(); - m_geolocationServiceMock->stopUpdating(); -} - -Geoposition* GeolocationServiceChromiumMock::lastPosition() const -{ - return m_geolocationServiceMock->lastPosition(); -} - -PositionError* GeolocationServiceChromiumMock::lastError() const -{ - return m_geolocationServiceMock->lastError(); -} - -void GeolocationServiceChromiumMock::geolocationServicePositionChanged(GeolocationService* geolocationService) -{ - ASSERT_UNUSED(geolocationService, geolocationService == m_geolocationServiceMock); - m_geolocationServiceClient->geolocationServicePositionChanged(this); - -} - -void GeolocationServiceChromiumMock::geolocationServiceErrorOccurred(GeolocationService* geolocationService) -{ - ASSERT_UNUSED(geolocationService, geolocationService == m_geolocationServiceMock); - m_geolocationServiceClient->geolocationServiceErrorOccurred(this); -} - -} // namespace WebCore - -namespace WebKit { - -class WebGeolocationServiceMockImpl : public WebGeolocationServiceMock { -public: - WebGeolocationServiceMockImpl(); - virtual ~WebGeolocationServiceMockImpl(); - static void setMockGeolocationPermission(bool allowed); - - // WebGeolocationService - virtual void requestPermissionForFrame(int bridgeId, const WebURL& url); - virtual int attachBridge(WebGeolocationServiceBridge*); - virtual void detachBridge(int bridgeId); - -private: - void notifyPendingPermissions(); - - typedef HashMap<int, WebGeolocationServiceBridge*> IdToBridgeMap; - IdToBridgeMap m_idToBridgeMap; - Vector<int> m_pendingPermissionRequests; - - // In addition to the singleton instance pointer, we need to keep the setMockGeolocationPermission() state - // as a static (not object members) as this call may come in before the service has been created. - static enum PermissionState { - PermissionStateUnset, - PermissionStateAllowed, - PermissionStateDenied, - } s_permissionState; - static WebGeolocationServiceMockImpl* s_instance; -}; - -WebGeolocationServiceMockImpl::PermissionState WebGeolocationServiceMockImpl::s_permissionState = WebGeolocationServiceMockImpl::PermissionStateUnset; -WebGeolocationServiceMockImpl* WebGeolocationServiceMockImpl::s_instance = 0; - -WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock() -{ - return new WebGeolocationServiceMockImpl; -} - -void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed) -{ - WebGeolocationServiceMockImpl::setMockGeolocationPermission(allowed); -} - -void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy) -{ - WebCore::GeolocationService::setCustomMockFactory(&WebCore::GeolocationServiceChromiumMock::create); - RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, false, 0, accuracy, true, 0, false, 0, false, 0), currentTime() * 1000.0); - GeolocationServiceMock::setPosition(geoposition); -} - -void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message) -{ - WebCore::GeolocationService::setCustomMockFactory(&WebCore::GeolocationServiceChromiumMock::create); - RefPtr<PositionError> positionError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message); - GeolocationServiceMock::setError(positionError); -} - -WebGeolocationServiceMockImpl::WebGeolocationServiceMockImpl() -{ - ASSERT(!s_instance); - s_instance = this; -} - -WebGeolocationServiceMockImpl::~WebGeolocationServiceMockImpl() -{ - ASSERT(this == s_instance); - s_instance = 0; - // Reset the permission state, so any future service instance (e.g. running - // multiple tests in a single DRT run) will see a clean call sequence. - s_permissionState = PermissionStateUnset; - for (IdToBridgeMap::iterator it = m_idToBridgeMap.begin(); it != m_idToBridgeMap.end(); ++it) - it->second->didDestroyGeolocationService(); -} - -void WebGeolocationServiceMockImpl::setMockGeolocationPermission(bool allowed) -{ - s_permissionState = allowed ? PermissionStateAllowed : PermissionStateDenied; - if (s_instance) - s_instance->notifyPendingPermissions(); -} - -void WebGeolocationServiceMockImpl::requestPermissionForFrame(int bridgeId, const WebURL& url) -{ - m_pendingPermissionRequests.append(bridgeId); - if (s_permissionState != PermissionStateUnset) - notifyPendingPermissions(); -} - -int WebGeolocationServiceMockImpl::attachBridge(WebGeolocationServiceBridge* bridge) -{ - static int nextAvailableWatchId = 1; - // In case of overflow, make sure the ID remains positive, but reuse the ID values. - if (nextAvailableWatchId < 1) - nextAvailableWatchId = 1; - m_idToBridgeMap.set(nextAvailableWatchId, bridge); - return nextAvailableWatchId++; -} - -void WebGeolocationServiceMockImpl::detachBridge(int bridgeId) -{ - m_idToBridgeMap.remove(bridgeId); -} - -void WebGeolocationServiceMockImpl::notifyPendingPermissions() -{ - ASSERT(s_permissionState == PermissionStateAllowed || s_permissionState == PermissionStateDenied); - Vector<int> pendingPermissionRequests; - pendingPermissionRequests.swap(m_pendingPermissionRequests); - for (Vector<int>::const_iterator it = pendingPermissionRequests.begin(); it != pendingPermissionRequests.end(); ++it) { - ASSERT(*it > 0); - IdToBridgeMap::iterator iter = m_idToBridgeMap.find(*it); - if (iter != m_idToBridgeMap.end()) - iter->second->setIsAllowed(s_permissionState == PermissionStateAllowed); - } -} - -} // namespace WebKit -#endif // ENABLE(GEOLOCATION) diff --git a/WebKit/chromium/src/WebGlyphCache.cpp b/WebKit/chromium/src/WebGlyphCache.cpp deleted file mode 100644 index 272c6cd..0000000 --- a/WebKit/chromium/src/WebGlyphCache.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGlyphCache.h" - -#include "GlyphPageTreeNode.h" - -using namespace WebCore; - -namespace WebKit { - -size_t WebGlyphCache::pageCount() -{ - return GlyphPageTreeNode::treeGlyphPageCount(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebGraphicsContext3D.cpp b/WebKit/chromium/src/WebGraphicsContext3D.cpp deleted file mode 100644 index ce6f55d..0000000 --- a/WebKit/chromium/src/WebGraphicsContext3D.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebGraphicsContext3D.h" - -#include "WebGraphicsContext3DDefaultImpl.h" - -namespace WebKit { - -WebGraphicsContext3D* WebGraphicsContext3D::createDefault() -{ -#if ENABLE(3D_CANVAS) - return new WebGraphicsContext3DDefaultImpl(); -#else - return 0; -#endif -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp deleted file mode 100644 index 9a4a362..0000000 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp +++ /dev/null @@ -1,1588 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(3D_CANVAS) - -#include "WebGraphicsContext3DDefaultImpl.h" - -#include "app/gfx/gl/gl_bindings.h" -#include "app/gfx/gl/gl_context.h" -#include "app/gfx/gl/gl_implementation.h" -#include "NotImplemented.h" -#include "WebView.h" -#include <wtf/OwnArrayPtr.h> -#include <wtf/PassOwnPtr.h> -#include <wtf/text/StringBuilder.h> -#include <wtf/text/WTFString.h> - -#include <stdio.h> -#include <string.h> - -namespace WebKit { - -enum { - MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, - MAX_VARYING_VECTORS = 0x8DFC, - MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD -}; - -WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState() - : enabled(false) - , buffer(0) - , indx(0) - , size(0) - , type(0) - , normalized(false) - , stride(0) - , offset(0) -{ -} - -WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl() - : m_initialized(false) - , m_renderDirectlyToWebView(false) - , m_isGLES2(false) - , m_haveEXTFramebufferObject(false) - , m_haveEXTFramebufferMultisample(false) - , m_haveANGLEFramebufferMultisample(false) - , m_texture(0) - , m_fbo(0) - , m_depthStencilBuffer(0) - , m_cachedWidth(0) - , m_cachedHeight(0) - , m_multisampleFBO(0) - , m_multisampleDepthStencilBuffer(0) - , m_multisampleColorBuffer(0) - , m_boundFBO(0) - , m_boundTexture(0) - , m_copyTextureToParentTextureFBO(0) -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - , m_scanline(0) -#endif - , m_boundArrayBuffer(0) - , m_fragmentCompiler(0) - , m_vertexCompiler(0) -{ -} - -WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl() -{ - if (m_initialized) { - makeContextCurrent(); - - if (m_attributes.antialias) { - glDeleteRenderbuffersEXT(1, &m_multisampleColorBuffer); - if (m_attributes.depth || m_attributes.stencil) - glDeleteRenderbuffersEXT(1, &m_multisampleDepthStencilBuffer); - glDeleteFramebuffersEXT(1, &m_multisampleFBO); - } else { - if (m_attributes.depth || m_attributes.stencil) - glDeleteRenderbuffersEXT(1, &m_depthStencilBuffer); - } - glDeleteTextures(1, &m_texture); - glDeleteFramebuffersEXT(1, &m_copyTextureToParentTextureFBO); -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (m_scanline) - delete[] m_scanline; -#endif - glDeleteFramebuffersEXT(1, &m_fbo); - - m_glContext->Destroy(); - - for (ShaderSourceMap::iterator ii = m_shaderSourceMap.begin(); ii != m_shaderSourceMap.end(); ++ii) { - if (ii->second) - delete ii->second; - } - angleDestroyCompilers(); - } -} - -bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView, bool renderDirectlyToWebView) -{ - if (!gfx::GLContext::InitializeOneOff()) - return false; - - m_renderDirectlyToWebView = renderDirectlyToWebView; - gfx::GLContext* shareContext = 0; - - if (!renderDirectlyToWebView) { - // Pick up the compositor's context to share resources with. - WebGraphicsContext3D* viewContext = webView->graphicsContext3D(); - if (viewContext) { - WebGraphicsContext3DDefaultImpl* contextImpl = static_cast<WebGraphicsContext3DDefaultImpl*>(viewContext); - shareContext = contextImpl->m_glContext.get(); - } else { - // The compositor's context didn't get created - // successfully, so conceptually there is no way we can - // render successfully to the WebView. - m_renderDirectlyToWebView = false; - } - } - - // This implementation always renders offscreen regardless of - // whether renderDirectlyToWebView is true. Both DumpRenderTree - // and test_shell paint first to an intermediate offscreen buffer - // and from there to the window, and WebViewImpl::paint already - // correctly handles the case where the compositor is active but - // the output needs to go to a WebCanvas. - m_glContext = WTF::adoptPtr(gfx::GLContext::CreateOffscreenGLContext(shareContext)); - if (!m_glContext) - return false; - - m_attributes = attributes; - - // FIXME: for the moment we disable multisampling for the compositor. - // It actually works in this implementation, but there are a few - // considerations. First, we likely want to reduce the fuzziness in - // these tests as much as possible because we want to run pixel tests. - // Second, Mesa's multisampling doesn't seem to antialias straight - // edges in some CSS 3D samples. Third, we don't have multisampling - // support for the compositor in the normal case at the time of this - // writing. - if (renderDirectlyToWebView) - m_attributes.antialias = false; - - m_isGLES2 = gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2; - const char* extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); - m_haveEXTFramebufferObject = strstr(extensions, "GL_EXT_framebuffer_object"); - m_haveEXTFramebufferMultisample = strstr(extensions, "GL_EXT_framebuffer_multisample"); - m_haveANGLEFramebufferMultisample = strstr(extensions, "GL_ANGLE_framebuffer_multisample"); - - validateAttributes(); - - if (!m_isGLES2) { - glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); - glEnable(GL_POINT_SPRITE); - } - - if (!angleCreateCompilers()) { - angleDestroyCompilers(); - return false; - } - - glGenFramebuffersEXT(1, &m_copyTextureToParentTextureFBO); - - m_initialized = true; - return true; -} - -void WebGraphicsContext3DDefaultImpl::validateAttributes() -{ - const char* extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); - - if (m_attributes.stencil) { - if (strstr(extensions, "GL_OES_packed_depth_stencil") - || strstr(extensions, "GL_EXT_packed_depth_stencil")) { - if (!m_attributes.depth) - m_attributes.depth = true; - } else - m_attributes.stencil = false; - } - if (m_attributes.antialias) { - bool isValidVendor = true; -#if PLATFORM(CG) - // Currently in Mac we only turn on antialias if vendor is NVIDIA. - const char* vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR)); - if (!strstr(vendor, "NVIDIA")) - isValidVendor = false; -#endif - if (!(isValidVendor - && (m_haveEXTFramebufferMultisample - || (m_haveANGLEFramebufferMultisample && strstr(extensions, "GL_OES_rgb8_rgba8"))))) - m_attributes.antialias = false; - - // Don't antialias when using Mesa to ensure more reliable testing and - // because it doesn't appear to multisample straight lines correctly. - const char* renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER)); - if (!strncmp(renderer, "Mesa", 4)) - m_attributes.antialias = false; - } - // FIXME: instead of enforcing premultipliedAlpha = true, implement the - // correct behavior when premultipliedAlpha = false is requested. - m_attributes.premultipliedAlpha = true; -} - -void WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height) -{ - if (m_attributes.antialias) { - glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO); - glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo); - if (m_haveEXTFramebufferMultisample) - glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_NEAREST); - else { - ASSERT(m_haveANGLEFramebufferMultisample); - glBlitFramebufferANGLE(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_NEAREST); - } - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); - } -} - -bool WebGraphicsContext3DDefaultImpl::makeContextCurrent() -{ - return m_glContext->MakeCurrent(); -} - -int WebGraphicsContext3DDefaultImpl::width() -{ - return m_cachedWidth; -} - -int WebGraphicsContext3DDefaultImpl::height() -{ - return m_cachedHeight; -} - -int WebGraphicsContext3DDefaultImpl::sizeInBytes(int type) -{ - switch (type) { - case GL_BYTE: - return sizeof(GLbyte); - case GL_UNSIGNED_BYTE: - return sizeof(GLubyte); - case GL_SHORT: - return sizeof(GLshort); - case GL_UNSIGNED_SHORT: - return sizeof(GLushort); - case GL_INT: - return sizeof(GLint); - case GL_UNSIGNED_INT: - return sizeof(GLuint); - case GL_FLOAT: - return sizeof(GLfloat); - } - return 0; -} - -bool WebGraphicsContext3DDefaultImpl::isGLES2Compliant() -{ - return m_isGLES2; -} - -unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId() -{ - return m_texture; -} - -void WebGraphicsContext3DDefaultImpl::prepareTexture() -{ - if (!m_renderDirectlyToWebView) { - // We need to prepare our rendering results for the compositor. - makeContextCurrent(); - resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight); - } -} - -static int createTextureObject(GLenum target) -{ - GLuint texture = 0; - glGenTextures(1, &texture); - glBindTexture(target, texture); - glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - return texture; -} - -void WebGraphicsContext3DDefaultImpl::reshape(int width, int height) -{ - m_cachedWidth = width; - m_cachedHeight = height; - makeContextCurrent(); - - GLenum target = GL_TEXTURE_2D; - - if (!m_texture) { - // Generate the texture object - m_texture = createTextureObject(target); - // Generate the framebuffer object - glGenFramebuffersEXT(1, &m_fbo); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - m_boundFBO = m_fbo; - if (m_attributes.depth || m_attributes.stencil) - glGenRenderbuffersEXT(1, &m_depthStencilBuffer); - // Generate the multisample framebuffer object - if (m_attributes.antialias) { - glGenFramebuffersEXT(1, &m_multisampleFBO); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO); - m_boundFBO = m_multisampleFBO; - glGenRenderbuffersEXT(1, &m_multisampleColorBuffer); - if (m_attributes.depth || m_attributes.stencil) - glGenRenderbuffersEXT(1, &m_multisampleDepthStencilBuffer); - } - } - - GLint internalMultisampledColorFormat, internalColorFormat, colorFormat, internalDepthStencilFormat = 0; - if (m_attributes.alpha) { - // GL_RGBA8_OES == GL_RGBA8 - internalMultisampledColorFormat = GL_RGBA8; - internalColorFormat = m_isGLES2 ? GL_RGBA : GL_RGBA8; - colorFormat = GL_RGBA; - } else { - // GL_RGB8_OES == GL_RGB8 - internalMultisampledColorFormat = GL_RGB8; - internalColorFormat = m_isGLES2 ? GL_RGB : GL_RGB8; - colorFormat = GL_RGB; - } - if (m_attributes.stencil || m_attributes.depth) { - // We don't allow the logic where stencil is required and depth is not. - // See GraphicsContext3DInternal constructor. - if (m_attributes.stencil && m_attributes.depth) - internalDepthStencilFormat = GL_DEPTH24_STENCIL8_EXT; - else { - if (m_isGLES2) - internalDepthStencilFormat = GL_DEPTH_COMPONENT16; - else - internalDepthStencilFormat = GL_DEPTH_COMPONENT; - } - } - - bool mustRestoreFBO = false; - - // Resize multisampling FBO - if (m_attributes.antialias) { - GLint maxSampleCount; - glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSampleCount); - GLint sampleCount = std::min(8, maxSampleCount); - if (m_boundFBO != m_multisampleFBO) { - mustRestoreFBO = true; - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO); - } - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_multisampleColorBuffer); - if (m_haveEXTFramebufferMultisample) - glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, internalMultisampledColorFormat, width, height); - else { - ASSERT(m_haveANGLEFramebufferMultisample); - glRenderbufferStorageMultisampleANGLE(GL_RENDERBUFFER_EXT, sampleCount, internalMultisampledColorFormat, width, height); - } - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, m_multisampleColorBuffer); - if (m_attributes.stencil || m_attributes.depth) { - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); - if (m_haveEXTFramebufferMultisample) - glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, sampleCount, internalDepthStencilFormat, width, height); - else { - ASSERT(m_haveANGLEFramebufferMultisample); - glRenderbufferStorageMultisampleANGLE(GL_RENDERBUFFER_EXT, sampleCount, internalDepthStencilFormat, width, height); - } - if (m_attributes.stencil) - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); - if (m_attributes.depth) - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_multisampleDepthStencilBuffer); - } - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); - GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - printf("GraphicsContext3D: multisampling framebuffer was incomplete\n"); - - // FIXME: cleanup. - notImplemented(); - } - } - - // Resize regular FBO - if (m_boundFBO != m_fbo) { - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - mustRestoreFBO = true; - } - glBindTexture(target, m_texture); - glTexImage2D(target, 0, internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, target, m_texture, 0); - glBindTexture(target, 0); - if (!m_attributes.antialias && (m_attributes.stencil || m_attributes.depth)) { - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthStencilBuffer); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, internalDepthStencilFormat, width, height); - if (m_attributes.stencil) - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthStencilBuffer); - if (m_attributes.depth) - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, m_depthStencilBuffer); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); - } - GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - printf("WebGraphicsContext3DDefaultImpl: framebuffer was incomplete\n"); - - // FIXME: cleanup. - notImplemented(); - } - - if (m_attributes.antialias) { - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_multisampleFBO); - if (m_boundFBO == m_multisampleFBO) - mustRestoreFBO = false; - } - - // Initialize renderbuffers to 0. - GLfloat clearColor[] = {0, 0, 0, 0}, clearDepth = 0; - GLint clearStencil = 0; - GLboolean colorMask[] = {GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE}, depthMask = GL_TRUE; - GLuint stencilMask = 0xffffffff; - GLboolean isScissorEnabled = GL_FALSE; - GLboolean isDitherEnabled = GL_FALSE; - GLbitfield clearMask = GL_COLOR_BUFFER_BIT; - glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColor); - glClearColor(0, 0, 0, 0); - glGetBooleanv(GL_COLOR_WRITEMASK, colorMask); - glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - if (m_attributes.depth) { - glGetFloatv(GL_DEPTH_CLEAR_VALUE, &clearDepth); - glClearDepth(1); - glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask); - glDepthMask(GL_TRUE); - clearMask |= GL_DEPTH_BUFFER_BIT; - } - if (m_attributes.stencil) { - glGetIntegerv(GL_STENCIL_CLEAR_VALUE, &clearStencil); - glClearStencil(0); - glGetIntegerv(GL_STENCIL_WRITEMASK, reinterpret_cast<GLint*>(&stencilMask)); - glStencilMaskSeparate(GL_FRONT, 0xffffffff); - clearMask |= GL_STENCIL_BUFFER_BIT; - } - isScissorEnabled = glIsEnabled(GL_SCISSOR_TEST); - glDisable(GL_SCISSOR_TEST); - isDitherEnabled = glIsEnabled(GL_DITHER); - glDisable(GL_DITHER); - - glClear(clearMask); - - glClearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]); - glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]); - if (m_attributes.depth) { - glClearDepth(clearDepth); - glDepthMask(depthMask); - } - if (m_attributes.stencil) { - glClearStencil(clearStencil); - glStencilMaskSeparate(GL_FRONT, stencilMask); - } - if (isScissorEnabled) - glEnable(GL_SCISSOR_TEST); - else - glDisable(GL_SCISSOR_TEST); - if (isDitherEnabled) - glEnable(GL_DITHER); - else - glDisable(GL_DITHER); - - if (mustRestoreFBO) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (m_scanline) { - delete[] m_scanline; - m_scanline = 0; - } - m_scanline = new unsigned char[width * 4]; -#endif // FLIP_FRAMEBUFFER_VERTICALLY -} - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY -void WebGraphicsContext3DDefaultImpl::flipVertically(unsigned char* framebuffer, - unsigned int width, - unsigned int height) -{ - unsigned char* scanline = m_scanline; - if (!scanline) - return; - unsigned int rowBytes = width * 4; - unsigned int count = height / 2; - for (unsigned int i = 0; i < count; i++) { - unsigned char* rowA = framebuffer + i * rowBytes; - unsigned char* rowB = framebuffer + (height - i - 1) * rowBytes; - // FIXME: this is where the multiplication of the alpha - // channel into the color buffer will need to occur if the - // user specifies the "premultiplyAlpha" flag in the context - // creation attributes. - memcpy(scanline, rowB, rowBytes); - memcpy(rowB, rowA, rowBytes); - memcpy(rowA, scanline, rowBytes); - } -} -#endif - -bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels, size_t bufferSize) -{ - if (bufferSize != static_cast<size_t>(4 * width() * height())) - return false; - - makeContextCurrent(); - - // Earlier versions of this code used the GPU to flip the - // framebuffer vertically before reading it back for compositing - // via software. This code was quite complicated, used a lot of - // GPU memory, and didn't provide an obvious speedup. Since this - // vertical flip is only a temporary solution anyway until Chrome - // is fully GPU composited, it wasn't worth the complexity. - - resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - - GLint packAlignment = 4; - bool mustRestorePackAlignment = false; - glGetIntegerv(GL_PACK_ALIGNMENT, &packAlignment); - if (packAlignment > 4) { - glPixelStorei(GL_PACK_ALIGNMENT, 4); - mustRestorePackAlignment = true; - } - - if (m_isGLES2) { - // FIXME: consider testing for presence of GL_OES_read_format - // and GL_EXT_read_format_bgra, and using GL_BGRA_EXT here - // directly. - glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels); - for (size_t i = 0; i < bufferSize; i += 4) - std::swap(pixels[i], pixels[i + 2]); - } else - glReadPixels(0, 0, m_cachedWidth, m_cachedHeight, GL_BGRA, GL_UNSIGNED_BYTE, pixels); - - if (mustRestorePackAlignment) - glPixelStorei(GL_PACK_ALIGNMENT, packAlignment); - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - if (pixels) - flipVertically(pixels, m_cachedWidth, m_cachedHeight); -#endif - - return true; -} - -void WebGraphicsContext3DDefaultImpl::synthesizeGLError(unsigned long error) -{ - m_syntheticErrors.add(error); -} - -void* WebGraphicsContext3DDefaultImpl::mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access) -{ - return 0; -} - -void WebGraphicsContext3DDefaultImpl::unmapBufferSubDataCHROMIUM(const void* mem) -{ -} - -void* WebGraphicsContext3DDefaultImpl::mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access) -{ - return 0; -} - -void WebGraphicsContext3DDefaultImpl::unmapTexSubImage2DCHROMIUM(const void* mem) -{ -} - -void WebGraphicsContext3DDefaultImpl::copyTextureToParentTextureCHROMIUM(unsigned id, unsigned id2) -{ - if (!glGetTexLevelParameteriv) - return; - - makeContextCurrent(); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_copyTextureToParentTextureFBO); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER, - GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, - id, - 0); // level - glBindTexture(GL_TEXTURE_2D, id2); - GLsizei width, height; - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); - glCopyTexImage2D(GL_TEXTURE_2D, - 0, // level - GL_RGBA, - 0, 0, // x, y - width, - height, - 0); // border - glBindTexture(GL_TEXTURE_2D, m_boundTexture); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); -} - -WebString WebGraphicsContext3DDefaultImpl::getRequestableExtensionsCHROMIUM() -{ - return WebString(); -} - -void WebGraphicsContext3DDefaultImpl::requestExtensionCHROMIUM(const char*) -{ -} - -// Helper macros to reduce the amount of code. - -#define DELEGATE_TO_GL(name, glname) \ -void WebGraphicsContext3DDefaultImpl::name() \ -{ \ - makeContextCurrent(); \ - gl##glname(); \ -} - -#define DELEGATE_TO_GL_1(name, glname, t1) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1); \ -} - -#define DELEGATE_TO_GL_1R(name, glname, t1, rt) \ -rt WebGraphicsContext3DDefaultImpl::name(t1 a1) \ -{ \ - makeContextCurrent(); \ - return gl##glname(a1); \ -} - -#define DELEGATE_TO_GL_2(name, glname, t1, t2) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2); \ -} - -#define DELEGATE_TO_GL_2R(name, glname, t1, t2, rt) \ -rt WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2) \ -{ \ - makeContextCurrent(); \ - return gl##glname(a1, a2); \ -} - -#define DELEGATE_TO_GL_3(name, glname, t1, t2, t3) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3); \ -} - -#define DELEGATE_TO_GL_4(name, glname, t1, t2, t3, t4) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4); \ -} - -#define DELEGATE_TO_GL_5(name, glname, t1, t2, t3, t4, t5) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5); \ -} - -#define DELEGATE_TO_GL_6(name, glname, t1, t2, t3, t4, t5, t6) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6); \ -} - -#define DELEGATE_TO_GL_7(name, glname, t1, t2, t3, t4, t5, t6, t7) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6, a7); \ -} - -#define DELEGATE_TO_GL_8(name, glname, t1, t2, t3, t4, t5, t6, t7, t8) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6, a7, a8); \ -} - -#define DELEGATE_TO_GL_9(name, glname, t1, t2, t3, t4, t5, t6, t7, t8, t9) \ -void WebGraphicsContext3DDefaultImpl::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8 a8, t9 a9) \ -{ \ - makeContextCurrent(); \ - gl##glname(a1, a2, a3, a4, a5, a6, a7, a8, a9); \ -} - -void WebGraphicsContext3DDefaultImpl::activeTexture(unsigned long texture) -{ - // FIXME: query number of textures available. - if (texture < GL_TEXTURE0 || texture > GL_TEXTURE0+32) - // FIXME: raise exception. - return; - - makeContextCurrent(); - glActiveTexture(texture); -} - -DELEGATE_TO_GL_2(attachShader, AttachShader, WebGLId, WebGLId) - -DELEGATE_TO_GL_3(bindAttribLocation, BindAttribLocation, WebGLId, unsigned long, const char*) - -void WebGraphicsContext3DDefaultImpl::bindBuffer(unsigned long target, WebGLId buffer) -{ - makeContextCurrent(); - if (target == GL_ARRAY_BUFFER) - m_boundArrayBuffer = buffer; - glBindBuffer(target, buffer); -} - -void WebGraphicsContext3DDefaultImpl::bindFramebuffer(unsigned long target, WebGLId framebuffer) -{ - makeContextCurrent(); - if (!framebuffer) - framebuffer = (m_attributes.antialias ? m_multisampleFBO : m_fbo); - if (framebuffer != m_boundFBO) { - glBindFramebufferEXT(target, framebuffer); - m_boundFBO = framebuffer; - } -} - -DELEGATE_TO_GL_2(bindRenderbuffer, BindRenderbufferEXT, unsigned long, WebGLId) - -void WebGraphicsContext3DDefaultImpl::bindTexture(unsigned long target, WebGLId texture) -{ - makeContextCurrent(); - glBindTexture(target, texture); - m_boundTexture = texture; -} - -DELEGATE_TO_GL_4(blendColor, BlendColor, double, double, double, double) - -DELEGATE_TO_GL_1(blendEquation, BlendEquation, unsigned long) - -DELEGATE_TO_GL_2(blendEquationSeparate, BlendEquationSeparate, unsigned long, unsigned long) - -DELEGATE_TO_GL_2(blendFunc, BlendFunc, unsigned long, unsigned long) - -DELEGATE_TO_GL_4(blendFuncSeparate, BlendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long) - -DELEGATE_TO_GL_4(bufferData, BufferData, unsigned long, int, const void*, unsigned long) - -DELEGATE_TO_GL_4(bufferSubData, BufferSubData, unsigned long, long, int, const void*) - -DELEGATE_TO_GL_1R(checkFramebufferStatus, CheckFramebufferStatusEXT, unsigned long, unsigned long) - -DELEGATE_TO_GL_1(clear, Clear, unsigned long) - -DELEGATE_TO_GL_4(clearColor, ClearColor, double, double, double, double) - -DELEGATE_TO_GL_1(clearDepth, ClearDepth, double) - -DELEGATE_TO_GL_1(clearStencil, ClearStencil, long) - -DELEGATE_TO_GL_4(colorMask, ColorMask, bool, bool, bool, bool) - -void WebGraphicsContext3DDefaultImpl::compileShader(WebGLId shader) -{ - makeContextCurrent(); - - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result == m_shaderSourceMap.end()) { - // Passing down to gl driver to generate the correct error; or the case - // where the shader deletion is delayed when it's attached to a program. - glCompileShader(shader); - return; - } - ShaderSourceEntry* entry = result->second; - ASSERT(entry); - - if (!angleValidateShaderSource(*entry)) - return; // Shader didn't validate, don't move forward with compiling translated source - - int shaderLength = entry->translatedSource ? strlen(entry->translatedSource) : 0; - glShaderSource(shader, 1, const_cast<const char**>(&entry->translatedSource), &shaderLength); - glCompileShader(shader); - -#ifndef NDEBUG - int compileStatus; - glGetShaderiv(shader, GL_COMPILE_STATUS, &compileStatus); - // ASSERT that ANGLE generated GLSL will be accepted by OpenGL - ASSERT(compileStatus == GL_TRUE); -#endif -} - -void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long level, unsigned long internalformat, - long x, long y, unsigned long width, unsigned long height, long border) -{ - makeContextCurrent(); - - bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO); - if (needsResolve) { - resolveMultisampledFramebuffer(x, y, width, height); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - } - - glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); - - if (needsResolve) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); -} - -void WebGraphicsContext3DDefaultImpl::copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, - long x, long y, unsigned long width, unsigned long height) -{ - makeContextCurrent(); - - bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO); - if (needsResolve) { - resolveMultisampledFramebuffer(x, y, width, height); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - } - - glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - - if (needsResolve) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); -} - -DELEGATE_TO_GL_1(cullFace, CullFace, unsigned long) - -DELEGATE_TO_GL_1(depthFunc, DepthFunc, unsigned long) - -DELEGATE_TO_GL_1(depthMask, DepthMask, bool) - -DELEGATE_TO_GL_2(depthRange, DepthRange, double, double) - -DELEGATE_TO_GL_2(detachShader, DetachShader, WebGLId, WebGLId) - -DELEGATE_TO_GL_1(disable, Disable, unsigned long) - -void WebGraphicsContext3DDefaultImpl::disableVertexAttribArray(unsigned long index) -{ - makeContextCurrent(); - if (index < NumTrackedPointerStates) - m_vertexAttribPointerState[index].enabled = false; - glDisableVertexAttribArray(index); -} - -DELEGATE_TO_GL_3(drawArrays, DrawArrays, unsigned long, long, long) - -void WebGraphicsContext3DDefaultImpl::drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset) -{ - makeContextCurrent(); - glDrawElements(mode, count, type, - reinterpret_cast<void*>(static_cast<intptr_t>(offset))); -} - -DELEGATE_TO_GL_1(enable, Enable, unsigned long) - -void WebGraphicsContext3DDefaultImpl::enableVertexAttribArray(unsigned long index) -{ - makeContextCurrent(); - if (index < NumTrackedPointerStates) - m_vertexAttribPointerState[index].enabled = true; - glEnableVertexAttribArray(index); -} - -DELEGATE_TO_GL(finish, Finish) - -DELEGATE_TO_GL(flush, Flush) - -DELEGATE_TO_GL_4(framebufferRenderbuffer, FramebufferRenderbufferEXT, unsigned long, unsigned long, unsigned long, WebGLId) - -DELEGATE_TO_GL_5(framebufferTexture2D, FramebufferTexture2DEXT, unsigned long, unsigned long, unsigned long, WebGLId, long) - -DELEGATE_TO_GL_1(frontFace, FrontFace, unsigned long) - -void WebGraphicsContext3DDefaultImpl::generateMipmap(unsigned long target) -{ - makeContextCurrent(); - if (m_isGLES2 || m_haveEXTFramebufferObject) - glGenerateMipmapEXT(target); - // FIXME: provide alternative code path? This will be unpleasant - // to implement if glGenerateMipmapEXT is not available -- it will - // require a texture readback and re-upload. -} - -bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo& info) -{ - makeContextCurrent(); - if (!program) { - synthesizeGLError(GL_INVALID_VALUE); - return false; - } - GLint maxNameLength = -1; - glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLength); - if (maxNameLength < 0) - return false; - GLchar* name = 0; - if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { - synthesizeGLError(GL_OUT_OF_MEMORY); - return false; - } - GLsizei length = 0; - GLint size = -1; - GLenum type = 0; - glGetActiveAttrib(program, index, maxNameLength, - &length, &size, &type, name); - if (size < 0) { - fastFree(name); - return false; - } - info.name = WebString::fromUTF8(name, length); - info.type = type; - info.size = size; - fastFree(name); - return true; -} - -bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned long index, ActiveInfo& info) -{ - makeContextCurrent(); - GLint maxNameLength = -1; - glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength); - if (maxNameLength < 0) - return false; - GLchar* name = 0; - if (!tryFastMalloc(maxNameLength * sizeof(GLchar)).getValue(name)) { - synthesizeGLError(GL_OUT_OF_MEMORY); - return false; - } - GLsizei length = 0; - GLint size = -1; - GLenum type = 0; - glGetActiveUniform(program, index, maxNameLength, - &length, &size, &type, name); - if (size < 0) { - fastFree(name); - return false; - } - info.name = WebString::fromUTF8(name, length); - info.type = type; - info.size = size; - fastFree(name); - return true; -} - -DELEGATE_TO_GL_4(getAttachedShaders, GetAttachedShaders, WebGLId, int, int*, unsigned int*) - -DELEGATE_TO_GL_2R(getAttribLocation, GetAttribLocation, WebGLId, const char*, int) - -DELEGATE_TO_GL_2(getBooleanv, GetBooleanv, unsigned long, unsigned char*) - -DELEGATE_TO_GL_3(getBufferParameteriv, GetBufferParameteriv, unsigned long, unsigned long, int*) - -WebGraphicsContext3D::Attributes WebGraphicsContext3DDefaultImpl::getContextAttributes() -{ - return m_attributes; -} - -unsigned long WebGraphicsContext3DDefaultImpl::getError() -{ - if (m_syntheticErrors.size() > 0) { - ListHashSet<unsigned long>::iterator iter = m_syntheticErrors.begin(); - unsigned long err = *iter; - m_syntheticErrors.remove(iter); - return err; - } - - makeContextCurrent(); - return glGetError(); -} - -bool WebGraphicsContext3DDefaultImpl::isContextLost() -{ - return false; -} - -DELEGATE_TO_GL_2(getFloatv, GetFloatv, unsigned long, float*) - -void WebGraphicsContext3DDefaultImpl::getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, - unsigned long pname, int* value) -{ - makeContextCurrent(); - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) - attachment = GL_DEPTH_ATTACHMENT; // Or GL_STENCIL_ATTACHMENT, either works. - glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, value); -} - -void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* value) -{ - makeContextCurrent(); - if (m_isGLES2) { - glGetIntegerv(pname, value); - return; - } - // Need to emulate MAX_FRAGMENT/VERTEX_UNIFORM_VECTORS and MAX_VARYING_VECTORS - // because desktop GL's corresponding queries return the number of components - // whereas GLES2 return the number of vectors (each vector has 4 components). - // Therefore, the value returned by desktop GL needs to be divided by 4. - switch (pname) { - case MAX_FRAGMENT_UNIFORM_VECTORS: - glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, value); - *value /= 4; - break; - case MAX_VERTEX_UNIFORM_VECTORS: - glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, value); - *value /= 4; - break; - case MAX_VARYING_VECTORS: - glGetIntegerv(GL_MAX_VARYING_FLOATS, value); - *value /= 4; - break; - default: - glGetIntegerv(pname, value); - } -} - -DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, unsigned long, int*) - -WebString WebGraphicsContext3DDefaultImpl::getProgramInfoLog(WebGLId program) -{ - makeContextCurrent(); - GLint logLength; - glGetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); - if (!logLength) - return WebString(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return WebString(); - GLsizei returnedLogLength; - glGetProgramInfoLog(program, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - WebString res = WebString::fromUTF8(log, returnedLogLength); - fastFree(log); - return res; -} - -DELEGATE_TO_GL_3(getRenderbufferParameteriv, GetRenderbufferParameterivEXT, unsigned long, unsigned long, int*) - -void WebGraphicsContext3DDefaultImpl::getShaderiv(WebGLId shader, unsigned long pname, int* value) -{ - makeContextCurrent(); - - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) { - ShaderSourceEntry* entry = result->second; - ASSERT(entry); - switch (pname) { - case GL_COMPILE_STATUS: - if (!entry->isValid) { - *value = 0; - return; - } - break; - case GL_INFO_LOG_LENGTH: - if (!entry->isValid) { - *value = entry->log ? strlen(entry->log) : 0; - if (*value) - (*value)++; - return; - } - break; - case GL_SHADER_SOURCE_LENGTH: - *value = entry->source ? strlen(entry->source) : 0; - if (*value) - (*value)++; - return; - } - } - - glGetShaderiv(shader, pname, value); -} - -WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader) -{ - makeContextCurrent(); - - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) { - ShaderSourceEntry* entry = result->second; - ASSERT(entry); - if (!entry->isValid) { - if (!entry->log) - return WebString(); - WebString res = WebString::fromUTF8(entry->log, strlen(entry->log)); - return res; - } - } - - GLint logLength = 0; - glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength); - if (logLength <= 1) - return WebString(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return WebString(); - GLsizei returnedLogLength; - glGetShaderInfoLog(shader, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - WebString res = WebString::fromUTF8(log, returnedLogLength); - fastFree(log); - return res; -} - -WebString WebGraphicsContext3DDefaultImpl::getShaderSource(WebGLId shader) -{ - makeContextCurrent(); - - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) { - ShaderSourceEntry* entry = result->second; - ASSERT(entry); - if (!entry->source) - return WebString(); - WebString res = WebString::fromUTF8(entry->source, strlen(entry->source)); - return res; - } - - GLint logLength = 0; - glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength); - if (logLength <= 1) - return WebString(); - GLchar* log = 0; - if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log)) - return WebString(); - GLsizei returnedLogLength; - glGetShaderSource(shader, logLength, &returnedLogLength, log); - ASSERT(logLength == returnedLogLength + 1); - WebString res = WebString::fromUTF8(log, returnedLogLength); - fastFree(log); - return res; -} - -WebString WebGraphicsContext3DDefaultImpl::getString(unsigned long name) -{ - makeContextCurrent(); - StringBuilder result; - result.append(reinterpret_cast<const char*>(glGetString(name))); - if (name == GL_EXTENSIONS) { - // GL_CHROMIUM_copy_texture_to_parent_texture requires the - // desktopGL-only function glGetTexLevelParameteriv (GLES2 - // doesn't support it). - if (!m_isGLES2) - result.append(" GL_CHROMIUM_copy_texture_to_parent_texture"); - } - return WebString(result.toString()); -} - -DELEGATE_TO_GL_3(getTexParameterfv, GetTexParameterfv, unsigned long, unsigned long, float*) - -DELEGATE_TO_GL_3(getTexParameteriv, GetTexParameteriv, unsigned long, unsigned long, int*) - -DELEGATE_TO_GL_3(getUniformfv, GetUniformfv, WebGLId, long, float*) - -DELEGATE_TO_GL_3(getUniformiv, GetUniformiv, WebGLId, long, int*) - -DELEGATE_TO_GL_2R(getUniformLocation, GetUniformLocation, WebGLId, const char*, long) - -DELEGATE_TO_GL_3(getVertexAttribfv, GetVertexAttribfv, unsigned long, unsigned long, float*) - -DELEGATE_TO_GL_3(getVertexAttribiv, GetVertexAttribiv, unsigned long, unsigned long, int*) - -long WebGraphicsContext3DDefaultImpl::getVertexAttribOffset(unsigned long index, unsigned long pname) -{ - makeContextCurrent(); - void* pointer; - glGetVertexAttribPointerv(index, pname, &pointer); - return reinterpret_cast<long>(pointer); -} - -DELEGATE_TO_GL_2(hint, Hint, unsigned long, unsigned long) - -DELEGATE_TO_GL_1R(isBuffer, IsBuffer, WebGLId, bool) - -DELEGATE_TO_GL_1R(isEnabled, IsEnabled, unsigned long, bool) - -DELEGATE_TO_GL_1R(isFramebuffer, IsFramebufferEXT, WebGLId, bool) - -DELEGATE_TO_GL_1R(isProgram, IsProgram, WebGLId, bool) - -DELEGATE_TO_GL_1R(isRenderbuffer, IsRenderbufferEXT, WebGLId, bool) - -DELEGATE_TO_GL_1R(isShader, IsShader, WebGLId, bool) - -DELEGATE_TO_GL_1R(isTexture, IsTexture, WebGLId, bool) - -DELEGATE_TO_GL_1(lineWidth, LineWidth, double) - -DELEGATE_TO_GL_1(linkProgram, LinkProgram, WebGLId) - -DELEGATE_TO_GL_2(pixelStorei, PixelStorei, unsigned long, long) - -DELEGATE_TO_GL_2(polygonOffset, PolygonOffset, double, double) - -void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels) -{ - makeContextCurrent(); - // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e., - // all previous rendering calls should be done before reading pixels. - glFlush(); - bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO); - if (needsResolve) { - resolveMultisampledFramebuffer(x, y, width, height); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); - glFlush(); - } - - glReadPixels(x, y, width, height, format, type, pixels); - - if (needsResolve) - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO); -} - -void WebGraphicsContext3DDefaultImpl::releaseShaderCompiler() -{ -} - -void WebGraphicsContext3DDefaultImpl::renderbufferStorage(unsigned long target, - unsigned long internalformat, - unsigned long width, - unsigned long height) -{ - makeContextCurrent(); - switch (internalformat) { - case GL_DEPTH_STENCIL: - internalformat = GL_DEPTH24_STENCIL8_EXT; - break; - case GL_DEPTH_COMPONENT16: - internalformat = GL_DEPTH_COMPONENT; - break; - case GL_RGBA4: - case GL_RGB5_A1: - internalformat = GL_RGBA; - break; - case 0x8D62: // GL_RGB565 - internalformat = GL_RGB; - break; - } - glRenderbufferStorageEXT(target, internalformat, width, height); -} - -DELEGATE_TO_GL_2(sampleCoverage, SampleCoverage, double, bool) - -DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long) - -void WebGraphicsContext3DDefaultImpl::texImage2D(unsigned target, unsigned level, unsigned internalFormat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels) -{ - if (width && height && !pixels) { - synthesizeGLError(GL_INVALID_VALUE); - return; - } - makeContextCurrent(); - glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels); -} - -void WebGraphicsContext3DDefaultImpl::shaderSource(WebGLId shader, const char* string) -{ - makeContextCurrent(); - GLint length = string ? strlen(string) : 0; - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) { - ShaderSourceEntry* entry = result->second; - ASSERT(entry); - if (entry->source) { - fastFree(entry->source); - entry->source = 0; - } - if (!tryFastMalloc((length + 1) * sizeof(char)).getValue(entry->source)) - return; // FIXME: generate an error? - memcpy(entry->source, string, (length + 1) * sizeof(char)); - } else - glShaderSource(shader, 1, &string, &length); -} - -DELEGATE_TO_GL_3(stencilFunc, StencilFunc, unsigned long, long, unsigned long) - -DELEGATE_TO_GL_4(stencilFuncSeparate, StencilFuncSeparate, unsigned long, unsigned long, long, unsigned long) - -DELEGATE_TO_GL_1(stencilMask, StencilMask, unsigned long) - -DELEGATE_TO_GL_2(stencilMaskSeparate, StencilMaskSeparate, unsigned long, unsigned long) - -DELEGATE_TO_GL_3(stencilOp, StencilOp, unsigned long, unsigned long, unsigned long) - -DELEGATE_TO_GL_4(stencilOpSeparate, StencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long) - -DELEGATE_TO_GL_3(texParameterf, TexParameterf, unsigned, unsigned, float); - -DELEGATE_TO_GL_3(texParameteri, TexParameteri, unsigned, unsigned, int); - -DELEGATE_TO_GL_9(texSubImage2D, TexSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, const void*) - -DELEGATE_TO_GL_2(uniform1f, Uniform1f, long, float) - -DELEGATE_TO_GL_3(uniform1fv, Uniform1fv, long, int, float*) - -DELEGATE_TO_GL_2(uniform1i, Uniform1i, long, int) - -DELEGATE_TO_GL_3(uniform1iv, Uniform1iv, long, int, int*) - -DELEGATE_TO_GL_3(uniform2f, Uniform2f, long, float, float) - -DELEGATE_TO_GL_3(uniform2fv, Uniform2fv, long, int, float*) - -DELEGATE_TO_GL_3(uniform2i, Uniform2i, long, int, int) - -DELEGATE_TO_GL_3(uniform2iv, Uniform2iv, long, int, int*) - -DELEGATE_TO_GL_4(uniform3f, Uniform3f, long, float, float, float) - -DELEGATE_TO_GL_3(uniform3fv, Uniform3fv, long, int, float*) - -DELEGATE_TO_GL_4(uniform3i, Uniform3i, long, int, int, int) - -DELEGATE_TO_GL_3(uniform3iv, Uniform3iv, long, int, int*) - -DELEGATE_TO_GL_5(uniform4f, Uniform4f, long, float, float, float, float) - -DELEGATE_TO_GL_3(uniform4fv, Uniform4fv, long, int, float*) - -DELEGATE_TO_GL_5(uniform4i, Uniform4i, long, int, int, int, int) - -DELEGATE_TO_GL_3(uniform4iv, Uniform4iv, long, int, int*) - -DELEGATE_TO_GL_4(uniformMatrix2fv, UniformMatrix2fv, long, int, bool, const float*) - -DELEGATE_TO_GL_4(uniformMatrix3fv, UniformMatrix3fv, long, int, bool, const float*) - -DELEGATE_TO_GL_4(uniformMatrix4fv, UniformMatrix4fv, long, int, bool, const float*) - -DELEGATE_TO_GL_1(useProgram, UseProgram, WebGLId) - -DELEGATE_TO_GL_1(validateProgram, ValidateProgram, WebGLId) - -DELEGATE_TO_GL_2(vertexAttrib1f, VertexAttrib1f, unsigned long, float) - -DELEGATE_TO_GL_2(vertexAttrib1fv, VertexAttrib1fv, unsigned long, const float*) - -DELEGATE_TO_GL_3(vertexAttrib2f, VertexAttrib2f, unsigned long, float, float) - -DELEGATE_TO_GL_2(vertexAttrib2fv, VertexAttrib2fv, unsigned long, const float*) - -DELEGATE_TO_GL_4(vertexAttrib3f, VertexAttrib3f, unsigned long, float, float, float) - -DELEGATE_TO_GL_2(vertexAttrib3fv, VertexAttrib3fv, unsigned long, const float*) - -DELEGATE_TO_GL_5(vertexAttrib4f, VertexAttrib4f, unsigned long, float, float, float, float) - -DELEGATE_TO_GL_2(vertexAttrib4fv, VertexAttrib4fv, unsigned long, const float*) - -void WebGraphicsContext3DDefaultImpl::vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset) -{ - makeContextCurrent(); - - if (m_boundArrayBuffer <= 0) { - // FIXME: raise exception. - // LogMessagef(("bufferData: no buffer bound")); - return; - } - - if (indx < NumTrackedPointerStates) { - VertexAttribPointerState& state = m_vertexAttribPointerState[indx]; - state.buffer = m_boundArrayBuffer; - state.indx = indx; - state.size = size; - state.type = type; - state.normalized = normalized; - state.stride = stride; - state.offset = offset; - } - - glVertexAttribPointer(indx, size, type, normalized, stride, - reinterpret_cast<void*>(static_cast<intptr_t>(offset))); -} - -DELEGATE_TO_GL_4(viewport, Viewport, long, long, unsigned long, unsigned long) - -unsigned WebGraphicsContext3DDefaultImpl::createBuffer() -{ - makeContextCurrent(); - GLuint o; - glGenBuffersARB(1, &o); - return o; -} - -unsigned WebGraphicsContext3DDefaultImpl::createFramebuffer() -{ - makeContextCurrent(); - GLuint o = 0; - glGenFramebuffersEXT(1, &o); - return o; -} - -unsigned WebGraphicsContext3DDefaultImpl::createProgram() -{ - makeContextCurrent(); - return glCreateProgram(); -} - -unsigned WebGraphicsContext3DDefaultImpl::createRenderbuffer() -{ - makeContextCurrent(); - GLuint o; - glGenRenderbuffersEXT(1, &o); - return o; -} - -unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType) -{ - makeContextCurrent(); - ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER); - unsigned shader = glCreateShader(shaderType); - if (shader) { - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) - delete result->second; - m_shaderSourceMap.set(shader, new ShaderSourceEntry(shaderType)); - } - - return shader; -} - -unsigned WebGraphicsContext3DDefaultImpl::createTexture() -{ - makeContextCurrent(); - GLuint o; - glGenTextures(1, &o); - return o; -} - -void WebGraphicsContext3DDefaultImpl::deleteBuffer(unsigned buffer) -{ - makeContextCurrent(); - glDeleteBuffersARB(1, &buffer); -} - -void WebGraphicsContext3DDefaultImpl::deleteFramebuffer(unsigned framebuffer) -{ - makeContextCurrent(); - glDeleteFramebuffersEXT(1, &framebuffer); -} - -void WebGraphicsContext3DDefaultImpl::deleteProgram(unsigned program) -{ - makeContextCurrent(); - glDeleteProgram(program); -} - -void WebGraphicsContext3DDefaultImpl::deleteRenderbuffer(unsigned renderbuffer) -{ - makeContextCurrent(); - glDeleteRenderbuffersEXT(1, &renderbuffer); -} - -void WebGraphicsContext3DDefaultImpl::deleteShader(unsigned shader) -{ - makeContextCurrent(); - - ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader); - if (result != m_shaderSourceMap.end()) - delete result->second; - m_shaderSourceMap.remove(result); - glDeleteShader(shader); -} - -void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture) -{ - makeContextCurrent(); - glDeleteTextures(1, &texture); -} - -bool WebGraphicsContext3DDefaultImpl::angleCreateCompilers() -{ - if (!ShInitialize()) - return false; - - ShBuiltInResources resources; - ShInitBuiltInResources(&resources); - getIntegerv(GL_MAX_VERTEX_ATTRIBS, &resources.MaxVertexAttribs); - getIntegerv(MAX_VERTEX_UNIFORM_VECTORS, &resources.MaxVertexUniformVectors); - getIntegerv(MAX_VARYING_VECTORS, &resources.MaxVaryingVectors); - getIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &resources.MaxVertexTextureImageUnits); - getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &resources.MaxCombinedTextureImageUnits); - getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &resources.MaxTextureImageUnits); - getIntegerv(MAX_FRAGMENT_UNIFORM_VECTORS, &resources.MaxFragmentUniformVectors); - // Always set to 1 for OpenGL ES. - resources.MaxDrawBuffers = 1; - - m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, &resources); - m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, &resources); - return (m_fragmentCompiler && m_vertexCompiler); -} - -void WebGraphicsContext3DDefaultImpl::angleDestroyCompilers() -{ - if (m_fragmentCompiler) { - ShDestruct(m_fragmentCompiler); - m_fragmentCompiler = 0; - } - if (m_vertexCompiler) { - ShDestruct(m_vertexCompiler); - m_vertexCompiler = 0; - } -} - -bool WebGraphicsContext3DDefaultImpl::angleValidateShaderSource(ShaderSourceEntry& entry) -{ - entry.isValid = false; - if (entry.translatedSource) { - fastFree(entry.translatedSource); - entry.translatedSource = 0; - } - if (entry.log) { - fastFree(entry.log); - entry.log = 0; - } - - ShHandle compiler = 0; - switch (entry.type) { - case GL_FRAGMENT_SHADER: - compiler = m_fragmentCompiler; - break; - case GL_VERTEX_SHADER: - compiler = m_vertexCompiler; - break; - } - if (!compiler) - return false; - - if (!ShCompile(compiler, &entry.source, 1, SH_OBJECT_CODE)) { - int logSize = 0; - ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize); - if (logSize > 1 && tryFastMalloc(logSize * sizeof(char)).getValue(entry.log)) - ShGetInfoLog(compiler, entry.log); - return false; - } - - int length = 0; - if (m_isGLES2) { - // ANGLE does not yet have a GLSL ES backend. Therefore if the - // compile succeeds we send the original source down. - length = strlen(entry.source); - if (length > 0) - ++length; // Add null terminator - } else - ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &length); - if (length > 1) { - if (!tryFastMalloc(length * sizeof(char)).getValue(entry.translatedSource)) - return false; - if (m_isGLES2) - strncpy(entry.translatedSource, entry.source, length); - else - ShGetObjectCode(compiler, entry.translatedSource); - } - entry.isValid = true; - return true; -} - -} // namespace WebKit - -#endif // ENABLE(3D_CANVAS) diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h deleted file mode 100644 index b656d0c..0000000 --- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebGraphicsContext3DDefaultImpl_h -#define WebGraphicsContext3DDefaultImpl_h - -#if ENABLE(3D_CANVAS) - -#include "GLSLANG/ShaderLang.h" -#include "WebGraphicsContext3D.h" - -#include <wtf/HashMap.h> -#include <wtf/ListHashSet.h> -#include <wtf/OwnPtr.h> - -#if !PLATFORM(CG) -#define FLIP_FRAMEBUFFER_VERTICALLY -#endif -namespace gfx { -class GLContext; -} - -namespace WebKit { - -// The default implementation of WebGL. In Chromium, using this class -// requires the sandbox to be disabled, which is strongly discouraged. -// It is provided for support of test_shell and any Chromium ports -// where an in-renderer WebGL implementation would be helpful. - -class WebGraphicsContext3DDefaultImpl : public WebGraphicsContext3D { -public: - WebGraphicsContext3DDefaultImpl(); - virtual ~WebGraphicsContext3DDefaultImpl(); - - //---------------------------------------------------------------------- - // WebGraphicsContext3D methods - virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*, bool); - virtual bool makeContextCurrent(); - - virtual int width(); - virtual int height(); - - virtual int sizeInBytes(int type); - - virtual bool isGLES2Compliant(); - - virtual void reshape(int width, int height); - - virtual bool readBackFramebuffer(unsigned char* pixels, size_t bufferSize); - - virtual unsigned int getPlatformTextureId(); - virtual void prepareTexture(); - - virtual void synthesizeGLError(unsigned long error); - virtual void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access); - virtual void unmapBufferSubDataCHROMIUM(const void*); - virtual void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access); - virtual void unmapTexSubImage2DCHROMIUM(const void*); - virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture); - - virtual WebString getRequestableExtensionsCHROMIUM(); - virtual void requestExtensionCHROMIUM(const char*); - - virtual void activeTexture(unsigned long texture); - virtual void attachShader(WebGLId program, WebGLId shader); - virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name); - virtual void bindBuffer(unsigned long target, WebGLId buffer); - virtual void bindFramebuffer(unsigned long target, WebGLId framebuffer); - virtual void bindRenderbuffer(unsigned long target, WebGLId renderbuffer); - virtual void bindTexture(unsigned long target, WebGLId texture); - virtual void blendColor(double red, double green, double blue, double alpha); - virtual void blendEquation(unsigned long mode); - virtual void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha); - virtual void blendFunc(unsigned long sfactor, unsigned long dfactor); - virtual void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha); - - virtual void bufferData(unsigned long target, int size, const void* data, unsigned long usage); - virtual void bufferSubData(unsigned long target, long offset, int size, const void* data); - - virtual unsigned long checkFramebufferStatus(unsigned long target); - virtual void clear(unsigned long mask); - virtual void clearColor(double red, double green, double blue, double alpha); - virtual void clearDepth(double depth); - virtual void clearStencil(long s); - virtual void colorMask(bool red, bool green, bool blue, bool alpha); - virtual void compileShader(WebGLId shader); - - virtual void copyTexImage2D(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border); - virtual void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height); - virtual void cullFace(unsigned long mode); - virtual void depthFunc(unsigned long func); - virtual void depthMask(bool flag); - virtual void depthRange(double zNear, double zFar); - virtual void detachShader(WebGLId program, WebGLId shader); - virtual void disable(unsigned long cap); - virtual void disableVertexAttribArray(unsigned long index); - virtual void drawArrays(unsigned long mode, long first, long count); - virtual void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset); - - virtual void enable(unsigned long cap); - virtual void enableVertexAttribArray(unsigned long index); - virtual void finish(); - virtual void flush(); - virtual void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, WebGLId renderbuffer); - virtual void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, WebGLId texture, long level); - virtual void frontFace(unsigned long mode); - virtual void generateMipmap(unsigned long target); - - virtual bool getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo&); - virtual bool getActiveUniform(WebGLId program, unsigned long index, ActiveInfo&); - - virtual void getAttachedShaders(WebGLId program, int maxCount, int* count, unsigned int* shaders); - - virtual int getAttribLocation(WebGLId program, const char* name); - - virtual void getBooleanv(unsigned long pname, unsigned char* value); - - virtual void getBufferParameteriv(unsigned long target, unsigned long pname, int* value); - - virtual Attributes getContextAttributes(); - - virtual unsigned long getError(); - - virtual bool isContextLost(); - - virtual void getFloatv(unsigned long pname, float* value); - - virtual void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value); - - virtual void getIntegerv(unsigned long pname, int* value); - - virtual void getProgramiv(WebGLId program, unsigned long pname, int* value); - - virtual WebString getProgramInfoLog(WebGLId program); - - virtual void getRenderbufferParameteriv(unsigned long target, unsigned long pname, int* value); - - virtual void getShaderiv(WebGLId shader, unsigned long pname, int* value); - - virtual WebString getShaderInfoLog(WebGLId shader); - - // TBD - // void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); - - virtual WebString getShaderSource(WebGLId shader); - virtual WebString getString(unsigned long name); - - virtual void getTexParameterfv(unsigned long target, unsigned long pname, float* value); - virtual void getTexParameteriv(unsigned long target, unsigned long pname, int* value); - - virtual void getUniformfv(WebGLId program, long location, float* value); - virtual void getUniformiv(WebGLId program, long location, int* value); - - virtual long getUniformLocation(WebGLId program, const char* name); - - virtual void getVertexAttribfv(unsigned long index, unsigned long pname, float* value); - virtual void getVertexAttribiv(unsigned long index, unsigned long pname, int* value); - - virtual long getVertexAttribOffset(unsigned long index, unsigned long pname); - - virtual void hint(unsigned long target, unsigned long mode); - virtual bool isBuffer(WebGLId buffer); - virtual bool isEnabled(unsigned long cap); - virtual bool isFramebuffer(WebGLId framebuffer); - virtual bool isProgram(WebGLId program); - virtual bool isRenderbuffer(WebGLId renderbuffer); - virtual bool isShader(WebGLId shader); - virtual bool isTexture(WebGLId texture); - virtual void lineWidth(double); - virtual void linkProgram(WebGLId program); - virtual void pixelStorei(unsigned long pname, long param); - virtual void polygonOffset(double factor, double units); - - virtual void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels); - - virtual void releaseShaderCompiler(); - virtual void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height); - virtual void sampleCoverage(double value, bool invert); - virtual void scissor(long x, long y, unsigned long width, unsigned long height); - virtual void shaderSource(WebGLId shader, const char* string); - virtual void stencilFunc(unsigned long func, long ref, unsigned long mask); - virtual void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask); - virtual void stencilMask(unsigned long mask); - virtual void stencilMaskSeparate(unsigned long face, unsigned long mask); - virtual void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass); - virtual void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass); - - virtual void texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels); - - virtual void texParameterf(unsigned target, unsigned pname, float param); - virtual void texParameteri(unsigned target, unsigned pname, int param); - - virtual void texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, const void* pixels); - - virtual void uniform1f(long location, float x); - virtual void uniform1fv(long location, int count, float* v); - virtual void uniform1i(long location, int x); - virtual void uniform1iv(long location, int count, int* v); - virtual void uniform2f(long location, float x, float y); - virtual void uniform2fv(long location, int count, float* v); - virtual void uniform2i(long location, int x, int y); - virtual void uniform2iv(long location, int count, int* v); - virtual void uniform3f(long location, float x, float y, float z); - virtual void uniform3fv(long location, int count, float* v); - virtual void uniform3i(long location, int x, int y, int z); - virtual void uniform3iv(long location, int count, int* v); - virtual void uniform4f(long location, float x, float y, float z, float w); - virtual void uniform4fv(long location, int count, float* v); - virtual void uniform4i(long location, int x, int y, int z, int w); - virtual void uniform4iv(long location, int count, int* v); - virtual void uniformMatrix2fv(long location, int count, bool transpose, const float* value); - virtual void uniformMatrix3fv(long location, int count, bool transpose, const float* value); - virtual void uniformMatrix4fv(long location, int count, bool transpose, const float* value); - - virtual void useProgram(WebGLId program); - virtual void validateProgram(WebGLId program); - - virtual void vertexAttrib1f(unsigned long indx, float x); - virtual void vertexAttrib1fv(unsigned long indx, const float* values); - virtual void vertexAttrib2f(unsigned long indx, float x, float y); - virtual void vertexAttrib2fv(unsigned long indx, const float* values); - virtual void vertexAttrib3f(unsigned long indx, float x, float y, float z); - virtual void vertexAttrib3fv(unsigned long indx, const float* values); - virtual void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w); - virtual void vertexAttrib4fv(unsigned long indx, const float* values); - virtual void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized, - unsigned long stride, unsigned long offset); - - virtual void viewport(long x, long y, unsigned long width, unsigned long height); - - // Support for buffer creation and deletion - virtual unsigned createBuffer(); - virtual unsigned createFramebuffer(); - virtual unsigned createProgram(); - virtual unsigned createRenderbuffer(); - virtual unsigned createShader(unsigned long); - virtual unsigned createTexture(); - - virtual void deleteBuffer(unsigned); - virtual void deleteFramebuffer(unsigned); - virtual void deleteProgram(unsigned); - virtual void deleteRenderbuffer(unsigned); - virtual void deleteShader(unsigned); - virtual void deleteTexture(unsigned); - -private: - WebGraphicsContext3D::Attributes m_attributes; - bool m_initialized; - bool m_renderDirectlyToWebView; - bool m_isGLES2; - bool m_haveEXTFramebufferObject; - bool m_haveEXTFramebufferMultisample; - bool m_haveANGLEFramebufferMultisample; - - unsigned int m_texture; - unsigned int m_fbo; - unsigned int m_depthStencilBuffer; - unsigned int m_cachedWidth, m_cachedHeight; - - // For multisampling - unsigned int m_multisampleFBO; - unsigned int m_multisampleDepthStencilBuffer; - unsigned int m_multisampleColorBuffer; - - // For tracking which FBO is bound - unsigned int m_boundFBO; - - // For tracking which texture is bound - unsigned int m_boundTexture; - - // FBO used for copying child texture to parent texture. - unsigned m_copyTextureToParentTextureFBO; - -#ifdef FLIP_FRAMEBUFFER_VERTICALLY - unsigned char* m_scanline; - void flipVertically(unsigned char* framebuffer, - unsigned int width, - unsigned int height); -#endif - - // Take into account the user's requested context creation attributes, in - // particular stencil and antialias, and determine which could or could - // not be honored based on the capabilities of the OpenGL implementation. - void validateAttributes(); - - // Resolve the given rectangle of the multisampled framebuffer if necessary. - void resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height); - - // Note: we aren't currently using this information, but we will - // need to in order to verify that all enabled vertex arrays have - // a valid buffer bound -- to avoid crashes on certain cards. - unsigned int m_boundArrayBuffer; - struct VertexAttribPointerState { - VertexAttribPointerState(); - - bool enabled; - unsigned long buffer; - unsigned long indx; - int size; - int type; - bool normalized; - unsigned long stride; - unsigned long offset; - }; - - enum { - NumTrackedPointerStates = 2 - }; - VertexAttribPointerState m_vertexAttribPointerState[NumTrackedPointerStates]; - - // Errors raised by synthesizeGLError(). - ListHashSet<unsigned long> m_syntheticErrors; - - OwnPtr<gfx::GLContext> m_glContext; - - // ANGLE related. - struct ShaderSourceEntry { - ShaderSourceEntry(unsigned long shaderType) - : type(shaderType) - , source(0) - , log(0) - , translatedSource(0) - , isValid(false) - { - } - - ~ShaderSourceEntry() - { - if (source) - fastFree(source); - if (log) - fastFree(log); - if (translatedSource) - fastFree(translatedSource); - } - - unsigned long type; - char* source; - char* log; - char* translatedSource; - bool isValid; - }; - - bool angleCreateCompilers(); - void angleDestroyCompilers(); - bool angleValidateShaderSource(ShaderSourceEntry& entry); - - typedef HashMap<WebGLId, ShaderSourceEntry*> ShaderSourceMap; - ShaderSourceMap m_shaderSourceMap; - - ShHandle m_fragmentCompiler; - ShHandle m_vertexCompiler; -}; - -} // namespace WebKit - -#endif // ENABLE(3D_CANVAS) - -#endif diff --git a/WebKit/chromium/src/WebHTTPBody.cpp b/WebKit/chromium/src/WebHTTPBody.cpp deleted file mode 100644 index f32b64f..0000000 --- a/WebKit/chromium/src/WebHTTPBody.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebHTTPBody.h" - -#include "FormData.h" - -using namespace WebCore; - -namespace WebKit { - -class WebHTTPBodyPrivate : public FormData { -}; - -void WebHTTPBody::initialize() -{ - assign(static_cast<WebHTTPBodyPrivate*>(FormData::create().releaseRef())); -} - -void WebHTTPBody::reset() -{ - assign(0); -} - -void WebHTTPBody::assign(const WebHTTPBody& other) -{ - WebHTTPBodyPrivate* p = const_cast<WebHTTPBodyPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -size_t WebHTTPBody::elementCount() const -{ - ASSERT(!isNull()); - return m_private->elements().size(); -} - -bool WebHTTPBody::elementAt(size_t index, Element& result) const -{ - ASSERT(!isNull()); - - if (index >= m_private->elements().size()) - return false; - - const FormDataElement& element = m_private->elements()[index]; - - result.data.reset(); - result.filePath.reset(); - result.fileStart = 0; - result.fileLength = 0; - result.modificationTime = 0.0; - result.blobURL = KURL(); - - switch (element.m_type) { - case FormDataElement::data: - result.type = Element::TypeData; - result.data.assign(element.m_data.data(), element.m_data.size()); - break; - case FormDataElement::encodedFile: - result.type = Element::TypeFile; - result.filePath = element.m_filename; -#if ENABLE(BLOB) - result.fileStart = element.m_fileStart; - result.fileLength = element.m_fileLength; - result.modificationTime = element.m_expectedFileModificationTime; -#endif - break; -#if ENABLE(BLOB) - case FormDataElement::encodedBlob: - result.type = Element::TypeBlob; - result.blobURL = element.m_blobURL; - break; -#endif - default: - ASSERT_NOT_REACHED(); - return false; - } - - return true; -} - -void WebHTTPBody::appendData(const WebData& data) -{ - ensureMutable(); - // FIXME: FormDataElement::m_data should be a SharedBuffer<char>. Then we - // could avoid this buffer copy. - m_private->appendData(data.data(), data.size()); -} - -void WebHTTPBody::appendFile(const WebString& filePath) -{ - ensureMutable(); - m_private->appendFile(filePath); -} - -void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart, long long fileLength, double modificationTime) -{ -#if ENABLE(BLOB) - ensureMutable(); - m_private->appendFileRange(filePath, fileStart, fileLength, modificationTime); -#endif -} - -void WebHTTPBody::appendBlob(const WebURL& blobURL) -{ -#if ENABLE(BLOB) - ensureMutable(); - m_private->appendBlob(blobURL); -#endif -} - -long long WebHTTPBody::identifier() const -{ - ASSERT(!isNull()); - return m_private->identifier(); -} - -void WebHTTPBody::setIdentifier(long long identifier) -{ - ensureMutable(); - return m_private->setIdentifier(identifier); -} - -WebHTTPBody::WebHTTPBody(const PassRefPtr<FormData>& data) - : m_private(static_cast<WebHTTPBodyPrivate*>(data.releaseRef())) -{ -} - -WebHTTPBody& WebHTTPBody::operator=(const PassRefPtr<FormData>& data) -{ - assign(static_cast<WebHTTPBodyPrivate*>(data.releaseRef())); - return *this; -} - -WebHTTPBody::operator PassRefPtr<FormData>() const -{ - return m_private; -} - -void WebHTTPBody::assign(WebHTTPBodyPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -void WebHTTPBody::ensureMutable() -{ - ASSERT(!isNull()); - if (!m_private->hasOneRef()) - assign(static_cast<WebHTTPBodyPrivate*>(m_private->copy().releaseRef())); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebHTTPLoadInfo.cpp b/WebKit/chromium/src/WebHTTPLoadInfo.cpp deleted file mode 100644 index 876a489..0000000 --- a/WebKit/chromium/src/WebHTTPLoadInfo.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebHTTPLoadInfo.h" - -#include "ResourceLoadInfo.h" -#include "ResourceResponse.h" -#include "WebHTTPHeaderVisitor.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -void WebHTTPLoadInfo::initialize() -{ - m_private = adoptRef(new ResourceLoadInfo()); -} - -void WebHTTPLoadInfo::reset() -{ - m_private.reset(); -} - -void WebHTTPLoadInfo::assign(const WebHTTPLoadInfo& r) -{ - m_private = r.m_private; -} - -WebHTTPLoadInfo::WebHTTPLoadInfo(WTF::PassRefPtr<WebCore::ResourceLoadInfo> value) -{ - m_private = value; -} - -WebHTTPLoadInfo::operator WTF::PassRefPtr<WebCore::ResourceLoadInfo>() const -{ - return m_private.get(); -} - -int WebHTTPLoadInfo::httpStatusCode() const -{ - ASSERT(!m_private.isNull()); - return m_private->httpStatusCode; -} - -void WebHTTPLoadInfo::setHTTPStatusCode(int statusCode) -{ - ASSERT(!m_private.isNull()); - m_private->httpStatusCode = statusCode; -} - -WebString WebHTTPLoadInfo::httpStatusText() const -{ - ASSERT(!m_private.isNull()); - return m_private->httpStatusText; -} - -void WebHTTPLoadInfo::setHTTPStatusText(const WebString& statusText) -{ - ASSERT(!m_private.isNull()); - m_private->httpStatusText = statusText; -} - -static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString& value) -{ - pair<HTTPHeaderMap::iterator, bool> result = map->add(name, value); - if (!result.second) - result.first->second += String("\n") + value; -} - -void WebHTTPLoadInfo::addRequestHeader(const WebString& name, const WebString& value) -{ - ASSERT(!m_private.isNull()); - addHeader(&m_private->requestHeaders, name, value); -} - -void WebHTTPLoadInfo::addResponseHeader(const WebString& name, const WebString& value) -{ - ASSERT(!m_private.isNull()); - addHeader(&m_private->responseHeaders, name, value); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebHistoryItem.cpp b/WebKit/chromium/src/WebHistoryItem.cpp deleted file mode 100644 index 99ebce8..0000000 --- a/WebKit/chromium/src/WebHistoryItem.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebHistoryItem.h" - -#include "FormData.h" -#include "HistoryItem.h" -#include "KURL.h" - -#include "WebHTTPBody.h" -#include "WebPoint.h" -#include "WebSerializedScriptValue.h" -#include "WebString.h" -#include "WebVector.h" - -using namespace WebCore; - -namespace WebKit { - -void WebHistoryItem::initialize() -{ - m_private = HistoryItem::create(); -} - -void WebHistoryItem::reset() -{ - m_private.reset(); -} - -void WebHistoryItem::assign(const WebHistoryItem& other) -{ - m_private = other.m_private; -} - -WebString WebHistoryItem::urlString() const -{ - return m_private->urlString(); -} - -void WebHistoryItem::setURLString(const WebString& url) -{ - ensureMutable(); - m_private->setURLString(KURL(ParsedURLString, url).string()); -} - -WebString WebHistoryItem::originalURLString() const -{ - return m_private->originalURLString(); -} - -void WebHistoryItem::setOriginalURLString(const WebString& originalURLString) -{ - ensureMutable(); - m_private->setOriginalURLString(originalURLString); -} - -WebString WebHistoryItem::referrer() const -{ - return m_private->referrer(); -} - -void WebHistoryItem::setReferrer(const WebString& referrer) -{ - ensureMutable(); - m_private->setReferrer(referrer); -} - -WebString WebHistoryItem::target() const -{ - return m_private->target(); -} - -void WebHistoryItem::setTarget(const WebString& target) -{ - ensureMutable(); - m_private->setTarget(target); -} - -WebString WebHistoryItem::parent() const -{ - return m_private->parent(); -} - -void WebHistoryItem::setParent(const WebString& parent) -{ - ensureMutable(); - m_private->setParent(parent); -} - -WebString WebHistoryItem::title() const -{ - return m_private->title(); -} - -void WebHistoryItem::setTitle(const WebString& title) -{ - ensureMutable(); - m_private->setTitle(title); -} - -WebString WebHistoryItem::alternateTitle() const -{ - return m_private->alternateTitle(); -} - -void WebHistoryItem::setAlternateTitle(const WebString& alternateTitle) -{ - ensureMutable(); - m_private->setAlternateTitle(alternateTitle); -} - -double WebHistoryItem::lastVisitedTime() const -{ - return m_private->lastVisitedTime(); -} - -void WebHistoryItem::setLastVisitedTime(double lastVisitedTime) -{ - ensureMutable(); - // FIXME: setLastVisitedTime increments the visit count, so we have to - // correct for that. Instead, we should have a back-door to just mutate - // the last visited time directly. - int count = m_private->visitCount(); - m_private->setLastVisitedTime(lastVisitedTime); - m_private->setVisitCount(count); -} - -WebPoint WebHistoryItem::scrollOffset() const -{ - return m_private->scrollPoint(); -} - -void WebHistoryItem::setScrollOffset(const WebPoint& scrollOffset) -{ - ensureMutable(); - m_private->setScrollPoint(scrollOffset); -} - -bool WebHistoryItem::isTargetItem() const -{ - return m_private->isTargetItem(); -} - -void WebHistoryItem::setIsTargetItem(bool isTargetItem) -{ - ensureMutable(); - m_private->setIsTargetItem(isTargetItem); -} - -int WebHistoryItem::visitCount() const -{ - return m_private->visitCount(); -} - -void WebHistoryItem::setVisitCount(int count) -{ - ensureMutable(); - m_private->setVisitCount(count); -} - -WebVector<WebString> WebHistoryItem::documentState() const -{ - return m_private->documentState(); -} - -void WebHistoryItem::setDocumentState(const WebVector<WebString>& state) -{ - ensureMutable(); - // FIXME: would be nice to avoid the intermediate copy - Vector<String> ds; - for (size_t i = 0; i < state.size(); ++i) - ds.append(state[i]); - m_private->setDocumentState(ds); -} - -long long WebHistoryItem::itemSequenceNumber() const -{ - return m_private->itemSequenceNumber(); -} - -void WebHistoryItem::setItemSequenceNumber(long long itemSequenceNumber) -{ - ensureMutable(); - m_private->setItemSequenceNumber(itemSequenceNumber); -} - -long long WebHistoryItem::documentSequenceNumber() const -{ - return m_private->documentSequenceNumber(); -} - -void WebHistoryItem::setDocumentSequenceNumber(long long documentSequenceNumber) -{ - ensureMutable(); - m_private->setDocumentSequenceNumber(documentSequenceNumber); -} - -WebSerializedScriptValue WebHistoryItem::stateObject() const -{ - return WebSerializedScriptValue(m_private->stateObject()); -} - -void WebHistoryItem::setStateObject(const WebSerializedScriptValue& object) -{ - ensureMutable(); - m_private->setStateObject(object); -} - -WebString WebHistoryItem::httpContentType() const -{ - return m_private->formContentType(); -} - -void WebHistoryItem::setHTTPContentType(const WebString& httpContentType) -{ - ensureMutable(); - m_private->setFormContentType(httpContentType); -} - -WebHTTPBody WebHistoryItem::httpBody() const -{ - return WebHTTPBody(m_private->formData()); -} - -void WebHistoryItem::setHTTPBody(const WebHTTPBody& httpBody) -{ - ensureMutable(); - m_private->setFormData(httpBody); -} - -WebVector<WebHistoryItem> WebHistoryItem::children() const -{ - return m_private->children(); -} - -void WebHistoryItem::setChildren(const WebVector<WebHistoryItem>& items) -{ - ensureMutable(); - m_private->clearChildren(); - for (size_t i = 0; i < items.size(); ++i) - m_private->addChildItem(items[i]); -} - -void WebHistoryItem::appendToChildren(const WebHistoryItem& item) -{ - ensureMutable(); - m_private->addChildItem(item); -} - -WebHistoryItem::WebHistoryItem(const PassRefPtr<HistoryItem>& item) - : m_private(item) -{ -} - -WebHistoryItem& WebHistoryItem::operator=(const PassRefPtr<HistoryItem>& item) -{ - m_private = item; - return *this; -} - -WebHistoryItem::operator PassRefPtr<HistoryItem>() const -{ - return m_private.get(); -} - -void WebHistoryItem::ensureMutable() -{ - if (!m_private->hasOneRef()) - m_private = m_private->copy(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp deleted file mode 100644 index 14ed02e..0000000 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBCallbacksImpl.h" - -#include "IDBCallbacks.h" -#include "IDBCursorBackendProxy.h" -#include "IDBDatabaseError.h" -#include "IDBDatabaseProxy.h" -#include "IDBIndexBackendProxy.h" -#include "IDBKey.h" -#include "IDBObjectStoreProxy.h" -#include "IDBTransactionBackendProxy.h" -#include "WebIDBCallbacks.h" -#include "WebIDBDatabase.h" -#include "WebIDBDatabaseError.h" -#include "WebIDBIndex.h" -#include "WebIDBKey.h" -#include "WebIDBObjectStore.h" -#include "WebIDBTransaction.h" -#include "WebSerializedScriptValue.h" - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -WebIDBCallbacksImpl::WebIDBCallbacksImpl(PassRefPtr<IDBCallbacks> callbacks) - : m_callbacks(callbacks) -{ -} - -WebIDBCallbacksImpl::~WebIDBCallbacksImpl() -{ -} - -void WebIDBCallbacksImpl::onError(const WebKit::WebIDBDatabaseError& error) -{ - m_callbacks->onError(error); -} - -void WebIDBCallbacksImpl::onSuccess() -{ - m_callbacks->onSuccess(); -} - -void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBCursor* cursor) -{ - m_callbacks->onSuccess(IDBCursorBackendProxy::create(cursor)); -} - -void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBDatabase* webKitInstance) -{ - m_callbacks->onSuccess(IDBDatabaseProxy::create(webKitInstance)); -} - -void WebIDBCallbacksImpl::onSuccess(const WebKit::WebIDBKey& key) -{ - m_callbacks->onSuccess(key); -} - -void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBIndex* webKitInstance) -{ - m_callbacks->onSuccess(IDBIndexBackendProxy::create(webKitInstance)); -} - -void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBObjectStore* webKitInstance) -{ - m_callbacks->onSuccess(IDBObjectStoreProxy::create(webKitInstance)); -} - -void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBTransaction* webKitInstance) -{ - m_callbacks->onSuccess(IDBTransactionBackendProxy::create(webKitInstance)); -} - -void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue) -{ - m_callbacks->onSuccess(serializedScriptValue); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.h b/WebKit/chromium/src/WebIDBCallbacksImpl.h deleted file mode 100644 index 33a72f4..0000000 --- a/WebKit/chromium/src/WebIDBCallbacksImpl.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBCallbacksImpl_h -#define WebIDBCallbacksImpl_h - -#include "WebIDBCallbacks.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -namespace WebCore { - -class IDBCallbacks; - -class WebIDBCallbacksImpl : public WebKit::WebIDBCallbacks { -public: - WebIDBCallbacksImpl(PassRefPtr<IDBCallbacks>); - virtual ~WebIDBCallbacksImpl(); - - virtual void onError(const WebKit::WebIDBDatabaseError&); - virtual void onSuccess(); // For "null". - virtual void onSuccess(WebKit::WebIDBCursor*); - virtual void onSuccess(WebKit::WebIDBDatabase*); - virtual void onSuccess(const WebKit::WebIDBKey&); - virtual void onSuccess(WebKit::WebIDBIndex*); - virtual void onSuccess(WebKit::WebIDBObjectStore*); - virtual void onSuccess(WebKit::WebIDBTransaction*); - virtual void onSuccess(const WebKit::WebSerializedScriptValue&); - -private: - RefPtr<IDBCallbacks> m_callbacks; -}; - -} // namespace WebCore - -#endif - -#endif // WebIDBCallbacksImpl_h diff --git a/WebKit/chromium/src/WebIDBCursorImpl.cpp b/WebKit/chromium/src/WebIDBCursorImpl.cpp deleted file mode 100644 index 5165574..0000000 --- a/WebKit/chromium/src/WebIDBCursorImpl.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBCursorImpl.h" - -#include "IDBAny.h" -#include "IDBCallbacksProxy.h" -#include "IDBCursorBackendInterface.h" -#include "IDBKey.h" -#include "WebIDBKey.h" - -using namespace WebCore; - -namespace WebKit { - -WebIDBCursorImpl::WebIDBCursorImpl(PassRefPtr<IDBCursorBackendInterface> idbCursorBackend) - : m_idbCursorBackend(idbCursorBackend) -{ -} - -WebIDBCursorImpl::~WebIDBCursorImpl() -{ -} - -unsigned short WebIDBCursorImpl::direction() const -{ - return m_idbCursorBackend->direction(); -} - -WebIDBKey WebIDBCursorImpl::key() const -{ - return WebIDBKey(m_idbCursorBackend->key()); -} - -void WebIDBCursorImpl::value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const -{ - // Verify we're starting off with blank slates. - ASSERT(serializedScriptValue.isNull()); - ASSERT(idbKey.type() == WebIDBKey::InvalidType); - - RefPtr<IDBAny> any = m_idbCursorBackend->value(); - if (any->type() == IDBAny::SerializedScriptValueType) - serializedScriptValue.assign(any->serializedScriptValue()); - else if (any->type() == IDBAny::IDBKeyType) - idbKey.assign(any->idbKey()); - else - ASSERT_NOT_REACHED(); -} - -void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode& ec) -{ - m_idbCursorBackend->update(value, IDBCallbacksProxy::create(callbacks), ec); -} - -void WebIDBCursorImpl::continueFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, WebExceptionCode& ec) -{ - m_idbCursorBackend->continueFunction(key, IDBCallbacksProxy::create(callbacks), ec); -} - -void WebIDBCursorImpl::deleteFunction(WebIDBCallbacks* callbacks, WebExceptionCode& ec) -{ - m_idbCursorBackend->deleteFunction(IDBCallbacksProxy::create(callbacks), ec); -} - -} // namespace WebCore diff --git a/WebKit/chromium/src/WebIDBCursorImpl.h b/WebKit/chromium/src/WebIDBCursorImpl.h deleted file mode 100644 index 7f8ebd7..0000000 --- a/WebKit/chromium/src/WebIDBCursorImpl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBCursorImpl_h -#define WebIDBCursorImpl_h - -#include "WebCommon.h" -#include "WebExceptionCode.h" -#include "WebIDBCursor.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { class IDBCursorBackendInterface; } - -namespace WebKit { - -// See comment in WebIndexedObjectStore for a high level overview these classes. -class WebIDBCursorImpl : public WebIDBCursor { -public: - WebIDBCursorImpl(WTF::PassRefPtr<WebCore::IDBCursorBackendInterface>); - virtual ~WebIDBCursorImpl(); - - virtual unsigned short direction() const; - virtual WebIDBKey key() const; - virtual void value(WebSerializedScriptValue&, WebIDBKey&) const; - virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&); - virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&); - virtual void deleteFunction(WebIDBCallbacks*, WebExceptionCode&); - - private: - WTF::RefPtr<WebCore::IDBCursorBackendInterface> m_idbCursorBackend; -}; - -} // namespace WebKit - -#endif // WebIDBCursorImpl_h diff --git a/WebKit/chromium/src/WebIDBDatabaseError.cpp b/WebKit/chromium/src/WebIDBDatabaseError.cpp deleted file mode 100644 index 7413ae6..0000000 --- a/WebKit/chromium/src/WebIDBDatabaseError.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBDatabaseError.h" - -#include "IDBDatabaseError.h" -#include "WebString.h" - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace WebKit { - -void WebIDBDatabaseError::assign(const WebIDBDatabaseError& value) -{ - m_private = value.m_private; -} - -void WebIDBDatabaseError::assign(unsigned short code, const WebString& message) -{ - m_private = IDBDatabaseError::createWithoutOffset(code, message); -} - -void WebIDBDatabaseError::reset() -{ - m_private.reset(); -} - -unsigned short WebIDBDatabaseError::code() const -{ - return m_private->code(); -} - -WebString WebIDBDatabaseError::message() const -{ - return m_private->message(); -} - -WebIDBDatabaseError::WebIDBDatabaseError(const PassRefPtr<IDBDatabaseError>& value) - : m_private(value) -{ -} - -WebIDBDatabaseError& WebIDBDatabaseError::operator=(const PassRefPtr<IDBDatabaseError>& value) -{ - m_private = value; - return *this; -} - -WebIDBDatabaseError::operator PassRefPtr<IDBDatabaseError>() const -{ - return m_private.get(); -} - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp deleted file mode 100644 index fa7a200..0000000 --- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBDatabaseImpl.h" - -#include "DOMStringList.h" -#include "IDBCallbacksProxy.h" -#include "IDBDatabaseBackendInterface.h" -#include "IDBTransactionBackendInterface.h" -#include "WebIDBCallbacks.h" -#include "WebIDBObjectStoreImpl.h" -#include "WebIDBTransactionImpl.h" - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace WebKit { - -WebIDBDatabaseImpl::WebIDBDatabaseImpl(PassRefPtr<IDBDatabaseBackendInterface> databaseBackend) - : m_databaseBackend(databaseBackend) -{ -} - -WebIDBDatabaseImpl::~WebIDBDatabaseImpl() -{ -} - -WebString WebIDBDatabaseImpl::name() const -{ - return m_databaseBackend->name(); -} - -WebString WebIDBDatabaseImpl::version() const -{ - return m_databaseBackend->version(); -} - -WebDOMStringList WebIDBDatabaseImpl::objectStoreNames() const -{ - return m_databaseBackend->objectStoreNames(); -} - -WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - RefPtr<IDBObjectStoreBackendInterface> objectStore = m_databaseBackend->createObjectStore(name, keyPath, autoIncrement, transaction.getIDBTransactionBackendInterface(), ec); - if (!objectStore) { - ASSERT(ec); - return 0; - } - return new WebIDBObjectStoreImpl(objectStore); -} - -void WebIDBDatabaseImpl::deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_databaseBackend->deleteObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode& ec) -{ - m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks), ec); -} - -WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode& ec) -{ - RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names); - RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout, ec); - if (!transaction) { - ASSERT(ec); - return 0; - } - return new WebIDBTransactionImpl(transaction); -} - -void WebIDBDatabaseImpl::close() -{ - m_databaseBackend->close(); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h deleted file mode 100644 index 64e0b2e..0000000 --- a/WebKit/chromium/src/WebIDBDatabaseImpl.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBDatabaseImpl_h -#define WebIDBDatabaseImpl_h - -#include "WebCommon.h" -#include "WebExceptionCode.h" -#include "WebIDBDatabase.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { class IDBDatabaseBackendInterface; } - -namespace WebKit { - -class WebIDBObjectStore; -class WebIDBTransaction; - -// See comment in WebIDBFactory for a high level overview these classes. -class WebIDBDatabaseImpl : public WebIDBDatabase { -public: - WebIDBDatabaseImpl(WTF::PassRefPtr<WebCore::IDBDatabaseBackendInterface>); - virtual ~WebIDBDatabaseImpl(); - - virtual WebString name() const; - virtual WebString version() const; - virtual WebDOMStringList objectStoreNames() const; - - virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&); - virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); - virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&); - virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&); - virtual void close(); - -private: - WTF::RefPtr<WebCore::IDBDatabaseBackendInterface> m_databaseBackend; -}; - -} // namespace WebKit - -#endif // WebIDBDatabaseImpl_h diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp deleted file mode 100755 index a509076..0000000 --- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBFactoryImpl.h" - -#include "DOMStringList.h" -#include "IDBCallbacksProxy.h" -#include "IDBFactoryBackendImpl.h" -#include "SecurityOrigin.h" -#include "WebIDBDatabaseError.h" -#include <wtf/OwnPtr.h> - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace WebKit { - -WebIDBFactory* WebIDBFactory::create() -{ - return new WebIDBFactoryImpl(); -} - -WebIDBFactoryImpl::WebIDBFactoryImpl() - : m_idbFactoryBackend(WebCore::IDBFactoryBackendImpl::create()) -{ -} - -WebIDBFactoryImpl::~WebIDBFactoryImpl() -{ -} - -void WebIDBFactoryImpl::open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir, unsigned long long maximumSize) -{ - m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir, maximumSize); -} - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h deleted file mode 100755 index 9ed6e3f..0000000 --- a/WebKit/chromium/src/WebIDBFactoryImpl.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBFactoryImpl_h -#define WebIDBFactoryImpl_h - -#include "WebDOMStringList.h" -#include "WebIDBFactory.h" -#include <wtf/RefPtr.h> - -namespace WebCore { class IDBFactoryBackendInterface; } - -namespace WebKit { - -class WebIDBFactoryImpl : public WebIDBFactory { -public: - WebIDBFactoryImpl(); - virtual ~WebIDBFactoryImpl(); - - virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize); - -private: - WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend; -}; - -} // namespace WebKit - -#endif // WebIDBFactoryImpl_h diff --git a/WebKit/chromium/src/WebIDBIndexImpl.cpp b/WebKit/chromium/src/WebIDBIndexImpl.cpp deleted file mode 100644 index 6e8e1f2..0000000 --- a/WebKit/chromium/src/WebIDBIndexImpl.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBIndexImpl.h" - -#include "IDBCallbacksProxy.h" -#include "IDBIndex.h" -#include "IDBKeyRange.h" -#include "WebIDBCallbacks.h" -#include "WebIDBKey.h" -#include "WebIDBKeyRange.h" - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace WebKit { - -WebIDBIndexImpl::WebIDBIndexImpl(PassRefPtr<IDBIndexBackendInterface> backend) - : m_backend(backend) -{ -} - -WebIDBIndexImpl::~WebIDBIndexImpl() -{ -} - -WebString WebIDBIndexImpl::name() const -{ - return m_backend->name(); -} - -WebString WebIDBIndexImpl::storeName() const -{ - return m_backend->storeName(); -} - -WebString WebIDBIndexImpl::keyPath() const -{ - return m_backend->keyPath(); -} - -bool WebIDBIndexImpl::unique() const -{ - return m_backend->unique(); -} - -void WebIDBIndexImpl::openObjectCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_backend->openCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBIndexImpl::openKeyCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_backend->openKeyCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBIndexImpl::getObject(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_backend->get(keyRange, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBIndexImpl::getKey(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_backend->getKey(keyRange, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBIndexImpl.h b/WebKit/chromium/src/WebIDBIndexImpl.h deleted file mode 100644 index f68da7f..0000000 --- a/WebKit/chromium/src/WebIDBIndexImpl.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBIndexImpl_h -#define WebIDBIndexImpl_h - -#include "WebCommon.h" -#include "WebIDBIndex.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { class IDBIndexBackendInterface; } - -namespace WebKit { - -// See comment in WebIndexedDatabase for a high level overview these classes. -class WebIDBIndexImpl : public WebIDBIndex { -public: - WebIDBIndexImpl(WTF::PassRefPtr<WebCore::IDBIndexBackendInterface>); - virtual ~WebIDBIndexImpl(); - - virtual WebString name() const; - virtual WebString storeName() const; - virtual WebString keyPath() const; - virtual bool unique() const; - - virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - -private: - WTF::RefPtr<WebCore::IDBIndexBackendInterface> m_backend; -}; - -} // namespace WebKit - -#endif // WebIDBIndexImpl_h diff --git a/WebKit/chromium/src/WebIDBKey.cpp b/WebKit/chromium/src/WebIDBKey.cpp deleted file mode 100644 index 7e84df1..0000000 --- a/WebKit/chromium/src/WebIDBKey.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBKey.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBBindingUtilities.h" -#include "IDBKey.h" -#include "IDBKeyPath.h" -#include "SerializedScriptValue.h" -#include "WebIDBKeyPath.h" -#include "WebSerializedScriptValue.h" - -using namespace WebCore; - -namespace WebKit { - -WebIDBKey WebIDBKey::createNull() -{ - WebIDBKey key; - key.assignNull(); - return key; -} - -WebIDBKey WebIDBKey::createString(const WebString& string) -{ - WebIDBKey key; - key.assignString(string); - return key; -} - -WebIDBKey WebIDBKey::createDate(double date) -{ - WebIDBKey key; - key.assignDate(date); - return key; -} - -WebIDBKey WebIDBKey::createNumber(double number) -{ - WebIDBKey key; - key.assignNumber(number); - return key; -} - -WebIDBKey WebIDBKey::createInvalid() -{ - WebIDBKey key; - key.assignInvalid(); - return key; -} - -WebIDBKey WebIDBKey::createFromValueAndKeyPath(const WebSerializedScriptValue& serializedScriptValue, const WebIDBKeyPath& idbKeyPath) -{ - if (serializedScriptValue.isNull()) - return WebIDBKey::createInvalid(); - return WebCore::createIDBKeyFromSerializedValueAndKeyPath(serializedScriptValue, idbKeyPath); -} - -void WebIDBKey::assign(const WebIDBKey& value) -{ - m_private = value.m_private; -} - -void WebIDBKey::assignNull() -{ - m_private = IDBKey::createNull(); -} - -void WebIDBKey::assignString(const WebString& string) -{ - m_private = IDBKey::createString(string); -} - -void WebIDBKey::assignDate(double date) -{ - m_private = IDBKey::createDate(date); -} - -void WebIDBKey::assignNumber(double number) -{ - m_private = IDBKey::createNumber(number); -} - -void WebIDBKey::assignInvalid() -{ - m_private = 0; -} - -void WebIDBKey::reset() -{ - m_private.reset(); -} - -WebIDBKey::Type WebIDBKey::type() const -{ - if (!m_private.get()) - return InvalidType; - return Type(m_private->type()); -} - -WebString WebIDBKey::string() const -{ - return m_private->string(); -} - -double WebIDBKey::date() const -{ - return m_private->date(); -} - -double WebIDBKey::number() const -{ - return m_private->number(); -} - -WebIDBKey::WebIDBKey(const PassRefPtr<IDBKey>& value) - : m_private(value) -{ -} - -WebIDBKey& WebIDBKey::operator=(const PassRefPtr<IDBKey>& value) -{ - m_private = value; - return *this; -} - -WebIDBKey::operator PassRefPtr<IDBKey>() const -{ - return m_private.get(); -} - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBKeyPath.cpp b/WebKit/chromium/src/WebIDBKeyPath.cpp deleted file mode 100644 index 9eb33d6..0000000 --- a/WebKit/chromium/src/WebIDBKeyPath.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBKeyPath.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBKeyPath.h" -#include "WebString.h" -#include "WebVector.h" -#include <wtf/Vector.h> - -using namespace WebCore; - -namespace WebKit { - -WebIDBKeyPath WebIDBKeyPath::create(const WebString& keyPath) -{ - WTF::Vector<IDBKeyPathElement> idbElements; - IDBKeyPathParseError idbError; - IDBParseKeyPath(keyPath, idbElements, idbError); - return WebIDBKeyPath(idbElements, static_cast<int>(idbError)); -} - -WebIDBKeyPath::WebIDBKeyPath(const WTF::Vector<IDBKeyPathElement>& elements, int parseError) - : m_private(new WTF::Vector<IDBKeyPathElement>(elements)) - , m_parseError(parseError) -{ -} - -int WebIDBKeyPath::parseError() const -{ - return m_parseError; -} - -void WebIDBKeyPath::assign(const WebIDBKeyPath& keyPath) -{ - m_parseError = keyPath.m_parseError; - m_private.reset(new WTF::Vector<IDBKeyPathElement>(keyPath)); -} - -void WebIDBKeyPath::reset() -{ - m_private.reset(0); -} - -WebIDBKeyPath::operator const WTF::Vector<WebCore::IDBKeyPathElement, 0>&() const -{ - return *m_private.get(); -} - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBKeyRange.cpp b/WebKit/chromium/src/WebIDBKeyRange.cpp deleted file mode 100644 index 517ff00..0000000 --- a/WebKit/chromium/src/WebIDBKeyRange.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBKeyRange.h" - -#include "IDBKey.h" -#include "IDBKeyRange.h" -#include "WebIDBKey.h" - -using WebCore::IDBKeyRange; - -namespace WebKit { - -void WebIDBKeyRange::assign(const WebIDBKeyRange& other) -{ - m_private = other.m_private; -} - -void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) -{ - if (lower.type() == WebIDBKey::InvalidType && upper.type() == WebIDBKey::InvalidType) - m_private = 0; - else - m_private = IDBKeyRange::create(lower, upper, lowerOpen, upperOpen); -} - -void WebIDBKeyRange::reset() -{ - m_private.reset(); -} - -WebIDBKey WebIDBKeyRange::lower() const -{ - if (!m_private.get()) - return WebIDBKey::createInvalid(); - return m_private->lower(); -} - -WebIDBKey WebIDBKeyRange::upper() const -{ - if (!m_private.get()) - return WebIDBKey::createInvalid(); - return m_private->upper(); -} - -bool WebIDBKeyRange::lowerOpen() const -{ - return m_private.get() && m_private->lowerOpen(); -} - -bool WebIDBKeyRange::upperOpen() const -{ - return m_private.get() && m_private->upperOpen(); -} - -WebIDBKeyRange::WebIDBKeyRange(const PassRefPtr<IDBKeyRange>& value) - : m_private(value) -{ -} - -WebIDBKeyRange& WebIDBKeyRange::operator=(const PassRefPtr<IDBKeyRange>& value) -{ - m_private = value; - return *this; -} - -WebIDBKeyRange::operator PassRefPtr<IDBKeyRange>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp deleted file mode 100755 index 0503ede..0000000 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBObjectStoreImpl.h" - -#include "DOMStringList.h" -#include "IDBCallbacksProxy.h" -#include "IDBKeyRange.h" -#include "IDBObjectStoreBackendInterface.h" -#include "WebIDBIndexImpl.h" -#include "WebIDBKey.h" -#include "WebIDBKeyRange.h" -#include "WebIDBTransaction.h" -#include "WebSerializedScriptValue.h" - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace WebKit { - -WebIDBObjectStoreImpl::WebIDBObjectStoreImpl(PassRefPtr<IDBObjectStoreBackendInterface> objectStore) - : m_objectStore(objectStore) -{ -} - -WebIDBObjectStoreImpl::~WebIDBObjectStoreImpl() -{ -} - -WebString WebIDBObjectStoreImpl::name() const -{ - return m_objectStore->name(); -} - -WebString WebIDBObjectStoreImpl::keyPath() const -{ - return m_objectStore->keyPath(); -} - -WebDOMStringList WebIDBObjectStoreImpl::indexNames() const -{ - return m_objectStore->indexNames(); -} - -void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBObjectStoreImpl::deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_objectStore->deleteFunction(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -WebIDBIndex* WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - RefPtr<IDBIndexBackendInterface> index = m_objectStore->createIndex(name, keyPath, unique, transaction.getIDBTransactionBackendInterface(), ec); - if (!index) - return 0; - return new WebIDBIndexImpl(index); -} - -WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name, WebExceptionCode& ec) -{ - RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name, ec); - if (!index) - return 0; - return new WebIDBIndexImpl(index); -} - -void WebIDBObjectStoreImpl::deleteIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_objectStore->deleteIndex(name, transaction.getIDBTransactionBackendInterface(), ec); -} - -void WebIDBObjectStoreImpl::openCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) -{ - m_objectStore->openCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h deleted file mode 100755 index f9cd776..0000000 --- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBObjectStoreImpl_h -#define WebIDBObjectStoreImpl_h - -#include "WebCommon.h" -#include "WebIDBObjectStore.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { class IDBObjectStoreBackendInterface; } - -namespace WebKit { - -class WebIDBIndex; - -// See comment in WebIndexedObjectStore for a high level overview these classes. -class WebIDBObjectStoreImpl : public WebIDBObjectStore { -public: - WebIDBObjectStoreImpl(WTF::PassRefPtr<WebCore::IDBObjectStoreBackendInterface>); - ~WebIDBObjectStoreImpl(); - - WebString name() const; - WebString keyPath() const; - WebDOMStringList indexNames() const; - - void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - void put(const WebSerializedScriptValue&, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - void deleteFunction(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - - WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&); - WebIDBIndex* index(const WebString& name, WebExceptionCode&); - void deleteIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&); - - void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&); - - private: - WTF::RefPtr<WebCore::IDBObjectStoreBackendInterface> m_objectStore; -}; - -} // namespace WebKit - -#endif // WebIDBObjectStoreImpl_h diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp deleted file mode 100644 index 96924cf..0000000 --- a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBTransactionCallbacksImpl.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBTransactionCallbacks.h" - -namespace WebCore { - -WebIDBTransactionCallbacksImpl::WebIDBTransactionCallbacksImpl(PassRefPtr<IDBTransactionCallbacks> callbacks) - : m_callbacks(callbacks) -{ -} - -WebIDBTransactionCallbacksImpl::~WebIDBTransactionCallbacksImpl() -{ -} - -void WebIDBTransactionCallbacksImpl::onAbort() -{ - m_callbacks->onAbort(); -} - -void WebIDBTransactionCallbacksImpl::onComplete() -{ - m_callbacks->onComplete(); -} - -void WebIDBTransactionCallbacksImpl::onTimeout() -{ - m_callbacks->onTimeout(); -} - -} // namespace WebCore - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h deleted file mode 100644 index 89b9cbe..0000000 --- a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBTransactionCallbacksImpl_h -#define WebIDBTransactionCallbacksImpl_h - -#if ENABLE(INDEXED_DATABASE) - -#include "WebIDBTransactionCallbacks.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { - -class IDBTransactionCallbacks; - -class WebIDBTransactionCallbacksImpl : public WebKit::WebIDBTransactionCallbacks { -public: - WebIDBTransactionCallbacksImpl(PassRefPtr<IDBTransactionCallbacks>); - virtual ~WebIDBTransactionCallbacksImpl(); - - virtual void onAbort(); - virtual void onComplete(); - virtual void onTimeout(); - -private: - RefPtr<IDBTransactionCallbacks> m_callbacks; -}; - -} // namespace WebCore - -#endif - -#endif // WebIDBTransactionCallbacksImpl_h diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/WebKit/chromium/src/WebIDBTransactionImpl.cpp deleted file mode 100644 index 1ed6f4b..0000000 --- a/WebKit/chromium/src/WebIDBTransactionImpl.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebIDBTransactionImpl.h" - -#if ENABLE(INDEXED_DATABASE) - -#include "IDBTransaction.h" -#include "IDBTransactionCallbacksProxy.h" -#include "WebIDBObjectStoreImpl.h" -#include "WebIDBTransactionCallbacks.h" - -using namespace WebCore; - -namespace WebKit { - -WebIDBTransactionImpl::WebIDBTransactionImpl(PassRefPtr<IDBTransactionBackendInterface> backend) - : m_backend(backend) -{ -} - -WebIDBTransactionImpl::~WebIDBTransactionImpl() -{ -} - -int WebIDBTransactionImpl::mode() const -{ - return m_backend->mode(); -} - -WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name, ExceptionCode& ec) -{ - RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(name, ec); - if (!objectStore) - return 0; - return new WebIDBObjectStoreImpl(objectStore); -} - -void WebIDBTransactionImpl::abort() -{ - m_backend->abort(); -} - -void WebIDBTransactionImpl::didCompleteTaskEvents() -{ - m_backend->didCompleteTaskEvents(); -} - -void WebIDBTransactionImpl::setCallbacks(WebIDBTransactionCallbacks* callbacks) -{ - RefPtr<IDBTransactionCallbacks> idbCallbacks = IDBTransactionCallbacksProxy::create(callbacks); - m_backend->setCallbacks(idbCallbacks.get()); -} - -IDBTransactionBackendInterface* WebIDBTransactionImpl::getIDBTransactionBackendInterface() const -{ - return m_backend.get(); -} - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.h b/WebKit/chromium/src/WebIDBTransactionImpl.h deleted file mode 100644 index d26fc37..0000000 --- a/WebKit/chromium/src/WebIDBTransactionImpl.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebIDBTransactionImpl_h -#define WebIDBTransactionImpl_h - -#if ENABLE(INDEXED_DATABASE) - -#include "WebCommon.h" -#include "WebIDBTransaction.h" -#include <wtf/PassRefPtr.h> -#include <wtf/RefPtr.h> - -namespace WebKit { - -// See comment in WebIndexedDatabase for a high level overview these classes. -class WebIDBTransactionImpl: public WebIDBTransaction { -public: - WebIDBTransactionImpl(WTF::PassRefPtr<WebCore::IDBTransactionBackendInterface>); - virtual ~WebIDBTransactionImpl(); - - virtual int mode() const; - virtual WebIDBObjectStore* objectStore(const WebString& name, WebExceptionCode&); - virtual void abort(); - virtual void didCompleteTaskEvents(); - virtual void setCallbacks(WebIDBTransactionCallbacks*); - - virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const; - -private: - WTF::RefPtr<WebCore::IDBTransactionBackendInterface> m_backend; -}; - -} // namespace WebKit - -#endif // ENABLE(INDEXED_DATABASE) - -#endif // WebIDBTransactionImpl_h diff --git a/WebKit/chromium/src/WebImageCG.cpp b/WebKit/chromium/src/WebImageCG.cpp deleted file mode 100644 index 045c8be..0000000 --- a/WebKit/chromium/src/WebImageCG.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebImage.h" - -#include "Image.h" -#include "ImageSource.h" -#include "SharedBuffer.h" - -#include "WebData.h" -#include "WebSize.h" - -#include <CoreGraphics/CGImage.h> - -#include <wtf/PassRefPtr.h> -#include <wtf/RetainPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize) -{ - // FIXME: Do something like what WebImageSkia.cpp does to enumerate frames. - // Not sure whether the CG decoder uses the same frame ordering rules (if so - // we can just use the same logic). - - ImageSource source; - source.setData(PassRefPtr<SharedBuffer>(data).get(), true); - if (!source.isSizeAvailable()) - return WebImage(); - - RetainPtr<CGImageRef> frame0(AdoptCF, source.createFrameAtIndex(0)); - if (!frame0) - return WebImage(); - - return WebImage(frame0.get()); -} - -void WebImage::reset() -{ - CGImageRelease(m_imageRef); - m_imageRef = 0; -} - -void WebImage::assign(const WebImage& image) -{ - assign(image.m_imageRef); -} - -bool WebImage::isNull() const -{ - return !m_imageRef; -} - -WebSize WebImage::size() const -{ - return WebSize(CGImageGetWidth(m_imageRef), CGImageGetHeight(m_imageRef)); -} - -WebImage::WebImage(const PassRefPtr<Image>& image) - : m_imageRef(0) -{ - NativeImagePtr p; - if (image.get() && (p = image->nativeImageForCurrentFrame())) - assign(p); -} - -WebImage& WebImage::operator=(const PassRefPtr<Image>& image) -{ - NativeImagePtr p; - if (image.get() && (p = image->nativeImageForCurrentFrame())) - assign(p); - else - reset(); - return *this; -} - -void WebImage::assign(CGImageRef imageRef) -{ - // Make sure to retain the imageRef first incase m_imageRef == imageRef. - CGImageRetain(imageRef); - CGImageRelease(m_imageRef); - m_imageRef = imageRef; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebImageDecoder.cpp b/WebKit/chromium/src/WebImageDecoder.cpp deleted file mode 100644 index a17897c..0000000 --- a/WebKit/chromium/src/WebImageDecoder.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebImageDecoder.h" - -#include "BMPImageDecoder.h" -#include "ICOImageDecoder.h" -#include "SharedBuffer.h" -#include "WebData.h" -#include "WebImage.h" -#include "WebSize.h" - -#if WEBKIT_USING_SKIA -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> -#endif - -using namespace WebCore; - -namespace WebKit { - -void WebImageDecoder::reset() -{ - delete m_private; -} - -void WebImageDecoder::init(Type type) -{ - switch (type) { - case TypeBMP: - m_private = new BMPImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied); - break; - case TypeICO: - m_private = new ICOImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied); - break; - } -} - -void WebImageDecoder::setData(const WebData& data, bool allDataReceived) -{ - ASSERT(m_private); - m_private->setData(PassRefPtr<SharedBuffer>(data).get(), allDataReceived); -} - -bool WebImageDecoder::isFailed() const -{ - ASSERT(m_private); - return m_private->failed(); -} - -bool WebImageDecoder::isSizeAvailable() const -{ - ASSERT(m_private); - return m_private->isSizeAvailable(); -} - -WebSize WebImageDecoder::size() const -{ - ASSERT(m_private); - return m_private->size(); -} - -size_t WebImageDecoder::frameCount() const -{ - ASSERT(m_private); - return m_private->frameCount(); -} - -bool WebImageDecoder::isFrameCompleteAtIndex(int index) const -{ - ASSERT(m_private); - RGBA32Buffer* const frameBuffer = m_private->frameBufferAtIndex(index); - if (!frameBuffer) - return false; - return (frameBuffer->status() == RGBA32Buffer::FrameComplete); -} - -WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const -{ - ASSERT(m_private); - RGBA32Buffer* const frameBuffer = m_private->frameBufferAtIndex(index); - if (!frameBuffer) - return WebImage(); -#if WEBKIT_USING_SKIA - OwnPtr<NativeImageSkia>image(frameBuffer->asNewNativeImage()); - return WebImage(*image); -#elif WEBKIT_USING_CG - // FIXME: Implement CG side of this. - return WebImage(frameBuffer->asNewNativeImage()); -#endif -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebImageSkia.cpp b/WebKit/chromium/src/WebImageSkia.cpp deleted file mode 100644 index 0684b58..0000000 --- a/WebKit/chromium/src/WebImageSkia.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebImage.h" - -#include "Image.h" -#include "ImageSource.h" -#include "NativeImageSkia.h" -#include "SharedBuffer.h" - -#include "WebData.h" -#include "WebSize.h" - -#include <wtf/OwnPtr.h> -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize) -{ - ImageSource source; - source.setData(PassRefPtr<SharedBuffer>(data).get(), true); - if (!source.isSizeAvailable()) - return WebImage(); - - // Frames are arranged by decreasing size, then decreasing bit depth. - // Pick the frame closest to |desiredSize|'s area without being smaller, - // which has the highest bit depth. - const size_t frameCount = source.frameCount(); - size_t index = 0; // Default to first frame if none are large enough. - int frameAreaAtIndex = 0; - for (size_t i = 0; i < frameCount; ++i) { - const IntSize frameSize = source.frameSizeAtIndex(i); - if (WebSize(frameSize) == desiredSize) { - index = i; - break; // Perfect match. - } - - const int frameArea = frameSize.width() * frameSize.height(); - if (frameArea < (desiredSize.width * desiredSize.height)) - break; // No more frames that are large enough. - - if (!i || (frameArea < frameAreaAtIndex)) { - index = i; // Closer to desired area than previous best match. - frameAreaAtIndex = frameArea; - } - } - - OwnPtr<NativeImageSkia> frame(source.createFrameAtIndex(index)); - if (!frame.get()) - return WebImage(); - - return WebImage(*frame); -} - -void WebImage::reset() -{ - m_bitmap.reset(); -} - -void WebImage::assign(const WebImage& image) -{ - m_bitmap = image.m_bitmap; -} - -bool WebImage::isNull() const -{ - return m_bitmap.isNull(); -} - -WebSize WebImage::size() const -{ - return WebSize(m_bitmap.width(), m_bitmap.height()); -} - -WebImage::WebImage(const PassRefPtr<Image>& image) -{ - operator=(image); -} - -WebImage& WebImage::operator=(const PassRefPtr<Image>& image) -{ - NativeImagePtr p; - if (image.get() && (p = image->nativeImageForCurrentFrame())) - assign(*p); - else - reset(); - return *this; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp deleted file mode 100644 index 8d89c60..0000000 --- a/WebKit/chromium/src/WebInputElement.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputElement.h" - -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -bool WebInputElement::isTextField() const -{ - return constUnwrap<HTMLInputElement>()->isTextField(); -} - -bool WebInputElement::isText() const -{ - return constUnwrap<HTMLInputElement>()->isText(); -} - -bool WebInputElement::isPasswordField() const -{ - return constUnwrap<HTMLInputElement>()->isPasswordField(); -} - -bool WebInputElement::isImageButton() const -{ - return constUnwrap<HTMLInputElement>()->isImageButton(); -} - -bool WebInputElement::autoComplete() const -{ - return constUnwrap<HTMLInputElement>()->autoComplete(); -} - -bool WebInputElement::isReadOnly() const -{ - return constUnwrap<HTMLInputElement>()->readOnly(); -} - -bool WebInputElement::isEnabledFormControl() const -{ - return constUnwrap<HTMLInputElement>()->isEnabledFormControl(); -} - -int WebInputElement::maxLength() const -{ - return constUnwrap<HTMLInputElement>()->maxLength(); -} - -bool WebInputElement::isActivatedSubmit() const -{ - return constUnwrap<HTMLInputElement>()->isActivatedSubmit(); -} - -void WebInputElement::setActivatedSubmit(bool activated) -{ - unwrap<HTMLInputElement>()->setActivatedSubmit(activated); -} - -int WebInputElement::size() const -{ - return constUnwrap<HTMLInputElement>()->size(); -} - -void WebInputElement::setValue(const WebString& value, bool sendChangeEvent) -{ - unwrap<HTMLInputElement>()->setValue(value, sendChangeEvent); -} - -WebString WebInputElement::value() const -{ - return constUnwrap<HTMLInputElement>()->value(); -} - -void WebInputElement::setSuggestedValue(const WebString& value) -{ - unwrap<HTMLInputElement>()->setSuggestedValue(value); -} - -WebString WebInputElement::suggestedValue() const -{ - return constUnwrap<HTMLInputElement>()->suggestedValue(); -} - -void WebInputElement::setPlaceholder(const WebString& value) -{ - unwrap<HTMLInputElement>()->setPlaceholder(value); -} - -WebString WebInputElement::placeholder() const -{ - return constUnwrap<HTMLInputElement>()->placeholder(); -} - -bool WebInputElement::isAutofilled() const -{ - return constUnwrap<HTMLInputElement>()->isAutofilled(); -} - -void WebInputElement::setAutofilled(bool autoFilled) -{ - unwrap<HTMLInputElement>()->setAutofilled(autoFilled); -} - -void WebInputElement::dispatchFormControlChangeEvent() -{ - unwrap<HTMLInputElement>()->dispatchFormControlChangeEvent(); -} - -void WebInputElement::setSelectionRange(int start, int end) -{ - unwrap<HTMLInputElement>()->setSelectionRange(start, end); -} - -int WebInputElement::selectionStart() const -{ - return constUnwrap<HTMLInputElement>()->selectionStart(); -} - -int WebInputElement::selectionEnd() const -{ - return constUnwrap<HTMLInputElement>()->selectionEnd(); -} - -bool WebInputElement::isValidValue(const WebString& value) const -{ - return constUnwrap<HTMLInputElement>()->isValidValue(value); -} - -const int WebInputElement::defaultMaxLength = HTMLInputElement::s_maximumLength; - -WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) - : WebFormControlElement(elem) -{ -} - -WebInputElement& WebInputElement::operator=(const PassRefPtr<HTMLInputElement>& elem) -{ - m_private = elem; - return *this; -} - -WebInputElement::operator PassRefPtr<HTMLInputElement>() const -{ - return static_cast<HTMLInputElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebInputEvent.cpp b/WebKit/chromium/src/WebInputEvent.cpp deleted file mode 100644 index c00200e..0000000 --- a/WebKit/chromium/src/WebInputEvent.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputEvent.h" - -#include "KeyboardCodes.h" - -#include <ctype.h> -#include <stdio.h> - -#include <wtf/Assertions.h> -#include <wtf/StringExtras.h> - -using namespace WebCore; - -namespace WebKit { - -static const char* staticKeyIdentifiers(unsigned short keyCode) -{ - switch (keyCode) { - case VKEY_MENU: - return "Alt"; - case VKEY_CONTROL: - return "Control"; - case VKEY_SHIFT: - return "Shift"; - case VKEY_CAPITAL: - return "CapsLock"; - case VKEY_LWIN: - case VKEY_RWIN: - return "Win"; - case VKEY_CLEAR: - return "Clear"; - case VKEY_DOWN: - return "Down"; - case VKEY_END: - return "End"; - case VKEY_RETURN: - return "Enter"; - case VKEY_EXECUTE: - return "Execute"; - case VKEY_F1: - return "F1"; - case VKEY_F2: - return "F2"; - case VKEY_F3: - return "F3"; - case VKEY_F4: - return "F4"; - case VKEY_F5: - return "F5"; - case VKEY_F6: - return "F6"; - case VKEY_F7: - return "F7"; - case VKEY_F8: - return "F8"; - case VKEY_F9: - return "F9"; - case VKEY_F10: - return "F10"; - case VKEY_F11: - return "F11"; - case VKEY_F12: - return "F12"; - case VKEY_F13: - return "F13"; - case VKEY_F14: - return "F14"; - case VKEY_F15: - return "F15"; - case VKEY_F16: - return "F16"; - case VKEY_F17: - return "F17"; - case VKEY_F18: - return "F18"; - case VKEY_F19: - return "F19"; - case VKEY_F20: - return "F20"; - case VKEY_F21: - return "F21"; - case VKEY_F22: - return "F22"; - case VKEY_F23: - return "F23"; - case VKEY_F24: - return "F24"; - case VKEY_HELP: - return "Help"; - case VKEY_HOME: - return "Home"; - case VKEY_INSERT: - return "Insert"; - case VKEY_LEFT: - return "Left"; - case VKEY_NEXT: - return "PageDown"; - case VKEY_PRIOR: - return "PageUp"; - case VKEY_PAUSE: - return "Pause"; - case VKEY_SNAPSHOT: - return "PrintScreen"; - case VKEY_RIGHT: - return "Right"; - case VKEY_SCROLL: - return "Scroll"; - case VKEY_SELECT: - return "Select"; - case VKEY_UP: - return "Up"; - case VKEY_DELETE: - return "U+007F"; // Standard says that DEL becomes U+007F. - default: - return 0; - } -} - -void WebKeyboardEvent::setKeyIdentifierFromWindowsKeyCode() -{ - const char* id = staticKeyIdentifiers(windowsKeyCode); - if (id) { - strncpy(keyIdentifier, id, sizeof(keyIdentifier) - 1); - keyIdentifier[sizeof(keyIdentifier) - 1] = '\0'; - } else - snprintf(keyIdentifier, sizeof(keyIdentifier), "U+%04X", toupper(windowsKeyCode)); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebInputEventConversion.cpp b/WebKit/chromium/src/WebInputEventConversion.cpp deleted file mode 100644 index 24eb372..0000000 --- a/WebKit/chromium/src/WebInputEventConversion.cpp +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputEventConversion.h" - -#include "EventNames.h" -#include "KeyboardCodes.h" -#include "KeyboardEvent.h" -#include "MouseEvent.h" -#include "PlatformKeyboardEvent.h" -#include "PlatformMouseEvent.h" -#include "PlatformWheelEvent.h" -#include "ScrollView.h" -#include "WebInputEvent.h" -#include "WheelEvent.h" -#include "Widget.h" - -using namespace WebCore; - -namespace WebKit { - -// MakePlatformMouseEvent ----------------------------------------------------- - -PlatformMouseEventBuilder::PlatformMouseEventBuilder(Widget* widget, const WebMouseEvent& e) -{ - // FIXME: widget is always toplevel, unless it's a popup. We may be able - // to get rid of this once we abstract popups into a WebKit API. - m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y)); - m_globalPosition = IntPoint(e.globalX, e.globalY); - m_button = static_cast<MouseButton>(e.button); - m_shiftKey = (e.modifiers & WebInputEvent::ShiftKey); - m_ctrlKey = (e.modifiers & WebInputEvent::ControlKey); - m_altKey = (e.modifiers & WebInputEvent::AltKey); - m_metaKey = (e.modifiers & WebInputEvent::MetaKey); - m_modifierFlags = e.modifiers; - m_timestamp = e.timeStampSeconds; - m_clickCount = e.clickCount; - - switch (e.type) { - case WebInputEvent::MouseMove: - case WebInputEvent::MouseLeave: // synthesize a move event - m_eventType = MouseEventMoved; - break; - - case WebInputEvent::MouseDown: - m_eventType = MouseEventPressed; - break; - - case WebInputEvent::MouseUp: - m_eventType = MouseEventReleased; - break; - - default: - ASSERT_NOT_REACHED(); - } -} - -// PlatformWheelEventBuilder -------------------------------------------------- - -PlatformWheelEventBuilder::PlatformWheelEventBuilder(Widget* widget, const WebMouseWheelEvent& e) -{ - m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y)); - m_globalPosition = IntPoint(e.globalX, e.globalY); - m_deltaX = e.deltaX; - m_deltaY = e.deltaY; - m_wheelTicksX = e.wheelTicksX; - m_wheelTicksY = e.wheelTicksY; - m_isAccepted = false; - m_granularity = e.scrollByPage ? - ScrollByPageWheelEvent : ScrollByPixelWheelEvent; - m_shiftKey = (e.modifiers & WebInputEvent::ShiftKey); - m_ctrlKey = (e.modifiers & WebInputEvent::ControlKey); - m_altKey = (e.modifiers & WebInputEvent::AltKey); - m_metaKey = (e.modifiers & WebInputEvent::MetaKey); -} - -// MakePlatformKeyboardEvent -------------------------------------------------- - -static inline PlatformKeyboardEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type) -{ - switch (type) { - case WebInputEvent::KeyUp: - return PlatformKeyboardEvent::KeyUp; - case WebInputEvent::KeyDown: - return PlatformKeyboardEvent::KeyDown; - case WebInputEvent::RawKeyDown: - return PlatformKeyboardEvent::RawKeyDown; - case WebInputEvent::Char: - return PlatformKeyboardEvent::Char; - default: - ASSERT_NOT_REACHED(); - } - return PlatformKeyboardEvent::KeyDown; -} - -PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEvent& e) -{ - m_type = toPlatformKeyboardEventType(e.type); - m_text = String(e.text); - m_unmodifiedText = String(e.unmodifiedText); - m_keyIdentifier = String(e.keyIdentifier); - m_autoRepeat = (e.modifiers & WebInputEvent::IsAutoRepeat); - m_windowsVirtualKeyCode = e.windowsKeyCode; - m_nativeVirtualKeyCode = e.nativeKeyCode; - m_isKeypad = (e.modifiers & WebInputEvent::IsKeyPad); - m_shiftKey = (e.modifiers & WebInputEvent::ShiftKey); - m_ctrlKey = (e.modifiers & WebInputEvent::ControlKey); - m_altKey = (e.modifiers & WebInputEvent::AltKey); - m_metaKey = (e.modifiers & WebInputEvent::MetaKey); - m_isSystemKey = e.isSystemKey; -} - -void PlatformKeyboardEventBuilder::setKeyType(Type type) -{ - // According to the behavior of Webkit in Windows platform, - // we need to convert KeyDown to RawKeydown and Char events - // See WebKit/WebKit/Win/WebView.cpp - ASSERT(m_type == KeyDown); - ASSERT(type == RawKeyDown || type == Char); - m_type = type; - - if (type == RawKeyDown) { - m_text = String(); - m_unmodifiedText = String(); - } else { - m_keyIdentifier = String(); - m_windowsVirtualKeyCode = 0; - } -} - -// Please refer to bug http://b/issue?id=961192, which talks about Webkit -// keyboard event handling changes. It also mentions the list of keys -// which don't have associated character events. -bool PlatformKeyboardEventBuilder::isCharacterKey() const -{ - switch (windowsVirtualKeyCode()) { - case VKEY_BACK: - case VKEY_ESCAPE: - return false; - } - return true; -} - -#if ENABLE(TOUCH_EVENTS) -static inline TouchEventType toPlatformTouchEventType(const WebInputEvent::Type type) -{ - switch (type) { - case WebInputEvent::TouchStart: - return TouchStart; - case WebInputEvent::TouchMove: - return TouchMove; - case WebInputEvent::TouchEnd: - return TouchEnd; - case WebInputEvent::TouchCancel: - return TouchCancel; - default: - ASSERT_NOT_REACHED(); - } - return TouchStart; -} - -static inline PlatformTouchPoint::State toPlatformTouchPointState(const WebTouchPoint::State state) -{ - switch (state) { - case WebTouchPoint::StateReleased: - return PlatformTouchPoint::TouchReleased; - case WebTouchPoint::StatePressed: - return PlatformTouchPoint::TouchPressed; - case WebTouchPoint::StateMoved: - return PlatformTouchPoint::TouchMoved; - case WebTouchPoint::StateStationary: - return PlatformTouchPoint::TouchStationary; - case WebTouchPoint::StateCancelled: - return PlatformTouchPoint::TouchCancelled; - case WebTouchPoint::StateUndefined: - ASSERT_NOT_REACHED(); - } - return PlatformTouchPoint::TouchReleased; -} - -PlatformTouchPointBuilder::PlatformTouchPointBuilder(Widget* widget, const WebTouchPoint& point) -{ - m_id = point.id; - m_state = toPlatformTouchPointState(point.state); - m_pos = widget->convertFromContainingWindow(point.position); - m_screenPos = point.screenPosition; -} - -PlatformTouchEventBuilder::PlatformTouchEventBuilder(Widget* widget, const WebTouchEvent& event) -{ - m_type = toPlatformTouchEventType(event.type); - m_ctrlKey = event.modifiers & WebInputEvent::ControlKey; - m_altKey = event.modifiers & WebInputEvent::AltKey; - m_shiftKey = event.modifiers & WebInputEvent::ShiftKey; - m_metaKey = event.modifiers & WebInputEvent::MetaKey; - - for (int i = 0; i < event.touchPointsLength; ++i) - m_touchPoints.append(PlatformTouchPointBuilder(widget, event.touchPoints[i])); -} -#endif - -static int getWebInputModifiers(const UIEventWithKeyState& event) -{ - int modifiers = 0; - if (event.ctrlKey()) - modifiers |= WebInputEvent::ControlKey; - if (event.shiftKey()) - modifiers |= WebInputEvent::ShiftKey; - if (event.altKey()) - modifiers |= WebInputEvent::AltKey; - if (event.metaKey()) - modifiers |= WebInputEvent::MetaKey; - return modifiers; -} - -WebMouseEventBuilder::WebMouseEventBuilder(const Widget* widget, const MouseEvent& event) -{ - if (event.type() == eventNames().mousemoveEvent) - type = WebInputEvent::MouseMove; - else if (event.type() == eventNames().mouseoutEvent) - type = WebInputEvent::MouseLeave; - else if (event.type() == eventNames().mouseoverEvent) - type = WebInputEvent::MouseEnter; - else if (event.type() == eventNames().mousedownEvent) - type = WebInputEvent::MouseDown; - else if (event.type() == eventNames().mouseupEvent) - type = WebInputEvent::MouseUp; - else if (event.type() == eventNames().contextmenuEvent) - type = WebInputEvent::ContextMenu; - else - return; // Skip all other mouse events. - timeStampSeconds = event.timeStamp() * 1.0e-3; - switch (event.button()) { - case LeftButton: - button = WebMouseEvent::ButtonLeft; - break; - case MiddleButton: - button = WebMouseEvent::ButtonMiddle; - break; - case RightButton: - button = WebMouseEvent::ButtonRight; - break; - } - modifiers = getWebInputModifiers(event); - if (event.buttonDown()) { - switch (event.button()) { - case LeftButton: - modifiers |= WebInputEvent::LeftButtonDown; - break; - case MiddleButton: - modifiers |= WebInputEvent::MiddleButtonDown; - break; - case RightButton: - modifiers |= WebInputEvent::RightButtonDown; - break; - } - } - ScrollView* view = widget->parent(); - IntPoint p = view->contentsToWindow( - IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y())); - globalX = event.screenX(); - globalY = event.screenY(); - windowX = p.x(); - windowY = p.y(); - x = event.absoluteLocation().x() - widget->pos().x(); - y = event.absoluteLocation().y() - widget->pos().y(); - clickCount = event.detail(); -} - -WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const WheelEvent& event) -{ - if (event.type() != eventNames().mousewheelEvent) - return; - type = WebInputEvent::MouseWheel; - timeStampSeconds = event.timeStamp() * 1.0e-3; - modifiers = getWebInputModifiers(event); - ScrollView* view = widget->parent(); - IntPoint p = view->contentsToWindow( - IntPoint(event.absoluteLocation().x(), event.absoluteLocation().y())); - globalX = event.screenX(); - globalY = event.screenY(); - windowX = p.x(); - windowY = p.y(); - x = event.absoluteLocation().x() - widget->pos().x(); - y = event.absoluteLocation().y() - widget->pos().y(); - deltaX = static_cast<float>(event.rawDeltaX()); - deltaY = static_cast<float>(event.rawDeltaY()); - // The 120 is from WheelEvent::initWheelEvent(). - wheelTicksX = static_cast<float>(event.wheelDeltaX()) / 120; - wheelTicksY = static_cast<float>(event.wheelDeltaY()) / 120; - scrollByPage = event.granularity() == WheelEvent::Page; -} - -WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) -{ - if (event.type() == eventNames().keydownEvent) - type = KeyDown; - else if (event.type() == eventNames().keyupEvent) - type = WebInputEvent::KeyUp; - else if (event.type() == eventNames().keypressEvent) - type = WebInputEvent::Char; - else - return; // Skip all other keyboard events. - modifiers = getWebInputModifiers(event); - timeStampSeconds = event.timeStamp() * 1.0e-3; - windowsKeyCode = event.keyCode(); - - // The platform keyevent does not exist if the event was created using - // initKeyboardEvent. - if (!event.keyEvent()) - return; - nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode(); - unsigned int numChars = std::min(event.keyEvent()->text().length(), - static_cast<unsigned int>(WebKeyboardEvent::textLengthCap)); - for (unsigned int i = 0; i < numChars; i++) { - text[i] = event.keyEvent()->text()[i]; - unmodifiedText[i] = event.keyEvent()->unmodifiedText()[i]; - } -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebInputEventConversion.h b/WebKit/chromium/src/WebInputEventConversion.h deleted file mode 100644 index 63991a9..0000000 --- a/WebKit/chromium/src/WebInputEventConversion.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebInputEventConversion_h -#define WebInputEventConversion_h - -#include "WebInputEvent.h" - -#include "PlatformKeyboardEvent.h" -#include "PlatformMouseEvent.h" -#include "PlatformTouchEvent.h" -#include "PlatformWheelEvent.h" - -namespace WebCore { -class KeyboardEvent; -class MouseEvent; -class ScrollView; -class WheelEvent; -class Widget; -} - -namespace WebKit { - -class WebMouseEvent; -class WebMouseWheelEvent; -class WebKeyboardEvent; - -// These classes are used to convert from WebInputEvent subclasses to -// corresponding WebCore events. - -class PlatformMouseEventBuilder : public WebCore::PlatformMouseEvent { -public: - PlatformMouseEventBuilder(WebCore::Widget*, const WebMouseEvent&); -}; - -class PlatformWheelEventBuilder : public WebCore::PlatformWheelEvent { -public: - PlatformWheelEventBuilder(WebCore::Widget*, const WebMouseWheelEvent&); -}; - -class PlatformKeyboardEventBuilder : public WebCore::PlatformKeyboardEvent { -public: - PlatformKeyboardEventBuilder(const WebKeyboardEvent&); - void setKeyType(Type); - bool isCharacterKey() const; -}; - -#if ENABLE(TOUCH_EVENTS) -class PlatformTouchPointBuilder : public WebCore::PlatformTouchPoint { -public: - PlatformTouchPointBuilder(WebCore::Widget*, const WebTouchPoint&); -}; - -class PlatformTouchEventBuilder : public WebCore::PlatformTouchEvent { -public: - PlatformTouchEventBuilder(WebCore::Widget*, const WebTouchEvent&); -}; -#endif - -// Converts a WebCore::MouseEvent to a corresponding WebMouseEvent. view is -// the ScrollView corresponding to the event. -// NOTE: This is only implemented for mousemove, mouseover, mouseout, -// mousedown and mouseup. If the event mapping fails, the event type will -// be set to Undefined. -class WebMouseEventBuilder : public WebMouseEvent { -public: - WebMouseEventBuilder(const WebCore::Widget*, const WebCore::MouseEvent&); -}; - -// Converts a WebCore::WheelEvent to a corresponding WebMouseWheelEvent. -// If the event mapping fails, the event type will be set to Undefined. -class WebMouseWheelEventBuilder : public WebMouseWheelEvent { -public: - WebMouseWheelEventBuilder(const WebCore::Widget*, const WebCore::WheelEvent&); -}; - -// Converts a WebCore::KeyboardEvent to a corresponding WebKeyboardEvent. -// NOTE: This is only implemented for keydown and keyup. If the event mapping -// fails, the event type will be set to Undefined. -class WebKeyboardEventBuilder : public WebKeyboardEvent { -public: - WebKeyboardEventBuilder(const WebCore::KeyboardEvent&); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp deleted file mode 100644 index cadcb6c..0000000 --- a/WebKit/chromium/src/WebKit.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebKit.h" - -#include "DOMTimer.h" -#include "Logging.h" -#include "Page.h" -#include "RuntimeEnabledFeatures.h" -#include "TextEncoding.h" -#include "WebMediaPlayerClientImpl.h" -#include "WebSocket.h" -#include "WorkerContextExecutionProxy.h" - -#include <wtf/Assertions.h> -#include <wtf/Threading.h> -#include <wtf/text/AtomicString.h> - -namespace WebKit { - -// Make sure we are not re-initialized in the same address space. -// Doing so may cause hard to reproduce crashes. -static bool s_webKitInitialized = false; - -static WebKitClient* s_webKitClient = 0; -static bool s_layoutTestMode = false; - -void initialize(WebKitClient* webKitClient) -{ - ASSERT(!s_webKitInitialized); - s_webKitInitialized = true; - - ASSERT(webKitClient); - ASSERT(!s_webKitClient); - s_webKitClient = webKitClient; - - WTF::initializeThreading(); - WTF::initializeMainThread(); - WTF::AtomicString::init(); - - // Chromium sets the minimum interval timeout to 4ms, overriding the - // default of 10ms. We'd like to go lower, however there are poorly - // coded websites out there which do create CPU-spinning loops. Using - // 4ms prevents the CPU from spinning too busily and provides a balance - // between CPU spinning and the smallest possible interval timer. - WebCore::DOMTimer::setMinTimerInterval(0.004); - - // There are some code paths (for example, running WebKit in the browser - // process and calling into LocalStorage before anything else) where the - // UTF8 string encoding tables are used on a background thread before - // they're set up. This is a problem because their set up routines assert - // they're running on the main WebKitThread. It might be possible to make - // the initialization thread-safe, but given that so many code paths use - // this, initializing this lazily probably doesn't buy us much. - WebCore::UTF8Encoding(); -} - -void shutdown() -{ - s_webKitClient = 0; -} - -WebKitClient* webKitClient() -{ - return s_webKitClient; -} - -void setLayoutTestMode(bool value) -{ - s_layoutTestMode = value; -} - -bool layoutTestMode() -{ - return s_layoutTestMode; -} - -void enableLogChannel(const char* name) -{ - WTFLogChannel* channel = WebCore::getChannelFromName(name); - if (channel) - channel->state = WTFLogChannelOn; -} - -void resetPluginCache(bool reloadPages) -{ - WebCore::Page::refreshPlugins(reloadPages); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebLabelElement.cpp b/WebKit/chromium/src/WebLabelElement.cpp deleted file mode 100644 index ef2c698..0000000 --- a/WebKit/chromium/src/WebLabelElement.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebLabelElement.h" - -#include "HTMLLabelElement.h" -#include "HTMLNames.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebElement WebLabelElement::correspondingControl() -{ - return WebElement(unwrap<HTMLLabelElement>()->control()); -} - -WebLabelElement::WebLabelElement(const PassRefPtr<HTMLLabelElement>& elem) - : WebElement(elem) -{ -} - -WebLabelElement& WebLabelElement::operator=(const PassRefPtr<HTMLLabelElement>& elem) -{ - m_private = elem; - return *this; -} - -WebLabelElement::operator PassRefPtr<HTMLLabelElement>() const -{ - return static_cast<HTMLLabelElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebMediaElement.cpp b/WebKit/chromium/src/WebMediaElement.cpp deleted file mode 100644 index 4adda1e..0000000 --- a/WebKit/chromium/src/WebMediaElement.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebMediaElement.h" - -#include "HTMLMediaElement.h" -#include "MediaPlayer.h" -#include "WebMediaPlayer.h" -#include "WebMediaPlayerClientImpl.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -WebMediaPlayer* WebMediaElement::player() const -{ - return WebMediaPlayerClientImpl::fromMediaElement(this)->mediaPlayer(); -} - -WebMediaElement::WebMediaElement(const PassRefPtr<HTMLMediaElement>& elem) - : WebElement(elem) -{ -} - -WebMediaElement& WebMediaElement::operator=(const PassRefPtr<HTMLMediaElement>& elem) -{ - m_private = elem; - return *this; -} - -WebMediaElement::operator PassRefPtr<HTMLMediaElement>() const -{ - return static_cast<HTMLMediaElement*>(m_private.get()); -} -} // namespace WebKit diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp deleted file mode 100644 index 65f0fde..0000000 --- a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp +++ /dev/null @@ -1,527 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "config.h" -#include "WebMediaPlayerClientImpl.h" - -#if ENABLE(VIDEO) - -#include "Frame.h" -#include "GraphicsContext.h" -#include "HTMLMediaElement.h" -#include "IntSize.h" -#include "KURL.h" -#include "MediaPlayer.h" -#include "NotImplemented.h" -#include "RenderView.h" -#include "TimeRanges.h" -#include "VideoLayerChromium.h" - -#if USE(ACCELERATED_COMPOSITING) -#include "RenderLayerCompositor.h" -#endif - -#include "VideoFrameChromium.h" -#include "VideoFrameChromiumImpl.h" -#include "WebCanvas.h" -#include "WebCString.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMediaElement.h" -#include "WebMediaPlayer.h" -#include "WebMimeRegistry.h" -#include "WebRect.h" -#include "WebSize.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebViewImpl.h" - -// WebCommon.h defines WEBKIT_USING_SKIA so this has to be included last. -#if WEBKIT_USING_SKIA -#include "PlatformContextSkia.h" -#endif - -#include <wtf/Assertions.h> -#include <wtf/text/CString.h> - -using namespace WebCore; - -namespace WebKit { - -static WebMediaPlayer* createWebMediaPlayer( - WebMediaPlayerClient* client, Frame* frame) -{ - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); - - if (!webFrame->client()) - return 0; - return webFrame->client()->createMediaPlayer(webFrame, client); -} - -bool WebMediaPlayerClientImpl::m_isEnabled = false; - -bool WebMediaPlayerClientImpl::isEnabled() -{ - return m_isEnabled; -} - -void WebMediaPlayerClientImpl::setIsEnabled(bool isEnabled) -{ - m_isEnabled = isEnabled; -} - -void WebMediaPlayerClientImpl::registerSelf(MediaEngineRegistrar registrar) -{ - if (m_isEnabled) { - registrar(WebMediaPlayerClientImpl::create, - WebMediaPlayerClientImpl::getSupportedTypes, - WebMediaPlayerClientImpl::supportsType); - } -} - -WebMediaPlayerClientImpl* WebMediaPlayerClientImpl::fromMediaElement(const WebMediaElement* element) -{ - PlatformMedia pm = element->constUnwrap<HTMLMediaElement>()->platformMedia(); - return static_cast<WebMediaPlayerClientImpl*>(pm.media.chromiumMediaPlayer); -} - -WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const -{ - return m_webMediaPlayer.get(); -} - -// WebMediaPlayerClient -------------------------------------------------------- - -WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl() -{ - // VideoLayerChromium may outlive this object so make sure all frames are - // released. -#if USE(ACCELERATED_COMPOSITING) - if (m_videoLayer.get()) - m_videoLayer->releaseCurrentFrame(); -#endif -} - -void WebMediaPlayerClientImpl::networkStateChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->networkStateChanged(); -} - -void WebMediaPlayerClientImpl::readyStateChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->readyStateChanged(); -#if USE(ACCELERATED_COMPOSITING) - if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer.get()) - m_videoLayer = VideoLayerChromium::create(0, this); -#endif -} - -void WebMediaPlayerClientImpl::volumeChanged(float newVolume) -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->volumeChanged(newVolume); -} - -void WebMediaPlayerClientImpl::muteChanged(bool newMute) -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->muteChanged(newMute); -} - -void WebMediaPlayerClientImpl::timeChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->timeChanged(); -} - -void WebMediaPlayerClientImpl::repaint() -{ - ASSERT(m_mediaPlayer); -#if USE(ACCELERATED_COMPOSITING) - if (m_videoLayer.get() && supportsAcceleratedRendering()) - m_videoLayer->setNeedsDisplay(FloatRect(0, 0, m_videoLayer->bounds().width(), m_videoLayer->bounds().height())); -#endif - m_mediaPlayer->repaint(); -} - -void WebMediaPlayerClientImpl::durationChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->durationChanged(); -} - -void WebMediaPlayerClientImpl::rateChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->rateChanged(); -} - -void WebMediaPlayerClientImpl::sizeChanged() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->sizeChanged(); -} - -void WebMediaPlayerClientImpl::sawUnsupportedTracks() -{ - ASSERT(m_mediaPlayer); - m_mediaPlayer->mediaPlayerClient()->mediaPlayerSawUnsupportedTracks(m_mediaPlayer); -} - -float WebMediaPlayerClientImpl::volume() const -{ - if (m_mediaPlayer) - return m_mediaPlayer->volume(); - return 0.0f; -} - -// MediaPlayerPrivateInterface ------------------------------------------------- - -void WebMediaPlayerClientImpl::load(const String& url) -{ - Frame* frame = static_cast<HTMLMediaElement*>( - m_mediaPlayer->mediaPlayerClient())->document()->frame(); - - // Video frame object is owned by WebMediaPlayer. Before destroying - // WebMediaPlayer all frames need to be released. -#if USE(ACCELERATED_COMPOSITING) - if (m_videoLayer.get()) - m_videoLayer->releaseCurrentFrame(); -#endif - - m_webMediaPlayer.set(createWebMediaPlayer(this, frame)); - if (m_webMediaPlayer.get()) - m_webMediaPlayer->load(KURL(ParsedURLString, url)); -} - -void WebMediaPlayerClientImpl::cancelLoad() -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->cancelLoad(); -} - -#if USE(ACCELERATED_COMPOSITING) -PlatformLayer* WebMediaPlayerClientImpl::platformLayer() const -{ - ASSERT(m_supportsAcceleratedCompositing); - return m_videoLayer.get(); -} -#endif - -PlatformMedia WebMediaPlayerClientImpl::platformMedia() const -{ - PlatformMedia pm; - pm.type = PlatformMedia::ChromiumMediaPlayerType; - pm.media.chromiumMediaPlayer = const_cast<WebMediaPlayerClientImpl*>(this); - return pm; -} - -void WebMediaPlayerClientImpl::play() -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->play(); -} - -void WebMediaPlayerClientImpl::pause() -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->pause(); -} - -IntSize WebMediaPlayerClientImpl::naturalSize() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->naturalSize(); - return IntSize(); -} - -bool WebMediaPlayerClientImpl::hasVideo() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->hasVideo(); - return false; -} - -bool WebMediaPlayerClientImpl::hasAudio() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->hasAudio(); - return false; -} - -void WebMediaPlayerClientImpl::setVisible(bool visible) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setVisible(visible); -} - -float WebMediaPlayerClientImpl::duration() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->duration(); - return 0.0f; -} - -float WebMediaPlayerClientImpl::currentTime() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->currentTime(); - return 0.0f; -} - -void WebMediaPlayerClientImpl::seek(float time) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->seek(time); -} - -bool WebMediaPlayerClientImpl::seeking() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->seeking(); - return false; -} - -void WebMediaPlayerClientImpl::setEndTime(float time) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setEndTime(time); -} - -void WebMediaPlayerClientImpl::setRate(float rate) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setRate(rate); -} - -bool WebMediaPlayerClientImpl::paused() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->paused(); - return false; -} - -bool WebMediaPlayerClientImpl::supportsFullscreen() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->supportsFullscreen(); - return false; -} - -bool WebMediaPlayerClientImpl::supportsSave() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->supportsSave(); - return false; -} - -void WebMediaPlayerClientImpl::setVolume(float volume) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setVolume(volume); -} - -MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const -{ - if (m_webMediaPlayer.get()) - return static_cast<MediaPlayer::NetworkState>(m_webMediaPlayer->networkState()); - return MediaPlayer::Empty; -} - -MediaPlayer::ReadyState WebMediaPlayerClientImpl::readyState() const -{ - if (m_webMediaPlayer.get()) - return static_cast<MediaPlayer::ReadyState>(m_webMediaPlayer->readyState()); - return MediaPlayer::HaveNothing; -} - -float WebMediaPlayerClientImpl::maxTimeSeekable() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->maxTimeSeekable(); - return 0.0f; -} - -PassRefPtr<TimeRanges> WebMediaPlayerClientImpl::buffered() const -{ - if (m_webMediaPlayer.get()) { - const WebTimeRanges& webRanges = m_webMediaPlayer->buffered(); - - // FIXME: Save the time ranges in a member variable and update it when needed. - RefPtr<TimeRanges> ranges = TimeRanges::create(); - for (size_t i = 0; i < webRanges.size(); ++i) - ranges->add(webRanges[i].start, webRanges[i].end); - return ranges.release(); - } - return TimeRanges::create(); -} - -int WebMediaPlayerClientImpl::dataRate() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->dataRate(); - return 0; -} - -bool WebMediaPlayerClientImpl::totalBytesKnown() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->totalBytesKnown(); - return false; -} - -unsigned WebMediaPlayerClientImpl::totalBytes() const -{ - if (m_webMediaPlayer.get()) - return static_cast<unsigned>(m_webMediaPlayer->totalBytes()); - return 0; -} - -unsigned WebMediaPlayerClientImpl::bytesLoaded() const -{ - if (m_webMediaPlayer.get()) - return static_cast<unsigned>(m_webMediaPlayer->bytesLoaded()); - return 0; -} - -void WebMediaPlayerClientImpl::setSize(const IntSize& size) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setSize(WebSize(size.width(), size.height())); -} - -void WebMediaPlayerClientImpl::paint(GraphicsContext* context, const IntRect& rect) -{ - // Normally GraphicsContext operations do nothing when painting is disabled. - // Since we're accessing platformContext() directly we have to manually - // check. - if (m_webMediaPlayer.get() && !context->paintingDisabled()) { -#if WEBKIT_USING_SKIA - PlatformGraphicsContext* platformContext = context->platformContext(); - WebCanvas* canvas = platformContext->canvas(); - - canvas->saveLayerAlpha(0, platformContext->getNormalizedAlpha()); - - m_webMediaPlayer->paint(canvas, rect); - - canvas->restore(); -#elif WEBKIT_USING_CG - m_webMediaPlayer->paint(context->platformContext(), rect); -#else - notImplemented(); -#endif - } -} - -void WebMediaPlayerClientImpl::setAutobuffer(bool autoBuffer) -{ - if (m_webMediaPlayer.get()) - m_webMediaPlayer->setAutoBuffer(autoBuffer); -} - -bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const -{ - if (m_webMediaPlayer.get()) - return m_webMediaPlayer->hasSingleSecurityOrigin(); - return false; -} - -MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const -{ - if (m_webMediaPlayer.get()) - return static_cast<MediaPlayer::MovieLoadType>( - m_webMediaPlayer->movieLoadType()); - return MediaPlayer::Unknown; -} - -#if USE(ACCELERATED_COMPOSITING) -bool WebMediaPlayerClientImpl::supportsAcceleratedRendering() const -{ - return m_supportsAcceleratedCompositing; -} - -VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame() -{ - VideoFrameChromium* videoFrame = 0; - if (m_webMediaPlayer.get()) { - WebVideoFrame* webkitVideoFrame = m_webMediaPlayer->getCurrentFrame(); - if (webkitVideoFrame) - videoFrame = new VideoFrameChromiumImpl(webkitVideoFrame); - } - return videoFrame; -} - -void WebMediaPlayerClientImpl::putCurrentFrame(VideoFrameChromium* videoFrame) -{ - if (videoFrame) { - if (m_webMediaPlayer.get()) { - m_webMediaPlayer->putCurrentFrame( - VideoFrameChromiumImpl::toWebVideoFrame(videoFrame)); - } - delete videoFrame; - } -} -#endif - -MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(MediaPlayer* player) -{ - WebMediaPlayerClientImpl* client = new WebMediaPlayerClientImpl(); - client->m_mediaPlayer = player; - -#if USE(ACCELERATED_COMPOSITING) - Frame* frame = static_cast<HTMLMediaElement*>( - client->m_mediaPlayer->mediaPlayerClient())->document()->frame(); - - // This does not actually check whether the hardware can support accelerated - // compositing, but only if the flag is set. However, this is checked lazily - // in WebViewImpl::setIsAcceleratedCompositingActive() and will fail there - // if necessary. - client->m_supportsAcceleratedCompositing = - frame->contentRenderer()->compositor()->hasAcceleratedCompositing(); -#endif - - return client; -} - -void WebMediaPlayerClientImpl::getSupportedTypes(HashSet<String>& supportedTypes) -{ - // FIXME: integrate this list with WebMediaPlayerClientImpl::supportsType. - notImplemented(); -} - -MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(const String& type, - const String& codecs) -{ - WebMimeRegistry::SupportsType supportsType = - webKitClient()->mimeRegistry()->supportsMediaMIMEType(type, codecs); - - switch (supportsType) { - default: - ASSERT_NOT_REACHED(); - case WebMimeRegistry::IsNotSupported: - return MediaPlayer::IsNotSupported; - case WebMimeRegistry::IsSupported: - return MediaPlayer::IsSupported; - case WebMimeRegistry::MayBeSupported: - return MediaPlayer::MayBeSupported; - } - return MediaPlayer::IsNotSupported; -} - -WebMediaPlayerClientImpl::WebMediaPlayerClientImpl() - : m_mediaPlayer(0) -#if USE(ACCELERATED_COMPOSITING) - , m_videoLayer(0) - , m_supportsAcceleratedCompositing(false) -#endif -{ -} - -} // namespace WebKit - -#endif // ENABLE(VIDEO) diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/WebKit/chromium/src/WebMediaPlayerClientImpl.h deleted file mode 100644 index ca7c43c..0000000 --- a/WebKit/chromium/src/WebMediaPlayerClientImpl.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebMediaPlayerClientImpl_h -#define WebMediaPlayerClientImpl_h - -#if ENABLE(VIDEO) - -#include "MediaPlayerPrivate.h" -#include "VideoFrameChromium.h" -#include "VideoFrameProvider.h" -#include "VideoLayerChromium.h" -#include "WebMediaPlayerClient.h" -#include <wtf/OwnPtr.h> - -namespace WebKit { - -class WebMediaElement; -class WebMediaPlayer; - -// This class serves as a bridge between WebCore::MediaPlayer and -// WebKit::WebMediaPlayer. -class WebMediaPlayerClientImpl : public WebCore::MediaPlayerPrivateInterface -#if USE(ACCELERATED_COMPOSITING) - , public WebCore::VideoFrameProvider -#endif - , public WebMediaPlayerClient { - -public: - static bool isEnabled(); - static void setIsEnabled(bool); - static void registerSelf(WebCore::MediaEngineRegistrar); - - static WebMediaPlayerClientImpl* fromMediaElement(const WebMediaElement* element); - - // Returns the encapsulated WebKit::WebMediaPlayer. - WebMediaPlayer* mediaPlayer() const; - - // WebMediaPlayerClient methods: - virtual ~WebMediaPlayerClientImpl(); - virtual void networkStateChanged(); - virtual void readyStateChanged(); - virtual void volumeChanged(float); - virtual void muteChanged(bool); - virtual void timeChanged(); - virtual void repaint(); - virtual void durationChanged(); - virtual void rateChanged(); - virtual void sizeChanged(); - virtual void sawUnsupportedTracks(); - virtual float volume() const; - - // MediaPlayerPrivateInterface methods: - virtual void load(const WTF::String& url); - virtual void cancelLoad(); -#if USE(ACCELERATED_COMPOSITING) - virtual WebCore::PlatformLayer* platformLayer() const; -#endif - virtual WebCore::PlatformMedia platformMedia() const; - virtual void play(); - virtual void pause(); - virtual bool supportsFullscreen() const; - virtual bool supportsSave() const; - virtual WebCore::IntSize naturalSize() const; - virtual bool hasVideo() const; - virtual bool hasAudio() const; - virtual void setVisible(bool); - virtual float duration() const; - virtual float currentTime() const; - virtual void seek(float time); - virtual bool seeking() const; - virtual void setEndTime(float time); - virtual void setRate(float); - virtual bool paused() const; - virtual void setVolume(float); - virtual WebCore::MediaPlayer::NetworkState networkState() const; - virtual WebCore::MediaPlayer::ReadyState readyState() const; - virtual float maxTimeSeekable() const; - virtual WTF::PassRefPtr<WebCore::TimeRanges> buffered() const; - virtual int dataRate() const; - virtual void setAutobuffer(bool); - virtual bool totalBytesKnown() const; - virtual unsigned totalBytes() const; - virtual unsigned bytesLoaded() const; - virtual void setSize(const WebCore::IntSize&); - virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&); - virtual bool hasSingleSecurityOrigin() const; - virtual WebCore::MediaPlayer::MovieLoadType movieLoadType() const; -#if USE(ACCELERATED_COMPOSITING) - virtual bool supportsAcceleratedRendering() const; - - // VideoFrameProvider methods: - virtual WebCore::VideoFrameChromium* getCurrentFrame(); - virtual void putCurrentFrame(WebCore::VideoFrameChromium*); -#endif - -private: - WebMediaPlayerClientImpl(); - - static WebCore::MediaPlayerPrivateInterface* create(WebCore::MediaPlayer*); - static void getSupportedTypes(WTF::HashSet<WTF::String>&); - static WebCore::MediaPlayer::SupportsType supportsType( - const WTF::String& type, const WTF::String& codecs); - - WebCore::MediaPlayer* m_mediaPlayer; - OwnPtr<WebMediaPlayer> m_webMediaPlayer; -#if USE(ACCELERATED_COMPOSITING) - RefPtr<WebCore::VideoLayerChromium> m_videoLayer; - bool m_supportsAcceleratedCompositing; -#endif - static bool m_isEnabled; -}; - -} // namespace WebKit - -#endif - -#endif diff --git a/WebKit/chromium/src/WebMutationEvent.cpp b/WebKit/chromium/src/WebMutationEvent.cpp deleted file mode 100644 index 511b615..0000000 --- a/WebKit/chromium/src/WebMutationEvent.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebMutationEvent.h" - -#include "MutationEvent.h" - -using namespace WebCore; - -namespace WebKit { - -WebNode WebMutationEvent::relatedNode() const -{ - return WebNode(constUnwrap<MutationEvent>()->relatedNode()); -} - -WebString WebMutationEvent::prevValue() const -{ - return WebString(constUnwrap<MutationEvent>()->prevValue()); -} - -WebString WebMutationEvent::newValue() const -{ - return WebString(constUnwrap<MutationEvent>()->newValue()); -} - -WebString WebMutationEvent::attrName() const -{ - return WebString(constUnwrap<MutationEvent>()->attrName()); -} - -WebMutationEvent::AttrChangeType WebMutationEvent::attrChange() const -{ - return static_cast<AttrChangeType>(constUnwrap<MutationEvent>()->attrChange()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebNamedNodeMap.cpp b/WebKit/chromium/src/WebNamedNodeMap.cpp deleted file mode 100644 index e2455e6..0000000 --- a/WebKit/chromium/src/WebNamedNodeMap.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebNamedNodeMap.h" - -#include "NamedNodeMap.h" -#include "Node.h" -#include "WebAttribute.h" -#include "WebNode.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -void WebNamedNodeMap::reset() -{ - m_private.reset(); -} - -void WebNamedNodeMap::assign(const WebNamedNodeMap& other) -{ - m_private = other.m_private; -} - -WebNamedNodeMap::WebNamedNodeMap(const PassRefPtr<NamedNodeMap>& other) - : m_private(other) -{ -} - -unsigned WebNamedNodeMap::length() const -{ - return m_private->length(); -} - -WebAttribute WebNamedNodeMap::attributeItem(unsigned index) const -{ - return WebAttribute(m_private->attributeItem(index)); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp deleted file mode 100644 index e91d1ee..0000000 --- a/WebKit/chromium/src/WebNode.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebNode.h" - -#include "Document.h" -#include "Element.h" -#include "Frame.h" -#include "FrameLoaderClientImpl.h" -#include "Node.h" -#include "NodeList.h" - -#include "EventListenerWrapper.h" -#include "WebDOMEvent.h" -#include "WebDOMEventListener.h" -#include "WebDocument.h" -#include "WebFrameImpl.h" -#include "WebNodeList.h" -#include "WebString.h" -#include "WebVector.h" - -#include "markup.h" - -using namespace WebCore; - -namespace WebKit { - -void WebNode::reset() -{ - m_private.reset(); -} - -void WebNode::assign(const WebNode& other) -{ - m_private = other.m_private; -} - -bool WebNode::equals(const WebNode& n) const -{ - return (m_private.get() == n.m_private.get()); -} - -bool WebNode::lessThan(const WebNode& n) const -{ - return (m_private.get() < n.m_private.get()); -} - -WebNode::NodeType WebNode::nodeType() const -{ - return static_cast<NodeType>(m_private->nodeType()); -} - -WebNode WebNode::parentNode() const -{ - return WebNode(const_cast<ContainerNode*>(m_private->parentNode())); -} - -WebString WebNode::nodeName() const -{ - return m_private->nodeName(); -} - -WebString WebNode::nodeValue() const -{ - return m_private->nodeValue(); -} - -bool WebNode::setNodeValue(const WebString& value) -{ - ExceptionCode exceptionCode = 0; - m_private->setNodeValue(value, exceptionCode); - return !exceptionCode; -} - -WebDocument WebNode::document() const -{ - return WebDocument(m_private->document()); -} - -WebNode WebNode::firstChild() const -{ - return WebNode(m_private->firstChild()); -} - -WebNode WebNode::lastChild() const -{ - return WebNode(m_private->lastChild()); -} - -WebNode WebNode::previousSibling() const -{ - return WebNode(m_private->previousSibling()); -} - -WebNode WebNode::nextSibling() const -{ - return WebNode(m_private->nextSibling()); -} - -bool WebNode::hasChildNodes() const -{ - return m_private->hasChildNodes(); -} - -WebNodeList WebNode::childNodes() -{ - return WebNodeList(m_private->childNodes()); -} - -WebString WebNode::createMarkup() const -{ - return WebCore::createMarkup(m_private.get()); -} - -bool WebNode::isTextNode() const -{ - return m_private->isTextNode(); -} - -bool WebNode::isContentEditable() const -{ - return m_private->isContentEditable(); -} - -bool WebNode::isElementNode() const -{ - return m_private->isElementNode(); -} - -void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture) -{ - EventListenerWrapper* listenerWrapper = - listener->createEventListenerWrapper(eventType, useCapture, m_private.get()); - // The listenerWrapper is only referenced by the actual Node. Once it goes - // away, the wrapper notifies the WebEventListener so it can clear its - // pointer to it. - m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture); -} - -void WebNode::removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture) -{ - EventListenerWrapper* listenerWrapper = - listener->getEventListenerWrapper(eventType, useCapture, m_private.get()); - m_private->removeEventListener(eventType, listenerWrapper, useCapture); - // listenerWrapper is now deleted. -} - -void WebNode::simulateClick() -{ - RefPtr<Event> noEvent; - m_private->dispatchSimulatedClick(noEvent); -} - -WebNodeList WebNode::getElementsByTagName(const WebString& tag) const -{ - return WebNodeList(m_private->getElementsByTagName(tag)); -} - -bool WebNode::hasNonEmptyBoundingBox() const -{ - return m_private->hasNonEmptyBoundingBox(); -} - -WebNode::WebNode(const PassRefPtr<Node>& node) - : m_private(node) -{ -} - -WebNode& WebNode::operator=(const PassRefPtr<Node>& node) -{ - m_private = node; - return *this; -} - -WebNode::operator PassRefPtr<Node>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebNodeCollection.cpp b/WebKit/chromium/src/WebNodeCollection.cpp deleted file mode 100644 index a9e532f..0000000 --- a/WebKit/chromium/src/WebNodeCollection.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebNodeCollection.h" - -#include "HTMLCollection.h" -#include "Node.h" -#include <wtf/PassRefPtr.h> - -#include "WebNode.h" - -using namespace WebCore; - -namespace WebKit { - -void WebNodeCollection::reset() -{ - assign(0); -} - -void WebNodeCollection::assign(const WebNodeCollection& other) -{ - HTMLCollection* p = const_cast<HTMLCollection*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -WebNodeCollection::WebNodeCollection(const PassRefPtr<HTMLCollection>& col) - : m_private(static_cast<HTMLCollection*>(col.releaseRef())) -{ -} - -void WebNodeCollection::assign(HTMLCollection* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -unsigned WebNodeCollection::length() const -{ - return m_private->length(); -} - -WebNode WebNodeCollection::nextItem() const -{ - return WebNode(m_private->nextItem()); -} - -WebNode WebNodeCollection::firstItem() const -{ - return WebNode(m_private->firstItem()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebNodeList.cpp b/WebKit/chromium/src/WebNodeList.cpp deleted file mode 100644 index f68f961..0000000 --- a/WebKit/chromium/src/WebNodeList.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebNodeList.h" - -#include "Node.h" -#include "NodeList.h" -#include <wtf/PassRefPtr.h> - -#include "WebNode.h" - -using namespace WebCore; - -namespace WebKit { - -void WebNodeList::reset() -{ - assign(0); -} - -void WebNodeList::assign(const WebNodeList& other) -{ - NodeList* p = const_cast<NodeList*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -WebNodeList::WebNodeList(const PassRefPtr<NodeList>& col) - : m_private(static_cast<NodeList*>(col.releaseRef())) -{ -} - -void WebNodeList::assign(NodeList* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -unsigned WebNodeList::length() const -{ - return m_private->length(); -} - -WebNode WebNodeList::item(size_t index) const -{ - return WebNode(m_private->item(index)); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp deleted file mode 100644 index c3b1f51..0000000 --- a/WebKit/chromium/src/WebNotification.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebNotification.h" - -#if ENABLE(NOTIFICATIONS) - -#include "Notification.h" -#include "UserGestureIndicator.h" - -#include "WebString.h" -#include "WebTextDirection.h" -#include "WebURL.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebNotificationPrivate : public Notification { -}; - -void WebNotification::reset() -{ - assign(0); -} - -void WebNotification::assign(const WebNotification& other) -{ - WebNotificationPrivate* p = const_cast<WebNotificationPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -bool WebNotification::lessThan(const WebNotification& other) const -{ - return reinterpret_cast<uintptr_t>(m_private) < reinterpret_cast<uintptr_t>(other.m_private); -} - -bool WebNotification::isHTML() const -{ - return m_private->isHTML(); -} - -WebURL WebNotification::url() const -{ - ASSERT(isHTML()); - return m_private->url(); -} - -WebURL WebNotification::iconURL() const -{ - ASSERT(!isHTML()); - return m_private->iconURL(); -} - -WebString WebNotification::title() const -{ - ASSERT(!isHTML()); - return m_private->contents().title(); -} - -WebString WebNotification::body() const -{ - ASSERT(!isHTML()); - return m_private->contents().body(); -} - -// FIXME: remove dir() when unreferenced. Being replaced by direction(). -WebString WebNotification::dir() const -{ - return m_private->dir(); -} - -WebTextDirection WebNotification::direction() const -{ - return (m_private->direction() == RTL) ? - WebTextDirectionRightToLeft : - WebTextDirectionLeftToRight; -} - -WebString WebNotification::replaceId() const -{ - return m_private->replaceId(); -} - -void WebNotification::detachPresenter() -{ - m_private->detachPresenter(); -} - -void WebNotification::dispatchDisplayEvent() -{ - RefPtr<Event> event = Event::create("display", false, true); - m_private->dispatchEvent(event.release()); -} - -void WebNotification::dispatchErrorEvent(const WebKit::WebString& /* errorMessage */) -{ - // FIXME: errorMessage not supported by WebCore yet - RefPtr<Event> event = Event::create(eventNames().errorEvent, false, true); - m_private->dispatchEvent(event.release()); -} - -void WebNotification::dispatchCloseEvent(bool /* byUser */) -{ - // FIXME: byUser flag not supported by WebCore yet - RefPtr<Event> event = Event::create(eventNames().closeEvent, false, true); - m_private->dispatchEvent(event.release()); -} - -void WebNotification::dispatchClickEvent() -{ - // Make sure clicks on notifications are treated as user gestures. - UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); - RefPtr<Event> event = Event::create(eventNames().clickEvent, false, true); - m_private->dispatchEvent(event.release()); -} - -WebNotification::WebNotification(const WTF::PassRefPtr<Notification>& notification) - : m_private(static_cast<WebNotificationPrivate*>(notification.releaseRef())) -{ -} - -WebNotification& WebNotification::operator=(const WTF::PassRefPtr<Notification>& notification) -{ - assign(static_cast<WebNotificationPrivate*>(notification.releaseRef())); - return *this; -} - -WebNotification::operator WTF::PassRefPtr<Notification>() const -{ - return WTF::PassRefPtr<Notification>(const_cast<WebNotificationPrivate*>(m_private)); -} - -void WebNotification::assign(WebNotificationPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit - -#endif // ENABLE(NOTIFICATIONS) diff --git a/WebKit/chromium/src/WebOptionElement.cpp b/WebKit/chromium/src/WebOptionElement.cpp deleted file mode 100644 index 49bff3b..0000000 --- a/WebKit/chromium/src/WebOptionElement.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebOptionElement.h" - -#include "HTMLNames.h" -#include "HTMLOptionElement.h" -#include "HTMLSelectElement.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -void WebOptionElement::setValue(const WebString& newValue) -{ - return unwrap<HTMLOptionElement>()->setValue(newValue); -} - -WebString WebOptionElement::value() const -{ - return constUnwrap<HTMLOptionElement>()->value(); -} - -int WebOptionElement::index() const -{ - return constUnwrap<HTMLOptionElement>()->index(); -} - -WebString WebOptionElement::text() const -{ - return constUnwrap<HTMLOptionElement>()->text(); -} - -bool WebOptionElement::defaultSelected() const -{ - return constUnwrap<HTMLOptionElement>()->defaultSelected(); -} - -void WebOptionElement::setDefaultSelected(bool newSelected) -{ - return unwrap<HTMLOptionElement>()->setDefaultSelected(newSelected); -} - -WebString WebOptionElement::label() const -{ - return constUnwrap<HTMLOptionElement>()->label(); -} - -bool WebOptionElement::isEnabled() const -{ - return !(constUnwrap<HTMLOptionElement>()->disabled()); -} - -WebOptionElement::WebOptionElement(const PassRefPtr<HTMLOptionElement>& elem) - : WebFormControlElement(elem) -{ -} - -WebOptionElement& WebOptionElement::operator=(const PassRefPtr<HTMLOptionElement>& elem) -{ - m_private = elem; - return *this; -} - -WebOptionElement::operator PassRefPtr<HTMLOptionElement>() const -{ - return static_cast<HTMLOptionElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializer.cpp b/WebKit/chromium/src/WebPageSerializer.cpp deleted file mode 100644 index 1fda484..0000000 --- a/WebKit/chromium/src/WebPageSerializer.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPageSerializer.h" - -#include "KURL.h" - -#include "WebFrame.h" -#include "WebPageSerializerClient.h" -#include "WebPageSerializerImpl.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebVector.h" - -#include <wtf/text/StringConcatenate.h> - -using namespace WebCore; - -namespace WebKit { - -bool WebPageSerializer::serialize(WebFrame* frame, - bool recursive, - WebPageSerializerClient* client, - const WebVector<WebURL>& links, - const WebVector<WebString>& localPaths, - const WebString& localDirectoryName) -{ - WebPageSerializerImpl serializerImpl( - frame, recursive, client, links, localPaths, localDirectoryName); - return serializerImpl.serialize(); -} - -WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset) -{ - return makeString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", static_cast<const String&>(charset), "\">"); -} - -WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url) -{ - return String::format("\n<!-- saved from url=(%04d)%s -->\n", - static_cast<int>(url.spec().length()), - url.spec().data()); -} - -WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTarget) -{ - if (baseTarget.isEmpty()) - return makeString("<base href=\".\">"); - return makeString("<base href=\".\" target=\"", static_cast<const String&>(baseTarget), "\">"); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp deleted file mode 100644 index 0d85d78..0000000 --- a/WebKit/chromium/src/WebPageSerializerImpl.cpp +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// How we handle the base tag better. -// Current status: -// At now the normal way we use to handling base tag is -// a) For those links which have corresponding local saved files, such as -// savable CSS, JavaScript files, they will be written to relative URLs which -// point to local saved file. Why those links can not be resolved as absolute -// file URLs, because if they are resolved as absolute URLs, after moving the -// file location from one directory to another directory, the file URLs will -// be dead links. -// b) For those links which have not corresponding local saved files, such as -// links in A, AREA tags, they will be resolved as absolute URLs. -// c) We comment all base tags when serialzing DOM for the page. -// FireFox also uses above way to handle base tag. -// -// Problem: -// This way can not handle the following situation: -// the base tag is written by JavaScript. -// For example. The page "www.yahoo.com" use -// "document.write('<base href="http://www.yahoo.com/"...');" to setup base URL -// of page when loading page. So when saving page as completed-HTML, we assume -// that we save "www.yahoo.com" to "c:\yahoo.htm". After then we load the saved -// completed-HTML page, then the JavaScript will insert a base tag -// <base href="http://www.yahoo.com/"...> to DOM, so all URLs which point to -// local saved resource files will be resolved as -// "http://www.yahoo.com/yahoo_files/...", which will cause all saved resource -// files can not be loaded correctly. Also the page will be rendered ugly since -// all saved sub-resource files (such as CSS, JavaScript files) and sub-frame -// files can not be fetched. -// Now FireFox, IE and WebKit based Browser all have this problem. -// -// Solution: -// My solution is that we comment old base tag and write new base tag: -// <base href="." ...> after the previous commented base tag. In WebKit, it -// always uses the latest "href" attribute of base tag to set document's base -// URL. Based on this behavior, when we encounter a base tag, we comment it and -// write a new base tag <base href="."> after the previous commented base tag. -// The new added base tag can help engine to locate correct base URL for -// correctly loading local saved resource files. Also I think we need to inherit -// the base target value from document object when appending new base tag. -// If there are multiple base tags in original document, we will comment all old -// base tags and append new base tag after each old base tag because we do not -// know those old base tags are original content or added by JavaScript. If -// they are added by JavaScript, it means when loading saved page, the script(s) -// will still insert base tag(s) to DOM, so the new added base tag(s) can -// override the incorrect base URL and make sure we alway load correct local -// saved resource files. - -#include "config.h" -#include "WebPageSerializerImpl.h" - -#include "Document.h" -#include "DocumentType.h" -#include "Element.h" -#include "FrameLoader.h" -#include "HTMLAllCollection.h" -#include "HTMLElement.h" -#include "HTMLFormElement.h" -#include "HTMLMetaElement.h" -#include "HTMLNames.h" -#include "KURL.h" -#include "TextEncoding.h" -#include "markup.h" - -#include "DOMUtilitiesPrivate.h" -#include "WebFrameImpl.h" -#include "WebURL.h" -#include "WebVector.h" - -using namespace WebCore; - -namespace WebKit { - -// Maximum length of data buffer which is used to temporary save generated -// html content data. This is a soft limit which might be passed if a very large -// contegious string is found in the page. -static const unsigned dataBufferCapacity = 65536; - -WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& url, - const TextEncoding& textEncoding, - Document* document, - const String& directoryName) - : url(url) - , textEncoding(textEncoding) - , document(document) - , directoryName(directoryName) - , isHTMLDocument(document->isHTMLDocument()) - , haveSeenDocType(false) - , haveAddedCharsetDeclaration(false) - , skipMetaElement(0) - , isInScriptOrStyleTag(false) - , haveAddedXMLProcessingDirective(false) - , haveAddedContentsBeforeEnd(false) -{ -} - -String WebPageSerializerImpl::preActionBeforeSerializeOpenTag( - const Element* element, SerializeDomParam* param, bool* needSkip) -{ - StringBuilder result; - - *needSkip = false; - if (param->isHTMLDocument) { - // Skip the open tag of original META tag which declare charset since we - // have overrided the META which have correct charset declaration after - // serializing open tag of HEAD element. - if (element->hasTagName(HTMLNames::metaTag)) { - const HTMLMetaElement* meta = static_cast<const HTMLMetaElement*>(element); - // Check whether the META tag has declared charset or not. - String equiv = meta->httpEquiv(); - if (equalIgnoringCase(equiv, "content-type")) { - String content = meta->content(); - if (content.length() && content.contains("charset", false)) { - // Find META tag declared charset, we need to skip it when - // serializing DOM. - param->skipMetaElement = element; - *needSkip = true; - } - } - } else if (element->hasTagName(HTMLNames::htmlTag)) { - // Check something before processing the open tag of HEAD element. - // First we add doc type declaration if original document has it. - if (!param->haveSeenDocType) { - param->haveSeenDocType = true; - result.append(createMarkup(param->document->doctype())); - } - - // Add MOTW declaration before html tag. - // See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx. - result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->url)); - } else if (element->hasTagName(HTMLNames::baseTag)) { - // Comment the BASE tag when serializing dom. - result.append("<!--"); - } - } else { - // Write XML declaration. - if (!param->haveAddedXMLProcessingDirective) { - param->haveAddedXMLProcessingDirective = true; - // Get encoding info. - String xmlEncoding = param->document->xmlEncoding(); - if (xmlEncoding.isEmpty()) - xmlEncoding = param->document->frame()->loader()->writer()->encoding(); - if (xmlEncoding.isEmpty()) - xmlEncoding = UTF8Encoding().name(); - result.append("<?xml version=\""); - result.append(param->document->xmlVersion()); - result.append("\" encoding=\""); - result.append(xmlEncoding); - if (param->document->xmlStandalone()) - result.append("\" standalone=\"yes"); - result.append("\"?>\n"); - } - // Add doc type declaration if original document has it. - if (!param->haveSeenDocType) { - param->haveSeenDocType = true; - result.append(createMarkup(param->document->doctype())); - } - } - return result.toString(); -} - -String WebPageSerializerImpl::postActionAfterSerializeOpenTag( - const Element* element, SerializeDomParam* param) -{ - StringBuilder result; - - param->haveAddedContentsBeforeEnd = false; - if (!param->isHTMLDocument) - return result.toString(); - // Check after processing the open tag of HEAD element - if (!param->haveAddedCharsetDeclaration - && element->hasTagName(HTMLNames::headTag)) { - param->haveAddedCharsetDeclaration = true; - // Check meta element. WebKit only pre-parse the first 512 bytes - // of the document. If the whole <HEAD> is larger and meta is the - // end of head part, then this kind of pages aren't decoded correctly - // because of this issue. So when we serialize the DOM, we need to - // make sure the meta will in first child of head tag. - // See http://bugs.webkit.org/show_bug.cgi?id=16621. - // First we generate new content for writing correct META element. - result.append(WebPageSerializer::generateMetaCharsetDeclaration( - String(param->textEncoding.name()))); - - param->haveAddedContentsBeforeEnd = true; - // Will search each META which has charset declaration, and skip them all - // in PreActionBeforeSerializeOpenTag. - } else if (element->hasTagName(HTMLNames::scriptTag) - || element->hasTagName(HTMLNames::styleTag)) { - param->isInScriptOrStyleTag = true; - } - - return result.toString(); -} - -String WebPageSerializerImpl::preActionBeforeSerializeEndTag( - const Element* element, SerializeDomParam* param, bool* needSkip) -{ - String result; - - *needSkip = false; - if (!param->isHTMLDocument) - return result; - // Skip the end tag of original META tag which declare charset. - // Need not to check whether it's META tag since we guarantee - // skipMetaElement is definitely META tag if it's not 0. - if (param->skipMetaElement == element) - *needSkip = true; - else if (element->hasTagName(HTMLNames::scriptTag) - || element->hasTagName(HTMLNames::styleTag)) { - ASSERT(param->isInScriptOrStyleTag); - param->isInScriptOrStyleTag = false; - } - - return result; -} - -// After we finish serializing end tag of a element, we give the target -// element a chance to do some post work to add some additional data. -String WebPageSerializerImpl::postActionAfterSerializeEndTag( - const Element* element, SerializeDomParam* param) -{ - StringBuilder result; - - if (!param->isHTMLDocument) - return result.toString(); - // Comment the BASE tag when serializing DOM. - if (element->hasTagName(HTMLNames::baseTag)) { - result.append("-->"); - // Append a new base tag declaration. - result.append(WebPageSerializer::generateBaseTagDeclaration( - param->document->baseTarget())); - } - - return result.toString(); -} - -void WebPageSerializerImpl::saveHTMLContentToBuffer( - const String& result, SerializeDomParam* param) -{ - m_dataBuffer.append(result); - encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsNotFinished, - param, - DoNotForceFlush); -} - -void WebPageSerializerImpl::encodeAndFlushBuffer( - WebPageSerializerClient::PageSerializationStatus status, - SerializeDomParam* param, - FlushOption flushOption) -{ - // Data buffer is not full nor do we want to force flush. - if (flushOption != ForceFlush && m_dataBuffer.length() <= dataBufferCapacity) - return; - - String content = m_dataBuffer.toString(); - m_dataBuffer = StringBuilder(); - - // Convert the unicode content to target encoding - CString encodedContent = param->textEncoding.encode( - content.characters(), content.length(), EntitiesForUnencodables); - - // Send result to the client. - m_client->didSerializeDataForFrame(param->url, - WebCString(encodedContent.data(), encodedContent.length()), - status); -} - -void WebPageSerializerImpl::openTagToString(const Element* element, - SerializeDomParam* param) -{ - // FIXME: use StringBuilder instead of String. - bool needSkip; - // Do pre action for open tag. - String result = preActionBeforeSerializeOpenTag(element, param, &needSkip); - if (needSkip) - return; - // Add open tag - result += "<" + element->nodeName().lower(); - // Go through all attributes and serialize them. - const NamedNodeMap *attrMap = element->attributes(true); - if (attrMap) { - unsigned numAttrs = attrMap->length(); - for (unsigned i = 0; i < numAttrs; i++) { - result += " "; - // Add attribute pair - const Attribute *attribute = attrMap->attributeItem(i); - result += attribute->name().toString(); - result += "=\""; - if (!attribute->value().isEmpty()) { - const String& attrValue = attribute->value(); - - // Check whether we need to replace some resource links - // with local resource paths. - const QualifiedName& attrName = attribute->name(); - if (elementHasLegalLinkAttribute(element, attrName)) { - // For links start with "javascript:", we do not change it. - if (attrValue.startsWith("javascript:", false)) - result += attrValue; - else { - // Get the absolute link - String completeURL = param->document->completeURL(attrValue); - // Check whether we have local files for those link. - if (m_localLinks.contains(completeURL)) { - if (!m_localDirectoryName.isEmpty()) - result += "./" + m_localDirectoryName + "/"; - result += m_localLinks.get(completeURL); - } else - result += completeURL; - } - } else { - if (param->isHTMLDocument) - result += m_htmlEntities.convertEntitiesInString(attrValue); - else - result += m_xmlEntities.convertEntitiesInString(attrValue); - } - } - result += "\""; - } - } - - // Do post action for open tag. - String addedContents = postActionAfterSerializeOpenTag(element, param); - // Complete the open tag for element when it has child/children. - if (element->hasChildNodes() || param->haveAddedContentsBeforeEnd) - result += ">"; - // Append the added contents generate in post action of open tag. - result += addedContents; - // Save the result to data buffer. - saveHTMLContentToBuffer(result, param); -} - -// Serialize end tag of an specified element. -void WebPageSerializerImpl::endTagToString(const Element* element, - SerializeDomParam* param) -{ - bool needSkip; - // Do pre action for end tag. - String result = preActionBeforeSerializeEndTag(element, - param, - &needSkip); - if (needSkip) - return; - // Write end tag when element has child/children. - if (element->hasChildNodes() || param->haveAddedContentsBeforeEnd) { - result += "</"; - result += element->nodeName().lower(); - result += ">"; - } else { - // Check whether we have to write end tag for empty element. - if (param->isHTMLDocument) { - result += ">"; - // FIXME: This code is horribly wrong. WebPageSerializerImpl must die. - if (!static_cast<const HTMLElement*>(element)->ieForbidsInsertHTML()) { - // We need to write end tag when it is required. - result += "</"; - result += element->nodeName().lower(); - result += ">"; - } - } else { - // For xml base document. - result += " />"; - } - } - // Do post action for end tag. - result += postActionAfterSerializeEndTag(element, param); - // Save the result to data buffer. - saveHTMLContentToBuffer(result, param); -} - -void WebPageSerializerImpl::buildContentForNode(const Node* node, - SerializeDomParam* param) -{ - switch (node->nodeType()) { - case Node::ELEMENT_NODE: - // Process open tag of element. - openTagToString(static_cast<const Element*>(node), param); - // Walk through the children nodes and process it. - for (const Node *child = node->firstChild(); child; child = child->nextSibling()) - buildContentForNode(child, param); - // Process end tag of element. - endTagToString(static_cast<const Element*>(node), param); - break; - case Node::TEXT_NODE: - saveHTMLContentToBuffer(createMarkup(node), param); - break; - case Node::ATTRIBUTE_NODE: - case Node::DOCUMENT_NODE: - case Node::DOCUMENT_FRAGMENT_NODE: - // Should not exist. - ASSERT_NOT_REACHED(); - break; - // Document type node can be in DOM? - case Node::DOCUMENT_TYPE_NODE: - param->haveSeenDocType = true; - default: - // For other type node, call default action. - saveHTMLContentToBuffer(createMarkup(node), param); - break; - } -} - -WebPageSerializerImpl::WebPageSerializerImpl(WebFrame* frame, - bool recursiveSerialization, - WebPageSerializerClient* client, - const WebVector<WebURL>& links, - const WebVector<WebString>& localPaths, - const WebString& localDirectoryName) - : m_client(client) - , m_recursiveSerialization(recursiveSerialization) - , m_framesCollected(false) - , m_localDirectoryName(localDirectoryName) - , m_htmlEntities(false) - , m_xmlEntities(true) -{ - // Must specify available webframe. - ASSERT(frame); - m_specifiedWebFrameImpl = static_cast<WebFrameImpl*>(frame); - // Make sure we have non 0 client. - ASSERT(client); - // Build local resources map. - ASSERT(links.size() == localPaths.size()); - for (size_t i = 0; i < links.size(); i++) { - KURL url = links[i]; - ASSERT(!m_localLinks.contains(url.string())); - m_localLinks.set(url.string(), localPaths[i]); - } - - ASSERT(m_dataBuffer.isEmpty()); -} - -void WebPageSerializerImpl::collectTargetFrames() -{ - ASSERT(!m_framesCollected); - m_framesCollected = true; - - // First, process main frame. - m_frames.append(m_specifiedWebFrameImpl); - // Return now if user only needs to serialize specified frame, not including - // all sub-frames. - if (!m_recursiveSerialization) - return; - // Collect all frames inside the specified frame. - for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) { - WebFrameImpl* currentFrame = m_frames[i]; - // Get current using document. - Document* currentDoc = currentFrame->frame()->document(); - // Go through sub-frames. - RefPtr<HTMLAllCollection> all = currentDoc->all(); - for (Node* node = all->firstItem(); node; node = all->nextItem()) { - if (!node->isHTMLElement()) - continue; - Element* element = static_cast<Element*>(node); - WebFrameImpl* webFrame = - WebFrameImpl::fromFrameOwnerElement(element); - if (webFrame) - m_frames.append(webFrame); - } - } -} - -bool WebPageSerializerImpl::serialize() -{ - if (!m_framesCollected) - collectTargetFrames(); - - bool didSerialization = false; - KURL mainURL = m_specifiedWebFrameImpl->frame()->document()->url(); - - for (unsigned i = 0; i < m_frames.size(); ++i) { - WebFrameImpl* webFrame = m_frames[i]; - Document* document = webFrame->frame()->document(); - const KURL& url = document->url(); - - if (!url.isValid() || !m_localLinks.contains(url.string())) - continue; - - didSerialization = true; - - String encoding = webFrame->frame()->loader()->writer()->encoding(); - const TextEncoding& textEncoding = encoding.isEmpty() ? UTF8Encoding() : TextEncoding(encoding); - String directoryName = url == mainURL ? m_localDirectoryName : ""; - - SerializeDomParam param(url, textEncoding, document, directoryName); - - Element* documentElement = document->documentElement(); - if (documentElement) - buildContentForNode(documentElement, ¶m); - - encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, ¶m, ForceFlush); - } - - ASSERT(m_dataBuffer.isEmpty()); - m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSerializerClient::AllFramesAreFinished); - return didSerialization; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPageSerializerImpl.h b/WebKit/chromium/src/WebPageSerializerImpl.h deleted file mode 100644 index 5ee8805..0000000 --- a/WebKit/chromium/src/WebPageSerializerImpl.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPageSerializerImpl_h -#define WebPageSerializerImpl_h - -#include <wtf/Forward.h> -#include <wtf/HashMap.h> -#include <wtf/Vector.h> -#include <wtf/text/StringBuilder.h> -#include <wtf/text/StringHash.h> -#include <wtf/text/WTFString.h> - -#include "WebEntities.h" -#include "WebPageSerializer.h" -#include "WebPageSerializerClient.h" -#include "WebString.h" -#include "WebURL.h" - -namespace WebCore { -class Document; -class Element; -class Node; -class TextEncoding; -} - -namespace WebKit { -class WebFrameImpl; - -// Get html data by serializing all frames of current page with lists -// which contain all resource links that have local copy. -// contain all saved auxiliary files included all sub frames and resources. -// This function will find out all frames and serialize them to HTML data. -// We have a data buffer to temporary saving generated html data. We will -// sequentially call WebViewDelegate::SendSerializedHtmlData once the data -// buffer is full. See comments of WebViewDelegate::SendSerializedHtmlData -// for getting more information. -class WebPageSerializerImpl { -public: - // Do serialization action. Return false means no available frame has been - // serialized, otherwise return true. - bool serialize(); - - // The parameter specifies which frame need to be serialized. - // The parameter recursive_serialization specifies whether we need to - // serialize all sub frames of the specified frame or not. - // The parameter delegate specifies the pointer of interface - // DomSerializerDelegate provide sink interface which can receive the - // individual chunks of data to be saved. - // The parameter links contain original URLs of all saved links. - // The parameter local_paths contain corresponding local file paths of all - // saved links, which matched with vector:links one by one. - // The parameter local_directory_name is relative path of directory which - // contain all saved auxiliary files included all sub frames and resources. - WebPageSerializerImpl(WebFrame* frame, - bool recursive, - WebPageSerializerClient* client, - const WebVector<WebURL>& links, - const WebVector<WebString>& localPaths, - const WebString& localDirectoryName); - -private: - // Specified frame which need to be serialized; - WebFrameImpl* m_specifiedWebFrameImpl; - // Pointer of WebPageSerializerClient - WebPageSerializerClient* m_client; - // This hash map is used to map resource URL of original link to its local - // file path. - typedef HashMap<WTF::String, WTF::String> LinkLocalPathMap; - // local_links_ include all pair of local resource path and corresponding - // original link. - LinkLocalPathMap m_localLinks; - // Data buffer for saving result of serialized DOM data. - StringBuilder m_dataBuffer; - // Passing true to recursive_serialization_ indicates we will serialize not - // only the specified frame but also all sub-frames in the specific frame. - // Otherwise we only serialize the specified frame excluded all sub-frames. - bool m_recursiveSerialization; - // Flag indicates whether we have collected all frames which need to be - // serialized or not; - bool m_framesCollected; - // Local directory name of all local resource files. - WTF::String m_localDirectoryName; - // Vector for saving all frames which need to be serialized. - Vector<WebFrameImpl*> m_frames; - - // Web entities conversion maps. - WebEntities m_htmlEntities; - WebEntities m_xmlEntities; - - struct SerializeDomParam { - const WebCore::KURL& url; - const WebCore::TextEncoding& textEncoding; - WebCore::Document* document; - const WTF::String& directoryName; - bool isHTMLDocument; // document.isHTMLDocument() - bool haveSeenDocType; - bool haveAddedCharsetDeclaration; - // This meta element need to be skipped when serializing DOM. - const WebCore::Element* skipMetaElement; - // Flag indicates we are in script or style tag. - bool isInScriptOrStyleTag; - bool haveAddedXMLProcessingDirective; - // Flag indicates whether we have added additional contents before end tag. - // This flag will be re-assigned in each call of function - // PostActionAfterSerializeOpenTag and it could be changed in function - // PreActionBeforeSerializeEndTag if the function adds new contents into - // serialization stream. - bool haveAddedContentsBeforeEnd; - - SerializeDomParam(const WebCore::KURL&, const WebCore::TextEncoding&, WebCore::Document*, const WTF::String& directoryName); - }; - - // Collect all target frames which need to be serialized. - void collectTargetFrames(); - // Before we begin serializing open tag of a element, we give the target - // element a chance to do some work prior to add some additional data. - WTF::String preActionBeforeSerializeOpenTag(const WebCore::Element* element, - SerializeDomParam* param, - bool* needSkip); - // After we finish serializing open tag of a element, we give the target - // element a chance to do some post work to add some additional data. - WTF::String postActionAfterSerializeOpenTag(const WebCore::Element* element, - SerializeDomParam* param); - // Before we begin serializing end tag of a element, we give the target - // element a chance to do some work prior to add some additional data. - WTF::String preActionBeforeSerializeEndTag(const WebCore::Element* element, - SerializeDomParam* param, - bool* needSkip); - // After we finish serializing end tag of a element, we give the target - // element a chance to do some post work to add some additional data. - WTF::String postActionAfterSerializeEndTag(const WebCore::Element* element, - SerializeDomParam* param); - // Save generated html content to data buffer. - void saveHTMLContentToBuffer(const WTF::String& content, - SerializeDomParam* param); - - enum FlushOption { - ForceFlush, - DoNotForceFlush, - }; - - // Flushes the content buffer by encoding and sending the content to the - // WebPageSerializerClient. Content is not flushed if the buffer is not full - // unless force is 1. - void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status, - SerializeDomParam* param, - FlushOption); - // Serialize open tag of an specified element. - void openTagToString(const WebCore::Element* element, - SerializeDomParam* param); - // Serialize end tag of an specified element. - void endTagToString(const WebCore::Element* element, - SerializeDomParam* param); - // Build content for a specified node - void buildContentForNode(const WebCore::Node* node, - SerializeDomParam* param); -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebPasswordFormData.cpp b/WebKit/chromium/src/WebPasswordFormData.cpp deleted file mode 100644 index eb230d5..0000000 --- a/WebKit/chromium/src/WebPasswordFormData.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPasswordFormData.h" - -#include "Document.h" -#include "DocumentLoader.h" -#include "Frame.h" -#include "FrameLoader.h" -#include "HTMLFormElement.h" -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "KURL.h" - -#include "DOMUtilitiesPrivate.h" -#include "WebPasswordFormUtils.h" - -using namespace WebCore; - -namespace WebKit { - -namespace { - -// Helper to determine which password is the main one, and which is -// an old password (e.g on a "make new password" form), if any. -bool locateSpecificPasswords(PasswordFormFields* fields, - HTMLInputElement** password, - HTMLInputElement** oldPassword) -{ - ASSERT(fields); - ASSERT(password); - ASSERT(oldPassword); - switch (fields->passwords.size()) { - case 1: - // Single password, easy. - *password = fields->passwords[0]; - break; - case 2: - if (fields->passwords[0]->value() == fields->passwords[1]->value()) - // Treat two identical passwords as a single password. - *password = fields->passwords[0]; - else { - // Assume first is old password, second is new (no choice but to guess). - *oldPassword = fields->passwords[0]; - *password = fields->passwords[1]; - } - break; - case 3: - if (fields->passwords[0]->value() == fields->passwords[1]->value() - && fields->passwords[0]->value() == fields->passwords[2]->value()) { - // All three passwords the same? Just treat as one and hope. - *password = fields->passwords[0]; - } else if (fields->passwords[0]->value() == fields->passwords[1]->value()) { - // Two the same and one different -> old password is duplicated one. - *oldPassword = fields->passwords[0]; - *password = fields->passwords[2]; - } else if (fields->passwords[1]->value() == fields->passwords[2]->value()) { - *oldPassword = fields->passwords[0]; - *password = fields->passwords[1]; - } else { - // Three different passwords, or first and last match with middle - // different. No idea which is which, so no luck. - return false; - } - break; - default: - return false; - } - return true; -} - -// Helped method to clear url of unneeded parts. -KURL stripURL(const KURL& url) -{ - KURL strippedURL = url; - strippedURL.setUser(String()); - strippedURL.setPass(String()); - strippedURL.setQuery(String()); - strippedURL.setFragmentIdentifier(String()); - return strippedURL; -} - -// Helper to gather up the final form data and create a PasswordForm. -void assemblePasswordFormResult(const KURL& fullOrigin, - const KURL& fullAction, - HTMLFormControlElement* submit, - HTMLInputElement* userName, - HTMLInputElement* oldPassword, - HTMLInputElement* password, - WebPasswordFormData* result) -{ - // We want to keep the path but strip any authentication data, as well as - // query and ref portions of URL, for the form action and form origin. - result->action = stripURL(fullAction); - result->origin = stripURL(fullOrigin); - - // Naming is confusing here because we have both the HTML form origin URL - // the page where the form was seen), and the "origin" components of the url - // (scheme, host, and port). - KURL signonRealmURL = stripURL(fullOrigin); - signonRealmURL.setPath(""); - result->signonRealm = signonRealmURL; - - if (submit) - result->submitElement = submit->name(); - if (userName) { - result->userNameElement = userName->name(); - result->userNameValue = userName->value(); - } - if (password) { - result->passwordElement = password->name(); - result->passwordValue = password->value(); - } - if (oldPassword) { - result->oldPasswordElement = oldPassword->name(); - result->oldPasswordValue = oldPassword->value(); - } -} - -} // namespace - -WebPasswordFormData::WebPasswordFormData(const WebFormElement& webForm) -{ - RefPtr<HTMLFormElement> form = webForm.operator PassRefPtr<HTMLFormElement>(); - - Frame* frame = form->document()->frame(); - if (!frame) - return; - - PasswordFormFields fields; - findPasswordFormFields(form.get(), &fields); - - // Get the document URL - KURL fullOrigin(ParsedURLString, form->document()->documentURI()); - - // Calculate the canonical action URL - String action = form->action(); - if (action.isNull()) - action = ""; // missing 'action' attribute implies current URL - KURL fullAction = frame->loader()->completeURL(action); - if (!fullAction.isValid()) - return; - - // Determine the types of the password fields - HTMLInputElement* password = 0; - HTMLInputElement* oldPassword = 0; - if (!locateSpecificPasswords(&fields, &password, &oldPassword)) - return; - - assemblePasswordFormResult(fullOrigin, fullAction, - fields.submit, fields.userName, - oldPassword, password, this); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPasswordFormUtils.cpp b/WebKit/chromium/src/WebPasswordFormUtils.cpp deleted file mode 100644 index 5f8a1ec..0000000 --- a/WebKit/chromium/src/WebPasswordFormUtils.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** -* Version: MPL 1.1/GPL 2.0/LGPL 2.1 -* -* The contents of this file are subject to the Mozilla Public License Version -* 1.1 (the "License"); you may not use this file except in compliance with -* the License. You may obtain a copy of the License at -* http://www.mozilla.org/MPL/ -* -* Software distributed under the License is distributed on an "AS IS" basis, -* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -* for the specific language governing rights and limitations under the -* License. -* -* The Original Code is Mozilla Password Manager. -* -* The Initial Developer of the Original Code is -* Brian Ryner. -* Portions created by the Initial Developer are Copyright (C) 2003 -* the Initial Developer. All Rights Reserved. -* -* Contributor(s): -* Brian Ryner <bryner@brianryner.com> -* -* Alternatively, the contents of this file may be used under the terms of -* either the GNU General Public License Version 2 or later (the "GPL"), or -* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -* in which case the provisions of the GPL or the LGPL are applicable instead -* of those above. If you wish to allow use of your version of this file only -* under the terms of either the GPL or the LGPL, and not to allow others to -* use your version of this file under the terms of the MPL, indicate your -* decision by deleting the provisions above and replace them with the notice -* and other provisions required by the GPL or the LGPL. If you do not delete -* the provisions above, a recipient may use your version of this file under -* the terms of any one of the MPL, the GPL or the LGPL. -* -* ***** END LICENSE BLOCK ***** */ - -// Helper to WebPasswordFormData to do the locating of username/password -// fields. -// This method based on Firefox2 code in -// toolkit/components/passwordmgr/base/nsPasswordManager.cpp - -#include "config.h" -#include "WebPasswordFormUtils.h" - -#include "HTMLFormElement.h" -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "KURL.h" - -#include "DOMUtilitiesPrivate.h" - -using namespace WebCore; - -namespace WebKit { - -// Maximum number of password fields we will observe before throwing our -// hands in the air and giving up with a given form. -static const size_t maxPasswords = 3; - -void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields) -{ - ASSERT(form); - ASSERT(fields); - - int firstPasswordIndex = 0; - // First, find the password fields and activated submit button - const Vector<FormAssociatedElement*>& formElements = form->associatedElements(); - for (size_t i = 0; i < formElements.size(); i++) { - if (!formElements[i]->isFormControlElement()) - continue; - HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(formElements[i]); - if (formElement->isActivatedSubmit()) - fields->submit = formElement; - - if (!formElement->hasLocalName(HTMLNames::inputTag)) - continue; - - HTMLInputElement* inputElement = toHTMLInputElement(formElement); - if (!inputElement->isEnabledFormControl()) - continue; - - if ((fields->passwords.size() < maxPasswords) - && inputElement->isPasswordField() - && inputElement->autoComplete()) { - if (fields->passwords.isEmpty()) - firstPasswordIndex = i; - fields->passwords.append(inputElement); - } - } - - if (!fields->passwords.isEmpty()) { - // Then, search backwards for the username field - for (int i = firstPasswordIndex - 1; i >= 0; i--) { - if (!formElements[i]->isFormControlElement()) - continue; - HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(formElements[i]); - if (!formElement->hasLocalName(HTMLNames::inputTag)) - continue; - - HTMLInputElement* inputElement = toHTMLInputElement(formElement); - if (!inputElement->isEnabledFormControl()) - continue; - - // Various input types such as text, url, email can be a username field. - if ((inputElement->isTextField() && !inputElement->isPasswordField()) - && (inputElement->autoComplete())) { - fields->userName = inputElement; - break; - } - } - } -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPasswordFormUtils.h b/WebKit/chromium/src/WebPasswordFormUtils.h deleted file mode 100644 index fd503b4..0000000 --- a/WebKit/chromium/src/WebPasswordFormUtils.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPasswordFormUtils_h -#define WebPasswordFormUtils_h - -#include <wtf/Vector.h> - -namespace WebCore { -class HTMLInputElement; -class HTMLFormControlElement; -class HTMLFormElement; -} - -namespace WebKit { - -// Helper structure to locate username, passwords and submit fields. -struct PasswordFormFields { - WebCore::HTMLInputElement* userName; - Vector<WebCore::HTMLInputElement*> passwords; - WebCore::HTMLFormControlElement* submit; - PasswordFormFields() : userName(0), submit(0) { } -}; - -void findPasswordFormFields(WebCore::HTMLFormElement* form, - PasswordFormFields* fields); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebPerformance.cpp b/WebKit/chromium/src/WebPerformance.cpp deleted file mode 100644 index 8c377db..0000000 --- a/WebKit/chromium/src/WebPerformance.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPerformance.h" - -#include "Performance.h" - -using namespace WebCore; - -namespace WebKit { - -static double millisecondsToSeconds(unsigned long long milliseconds) -{ - return static_cast<double>(milliseconds / 1000.0); -} - -void WebPerformance::reset() -{ - m_private.reset(); -} - -void WebPerformance::assign(const WebPerformance& other) -{ - m_private = other.m_private; -} - -WebNavigationType WebPerformance::navigationType() const -{ - switch (m_private->navigation()->type()) { - case PerformanceNavigation::TYPE_NAVIGATE: - return WebNavigationTypeOther; - case PerformanceNavigation::TYPE_RELOAD: - return WebNavigationTypeReload; - case PerformanceNavigation::TYPE_BACK_FORWARD: - return WebNavigationTypeBackForward; - case PerformanceNavigation::TYPE_RESERVED: - return WebNavigationTypeOther; - } - ASSERT_NOT_REACHED(); - return WebNavigationTypeOther; -} - -double WebPerformance::navigationStart() const -{ - return millisecondsToSeconds(m_private->timing()->navigationStart()); -} - -double WebPerformance::unloadEventEnd() const -{ - return millisecondsToSeconds(m_private->timing()->unloadEventEnd()); -} - -double WebPerformance::redirectStart() const -{ - return millisecondsToSeconds(m_private->timing()->redirectStart()); -} - -double WebPerformance::redirectEnd() const -{ - return millisecondsToSeconds(m_private->timing()->redirectEnd()); -} - -unsigned short WebPerformance::redirectCount() const -{ - return m_private->navigation()->redirectCount(); -} - -double WebPerformance::fetchStart() const -{ - return millisecondsToSeconds(m_private->timing()->fetchStart()); -} - -double WebPerformance::domainLookupStart() const -{ - return millisecondsToSeconds(m_private->timing()->domainLookupStart()); -} - -double WebPerformance::domainLookupEnd() const -{ - return millisecondsToSeconds(m_private->timing()->domainLookupEnd()); -} - -double WebPerformance::connectStart() const -{ - return millisecondsToSeconds(m_private->timing()->connectStart()); -} - -double WebPerformance::connectEnd() const -{ - return millisecondsToSeconds(m_private->timing()->connectEnd()); -} - -double WebPerformance::requestStart() const -{ - return millisecondsToSeconds(m_private->timing()->requestStart()); -} - -double WebPerformance::responseStart() const -{ - return millisecondsToSeconds(m_private->timing()->responseStart()); -} - -double WebPerformance::responseEnd() const -{ - return millisecondsToSeconds(m_private->timing()->responseEnd()); -} - -double WebPerformance::domLoading() const -{ - return millisecondsToSeconds(m_private->timing()->domLoading()); -} - -double WebPerformance::domInteractive() const -{ - return millisecondsToSeconds(m_private->timing()->domInteractive()); -} - -double WebPerformance::domContentLoadedEventStart() const -{ - return millisecondsToSeconds(m_private->timing()->domContentLoadedEventStart()); -} - -double WebPerformance::domContentLoadedEventEnd() const -{ - return millisecondsToSeconds(m_private->timing()->domContentLoadedEventEnd()); -} - -double WebPerformance::domComplete() const -{ - return millisecondsToSeconds(m_private->timing()->domComplete()); -} - -double WebPerformance::loadEventStart() const -{ - return millisecondsToSeconds(m_private->timing()->loadEventStart()); -} - -double WebPerformance::loadEventEnd() const -{ - return millisecondsToSeconds(m_private->timing()->loadEventEnd()); -} - -WebPerformance::WebPerformance(const PassRefPtr<Performance>& performance) - : m_private(performance) -{ -} - -WebPerformance& WebPerformance::operator=(const PassRefPtr<Performance>& performance) -{ - m_private = performance; - return *this; -} - -WebPerformance::operator PassRefPtr<Performance>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp deleted file mode 100644 index 90c7f65..0000000 --- a/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPluginContainerImpl.h" - -#include "Chrome.h" -#include "ChromeClientImpl.h" -#include "PluginLayerChromium.h" -#include "WebClipboard.h" -#include "WebCursorInfo.h" -#include "WebDataSourceImpl.h" -#include "WebElement.h" -#include "WebInputEvent.h" -#include "WebInputEventConversion.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebPlugin.h" -#include "WebRect.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebURLError.h" -#include "WebURLRequest.h" -#include "WebVector.h" -#include "WebViewImpl.h" -#include "WrappedResourceResponse.h" - -#include "EventNames.h" -#include "FocusController.h" -#include "FormState.h" -#include "Frame.h" -#include "FrameLoadRequest.h" -#include "FrameView.h" -#include "GraphicsContext.h" -#include "HostWindow.h" -#include "HTMLFormElement.h" -#include "HTMLNames.h" -#include "HTMLPlugInElement.h" -#include "KeyboardCodes.h" -#include "KeyboardEvent.h" -#include "MouseEvent.h" -#include "Page.h" -#include "RenderBox.h" -#include "ScrollView.h" -#include "WheelEvent.h" - -#if WEBKIT_USING_SKIA -#include "PlatformContextSkia.h" -#endif - -using namespace WebCore; - -namespace WebKit { - -// Public methods -------------------------------------------------------------- - -void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect) -{ - Widget::setFrameRect(frameRect); - reportGeometry(); -} - -void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRect) -{ - if (gc->paintingDisabled()) - return; - - if (!parent()) - return; - - // Don't paint anything if the plugin doesn't intersect the damage rect. - if (!frameRect().intersects(damageRect)) - return; - - gc->save(); - - ASSERT(parent()->isFrameView()); - ScrollView* view = parent(); - - // The plugin is positioned in window coordinates, so it needs to be painted - // in window coordinates. - IntPoint origin = view->windowToContents(IntPoint(0, 0)); - gc->translate(static_cast<float>(origin.x()), static_cast<float>(origin.y())); - -#if WEBKIT_USING_SKIA - WebCanvas* canvas = gc->platformContext()->canvas(); -#elif WEBKIT_USING_CG - WebCanvas* canvas = gc->platformContext(); -#endif - - IntRect windowRect = - IntRect(view->contentsToWindow(damageRect.location()), damageRect.size()); - m_webPlugin->paint(canvas, windowRect); - - gc->restore(); -} - -void WebPluginContainerImpl::invalidateRect(const IntRect& rect) -{ - if (!parent()) - return; - - IntRect damageRect = convertToContainingWindow(rect); - - // Get our clip rect and intersect with it to ensure we don't invalidate - // too much. - IntRect clipRect = parent()->windowClipRect(); - damageRect.intersect(clipRect); - - parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/); -} - -void WebPluginContainerImpl::setFocus(bool focused) -{ - Widget::setFocus(focused); - m_webPlugin->updateFocus(focused); -} - -void WebPluginContainerImpl::show() -{ - setSelfVisible(true); - m_webPlugin->updateVisibility(true); - - Widget::show(); -} - -void WebPluginContainerImpl::hide() -{ - setSelfVisible(false); - m_webPlugin->updateVisibility(false); - - Widget::hide(); -} - -void WebPluginContainerImpl::handleEvent(Event* event) -{ - if (!m_webPlugin->acceptsInputEvents()) - return; - - // The events we pass are defined at: - // http://devedge-temp.mozilla.org/library/manuals/2002/plugin/1.0/structures5.html#1000000 - // Don't take the documentation as truth, however. There are many cases - // where mozilla behaves differently than the spec. - if (event->isMouseEvent()) - handleMouseEvent(static_cast<MouseEvent*>(event)); - else if (event->isWheelEvent()) - handleWheelEvent(static_cast<WheelEvent*>(event)); - else if (event->isKeyboardEvent()) - handleKeyboardEvent(static_cast<KeyboardEvent*>(event)); - - // FIXME: it would be cleaner if Widget::handleEvent returned true/false and - // HTMLPluginElement called setDefaultHandled or defaultEventHandler. - if (!event->defaultHandled()) - m_element->Node::defaultEventHandler(event); -} - -void WebPluginContainerImpl::frameRectsChanged() -{ - Widget::frameRectsChanged(); - reportGeometry(); -} - -void WebPluginContainerImpl::widgetPositionsUpdated() -{ - Widget::widgetPositionsUpdated(); - reportGeometry(); -} - -void WebPluginContainerImpl::setParentVisible(bool parentVisible) -{ - // We override this function to make sure that geometry updates are sent - // over to the plugin. For e.g. when a plugin is instantiated it does not - // have a valid parent. As a result the first geometry update from webkit - // is ignored. This function is called when the plugin eventually gets a - // parent. - - if (isParentVisible() == parentVisible) - return; // No change. - - Widget::setParentVisible(parentVisible); - if (!isSelfVisible()) - return; // This widget has explicitely been marked as not visible. - - m_webPlugin->updateVisibility(isVisible()); -} - -void WebPluginContainerImpl::setParent(ScrollView* view) -{ - // We override this function so that if the plugin is windowed, we can call - // NPP_SetWindow at the first possible moment. This ensures that - // NPP_SetWindow is called before the manual load data is sent to a plugin. - // If this order is reversed, Flash won't load videos. - - Widget::setParent(view); - if (view) - reportGeometry(); -} - -bool WebPluginContainerImpl::supportsPaginatedPrint() const -{ - return m_webPlugin->supportsPaginatedPrint(); -} - -int WebPluginContainerImpl::printBegin(const IntRect& printableArea, - int printerDPI) const -{ - return m_webPlugin->printBegin(printableArea, printerDPI); -} - -bool WebPluginContainerImpl::printPage(int pageNumber, - WebCore::GraphicsContext* gc) -{ - gc->save(); -#if WEBKIT_USING_SKIA - WebCanvas* canvas = gc->platformContext()->canvas(); -#elif WEBKIT_USING_CG - WebCanvas* canvas = gc->platformContext(); -#endif - bool ret = m_webPlugin->printPage(pageNumber, canvas); - gc->restore(); - return ret; -} - -void WebPluginContainerImpl::printEnd() -{ - return m_webPlugin->printEnd(); -} - -void WebPluginContainerImpl::copy() -{ - if (!plugin()->hasSelection()) - return; - - webKitClient()->clipboard()->writeHTML(plugin()->selectionAsMarkup(), WebURL(), plugin()->selectionAsText(), false); -} - -WebElement WebPluginContainerImpl::element() -{ - return WebElement(m_element); -} - -void WebPluginContainerImpl::invalidate() -{ - Widget::invalidate(); -} - -void WebPluginContainerImpl::invalidateRect(const WebRect& rect) -{ - invalidateRect(static_cast<IntRect>(rect)); -} - -void WebPluginContainerImpl::scrollRect(int dx, int dy, const WebRect& rect) -{ - Widget* parentWidget = parent(); - if (parentWidget->isFrameView()) { - FrameView* parentFrameView = static_cast<FrameView*>(parentWidget); - if (!parentFrameView->isOverlapped()) { - IntRect damageRect = convertToContainingWindow(static_cast<IntRect>(rect)); - IntSize scrollDelta(dx, dy); - // scroll() only uses the second rectangle, clipRect, and ignores the first - // rectangle. - parent()->hostWindow()->scroll(scrollDelta, damageRect, damageRect); - return; - } - } - - // Use slow scrolling instead. - invalidateRect(rect); -} - -void WebPluginContainerImpl::reportGeometry() -{ - if (!parent()) - return; - - IntRect windowRect, clipRect; - Vector<IntRect> cutOutRects; - calculateGeometry(frameRect(), windowRect, clipRect, cutOutRects); - - m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible()); -} - -void WebPluginContainerImpl::commitBackingTexture() -{ -#if USE(ACCELERATED_COMPOSITING) - if (platformLayer()) - platformLayer()->setNeedsDisplay(); -#endif -} - -void WebPluginContainerImpl::clearScriptObjects() -{ - Frame* frame = m_element->document()->frame(); - if (!frame) - return; - frame->script()->cleanupScriptObjectsForPlugin(this); -} - -NPObject* WebPluginContainerImpl::scriptableObjectForElement() -{ - return m_element->getNPObject(); -} - -WebString WebPluginContainerImpl::executeScriptURL(const WebURL& url, bool popupsAllowed) -{ - Frame* frame = m_element->document()->frame(); - if (!frame) - return WebString(); - - const KURL& kurl = url; - ASSERT(kurl.protocolIs("javascript")); - - String script = decodeURLEscapeSequences( - kurl.string().substring(strlen("javascript:"))); - - ScriptValue result = frame->script()->executeScript(script, popupsAllowed); - - // Failure is reported as a null string. - String resultStr; - result.getString(resultStr); - return resultStr; -} - -void WebPluginContainerImpl::loadFrameRequest( - const WebURLRequest& request, const WebString& target, bool notifyNeeded, void* notifyData) -{ - Frame* frame = m_element->document()->frame(); - if (!frame) - return; // FIXME: send a notification in this case? - - if (notifyNeeded) { - // FIXME: This is a bit of hack to allow us to observe completion of - // our frame request. It would be better to evolve FrameLoader to - // support a completion callback instead. - WebPluginLoadObserver* observer = - new WebPluginLoadObserver(this, request.url(), notifyData); - m_pluginLoadObservers.append(observer); - WebDataSourceImpl::setNextPluginLoadObserver(observer); - } - - FrameLoadRequest frameRequest(frame->document()->securityOrigin(), - request.toResourceRequest(), target); - - frame->loader()->loadFrameRequest( - frameRequest, - false, // lock history - false, // lock back forward list - 0, // event - 0, // form state - SendReferrer); -} - -void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel) -{ - WebViewImpl* view = WebViewImpl::fromPage(m_element->document()->frame()->page()); - view->fullFramePluginZoomLevelChanged(zoomLevel); -} - -void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response) -{ - // Make sure that the plugin receives window geometry before data, or else - // plugins misbehave. - frameRectsChanged(); - - WrappedResourceResponse urlResponse(response); - m_webPlugin->didReceiveResponse(urlResponse); -} - -void WebPluginContainerImpl::didReceiveData(const char *data, int dataLength) -{ - m_webPlugin->didReceiveData(data, dataLength); -} - -void WebPluginContainerImpl::didFinishLoading() -{ - m_webPlugin->didFinishLoading(); -} - -void WebPluginContainerImpl::didFailLoading(const ResourceError& error) -{ - m_webPlugin->didFailLoading(error); -} - -NPObject* WebPluginContainerImpl::scriptableObject() -{ - return m_webPlugin->scriptableObject(); -} - -void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer) -{ - size_t pos = m_pluginLoadObservers.find(observer); - if (pos == notFound) - return; - m_pluginLoadObservers.remove(pos); -} - -#if USE(ACCELERATED_COMPOSITING) -WebCore::LayerChromium* WebPluginContainerImpl::platformLayer() const -{ - // FIXME: In the event of a context lost, the texture needs to be recreated on the compositor's - // context and rebound to the platform layer here. - unsigned backingTextureId = m_webPlugin->getBackingTextureId(); - if (!backingTextureId) - return 0; - - m_platformLayer->setTextureId(backingTextureId); - - return m_platformLayer.get(); -} -#endif - -// Private methods ------------------------------------------------------------- - -WebPluginContainerImpl::WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin) - : WebCore::PluginViewBase(0) - , m_element(element) - , m_webPlugin(webPlugin) -#if USE(ACCELERATED_COMPOSITING) - , m_platformLayer(PluginLayerChromium::create(0)) -#endif -{ -} - -WebPluginContainerImpl::~WebPluginContainerImpl() -{ - for (size_t i = 0; i < m_pluginLoadObservers.size(); ++i) - m_pluginLoadObservers[i]->clearPluginContainer(); - m_webPlugin->destroy(); -} - -void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) -{ - ASSERT(parent()->isFrameView()); - - // We cache the parent FrameView here as the plugin widget could be deleted - // in the call to HandleEvent. See http://b/issue?id=1362948 - FrameView* parentView = static_cast<FrameView*>(parent()); - - WebMouseEventBuilder webEvent(this, *event); - if (webEvent.type == WebInputEvent::Undefined) - return; - - if (event->type() == eventNames().mousedownEvent) { - // Ensure that the frame containing the plugin has focus. - Frame* containingFrame = parentView->frame(); - if (Page* currentPage = containingFrame->page()) - currentPage->focusController()->setFocusedFrame(containingFrame); - // Give focus to our containing HTMLPluginElement. - containingFrame->document()->setFocusedNode(m_element); - } - - WebCursorInfo cursorInfo; - if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) - event->setDefaultHandled(); - - // A windowless plugin can change the cursor in response to a mouse move - // event. We need to reflect the changed cursor in the frame view as the - // mouse is moved in the boundaries of the windowless plugin. - Page* page = parentView->frame()->page(); - if (!page) - return; - ChromeClientImpl* chromeClient = - static_cast<ChromeClientImpl*>(page->chrome()->client()); - chromeClient->setCursorForPlugin(cursorInfo); -} - -void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) -{ - WebMouseWheelEventBuilder webEvent(this, *event); - if (webEvent.type == WebInputEvent::Undefined) - return; - - WebCursorInfo cursorInfo; - if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) - event->setDefaultHandled(); -} - -void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) -{ - WebKeyboardEventBuilder webEvent(*event); - if (webEvent.type == WebInputEvent::Undefined) - return; - - if (webEvent.type == WebInputEvent::KeyDown) { -#if defined(OS_MACOSX) - if (webEvent.modifiers == WebInputEvent::MetaKey -#else - if (webEvent.modifiers == WebInputEvent::ControlKey -#endif - && webEvent.windowsKeyCode == VKEY_C) { - copy(); - event->setDefaultHandled(); - return; - } - } - - const WebInputEvent* currentInputEvent = WebViewImpl::currentInputEvent(); - - // Copy stashed info over, and only copy here in order not to interfere - // the ctrl-c logic above. - if (currentInputEvent - && WebInputEvent::isKeyboardEventType(currentInputEvent->type)) { - webEvent.modifiers |= currentInputEvent->modifiers & - (WebInputEvent::CapsLockOn | WebInputEvent::NumLockOn); - } - - WebCursorInfo cursorInfo; - if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) - event->setDefaultHandled(); -} - -void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect, - IntRect& windowRect, - IntRect& clipRect, - Vector<IntRect>& cutOutRects) -{ - windowRect = IntRect( - parent()->contentsToWindow(frameRect.location()), frameRect.size()); - - // Calculate a clip-rect so that we don't overlap the scrollbars, etc. - clipRect = windowClipRect(); - clipRect.move(-windowRect.x(), -windowRect.y()); - - windowCutOutRects(frameRect, cutOutRects); - // Convert to the plugin position. - for (size_t i = 0; i < cutOutRects.size(); i++) - cutOutRects[i].move(-frameRect.x(), -frameRect.y()); -} - -WebCore::IntRect WebPluginContainerImpl::windowClipRect() const -{ - // Start by clipping to our bounds. - IntRect clipRect = - convertToContainingWindow(IntRect(0, 0, width(), height())); - - // document()->renderer() can be 0 when we receive messages from the - // plugins while we are destroying a frame. - if (m_element->renderer()->document()->renderer()) { - // Take our element and get the clip rect from the enclosing layer and - // frame view. - RenderLayer* layer = m_element->renderer()->enclosingLayer(); - clipRect.intersect( - m_element->document()->view()->windowClipRectForLayer(layer, true)); - } - - return clipRect; -} - -static void getObjectStack(const RenderObject* ro, - Vector<const RenderObject*>* roStack) -{ - roStack->clear(); - while (ro) { - roStack->append(ro); - ro = ro->parent(); - } -} - -// Returns true if stack1 is at or above stack2 -static bool checkStackOnTop( - const Vector<const RenderObject*>& iframeZstack, - const Vector<const RenderObject*>& pluginZstack) -{ - for (size_t i1 = 0, i2 = 0; - i1 < iframeZstack.size() && i2 < pluginZstack.size(); - i1++, i2++) { - // The root is at the end of these stacks. We want to iterate - // root-downwards so we index backwards from the end. - const RenderObject* ro1 = iframeZstack[iframeZstack.size() - 1 - i1]; - const RenderObject* ro2 = pluginZstack[pluginZstack.size() - 1 - i2]; - - if (ro1 != ro2) { - // When we find nodes in the stack that are not the same, then - // we've found the nodes just below the lowest comment ancestor. - // Determine which should be on top. - - // See if z-index determines an order. - if (ro1->style() && ro2->style()) { - int z1 = ro1->style()->zIndex(); - int z2 = ro2->style()->zIndex(); - if (z1 > z2) - return true; - if (z1 < z2) - return false; - } - - // If the plugin does not have an explicit z-index it stacks behind the iframe. - // This is for maintaining compatibility with IE. - if (ro2->style()->position() == StaticPosition) { - // The 0'th elements of these RenderObject arrays represent the plugin node and - // the iframe. - const RenderObject* pluginRenderObject = pluginZstack[0]; - const RenderObject* iframeRenderObject = iframeZstack[0]; - - if (pluginRenderObject->style() && iframeRenderObject->style()) { - if (pluginRenderObject->style()->zIndex() > iframeRenderObject->style()->zIndex()) - return false; - } - return true; - } - - // Inspect the document order. Later order means higher - // stacking. - const RenderObject* parent = ro1->parent(); - if (!parent) - return false; - ASSERT(parent == ro2->parent()); - - for (const RenderObject* ro = parent->firstChild(); ro; ro = ro->nextSibling()) { - if (ro == ro1) - return false; - if (ro == ro2) - return true; - } - ASSERT(false); // We should have seen ro1 and ro2 by now. - return false; - } - } - return true; -} - -// Return a set of rectangles that should not be overdrawn by the -// plugin ("cutouts"). This helps implement the "iframe shim" -// technique of overlaying a windowed plugin with content from the -// page. In a nutshell, iframe elements should occlude plugins when -// they occur higher in the stacking order. -void WebPluginContainerImpl::windowCutOutRects(const IntRect& frameRect, - Vector<IntRect>& cutOutRects) -{ - RenderObject* pluginNode = m_element->renderer(); - ASSERT(pluginNode); - if (!pluginNode->style()) - return; - Vector<const RenderObject*> pluginZstack; - Vector<const RenderObject*> iframeZstack; - getObjectStack(pluginNode, &pluginZstack); - - // Get the parent widget - Widget* parentWidget = this->parent(); - if (!parentWidget->isFrameView()) - return; - - FrameView* parentFrameView = static_cast<FrameView*>(parentWidget); - - const HashSet<RefPtr<Widget> >* children = parentFrameView->children(); - for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(); it != children->end(); ++it) { - // We only care about FrameView's because iframes show up as FrameViews. - if (!(*it)->isFrameView()) - continue; - - const FrameView* frameView = - static_cast<const FrameView*>((*it).get()); - // Check to make sure we can get both the element and the RenderObject - // for this FrameView, if we can't just move on to the next object. - if (!frameView->frame() || !frameView->frame()->ownerElement() - || !frameView->frame()->ownerElement()->renderer()) - continue; - - HTMLElement* element = frameView->frame()->ownerElement(); - RenderObject* iframeRenderer = element->renderer(); - - if (element->hasTagName(HTMLNames::iframeTag) - && iframeRenderer->absoluteBoundingBoxRect().intersects(frameRect) - && (!iframeRenderer->style() || iframeRenderer->style()->visibility() == VISIBLE)) { - getObjectStack(iframeRenderer, &iframeZstack); - if (checkStackOnTop(iframeZstack, pluginZstack)) { - IntPoint point = - roundedIntPoint(iframeRenderer->localToAbsolute()); - RenderBox* rbox = toRenderBox(iframeRenderer); - IntSize size(rbox->width(), rbox->height()); - cutOutRects.append(IntRect(point, size)); - } - } - } -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h deleted file mode 100644 index ebe6983..0000000 --- a/WebKit/chromium/src/WebPluginContainerImpl.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginContainerImpl_h -#define WebPluginContainerImpl_h - -#include "PluginViewBase.h" -#include "WebPluginContainer.h" -#include "Widget.h" - -#include <wtf/PassRefPtr.h> -#include <wtf/Vector.h> - -struct NPObject; - -namespace WebCore { -class HTMLPlugInElement; -class IntRect; -class KeyboardEvent; -class LayerChromium; -class MouseEvent; -class PluginLayerChromium; -class ResourceError; -class ResourceResponse; -class WheelEvent; -} - -namespace WebKit { - -class WebPlugin; -class WebPluginLoadObserver; - -class WebPluginContainerImpl : public WebCore::PluginViewBase, public WebPluginContainer { -public: - static PassRefPtr<WebPluginContainerImpl> create(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin) - { - return adoptRef(new WebPluginContainerImpl(element, webPlugin)); - } - - // Widget methods - virtual void setFrameRect(const WebCore::IntRect&); - virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&); - virtual void invalidateRect(const WebCore::IntRect&); - virtual void setFocus(bool); - virtual void show(); - virtual void hide(); - virtual void handleEvent(WebCore::Event*); - virtual void frameRectsChanged(); - virtual void setParentVisible(bool); - virtual void setParent(WebCore::ScrollView*); - virtual void widgetPositionsUpdated(); - virtual bool isPluginContainer() const { return true; } - - // WebPluginContainer methods - virtual WebElement element(); - virtual void invalidate(); - virtual void invalidateRect(const WebRect&); - virtual void scrollRect(int dx, int dy, const WebRect&); - virtual void reportGeometry(); - virtual void commitBackingTexture(); - virtual void clearScriptObjects(); - virtual NPObject* scriptableObjectForElement(); - virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed); - virtual void loadFrameRequest(const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData); - virtual void zoomLevelChanged(double zoomLevel); - - // This cannot be null. - WebPlugin* plugin() { return m_webPlugin; } - void setPlugin(WebPlugin* plugin) { m_webPlugin = plugin; } - - // Printing interface. The plugin can support custom printing - // (which means it controls the layout, number of pages etc). - // Whether the plugin supports its own paginated print. The other print - // interface methods are called only if this method returns true. - bool supportsPaginatedPrint() const; - // Sets up printing at the given print rect and printer DPI. printableArea - // is in points (a point is 1/72 of an inch).Returns the number of pages to - // be printed at these settings. - int printBegin(const WebCore::IntRect& printableArea, int printerDPI) const; - // Prints the page specified by pageNumber (0-based index) into the supplied canvas. - bool printPage(int pageNumber, WebCore::GraphicsContext* gc); - // Ends the print operation. - void printEnd(); - - // Copy the selected text. - void copy(); - - // Resource load events for the plugin's source data: - void didReceiveResponse(const WebCore::ResourceResponse&); - void didReceiveData(const char *data, int dataLength); - void didFinishLoading(); - void didFailLoading(const WebCore::ResourceError&); - - NPObject* scriptableObject(); - - void willDestroyPluginLoadObserver(WebPluginLoadObserver*); - -#if USE(ACCELERATED_COMPOSITING) - virtual WebCore::LayerChromium* platformLayer() const; -#endif - -private: - WebPluginContainerImpl(WebCore::HTMLPlugInElement* element, WebPlugin* webPlugin); - ~WebPluginContainerImpl(); - - void handleMouseEvent(WebCore::MouseEvent*); - void handleWheelEvent(WebCore::WheelEvent*); - void handleKeyboardEvent(WebCore::KeyboardEvent*); - - void calculateGeometry(const WebCore::IntRect& frameRect, - WebCore::IntRect& windowRect, - WebCore::IntRect& clipRect, - Vector<WebCore::IntRect>& cutOutRects); - WebCore::IntRect windowClipRect() const; - void windowCutOutRects(const WebCore::IntRect& frameRect, - Vector<WebCore::IntRect>& cutOutRects); - - WebCore::HTMLPlugInElement* m_element; - WebPlugin* m_webPlugin; - Vector<WebPluginLoadObserver*> m_pluginLoadObservers; - -#if USE(ACCELERATED_COMPOSITING) - RefPtr<WebCore::PluginLayerChromium> m_platformLayer; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebPluginDocument.cpp b/WebKit/chromium/src/WebPluginDocument.cpp deleted file mode 100644 index 8f794ad..0000000 --- a/WebKit/chromium/src/WebPluginDocument.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPluginDocument.h" - -#include "Document.h" -#include "PluginDocument.h" - -#include "WebPluginContainerImpl.h" - -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - - -WebPlugin* WebPluginDocument::plugin() -{ - if (!isPluginDocument()) - return 0; - PluginDocument* doc = unwrap<PluginDocument>(); - WebPluginContainerImpl* container = static_cast<WebPluginContainerImpl*>(static_cast<PluginDocument*>(doc)->pluginWidget()); - return container->plugin(); -} - - -WebPluginDocument::WebPluginDocument(const PassRefPtr<PluginDocument>& elem) - : WebDocument(elem) -{ -} - -WebPluginDocument& WebPluginDocument::operator=(const PassRefPtr<PluginDocument>& elem) -{ - m_private = elem; - return *this; -} - -WebPluginDocument::operator PassRefPtr<PluginDocument>() const -{ - return static_cast<PluginDocument*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp b/WebKit/chromium/src/WebPluginListBuilderImpl.cpp deleted file mode 100644 index d0f7324..0000000 --- a/WebKit/chromium/src/WebPluginListBuilderImpl.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPluginListBuilderImpl.h" - -#include "PluginData.h" -#include "WebString.h" -#include <wtf/Vector.h> - -using namespace WebCore; - -namespace WebKit { - -void WebPluginListBuilderImpl::addPlugin(const WebString& name, const WebString& description, const WebString& fileName) -{ - PluginInfo info; - info.name = name; - info.desc = description; - info.file = fileName; - m_results->append(info); -} - -void WebPluginListBuilderImpl::addMediaTypeToLastPlugin(const WebString& name, const WebString& description) -{ - MimeClassInfo info; - info.type = name; - info.desc = description; - m_results->last().mimes.append(info); -} - -void WebPluginListBuilderImpl::addFileExtensionToLastMediaType(const WebString& extension) -{ - MimeClassInfo& info = m_results->last().mimes.last(); - info.extensions.append(extension); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPluginListBuilderImpl.h b/WebKit/chromium/src/WebPluginListBuilderImpl.h deleted file mode 100644 index 3d7977a..0000000 --- a/WebKit/chromium/src/WebPluginListBuilderImpl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginListBuilderImpl_h -#define WebPluginListBuilderImpl_h - -#include "WebPluginListBuilder.h" - -#include "PluginData.h" -#include <wtf/Vector.h> - -namespace WebKit { - -class WebPluginListBuilderImpl : public WebPluginListBuilder { -public: - WebPluginListBuilderImpl(Vector<WebCore::PluginInfo>* results) : m_results(results) { } - - // WebPluginListBuilder methods: - virtual void addPlugin(const WebString& name, const WebString& description, const WebString& fileName); - virtual void addMediaTypeToLastPlugin(const WebString& name, const WebString& description); - virtual void addFileExtensionToLastMediaType(const WebString& extension); - -private: - Vector<WebCore::PluginInfo>* m_results; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebPluginLoadObserver.cpp b/WebKit/chromium/src/WebPluginLoadObserver.cpp deleted file mode 100644 index 5ec59a6..0000000 --- a/WebKit/chromium/src/WebPluginLoadObserver.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPluginLoadObserver.h" - -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" - -namespace WebKit { - -WebPluginLoadObserver::~WebPluginLoadObserver() -{ - if (m_pluginContainer) - m_pluginContainer->willDestroyPluginLoadObserver(this); -} - -void WebPluginLoadObserver::didFinishLoading() -{ - if (m_pluginContainer) - m_pluginContainer->plugin()->didFinishLoadingFrameRequest(m_notifyURL, m_notifyData); -} - -void WebPluginLoadObserver::didFailLoading(const WebURLError& error) -{ - if (m_pluginContainer) - m_pluginContainer->plugin()->didFailLoadingFrameRequest(m_notifyURL, m_notifyData, error); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPluginLoadObserver.h b/WebKit/chromium/src/WebPluginLoadObserver.h deleted file mode 100644 index 7bd06eb..0000000 --- a/WebKit/chromium/src/WebPluginLoadObserver.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPluginLoadObserver_h -#define WebPluginLoadObserver_h - -#include "WebURL.h" - -namespace WebKit { - -class WebPluginContainerImpl; -struct WebURLError; - -class WebPluginLoadObserver { -public: - WebPluginLoadObserver(WebPluginContainerImpl* pluginContainer, - const WebURL& notifyURL, void* notifyData) - : m_pluginContainer(pluginContainer) - , m_notifyURL(notifyURL) - , m_notifyData(notifyData) - { - } - - ~WebPluginLoadObserver(); - - const WebURL& url() const { return m_notifyURL; } - - void clearPluginContainer() { m_pluginContainer = 0; } - void didFinishLoading(); - void didFailLoading(const WebURLError&); - -private: - WebPluginContainerImpl* m_pluginContainer; - WebURL m_notifyURL; - void* m_notifyData; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp deleted file mode 100644 index 63ebed8..0000000 --- a/WebKit/chromium/src/WebPopupMenuImpl.cpp +++ /dev/null @@ -1,353 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebPopupMenuImpl.h" - -#include "Cursor.h" -#include "FramelessScrollView.h" -#include "FrameView.h" -#include "IntRect.h" -#include "PlatformContextSkia.h" -#include "PlatformKeyboardEvent.h" -#include "PlatformMouseEvent.h" -#include "PlatformWheelEvent.h" -#include "SkiaUtils.h" - -#include "WebInputEvent.h" -#include "WebInputEventConversion.h" -#include "WebRect.h" -#include "WebWidgetClient.h" - -#include <skia/ext/platform_canvas.h> - -using namespace WebCore; - -namespace WebKit { - -// WebPopupMenu --------------------------------------------------------------- - -WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) -{ - // Pass the WebPopupMenuImpl's self-reference to the caller. - return adoptRef(new WebPopupMenuImpl(client)).leakRef(); -} - -// WebWidget ------------------------------------------------------------------ - -WebPopupMenuImpl::WebPopupMenuImpl(WebWidgetClient* client) - : m_client(client) - , m_widget(0) -{ - // set to impossible point so we always get the first mouse pos - m_lastMousePosition = WebPoint(-1, -1); -} - -WebPopupMenuImpl::~WebPopupMenuImpl() -{ - if (m_widget) - m_widget->setClient(0); -} - -void WebPopupMenuImpl::Init(FramelessScrollView* widget, const WebRect& bounds) -{ - m_widget = widget; - m_widget->setClient(this); - - if (m_client) { - m_client->setWindowRect(bounds); - m_client->show(WebNavigationPolicy()); // Policy is ignored - } -} - -void WebPopupMenuImpl::MouseMove(const WebMouseEvent& event) -{ - // don't send mouse move messages if the mouse hasn't moved. - if (event.x != m_lastMousePosition.x || event.y != m_lastMousePosition.y) { - m_lastMousePosition = WebPoint(event.x, event.y); - m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event)); - } -} - -void WebPopupMenuImpl::MouseLeave(const WebMouseEvent& event) -{ - m_widget->handleMouseMoveEvent(PlatformMouseEventBuilder(m_widget, event)); -} - -void WebPopupMenuImpl::MouseDown(const WebMouseEvent& event) -{ - m_widget->handleMouseDownEvent(PlatformMouseEventBuilder(m_widget, event)); -} - -void WebPopupMenuImpl::MouseUp(const WebMouseEvent& event) -{ - mouseCaptureLost(); - m_widget->handleMouseReleaseEvent(PlatformMouseEventBuilder(m_widget, event)); -} - -void WebPopupMenuImpl::MouseWheel(const WebMouseWheelEvent& event) -{ - m_widget->handleWheelEvent(PlatformWheelEventBuilder(m_widget, event)); -} - -bool WebPopupMenuImpl::KeyEvent(const WebKeyboardEvent& event) -{ - return m_widget->handleKeyEvent(PlatformKeyboardEventBuilder(event)); -} - -// WebWidget ------------------------------------------------------------------- - -void WebPopupMenuImpl::close() -{ - if (m_widget) - m_widget->hide(); - - m_client = 0; - - deref(); // Balances ref() from WebWidget::Create -} - -void WebPopupMenuImpl::resize(const WebSize& newSize) -{ - if (m_size == newSize) - return; - m_size = newSize; - - if (m_widget) { - IntRect newGeometry(0, 0, m_size.width, m_size.height); - m_widget->setFrameRect(newGeometry); - } - - if (m_client) { - WebRect damagedRect(0, 0, m_size.width, m_size.height); - m_client->didInvalidateRect(damagedRect); - } -} - -void WebPopupMenuImpl::layout() -{ -} - -void WebPopupMenuImpl::paint(WebCanvas* canvas, const WebRect& rect) -{ - if (!m_widget) - return; - - if (!rect.isEmpty()) { -#if WEBKIT_USING_CG - GraphicsContext gc(canvas); -#elif WEBKIT_USING_SKIA - PlatformContextSkia context(canvas); - // PlatformGraphicsContext is actually a pointer to PlatformContextSkia. - GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context)); -#else - notImplemented(); -#endif - m_widget->paint(&gc, rect); - } -} - -void WebPopupMenuImpl::themeChanged() -{ - notImplemented(); -} - -void WebPopupMenuImpl::composite(bool finish) -{ - notImplemented(); -} - -bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent) -{ - if (!m_widget) - return false; - - // TODO (jcampan): WebKit seems to always return false on mouse events - // methods. For now we'll assume it has processed them (as we are only - // interested in whether keyboard events are processed). - switch (inputEvent.type) { - case WebInputEvent::MouseMove: - MouseMove(*static_cast<const WebMouseEvent*>(&inputEvent)); - return true; - - case WebInputEvent::MouseLeave: - MouseLeave(*static_cast<const WebMouseEvent*>(&inputEvent)); - return true; - - case WebInputEvent::MouseWheel: - MouseWheel(*static_cast<const WebMouseWheelEvent*>(&inputEvent)); - return true; - - case WebInputEvent::MouseDown: - MouseDown(*static_cast<const WebMouseEvent*>(&inputEvent)); - return true; - - case WebInputEvent::MouseUp: - MouseUp(*static_cast<const WebMouseEvent*>(&inputEvent)); - return true; - - // In Windows, RawKeyDown only has information about the physical key, but - // for "selection", we need the information about the character the key - // translated into. For English, the physical key value and the character - // value are the same, hence, "selection" works for English. But for other - // languages, such as Hebrew, the character value is different from the - // physical key value. Thus, without accepting Char event type which - // contains the key's character value, the "selection" won't work for - // non-English languages, such as Hebrew. - case WebInputEvent::RawKeyDown: - case WebInputEvent::KeyDown: - case WebInputEvent::KeyUp: - case WebInputEvent::Char: - return KeyEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent)); - - default: - break; - } - return false; -} - -void WebPopupMenuImpl::mouseCaptureLost() -{ -} - -void WebPopupMenuImpl::setFocus(bool enable) -{ -} - -bool WebPopupMenuImpl::setComposition( - const WebString& text, const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, int selectionEnd) -{ - return false; -} - -bool WebPopupMenuImpl::confirmComposition() -{ - return false; -} - -bool WebPopupMenuImpl::confirmComposition(const WebString& text) -{ - return false; -} - -WebTextInputType WebPopupMenuImpl::textInputType() -{ - return WebTextInputTypeNone; -} - -WebRect WebPopupMenuImpl::caretOrSelectionBounds() -{ - return WebRect(); -} - -void WebPopupMenuImpl::setTextDirection(WebTextDirection direction) -{ -} - - -//----------------------------------------------------------------------------- -// WebCore::HostWindow - -void WebPopupMenuImpl::invalidateContents(const IntRect&, bool) -{ - notImplemented(); -} - -void WebPopupMenuImpl::invalidateWindow(const IntRect&, bool) -{ - notImplemented(); -} - -void WebPopupMenuImpl::invalidateContentsAndWindow(const IntRect& paintRect, bool /*immediate*/) -{ - if (paintRect.isEmpty()) - return; - if (m_client) - m_client->didInvalidateRect(paintRect); -} - -void WebPopupMenuImpl::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) -{ - invalidateContentsAndWindow(updateRect, immediate); -} - -void WebPopupMenuImpl::scroll(const IntSize& scrollDelta, - const IntRect& scrollRect, - const IntRect& clipRect) -{ - if (m_client) { - int dx = scrollDelta.width(); - int dy = scrollDelta.height(); - m_client->didScrollRect(dx, dy, clipRect); - } -} - -IntPoint WebPopupMenuImpl::screenToWindow(const IntPoint& point) const -{ - notImplemented(); - return IntPoint(); -} - -IntRect WebPopupMenuImpl::windowToScreen(const IntRect& rect) const -{ - notImplemented(); - return IntRect(); -} - -void WebPopupMenuImpl::scrollRectIntoView(const IntRect&, const ScrollView*) const -{ - // Nothing to be done here since we do not have the concept of a container - // that implements its own scrolling. -} - -void WebPopupMenuImpl::scrollbarsModeDidChange() const -{ - // Nothing to be done since we have no concept of different scrollbar modes. -} - -void WebPopupMenuImpl::setCursor(const WebCore::Cursor&) -{ -} - -//----------------------------------------------------------------------------- -// WebCore::FramelessScrollViewClient - -void WebPopupMenuImpl::popupClosed(FramelessScrollView* widget) -{ - ASSERT(widget == m_widget); - if (m_widget) { - m_widget->setClient(0); - m_widget = 0; - } - m_client->closeWidgetSoon(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h deleted file mode 100644 index b8ef7ba..0000000 --- a/WebKit/chromium/src/WebPopupMenuImpl.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebPopupMenuImpl_h -#define WebPopupMenuImpl_h - -#include "FramelessScrollViewClient.h" -#include "WebPoint.h" -#include "WebPopupMenu.h" -#include "WebSize.h" -#include <wtf/RefCounted.h> - -namespace WebCore { -class Frame; -class FramelessScrollView; -class KeyboardEvent; -class Page; -class PlatformKeyboardEvent; -class Range; -class Widget; -} - -namespace WebKit { -class WebKeyboardEvent; -class WebMouseEvent; -class WebMouseWheelEvent; -struct WebRect; - -class WebPopupMenuImpl : public WebPopupMenu, - public WebCore::FramelessScrollViewClient, - public RefCounted<WebPopupMenuImpl> { -public: - // WebWidget - virtual void close(); - virtual WebSize size() { return m_size; } - virtual void resize(const WebSize&); - virtual void layout(); - virtual void paint(WebCanvas* canvas, const WebRect& rect); - virtual void themeChanged(); - virtual void composite(bool finish); - virtual bool handleInputEvent(const WebInputEvent&); - virtual void mouseCaptureLost(); - virtual void setFocus(bool enable); - virtual bool setComposition( - const WebString& text, - const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, int selectionEnd); - virtual bool confirmComposition(); - virtual bool confirmComposition(const WebString& text); - virtual WebTextInputType textInputType(); - virtual WebRect caretOrSelectionBounds(); - virtual void setTextDirection(WebTextDirection direction); - virtual bool isAcceleratedCompositingActive() const { return false; } - - // WebPopupMenuImpl - void Init(WebCore::FramelessScrollView* widget, - const WebRect& bounds); - - WebWidgetClient* client() { return m_client; } - - void MouseMove(const WebMouseEvent&); - void MouseLeave(const WebMouseEvent&); - void MouseDown(const WebMouseEvent&); - void MouseUp(const WebMouseEvent&); - void MouseDoubleClick(const WebMouseEvent&); - void MouseWheel(const WebMouseWheelEvent&); - bool KeyEvent(const WebKeyboardEvent&); - - protected: - friend class WebPopupMenu; // For WebPopupMenu::create - friend class WTF::RefCounted<WebPopupMenuImpl>; - - WebPopupMenuImpl(WebWidgetClient* client); - ~WebPopupMenuImpl(); - - // WebCore::HostWindow methods: - virtual void invalidateContents(const WebCore::IntRect&, bool); - virtual void invalidateWindow(const WebCore::IntRect&, bool); - virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool); - virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool); - virtual void scroll( - const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect, - const WebCore::IntRect& clipRect); - virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const; - virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const; - virtual PlatformPageClient platformPageClient() const { return 0; } - virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const; - virtual void scrollbarsModeDidChange() const; - virtual void setCursor(const WebCore::Cursor&); - - // WebCore::FramelessScrollViewClient methods: - virtual void popupClosed(WebCore::FramelessScrollView*); - - WebWidgetClient* m_client; - WebSize m_size; - - WebPoint m_lastMousePosition; - - // This is a non-owning ref. The popup will notify us via popupClosed() - // before it is destroyed. - WebCore::FramelessScrollView* m_widget; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebRange.cpp b/WebKit/chromium/src/WebRange.cpp deleted file mode 100644 index 3dd000d..0000000 --- a/WebKit/chromium/src/WebRange.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebRange.h" - -#include "Range.h" -#include "WebNode.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebRangePrivate : public Range { -}; - -void WebRange::reset() -{ - assign(0); -} - -void WebRange::assign(const WebRange& other) -{ - WebRangePrivate* p = const_cast<WebRangePrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -int WebRange::startOffset() const -{ - return m_private->startOffset(); -} - -int WebRange::endOffset() const -{ - return m_private->endOffset(); -} - -WebNode WebRange::startContainer(int& exceptionCode) const -{ - return PassRefPtr<Node>(m_private->startContainer(exceptionCode)); -} - -WebNode WebRange::endContainer(int& exceptionCode) const -{ - return PassRefPtr<Node>(m_private->endContainer(exceptionCode)); -} - -WebString WebRange::toHTMLText() const -{ - return m_private->toHTML(); -} - -WebString WebRange::toPlainText() const -{ - return m_private->text(); -} - -WebRange::WebRange(const WTF::PassRefPtr<WebCore::Range>& range) - : m_private(static_cast<WebRangePrivate*>(range.releaseRef())) -{ -} - -WebRange& WebRange::operator=(const WTF::PassRefPtr<WebCore::Range>& range) -{ - assign(static_cast<WebRangePrivate*>(range.releaseRef())); - return *this; -} - -WebRange::operator WTF::PassRefPtr<WebCore::Range>() const -{ - return PassRefPtr<Range>(const_cast<WebRangePrivate*>(m_private)); -} - -void WebRange::assign(WebRangePrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebRegularExpression.cpp b/WebKit/chromium/src/WebRegularExpression.cpp deleted file mode 100644 index 558b750..0000000 --- a/WebKit/chromium/src/WebRegularExpression.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebRegularExpression.h" - -#include "RegularExpression.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -class WebRegularExpressionPrivate : public RegularExpression { -}; - -WebRegularExpression::WebRegularExpression(const WebString& pattern, - WebTextCaseSensitivity caseSensitivity) -{ - TextCaseSensitivity sensitivity = static_cast<TextCaseSensitivity>(caseSensitivity); - RegularExpression* re = new RegularExpression(pattern, sensitivity); - m_private = static_cast<WebRegularExpressionPrivate*>(re); -} - -WebRegularExpression::~WebRegularExpression() -{ - delete m_private; -} - -int WebRegularExpression::match(const WebString& str, - int startFrom, - int* matchLength) const -{ - if (!m_private) - return -1; - - return m_private->match(str, startFrom, matchLength); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp deleted file mode 100644 index edb0413..0000000 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebRuntimeFeatures.h" - -#include "AbstractDatabase.h" -#include "RuntimeEnabledFeatures.h" -#include "WebMediaPlayerClientImpl.h" -#include "WebSocket.h" - -using namespace WebCore; - -namespace WebKit { - -void WebRuntimeFeatures::enableDatabase(bool enable) -{ -#if ENABLE(DATABASE) - AbstractDatabase::setIsAvailable(enable); -#endif -} - -bool WebRuntimeFeatures::isDatabaseEnabled() -{ -#if ENABLE(DATABASE) - return AbstractDatabase::isAvailable(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableLocalStorage(bool enable) -{ -#if ENABLE(DOM_STORAGE) - RuntimeEnabledFeatures::setLocalStorageEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isLocalStorageEnabled() -{ -#if ENABLE(DOM_STORAGE) - return RuntimeEnabledFeatures::localStorageEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableSessionStorage(bool enable) -{ -#if ENABLE(DOM_STORAGE) - RuntimeEnabledFeatures::setSessionStorageEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isSessionStorageEnabled() -{ -#if ENABLE(DOM_STORAGE) - return RuntimeEnabledFeatures::sessionStorageEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableMediaPlayer(bool enable) -{ -#if ENABLE(VIDEO) - WebMediaPlayerClientImpl::setIsEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isMediaPlayerEnabled() -{ -#if ENABLE(VIDEO) - return WebMediaPlayerClientImpl::isEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableSockets(bool enable) -{ -#if ENABLE(WEB_SOCKETS) - WebSocket::setIsAvailable(enable); -#endif -} - -bool WebRuntimeFeatures::isSocketsEnabled() -{ -#if ENABLE(WEB_SOCKETS) - return WebSocket::isAvailable(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableNotifications(bool enable) -{ -#if ENABLE(NOTIFICATIONS) - RuntimeEnabledFeatures::setWebkitNotificationsEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isNotificationsEnabled() -{ -#if ENABLE(NOTIFICATIONS) - return RuntimeEnabledFeatures::webkitNotificationsEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableApplicationCache(bool enable) -{ -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - RuntimeEnabledFeatures::setApplicationCacheEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isApplicationCacheEnabled() -{ -#if ENABLE(OFFLINE_WEB_APPLICATIONS) - return RuntimeEnabledFeatures::applicationCacheEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableGeolocation(bool enable) -{ -#if ENABLE(GEOLOCATION) - RuntimeEnabledFeatures::setGeolocationEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isGeolocationEnabled() -{ -#if ENABLE(GEOLOCATION) - return RuntimeEnabledFeatures::geolocationEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableIndexedDatabase(bool enable) -{ -#if ENABLE(INDEXED_DATABASE) - RuntimeEnabledFeatures::setWebkitIndexedDBEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isIndexedDatabaseEnabled() -{ -#if ENABLE(INDEXED_DATABASE) - return RuntimeEnabledFeatures::webkitIndexedDBEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableWebGL(bool enable) -{ -#if ENABLE(3D_CANVAS) - RuntimeEnabledFeatures::setWebGLEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isWebGLEnabled() -{ -#if ENABLE(3D_CANVAS) - return RuntimeEnabledFeatures::webGLRenderingContextEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enablePushState(bool enable) -{ - RuntimeEnabledFeatures::setPushStateEnabled(enable); -} - -bool WebRuntimeFeatures::isPushStateEnabled(bool enable) -{ - return RuntimeEnabledFeatures::pushStateEnabled(); -} - -void WebRuntimeFeatures::enableTouch(bool enable) -{ -#if ENABLE(TOUCH_EVENTS) - RuntimeEnabledFeatures::setTouchEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isTouchEnabled() -{ -#if ENABLE(TOUCH_EVENTS) - return RuntimeEnabledFeatures::touchEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableDeviceMotion(bool enable) -{ - RuntimeEnabledFeatures::setDeviceMotionEnabled(enable); -} - -bool WebRuntimeFeatures::isDeviceMotionEnabled() -{ - return RuntimeEnabledFeatures::deviceMotionEnabled(); -} - -void WebRuntimeFeatures::enableDeviceOrientation(bool enable) -{ - RuntimeEnabledFeatures::setDeviceOrientationEnabled(enable); -} - -bool WebRuntimeFeatures::isDeviceOrientationEnabled() -{ - return RuntimeEnabledFeatures::deviceOrientationEnabled(); -} - -void WebRuntimeFeatures::enableSpeechInput(bool enable) -{ - RuntimeEnabledFeatures::setSpeechInputEnabled(enable); -} - -bool WebRuntimeFeatures::isSpeechInputEnabled() -{ - return RuntimeEnabledFeatures::speechInputEnabled(); -} - -void WebRuntimeFeatures::enableXHRResponseBlob(bool enable) -{ -#if ENABLE(XHR_RESPONSE_BLOB) - RuntimeEnabledFeatures::setXHRResponseBlobEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isXHRResponseBlobEnabled() -{ -#if ENABLE(XHR_RESPONSE_BLOB) - return RuntimeEnabledFeatures::xhrResponseBlobEnabled(); -#else - return false; -#endif -} - -void WebRuntimeFeatures::enableFileSystem(bool enable) -{ -#if ENABLE(FILE_SYSTEM) - RuntimeEnabledFeatures::setFileSystemEnabled(enable); -#endif -} - -bool WebRuntimeFeatures::isFileSystemEnabled() -{ -#if ENABLE(FILE_SYSTEM) - return RuntimeEnabledFeatures::fileSystemEnabled(); -#else - return false; -#endif -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebScriptController.cpp b/WebKit/chromium/src/WebScriptController.cpp deleted file mode 100644 index 0aa11a6..0000000 --- a/WebKit/chromium/src/WebScriptController.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScriptController.h" - -#include "V8Binding.h" -#include "V8DOMMap.h" -#include "V8Proxy.h" - -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -void WebScriptController::registerExtension(v8::Extension* extension) -{ - V8Proxy::registerExtension(extension); -} - -void WebScriptController::enableV8SingleThreadMode() -{ - enableStringImplCache(); - enableFasterDOMStoreAccess(); -} - -void WebScriptController::flushConsoleMessages() -{ - WebCore::V8Proxy::processConsoleMessages(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebScrollbarImpl.cpp b/WebKit/chromium/src/WebScrollbarImpl.cpp deleted file mode 100644 index 8b9e287..0000000 --- a/WebKit/chromium/src/WebScrollbarImpl.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScrollbarImpl.h" - -#include "GraphicsContext.h" -#include "KeyboardCodes.h" -#include "PlatformContextSkia.h" -#include "Scrollbar.h" -#include "ScrollbarTheme.h" -#include "ScrollTypes.h" -#include "WebCanvas.h" -#include "WebInputEvent.h" -#include "WebInputEventConversion.h" -#include "WebRect.h" -#include "WebScrollbarClient.h" -#include "WebVector.h" -#include "WebViewImpl.h" - -using namespace std; -using namespace WebCore; - -namespace WebKit { - -WebScrollbar* WebScrollbar::create(WebScrollbarClient* client, Orientation orientation) -{ - return new WebScrollbarImpl(client, orientation); -} - -int WebScrollbar::defaultThickness() -{ - return ScrollbarTheme::nativeTheme()->scrollbarThickness(); -} - -WebScrollbarImpl::WebScrollbarImpl(WebScrollbarClient* client, Orientation orientation) - : m_client(client) -{ - m_scrollbar = Scrollbar::createNativeScrollbar( - static_cast<ScrollbarClient*>(this), - static_cast<ScrollbarOrientation>(orientation), - RegularScrollbar); -} - -WebScrollbarImpl::~WebScrollbarImpl() -{ -} - -void WebScrollbarImpl::setLocation(const WebRect& rect) -{ - WebCore::IntRect oldRect = m_scrollbar->frameRect(); - m_scrollbar->setFrameRect(rect); - if (WebRect(oldRect) != rect) - m_scrollbar->invalidate(); - - int length = m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar->width() : m_scrollbar->height(); - int pageStep = max(max(static_cast<int>(static_cast<float>(length) * Scrollbar::minFractionToStepWhenPaging()), length - Scrollbar::maxOverlapBetweenPages()), 1); - m_scrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep); - m_scrollbar->setEnabled(m_scrollbar->totalSize() > length); - m_scrollbar->setProportion(length, m_scrollbar->totalSize()); -} - -int WebScrollbarImpl::value() const -{ - return m_scrollbar->value(); -} - -void WebScrollbarImpl::setValue(int position) -{ - m_scrollbar->setValue(position, Scrollbar::NotFromScrollAnimator); -} - -void WebScrollbarImpl::setDocumentSize(int size) -{ - int length = m_scrollbar->orientation() == HorizontalScrollbar ? m_scrollbar->width() : m_scrollbar->height(); - m_scrollbar->setEnabled(size > length); - m_scrollbar->setProportion(length, size); -} - -void WebScrollbarImpl::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier) -{ - WebCore::ScrollDirection dir; - bool horizontal = m_scrollbar->orientation() == HorizontalScrollbar; - if (direction == ScrollForward) - dir = horizontal ? ScrollRight : ScrollDown; - else - dir = horizontal ? ScrollLeft : ScrollUp; - m_scrollbar->scroll(dir, static_cast<WebCore::ScrollGranularity>(granularity), multiplier); -} - -void WebScrollbarImpl::paint(WebCanvas* canvas, const WebRect& rect) -{ -#if WEBKIT_USING_CG - GraphicsContext gc(canvas); -#elif WEBKIT_USING_SKIA - PlatformContextSkia context(canvas); - - // PlatformGraphicsContext is actually a pointer to PlatformContextSkia - GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context)); -#else - notImplemented(); -#endif - - m_scrollbar->paint(&gc, rect); -} - -bool WebScrollbarImpl::handleInputEvent(const WebInputEvent& event) -{ - switch (event.type) { - case WebInputEvent::MouseDown: - return onMouseDown(event); - case WebInputEvent::MouseUp: - return onMouseUp(event); - case WebInputEvent::MouseMove: - return onMouseMove(event); - case WebInputEvent::MouseLeave: - return onMouseLeave(event); - case WebInputEvent::MouseWheel: - return onMouseWheel(event); - case WebInputEvent::KeyDown: - return onKeyDown(event); - case WebInputEvent::Undefined: - case WebInputEvent::MouseEnter: - case WebInputEvent::RawKeyDown: - case WebInputEvent::KeyUp: - case WebInputEvent::Char: - case WebInputEvent::TouchStart: - case WebInputEvent::TouchMove: - case WebInputEvent::TouchEnd: - case WebInputEvent::TouchCancel: - default: - break; - } - return false; -} - -bool WebScrollbarImpl::onMouseDown(const WebInputEvent& event) -{ - WebMouseEvent mousedown = *static_cast<const WebMouseEvent*>(&event); - if (!m_scrollbar->frameRect().contains(mousedown.x, mousedown.y)) - return false; - - mousedown.x -= m_scrollbar->x(); - mousedown.y -= m_scrollbar->y(); - m_scrollbar->mouseDown(PlatformMouseEventBuilder(m_scrollbar.get(), mousedown)); - return true; - } - -bool WebScrollbarImpl::onMouseUp(const WebInputEvent& event) -{ - if (m_scrollbar->pressedPart() == NoPart) - return false; - - return m_scrollbar->mouseUp(); -} - -bool WebScrollbarImpl::onMouseMove(const WebInputEvent& event) -{ - WebMouseEvent mousemove = *static_cast<const WebMouseEvent*>(&event); - if (m_scrollbar->frameRect().contains(mousemove.x, mousemove.y) - || m_scrollbar->pressedPart() != NoPart) { - mousemove.x -= m_scrollbar->x(); - mousemove.y -= m_scrollbar->y(); - return m_scrollbar->mouseMoved(PlatformMouseEventBuilder(m_scrollbar.get(), mousemove)); - } - - if (m_scrollbar->hoveredPart() != NoPart) - m_scrollbar->mouseExited(); - return false; -} - -bool WebScrollbarImpl::onMouseLeave(const WebInputEvent& event) -{ - if (m_scrollbar->hoveredPart() == NoPart) - return false; - - return m_scrollbar->mouseExited(); -} - -bool WebScrollbarImpl::onMouseWheel(const WebInputEvent& event) -{ - // Same logic as in Scrollview.cpp. If we can move at all, we'll accept the event. - WebMouseWheelEvent mousewheel = *static_cast<const WebMouseWheelEvent*>(&event); - int maxScrollDelta = m_scrollbar->maximum() - m_scrollbar->value(); - float delta = m_scrollbar->orientation() == HorizontalScrollbar ? mousewheel.deltaX : mousewheel.deltaY; - if ((delta < 0 && maxScrollDelta > 0) || (delta > 0 && m_scrollbar->value() > 0)) { - if (mousewheel.scrollByPage) { - ASSERT(m_scrollbar->orientation() == VerticalScrollbar); - bool negative = delta < 0; - delta = max(max(static_cast<float>(m_scrollbar->visibleSize()) * Scrollbar::minFractionToStepWhenPaging(), static_cast<float>(m_scrollbar->visibleSize() - Scrollbar::maxOverlapBetweenPages())), 1.0f); - if (negative) - delta *= -1; - } - m_scrollbar->scroll((m_scrollbar->orientation() == HorizontalScrollbar) ? WebCore::ScrollLeft : WebCore::ScrollUp, WebCore::ScrollByPixel, delta); - return true; - } - - return false; - } - -bool WebScrollbarImpl::onKeyDown(const WebInputEvent& event) -{ - WebKeyboardEvent keyboard = *static_cast<const WebKeyboardEvent*>(&event); - int keyCode; - // We have to duplicate this logic from WebViewImpl because there it uses - // Char and RawKeyDown events, which don't exist at this point. - if (keyboard.windowsKeyCode == VKEY_SPACE) - keyCode = ((keyboard.modifiers & WebInputEvent::ShiftKey) ? VKEY_PRIOR : VKEY_NEXT); - else { - if (keyboard.modifiers == WebInputEvent::ControlKey) { - // Match FF behavior in the sense that Ctrl+home/end are the only Ctrl - // key combinations which affect scrolling. Safari is buggy in the - // sense that it scrolls the page for all Ctrl+scrolling key - // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc. - switch (keyboard.windowsKeyCode) { - case VKEY_HOME: - case VKEY_END: - break; - default: - return false; - } - } - - if (keyboard.isSystemKey || (keyboard.modifiers & WebInputEvent::ShiftKey)) - return false; - - keyCode = keyboard.windowsKeyCode; - } - WebCore::ScrollDirection scrollDirection; - WebCore::ScrollGranularity scrollGranularity; - if (WebViewImpl::mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity)) { - // Will return false if scroll direction wasn't compatible with this scrollbar. - return m_scrollbar->scroll(scrollDirection, scrollGranularity); - } - return false; -} - -int WebScrollbarImpl::scrollSize(WebCore::ScrollbarOrientation orientation) const -{ - return (orientation == m_scrollbar->orientation()) ? (m_scrollbar->totalSize() - m_scrollbar->visibleSize()) : 0; -} - -void WebScrollbarImpl::setScrollOffsetFromAnimation(const WebCore::IntPoint& offset) -{ - m_scrollbar->setValue((m_scrollbar->orientation() == HorizontalScrollbar) ? offset.x() : offset.y(), Scrollbar::FromScrollAnimator); -} - -void WebScrollbarImpl::valueChanged(WebCore::Scrollbar*) -{ - m_client->valueChanged(this); -} - -void WebScrollbarImpl::invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect& rect) -{ - WebRect webrect(rect); - webrect.x += m_scrollbar->x(); - webrect.y += m_scrollbar->y(); - m_client->invalidateScrollbarRect(this, webrect); -} - -bool WebScrollbarImpl::isActive() const -{ - return true; -} - -bool WebScrollbarImpl::scrollbarCornerPresent() const -{ - return false; -} - -void WebScrollbarImpl::getTickmarks(Vector<WebCore::IntRect>& tickmarks) const -{ - WebVector<WebRect> ticks; - m_client->getTickmarks(const_cast<WebScrollbarImpl*>(this), &ticks); - tickmarks.resize(ticks.size()); - for (size_t i = 0; i < ticks.size(); ++i) - tickmarks[i] = ticks[i]; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebScrollbarImpl.h b/WebKit/chromium/src/WebScrollbarImpl.h deleted file mode 100644 index 5512867..0000000 --- a/WebKit/chromium/src/WebScrollbarImpl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebScrollbarImpl_h -#define WebScrollbarImpl_h - -#include "ScrollbarClient.h" -#include "WebScrollbar.h" - -#include <wtf/RefPtr.h> - -namespace WebCore { -class Scrollbar; -} - -namespace WebKit { - -class WebScrollbarImpl : public WebScrollbar, - public WebCore::ScrollbarClient { -public: - WebScrollbarImpl(WebScrollbarClient*, Orientation orientation); - ~WebScrollbarImpl(); - - // WebKit::WebScrollbar methods - virtual void setLocation(const WebRect&); - virtual int value() const; - virtual void setValue(int position); - virtual void setDocumentSize(int size); - virtual void scroll(ScrollDirection, ScrollGranularity, float multiplier); - virtual void paint(WebCanvas*, const WebRect&); - virtual bool handleInputEvent(const WebInputEvent&); - - // WebCore::ScrollbarClient methods - virtual int scrollSize(WebCore::ScrollbarOrientation orientation) const; - virtual void setScrollOffsetFromAnimation(const WebCore::IntPoint&); - virtual void valueChanged(WebCore::Scrollbar*); - virtual void invalidateScrollbarRect(WebCore::Scrollbar*, const WebCore::IntRect&); - virtual bool isActive() const; - virtual bool scrollbarCornerPresent() const; - virtual void getTickmarks(Vector<WebCore::IntRect>&) const; - -private: - bool onMouseDown(const WebInputEvent& event); - bool onMouseUp(const WebInputEvent& event); - bool onMouseMove(const WebInputEvent& event); - bool onMouseLeave(const WebInputEvent& event); - bool onMouseWheel(const WebInputEvent& event); - bool onKeyDown(const WebInputEvent& event); - - WebScrollbarClient* m_client; - - RefPtr<WebCore::Scrollbar> m_scrollbar; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp deleted file mode 100644 index 8e27a67..0000000 --- a/WebKit/chromium/src/WebSearchableFormData.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSearchableFormData.h" - -#include "Document.h" -#include "FormDataBuilder.h" -#include "FormDataList.h" -#include "Frame.h" -#include "HTMLFormControlElement.h" -#include "HTMLFormElement.h" -#include "HTMLInputElement.h" -#include "HTMLNames.h" -#include "HTMLOptionElement.h" -#include "HTMLOptionsCollection.h" -#include "HTMLSelectElement.h" -#include "TextEncoding.h" -#include "WebFormElement.h" - -using namespace WebCore; -using namespace HTMLNames; - -namespace { - -// Gets the encoding for the form. -void GetFormEncoding(const HTMLFormElement* form, TextEncoding* encoding) -{ - String str(form->getAttribute(HTMLNames::accept_charsetAttr)); - str.replace(',', ' '); - Vector<String> charsets; - str.split(' ', charsets); - for (Vector<String>::const_iterator i(charsets.begin()); i != charsets.end(); ++i) { - *encoding = TextEncoding(*i); - if (encoding->isValid()) - return; - } - const Frame* frame = form->document()->frame(); - *encoding = frame ? TextEncoding(frame->loader()->writer()->encoding()) : Latin1Encoding(); -} - -// Returns true if the submit request results in an HTTP URL. -bool IsHTTPFormSubmit(const HTMLFormElement* form) -{ - String action(form->action()); - return form->document()->frame()->loader()->completeURL(action.isNull() ? "" : action).protocol() == "http"; -} - -// If the form does not have an activated submit button, the first submit -// button is returned. -HTMLFormControlElement* GetButtonToActivate(HTMLFormElement* form) -{ - HTMLFormControlElement* firstSubmitButton = 0; - // FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice. - for (Vector<FormAssociatedElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) { - if (!(*i)->isFormControlElement()) - continue; - HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(*i); - if (formElement->isActivatedSubmit()) - // There's a button that is already activated for submit, return 0. - return 0; - if (!firstSubmitButton && formElement->isSuccessfulSubmitButton()) - firstSubmitButton = formElement; - } - return firstSubmitButton; -} - -// Returns true if the selected state of all the options matches the default -// selected state. -bool IsSelectInDefaultState(const HTMLSelectElement* select) -{ - const Vector<Element*>& listItems = select->listItems(); - if (select->multiple() || select->size() > 1) { - for (Vector<Element*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) { - if (!(*i)->hasLocalName(HTMLNames::optionTag)) - continue; - const HTMLOptionElement* optionElement = static_cast<const HTMLOptionElement*>(*i); - if (optionElement->selected() != optionElement->defaultSelected()) - return false; - } - return true; - } - - // The select is rendered as a combobox (called menulist in WebKit). At - // least one item is selected, determine which one. - const HTMLOptionElement* initialSelected = 0; - for (Vector<Element*>::const_iterator i(listItems.begin()); i != listItems.end(); ++i) { - if (!(*i)->hasLocalName(HTMLNames::optionTag)) - continue; - const HTMLOptionElement* optionElement = static_cast<const HTMLOptionElement*>(*i); - if (optionElement->defaultSelected()) { - // The page specified the option to select. - initialSelected = optionElement; - break; - } - if (!initialSelected) - initialSelected = optionElement; - } - return initialSelected ? initialSelected->selected() : true; -} - -// Returns true if the form element is in its default state, false otherwise. -// The default state is the state of the form element on initial load of the -// page, and varies depending upon the form element. For example, a checkbox is -// in its default state if the checked state matches the state of the checked attribute. -bool IsInDefaultState(const HTMLFormControlElement* formElement) -{ - if (formElement->hasTagName(HTMLNames::inputTag)) { - const HTMLInputElement* inputElement = static_cast<const HTMLInputElement*>(formElement); - if (inputElement->isCheckbox() || inputElement->isRadioButton()) - return inputElement->checked() == inputElement->hasAttribute(checkedAttr); - } else if (formElement->hasTagName(HTMLNames::selectTag)) - return IsSelectInDefaultState(static_cast<const HTMLSelectElement*>(formElement)); - return true; -} - -// If form has only one text input element, return true. If a valid input -// element is not found, return false. Additionally, the form data for all -// elements is added to enc_string and the encoding used is set in -// encoding_name. -bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedString, String* encodingName) -{ - TextEncoding encoding; - GetFormEncoding(form, &encoding); - if (!encoding.isValid()) { - // Need a valid encoding to encode the form elements. - // If the encoding isn't found webkit ends up replacing the params with - // empty strings. So, we don't try to do anything here. - return 0; - } - *encodingName = encoding.name(); - - HTMLInputElement* textElement = 0; - // FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice. - for (Vector<FormAssociatedElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) { - if (!(*i)->isFormControlElement()) - continue; - HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(*i); - if (formElement->disabled() || formElement->name().isNull()) - continue; - - if (!IsInDefaultState(formElement) || formElement->hasTagName(HTMLNames::textareaTag)) - return 0; - - bool isTextElement = false; - if (formElement->hasTagName(HTMLNames::inputTag)) { - const HTMLInputElement* input = static_cast<const HTMLInputElement*>(formElement); - if (input->isFileUpload()) { - // Too big, don't try to index this. - return 0; - } - - if (input->isPasswordField()) { - // Don't store passwords! This is most likely an https anyway. - return 0; - } - - if (input->isTextField()) - isTextElement = true; - } - - FormDataList dataList(encoding); - if (!formElement->appendFormData(dataList, false)) - continue; - - const Vector<FormDataList::Item>& items = dataList.items(); - if (isTextElement && !items.isEmpty()) { - if (textElement) { - // The auto-complete bar only knows how to fill in one value. - // This form has multiple fields; don't treat it as searchable. - return false; - } - textElement = static_cast<HTMLInputElement*>(formElement); - } - for (Vector<FormDataList::Item>::const_iterator j(items.begin()); j != items.end(); ++j) { - // Handle ISINDEX / <input name=isindex> specially, but only if it's - // the first entry. - if (!encodedString->isEmpty() || j->data() != "isindex") { - if (!encodedString->isEmpty()) - encodedString->append('&'); - FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); - encodedString->append('='); - } - ++j; - if (formElement == textElement) - encodedString->append("{searchTerms}", 13); - else - FormDataBuilder::encodeStringAsFormData(*encodedString, j->data()); - } - } - - return textElement; -} - -} // namespace - -namespace WebKit { - -WebSearchableFormData::WebSearchableFormData(const WebFormElement& form) -{ - RefPtr<HTMLFormElement> formElement = form.operator PassRefPtr<HTMLFormElement>(); - const Frame* frame = formElement->document()->frame(); - if (!frame) - return; - - // Only consider forms that GET data and the action targets an http page. - if (equalIgnoringCase(formElement->getAttribute(HTMLNames::methodAttr), "post") || !IsHTTPFormSubmit(formElement.get())) - return; - - HTMLFormControlElement* firstSubmitButton = GetButtonToActivate(formElement.get()); - if (firstSubmitButton) { - // The form does not have an active submit button, make the first button - // active. We need to do this, otherwise the URL will not contain the - // name of the submit button. - firstSubmitButton->setActivatedSubmit(true); - } - Vector<char> encodedString; - String encoding; - bool hasElement = HasSuitableTextElement(formElement.get(), &encodedString, &encoding); - if (firstSubmitButton) - firstSubmitButton->setActivatedSubmit(false); - if (!hasElement) { - // Not a searchable form. - return; - } - - String action(formElement->action()); - KURL url(frame->loader()->completeURL(action.isNull() ? "" : action)); - RefPtr<FormData> formData = FormData::create(encodedString); - url.setQuery(formData->flattenToString()); - m_url = url; - m_encoding = encoding; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSecurityOrigin.cpp b/WebKit/chromium/src/WebSecurityOrigin.cpp deleted file mode 100644 index adccb31..0000000 --- a/WebKit/chromium/src/WebSecurityOrigin.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSecurityOrigin.h" - -#include "KURL.h" -#include "SecurityOrigin.h" -#include "WebString.h" -#include "WebURL.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -class WebSecurityOriginPrivate : public SecurityOrigin { -}; - -WebSecurityOrigin WebSecurityOrigin::createFromDatabaseIdentifier(const WebString& databaseIdentifier) -{ - return WebSecurityOrigin(SecurityOrigin::createFromDatabaseIdentifier(databaseIdentifier)); -} - -WebSecurityOrigin WebSecurityOrigin::createFromString(const WebString& origin) -{ - return WebSecurityOrigin(SecurityOrigin::createFromString(origin)); -} - -WebSecurityOrigin WebSecurityOrigin::create(const WebURL& url) -{ - return WebSecurityOrigin(SecurityOrigin::create(url)); -} - -void WebSecurityOrigin::reset() -{ - assign(0); -} - -void WebSecurityOrigin::assign(const WebSecurityOrigin& other) -{ - WebSecurityOriginPrivate* p = const_cast<WebSecurityOriginPrivate*>(other.m_private); - if (p) - p->ref(); - assign(p); -} - -WebString WebSecurityOrigin::protocol() const -{ - ASSERT(m_private); - return m_private->protocol(); -} - -WebString WebSecurityOrigin::host() const -{ - ASSERT(m_private); - return m_private->host(); -} - -unsigned short WebSecurityOrigin::port() const -{ - ASSERT(m_private); - return m_private->port(); -} - -bool WebSecurityOrigin::isEmpty() const -{ - ASSERT(m_private); - return m_private->isEmpty(); -} - -bool WebSecurityOrigin::canAccess(const WebSecurityOrigin& other) const -{ - ASSERT(m_private); - ASSERT(other.m_private); - return m_private->canAccess(other.m_private); -} - -bool WebSecurityOrigin::canRequest(const WebURL& url) const -{ - ASSERT(m_private); - return m_private->canRequest(url); -} - -WebString WebSecurityOrigin::toString() const -{ - ASSERT(m_private); - return m_private->toString(); -} - -WebString WebSecurityOrigin::databaseIdentifier() const -{ - ASSERT(m_private); - return m_private->databaseIdentifier(); -} - -bool WebSecurityOrigin::canAccessPasswordManager() const -{ - ASSERT(m_private); - return m_private->canAccessPasswordManager(); -} - -WebSecurityOrigin::WebSecurityOrigin(const WTF::PassRefPtr<WebCore::SecurityOrigin>& origin) - : m_private(static_cast<WebSecurityOriginPrivate*>(origin.releaseRef())) -{ -} - -WebSecurityOrigin& WebSecurityOrigin::operator=(const WTF::PassRefPtr<WebCore::SecurityOrigin>& origin) -{ - assign(static_cast<WebSecurityOriginPrivate*>(origin.releaseRef())); - return *this; -} - -WebSecurityOrigin::operator WTF::PassRefPtr<WebCore::SecurityOrigin>() const -{ - return PassRefPtr<SecurityOrigin>(const_cast<WebSecurityOriginPrivate*>(m_private)); -} - -SecurityOrigin* WebSecurityOrigin::get() const -{ - return m_private; -} - -void WebSecurityOrigin::assign(WebSecurityOriginPrivate* p) -{ - // p is already ref'd for us by the caller - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSecurityPolicy.cpp b/WebKit/chromium/src/WebSecurityPolicy.cpp deleted file mode 100644 index 58d0893..0000000 --- a/WebKit/chromium/src/WebSecurityPolicy.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSecurityPolicy.h" - -#include "FrameLoader.h" -#include "SchemeRegistry.h" -#include "SecurityOrigin.h" - -#include "WebString.h" -#include "WebURL.h" - -using namespace WebCore; - -namespace WebKit { - -void WebSecurityPolicy::registerURLSchemeAsLocal(const WebString& scheme) -{ - SchemeRegistry::registerURLSchemeAsLocal(scheme); -} - -void WebSecurityPolicy::registerURLSchemeAsNoAccess(const WebString& scheme) -{ - SchemeRegistry::registerURLSchemeAsNoAccess(scheme); -} - -void WebSecurityPolicy::registerURLSchemeAsSecure(const WebString& scheme) -{ - SchemeRegistry::registerURLSchemeAsSecure(scheme); -} - -void WebSecurityPolicy::addOriginAccessWhitelistEntry( - const WebURL& sourceOrigin, - const WebString& destinationProtocol, - const WebString& destinationHost, - bool allowDestinationSubdomains) -{ - SecurityOrigin::addOriginAccessWhitelistEntry( - *SecurityOrigin::create(sourceOrigin), destinationProtocol, - destinationHost, allowDestinationSubdomains); -} - -void WebSecurityPolicy::removeOriginAccessWhitelistEntry( - const WebURL& sourceOrigin, - const WebString& destinationProtocol, - const WebString& destinationHost, - bool allowDestinationSubdomains) -{ - SecurityOrigin::removeOriginAccessWhitelistEntry( - *SecurityOrigin::create(sourceOrigin), destinationProtocol, - destinationHost, allowDestinationSubdomains); -} - -void WebSecurityPolicy::resetOriginAccessWhitelists() -{ - SecurityOrigin::resetOriginAccessWhitelists(); -} - -bool WebSecurityPolicy::shouldHideReferrer(const WebURL& url, const WebString& referrer) -{ - return SecurityOrigin::shouldHideReferrer(url, referrer); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSelectElement.cpp b/WebKit/chromium/src/WebSelectElement.cpp deleted file mode 100644 index 79a4d85..0000000 --- a/WebKit/chromium/src/WebSelectElement.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSelectElement.h" - -#include "HTMLNames.h" -#include "HTMLOptionElement.h" -#include "HTMLSelectElement.h" -#include "WebString.h" -#include <wtf/PassRefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -void WebSelectElement::setValue(const WebString& value) -{ - unwrap<HTMLSelectElement>()->setValue(value); -} - -WebString WebSelectElement::value() -{ - return unwrap<HTMLSelectElement>()->value(); -} - -WebVector<WebElement> WebSelectElement::listItems() -{ - const Vector<Element*>& sourceItems = unwrap<HTMLSelectElement>()->listItems(); - WebVector<WebElement> items(sourceItems.size()); - for (size_t i = 0; i < sourceItems.size(); ++i) - items[i] = WebElement(static_cast<HTMLElement*>(sourceItems[i])); - - return items; -} - -WebSelectElement::WebSelectElement(const PassRefPtr<HTMLSelectElement>& elem) - : WebFormControlElement(elem) -{ -} - -WebSelectElement& WebSelectElement::operator=(const PassRefPtr<HTMLSelectElement>& elem) -{ - m_private = elem; - return *this; -} - -WebSelectElement::operator PassRefPtr<HTMLSelectElement>() const -{ - return static_cast<HTMLSelectElement*>(m_private.get()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSerializedScriptValue.cpp b/WebKit/chromium/src/WebSerializedScriptValue.cpp deleted file mode 100644 index 7149a4d..0000000 --- a/WebKit/chromium/src/WebSerializedScriptValue.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSerializedScriptValue.h" - -#include "SerializedScriptValue.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -WebSerializedScriptValue WebSerializedScriptValue::fromString(const WebString& s) -{ - return SerializedScriptValue::createFromWire(s); -} - -WebSerializedScriptValue WebSerializedScriptValue::createInvalid() -{ - return SerializedScriptValue::create(); -} - -void WebSerializedScriptValue::reset() -{ - m_private.reset(); -} - -void WebSerializedScriptValue::assign(const WebSerializedScriptValue& other) -{ - m_private = other.m_private; -} - -WebString WebSerializedScriptValue::toString() const -{ - return m_private->toWireString(); -} - -WebSerializedScriptValue::WebSerializedScriptValue(const PassRefPtr<SerializedScriptValue>& value) - : m_private(value) -{ -} - -WebSerializedScriptValue& WebSerializedScriptValue::operator=(const PassRefPtr<SerializedScriptValue>& value) -{ - m_private = value; - return *this; -} - -WebSerializedScriptValue::operator PassRefPtr<SerializedScriptValue>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp deleted file mode 100644 index e60562c..0000000 --- a/WebKit/chromium/src/WebSettingsImpl.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSettingsImpl.h" - -#include "FontRenderingMode.h" -#include "Settings.h" -#include "WebString.h" -#include "WebURL.h" - -#if defined(OS_WIN) -#include "RenderThemeChromiumWin.h" -#endif - -using namespace WebCore; - -namespace WebKit { - -WebSettingsImpl::WebSettingsImpl(Settings* settings) - : m_settings(settings) -{ - ASSERT(settings); -} - -void WebSettingsImpl::setStandardFontFamily(const WebString& font) -{ - m_settings->setStandardFontFamily(font); -} - -void WebSettingsImpl::setFixedFontFamily(const WebString& font) -{ - m_settings->setFixedFontFamily((String)font); -} - -void WebSettingsImpl::setSerifFontFamily(const WebString& font) -{ - m_settings->setSerifFontFamily((String)font); -} - -void WebSettingsImpl::setSansSerifFontFamily(const WebString& font) -{ - m_settings->setSansSerifFontFamily((String)font); -} - -void WebSettingsImpl::setCursiveFontFamily(const WebString& font) -{ - m_settings->setCursiveFontFamily((String)font); -} - -void WebSettingsImpl::setFantasyFontFamily(const WebString& font) -{ - m_settings->setFantasyFontFamily((String)font); -} - -void WebSettingsImpl::setDefaultFontSize(int size) -{ - m_settings->setDefaultFontSize(size); -#if defined(OS_WIN) - // RenderTheme is a singleton that needs to know the default font size to - // draw some form controls. We let it know each time the size changes. - WebCore::RenderThemeChromiumWin::setDefaultFontSize(size); -#endif -} - -void WebSettingsImpl::setDefaultFixedFontSize(int size) -{ - m_settings->setDefaultFixedFontSize(size); -} - -void WebSettingsImpl::setMinimumFontSize(int size) -{ - m_settings->setMinimumFontSize(size); -} - -void WebSettingsImpl::setMinimumLogicalFontSize(int size) -{ - m_settings->setMinimumLogicalFontSize(size); -} - -void WebSettingsImpl::setDefaultTextEncodingName(const WebString& encoding) -{ - m_settings->setDefaultTextEncodingName((String)encoding); -} - -void WebSettingsImpl::setJavaScriptEnabled(bool enabled) -{ - m_settings->setJavaScriptEnabled(enabled); -} - -void WebSettingsImpl::setWebSecurityEnabled(bool enabled) -{ - m_settings->setWebSecurityEnabled(enabled); -} - -void WebSettingsImpl::setJavaScriptCanOpenWindowsAutomatically(bool canOpenWindows) -{ - m_settings->setJavaScriptCanOpenWindowsAutomatically(canOpenWindows); -} - -void WebSettingsImpl::setLoadsImagesAutomatically(bool loadsImagesAutomatically) -{ - m_settings->setLoadsImagesAutomatically(loadsImagesAutomatically); -} - -void WebSettingsImpl::setImagesEnabled(bool enabled) -{ - m_settings->setImagesEnabled(enabled); -} - -void WebSettingsImpl::setPluginsEnabled(bool enabled) -{ - m_settings->setPluginsEnabled(enabled); -} - -void WebSettingsImpl::setDOMPasteAllowed(bool enabled) -{ - m_settings->setDOMPasteAllowed(enabled); -} - -void WebSettingsImpl::setDeveloperExtrasEnabled(bool enabled) -{ - m_settings->setDeveloperExtrasEnabled(enabled); -} - -void WebSettingsImpl::setNeedsSiteSpecificQuirks(bool enabled) -{ - m_settings->setNeedsSiteSpecificQuirks(enabled); -} - -void WebSettingsImpl::setShrinksStandaloneImagesToFit(bool shrinkImages) -{ - m_settings->setShrinksStandaloneImagesToFit(shrinkImages); -} - -void WebSettingsImpl::setUsesEncodingDetector(bool usesDetector) -{ - m_settings->setUsesEncodingDetector(usesDetector); -} - -void WebSettingsImpl::setTextAreasAreResizable(bool areResizable) -{ - m_settings->setTextAreasAreResizable(areResizable); -} - -void WebSettingsImpl::setJavaEnabled(bool enabled) -{ - m_settings->setJavaEnabled(enabled); -} - -void WebSettingsImpl::setAllowScriptsToCloseWindows(bool allow) -{ - m_settings->setAllowScriptsToCloseWindows(allow); -} - -void WebSettingsImpl::setUserStyleSheetLocation(const WebURL& location) -{ - m_settings->setUserStyleSheetLocation(location); -} - -void WebSettingsImpl::setAuthorAndUserStylesEnabled(bool enabled) -{ - m_settings->setAuthorAndUserStylesEnabled(enabled); -} - -void WebSettingsImpl::setUsesPageCache(bool usesPageCache) -{ - m_settings->setUsesPageCache(usesPageCache); -} - -void WebSettingsImpl::setDownloadableBinaryFontsEnabled(bool enabled) -{ - m_settings->setDownloadableBinaryFontsEnabled(enabled); -} - -void WebSettingsImpl::setJavaScriptCanAccessClipboard(bool enabled) -{ - m_settings->setJavaScriptCanAccessClipboard(enabled); -} - -void WebSettingsImpl::setXSSAuditorEnabled(bool enabled) -{ - m_settings->setXSSAuditorEnabled(enabled); -} - -void WebSettingsImpl::setLocalStorageEnabled(bool enabled) -{ - m_settings->setLocalStorageEnabled(enabled); -} - -void WebSettingsImpl::setEditableLinkBehaviorNeverLive() -{ - // FIXME: If you ever need more behaviors than this, then we should probably - // define an enum in WebSettings.h and have a switch statement that - // translates. Until then, this is probably fine, though. - m_settings->setEditableLinkBehavior(WebCore::EditableLinkNeverLive); -} - -void WebSettingsImpl::setFrameFlatteningEnabled(bool enabled) -{ - m_settings->setFrameFlatteningEnabled(enabled); -} - -void WebSettingsImpl::setFontRenderingModeNormal() -{ - // FIXME: If you ever need more behaviors than this, then we should probably - // define an enum in WebSettings.h and have a switch statement that - // translates. Until then, this is probably fine, though. - m_settings->setFontRenderingMode(WebCore::NormalRenderingMode); -} - -void WebSettingsImpl::setShouldPaintCustomScrollbars(bool enabled) -{ - m_settings->setShouldPaintCustomScrollbars(enabled); -} - -void WebSettingsImpl::setAllowUniversalAccessFromFileURLs(bool allow) -{ - m_settings->setAllowUniversalAccessFromFileURLs(allow); -} - -void WebSettingsImpl::setAllowFileAccessFromFileURLs(bool allow) -{ - m_settings->setAllowFileAccessFromFileURLs(allow); -} - -void WebSettingsImpl::setTextDirectionSubmenuInclusionBehaviorNeverIncluded() -{ - // FIXME: If you ever need more behaviors than this, then we should probably - // define an enum in WebSettings.h and have a switch statement that - // translates. Until then, this is probably fine, though. - m_settings->setTextDirectionSubmenuInclusionBehavior(WebCore::TextDirectionSubmenuNeverIncluded); -} - -void WebSettingsImpl::setOfflineWebApplicationCacheEnabled(bool enabled) -{ - m_settings->setOfflineWebApplicationCacheEnabled(enabled); -} - -void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled) -{ - m_settings->setWebGLEnabled(enabled); -} - -void WebSettingsImpl::setShowDebugBorders(bool show) -{ - m_settings->setShowDebugBorders(show); -} - -void WebSettingsImpl::setEditingBehavior(EditingBehavior behavior) -{ - m_settings->setEditingBehaviorType(static_cast<WebCore::EditingBehaviorType>(behavior)); -} - -void WebSettingsImpl::setAcceleratedCompositingEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingEnabled(enabled); -} - -void WebSettingsImpl::setAcceleratedCompositingFor3DTransformsEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingFor3DTransformsEnabled(enabled); -} - -void WebSettingsImpl::setAcceleratedCompositingForVideoEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingForVideoEnabled(enabled); -} - -void WebSettingsImpl::setAcceleratedCompositingForPluginsEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingForPluginsEnabled(enabled); -} - -void WebSettingsImpl::setAcceleratedCompositingForCanvasEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingForCanvasEnabled(enabled); -} - -void WebSettingsImpl::setAcceleratedCompositingForAnimationEnabled(bool enabled) -{ - m_settings->setAcceleratedCompositingForAnimationEnabled(enabled); -} - -void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled) -{ - m_settings->setAccelerated2dCanvasEnabled(enabled); -} - -void WebSettingsImpl::setMemoryInfoEnabled(bool enabled) -{ - m_settings->setMemoryInfoEnabled(enabled); -} - -void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled) -{ - m_settings->setHyperlinkAuditingEnabled(enabled); -} - -void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled) -{ - m_settings->setCaretBrowsingEnabled(enabled); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h deleted file mode 100644 index ffdc8d3..0000000 --- a/WebKit/chromium/src/WebSettingsImpl.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSettingsImpl_h -#define WebSettingsImpl_h - -#include "WebSettings.h" - -namespace WebCore { -class Settings; -} - -namespace WebKit { - -class WebSettingsImpl : public WebSettings { -public: - explicit WebSettingsImpl(WebCore::Settings*); - virtual ~WebSettingsImpl() { } - - virtual void setStandardFontFamily(const WebString&); - virtual void setFixedFontFamily(const WebString&); - virtual void setSerifFontFamily(const WebString&); - virtual void setSansSerifFontFamily(const WebString&); - virtual void setCursiveFontFamily(const WebString&); - virtual void setFantasyFontFamily(const WebString&); - virtual void setDefaultFontSize(int); - virtual void setDefaultFixedFontSize(int); - virtual void setMinimumFontSize(int); - virtual void setMinimumLogicalFontSize(int); - virtual void setDefaultTextEncodingName(const WebString&); - virtual void setJavaScriptEnabled(bool); - virtual void setWebSecurityEnabled(bool); - virtual void setJavaScriptCanOpenWindowsAutomatically(bool); - virtual void setLoadsImagesAutomatically(bool); - virtual void setImagesEnabled(bool); - virtual void setPluginsEnabled(bool); - virtual void setDOMPasteAllowed(bool); - virtual void setDeveloperExtrasEnabled(bool); - virtual void setNeedsSiteSpecificQuirks(bool); - virtual void setShrinksStandaloneImagesToFit(bool); - virtual void setUsesEncodingDetector(bool); - virtual void setTextAreasAreResizable(bool); - virtual void setJavaEnabled(bool); - virtual void setAllowScriptsToCloseWindows(bool); - virtual void setUserStyleSheetLocation(const WebURL&); - virtual void setAuthorAndUserStylesEnabled(bool); - virtual void setUsesPageCache(bool); - virtual void setDownloadableBinaryFontsEnabled(bool); - virtual void setJavaScriptCanAccessClipboard(bool); - virtual void setXSSAuditorEnabled(bool); - virtual void setLocalStorageEnabled(bool); - virtual void setEditableLinkBehaviorNeverLive(); - virtual void setFrameFlatteningEnabled(bool); - virtual void setFontRenderingModeNormal(); - virtual void setShouldPaintCustomScrollbars(bool); - virtual void setAllowUniversalAccessFromFileURLs(bool); - virtual void setAllowFileAccessFromFileURLs(bool); - virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); - virtual void setOfflineWebApplicationCacheEnabled(bool); - virtual void setExperimentalWebGLEnabled(bool); - virtual void setShowDebugBorders(bool); - virtual void setEditingBehavior(EditingBehavior); - virtual void setAcceleratedCompositingEnabled(bool); - virtual void setAcceleratedCompositingFor3DTransformsEnabled(bool); - virtual void setAcceleratedCompositingForVideoEnabled(bool); - virtual void setAcceleratedCompositingForPluginsEnabled(bool); - virtual void setAcceleratedCompositingForCanvasEnabled(bool); - virtual void setAcceleratedCompositingForAnimationEnabled(bool); - virtual void setAccelerated2dCanvasEnabled(bool); - virtual void setMemoryInfoEnabled(bool); - virtual void setHyperlinkAuditingEnabled(bool); - virtual void setCaretBrowsingEnabled(bool); - -private: - WebCore::Settings* m_settings; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebSharedWorkerImpl.cpp b/WebKit/chromium/src/WebSharedWorkerImpl.cpp deleted file mode 100644 index e73c0f4..0000000 --- a/WebKit/chromium/src/WebSharedWorkerImpl.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSharedWorkerImpl.h" - -#include "CrossThreadTask.h" -#include "KURL.h" -#include "MessageEvent.h" -#include "MessagePortChannel.h" -#include "PlatformMessagePortChannel.h" -#include "ScriptExecutionContext.h" -#include "SharedWorkerContext.h" -#include "SharedWorkerThread.h" - -#include "WebMessagePortChannel.h" -#include "WebString.h" -#include "WebURL.h" - -using namespace WebCore; - -namespace WebKit { - -#if ENABLE(SHARED_WORKERS) - -WebSharedWorkerImpl::WebSharedWorkerImpl(WebCommonWorkerClient* client) - : m_client(client) -{ -} - -WebSharedWorkerImpl::~WebSharedWorkerImpl() -{ -} - -bool WebSharedWorkerImpl::isStarted() -{ - // Should not ever be called from the worker thread (this API is only called on WebSharedWorkerProxy on the renderer thread). - ASSERT_NOT_REACHED(); - return workerThread(); -} - -void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel, ConnectListener* listener) -{ - // Convert the WebMessagePortChanel to a WebCore::MessagePortChannel. - RefPtr<PlatformMessagePortChannel> platform_channel = - PlatformMessagePortChannel::create(webChannel); - webChannel->setClient(platform_channel.get()); - OwnPtr<MessagePortChannel> channel = - MessagePortChannel::create(platform_channel); - - workerThread()->runLoop().postTask( - createCallbackTask(&connectTask, this, channel.release())); - if (listener) - listener->connected(); -} - -void WebSharedWorkerImpl::connectTask(ScriptExecutionContext* context, WebSharedWorkerImpl* worker, PassOwnPtr<MessagePortChannel> channel) -{ - // Wrap the passed-in channel in a MessagePort, and send it off via a connect event. - RefPtr<MessagePort> port = MessagePort::create(*context); - port->entangle(channel); - ASSERT(context->isWorkerContext()); - WorkerContext* workerContext = static_cast<WorkerContext*>(context); - ASSERT(workerContext->isSharedWorkerContext()); - workerContext->toSharedWorkerContext()->dispatchEvent(createConnectEvent(port)); -} - -void WebSharedWorkerImpl::startWorkerContext(const WebURL& url, const WebString& name, const WebString& userAgent, const WebString& sourceCode, long long) -{ - initializeLoader(url); - setWorkerThread(SharedWorkerThread::create(name, url, userAgent, sourceCode, *this, *this)); - workerThread()->start(); -} - -void WebSharedWorkerImpl::terminateWorkerContext() -{ - stopWorkerThread(); -} - -void WebSharedWorkerImpl::clientDestroyed() -{ - m_client = 0; -} - -WebWorkerClient* WebSharedWorkerImpl::client() -{ - // We should never be asked for a WebWorkerClient (only dedicated workers have an associated WebWorkerClient). - // It should not be possible for SharedWorkerContext to generate an API call outside those supported by WebCommonWorkerClient. - ASSERT_NOT_REACHED(); - return 0; -} - -WebSharedWorker* WebSharedWorker::create(WebCommonWorkerClient* client) -{ - return new WebSharedWorkerImpl(client); -} - -#endif // ENABLE(SHARED_WORKERS) - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSharedWorkerImpl.h b/WebKit/chromium/src/WebSharedWorkerImpl.h deleted file mode 100644 index b591c7b..0000000 --- a/WebKit/chromium/src/WebSharedWorkerImpl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSharedWorkerImpl_h -#define WebSharedWorkerImpl_h - -#include "WebSharedWorker.h" - -#if ENABLE(SHARED_WORKERS) - -#include "ScriptExecutionContext.h" - -#include "WebWorkerBase.h" - -namespace WebKit { - -// This class is used by the worker process code to talk to the WebCore::SharedWorker implementation. -// It can't use it directly since it uses WebKit types, so this class converts the data types. -// When the WebCore::SharedWorker object wants to call WebCore::WorkerReportingProxy, this class will -// convert to Chrome data types first and then call the supplied WebCommonWorkerClient. -class WebSharedWorkerImpl : public WebWorkerBase, public WebSharedWorker { -public: - explicit WebSharedWorkerImpl(WebCommonWorkerClient* client); - - // WebSharedWorker methods: - virtual bool isStarted(); - virtual void startWorkerContext(const WebURL&, const WebString& name, const WebString& userAgent, const WebString& sourceCode, long long); - virtual void connect(WebMessagePortChannel*, ConnectListener*); - virtual void terminateWorkerContext(); - virtual void clientDestroyed(); - - // WebWorkerBase methods: - WebWorkerClient* client(); - WebCommonWorkerClient* commonClient() { return m_client; } - -private: - virtual ~WebSharedWorkerImpl(); - - static void connectTask(WebCore::ScriptExecutionContext*, WebSharedWorkerImpl*, PassOwnPtr<WebCore::MessagePortChannel>); - - WebCommonWorkerClient* m_client; -}; - -} // namespace WebKit - -#endif // ENABLE(SHARED_WORKERS) - -#endif diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp deleted file mode 100644 index 48f8b50..0000000 --- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSpeechInputControllerMockImpl.h" - -#include "PlatformString.h" -#include "SpeechInputClientMock.h" -#include "WebRect.h" - -namespace WebKit { - -WebSpeechInputControllerMock* WebSpeechInputControllerMock::create(WebSpeechInputListener* listener) -{ - return new WebSpeechInputControllerMockImpl(listener); -} - -WebSpeechInputControllerMockImpl::WebSpeechInputControllerMockImpl( - WebSpeechInputListener* listener) - : m_webcoreMock(new WebCore::SpeechInputClientMock()) - , m_listener(listener) -{ - m_webcoreMock->setListener(this); -} - -WebSpeechInputControllerMockImpl::~WebSpeechInputControllerMockImpl() -{ - m_webcoreMock->setListener(0); -} - -void WebSpeechInputControllerMockImpl::addMockRecognitionResult(const WebString& result, double confidence, const WebString &language) -{ - m_webcoreMock->addRecognitionResult(result, confidence, language); -} - -void WebSpeechInputControllerMockImpl::clearResults() -{ - m_webcoreMock->clearResults(); -} - -void WebSpeechInputControllerMockImpl::didCompleteRecording(int requestId) -{ - m_listener->didCompleteRecording(requestId); -} - -void WebSpeechInputControllerMockImpl::didCompleteRecognition(int requestId) -{ - m_listener->didCompleteRecognition(requestId); -} - -void WebSpeechInputControllerMockImpl::setRecognitionResult(int requestId, const WebCore::SpeechInputResultArray& result) -{ - m_listener->setRecognitionResult(requestId, result); -} - -bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar) -{ - return m_webcoreMock->startRecognition(requestId, elementRect, language, grammar); -} - -void WebSpeechInputControllerMockImpl::cancelRecognition(int requestId) -{ - m_webcoreMock->cancelRecognition(requestId); -} - -void WebSpeechInputControllerMockImpl::stopRecording(int requestId) -{ - m_webcoreMock->stopRecording(requestId); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h deleted file mode 100644 index bf00ed0..0000000 --- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebSpeechInputControllerMockImpl_h -#define WebSpeechInputControllerMockImpl_h - -#include "SpeechInputListener.h" -#include "WebSpeechInputControllerMock.h" -#include "WebSpeechInputListener.h" -#include "WebString.h" -#include <wtf/OwnPtr.h> - -namespace WebCore { -class SpeechInputClientMock; -} - -namespace WebKit { - -struct WebRect; - -class WebSpeechInputControllerMockImpl : public WebCore::SpeechInputListener - , public WebSpeechInputControllerMock { -public: - WebSpeechInputControllerMockImpl(WebSpeechInputListener*); - virtual ~WebSpeechInputControllerMockImpl(); - - // WebCore::SpeechInputListener methods. - void didCompleteRecording(int requestId); - void didCompleteRecognition(int requestId); - void setRecognitionResult(int requestId, const WebCore::SpeechInputResultArray& result); - - // WebSpeechInputController methods. - bool startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar); - void cancelRecognition(int requestId); - void stopRecording(int requestId); - - // WebSpeechInputControllerMock methods. - void addMockRecognitionResult(const WebString& result, double confidence, const WebString& language); - void clearResults(); - -private: - OwnPtr<WebCore::SpeechInputClientMock> m_webcoreMock; - WebSpeechInputListener* m_listener; -}; - -} // namespace WebKit - -#endif // WebSpeechInputControllerMockImpl_h diff --git a/WebKit/chromium/src/WebSpeechInputResult.cpp b/WebKit/chromium/src/WebSpeechInputResult.cpp deleted file mode 100644 index 1cafc84..0000000 --- a/WebKit/chromium/src/WebSpeechInputResult.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebSpeechInputResult.h" - -#include "SpeechInputResult.h" -#include <wtf/PassRefPtr.h> - -namespace WebKit { - -void WebSpeechInputResult::reset() -{ - m_private.reset(); -} - -WebSpeechInputResult::WebSpeechInputResult(const PassRefPtr<WebCore::SpeechInputResult>& value) - : m_private(value) -{ -} - -void WebSpeechInputResult::set(const WebString& utterance, double confidence) -{ - m_private = WebCore::SpeechInputResult::create(utterance, confidence); -} - -WebSpeechInputResult::operator PassRefPtr<WebCore::SpeechInputResult>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebStorageAreaImpl.cpp b/WebKit/chromium/src/WebStorageAreaImpl.cpp deleted file mode 100644 index 2cecfe9..0000000 --- a/WebKit/chromium/src/WebStorageAreaImpl.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebStorageAreaImpl.h" - -#if ENABLE(DOM_STORAGE) - -#include "ExceptionCode.h" - -#include "WebString.h" -#include "WebURL.h" - -namespace WebKit { - -const WebURL* WebStorageAreaImpl::storageEventURL = 0; - -WebStorageAreaImpl::WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea) - : m_storageArea(storageArea) -{ -} - -WebStorageAreaImpl::~WebStorageAreaImpl() -{ -} - -unsigned WebStorageAreaImpl::length() -{ - return m_storageArea->length(); -} - -WebString WebStorageAreaImpl::key(unsigned index) -{ - return m_storageArea->key(index); -} - -WebString WebStorageAreaImpl::getItem(const WebString& key) -{ - return m_storageArea->getItem(key); -} - -void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*) -{ - int exceptionCode = 0; - - ScopedStorageEventURL scope(url); - oldValue = m_storageArea->setItem(key, value, exceptionCode, 0); - - if (exceptionCode) { - ASSERT(exceptionCode == WebCore::QUOTA_EXCEEDED_ERR); - result = ResultBlockedByQuota; - } else - result = ResultOK; -} - -void WebStorageAreaImpl::removeItem(const WebString& key, const WebURL& url, WebString& oldValue) -{ - ScopedStorageEventURL scope(url); - oldValue = m_storageArea->removeItem(key, 0); -} - -void WebStorageAreaImpl::clear(const WebURL& url, bool& somethingCleared) -{ - ScopedStorageEventURL scope(url); - somethingCleared = m_storageArea->clear(0); -} - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/WebStorageAreaImpl.h b/WebKit/chromium/src/WebStorageAreaImpl.h deleted file mode 100644 index 2869fc9..0000000 --- a/WebKit/chromium/src/WebStorageAreaImpl.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageAreaImpl_h -#define WebStorageAreaImpl_h - -#if ENABLE(DOM_STORAGE) - -#include "StorageAreaImpl.h" -#include "WebStorageArea.h" - -namespace WebKit { - -class WebStorageAreaImpl : public WebStorageArea { -public: - WebStorageAreaImpl(PassRefPtr<WebCore::StorageArea> storageArea); - virtual ~WebStorageAreaImpl(); - virtual unsigned length(); - virtual WebString key(unsigned index); - virtual WebString getItem(const WebString& key); - virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*); - virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue); - virtual void clear(const WebURL& url, bool& somethingCleared); - - // For storage events in single-process mode and test shell. - static const WebURL* currentStorageEventURL() { return storageEventURL; } - -private: - class ScopedStorageEventURL { - public: - ScopedStorageEventURL(const WebURL& url) - { - // FIXME: Once storage events are fired async in WebKit (as they should - // be) this can be ASSERTed to be 0 rather than saved. - m_existingStorageEventURL = storageEventURL; - storageEventURL = &url; - } - ~ScopedStorageEventURL() - { - storageEventURL = m_existingStorageEventURL; - } - - private: - const WebURL* m_existingStorageEventURL; - }; - - static const WebURL* storageEventURL; - - RefPtr<WebCore::StorageArea> m_storageArea; -}; - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) - -#endif // WebStorageAreaImpl_h diff --git a/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp b/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp deleted file mode 100644 index 515a423..0000000 --- a/WebKit/chromium/src/WebStorageEventDispatcherImpl.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebStorageEventDispatcherImpl.h" - -#if ENABLE(DOM_STORAGE) - -#include "KURL.h" -#include "SecurityOrigin.h" - -#include "WebStorageAreaImpl.h" -#include "WebURL.h" - -namespace WebKit { - -extern const char* pageGroupName; - -WebStorageEventDispatcher* WebStorageEventDispatcher::create() -{ - return new WebStorageEventDispatcherImpl(); -} - -WebStorageEventDispatcherImpl::WebStorageEventDispatcherImpl() - : m_eventDispatcher(new WebCore::StorageEventDispatcherImpl(pageGroupName)) -{ - ASSERT(m_eventDispatcher); -} - -void WebStorageEventDispatcherImpl::dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL& passedInURL, bool isLocalStorage) -{ - // Hack for single-process mode and test shell. - const WebURL* storageAreaImplURL = WebStorageAreaImpl::currentStorageEventURL(); - const WebURL& url = storageAreaImplURL ? *storageAreaImplURL : passedInURL; - - WebCore::StorageType storageType = isLocalStorage ? WebCore::LocalStorage : WebCore::SessionStorage; - RefPtr<WebCore::SecurityOrigin> securityOrigin = WebCore::SecurityOrigin::createFromString(origin); - m_eventDispatcher->dispatchStorageEvent(key, oldValue, newValue, securityOrigin.get(), url, storageType); -} - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/WebStorageEventDispatcherImpl.h b/WebKit/chromium/src/WebStorageEventDispatcherImpl.h deleted file mode 100644 index 6848b99..0000000 --- a/WebKit/chromium/src/WebStorageEventDispatcherImpl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageEventDispatcherImpl_h -#define WebStorageEventDispatcherImpl_h - -#if ENABLE(DOM_STORAGE) - -#include "StorageEventDispatcherImpl.h" -#include "WebStorageEventDispatcher.h" -#include <wtf/OwnPtr.h> - -namespace WebKit { - -class WebStorageEventDispatcherImpl : public WebStorageEventDispatcher { -public: - WebStorageEventDispatcherImpl(); - - virtual void dispatchStorageEvent(const WebString& key, const WebString& oldValue, - const WebString& newValue, const WebString& origin, - const WebURL&, bool isLocalStorage); - -private: - OwnPtr<WebCore::StorageEventDispatcherImpl> m_eventDispatcher; -}; - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) - -#endif // WebStorageEventDispatcherImpl_h diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp deleted file mode 100644 index 53b4a75..0000000 --- a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebStorageNamespaceImpl.h" - -#if ENABLE(DOM_STORAGE) - -#include "SecurityOrigin.h" - -#include "WebStorageAreaImpl.h" -#include "WebString.h" - -namespace WebKit { - -WebStorageNamespace* WebStorageNamespace::createLocalStorageNamespace(const WebString& path, unsigned quota) -{ - return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::localStorageNamespace(path, quota)); -} - -WebStorageNamespace* WebStorageNamespace::createSessionStorageNamespace(unsigned quota) -{ - return new WebStorageNamespaceImpl(WebCore::StorageNamespaceImpl::sessionStorageNamespace(quota)); -} - -WebStorageNamespaceImpl::WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace) - : m_storageNamespace(storageNamespace) -{ -} - -WebStorageNamespaceImpl::~WebStorageNamespaceImpl() -{ -} - -WebStorageArea* WebStorageNamespaceImpl::createStorageArea(const WebString& originString) -{ - WTF::String originWebCoreString = originString; - if (originWebCoreString == "file://") { - // FIXME: We should really be passing around WebSecurityOrigin objects - // to represent security origins instead of strings. One issue - // with using strings is that createFromString(toString) does - // not round-trip for file URLs because file:// looks like a - // directory (which is sandboxed). - // - // For the time being, we work around this issue by using "file:///a", - // which does not look like a directory. We should fix this when - // jorlow gets back from vactation. - originWebCoreString = "file:///a"; - } - RefPtr<WebCore::SecurityOrigin> origin = WebCore::SecurityOrigin::createFromString(originWebCoreString); - return new WebStorageAreaImpl(m_storageNamespace->storageArea(origin.release())); -} - -WebStorageNamespace* WebStorageNamespaceImpl::copy() -{ - return new WebStorageNamespaceImpl(m_storageNamespace->copy()); -} - -void WebStorageNamespaceImpl::close() -{ - m_storageNamespace->close(); -} - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.h b/WebKit/chromium/src/WebStorageNamespaceImpl.h deleted file mode 100644 index 4e82c21..0000000 --- a/WebKit/chromium/src/WebStorageNamespaceImpl.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebStorageNamespaceImpl_h -#define WebStorageNamespaceImpl_h - -#if ENABLE(DOM_STORAGE) - -#include "StorageNamespaceImpl.h" -#include "WebStorageNamespace.h" - -namespace WebKit { - -class WebStorageNamespaceImpl : public WebStorageNamespace { -public: - WebStorageNamespaceImpl(PassRefPtr<WebCore::StorageNamespace> storageNamespace); - virtual ~WebStorageNamespaceImpl(); - virtual WebStorageArea* createStorageArea(const WebString& origin); - virtual WebStorageNamespace* copy(); - virtual void close(); - -private: - RefPtr<WebCore::StorageNamespace> m_storageNamespace; -}; - -} // namespace WebKit - -#endif // ENABLE(DOM_STORAGE) - -#endif // WebStorageNamespaceImpl_h diff --git a/WebKit/chromium/src/WebString.cpp b/WebKit/chromium/src/WebString.cpp deleted file mode 100644 index a091ef4..0000000 --- a/WebKit/chromium/src/WebString.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebString.h" - -#include "PlatformString.h" -#include <wtf/text/CString.h> -#include <wtf/text/AtomicString.h> - -#include "WebCString.h" - -namespace WebKit { - -class WebStringPrivate : public WTF::StringImpl { -}; - -void WebString::reset() -{ - if (m_private) { - m_private->deref(); - m_private = 0; - } -} - -void WebString::assign(const WebString& other) -{ - assign(const_cast<WebStringPrivate*>(other.m_private)); -} - -void WebString::assign(const WebUChar* data, size_t length) -{ - assign(static_cast<WebStringPrivate*>( - WTF::StringImpl::create(data, length).get())); -} - -size_t WebString::length() const -{ - return m_private ? const_cast<WebStringPrivate*>(m_private)->length() : 0; -} - -const WebUChar* WebString::data() const -{ - return m_private ? const_cast<WebStringPrivate*>(m_private)->characters() : 0; -} - -WebCString WebString::utf8() const -{ - return WTF::String(m_private).utf8(); -} - -WebString WebString::fromUTF8(const char* data, size_t length) -{ - return WTF::String::fromUTF8(data, length); -} - -WebString WebString::fromUTF8(const char* data) -{ - return WTF::String::fromUTF8(data); -} - -bool WebString::equals(const WebString& s) const -{ - return equal(m_private, s.m_private); -} - -WebString::WebString(const WTF::String& s) - : m_private(static_cast<WebStringPrivate*>(s.impl())) -{ - if (m_private) - m_private->ref(); -} - -WebString& WebString::operator=(const WTF::String& s) -{ - assign(static_cast<WebStringPrivate*>(s.impl())); - return *this; -} - -WebString::operator WTF::String() const -{ - return m_private; -} - -WebString::WebString(const WTF::AtomicString& s) - : m_private(0) -{ - assign(s.string()); -} - -WebString& WebString::operator=(const WTF::AtomicString& s) -{ - assign(s.string()); - return *this; -} - -WebString::operator WTF::AtomicString() const -{ - return WTF::AtomicString(static_cast<WTF::StringImpl *>(m_private)); -} - -void WebString::assign(WebStringPrivate* p) -{ - // Take care to handle the case where m_private == p - if (p) - p->ref(); - if (m_private) - m_private->deref(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebTextRun.cpp b/WebKit/chromium/src/WebTextRun.cpp deleted file mode 100644 index 58d9fac..0000000 --- a/WebKit/chromium/src/WebTextRun.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebTextRun.h" - -#include "TextRun.h" - -using namespace WebCore; - -namespace WebKit { - -WebTextRun::operator WebCore::TextRun() const -{ - return TextRun(text, false, 0, 0, rtl, directionalOverride); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebThreadSafeData.cpp b/WebKit/chromium/src/WebThreadSafeData.cpp deleted file mode 100755 index facaba3..0000000 --- a/WebKit/chromium/src/WebThreadSafeData.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebThreadSafeData.h" - -#include "BlobData.h" - -using namespace WebCore; - -namespace WebKit { - -void WebThreadSafeData::reset() -{ - m_private.reset(); -} - -void WebThreadSafeData::assign(const WebThreadSafeData& other) -{ - m_private = other.m_private; -} - -size_t WebThreadSafeData::size() const -{ - if (m_private.isNull()) - return 0; - return m_private->length(); -} - -const char* WebThreadSafeData::data() const -{ - if (m_private.isNull()) - return 0; - return m_private->data(); -} - -WebThreadSafeData::WebThreadSafeData(const PassRefPtr<RawData>& data) - : m_private(data.releaseRef()) -{ -} - -WebThreadSafeData& WebThreadSafeData::operator=(const PassRefPtr<RawData>& data) -{ - m_private = data; - return *this; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURL.cpp b/WebKit/chromium/src/WebURL.cpp deleted file mode 100644 index feb92c1..0000000 --- a/WebKit/chromium/src/WebURL.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebURL.h" - -#include "KURL.h" - -namespace WebKit { - -WebURL::WebURL(const WebCore::KURL& url) - : m_spec(url.utf8String()) - , m_parsed(url.parsed()) - , m_isValid(url.isValid()) -{ -} - -WebURL& WebURL::operator=(const WebCore::KURL& url) -{ - m_spec = url.utf8String(); - m_parsed = url.parsed(); - m_isValid = url.isValid(); - return *this; -} - -WebURL::operator WebCore::KURL() const -{ - return WebCore::KURL(m_spec, m_parsed, m_isValid); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLError.cpp b/WebKit/chromium/src/WebURLError.cpp deleted file mode 100644 index ef32b5c..0000000 --- a/WebKit/chromium/src/WebURLError.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebURLError.h" - -#include "KURL.h" -#include "ResourceError.h" -#include <wtf/text/CString.h> - -using namespace WebCore; - -namespace WebKit { - -WebURLError::WebURLError(const ResourceError& error) -{ - *this = error; -} - -WebURLError& WebURLError::operator=(const ResourceError& error) -{ - if (error.isNull()) - *this = WebURLError(); - else { - domain = error.domain(); - reason = error.errorCode(); - unreachableURL = KURL(ParsedURLString, error.failingURL()); - } - return *this; -} - -WebURLError::operator ResourceError() const -{ - if (!reason) - return ResourceError(); - CString spec = unreachableURL.spec(); - return ResourceError(domain, reason, - String::fromUTF8(spec.data(), spec.length()), - String()); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLLoadTiming.cpp b/WebKit/chromium/src/WebURLLoadTiming.cpp deleted file mode 100644 index 27ed362..0000000 --- a/WebKit/chromium/src/WebURLLoadTiming.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebURLLoadTiming.h" - -#include "ResourceLoadTiming.h" -#include "WebString.h" - -using namespace WebCore; - -namespace WebKit { - -void WebURLLoadTiming::initialize() -{ - m_private = ResourceLoadTiming::create(); -} - -void WebURLLoadTiming::reset() -{ - m_private.reset(); -} - -void WebURLLoadTiming::assign(const WebURLLoadTiming& other) -{ - m_private = other.m_private; -} - -double WebURLLoadTiming::requestTime() const -{ - return m_private->requestTime; -} - -void WebURLLoadTiming::setRequestTime(double time) -{ - m_private->requestTime = time; -} - -int WebURLLoadTiming::proxyStart() const -{ - return m_private->proxyStart; -} - -void WebURLLoadTiming::setProxyStart(int start) -{ - m_private->proxyStart = start; -} - -int WebURLLoadTiming::proxyEnd() const -{ - return m_private->proxyEnd; -} - -void WebURLLoadTiming::setProxyEnd(int end) -{ - m_private->proxyEnd = end; -} - -int WebURLLoadTiming::dnsStart() const -{ - return m_private->dnsStart; -} - -void WebURLLoadTiming::setDNSStart(int start) -{ - m_private->dnsStart = start; -} - -int WebURLLoadTiming::dnsEnd() const -{ - return m_private->dnsEnd; -} - -void WebURLLoadTiming::setDNSEnd(int end) -{ - m_private->dnsEnd = end; -} - -int WebURLLoadTiming::connectStart() const -{ - return m_private->connectStart; -} - -void WebURLLoadTiming::setConnectStart(int start) -{ - m_private->connectStart = start; -} - -int WebURLLoadTiming::connectEnd() const -{ - return m_private->connectEnd; -} - -void WebURLLoadTiming::setConnectEnd(int end) -{ - m_private->connectEnd = end; -} - -int WebURLLoadTiming::sendStart() const -{ - return m_private->sendStart; -} - -void WebURLLoadTiming::setSendStart(int start) -{ - m_private->sendStart = start; -} - -int WebURLLoadTiming::sendEnd() const -{ - return m_private->sendEnd; -} - -void WebURLLoadTiming::setSendEnd(int end) -{ - m_private->sendEnd = end; -} - -int WebURLLoadTiming::receiveHeadersEnd() const -{ - return m_private->receiveHeadersEnd; -} - -void WebURLLoadTiming::setReceiveHeadersEnd(int end) -{ - m_private->receiveHeadersEnd = end; -} - -int WebURLLoadTiming::sslStart() const -{ - return m_private->sslStart; -} - -void WebURLLoadTiming::setSSLStart(int start) -{ - m_private->sslStart = start; -} - -int WebURLLoadTiming::sslEnd() const -{ - return m_private->sslEnd; -} - -void WebURLLoadTiming::setSSLEnd(int end) -{ - m_private->sslEnd = end; -} - -WebURLLoadTiming::WebURLLoadTiming(const PassRefPtr<ResourceLoadTiming>& value) - : m_private(value) -{ -} - -WebURLLoadTiming& WebURLLoadTiming::operator=(const PassRefPtr<ResourceLoadTiming>& value) -{ - m_private = value; - return *this; -} - -WebURLLoadTiming::operator PassRefPtr<ResourceLoadTiming>() const -{ - return m_private.get(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLRequest.cpp b/WebKit/chromium/src/WebURLRequest.cpp deleted file mode 100644 index 7a77ca3..0000000 --- a/WebKit/chromium/src/WebURLRequest.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebURLRequest.h" - -#include "ResourceRequest.h" - -#include "WebHTTPBody.h" -#include "WebHTTPHeaderVisitor.h" -#include "WebURL.h" -#include "WebURLRequestPrivate.h" - -using namespace WebCore; - -namespace WebKit { - -// The standard implementation of WebURLRequestPrivate, which maintains -// ownership of a ResourceRequest instance. -class WebURLRequestPrivateImpl : public WebURLRequestPrivate { -public: - WebURLRequestPrivateImpl() - { - m_resourceRequest = &m_resourceRequestAllocation; - } - - WebURLRequestPrivateImpl(const WebURLRequestPrivate* p) - : m_resourceRequestAllocation(*p->m_resourceRequest) - { - m_resourceRequest = &m_resourceRequestAllocation; - m_allowStoredCredentials = p->m_allowStoredCredentials; - m_downloadToFile = p->m_downloadToFile; - } - - virtual void dispose() { delete this; } - - ResourceRequest m_resourceRequestAllocation; -}; - -void WebURLRequest::initialize() -{ - assign(new WebURLRequestPrivateImpl()); -} - -void WebURLRequest::reset() -{ - assign(0); -} - -void WebURLRequest::assign(const WebURLRequest& r) -{ - if (&r != this) - assign(r.m_private ? new WebURLRequestPrivateImpl(r.m_private) : 0); -} - -bool WebURLRequest::isNull() const -{ - return !m_private || m_private->m_resourceRequest->isNull(); -} - -WebURL WebURLRequest::url() const -{ - return m_private->m_resourceRequest->url(); -} - -void WebURLRequest::setURL(const WebURL& url) -{ - m_private->m_resourceRequest->setURL(url); -} - -WebURL WebURLRequest::firstPartyForCookies() const -{ - return m_private->m_resourceRequest->firstPartyForCookies(); -} - -void WebURLRequest::setFirstPartyForCookies(const WebURL& firstPartyForCookies) -{ - m_private->m_resourceRequest->setFirstPartyForCookies(firstPartyForCookies); -} - -bool WebURLRequest::allowCookies() const -{ - return m_private->m_resourceRequest->allowCookies(); -} - -void WebURLRequest::setAllowCookies(bool allowCookies) -{ - m_private->m_resourceRequest->setAllowCookies(allowCookies); -} - -bool WebURLRequest::allowStoredCredentials() const -{ - return m_private->m_allowStoredCredentials; -} - -void WebURLRequest::setAllowStoredCredentials(bool allowStoredCredentials) -{ - m_private->m_allowStoredCredentials = allowStoredCredentials; -} - -WebURLRequest::CachePolicy WebURLRequest::cachePolicy() const -{ - return static_cast<WebURLRequest::CachePolicy>( - m_private->m_resourceRequest->cachePolicy()); -} - -void WebURLRequest::setCachePolicy(CachePolicy cachePolicy) -{ - m_private->m_resourceRequest->setCachePolicy( - static_cast<ResourceRequestCachePolicy>(cachePolicy)); -} - -WebString WebURLRequest::httpMethod() const -{ - return m_private->m_resourceRequest->httpMethod(); -} - -void WebURLRequest::setHTTPMethod(const WebString& httpMethod) -{ - m_private->m_resourceRequest->setHTTPMethod(httpMethod); -} - -WebString WebURLRequest::httpHeaderField(const WebString& name) const -{ - return m_private->m_resourceRequest->httpHeaderField(name); -} - -void WebURLRequest::setHTTPHeaderField(const WebString& name, const WebString& value) -{ - m_private->m_resourceRequest->setHTTPHeaderField(name, value); -} - -void WebURLRequest::addHTTPHeaderField(const WebString& name, const WebString& value) -{ - m_private->m_resourceRequest->addHTTPHeaderField(name, value); -} - -void WebURLRequest::clearHTTPHeaderField(const WebString& name) -{ - // FIXME: Add a clearHTTPHeaderField method to ResourceRequest. - const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields(); - const_cast<HTTPHeaderMap*>(&map)->remove(name); -} - -void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const -{ - const HTTPHeaderMap& map = m_private->m_resourceRequest->httpHeaderFields(); - for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) - visitor->visitHeader(it->first, it->second); -} - -WebHTTPBody WebURLRequest::httpBody() const -{ - return WebHTTPBody(m_private->m_resourceRequest->httpBody()); -} - -void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody) -{ - m_private->m_resourceRequest->setHTTPBody(httpBody); -} - -bool WebURLRequest::reportUploadProgress() const -{ - return m_private->m_resourceRequest->reportUploadProgress(); -} - -void WebURLRequest::setReportUploadProgress(bool reportUploadProgress) -{ - m_private->m_resourceRequest->setReportUploadProgress(reportUploadProgress); -} - -bool WebURLRequest::reportLoadTiming() const -{ - return m_private->m_resourceRequest->reportLoadTiming(); -} - -void WebURLRequest::setReportRawHeaders(bool reportRawHeaders) -{ - m_private->m_resourceRequest->setReportRawHeaders(reportRawHeaders); -} - -bool WebURLRequest::reportRawHeaders() const -{ - return m_private->m_resourceRequest->reportRawHeaders(); -} - -void WebURLRequest::setReportLoadTiming(bool reportLoadTiming) -{ - m_private->m_resourceRequest->setReportLoadTiming(reportLoadTiming); -} - -WebURLRequest::TargetType WebURLRequest::targetType() const -{ - return static_cast<TargetType>(m_private->m_resourceRequest->targetType()); -} - -bool WebURLRequest::hasUserGesture() const -{ - return m_private->m_resourceRequest->hasUserGesture(); -} - -void WebURLRequest::setHasUserGesture(bool hasUserGesture) -{ - m_private->m_resourceRequest->setHasUserGesture(hasUserGesture); -} - -void WebURLRequest::setTargetType(TargetType targetType) -{ - m_private->m_resourceRequest->setTargetType( - static_cast<ResourceRequest::TargetType>(targetType)); -} - -int WebURLRequest::requestorID() const -{ - return m_private->m_resourceRequest->requestorID(); -} - -void WebURLRequest::setRequestorID(int requestorID) -{ - m_private->m_resourceRequest->setRequestorID(requestorID); -} - -int WebURLRequest::requestorProcessID() const -{ - return m_private->m_resourceRequest->requestorProcessID(); -} - -void WebURLRequest::setRequestorProcessID(int requestorProcessID) -{ - m_private->m_resourceRequest->setRequestorProcessID(requestorProcessID); -} - -int WebURLRequest::appCacheHostID() const -{ - return m_private->m_resourceRequest->appCacheHostID(); -} - -void WebURLRequest::setAppCacheHostID(int appCacheHostID) -{ - m_private->m_resourceRequest->setAppCacheHostID(appCacheHostID); -} - -bool WebURLRequest::downloadToFile() const -{ - return m_private->m_downloadToFile; -} - -void WebURLRequest::setDownloadToFile(bool downloadToFile) -{ - m_private->m_downloadToFile = downloadToFile; -} - -ResourceRequest& WebURLRequest::toMutableResourceRequest() -{ - ASSERT(m_private); - ASSERT(m_private->m_resourceRequest); - - return *m_private->m_resourceRequest; -} - -const ResourceRequest& WebURLRequest::toResourceRequest() const -{ - ASSERT(m_private); - ASSERT(m_private->m_resourceRequest); - - return *m_private->m_resourceRequest; -} - -void WebURLRequest::assign(WebURLRequestPrivate* p) -{ - // Subclasses may call this directly so a self-assignment check is needed - // here as well as in the public assign method. - if (m_private == p) - return; - if (m_private) - m_private->dispose(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLRequestPrivate.h b/WebKit/chromium/src/WebURLRequestPrivate.h deleted file mode 100644 index 79f6451..0000000 --- a/WebKit/chromium/src/WebURLRequestPrivate.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLRequestPrivate_h -#define WebURLRequestPrivate_h - -namespace WebCore { class ResourceRequest; } - -namespace WebKit { - -class WebURLRequestPrivate { -public: - WebURLRequestPrivate() - : m_resourceRequest(0) - , m_allowStoredCredentials(true) - , m_downloadToFile(false) { } - - // Called by WebURLRequest when it no longer needs this object. - virtual void dispose() = 0; - - WebCore::ResourceRequest* m_resourceRequest; - bool m_allowStoredCredentials; - - // FIXME: Move this to ResourceRequest once we have an internal consumer. - bool m_downloadToFile; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp deleted file mode 100644 index bf3c521..0000000 --- a/WebKit/chromium/src/WebURLResponse.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebURLResponse.h" - -#include "ResourceResponse.h" -#include "ResourceLoadTiming.h" - -#include "WebHTTPHeaderVisitor.h" -#include "WebHTTPLoadInfo.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebURLLoadTiming.h" -#include "WebURLResponsePrivate.h" - -#include <wtf/RefPtr.h> - -using namespace WebCore; - -namespace WebKit { - -// The standard implementation of WebURLResponsePrivate, which maintains -// ownership of a ResourceResponse instance. -class WebURLResponsePrivateImpl : public WebURLResponsePrivate { -public: - WebURLResponsePrivateImpl() - { - m_resourceResponse = &m_resourceResponseAllocation; - } - - WebURLResponsePrivateImpl(const WebURLResponsePrivate* p) - : m_resourceResponseAllocation(*p->m_resourceResponse) - { - m_resourceResponse = &m_resourceResponseAllocation; - m_downloadFilePath = p->m_downloadFilePath; - } - - virtual void dispose() { delete this; } - - ResourceResponse m_resourceResponseAllocation; -}; - -void WebURLResponse::initialize() -{ - assign(new WebURLResponsePrivateImpl()); -} - -void WebURLResponse::reset() -{ - assign(0); -} - -void WebURLResponse::assign(const WebURLResponse& r) -{ - if (&r != this) - assign(r.m_private ? new WebURLResponsePrivateImpl(r.m_private) : 0); -} - -bool WebURLResponse::isNull() const -{ - return !m_private || m_private->m_resourceResponse->isNull(); -} - -WebURL WebURLResponse::url() const -{ - return m_private->m_resourceResponse->url(); -} - -void WebURLResponse::setURL(const WebURL& url) -{ - m_private->m_resourceResponse->setURL(url); -} - -unsigned WebURLResponse::connectionID() const -{ - return m_private->m_resourceResponse->connectionID(); -} - -void WebURLResponse::setConnectionID(unsigned connectionID) -{ - m_private->m_resourceResponse->setConnectionID(connectionID); -} - -bool WebURLResponse::connectionReused() const -{ - return m_private->m_resourceResponse->connectionReused(); -} - -void WebURLResponse::setConnectionReused(bool connectionReused) -{ - m_private->m_resourceResponse->setConnectionReused(connectionReused); -} - -WebURLLoadTiming WebURLResponse::loadTiming() -{ - return WebURLLoadTiming(m_private->m_resourceResponse->resourceLoadTiming()); -} - -void WebURLResponse::setLoadTiming(const WebURLLoadTiming& timing) -{ - RefPtr<ResourceLoadTiming> loadTiming = PassRefPtr<ResourceLoadTiming>(timing); - m_private->m_resourceResponse->setResourceLoadTiming(loadTiming.release()); -} - -WebHTTPLoadInfo WebURLResponse::httpLoadInfo() -{ - return WebHTTPLoadInfo(m_private->m_resourceResponse->resourceLoadInfo()); -} - -void WebURLResponse::setHTTPLoadInfo(const WebHTTPLoadInfo& value) -{ - m_private->m_resourceResponse->setResourceLoadInfo(value); -} - -double WebURLResponse::responseTime() const -{ - return m_private->m_resourceResponse->responseTime(); -} - -void WebURLResponse::setResponseTime(double responseTime) -{ - m_private->m_resourceResponse->setResponseTime(responseTime); -} - -WebString WebURLResponse::mimeType() const -{ - return m_private->m_resourceResponse->mimeType(); -} - -void WebURLResponse::setMIMEType(const WebString& mimeType) -{ - m_private->m_resourceResponse->setMimeType(mimeType); -} - -long long WebURLResponse::expectedContentLength() const -{ - return m_private->m_resourceResponse->expectedContentLength(); -} - -void WebURLResponse::setExpectedContentLength(long long expectedContentLength) -{ - m_private->m_resourceResponse->setExpectedContentLength(expectedContentLength); -} - -WebString WebURLResponse::textEncodingName() const -{ - return m_private->m_resourceResponse->textEncodingName(); -} - -void WebURLResponse::setTextEncodingName(const WebString& textEncodingName) -{ - m_private->m_resourceResponse->setTextEncodingName(textEncodingName); -} - -WebString WebURLResponse::suggestedFileName() const -{ - return m_private->m_resourceResponse->suggestedFilename(); -} - -void WebURLResponse::setSuggestedFileName(const WebString& suggestedFileName) -{ - m_private->m_resourceResponse->setSuggestedFilename(suggestedFileName); -} - -int WebURLResponse::httpStatusCode() const -{ - return m_private->m_resourceResponse->httpStatusCode(); -} - -void WebURLResponse::setHTTPStatusCode(int httpStatusCode) -{ - m_private->m_resourceResponse->setHTTPStatusCode(httpStatusCode); -} - -WebString WebURLResponse::httpStatusText() const -{ - return m_private->m_resourceResponse->httpStatusText(); -} - -void WebURLResponse::setHTTPStatusText(const WebString& httpStatusText) -{ - m_private->m_resourceResponse->setHTTPStatusText(httpStatusText); -} - -WebString WebURLResponse::httpHeaderField(const WebString& name) const -{ - return m_private->m_resourceResponse->httpHeaderField(name); -} - -void WebURLResponse::setHTTPHeaderField(const WebString& name, const WebString& value) -{ - m_private->m_resourceResponse->setHTTPHeaderField(name, value); -} - -void WebURLResponse::addHTTPHeaderField(const WebString& name, const WebString& value) -{ - if (name.isNull() || value.isNull()) - return; - // FIXME: Add an addHTTPHeaderField method to ResourceResponse. - const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields(); - String valueStr(value); - pair<HTTPHeaderMap::iterator, bool> result = - const_cast<HTTPHeaderMap*>(&map)->add(name, valueStr); - if (!result.second) - result.first->second += ", " + valueStr; -} - -void WebURLResponse::clearHTTPHeaderField(const WebString& name) -{ - // FIXME: Add a clearHTTPHeaderField method to ResourceResponse. - const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields(); - const_cast<HTTPHeaderMap*>(&map)->remove(name); -} - -void WebURLResponse::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const -{ - const HTTPHeaderMap& map = m_private->m_resourceResponse->httpHeaderFields(); - for (HTTPHeaderMap::const_iterator it = map.begin(); it != map.end(); ++it) - visitor->visitHeader(it->first, it->second); -} - -double WebURLResponse::lastModifiedDate() const -{ - return static_cast<double>(m_private->m_resourceResponse->lastModifiedDate()); -} - -void WebURLResponse::setLastModifiedDate(double lastModifiedDate) -{ - m_private->m_resourceResponse->setLastModifiedDate(static_cast<time_t>(lastModifiedDate)); -} - -bool WebURLResponse::isContentFiltered() const -{ - return m_private->m_resourceResponse->isContentFiltered(); -} - -void WebURLResponse::setIsContentFiltered(bool isContentFiltered) -{ - m_private->m_resourceResponse->setIsContentFiltered(isContentFiltered); -} - -long long WebURLResponse::appCacheID() const -{ - return m_private->m_resourceResponse->appCacheID(); -} - -void WebURLResponse::setAppCacheID(long long appCacheID) -{ - m_private->m_resourceResponse->setAppCacheID(appCacheID); -} - -WebURL WebURLResponse::appCacheManifestURL() const -{ - return m_private->m_resourceResponse->appCacheManifestURL(); -} - -void WebURLResponse::setAppCacheManifestURL(const WebURL& url) -{ - m_private->m_resourceResponse->setAppCacheManifestURL(url); -} - -WebCString WebURLResponse::securityInfo() const -{ - // FIXME: getSecurityInfo is misnamed. - return m_private->m_resourceResponse->getSecurityInfo(); -} - -void WebURLResponse::setSecurityInfo(const WebCString& securityInfo) -{ - m_private->m_resourceResponse->setSecurityInfo(securityInfo); -} - -ResourceResponse& WebURLResponse::toMutableResourceResponse() -{ - ASSERT(m_private); - ASSERT(m_private->m_resourceResponse); - - return *m_private->m_resourceResponse; -} - -const ResourceResponse& WebURLResponse::toResourceResponse() const -{ - ASSERT(m_private); - ASSERT(m_private->m_resourceResponse); - - return *m_private->m_resourceResponse; -} - -bool WebURLResponse::wasCached() const -{ - return m_private->m_resourceResponse->wasCached(); -} - -void WebURLResponse::setWasCached(bool value) -{ - m_private->m_resourceResponse->setWasCached(value); -} - -bool WebURLResponse::wasFetchedViaSPDY() const -{ - return m_private->m_resourceResponse->wasFetchedViaSPDY(); -} - -void WebURLResponse::setWasFetchedViaSPDY(bool value) -{ - m_private->m_resourceResponse->setWasFetchedViaSPDY(value); -} - -bool WebURLResponse::wasNpnNegotiated() const -{ - return m_private->m_resourceResponse->wasNpnNegotiated(); -} - -void WebURLResponse::setWasNpnNegotiated(bool value) -{ - m_private->m_resourceResponse->setWasNpnNegotiated(value); -} - -bool WebURLResponse::wasAlternateProtocolAvailable() const -{ - return m_private->m_resourceResponse->wasAlternateProtocolAvailable(); -} - -void WebURLResponse::setWasAlternateProtocolAvailable(bool value) -{ - m_private->m_resourceResponse->setWasAlternateProtocolAvailable(value); -} - -bool WebURLResponse::wasFetchedViaProxy() const -{ - return m_private->m_resourceResponse->wasFetchedViaProxy(); -} - -void WebURLResponse::setWasFetchedViaProxy(bool value) -{ - m_private->m_resourceResponse->setWasFetchedViaProxy(value); -} - -bool WebURLResponse::isMultipartPayload() const -{ - return m_private->m_resourceResponse->isMultipartPayload(); -} - -void WebURLResponse::setIsMultipartPayload(bool value) -{ - m_private->m_resourceResponse->setIsMultipartPayload(value); -} - -WebString WebURLResponse::downloadFilePath() const -{ - return m_private->m_downloadFilePath; -} - -void WebURLResponse::setDownloadFilePath(const WebString& downloadFilePath) -{ - m_private->m_downloadFilePath = downloadFilePath; -} - -void WebURLResponse::assign(WebURLResponsePrivate* p) -{ - // Subclasses may call this directly so a self-assignment check is needed - // here as well as in the public assign method. - if (m_private == p) - return; - if (m_private) - m_private->dispose(); - m_private = p; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebURLResponsePrivate.h b/WebKit/chromium/src/WebURLResponsePrivate.h deleted file mode 100644 index dc5ce22..0000000 --- a/WebKit/chromium/src/WebURLResponsePrivate.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebURLResponsePrivate_h -#define WebURLResponsePrivate_h - -#include "WebString.h" - -namespace WebCore { class ResourceResponse; } - -namespace WebKit { - -class WebURLResponsePrivate { -public: - WebURLResponsePrivate() : m_resourceResponse(0) { } - - // Called by WebURLResponse when it no longer needs this object. - virtual void dispose() = 0; - - WebCore::ResourceResponse* m_resourceResponse; - - // FIXME: Move this to ResourceResponse once we have an internal consumer. - WebString m_downloadFilePath; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp deleted file mode 100644 index e47c89e..0000000 --- a/WebKit/chromium/src/WebViewImpl.cpp +++ /dev/null @@ -1,2444 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebViewImpl.h" - -#include "AutoFillPopupMenuClient.h" -#include "AXObjectCache.h" -#include "BackForwardListImpl.h" -#include "Chrome.h" -#include "ChromiumBridge.h" -#include "ColorSpace.h" -#include "CompositionUnderlineVectorBuilder.h" -#include "ContextMenu.h" -#include "ContextMenuController.h" -#include "ContextMenuItem.h" -#include "CSSStyleSelector.h" -#include "CSSValueKeywords.h" -#include "Cursor.h" -#include "DeviceOrientationClientProxy.h" -#include "Document.h" -#include "DocumentLoader.h" -#include "DOMUtilitiesPrivate.h" -#include "DragController.h" -#include "DragScrollTimer.h" -#include "DragData.h" -#include "Editor.h" -#include "EventHandler.h" -#include "Extensions3D.h" -#include "FocusController.h" -#include "FontDescription.h" -#include "FrameLoader.h" -#include "FrameTree.h" -#include "FrameView.h" -#include "GeolocationClientProxy.h" -#include "GraphicsContext.h" -#include "GraphicsContext3D.h" -#include "GraphicsContext3DInternal.h" -#include "HTMLInputElement.h" -#include "HTMLMediaElement.h" -#include "HitTestResult.h" -#include "HTMLNames.h" -#include "Image.h" -#include "ImageBuffer.h" -#include "InspectorController.h" -#include "KeyboardCodes.h" -#include "KeyboardEvent.h" -#include "MIMETypeRegistry.h" -#include "NodeRenderStyle.h" -#include "Page.h" -#include "PageGroup.h" -#include "PageGroupLoadDeferrer.h" -#include "Pasteboard.h" -#include "PlatformContextSkia.h" -#include "PlatformKeyboardEvent.h" -#include "PlatformMouseEvent.h" -#include "PlatformThemeChromiumGtk.h" -#include "PlatformWheelEvent.h" -#include "PopupMenuChromium.h" -#include "PopupMenuClient.h" -#include "ProgressTracker.h" -#include "RenderView.h" -#include "ResourceHandle.h" -#include "SecurityOrigin.h" -#include "SelectionController.h" -#include "Settings.h" -#include "SpeechInputClientImpl.h" -#include "Timer.h" -#include "TypingCommand.h" -#include "UserGestureIndicator.h" -#include "Vector.h" -#include "WebAccessibilityObject.h" -#include "WebDevToolsAgentPrivate.h" -#include "WebDevToolsAgentImpl.h" -#include "WebDragData.h" -#include "WebFrameImpl.h" -#include "WebImage.h" -#include "WebInputElement.h" -#include "WebInputEvent.h" -#include "WebInputEventConversion.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMediaPlayerAction.h" -#include "WebNode.h" -#include "WebPlugin.h" -#include "WebPluginContainerImpl.h" -#include "WebPoint.h" -#include "WebPopupMenuImpl.h" -#include "WebRect.h" -#include "WebRuntimeFeatures.h" -#include "WebSettingsImpl.h" -#include "WebString.h" -#include "WebVector.h" -#include "WebViewClient.h" -#include <wtf/ByteArray.h> -#include <wtf/RefPtr.h> - -#if PLATFORM(CG) -#include <CoreGraphics/CGContext.h> -#endif - -#if OS(WINDOWS) -#include "RenderThemeChromiumWin.h" -#else -#if OS(LINUX) || OS(FREEBSD) -#include "RenderThemeChromiumLinux.h" -#endif -#include "RenderTheme.h" -#endif - -// Get rid of WTF's pow define so we can use std::pow. -#undef pow -#include <cmath> // for std::pow - -using namespace WebCore; - -namespace { - -GraphicsContext3D::Attributes getCompositorContextAttributes() -{ - // Explicitly disable antialiasing for the compositor. As of the time of - // this writing, the only platform that supported antialiasing for the - // compositor was Mac OS X, because the on-screen OpenGL context creation - // code paths on Windows and Linux didn't yet have multisampling support. - // Mac OS X essentially always behaves as though it's rendering offscreen. - // Multisampling has a heavy cost especially on devices with relatively low - // fill rate like most notebooks, and the Mac implementation would need to - // be optimized to resolve directly into the IOSurface shared between the - // GPU and browser processes. For these reasons and to avoid platform - // disparities we explicitly disable antialiasing. - GraphicsContext3D::Attributes attributes; - attributes.antialias = false; - return attributes; -} - -} // anonymous namespace - -namespace WebKit { - -// Change the text zoom level by kTextSizeMultiplierRatio each time the user -// zooms text in or out (ie., change by 20%). The min and max values limit -// text zoom to half and 3x the original text size. These three values match -// those in Apple's port in WebKit/WebKit/WebView/WebView.mm -const double WebView::textSizeMultiplierRatio = 1.2; -const double WebView::minTextSizeMultiplier = 0.5; -const double WebView::maxTextSizeMultiplier = 3.0; - - -// The group name identifies a namespace of pages. Page group is used on OSX -// for some programs that use HTML views to display things that don't seem like -// web pages to the user (so shouldn't have visited link coloring). We only use -// one page group. -const char* pageGroupName = "default"; - -// Used to defer all page activity in cases where the embedder wishes to run -// a nested event loop. Using a stack enables nesting of message loop invocations. -static Vector<PageGroupLoadDeferrer*> pageGroupLoadDeferrerStack; - -// Ensure that the WebDragOperation enum values stay in sync with the original -// DragOperation constants. -#define COMPILE_ASSERT_MATCHING_ENUM(coreName) \ - COMPILE_ASSERT(int(coreName) == int(Web##coreName), dummy##coreName) -COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationGeneric); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationPrivate); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationMove); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationDelete); -COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery); - -static const PopupContainerSettings autoFillPopupSettings = { - false, // setTextOnIndexChange - false, // acceptOnAbandon - true, // loopSelectionNavigation - false, // restrictWidthOfListBox (For security reasons show the entire entry - // so the user doesn't enter information he did not intend to.) - // For suggestions, we use the direction of the input field as the direction - // of the popup items. The main reason is to keep the display of items in - // drop-down the same as the items in the input field. - PopupContainerSettings::DOMElementDirection, -}; - -static bool shouldUseExternalPopupMenus = false; - -// WebView ---------------------------------------------------------------- - -WebView* WebView::create(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) -{ - // Keep runtime flag for device motion turned off until it's implemented. - WebRuntimeFeatures::enableDeviceMotion(false); - - // Pass the WebViewImpl's self-reference to the caller. - return adoptRef(new WebViewImpl(client, devToolsClient)).leakRef(); -} - -void WebView::setUseExternalPopupMenus(bool useExternalPopupMenus) -{ - shouldUseExternalPopupMenus = useExternalPopupMenus; -} - -void WebView::updateVisitedLinkState(unsigned long long linkHash) -{ - Page::visitedStateChanged(PageGroup::pageGroup(pageGroupName), linkHash); -} - -void WebView::resetVisitedLinkState() -{ - Page::allVisitedStateChanged(PageGroup::pageGroup(pageGroupName)); -} - -void WebView::willEnterModalLoop() -{ - PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); - ASSERT(pageGroup); - - if (pageGroup->pages().isEmpty()) - pageGroupLoadDeferrerStack.append(static_cast<PageGroupLoadDeferrer*>(0)); - else { - // Pick any page in the page group since we are deferring all pages. - pageGroupLoadDeferrerStack.append(new PageGroupLoadDeferrer(*pageGroup->pages().begin(), true)); - } -} - -void WebView::didExitModalLoop() -{ - ASSERT(pageGroupLoadDeferrerStack.size()); - - delete pageGroupLoadDeferrerStack.last(); - pageGroupLoadDeferrerStack.removeLast(); -} - -void WebViewImpl::initializeMainFrame(WebFrameClient* frameClient) -{ - // NOTE: The WebFrameImpl takes a reference to itself within InitMainFrame - // and releases that reference once the corresponding Frame is destroyed. - RefPtr<WebFrameImpl> frame = WebFrameImpl::create(frameClient); - - frame->initializeAsMainFrame(this); - - // Restrict the access to the local file system - // (see WebView.mm WebView::_commonInitializationWithFrameName). - SecurityOrigin::setLocalLoadPolicy(SecurityOrigin::AllowLocalLoadsForLocalOnly); -} - -WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devToolsClient) - : m_client(client) - , m_backForwardListClientImpl(this) - , m_chromeClientImpl(this) - , m_contextMenuClientImpl(this) - , m_dragClientImpl(this) - , m_editorClientImpl(this) - , m_inspectorClientImpl(this) - , m_observedNewNavigation(false) -#ifndef NDEBUG - , m_newNavigationLoader(0) -#endif - , m_zoomLevel(0) - , m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier)) - , m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier)) - , m_contextMenuAllowed(false) - , m_doingDragAndDrop(false) - , m_ignoreInputEvents(false) - , m_suppressNextKeypressEvent(false) - , m_initialNavigationPolicy(WebNavigationPolicyIgnore) - , m_imeAcceptEvents(true) - , m_dragTargetDispatch(false) - , m_dragIdentity(0) - , m_dropEffect(DropEffectDefault) - , m_operationsAllowed(WebDragOperationNone) - , m_dragOperation(WebDragOperationNone) - , m_autoFillPopupShowing(false) - , m_autoFillPopupClient(0) - , m_autoFillPopup(0) - , m_isTransparent(false) - , m_tabsToLinks(false) - , m_dragScrollTimer(new DragScrollTimer()) -#if USE(ACCELERATED_COMPOSITING) - , m_layerRenderer(0) - , m_isAcceleratedCompositingActive(false) - , m_compositorCreationFailed(false) -#endif -#if ENABLE(INPUT_SPEECH) - , m_speechInputClient(SpeechInputClientImpl::create(client)) -#endif - , m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0)) -#if ENABLE(CLIENT_BASED_GEOLOCATION) - , m_geolocationClientProxy(new GeolocationClientProxy(client ? client->geolocationClient() : 0)) -#endif -{ - // WebKit/win/WebView.cpp does the same thing, except they call the - // KJS specific wrapper around this method. We need to have threading - // initialized because CollatorICU requires it. - WTF::initializeThreading(); - WTF::initializeMainThread(); - - // set to impossible point so we always get the first mouse pos - m_lastMousePosition = WebPoint(-1, -1); - - if (devToolsClient) - m_devToolsAgent = new WebDevToolsAgentImpl(this, devToolsClient); - - Page::PageClients pageClients; - pageClients.chromeClient = &m_chromeClientImpl; - pageClients.contextMenuClient = &m_contextMenuClientImpl; - pageClients.editorClient = &m_editorClientImpl; - pageClients.dragClient = &m_dragClientImpl; - pageClients.inspectorClient = &m_inspectorClientImpl; -#if ENABLE(INPUT_SPEECH) - pageClients.speechInputClient = m_speechInputClient.get(); -#endif - pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get(); -#if ENABLE(CLIENT_BASED_GEOLOCATION) - pageClients.geolocationClient = m_geolocationClientProxy.get(); -#endif - - m_page.set(new Page(pageClients)); - -#if ENABLE(CLIENT_BASED_GEOLOCATION) - m_geolocationClientProxy->setController(m_page->geolocationController()); -#endif - - static_cast<BackForwardListImpl*>(m_page->backForwardList())->setClient(&m_backForwardListClientImpl); - m_page->setGroupName(pageGroupName); - - m_inspectorSettingsMap.set(new SettingsMap); -} - -WebViewImpl::~WebViewImpl() -{ - ASSERT(!m_page); -} - -RenderTheme* WebViewImpl::theme() const -{ - return m_page.get() ? m_page->theme() : RenderTheme::defaultTheme().get(); -} - -WebFrameImpl* WebViewImpl::mainFrameImpl() -{ - return m_page.get() ? WebFrameImpl::fromFrame(m_page->mainFrame()) : 0; -} - -bool WebViewImpl::tabKeyCyclesThroughElements() const -{ - ASSERT(m_page.get()); - return m_page->tabKeyCyclesThroughElements(); -} - -void WebViewImpl::setTabKeyCyclesThroughElements(bool value) -{ - if (m_page) - m_page->setTabKeyCyclesThroughElements(value); -} - -void WebViewImpl::mouseMove(const WebMouseEvent& event) -{ - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return; - - m_lastMousePosition = WebPoint(event.x, event.y); - - // We call mouseMoved here instead of handleMouseMovedEvent because we need - // our ChromeClientImpl to receive changes to the mouse position and - // tooltip text, and mouseMoved handles all of that. - mainFrameImpl()->frame()->eventHandler()->mouseMoved( - PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); -} - -void WebViewImpl::mouseLeave(const WebMouseEvent& event) -{ - // This event gets sent as the main frame is closing. In that case, just - // ignore it. - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return; - - m_client->setMouseOverURL(WebURL()); - - mainFrameImpl()->frame()->eventHandler()->handleMouseMoveEvent( - PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); -} - -void WebViewImpl::mouseDown(const WebMouseEvent& event) -{ - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return; - - // If there is a select popup open, close it as the user is clicking on - // the page (outside of the popup). We also save it so we can prevent a - // click on the select element from immediately reopening the popup. - RefPtr<WebCore::PopupContainer> selectPopup; - if (event.button == WebMouseEvent::ButtonLeft) { - selectPopup = m_selectPopup; - hideSelectPopup(); - ASSERT(!m_selectPopup); - } - - m_lastMouseDownPoint = WebPoint(event.x, event.y); - - RefPtr<Node> clickedNode; - if (event.button == WebMouseEvent::ButtonLeft) { - IntPoint point(event.x, event.y); - point = m_page->mainFrame()->view()->windowToContents(point); - HitTestResult result(m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false)); - Node* hitNode = result.innerNonSharedNode(); - - // Take capture on a mouse down on a plugin so we can send it mouse events. - if (hitNode && hitNode->renderer() && hitNode->renderer()->isEmbeddedObject()) - m_mouseCaptureNode = hitNode; - - // If a text field that has focus is clicked again, we should display the - // AutoFill popup. - RefPtr<Node> focusedNode = focusedWebCoreNode(); - if (focusedNode.get() && toHTMLInputElement(focusedNode.get())) { - if (hitNode == focusedNode) { - // Already focused text field was clicked, let's remember this. If - // focus has not changed after the mouse event is processed, we'll - // trigger the autocomplete. - clickedNode = focusedNode; - } - } - } - - mainFrameImpl()->frame()->loader()->resetMultipleFormSubmissionProtection(); - - mainFrameImpl()->frame()->eventHandler()->handleMousePressEvent( - PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); - - if (clickedNode.get() && clickedNode == focusedWebCoreNode()) { - // Focus has not changed, show the AutoFill popup. - static_cast<EditorClientImpl*>(m_page->editorClient())-> - showFormAutofillForNode(clickedNode.get()); - } - if (m_selectPopup && m_selectPopup == selectPopup) { - // That click triggered a select popup which is the same as the one that - // was showing before the click. It means the user clicked the select - // while the popup was showing, and as a result we first closed then - // immediately reopened the select popup. It needs to be closed. - hideSelectPopup(); - } - - // Dispatch the contextmenu event regardless of if the click was swallowed. - // On Windows, we handle it on mouse up, not down. -#if OS(DARWIN) - if (event.button == WebMouseEvent::ButtonRight - || (event.button == WebMouseEvent::ButtonLeft - && event.modifiers & WebMouseEvent::ControlKey)) - mouseContextMenu(event); -#elif OS(LINUX) || OS(FREEBSD) - if (event.button == WebMouseEvent::ButtonRight) - mouseContextMenu(event); -#endif -} - -void WebViewImpl::mouseContextMenu(const WebMouseEvent& event) -{ - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return; - - m_page->contextMenuController()->clearContextMenu(); - - PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), event); - - // Find the right target frame. See issue 1186900. - HitTestResult result = hitTestResultForWindowPos(pme.pos()); - Frame* targetFrame; - if (result.innerNonSharedNode()) - targetFrame = result.innerNonSharedNode()->document()->frame(); - else - targetFrame = m_page->focusController()->focusedOrMainFrame(); - -#if OS(WINDOWS) - targetFrame->view()->setCursor(pointerCursor()); -#endif - - m_contextMenuAllowed = true; - targetFrame->eventHandler()->sendContextMenuEvent(pme); - m_contextMenuAllowed = false; - // Actually showing the context menu is handled by the ContextMenuClient - // implementation... -} - -void WebViewImpl::mouseUp(const WebMouseEvent& event) -{ - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return; - -#if OS(LINUX) || OS(FREEBSD) - // If the event was a middle click, attempt to copy text into the focused - // frame. We execute this before we let the page have a go at the event - // because the page may change what is focused during in its event handler. - // - // This code is in the mouse up handler. There is some debate about putting - // this here, as opposed to the mouse down handler. - // xterm: pastes on up. - // GTK: pastes on down. - // Firefox: pastes on up. - // Midori: couldn't paste at all with 0.1.2 - // - // There is something of a webcompat angle to this well, as highlighted by - // crbug.com/14608. Pages can clear text boxes 'onclick' and, if we paste on - // down then the text is pasted just before the onclick handler runs and - // clears the text box. So it's important this happens after the - // handleMouseReleaseEvent() earlier in this function - if (event.button == WebMouseEvent::ButtonMiddle) { - Frame* focused = focusedWebCoreFrame(); - FrameView* view = m_page->mainFrame()->view(); - IntPoint clickPoint(m_lastMouseDownPoint.x, m_lastMouseDownPoint.y); - IntPoint contentPoint = view->windowToContents(clickPoint); - HitTestResult hitTestResult = focused->eventHandler()->hitTestResultAtPoint(contentPoint, false, false, ShouldHitTestScrollbars); - // We don't want to send a paste when middle clicking a scroll bar or a - // link (which will navigate later in the code). The main scrollbars - // have to be handled separately. - if (!hitTestResult.scrollbar() && !hitTestResult.isLiveLink() && focused && !view->scrollbarAtPoint(clickPoint)) { - Editor* editor = focused->editor(); - Pasteboard* pasteboard = Pasteboard::generalPasteboard(); - bool oldSelectionMode = pasteboard->isSelectionMode(); - pasteboard->setSelectionMode(true); - editor->command(AtomicString("Paste")).execute(); - pasteboard->setSelectionMode(oldSelectionMode); - } - } -#endif - - mainFrameImpl()->frame()->eventHandler()->handleMouseReleaseEvent( - PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event)); - -#if OS(WINDOWS) - // Dispatch the contextmenu event regardless of if the click was swallowed. - // On Mac/Linux, we handle it on mouse down, not up. - if (event.button == WebMouseEvent::ButtonRight) - mouseContextMenu(event); -#endif -} - -bool WebViewImpl::mouseWheel(const WebMouseWheelEvent& event) -{ - PlatformWheelEventBuilder platformEvent(mainFrameImpl()->frameView(), event); - return mainFrameImpl()->frame()->eventHandler()->handleWheelEvent(platformEvent); -} - -bool WebViewImpl::keyEvent(const WebKeyboardEvent& event) -{ - ASSERT((event.type == WebInputEvent::RawKeyDown) - || (event.type == WebInputEvent::KeyDown) - || (event.type == WebInputEvent::KeyUp)); - - // Please refer to the comments explaining the m_suppressNextKeypressEvent - // member. - // The m_suppressNextKeypressEvent is set if the KeyDown is handled by - // Webkit. A keyDown event is typically associated with a keyPress(char) - // event and a keyUp event. We reset this flag here as this is a new keyDown - // event. - m_suppressNextKeypressEvent = false; - - // Give any select popup a chance at consuming the key event. - if (selectPopupHandleKeyEvent(event)) - return true; - - // Give Autocomplete a chance to consume the key events it is interested in. - if (autocompleteHandleKeyEvent(event)) - return true; - - Frame* frame = focusedWebCoreFrame(); - if (!frame) - return false; - - EventHandler* handler = frame->eventHandler(); - if (!handler) - return keyEventDefault(event); - -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) - const WebInputEvent::Type contextMenuTriggeringEventType = -#if OS(WINDOWS) - WebInputEvent::KeyUp; -#elif OS(LINUX) || OS(FREEBSD) - WebInputEvent::RawKeyDown; -#endif - - bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers) && event.windowsKeyCode == VKEY_APPS; - bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.windowsKeyCode == VKEY_F10; - if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeringEventType) { - sendContextMenuEvent(event); - return true; - } -#endif // OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) - - // It's not clear if we should continue after detecting a capslock keypress. - // I'll err on the side of continuing, which is the pre-existing behaviour. - if (event.windowsKeyCode == VKEY_CAPITAL) - handler->capsLockStateMayHaveChanged(); - - PlatformKeyboardEventBuilder evt(event); - - if (handler->keyEvent(evt)) { - if (WebInputEvent::RawKeyDown == event.type) { - // Suppress the next keypress event unless the focused node is a plug-in node. - // (Flash needs these keypress events to handle non-US keyboards.) - Node* node = frame->document()->focusedNode(); - if (!node || !node->renderer() || !node->renderer()->isEmbeddedObject()) - m_suppressNextKeypressEvent = true; - } - return true; - } - - return keyEventDefault(event); -} - -bool WebViewImpl::selectPopupHandleKeyEvent(const WebKeyboardEvent& event) -{ - if (!m_selectPopup) - return false; - - return m_selectPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event)); -} - -bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event) -{ - if (!m_autoFillPopupShowing - // Home and End should be left to the text field to process. - || event.windowsKeyCode == VKEY_HOME - || event.windowsKeyCode == VKEY_END) - return false; - - // Pressing delete triggers the removal of the selected suggestion from the DB. - if (event.windowsKeyCode == VKEY_DELETE - && m_autoFillPopup->selectedIndex() != -1) { - Node* node = focusedWebCoreNode(); - if (!node || (node->nodeType() != Node::ELEMENT_NODE)) { - ASSERT_NOT_REACHED(); - return false; - } - Element* element = static_cast<Element*>(node); - if (!element->hasLocalName(HTMLNames::inputTag)) { - ASSERT_NOT_REACHED(); - return false; - } - - int selectedIndex = m_autoFillPopup->selectedIndex(); - - if (!m_autoFillPopupClient->canRemoveSuggestionAtIndex(selectedIndex)) - return false; - - WebString name = WebInputElement(static_cast<HTMLInputElement*>(element)).nameForAutofill(); - WebString value = m_autoFillPopupClient->itemText(selectedIndex); - m_client->removeAutofillSuggestions(name, value); - // Update the entries in the currently showing popup to reflect the - // deletion. - m_autoFillPopupClient->removeSuggestionAtIndex(selectedIndex); - refreshAutoFillPopup(); - return false; - } - - if (!m_autoFillPopup->isInterestedInEventForKey(event.windowsKeyCode)) - return false; - - if (m_autoFillPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event))) { - // We need to ignore the next Char event after this otherwise pressing - // enter when selecting an item in the menu will go to the page. - if (WebInputEvent::RawKeyDown == event.type) - m_suppressNextKeypressEvent = true; - return true; - } - - return false; -} - -bool WebViewImpl::charEvent(const WebKeyboardEvent& event) -{ - ASSERT(event.type == WebInputEvent::Char); - - // Please refer to the comments explaining the m_suppressNextKeypressEvent - // member. The m_suppressNextKeypressEvent is set if the KeyDown is - // handled by Webkit. A keyDown event is typically associated with a - // keyPress(char) event and a keyUp event. We reset this flag here as it - // only applies to the current keyPress event. - bool suppress = m_suppressNextKeypressEvent; - m_suppressNextKeypressEvent = false; - - Frame* frame = focusedWebCoreFrame(); - if (!frame) - return suppress; - - EventHandler* handler = frame->eventHandler(); - if (!handler) - return suppress || keyEventDefault(event); - - PlatformKeyboardEventBuilder evt(event); - if (!evt.isCharacterKey()) - return true; - - // Accesskeys are triggered by char events and can't be suppressed. - if (handler->handleAccessKey(evt)) - return true; - - // Safari 3.1 does not pass off windows system key messages (WM_SYSCHAR) to - // the eventHandler::keyEvent. We mimic this behavior on all platforms since - // for now we are converting other platform's key events to windows key - // events. - if (evt.isSystemKey()) - return false; - - if (!suppress && !handler->keyEvent(evt)) - return keyEventDefault(event); - - return true; -} - -#if ENABLE(TOUCH_EVENTS) -bool WebViewImpl::touchEvent(const WebTouchEvent& event) -{ - if (!mainFrameImpl() || !mainFrameImpl()->frameView()) - return false; - - PlatformTouchEventBuilder touchEventBuilder(mainFrameImpl()->frameView(), event); - return mainFrameImpl()->frame()->eventHandler()->handleTouchEvent(touchEventBuilder); -} -#endif - -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) -// Mac has no way to open a context menu based on a keyboard event. -bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event) -{ - // The contextMenuController() holds onto the last context menu that was - // popped up on the page until a new one is created. We need to clear - // this menu before propagating the event through the DOM so that we can - // detect if we create a new menu for this event, since we won't create - // a new menu if the DOM swallows the event and the defaultEventHandler does - // not run. - page()->contextMenuController()->clearContextMenu(); - - m_contextMenuAllowed = true; - Frame* focusedFrame = page()->focusController()->focusedOrMainFrame(); - bool handled = focusedFrame->eventHandler()->sendContextMenuEventForKey(); - m_contextMenuAllowed = false; - return handled; -} -#endif - -bool WebViewImpl::keyEventDefault(const WebKeyboardEvent& event) -{ - Frame* frame = focusedWebCoreFrame(); - if (!frame) - return false; - - switch (event.type) { - case WebInputEvent::Char: - if (event.windowsKeyCode == VKEY_SPACE) { - int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PRIOR : VKEY_NEXT); - return scrollViewWithKeyboard(keyCode, event.modifiers); - } - break; - case WebInputEvent::RawKeyDown: - if (event.modifiers == WebInputEvent::ControlKey) { - switch (event.windowsKeyCode) { -#if !OS(DARWIN) - case 'A': - focusedFrame()->executeCommand(WebString::fromUTF8("SelectAll")); - return true; - case VKEY_INSERT: - case 'C': - focusedFrame()->executeCommand(WebString::fromUTF8("Copy")); - return true; -#endif - // Match FF behavior in the sense that Ctrl+home/end are the only Ctrl - // key combinations which affect scrolling. Safari is buggy in the - // sense that it scrolls the page for all Ctrl+scrolling key - // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc. - case VKEY_HOME: - case VKEY_END: - break; - default: - return false; - } - } - if (!event.isSystemKey && !(event.modifiers & WebInputEvent::ShiftKey)) - return scrollViewWithKeyboard(event.windowsKeyCode, event.modifiers); - break; - default: - break; - } - return false; -} - -bool WebViewImpl::scrollViewWithKeyboard(int keyCode, int modifiers) -{ - ScrollDirection scrollDirection; - ScrollGranularity scrollGranularity; - if (!mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity)) - return false; - return propagateScroll(scrollDirection, scrollGranularity); -} - -bool WebViewImpl::mapKeyCodeForScroll(int keyCode, - WebCore::ScrollDirection* scrollDirection, - WebCore::ScrollGranularity* scrollGranularity) -{ - switch (keyCode) { - case VKEY_LEFT: - *scrollDirection = ScrollLeft; - *scrollGranularity = ScrollByLine; - break; - case VKEY_RIGHT: - *scrollDirection = ScrollRight; - *scrollGranularity = ScrollByLine; - break; - case VKEY_UP: - *scrollDirection = ScrollUp; - *scrollGranularity = ScrollByLine; - break; - case VKEY_DOWN: - *scrollDirection = ScrollDown; - *scrollGranularity = ScrollByLine; - break; - case VKEY_HOME: - *scrollDirection = ScrollUp; - *scrollGranularity = ScrollByDocument; - break; - case VKEY_END: - *scrollDirection = ScrollDown; - *scrollGranularity = ScrollByDocument; - break; - case VKEY_PRIOR: // page up - *scrollDirection = ScrollUp; - *scrollGranularity = ScrollByPage; - break; - case VKEY_NEXT: // page down - *scrollDirection = ScrollDown; - *scrollGranularity = ScrollByPage; - break; - default: - return false; - } - - return true; -} - -void WebViewImpl::hideSelectPopup() -{ - if (m_selectPopup.get()) - m_selectPopup->hidePopup(); -} - -bool WebViewImpl::propagateScroll(ScrollDirection scrollDirection, - ScrollGranularity scrollGranularity) -{ - Frame* frame = focusedWebCoreFrame(); - if (!frame) - return false; - - bool scrollHandled = frame->eventHandler()->scrollOverflow(scrollDirection, scrollGranularity); - Frame* currentFrame = frame; - while (!scrollHandled && currentFrame) { - scrollHandled = currentFrame->view()->scroll(scrollDirection, scrollGranularity); - currentFrame = currentFrame->tree()->parent(); - } - return scrollHandled; -} - -void WebViewImpl::popupOpened(WebCore::PopupContainer* popupContainer) -{ - if (popupContainer->popupType() == WebCore::PopupContainer::Select) { - ASSERT(!m_selectPopup); - m_selectPopup = popupContainer; - } -} - -void WebViewImpl::popupClosed(WebCore::PopupContainer* popupContainer) -{ - if (popupContainer->popupType() == WebCore::PopupContainer::Select) { - ASSERT(m_selectPopup.get()); - m_selectPopup = 0; - } -} - -void WebViewImpl::hideAutoFillPopup() -{ - if (m_autoFillPopupShowing) { - m_autoFillPopup->hidePopup(); - m_autoFillPopupShowing = false; - } -} - -Frame* WebViewImpl::focusedWebCoreFrame() -{ - return m_page.get() ? m_page->focusController()->focusedOrMainFrame() : 0; -} - -WebViewImpl* WebViewImpl::fromPage(Page* page) -{ - if (!page) - return 0; - - return static_cast<ChromeClientImpl*>(page->chrome()->client())->webView(); -} - -// WebWidget ------------------------------------------------------------------ - -void WebViewImpl::close() -{ - RefPtr<WebFrameImpl> mainFrameImpl; - - if (m_page.get()) { - // Initiate shutdown for the entire frameset. This will cause a lot of - // notifications to be sent. - if (m_page->mainFrame()) { - mainFrameImpl = WebFrameImpl::fromFrame(m_page->mainFrame()); - m_page->mainFrame()->loader()->frameDetached(); - } - m_page.clear(); - } - - // Should happen after m_page.clear(). - if (m_devToolsAgent.get()) - m_devToolsAgent.clear(); - - // Reset the delegate to prevent notifications being sent as we're being - // deleted. - m_client = 0; - - deref(); // Balances ref() acquired in WebView::create -} - -void WebViewImpl::resize(const WebSize& newSize) -{ - if (m_size == newSize) - return; - m_size = newSize; - - if (mainFrameImpl()->frameView()) { - mainFrameImpl()->frameView()->resize(m_size.width, m_size.height); - mainFrameImpl()->frame()->eventHandler()->sendResizeEvent(); - } - - if (m_client) { - WebRect damagedRect(0, 0, m_size.width, m_size.height); - if (isAcceleratedCompositingActive()) { -#if USE(ACCELERATED_COMPOSITING) - invalidateRootLayerRect(damagedRect); -#endif - } else - m_client->didInvalidateRect(damagedRect); - } - -#if USE(ACCELERATED_COMPOSITING) - if (m_layerRenderer && isAcceleratedCompositingActive()) { - m_layerRenderer->resizeOnscreenContent(IntSize(std::max(1, m_size.width), - std::max(1, m_size.height))); - } -#endif -} - -void WebViewImpl::layout() -{ - WebFrameImpl* webframe = mainFrameImpl(); - if (webframe) { - // In order for our child HWNDs (NativeWindowWidgets) to update properly, - // they need to be told that we are updating the screen. The problem is - // that the native widgets need to recalculate their clip region and not - // overlap any of our non-native widgets. To force the resizing, call - // setFrameRect(). This will be a quick operation for most frames, but - // the NativeWindowWidgets will update a proper clipping region. - FrameView* view = webframe->frameView(); - if (view) - view->setFrameRect(view->frameRect()); - - // setFrameRect may have the side-effect of causing existing page - // layout to be invalidated, so layout needs to be called last. - - webframe->layout(); - } -} - -#if USE(ACCELERATED_COMPOSITING) -void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect) -{ - ASSERT(rect.right() <= m_layerRenderer->rootLayerTextureSize().width() - && rect.bottom() <= m_layerRenderer->rootLayerTextureSize().height()); - -#if PLATFORM(SKIA) - PlatformContextSkia context(canvas); - - // PlatformGraphicsContext is actually a pointer to PlatformContextSkia - GraphicsContext gc(reinterpret_cast<PlatformGraphicsContext*>(&context)); - int bitmapHeight = canvas->getDevice()->accessBitmap(false).height(); -#elif PLATFORM(CG) - GraphicsContext gc(canvas); - int bitmapHeight = CGBitmapContextGetHeight(reinterpret_cast<CGContextRef>(canvas)); -#else - notImplemented(); -#endif - // Compute rect to sample from inverted GPU buffer. - IntRect invertRect(rect.x(), bitmapHeight - rect.bottom(), rect.width(), rect.height()); - - OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size())); - RefPtr<ByteArray> pixelArray(ByteArray::create(rect.width() * rect.height() * 4)); - if (imageBuffer.get() && pixelArray.get()) { - m_layerRenderer->getFramebufferPixels(pixelArray->data(), invertRect); - imageBuffer->putPremultipliedImageData(pixelArray.get(), rect.size(), IntRect(IntPoint(), rect.size()), IntPoint()); - gc.save(); - gc.translate(FloatSize(0.0f, bitmapHeight)); - gc.scale(FloatSize(1.0f, -1.0f)); - // Use invertRect in next line, so that transform above inverts it back to - // desired destination rect. - gc.drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, invertRect.location()); - gc.restore(); - } -} -#endif - -void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect) -{ - if (isAcceleratedCompositingActive()) { -#if USE(ACCELERATED_COMPOSITING) - doComposite(); - - // If a canvas was passed in, we use it to grab a copy of the - // freshly-rendered pixels. - if (canvas) { - // Clip rect to the confines of the rootLayerTexture. - IntRect resizeRect(rect); - resizeRect.intersect(IntRect(IntPoint(), m_layerRenderer->rootLayerTextureSize())); - doPixelReadbackToCanvas(canvas, resizeRect); - } -#endif - } else { - WebFrameImpl* webframe = mainFrameImpl(); - if (webframe) - webframe->paint(canvas, rect); - } -} - -void WebViewImpl::themeChanged() -{ - if (!page()) - return; - FrameView* view = page()->mainFrame()->view(); - - WebRect damagedRect(0, 0, m_size.width, m_size.height); - view->invalidateRect(damagedRect); -} - -void WebViewImpl::composite(bool finish) -{ -#if USE(ACCELERATED_COMPOSITING) - doComposite(); - - // Finish if requested. - if (finish) - m_layerRenderer->finish(); - - // Put result onscreen. - m_layerRenderer->present(); - - GraphicsContext3D* context = m_layerRenderer->context(); - if (context->getExtensions()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR) - reallocateRenderer(); -#endif -} - -const WebInputEvent* WebViewImpl::m_currentInputEvent = 0; - -bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) -{ - UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture); - - // If we've started a drag and drop operation, ignore input events until - // we're done. - if (m_doingDragAndDrop) - return true; - - if (m_ignoreInputEvents) - return true; - - m_currentInputEvent = &inputEvent; - - if (m_mouseCaptureNode.get() && WebInputEvent::isMouseEventType(inputEvent.type)) { - // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. - RefPtr<Node> node = m_mouseCaptureNode; - - // Not all platforms call mouseCaptureLost() directly. - if (inputEvent.type == WebInputEvent::MouseUp) - mouseCaptureLost(); - - AtomicString eventType; - switch (inputEvent.type) { - case WebInputEvent::MouseMove: - eventType = eventNames().mousemoveEvent; - break; - case WebInputEvent::MouseLeave: - eventType = eventNames().mouseoutEvent; - break; - case WebInputEvent::MouseDown: - eventType = eventNames().mousedownEvent; - break; - case WebInputEvent::MouseUp: - eventType = eventNames().mouseupEvent; - break; - default: - ASSERT_NOT_REACHED(); - } - - node->dispatchMouseEvent( - PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)), - eventType, static_cast<const WebMouseEvent*>(&inputEvent)->clickCount); - m_currentInputEvent = 0; - return true; - } - - bool handled = true; - - // FIXME: WebKit seems to always return false on mouse events processing - // methods. For now we'll assume it has processed them (as we are only - // interested in whether keyboard events are processed). - switch (inputEvent.type) { - case WebInputEvent::MouseMove: - mouseMove(*static_cast<const WebMouseEvent*>(&inputEvent)); - break; - - case WebInputEvent::MouseLeave: - mouseLeave(*static_cast<const WebMouseEvent*>(&inputEvent)); - break; - - case WebInputEvent::MouseWheel: - handled = mouseWheel(*static_cast<const WebMouseWheelEvent*>(&inputEvent)); - break; - - case WebInputEvent::MouseDown: - mouseDown(*static_cast<const WebMouseEvent*>(&inputEvent)); - break; - - case WebInputEvent::MouseUp: - mouseUp(*static_cast<const WebMouseEvent*>(&inputEvent)); - break; - - case WebInputEvent::RawKeyDown: - case WebInputEvent::KeyDown: - case WebInputEvent::KeyUp: - handled = keyEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent)); - break; - - case WebInputEvent::Char: - handled = charEvent(*static_cast<const WebKeyboardEvent*>(&inputEvent)); - break; - -#if ENABLE(TOUCH_EVENTS) - case WebInputEvent::TouchStart: - case WebInputEvent::TouchMove: - case WebInputEvent::TouchEnd: - case WebInputEvent::TouchCancel: - handled = touchEvent(*static_cast<const WebTouchEvent*>(&inputEvent)); - break; -#endif - - default: - handled = false; - } - - m_currentInputEvent = 0; - - return handled; -} - -void WebViewImpl::mouseCaptureLost() -{ - m_mouseCaptureNode = 0; -} - -void WebViewImpl::setFocus(bool enable) -{ - m_page->focusController()->setFocused(enable); - if (enable) { - // Note that we don't call setActive() when disabled as this cause extra - // focus/blur events to be dispatched. - m_page->focusController()->setActive(true); - RefPtr<Frame> focusedFrame = m_page->focusController()->focusedFrame(); - if (focusedFrame) { - Node* focusedNode = focusedFrame->document()->focusedNode(); - if (focusedNode && focusedNode->isElementNode() - && focusedFrame->selection()->selection().isNone()) { - // If the selection was cleared while the WebView was not - // focused, then the focus element shows with a focus ring but - // no caret and does respond to keyboard inputs. - Element* element = static_cast<Element*>(focusedNode); - if (element->isTextFormControl()) - element->updateFocusAppearance(true); - else if (focusedNode->isContentEditable()) { - // updateFocusAppearance() selects all the text of - // contentseditable DIVs. So we set the selection explicitly - // instead. Note that this has the side effect of moving the - // caret back to the beginning of the text. - Position position(focusedNode, 0, - Position::PositionIsOffsetInAnchor); - focusedFrame->selection()->setSelection( - VisibleSelection(position, SEL_DEFAULT_AFFINITY)); - } - } - } - m_imeAcceptEvents = true; - } else { - hideAutoFillPopup(); - hideSelectPopup(); - - // Clear focus on the currently focused frame if any. - if (!m_page.get()) - return; - - Frame* frame = m_page->mainFrame(); - if (!frame) - return; - - RefPtr<Frame> focusedFrame = m_page->focusController()->focusedFrame(); - if (focusedFrame.get()) { - // Finish an ongoing composition to delete the composition node. - Editor* editor = focusedFrame->editor(); - if (editor && editor->hasComposition()) - editor->confirmComposition(); - m_imeAcceptEvents = false; - } - } -} - -bool WebViewImpl::setComposition( - const WebString& text, - const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, - int selectionEnd) -{ - Frame* focused = focusedWebCoreFrame(); - if (!focused || !m_imeAcceptEvents) - return false; - Editor* editor = focused->editor(); - if (!editor) - return false; - - // The input focus has been moved to another WebWidget object. - // We should use this |editor| object only to complete the ongoing - // composition. - if (!editor->canEdit() && !editor->hasComposition()) - return false; - - // We should verify the parent node of this IME composition node are - // editable because JavaScript may delete a parent node of the composition - // node. In this case, WebKit crashes while deleting texts from the parent - // node, which doesn't exist any longer. - PassRefPtr<Range> range = editor->compositionRange(); - if (range) { - const Node* node = range->startPosition().node(); - if (!node || !node->isContentEditable()) - return false; - } - - // If we're not going to fire a keypress event, then the keydown event was - // canceled. In that case, cancel any existing composition. - if (text.isEmpty() || m_suppressNextKeypressEvent) { - // A browser process sent an IPC message which does not contain a valid - // string, which means an ongoing composition has been canceled. - // If the ongoing composition has been canceled, replace the ongoing - // composition string with an empty string and complete it. - String emptyString; - Vector<CompositionUnderline> emptyUnderlines; - editor->setComposition(emptyString, emptyUnderlines, 0, 0); - return text.isEmpty(); - } - - // When the range of composition underlines overlap with the range between - // selectionStart and selectionEnd, WebKit somehow won't paint the selection - // at all (see InlineTextBox::paint() function in InlineTextBox.cpp). - // But the selection range actually takes effect. - editor->setComposition(String(text), - CompositionUnderlineVectorBuilder(underlines), - selectionStart, selectionEnd); - - return editor->hasComposition(); -} - -bool WebViewImpl::confirmComposition() -{ - return confirmComposition(WebString()); -} - -bool WebViewImpl::confirmComposition(const WebString& text) -{ - Frame* focused = focusedWebCoreFrame(); - if (!focused || !m_imeAcceptEvents) - return false; - Editor* editor = focused->editor(); - if (!editor || (!editor->hasComposition() && !text.length())) - return false; - - // We should verify the parent node of this IME composition node are - // editable because JavaScript may delete a parent node of the composition - // node. In this case, WebKit crashes while deleting texts from the parent - // node, which doesn't exist any longer. - PassRefPtr<Range> range = editor->compositionRange(); - if (range) { - const Node* node = range->startPosition().node(); - if (!node || !node->isContentEditable()) - return false; - } - - if (editor->hasComposition()) { - if (text.length()) - editor->confirmComposition(String(text)); - else - editor->confirmComposition(); - } else - editor->insertText(String(text), 0); - - return true; -} - -WebTextInputType WebViewImpl::textInputType() -{ - WebTextInputType type = WebTextInputTypeNone; - const Frame* focused = focusedWebCoreFrame(); - if (!focused) - return type; - - const Editor* editor = focused->editor(); - if (!editor || !editor->canEdit()) - return type; - - SelectionController* controller = focused->selection(); - if (!controller) - return type; - - const Node* node = controller->start().node(); - if (!node) - return type; - - // FIXME: Support more text input types when necessary, eg. Number, - // Date, Email, URL, etc. - if (controller->isInPasswordField()) - type = WebTextInputTypePassword; - else if (node->shouldUseInputMethod()) - type = WebTextInputTypeText; - - return type; -} - -WebRect WebViewImpl::caretOrSelectionBounds() -{ - WebRect rect; - const Frame* focused = focusedWebCoreFrame(); - if (!focused) - return rect; - - SelectionController* controller = focused->selection(); - if (!controller) - return rect; - - const FrameView* view = focused->view(); - if (!view) - return rect; - - const Node* node = controller->start().node(); - if (!node || !node->renderer()) - return rect; - - if (controller->isCaret()) - rect = view->contentsToWindow(controller->absoluteCaretBounds()); - else if (controller->isRange()) { - node = controller->end().node(); - if (!node || !node->renderer()) - return rect; - RefPtr<Range> range = controller->toNormalizedRange(); - rect = view->contentsToWindow(focused->editor()->firstRectForRange(range.get())); - } - return rect; -} - -void WebViewImpl::setTextDirection(WebTextDirection direction) -{ - // The Editor::setBaseWritingDirection() function checks if we can change - // the text direction of the selected node and updates its DOM "dir" - // attribute and its CSS "direction" property. - // So, we just call the function as Safari does. - const Frame* focused = focusedWebCoreFrame(); - if (!focused) - return; - - Editor* editor = focused->editor(); - if (!editor || !editor->canEdit()) - return; - - switch (direction) { - case WebTextDirectionDefault: - editor->setBaseWritingDirection(NaturalWritingDirection); - break; - - case WebTextDirectionLeftToRight: - editor->setBaseWritingDirection(LeftToRightWritingDirection); - break; - - case WebTextDirectionRightToLeft: - editor->setBaseWritingDirection(RightToLeftWritingDirection); - break; - - default: - notImplemented(); - break; - } -} - -bool WebViewImpl::isAcceleratedCompositingActive() const -{ -#if USE(ACCELERATED_COMPOSITING) - return m_isAcceleratedCompositingActive; -#else - return false; -#endif -} - -// WebView -------------------------------------------------------------------- - -WebSettings* WebViewImpl::settings() -{ - if (!m_webSettings.get()) - m_webSettings.set(new WebSettingsImpl(m_page->settings())); - ASSERT(m_webSettings.get()); - return m_webSettings.get(); -} - -WebString WebViewImpl::pageEncoding() const -{ - if (!m_page.get()) - return WebString(); - - return m_page->mainFrame()->loader()->writer()->encoding(); -} - -void WebViewImpl::setPageEncoding(const WebString& encodingName) -{ - if (!m_page.get()) - return; - - // Only change override encoding, don't change default encoding. - // Note that the new encoding must be 0 if it isn't supposed to be set. - String newEncodingName; - if (!encodingName.isEmpty()) - newEncodingName = encodingName; - m_page->mainFrame()->loader()->reloadWithOverrideEncoding(newEncodingName); -} - -bool WebViewImpl::dispatchBeforeUnloadEvent() -{ - // FIXME: This should really cause a recursive depth-first walk of all - // frames in the tree, calling each frame's onbeforeunload. At the moment, - // we're consistent with Safari 3.1, not IE/FF. - Frame* frame = m_page->mainFrame(); - if (!frame) - return true; - - return frame->loader()->shouldClose(); -} - -void WebViewImpl::dispatchUnloadEvent() -{ - // Run unload handlers. - m_page->mainFrame()->loader()->closeURL(); -} - -WebFrame* WebViewImpl::mainFrame() -{ - return mainFrameImpl(); -} - -WebFrame* WebViewImpl::findFrameByName( - const WebString& name, WebFrame* relativeToFrame) -{ - if (!relativeToFrame) - relativeToFrame = mainFrame(); - Frame* frame = static_cast<WebFrameImpl*>(relativeToFrame)->frame(); - frame = frame->tree()->find(name); - return WebFrameImpl::fromFrame(frame); -} - -WebFrame* WebViewImpl::focusedFrame() -{ - return WebFrameImpl::fromFrame(focusedWebCoreFrame()); -} - -void WebViewImpl::setFocusedFrame(WebFrame* frame) -{ - if (!frame) { - // Clears the focused frame if any. - Frame* frame = focusedWebCoreFrame(); - if (frame) - frame->selection()->setFocused(false); - return; - } - WebFrameImpl* frameImpl = static_cast<WebFrameImpl*>(frame); - Frame* webcoreFrame = frameImpl->frame(); - webcoreFrame->page()->focusController()->setFocusedFrame(webcoreFrame); -} - -void WebViewImpl::setInitialFocus(bool reverse) -{ - if (!m_page.get()) - return; - - // Since we don't have a keyboard event, we'll create one. - WebKeyboardEvent keyboardEvent; - keyboardEvent.type = WebInputEvent::RawKeyDown; - if (reverse) - keyboardEvent.modifiers = WebInputEvent::ShiftKey; - - // VK_TAB which is only defined on Windows. - keyboardEvent.windowsKeyCode = 0x09; - PlatformKeyboardEventBuilder platformEvent(keyboardEvent); - RefPtr<KeyboardEvent> webkitEvent = KeyboardEvent::create(platformEvent, 0); - - Frame* frame = page()->focusController()->focusedOrMainFrame(); - if (Document* document = frame->document()) - document->setFocusedNode(0); - page()->focusController()->setInitialFocus( - reverse ? FocusDirectionBackward : FocusDirectionForward, - webkitEvent.get()); -} - -void WebViewImpl::clearFocusedNode() -{ - if (!m_page.get()) - return; - - RefPtr<Frame> frame = m_page->mainFrame(); - if (!frame.get()) - return; - - RefPtr<Document> document = frame->document(); - if (!document.get()) - return; - - RefPtr<Node> oldFocusedNode = document->focusedNode(); - - // Clear the focused node. - document->setFocusedNode(0); - - if (!oldFocusedNode.get()) - return; - - // If a text field has focus, we need to make sure the selection controller - // knows to remove selection from it. Otherwise, the text field is still - // processing keyboard events even though focus has been moved to the page and - // keystrokes get eaten as a result. - if (oldFocusedNode->hasTagName(HTMLNames::textareaTag) - || (oldFocusedNode->hasTagName(HTMLNames::inputTag) - && static_cast<HTMLInputElement*>(oldFocusedNode.get())->isTextField())) { - // Clear the selection. - SelectionController* selection = frame->selection(); - selection->clear(); - } -} - -void WebViewImpl::scrollFocusedNodeIntoView() -{ - Node* focusedNode = focusedWebCoreNode(); - if (focusedNode && focusedNode->isElementNode()) { - Element* elementNode = static_cast<Element*>(focusedNode); - elementNode->scrollIntoViewIfNeeded(true); - } -} - -double WebViewImpl::zoomLevel() -{ - return m_zoomLevel; -} - -double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel) -{ - if (zoomLevel < m_minimumZoomLevel) - m_zoomLevel = m_minimumZoomLevel; - else if (zoomLevel > m_maximumZoomLevel) - m_zoomLevel = m_maximumZoomLevel; - else - m_zoomLevel = zoomLevel; - - Frame* frame = mainFrameImpl()->frame(); - WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(frame); - if (pluginContainer) - pluginContainer->plugin()->setZoomLevel(m_zoomLevel, textOnly); - else { - double zoomFactor = zoomLevelToZoomFactor(m_zoomLevel); - if (textOnly) - frame->setPageAndTextZoomFactors(1, zoomFactor); - else - frame->setPageAndTextZoomFactors(zoomFactor, 1); - } - return m_zoomLevel; -} - -void WebViewImpl::zoomLimitsChanged(double minimumZoomLevel, - double maximumZoomLevel) -{ - m_minimumZoomLevel = minimumZoomLevel; - m_maximumZoomLevel = maximumZoomLevel; - m_client->zoomLimitsChanged(m_minimumZoomLevel, m_maximumZoomLevel); -} - -void WebViewImpl::fullFramePluginZoomLevelChanged(double zoomLevel) -{ - if (zoomLevel == m_zoomLevel) - return; - - m_zoomLevel = std::max(std::min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel); - m_client->zoomLevelChanged(); -} - -double WebView::zoomLevelToZoomFactor(double zoomLevel) -{ - return std::pow(textSizeMultiplierRatio, zoomLevel); -} - -double WebView::zoomFactorToZoomLevel(double factor) -{ - // Since factor = 1.2^level, level = log(factor) / log(1.2) - return log(factor) / log(textSizeMultiplierRatio); -} - -void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, - const WebPoint& location) -{ - HitTestResult result = - hitTestResultForWindowPos(location); - RefPtr<Node> node = result.innerNonSharedNode(); - if (!node->hasTagName(HTMLNames::videoTag) && !node->hasTagName(HTMLNames::audioTag)) - return; - - RefPtr<HTMLMediaElement> mediaElement = - static_pointer_cast<HTMLMediaElement>(node); - switch (action.type) { - case WebMediaPlayerAction::Play: - if (action.enable) - mediaElement->play(mediaElement->processingUserGesture()); - else - mediaElement->pause(mediaElement->processingUserGesture()); - break; - case WebMediaPlayerAction::Mute: - mediaElement->setMuted(action.enable); - break; - case WebMediaPlayerAction::Loop: - mediaElement->setLoop(action.enable); - break; - case WebMediaPlayerAction::Controls: - mediaElement->setControls(action.enable); - break; - default: - ASSERT_NOT_REACHED(); - } -} - -void WebViewImpl::copyImageAt(const WebPoint& point) -{ - if (!m_page.get()) - return; - - HitTestResult result = hitTestResultForWindowPos(point); - - if (result.absoluteImageURL().isEmpty()) { - // There isn't actually an image at these coordinates. Might be because - // the window scrolled while the context menu was open or because the page - // changed itself between when we thought there was an image here and when - // we actually tried to retreive the image. - // - // FIXME: implement a cache of the most recent HitTestResult to avoid having - // to do two hit tests. - return; - } - - m_page->mainFrame()->editor()->copyImage(result); -} - -void WebViewImpl::dragSourceEndedAt( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperation operation) -{ - PlatformMouseEvent pme(clientPoint, - screenPoint, - LeftButton, MouseEventMoved, 0, false, false, false, - false, 0); - m_page->mainFrame()->eventHandler()->dragSourceEndedAt(pme, - static_cast<DragOperation>(operation)); - m_dragScrollTimer->stop(); -} - -void WebViewImpl::dragSourceMovedTo( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperation operation) -{ - m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint); -} - -void WebViewImpl::dragSourceSystemDragEnded() -{ - // It's possible for us to get this callback while not doing a drag if - // it's from a previous page that got unloaded. - if (m_doingDragAndDrop) { - m_page->dragController()->dragEnded(); - m_doingDragAndDrop = false; - } -} - -WebDragOperation WebViewImpl::dragTargetDragEnter( - const WebDragData& webDragData, int identity, - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) -{ - ASSERT(!m_currentDragData.get()); - - m_currentDragData = webDragData; - m_dragIdentity = identity; - m_operationsAllowed = operationsAllowed; - - return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter); -} - -WebDragOperation WebViewImpl::dragTargetDragEnterNew( - int identity, - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) -{ - ASSERT(!m_currentDragData.get()); - - m_currentDragData = ChromiumDataObject::createReadable(Clipboard::DragAndDrop); - m_dragIdentity = identity; - m_operationsAllowed = operationsAllowed; - - return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter); -} - -WebDragOperation WebViewImpl::dragTargetDragOver( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed) -{ - m_operationsAllowed = operationsAllowed; - - return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragOver); -} - -void WebViewImpl::dragTargetDragLeave() -{ - ASSERT(m_currentDragData.get()); - - DragData dragData( - m_currentDragData.get(), - IntPoint(), - IntPoint(), - static_cast<DragOperation>(m_operationsAllowed)); - - m_dragTargetDispatch = true; - m_page->dragController()->dragExited(&dragData); - m_dragTargetDispatch = false; - - m_currentDragData = 0; - m_dropEffect = DropEffectDefault; - m_dragOperation = WebDragOperationNone; - m_dragIdentity = 0; -} - -void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint, - const WebPoint& screenPoint) -{ - ASSERT(m_currentDragData.get()); - - // If this webview transitions from the "drop accepting" state to the "not - // accepting" state, then our IPC message reply indicating that may be in- - // flight, or else delayed by javascript processing in this webview. If a - // drop happens before our IPC reply has reached the browser process, then - // the browser forwards the drop to this webview. So only allow a drop to - // proceed if our webview m_dragOperation state is not DragOperationNone. - - if (m_dragOperation == WebDragOperationNone) { // IPC RACE CONDITION: do not allow this drop. - dragTargetDragLeave(); - return; - } - - DragData dragData( - m_currentDragData.get(), - clientPoint, - screenPoint, - static_cast<DragOperation>(m_operationsAllowed)); - - m_dragTargetDispatch = true; - m_page->dragController()->performDrag(&dragData); - m_dragTargetDispatch = false; - - m_currentDragData = 0; - m_dropEffect = DropEffectDefault; - m_dragOperation = WebDragOperationNone; - m_dragIdentity = 0; - m_dragScrollTimer->stop(); -} - -int WebViewImpl::dragIdentity() -{ - if (m_dragTargetDispatch) - return m_dragIdentity; - return 0; -} - -WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction) -{ - ASSERT(m_currentDragData.get()); - - DragData dragData( - m_currentDragData.get(), - clientPoint, - screenPoint, - static_cast<DragOperation>(m_operationsAllowed)); - - m_dropEffect = DropEffectDefault; - m_dragTargetDispatch = true; - DragOperation effect = dragAction == DragEnter ? m_page->dragController()->dragEntered(&dragData) - : m_page->dragController()->dragUpdated(&dragData); - // Mask the operation against the drag source's allowed operations. - if (!(effect & dragData.draggingSourceOperationMask())) - effect = DragOperationNone; - m_dragTargetDispatch = false; - - if (m_dropEffect != DropEffectDefault) { - m_dragOperation = (m_dropEffect != DropEffectNone) ? WebDragOperationCopy - : WebDragOperationNone; - } else - m_dragOperation = static_cast<WebDragOperation>(effect); - - if (dragAction == DragOver) - m_dragScrollTimer->triggerScroll(mainFrameImpl()->frameView(), clientPoint); - else - m_dragScrollTimer->stop(); - - - return m_dragOperation; -} - -unsigned long WebViewImpl::createUniqueIdentifierForRequest() -{ - if (m_page) - return m_page->progress()->createUniqueIdentifier(); - return 0; -} - -void WebViewImpl::inspectElementAt(const WebPoint& point) -{ - if (!m_page.get()) - return; - - if (point.x == -1 || point.y == -1) - m_page->inspectorController()->inspect(0); - else { - HitTestResult result = hitTestResultForWindowPos(point); - - if (!result.innerNonSharedNode()) - return; - - m_page->inspectorController()->inspect(result.innerNonSharedNode()); - } -} - -WebString WebViewImpl::inspectorSettings() const -{ - return m_inspectorSettings; -} - -void WebViewImpl::setInspectorSettings(const WebString& settings) -{ - m_inspectorSettings = settings; -} - -bool WebViewImpl::inspectorSetting(const WebString& key, WebString* value) const -{ - if (!m_inspectorSettingsMap->contains(key)) - return false; - *value = m_inspectorSettingsMap->get(key); - return true; -} - -void WebViewImpl::setInspectorSetting(const WebString& key, - const WebString& value) -{ - m_inspectorSettingsMap->set(key, value); - client()->didUpdateInspectorSetting(key, value); -} - -WebDevToolsAgent* WebViewImpl::devToolsAgent() -{ - return m_devToolsAgent.get(); -} - -WebAccessibilityObject WebViewImpl::accessibilityObject() -{ - if (!mainFrameImpl()) - return WebAccessibilityObject(); - - Document* document = mainFrameImpl()->frame()->document(); - return WebAccessibilityObject( - document->axObjectCache()->getOrCreate(document->renderer())); -} - -void WebViewImpl::applyAutoFillSuggestions( - const WebNode& node, - const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex) -{ - ASSERT(names.size() == labels.size()); - ASSERT(names.size() == uniqueIDs.size()); - ASSERT(separatorIndex < static_cast<int>(names.size())); - - if (names.isEmpty()) { - hideAutoFillPopup(); - return; - } - - RefPtr<Node> focusedNode = focusedWebCoreNode(); - // If the node for which we queried the AutoFill suggestions is not the - // focused node, then we have nothing to do. FIXME: also check the - // caret is at the end and that the text has not changed. - if (!focusedNode || focusedNode != PassRefPtr<Node>(node)) { - hideAutoFillPopup(); - return; - } - - HTMLInputElement* inputElem = - static_cast<HTMLInputElement*>(focusedNode.get()); - - // The first time the AutoFill popup is shown we'll create the client and - // the popup. - if (!m_autoFillPopupClient.get()) - m_autoFillPopupClient.set(new AutoFillPopupMenuClient); - - m_autoFillPopupClient->initialize( - inputElem, names, labels, icons, uniqueIDs, separatorIndex); - - if (!m_autoFillPopup.get()) { - m_autoFillPopup = PopupContainer::create(m_autoFillPopupClient.get(), - PopupContainer::Suggestion, - autoFillPopupSettings); - } - - if (m_autoFillPopupShowing) { - refreshAutoFillPopup(); - } else { - m_autoFillPopup->show(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0); - m_autoFillPopupShowing = true; - } -} - -void WebViewImpl::hidePopups() -{ - hideSelectPopup(); - hideAutoFillPopup(); -} - -void WebViewImpl::performCustomContextMenuAction(unsigned action) -{ - if (!m_page) - return; - ContextMenu* menu = m_page->contextMenuController()->contextMenu(); - if (!menu) - return; - ContextMenuItem* item = menu->itemWithAction(static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + action)); - if (item) - m_page->contextMenuController()->contextMenuItemSelected(item); - m_page->contextMenuController()->clearContextMenu(); -} - -// WebView -------------------------------------------------------------------- - -bool WebViewImpl::setDropEffect(bool accept) -{ - if (m_dragTargetDispatch) { - m_dropEffect = accept ? DropEffectCopy : DropEffectNone; - return true; - } - return false; -} - -void WebViewImpl::setIsTransparent(bool isTransparent) -{ - // Set any existing frames to be transparent. - Frame* frame = m_page->mainFrame(); - while (frame) { - frame->view()->setTransparent(isTransparent); - frame = frame->tree()->traverseNext(); - } - - // Future frames check this to know whether to be transparent. - m_isTransparent = isTransparent; -} - -bool WebViewImpl::isTransparent() const -{ - return m_isTransparent; -} - -void WebViewImpl::setIsActive(bool active) -{ - if (page() && page()->focusController()) - page()->focusController()->setActive(active); -} - -bool WebViewImpl::isActive() const -{ - return (page() && page()->focusController()) ? page()->focusController()->isActive() : false; -} - -void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString& scheme) -{ - SecurityOrigin::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme)); -} - -void WebViewImpl::setScrollbarColors(unsigned inactiveColor, - unsigned activeColor, - unsigned trackColor) { -#if OS(LINUX) || OS(FREEBSD) - PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor, - activeColor, - trackColor); -#endif -} - -void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor, - unsigned activeForegroundColor, - unsigned inactiveBackgroundColor, - unsigned inactiveForegroundColor) { -#if OS(LINUX) || OS(FREEBSD) - RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor, - activeForegroundColor, - inactiveBackgroundColor, - inactiveForegroundColor); - theme()->platformColorsDidChange(); -#endif -} - -void WebView::addUserScript(const WebString& sourceCode, - const WebVector<WebString>& patternsIn, - WebView::UserScriptInjectAt injectAt, - WebView::UserContentInjectIn injectIn) -{ - OwnPtr<Vector<String> > patterns(new Vector<String>); - for (size_t i = 0; i < patternsIn.size(); ++i) - patterns->append(patternsIn[i]); - - PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); - RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create()); - pageGroup->addUserScriptToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0, - static_cast<UserScriptInjectionTime>(injectAt), - static_cast<UserContentInjectedFrames>(injectIn)); -} - -void WebView::addUserStyleSheet(const WebString& sourceCode, - const WebVector<WebString>& patternsIn, - WebView::UserContentInjectIn injectIn, - WebView::UserStyleInjectionTime injectionTime) -{ - OwnPtr<Vector<String> > patterns(new Vector<String>); - for (size_t i = 0; i < patternsIn.size(); ++i) - patterns->append(patternsIn[i]); - - PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); - RefPtr<DOMWrapperWorld> world(DOMWrapperWorld::create()); - - // FIXME: Current callers always want the level to be "author". It probably makes sense to let - // callers specify this though, since in other cases the caller will probably want "user" level. - // - // FIXME: It would be nice to populate the URL correctly, instead of passing an empty URL. - pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0, - static_cast<UserContentInjectedFrames>(injectIn), - UserStyleAuthorLevel, - static_cast<WebCore::UserStyleInjectionTime>(injectionTime)); -} - -void WebView::removeAllUserContent() -{ - PageGroup* pageGroup = PageGroup::pageGroup(pageGroupName); - pageGroup->removeAllUserContent(); -} - -void WebViewImpl::didCommitLoad(bool* isNewNavigation) -{ - if (isNewNavigation) - *isNewNavigation = m_observedNewNavigation; - -#ifndef NDEBUG - ASSERT(!m_observedNewNavigation - || m_page->mainFrame()->loader()->documentLoader() == m_newNavigationLoader); - m_newNavigationLoader = 0; -#endif - m_observedNewNavigation = false; -} - -bool WebViewImpl::useExternalPopupMenus() -{ - return shouldUseExternalPopupMenus; -} - -bool WebViewImpl::navigationPolicyFromMouseEvent(unsigned short button, - bool ctrl, bool shift, - bool alt, bool meta, - WebNavigationPolicy* policy) -{ -#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD) || OS(SOLARIS) - const bool newTabModifier = (button == 1) || ctrl; -#elif OS(DARWIN) - const bool newTabModifier = (button == 1) || meta; -#endif - if (!newTabModifier && !shift && !alt) - return false; - - ASSERT(policy); - if (newTabModifier) { - if (shift) - *policy = WebNavigationPolicyNewForegroundTab; - else - *policy = WebNavigationPolicyNewBackgroundTab; - } else { - if (shift) - *policy = WebNavigationPolicyNewWindow; - else - *policy = WebNavigationPolicyDownload; - } - return true; -} - -void WebViewImpl::startDragging(const WebDragData& dragData, - WebDragOperationsMask mask, - const WebImage& dragImage, - const WebPoint& dragImageOffset) -{ - if (!m_client) - return; - ASSERT(!m_doingDragAndDrop); - m_doingDragAndDrop = true; - m_client->startDragging(dragData, mask, dragImage, dragImageOffset); -} - -void WebViewImpl::setCurrentHistoryItem(HistoryItem* item) -{ - m_backForwardListClientImpl.setCurrentHistoryItem(item); -} - -HistoryItem* WebViewImpl::previousHistoryItem() -{ - return m_backForwardListClientImpl.previousHistoryItem(); -} - -void WebViewImpl::observeNewNavigation() -{ - m_observedNewNavigation = true; -#ifndef NDEBUG - m_newNavigationLoader = m_page->mainFrame()->loader()->documentLoader(); -#endif -} - -void WebViewImpl::setIgnoreInputEvents(bool newValue) -{ - ASSERT(m_ignoreInputEvents != newValue); - m_ignoreInputEvents = newValue; -} - -#if ENABLE(NOTIFICATIONS) -NotificationPresenterImpl* WebViewImpl::notificationPresenterImpl() -{ - if (!m_notificationPresenter.isInitialized() && m_client) - m_notificationPresenter.initialize(m_client->notificationPresenter()); - return &m_notificationPresenter; -} -#endif - -void WebViewImpl::refreshAutoFillPopup() -{ - ASSERT(m_autoFillPopupShowing); - - // Hide the popup if it has become empty. - if (!m_autoFillPopupClient->listSize()) { - hideAutoFillPopup(); - return; - } - - IntRect oldBounds = m_autoFillPopup->boundsRect(); - m_autoFillPopup->refresh(); - IntRect newBounds = m_autoFillPopup->boundsRect(); - // Let's resize the backing window if necessary. - if (oldBounds != newBounds) { - WebPopupMenuImpl* popupMenu = - static_cast<WebPopupMenuImpl*>(m_autoFillPopup->client()); - if (popupMenu) - popupMenu->client()->setWindowRect(newBounds); - } -} - -Node* WebViewImpl::focusedWebCoreNode() -{ - Frame* frame = m_page->focusController()->focusedFrame(); - if (!frame) - return 0; - - Document* document = frame->document(); - if (!document) - return 0; - - return document->focusedNode(); -} - -HitTestResult WebViewImpl::hitTestResultForWindowPos(const IntPoint& pos) -{ - IntPoint docPoint(m_page->mainFrame()->view()->windowToContents(pos)); - return m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(docPoint, false); -} - -void WebViewImpl::setTabsToLinks(bool enable) -{ - m_tabsToLinks = enable; -} - -bool WebViewImpl::tabsToLinks() const -{ - return m_tabsToLinks; -} - -#if USE(ACCELERATED_COMPOSITING) -bool WebViewImpl::allowsAcceleratedCompositing() -{ - return !m_compositorCreationFailed; -} - -void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer) -{ - setIsAcceleratedCompositingActive(layer ? true : false); - if (m_layerRenderer) - m_layerRenderer->setRootLayer(layer); - - IntRect damagedRect(0, 0, m_size.width, m_size.height); - if (m_isAcceleratedCompositingActive) - invalidateRootLayerRect(damagedRect); - else - m_client->didInvalidateRect(damagedRect); -} - -void WebViewImpl::setRootLayerNeedsDisplay() -{ - m_client->scheduleComposite(); -} - - -void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& clipRect) -{ - setRootLayerNeedsDisplay(); -} - -void WebViewImpl::invalidateRootLayerRect(const IntRect& rect) -{ - ASSERT(m_layerRenderer); - - if (!page()) - return; - - FrameView* view = page()->mainFrame()->view(); - IntRect contentRect = view->visibleContentRect(false); - IntRect visibleRect = view->visibleContentRect(true); - - IntRect dirtyRect = view->windowToContents(rect); - m_layerRenderer->invalidateRootLayerRect(dirtyRect, visibleRect, contentRect); - setRootLayerNeedsDisplay(); -} - - -void WebViewImpl::setIsAcceleratedCompositingActive(bool active) -{ - ChromiumBridge::histogramEnumeration("GPU.setIsAcceleratedCompositingActive", active * 2 + m_isAcceleratedCompositingActive, 4); - - if (m_isAcceleratedCompositingActive == active) - return; - - if (!active) { - m_isAcceleratedCompositingActive = false; - if (m_layerRenderer) - m_layerRenderer->finish(); // finish all GL rendering before we hide the window? - m_client->didActivateAcceleratedCompositing(false); - } else if (m_layerRenderer) { - m_isAcceleratedCompositingActive = true; - m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width), - std::max(1, m_size.height))); - - m_client->didActivateAcceleratedCompositing(true); - } else { - RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release(); - if (!context) { - context = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); - if (context) - context->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); - } - m_layerRenderer = LayerRendererChromium::create(context.release()); - if (m_layerRenderer) { - m_client->didActivateAcceleratedCompositing(true); - m_isAcceleratedCompositingActive = true; - m_compositorCreationFailed = false; - } else { - m_isAcceleratedCompositingActive = false; - m_client->didActivateAcceleratedCompositing(false); - m_compositorCreationFailed = true; - } - } - if (page()) - page()->mainFrame()->view()->setClipsRepaints(!m_isAcceleratedCompositingActive); -} - -class WebViewImplTilePaintInterface : public TilePaintInterface { -public: - explicit WebViewImplTilePaintInterface(WebViewImpl* webViewImpl) - : m_webViewImpl(webViewImpl) - { - } - - virtual void paint(GraphicsContext& context, const IntRect& contentRect) - { - Page* page = m_webViewImpl->page(); - if (!page) - return; - FrameView* view = page->mainFrame()->view(); - view->paintContents(&context, contentRect); - } - -private: - WebViewImpl* m_webViewImpl; -}; - - -class WebViewImplScrollbarPaintInterface : public TilePaintInterface { -public: - explicit WebViewImplScrollbarPaintInterface(WebViewImpl* webViewImpl) - : m_webViewImpl(webViewImpl) - { - } - - virtual void paint(GraphicsContext& context, const IntRect& contentRect) - { - Page* page = m_webViewImpl->page(); - if (!page) - return; - FrameView* view = page->mainFrame()->view(); - - context.translate(view->scrollX(), view->scrollY()); - IntRect windowRect = view->contentsToWindow(contentRect); - view->paintScrollbars(&context, windowRect); - } - -private: - WebViewImpl* m_webViewImpl; -}; - -void WebViewImpl::doComposite() -{ - ASSERT(isAcceleratedCompositingActive()); - if (!page()) - return; - FrameView* view = page()->mainFrame()->view(); - - // The visibleRect includes scrollbars whereas the contentRect doesn't. - IntRect visibleRect = view->visibleContentRect(true); - IntRect contentRect = view->visibleContentRect(false); - IntPoint scroll(view->scrollX(), view->scrollY()); - - WebViewImplTilePaintInterface tilePaint(this); - - WebViewImplScrollbarPaintInterface scrollbarPaint(this); - m_layerRenderer->drawLayers(visibleRect, contentRect, scroll, tilePaint, scrollbarPaint); -} - -void WebViewImpl::reallocateRenderer() -{ - GraphicsContext3D* context = m_layerRenderer->context(); - RefPtr<GraphicsContext3D> newContext = GraphicsContext3D::create(context->getContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); - // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0. - RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext); - - // Reattach the root layer. Child layers will get reattached as a side effect of updateLayersRecursive. - if (layerRenderer) - m_layerRenderer->transferRootLayer(layerRenderer.get()); - m_layerRenderer = layerRenderer; - - // Enable or disable accelerated compositing and request a refresh. - setRootGraphicsLayer(m_layerRenderer ? m_layerRenderer->rootLayer() : 0); -} -#endif - - -WebGraphicsContext3D* WebViewImpl::graphicsContext3D() -{ -#if USE(ACCELERATED_COMPOSITING) - if (m_page->settings()->acceleratedCompositingEnabled() && allowsAcceleratedCompositing()) { - GraphicsContext3D* context = 0; - if (m_layerRenderer) - context = m_layerRenderer->context(); - else if (m_temporaryOnscreenGraphicsContext3D) - context = m_temporaryOnscreenGraphicsContext3D.get(); - else { - m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(getCompositorContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); - if (m_temporaryOnscreenGraphicsContext3D) - m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height)); - context = m_temporaryOnscreenGraphicsContext3D.get(); - } - return GraphicsContext3DInternal::extractWebGraphicsContext3D(context); - } -#endif - return 0; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h deleted file mode 100644 index cc25c84..0000000 --- a/WebKit/chromium/src/WebViewImpl.h +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebViewImpl_h -#define WebViewImpl_h - -#include "WebNavigationPolicy.h" -#include "WebPoint.h" -#include "WebRect.h" -#include "WebSize.h" -#include "WebString.h" -#include "WebView.h" - -#include "BackForwardListClientImpl.h" -#include "ChromeClientImpl.h" -#include "ContextMenuClientImpl.h" -#include "DragClientImpl.h" -#include "EditorClientImpl.h" -#include "GraphicsContext3D.h" -#include "GraphicsLayer.h" -#include "InspectorClientImpl.h" -#include "IntRect.h" -#include "LayerRendererChromium.h" -#include "NotificationPresenterImpl.h" -#include <wtf/OwnPtr.h> -#include <wtf/RefCounted.h> - -namespace WebCore { -class ChromiumDataObject; -class Frame; -class HistoryItem; -class HitTestResult; -class KeyboardEvent; -class Page; -class PlatformKeyboardEvent; -class PopupContainer; -class PopupMenuClient; -class Range; -class RenderTheme; -class Widget; -} - -namespace WebKit { -class AutocompletePopupMenuClient; -class AutoFillPopupMenuClient; -class ContextMenuClientImpl; -class DeviceOrientationClientProxy; -class DragScrollTimer; -class GeolocationClientProxy; -class SpeechInputClientImpl; -class WebAccessibilityObject; -class WebDevToolsAgentClient; -class WebDevToolsAgentPrivate; -class WebFrameImpl; -class WebImage; -class WebKeyboardEvent; -class WebMouseEvent; -class WebMouseWheelEvent; -class WebSettingsImpl; -class WebTouchEvent; - -class WebViewImpl : public WebView, public RefCounted<WebViewImpl> { -public: - // WebWidget methods: - virtual void close(); - virtual WebSize size() { return m_size; } - virtual void resize(const WebSize&); - virtual void layout(); - virtual void paint(WebCanvas*, const WebRect&); - virtual void themeChanged(); - virtual void composite(bool finish); - virtual bool handleInputEvent(const WebInputEvent&); - virtual void mouseCaptureLost(); - virtual void setFocus(bool enable); - virtual bool setComposition( - const WebString& text, - const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, - int selectionEnd); - virtual bool confirmComposition(); - virtual bool confirmComposition(const WebString& text); - virtual WebTextInputType textInputType(); - virtual WebRect caretOrSelectionBounds(); - virtual void setTextDirection(WebTextDirection direction); - virtual bool isAcceleratedCompositingActive() const; - - // WebView methods: - virtual void initializeMainFrame(WebFrameClient*); - virtual WebSettings* settings(); - virtual WebString pageEncoding() const; - virtual void setPageEncoding(const WebString& encoding); - virtual bool isTransparent() const; - virtual void setIsTransparent(bool value); - virtual bool tabsToLinks() const; - virtual void setTabsToLinks(bool value); - virtual bool tabKeyCyclesThroughElements() const; - virtual void setTabKeyCyclesThroughElements(bool value); - virtual bool isActive() const; - virtual void setIsActive(bool value); - virtual void setDomainRelaxationForbidden(bool, const WebString& scheme); - virtual bool dispatchBeforeUnloadEvent(); - virtual void dispatchUnloadEvent(); - virtual WebFrame* mainFrame(); - virtual WebFrame* findFrameByName( - const WebString& name, WebFrame* relativeToFrame); - virtual WebFrame* focusedFrame(); - virtual void setFocusedFrame(WebFrame* frame); - virtual void setInitialFocus(bool reverse); - virtual void clearFocusedNode(); - virtual void scrollFocusedNodeIntoView(); - virtual double zoomLevel(); - virtual double setZoomLevel(bool textOnly, double zoomLevel); - virtual void zoomLimitsChanged(double minimumZoomLevel, - double maximumZoomLevel); - virtual void performMediaPlayerAction( - const WebMediaPlayerAction& action, - const WebPoint& location); - virtual void copyImageAt(const WebPoint& point); - virtual void dragSourceEndedAt( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperation operation); - virtual void dragSourceMovedTo( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperation operation); - virtual void dragSourceSystemDragEnded(); - virtual WebDragOperation dragTargetDragEnter( - const WebDragData& dragData, int identity, - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed); - virtual WebDragOperation dragTargetDragEnterNew( - int identity, - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed); - virtual WebDragOperation dragTargetDragOver( - const WebPoint& clientPoint, - const WebPoint& screenPoint, - WebDragOperationsMask operationsAllowed); - virtual void dragTargetDragLeave(); - virtual void dragTargetDrop( - const WebPoint& clientPoint, - const WebPoint& screenPoint); - virtual int dragIdentity(); - virtual bool setDropEffect(bool accept); - virtual unsigned long createUniqueIdentifierForRequest(); - virtual void inspectElementAt(const WebPoint& point); - virtual WebString inspectorSettings() const; - virtual void setInspectorSettings(const WebString& settings); - virtual bool inspectorSetting(const WebString& key, WebString* value) const; - virtual void setInspectorSetting(const WebString& key, - const WebString& value); - virtual WebDevToolsAgent* devToolsAgent(); - virtual WebAccessibilityObject accessibilityObject(); - virtual void applyAutoFillSuggestions( - const WebNode&, - const WebVector<WebString>& names, - const WebVector<WebString>& labels, - const WebVector<WebString>& icons, - const WebVector<int>& uniqueIDs, - int separatorIndex); - virtual void hidePopups(); - virtual void setScrollbarColors(unsigned inactiveColor, - unsigned activeColor, - unsigned trackColor); - virtual void setSelectionColors(unsigned activeBackgroundColor, - unsigned activeForegroundColor, - unsigned inactiveBackgroundColor, - unsigned inactiveForegroundColor); - virtual void performCustomContextMenuAction(unsigned action); - - // WebViewImpl - - void setIgnoreInputEvents(bool newValue); - WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get(); } - - const WebPoint& lastMouseDownPoint() const - { - return m_lastMouseDownPoint; - } - - WebCore::Frame* focusedWebCoreFrame(); - - // Returns the currently focused Node or null if no node has focus. - WebCore::Node* focusedWebCoreNode(); - - static WebViewImpl* fromPage(WebCore::Page*); - - WebViewClient* client() - { - return m_client; - } - - // Returns the page object associated with this view. This may be null when - // the page is shutting down, but will be valid at all other times. - WebCore::Page* page() const - { - return m_page.get(); - } - - WebCore::RenderTheme* theme() const; - - // Returns the main frame associated with this view. This may be null when - // the page is shutting down, but will be valid at all other times. - WebFrameImpl* mainFrameImpl(); - - // History related methods: - void setCurrentHistoryItem(WebCore::HistoryItem*); - WebCore::HistoryItem* previousHistoryItem(); - void observeNewNavigation(); - - // Event related methods: - void mouseMove(const WebMouseEvent&); - void mouseLeave(const WebMouseEvent&); - void mouseDown(const WebMouseEvent&); - void mouseUp(const WebMouseEvent&); - void mouseContextMenu(const WebMouseEvent&); - void mouseDoubleClick(const WebMouseEvent&); - bool mouseWheel(const WebMouseWheelEvent&); - bool keyEvent(const WebKeyboardEvent&); - bool charEvent(const WebKeyboardEvent&); - bool touchEvent(const WebTouchEvent&); - - // Handles context menu events orignated via the the keyboard. These - // include the VK_APPS virtual key and the Shift+F10 combine. Code is - // based on the Webkit function bool WebView::handleContextMenuEvent(WPARAM - // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only - // significant change in this function is the code to convert from a - // Keyboard event to the Right Mouse button down event. - bool sendContextMenuEvent(const WebKeyboardEvent&); - - // Notifies the WebView that a load has been committed. isNewNavigation - // will be true if a new session history item should be created for that - // load. - void didCommitLoad(bool* isNewNavigation); - - // Returns true if popup menus should be rendered by the browser, false if - // they should be rendered by WebKit (which is the default). - static bool useExternalPopupMenus(); - - bool contextMenuAllowed() const - { - return m_contextMenuAllowed; - } - - // Set the disposition for how this webview is to be initially shown. - void setInitialNavigationPolicy(WebNavigationPolicy policy) - { - m_initialNavigationPolicy = policy; - } - WebNavigationPolicy initialNavigationPolicy() const - { - return m_initialNavigationPolicy; - } - - // Determines whether a page should e.g. be opened in a background tab. - // Returns false if it has no opinion, in which case it doesn't set *policy. - static bool navigationPolicyFromMouseEvent( - unsigned short button, - bool ctrl, - bool shift, - bool alt, - bool meta, - WebNavigationPolicy*); - - // Start a system drag and drop operation. - void startDragging( - const WebDragData& dragData, - WebDragOperationsMask mask, - const WebImage& dragImage, - const WebPoint& dragImageOffset); - - void autoFillPopupDidHide() - { - m_autoFillPopupShowing = false; - } - -#if ENABLE(NOTIFICATIONS) - // Returns the provider of desktop notifications. - NotificationPresenterImpl* notificationPresenterImpl(); -#endif - - // Tries to scroll a frame or any parent of a frame. Returns true if the view - // was scrolled. - bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity); - - // Notification that a popup was opened/closed. - void popupOpened(WebCore::PopupContainer* popupContainer); - void popupClosed(WebCore::PopupContainer* popupContainer); - - void hideAutoFillPopup(); - - // Returns the input event we're currently processing. This is used in some - // cases where the WebCore DOM event doesn't have the information we need. - static const WebInputEvent* currentInputEvent() - { - return m_currentInputEvent; - } - -#if USE(ACCELERATED_COMPOSITING) - bool allowsAcceleratedCompositing(); - void setRootGraphicsLayer(WebCore::PlatformLayer*); - void setRootLayerNeedsDisplay(); - void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect); - void invalidateRootLayerRect(const WebCore::IntRect&); -#endif - - // Returns the onscreen 3D context used by the compositor. This is - // used by the renderer's code to set up resource sharing between - // the compositor's context and subordinate contexts for APIs like - // WebGL. Returns 0 if compositing support is not compiled in. - virtual WebGraphicsContext3D* graphicsContext3D(); - - WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); } - - // Returns true if the event leads to scrolling. - static bool mapKeyCodeForScroll(int keyCode, - WebCore::ScrollDirection* scrollDirection, - WebCore::ScrollGranularity* scrollGranularity); - - // Called by a full frame plugin inside this view to inform it that its - // zoom level has been updated. The plugin should only call this function - // if the zoom change was triggered by the browser, it's only needed in case - // a plugin can update its own zoom, say because of its own UI. - void fullFramePluginZoomLevelChanged(double zoomLevel); - -private: - friend class WebView; // So WebView::Create can call our constructor - friend class WTF::RefCounted<WebViewImpl>; - - enum DragAction { - DragEnter, - DragOver - }; - - WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devToolsClient); - ~WebViewImpl(); - - // Returns true if the event was actually processed. - bool keyEventDefault(const WebKeyboardEvent&); - - // Returns true if the select popup has consumed the event. - bool selectPopupHandleKeyEvent(const WebKeyboardEvent&); - - // Returns true if the autocomple has consumed the event. - bool autocompleteHandleKeyEvent(const WebKeyboardEvent&); - - // Repaints the AutoFill popup. Should be called when the suggestions - // have changed. Note that this should only be called when the AutoFill - // popup is showing. - void refreshAutoFillPopup(); - - // Returns true if the view was scrolled. - bool scrollViewWithKeyboard(int keyCode, int modifiers); - - void hideSelectPopup(); - - // Converts |pos| from window coordinates to contents coordinates and gets - // the HitTestResult for it. - WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&); - - // Consolidate some common code between starting a drag over a target and - // updating a drag over a target. If we're starting a drag, |isEntering| - // should be true. - WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint, - const WebPoint& screenPoint, - DragAction); - -#if USE(ACCELERATED_COMPOSITING) - void setIsAcceleratedCompositingActive(bool); - void doComposite(); - void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&); - void reallocateRenderer(); -#endif - - WebViewClient* m_client; - - BackForwardListClientImpl m_backForwardListClientImpl; - ChromeClientImpl m_chromeClientImpl; - ContextMenuClientImpl m_contextMenuClientImpl; - DragClientImpl m_dragClientImpl; - EditorClientImpl m_editorClientImpl; - InspectorClientImpl m_inspectorClientImpl; - - WebSize m_size; - - WebPoint m_lastMousePosition; - OwnPtr<WebCore::Page> m_page; - - // This flag is set when a new navigation is detected. It is used to satisfy - // the corresponding argument to WebFrameClient::didCommitProvisionalLoad. - bool m_observedNewNavigation; -#ifndef NDEBUG - // Used to assert that the new navigation we observed is the same navigation - // when we make use of m_observedNewNavigation. - const WebCore::DocumentLoader* m_newNavigationLoader; -#endif - - // An object that can be used to manipulate m_page->settings() without linking - // against WebCore. This is lazily allocated the first time GetWebSettings() - // is called. - OwnPtr<WebSettingsImpl> m_webSettings; - - // A copy of the web drop data object we received from the browser. - RefPtr<WebCore::ChromiumDataObject> m_currentDragData; - - // The point relative to the client area where the mouse was last pressed - // down. This is used by the drag client to determine what was under the - // mouse when the drag was initiated. We need to track this here in - // WebViewImpl since DragClient::startDrag does not pass the position the - // mouse was at when the drag was initiated, only the current point, which - // can be misleading as it is usually not over the element the user actually - // dragged by the time a drag is initiated. - WebPoint m_lastMouseDownPoint; - - // Keeps track of the current zoom level. 0 means no zoom, positive numbers - // mean zoom in, negative numbers mean zoom out. - double m_zoomLevel; - - double m_minimumZoomLevel; - - double m_maximumZoomLevel; - - bool m_contextMenuAllowed; - - bool m_doingDragAndDrop; - - bool m_ignoreInputEvents; - - // Webkit expects keyPress events to be suppressed if the associated keyDown - // event was handled. Safari implements this behavior by peeking out the - // associated WM_CHAR event if the keydown was handled. We emulate - // this behavior by setting this flag if the keyDown was handled. - bool m_suppressNextKeypressEvent; - - // The policy for how this webview is to be initially shown. - WebNavigationPolicy m_initialNavigationPolicy; - - // Represents whether or not this object should process incoming IME events. - bool m_imeAcceptEvents; - - // True while dispatching system drag and drop events to drag/drop targets - // within this WebView. - bool m_dragTargetDispatch; - - // Valid when m_dragTargetDispatch is true; the identity of the drag data - // copied from the WebDropData object sent from the browser process. - int m_dragIdentity; - - // Valid when m_dragTargetDispatch is true. Used to override the default - // browser drop effect with the effects "none" or "copy". - enum DragTargetDropEffect { - DropEffectDefault = -1, - DropEffectNone, - DropEffectCopy - } m_dropEffect; - - // The available drag operations (copy, move link...) allowed by the source. - WebDragOperation m_operationsAllowed; - - // The current drag operation as negotiated by the source and destination. - // When not equal to DragOperationNone, the drag data can be dropped onto the - // current drop target in this WebView (the drop target can accept the drop). - WebDragOperation m_dragOperation; - - // Whether an AutoFill popup is currently showing. - bool m_autoFillPopupShowing; - - // The AutoFill popup client. - OwnPtr<AutoFillPopupMenuClient> m_autoFillPopupClient; - - // The AutoFill popup. - RefPtr<WebCore::PopupContainer> m_autoFillPopup; - - // The popup associated with a select element. - RefPtr<WebCore::PopupContainer> m_selectPopup; - - OwnPtr<WebDevToolsAgentPrivate> m_devToolsAgent; - - // Whether the webview is rendering transparently. - bool m_isTransparent; - - // Whether the user can press tab to focus links. - bool m_tabsToLinks; - - // Inspector settings. - WebString m_inspectorSettings; - - typedef HashMap<WTF::String, WTF::String> SettingsMap; - OwnPtr<SettingsMap> m_inspectorSettingsMap; - OwnPtr<DragScrollTimer> m_dragScrollTimer; - -#if ENABLE(NOTIFICATIONS) - // The provider of desktop notifications; - NotificationPresenterImpl m_notificationPresenter; -#endif - - // If set, the (plugin) node which has mouse capture. - RefPtr<WebCore::Node> m_mouseCaptureNode; - -#if USE(ACCELERATED_COMPOSITING) - WebCore::IntRect m_rootLayerScrollDamage; - RefPtr<WebCore::LayerRendererChromium> m_layerRenderer; - bool m_isAcceleratedCompositingActive; - bool m_compositorCreationFailed; -#endif - static const WebInputEvent* m_currentInputEvent; - -#if ENABLE(INPUT_SPEECH) - OwnPtr<SpeechInputClientImpl> m_speechInputClient; -#endif - // If we attempt to fetch the on-screen GraphicsContext3D before - // the compositor has been turned on, we need to instantiate it - // early. This member holds on to the GC3D in this case. - RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D; - OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy; - -#if ENABLE(CLIENT_BASED_GEOLOCATION) - OwnPtr<GeolocationClientProxy> m_geolocationClientProxy; -#endif -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp deleted file mode 100644 index de4858c..0000000 --- a/WebKit/chromium/src/WebWorkerBase.cpp +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebWorkerBase.h" - -#include "CrossThreadTask.h" -#include "DatabaseTask.h" -#include "MessagePortChannel.h" -#include "PlatformMessagePortChannel.h" - -#include "WebDataSourceImpl.h" -#include "WebFileError.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebMessagePortChannel.h" -#include "WebRuntimeFeatures.h" -#include "WebSettings.h" -#include "WebView.h" -#include "WebWorkerClient.h" - -#include "WorkerContext.h" -#include "WorkerFileSystemCallbacksBridge.h" -#include "WorkerScriptController.h" -#include "WorkerThread.h" -#include <wtf/MainThread.h> - -using namespace WebCore; - -namespace WebKit { - -#if ENABLE(WORKERS) - -static const char allowDatabaseMode[] = "allowDatabaseMode"; -static const char openFileSystemMode[] = "openFileSystemMode"; - -namespace { - -// This class is used to route the result of the WebWorkerBase::allowDatabase -// call back to the worker context. -class AllowDatabaseMainThreadBridge : public ThreadSafeShared<AllowDatabaseMainThreadBridge> { -public: - static PassRefPtr<AllowDatabaseMainThreadBridge> create(WebWorkerBase* worker, const WTF::String& mode, WebCommonWorkerClient* commonClient, WebFrame* frame, const WTF::String& name, const WTF::String& displayName, unsigned long estimatedSize) - { - return adoptRef(new AllowDatabaseMainThreadBridge(worker, mode, commonClient, frame, name, displayName, estimatedSize)); - } - - // These methods are invoked on the worker context. - void cancel() - { - MutexLocker locker(m_mutex); - m_worker = 0; - } - - bool result() - { - return m_result; - } - - // This method is invoked on the main thread. - void signalCompleted(bool result) - { - MutexLocker locker(m_mutex); - if (m_worker) - m_worker->postTaskForModeToWorkerContext(createCallbackTask(&didComplete, this, result), m_mode); - } - -private: - AllowDatabaseMainThreadBridge(WebWorkerBase* worker, const WTF::String& mode, WebCommonWorkerClient* commonClient, WebFrame* frame, const WTF::String& name, const WTF::String& displayName, unsigned long estimatedSize) - : m_worker(worker) - , m_mode(mode) - { - worker->dispatchTaskToMainThread(createCallbackTask(&allowDatabaseTask, commonClient, frame, String(name), String(displayName), estimatedSize, this)); - } - - static void allowDatabaseTask(WebCore::ScriptExecutionContext* context, WebCommonWorkerClient* commonClient, WebFrame* frame, const WTF::String name, const WTF::String displayName, unsigned long estimatedSize, PassRefPtr<AllowDatabaseMainThreadBridge> bridge) - { - if (!commonClient) - bridge->signalCompleted(false); - else - bridge->signalCompleted(commonClient->allowDatabase(frame, name, displayName, estimatedSize)); - } - - static void didComplete(WebCore::ScriptExecutionContext* context, PassRefPtr<AllowDatabaseMainThreadBridge> bridge, bool result) - { - bridge->m_result = result; - } - - bool m_result; - Mutex m_mutex; - WebWorkerBase* m_worker; - WTF::String m_mode; -}; - -} - -// This function is called on the main thread to force to initialize some static -// values used in WebKit before any worker thread is started. This is because in -// our worker processs, we do not run any WebKit code in main thread and thus -// when multiple workers try to start at the same time, we might hit crash due -// to contention for initializing static values. -static void initializeWebKitStaticValues() -{ - static bool initialized = false; - if (!initialized) { - initialized = true; - // Note that we have to pass a URL with valid protocol in order to follow - // the path to do static value initializations. - RefPtr<SecurityOrigin> origin = - SecurityOrigin::create(KURL(ParsedURLString, "http://localhost")); - origin.release(); - } -} - -WebWorkerBase::WebWorkerBase() - : m_webView(0) - , m_askedToTerminate(false) -{ - initializeWebKitStaticValues(); -} - -WebWorkerBase::~WebWorkerBase() -{ - ASSERT(m_webView); - WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame()); - if (webFrame) - webFrame->setClient(0); - m_webView->close(); -} - -void WebWorkerBase::stopWorkerThread() -{ - if (m_askedToTerminate) - return; - m_askedToTerminate = true; - if (m_workerThread) - m_workerThread->stop(); -} - -void WebWorkerBase::initializeLoader(const WebURL& url) -{ - // Create 'shadow page'. This page is never displayed, it is used to proxy the - // loading requests from the worker context to the rest of WebKit and Chromium - // infrastructure. - ASSERT(!m_webView); - m_webView = WebView::create(0, 0); - m_webView->settings()->setOfflineWebApplicationCacheEnabled(WebRuntimeFeatures::isApplicationCacheEnabled()); - m_webView->initializeMainFrame(this); - - WebFrameImpl* webFrame = static_cast<WebFrameImpl*>(m_webView->mainFrame()); - - // Construct substitute data source for the 'shadow page'. We only need it - // to have same origin as the worker so the loading checks work correctly. - CString content(""); - int len = static_cast<int>(content.length()); - RefPtr<SharedBuffer> buf(SharedBuffer::create(content.data(), len)); - SubstituteData substData(buf, String("text/html"), String("UTF-8"), KURL()); - webFrame->frame()->loader()->load(ResourceRequest(url), substData, false); - - // This document will be used as 'loading context' for the worker. - m_loadingDocument = webFrame->frame()->document(); -} - -void WebWorkerBase::dispatchTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task> task) -{ - callOnMainThread(invokeTaskMethod, task.leakPtr()); -} - -void WebWorkerBase::invokeTaskMethod(void* param) -{ - ScriptExecutionContext::Task* task = - static_cast<ScriptExecutionContext::Task*>(param); - task->performTask(0); - delete task; -} - -void WebWorkerBase::didCreateDataSource(WebFrame*, WebDataSource* ds) -{ - // Tell the loader to load the data into the 'shadow page' synchronously, - // so we can grab the resulting Document right after load. - static_cast<WebDataSourceImpl*>(ds)->setDeferMainResourceDataLoad(false); -} - -WebApplicationCacheHost* WebWorkerBase::createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient* appcacheHostClient) -{ - if (commonClient()) - return commonClient()->createApplicationCacheHost(appcacheHostClient); - return 0; -} - -bool WebWorkerBase::allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) -{ - WorkerRunLoop& runLoop = m_workerThread->runLoop(); - WorkerScriptController* controller = WorkerScriptController::controllerForContext(); - WorkerContext* workerContext = controller->workerContext(); - - // Create a unique mode just for this synchronous call. - String mode = allowDatabaseMode; - mode.append(String::number(runLoop.createUniqueId())); - - RefPtr<AllowDatabaseMainThreadBridge> bridge = AllowDatabaseMainThreadBridge::create(this, mode, commonClient(), m_webView->mainFrame(), String(name), String(displayName), estimatedSize); - - // Either the bridge returns, or the queue gets terminated. - if (runLoop.runInMode(workerContext, mode) == MessageQueueTerminated) { - bridge->cancel(); - return false; - } - - return bridge->result(); -} - -#if ENABLE(FILE_SYSTEM) -void WebWorkerBase::openFileSystem(WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks, bool synchronous) -{ - WorkerRunLoop& runLoop = m_workerThread->runLoop(); - WorkerScriptController* controller = WorkerScriptController::controllerForContext(); - WorkerContext* workerContext = controller->workerContext(); - - // Create a unique mode for this openFileSystem call. - String mode = openFileSystemMode; - mode.append(String::number(runLoop.createUniqueId())); - - RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(this, workerContext, callbacks); - bridge->postOpenFileSystemToMainThread(commonClient(), type, size, mode); - - if (synchronous) { - if (runLoop.runInMode(workerContext, mode) == MessageQueueTerminated) - bridge->stop(); - } -} -#endif - -// WorkerObjectProxy ----------------------------------------------------------- - -void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - dispatchTaskToMainThread(createCallbackTask(&postMessageTask, this, - message->toWireString(), channels)); -} - -void WebWorkerBase::postMessageTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - String message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - if (!thisPtr->client()) - return; - - WebMessagePortChannelArray webChannels(channels.get() ? channels->size() : 0); - for (size_t i = 0; i < webChannels.size(); ++i) { - webChannels[i] = (*channels)[i]->channel()->webChannelRelease(); - webChannels[i]->setClient(0); - } - - thisPtr->client()->postMessageToWorkerObject(message, webChannels); -} - -void WebWorkerBase::postExceptionToWorkerObject(const String& errorMessage, - int lineNumber, - const String& sourceURL) -{ - dispatchTaskToMainThread(createCallbackTask(&postExceptionTask, this, - errorMessage, lineNumber, - sourceURL)); -} - -void WebWorkerBase::postExceptionTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - const String& errorMessage, - int lineNumber, const String& sourceURL) -{ - if (!thisPtr->commonClient()) - return; - - thisPtr->commonClient()->postExceptionToWorkerObject(errorMessage, - lineNumber, - sourceURL); -} - -void WebWorkerBase::postConsoleMessageToWorkerObject(MessageSource source, - MessageType type, - MessageLevel level, - const String& message, - int lineNumber, - const String& sourceURL) -{ - dispatchTaskToMainThread(createCallbackTask(&postConsoleMessageTask, this, - source, type, level, - message, lineNumber, sourceURL)); -} - -void WebWorkerBase::postConsoleMessageTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - int source, - int type, int level, - const String& message, - int lineNumber, - const String& sourceURL) -{ - if (!thisPtr->commonClient()) - return; - thisPtr->commonClient()->postConsoleMessageToWorkerObject(source, - type, level, message, - lineNumber, sourceURL); -} - -void WebWorkerBase::confirmMessageFromWorkerObject(bool hasPendingActivity) -{ - dispatchTaskToMainThread(createCallbackTask(&confirmMessageTask, this, - hasPendingActivity)); -} - -void WebWorkerBase::confirmMessageTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - bool hasPendingActivity) -{ - if (!thisPtr->client()) - return; - thisPtr->client()->confirmMessageFromWorkerObject(hasPendingActivity); -} - -void WebWorkerBase::reportPendingActivity(bool hasPendingActivity) -{ - dispatchTaskToMainThread(createCallbackTask(&reportPendingActivityTask, - this, hasPendingActivity)); -} - -void WebWorkerBase::reportPendingActivityTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - bool hasPendingActivity) -{ - if (!thisPtr->client()) - return; - thisPtr->client()->reportPendingActivity(hasPendingActivity); -} - -void WebWorkerBase::workerContextClosed() -{ - dispatchTaskToMainThread(createCallbackTask(&workerContextClosedTask, - this)); -} - -void WebWorkerBase::workerContextClosedTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr) -{ - if (thisPtr->commonClient()) - thisPtr->commonClient()->workerContextClosed(); - - thisPtr->stopWorkerThread(); -} - -void WebWorkerBase::workerContextDestroyed() -{ - dispatchTaskToMainThread(createCallbackTask(&workerContextDestroyedTask, - this)); -} - -void WebWorkerBase::workerContextDestroyedTask(ScriptExecutionContext* context, - WebWorkerBase* thisPtr) -{ - if (thisPtr->commonClient()) - thisPtr->commonClient()->workerContextDestroyed(); - // The lifetime of this proxy is controlled by the worker context. - delete thisPtr; -} - -// WorkerLoaderProxy ----------------------------------------------------------- - -void WebWorkerBase::postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task> task) -{ - ASSERT(m_loadingDocument->isDocument()); - m_loadingDocument->postTask(task); -} - -void WebWorkerBase::postTaskForModeToWorkerContext( - PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode) -{ - m_workerThread->runLoop().postTaskForMode(task, mode); -} - -#endif // ENABLE(WORKERS) - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h deleted file mode 100644 index fe84bf7..0000000 --- a/WebKit/chromium/src/WebWorkerBase.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWorkerBase_h -#define WebWorkerBase_h - -#if ENABLE(WORKERS) - -#include "ScriptExecutionContext.h" -#include "WebFrameClient.h" -#include "WorkerLoaderProxy.h" -#include "WorkerObjectProxy.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { -class WorkerThread; -} - -namespace WebKit { -class WebApplicationCacheHost; -class WebApplicationCacheHostClient; -class WebCommonWorkerClient; -class WebSecurityOrigin; -class WebString; -class WebURL; -class WebView; -class WebWorker; -class WebWorkerClient; - -// Base class for WebSharedWorkerImpl and WebWorkerImpl. It contains common -// code used by both implementation classes, including implementations of the -// WorkerObjectProxy and WorkerLoaderProxy interfaces. -class WebWorkerBase : public WebCore::WorkerObjectProxy - , public WebCore::WorkerLoaderProxy - , public WebFrameClient { -public: - WebWorkerBase(); - virtual ~WebWorkerBase(); - - // WebCore::WorkerObjectProxy methods: - virtual void postMessageToWorkerObject( - PassRefPtr<WebCore::SerializedScriptValue>, - PassOwnPtr<WebCore::MessagePortChannelArray>); - virtual void postExceptionToWorkerObject( - const WTF::String&, int, const WTF::String&); - virtual void postConsoleMessageToWorkerObject( - WebCore::MessageSource, WebCore::MessageType, - WebCore::MessageLevel, const WTF::String&, int, const WTF::String&); - virtual void confirmMessageFromWorkerObject(bool); - virtual void reportPendingActivity(bool); - virtual void workerContextClosed(); - virtual void workerContextDestroyed(); - - // WebCore::WorkerLoaderProxy methods: - virtual void postTaskToLoader(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - virtual void postTaskForModeToWorkerContext( - PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const WTF::String& mode); - - // WebFrameClient methods to support resource loading thru the 'shadow page'. - virtual void didCreateDataSource(WebFrame*, WebDataSource*); - virtual WebApplicationCacheHost* createApplicationCacheHost(WebFrame*, WebApplicationCacheHostClient*); - - // Controls whether access to Web Databases is allowed for this worker. - virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize); - -#if ENABLE(FILE_SYSTEM) - // Requests to open a file system for this worker. (Note that this is not the implementation for WebFrameClient::openFileSystem.) - void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*, bool synchronous); -#endif - - // Executes the given task on the main thread. - static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - -protected: - virtual WebWorkerClient* client() = 0; - virtual WebCommonWorkerClient* commonClient() = 0; - - void setWorkerThread(PassRefPtr<WebCore::WorkerThread> thread) { m_workerThread = thread; } - WebCore::WorkerThread* workerThread() { return m_workerThread.get(); } - - // Shuts down the worker thread. - void stopWorkerThread(); - - // Creates the shadow loader used for worker network requests. - void initializeLoader(const WebURL&); - -private: - // Function used to invoke tasks on the main thread. - static void invokeTaskMethod(void*); - - // Tasks that are run on the main thread. - static void postMessageTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - WTF::String message, - PassOwnPtr<WebCore::MessagePortChannelArray> channels); - static void postExceptionTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - const WTF::String& message, - int lineNumber, - const WTF::String& sourceURL); - static void postConsoleMessageTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - int source, - int type, - int level, - const WTF::String& message, - int lineNumber, - const WTF::String& sourceURL); - static void confirmMessageTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - bool hasPendingActivity); - static void reportPendingActivityTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr, - bool hasPendingActivity); - static void workerContextClosedTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr); - static void workerContextDestroyedTask( - WebCore::ScriptExecutionContext* context, - WebWorkerBase* thisPtr); - - // 'shadow page' - created to proxy loading requests from the worker. - RefPtr<WebCore::ScriptExecutionContext> m_loadingDocument; - WebView* m_webView; - bool m_askedToTerminate; - - RefPtr<WebCore::WorkerThread> m_workerThread; -}; - -} // namespace WebKit - -#endif // ENABLE(WORKERS) - -#endif diff --git a/WebKit/chromium/src/WebWorkerClientImpl.cpp b/WebKit/chromium/src/WebWorkerClientImpl.cpp deleted file mode 100644 index 18282e3..0000000 --- a/WebKit/chromium/src/WebWorkerClientImpl.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebWorkerClientImpl.h" - -#if ENABLE(WORKERS) - -#include "CrossThreadTask.h" -#include "DedicatedWorkerThread.h" -#include "ErrorEvent.h" -#include "Frame.h" -#include "FrameLoaderClient.h" -#include "MessageEvent.h" -#include "MessagePort.h" -#include "MessagePortChannel.h" -#include "ScriptExecutionContext.h" -#include "Worker.h" -#include "WorkerContext.h" -#include "WorkerContextExecutionProxy.h" -#include "WorkerScriptController.h" -#include "WorkerMessagingProxy.h" -#include <wtf/Threading.h> - -#include "FrameLoaderClientImpl.h" -#include "PlatformMessagePortChannel.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebMessagePortChannel.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebViewImpl.h" -#include "WebWorker.h" -#include "WebWorkerImpl.h" - -using namespace WebCore; - -namespace WebKit { - -// When WebKit creates a WorkerContextProxy object, we check if we're in the -// renderer or worker process. If the latter, then we just use -// WorkerMessagingProxy. -// -// If we're in the renderer process, then we need use the glue provided -// WebWorker object to talk to the worker process over IPC. The worker process -// talks to Worker* using WorkerObjectProxy, which we implement on -// WebWorkerClientImpl. -// -// Note that if we're running each worker in a separate process, then nested -// workers end up using the same codepath as the renderer process. - -// static -WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy(Worker* worker) -{ - // Special behavior for multiple workers per process. - // FIXME: v8 doesn't support more than one workers per process. - // if (!worker->scriptExecutionContext()->isDocument()) - // return new WorkerMessagingProxy(worker); - - WebWorker* webWorker = 0; - WebWorkerClientImpl* proxy = new WebWorkerClientImpl(worker); - - if (worker->scriptExecutionContext()->isDocument()) { - Document* document = static_cast<Document*>( - worker->scriptExecutionContext()); - WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); - webWorker = webFrame->client()->createWorker(webFrame, proxy); - } else { - WorkerScriptController* controller = WorkerScriptController::controllerForContext(); - if (!controller) { - ASSERT_NOT_REACHED(); - return 0; - } - - DedicatedWorkerThread* thread = static_cast<DedicatedWorkerThread*>(controller->workerContext()->thread()); - WorkerObjectProxy* workerObjectProxy = &thread->workerObjectProxy(); - WebWorkerImpl* impl = reinterpret_cast<WebWorkerImpl*>(workerObjectProxy); - webWorker = impl->client()->createWorker(proxy); - } - - proxy->setWebWorker(webWorker); - return proxy; -} - -WebWorkerClientImpl::WebWorkerClientImpl(Worker* worker) - : m_scriptExecutionContext(worker->scriptExecutionContext()) - , m_worker(worker) - , m_askedToTerminate(false) - , m_unconfirmedMessageCount(0) - , m_workerContextHadPendingActivity(false) - , m_workerThreadId(currentThread()) -{ -} - -WebWorkerClientImpl::~WebWorkerClientImpl() -{ -} - -void WebWorkerClientImpl::setWebWorker(WebWorker* webWorker) -{ - m_webWorker = webWorker; -} - -void WebWorkerClientImpl::startWorkerContext(const KURL& scriptURL, - const String& userAgent, - const String& sourceCode) -{ - // Worker.terminate() could be called from JS before the context is started. - if (m_askedToTerminate) - return; - if (!isMainThread()) { - WebWorkerBase::dispatchTaskToMainThread(createCallbackTask( - &startWorkerContextTask, - this, - scriptURL.string(), - userAgent, - sourceCode)); - return; - } - m_webWorker->startWorkerContext(scriptURL, userAgent, sourceCode); -} - -void WebWorkerClientImpl::terminateWorkerContext() -{ - if (m_askedToTerminate) - return; - m_askedToTerminate = true; - if (!isMainThread()) { - WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&terminateWorkerContextTask, this)); - return; - } - m_webWorker->terminateWorkerContext(); -} - -void WebWorkerClientImpl::postMessageToWorkerContext( - PassRefPtr<SerializedScriptValue> message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - // Worker.terminate() could be called from JS before the context is started. - if (m_askedToTerminate) - return; - ++m_unconfirmedMessageCount; - if (!isMainThread()) { - WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&postMessageToWorkerContextTask, - this, - message->toWireString(), - channels)); - return; - } - WebMessagePortChannelArray webChannels(channels.get() ? channels->size() : 0); - for (size_t i = 0; i < webChannels.size(); ++i) { - WebMessagePortChannel* webchannel = - (*channels)[i]->channel()->webChannelRelease(); - webchannel->setClient(0); - webChannels[i] = webchannel; - } - m_webWorker->postMessageToWorkerContext(message->toWireString(), webChannels); -} - -bool WebWorkerClientImpl::hasPendingActivity() const -{ - return !m_askedToTerminate - && (m_unconfirmedMessageCount || m_workerContextHadPendingActivity); -} - -void WebWorkerClientImpl::workerObjectDestroyed() -{ - if (isMainThread()) { - m_webWorker->workerObjectDestroyed(); - m_worker = 0; - } - // Even if this is called on the main thread, there could be a queued task for - // this object, so don't delete it right away. - WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&workerObjectDestroyedTask, - this)); -} - -void WebWorkerClientImpl::postMessageToWorkerObject(const WebString& message, - const WebMessagePortChannelArray& channels) -{ - OwnPtr<MessagePortChannelArray> channels2; - if (channels.size()) { - channels2 = new MessagePortChannelArray(channels.size()); - for (size_t i = 0; i < channels.size(); ++i) { - RefPtr<PlatformMessagePortChannel> platform_channel = - PlatformMessagePortChannel::create(channels[i]); - channels[i]->setClient(platform_channel.get()); - (*channels2)[i] = MessagePortChannel::create(platform_channel); - } - } - - if (currentThread() != m_workerThreadId) { - m_scriptExecutionContext->postTask(createCallbackTask(&postMessageToWorkerObjectTask, - this, - String(message), - channels2.release())); - return; - } - - postMessageToWorkerObjectTask(m_scriptExecutionContext.get(), this, - message, channels2.release()); -} - -void WebWorkerClientImpl::postExceptionToWorkerObject(const WebString& errorMessage, - int lineNumber, - const WebString& sourceURL) -{ - if (currentThread() != m_workerThreadId) { - m_scriptExecutionContext->postTask(createCallbackTask(&postExceptionToWorkerObjectTask, - this, - String(errorMessage), - lineNumber, - String(sourceURL))); - return; - } - - bool unhandled = m_worker->dispatchEvent(ErrorEvent::create(errorMessage, - sourceURL, - lineNumber)); - if (unhandled) - m_scriptExecutionContext->reportException(errorMessage, lineNumber, sourceURL); -} - -void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int destination, - int sourceId, - int messageType, - int messageLevel, - const WebString& message, - int lineNumber, - const WebString& sourceURL) -{ - if (currentThread() != m_workerThreadId) { - m_scriptExecutionContext->postTask(createCallbackTask(&postConsoleMessageToWorkerObjectTask, - this, - sourceId, - messageType, - messageLevel, - String(message), - lineNumber, - String(sourceURL))); - return; - } - - m_scriptExecutionContext->addMessage(static_cast<MessageSource>(sourceId), - static_cast<MessageType>(messageType), - static_cast<MessageLevel>(messageLevel), - String(message), lineNumber, - String(sourceURL)); -} - -void WebWorkerClientImpl::postConsoleMessageToWorkerObject(int sourceId, - int messageType, - int messageLevel, - const WebString& message, - int lineNumber, - const WebString& sourceURL) -{ - postConsoleMessageToWorkerObject(0, sourceId, messageType, messageLevel, message, lineNumber, sourceURL); -} - -void WebWorkerClientImpl::confirmMessageFromWorkerObject(bool hasPendingActivity) -{ - // unconfirmed_message_count_ can only be updated on the thread where it's - // accessed. Otherwise there are race conditions with v8's garbage - // collection. - m_scriptExecutionContext->postTask(createCallbackTask(&confirmMessageFromWorkerObjectTask, - this)); -} - -void WebWorkerClientImpl::reportPendingActivity(bool hasPendingActivity) -{ - // See above comment in confirmMessageFromWorkerObject. - m_scriptExecutionContext->postTask(createCallbackTask(&reportPendingActivityTask, - this, - hasPendingActivity)); -} - -void WebWorkerClientImpl::workerContextDestroyed() -{ -} - -void WebWorkerClientImpl::workerContextClosed() -{ -} - -void WebWorkerClientImpl::startWorkerContextTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const String& scriptURL, - const String& userAgent, - const String& sourceCode) -{ - thisPtr->m_webWorker->startWorkerContext(KURL(ParsedURLString, scriptURL), - userAgent, sourceCode); -} - -void WebWorkerClientImpl::terminateWorkerContextTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr) -{ - thisPtr->m_webWorker->terminateWorkerContext(); -} - -void WebWorkerClientImpl::postMessageToWorkerContextTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const String& message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - WebMessagePortChannelArray webChannels(channels.get() ? channels->size() : 0); - - for (size_t i = 0; i < webChannels.size(); ++i) { - webChannels[i] = (*channels)[i]->channel()->webChannelRelease(); - webChannels[i]->setClient(0); - } - - thisPtr->m_webWorker->postMessageToWorkerContext(message, webChannels); -} - -void WebWorkerClientImpl::workerObjectDestroyedTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr) -{ - if (thisPtr->m_worker) // Check we haven't alread called this. - thisPtr->m_webWorker->workerObjectDestroyed(); - delete thisPtr; -} - -void WebWorkerClientImpl::postMessageToWorkerObjectTask( - ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const String& message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - - if (thisPtr->m_worker) { - OwnPtr<MessagePortArray> ports = - MessagePort::entanglePorts(*context, channels); - RefPtr<SerializedScriptValue> serializedMessage = - SerializedScriptValue::createFromWire(message); - thisPtr->m_worker->dispatchEvent(MessageEvent::create(ports.release(), - serializedMessage.release())); - } -} - -void WebWorkerClientImpl::postExceptionToWorkerObjectTask( - ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const String& errorMessage, - int lineNumber, - const String& sourceURL) -{ - bool handled = false; - if (thisPtr->m_worker) - handled = thisPtr->m_worker->dispatchEvent(ErrorEvent::create(errorMessage, - sourceURL, - lineNumber)); - if (!handled) - thisPtr->m_scriptExecutionContext->reportException(errorMessage, - lineNumber, - sourceURL); -} - -void WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - int sourceId, - int messageType, - int messageLevel, - const String& message, - int lineNumber, - const String& sourceURL) -{ - thisPtr->m_scriptExecutionContext->addMessage(static_cast<MessageSource>(sourceId), - static_cast<MessageType>(messageType), - static_cast<MessageLevel>(messageLevel), - message, lineNumber, - sourceURL); -} - -void WebWorkerClientImpl::confirmMessageFromWorkerObjectTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr) -{ - thisPtr->m_unconfirmedMessageCount--; -} - -void WebWorkerClientImpl::reportPendingActivityTask(ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - bool hasPendingActivity) -{ - thisPtr->m_workerContextHadPendingActivity = hasPendingActivity; -} - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h deleted file mode 100644 index 0604823..0000000 --- a/WebKit/chromium/src/WebWorkerClientImpl.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWorkerClientImpl_h -#define WebWorkerClientImpl_h - -#if ENABLE(WORKERS) - -#include "WebFileSystem.h" -#include "WebWorkerClient.h" -#include "WorkerContextProxy.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/RefPtr.h> - -namespace WebCore { -class ScriptExecutionContext; -} - -namespace WebKit { -class WebWorker; - -// The purpose of this class is to provide a WorkerContextProxy -// implementation that we can give to WebKit. Internally, it converts the -// data types to Chrome compatible ones so that renderer code can use it over -// IPC. -class WebWorkerClientImpl : public WebCore::WorkerContextProxy - , public WebWorkerClient { -public: - WebWorkerClientImpl(WebCore::Worker*); - - // WebCore::WorkerContextProxy Factory. - static WebCore::WorkerContextProxy* createWorkerContextProxy(WebCore::Worker*); - void setWebWorker(WebWorker*); - - // WebCore::WorkerContextProxy methods: - // These are called on the thread that created the worker. In the renderer - // process, this will be the main WebKit thread. In the worker process, this - // will be the thread of the executing worker (not the main WebKit thread). - virtual void startWorkerContext(const WebCore::KURL&, - const WTF::String&, - const WTF::String&); - virtual void terminateWorkerContext(); - virtual void postMessageToWorkerContext( - PassRefPtr<WebCore::SerializedScriptValue> message, - PassOwnPtr<WebCore::MessagePortChannelArray> channels); - virtual bool hasPendingActivity() const; - virtual void workerObjectDestroyed(); - - // WebWorkerClient methods: - // These are called on the main WebKit thread. - virtual void postMessageToWorkerObject(const WebString&, const WebMessagePortChannelArray&); - virtual void postExceptionToWorkerObject(const WebString&, int, const WebString&); - - // FIXME: the below is for compatibility only and should be - // removed once Chromium is updated to remove message - // destination parameter <http://webkit.org/b/37155>. - virtual void postConsoleMessageToWorkerObject(int, int, int, int, const WebString&, int, const WebString&); - virtual void postConsoleMessageToWorkerObject(int, int, int, const WebString&, int, const WebString&); - virtual void confirmMessageFromWorkerObject(bool); - virtual void reportPendingActivity(bool); - virtual void workerContextClosed(); - virtual void workerContextDestroyed(); - virtual WebWorker* createWorker(WebWorkerClient*) { return 0; } - virtual WebNotificationPresenter* notificationPresenter() - { - // FIXME: Notifications not yet supported in workers. - return 0; - } - virtual WebApplicationCacheHost* createApplicationCacheHost(WebApplicationCacheHostClient*) { return 0; } - virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) - { - ASSERT_NOT_REACHED(); - return true; - } - virtual void openFileSystem(WebFrame*, WebFileSystem::Type, long long size, WebFileSystemCallbacks*) - { - ASSERT_NOT_REACHED(); - } - -private: - virtual ~WebWorkerClientImpl(); - - // Methods used to support WebWorkerClientImpl being constructed on worker - // threads. - // These tasks are dispatched on the WebKit thread. - static void startWorkerContextTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const WTF::String& scriptURL, - const WTF::String& userAgent, - const WTF::String& sourceCode); - static void terminateWorkerContextTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr); - static void postMessageToWorkerContextTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const WTF::String& message, - PassOwnPtr<WebCore::MessagePortChannelArray> channels); - static void workerObjectDestroyedTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr); - - // These tasks are dispatched on the thread that created the worker (i.e. - // main WebKit thread in renderer process, and the worker thread in the - // worker process). - static void postMessageToWorkerObjectTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const WTF::String& message, - PassOwnPtr<WebCore::MessagePortChannelArray> channels); - static void postExceptionToWorkerObjectTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - const WTF::String& message, - int lineNumber, - const WTF::String& sourceURL); - static void postConsoleMessageToWorkerObjectTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - int sourceId, - int messageType, - int messageLevel, - const WTF::String& message, - int lineNumber, - const WTF::String& sourceURL); - static void confirmMessageFromWorkerObjectTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr); - static void reportPendingActivityTask(WebCore::ScriptExecutionContext* context, - WebWorkerClientImpl* thisPtr, - bool hasPendingActivity); - - // Guard against context from being destroyed before a worker exits. - RefPtr<WebCore::ScriptExecutionContext> m_scriptExecutionContext; - - WebCore::Worker* m_worker; - WebWorker* m_webWorker; - bool m_askedToTerminate; - unsigned m_unconfirmedMessageCount; - bool m_workerContextHadPendingActivity; - ThreadIdentifier m_workerThreadId; -}; - -} // namespace WebKit; - -#endif // ENABLE(WORKERS) - -#endif diff --git a/WebKit/chromium/src/WebWorkerImpl.cpp b/WebKit/chromium/src/WebWorkerImpl.cpp deleted file mode 100644 index 165af68..0000000 --- a/WebKit/chromium/src/WebWorkerImpl.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebWorkerImpl.h" - -#include "CrossThreadTask.h" -#include "DedicatedWorkerContext.h" -#include "DedicatedWorkerThread.h" -#include "KURL.h" -#include "MessageEvent.h" -#include "MessagePort.h" -#include "MessagePortChannel.h" -#include "ScriptExecutionContext.h" -#include "SecurityOrigin.h" -#include "SerializedScriptValue.h" -#include "SubstituteData.h" -#include <wtf/Threading.h> - -#include "PlatformMessagePortChannel.h" -#include "WebMessagePortChannel.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebWorkerClient.h" - -using namespace WebCore; - -namespace WebKit { - -#if ENABLE(WORKERS) - -WebWorker* WebWorker::create(WebWorkerClient* client) -{ - return new WebWorkerImpl(client); -} - - -WebWorkerImpl::WebWorkerImpl(WebWorkerClient* client) - : m_client(client) -{ -} - -WebWorkerImpl::~WebWorkerImpl() -{ -} - -WebCommonWorkerClient* WebWorkerImpl::commonClient() -{ - return m_client; -} - -void WebWorkerImpl::postMessageToWorkerContextTask(WebCore::ScriptExecutionContext* context, - WebWorkerImpl* thisPtr, - const String& message, - PassOwnPtr<MessagePortChannelArray> channels) -{ - ASSERT(context->isWorkerContext()); - DedicatedWorkerContext* workerContext = - static_cast<DedicatedWorkerContext*>(context); - - OwnPtr<MessagePortArray> ports = - MessagePort::entanglePorts(*context, channels); - RefPtr<SerializedScriptValue> serializedMessage = - SerializedScriptValue::createFromWire(message); - workerContext->dispatchEvent(MessageEvent::create( - ports.release(), serializedMessage.release())); - thisPtr->confirmMessageFromWorkerObject(workerContext->hasPendingActivity()); -} - -// WebWorker ------------------------------------------------------------------- - -void WebWorkerImpl::startWorkerContext(const WebURL& scriptUrl, - const WebString& userAgent, - const WebString& sourceCode) -{ - initializeLoader(scriptUrl); - setWorkerThread(DedicatedWorkerThread::create(scriptUrl, userAgent, - sourceCode, *this, *this)); - // Worker initialization means a pending activity. - reportPendingActivity(true); - workerThread()->start(); -} - -void WebWorkerImpl::terminateWorkerContext() -{ - stopWorkerThread(); -} - -void WebWorkerImpl::postMessageToWorkerContext(const WebString& message, - const WebMessagePortChannelArray& webChannels) -{ - OwnPtr<MessagePortChannelArray> channels; - if (webChannels.size()) { - channels = new MessagePortChannelArray(webChannels.size()); - for (size_t i = 0; i < webChannels.size(); ++i) { - RefPtr<PlatformMessagePortChannel> platform_channel = - PlatformMessagePortChannel::create(webChannels[i]); - webChannels[i]->setClient(platform_channel.get()); - (*channels)[i] = MessagePortChannel::create(platform_channel); - } - } - - workerThread()->runLoop().postTask( - createCallbackTask(&postMessageToWorkerContextTask, - this, String(message), channels.release())); -} - -void WebWorkerImpl::workerObjectDestroyed() -{ - // Worker object in the renderer was destroyed, perhaps a result of GC. - // For us, it's a signal to start terminating the WorkerContext too. - // FIXME: when 'kill a worker' html5 spec algorithm is implemented, it - // should be used here instead of 'terminate a worker'. - terminateWorkerContext(); -} - -void WebWorkerImpl::clientDestroyed() -{ - m_client = 0; -} - -#else - -WebWorker* WebWorker::create(WebWorkerClient* client) -{ - return 0; -} - -#endif // ENABLE(WORKERS) - -} // namespace WebKit diff --git a/WebKit/chromium/src/WebWorkerImpl.h b/WebKit/chromium/src/WebWorkerImpl.h deleted file mode 100644 index d2fd016..0000000 --- a/WebKit/chromium/src/WebWorkerImpl.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebWorkerImpl_h -#define WebWorkerImpl_h - -#include "WebWorker.h" - -#if ENABLE(WORKERS) - -#include "ScriptExecutionContext.h" - -#include "WebWorkerBase.h" - -namespace WebKit { -class WebView; - -// This class is used by the worker process code to talk to the WebCore::Worker -// implementation. It can't use it directly since it uses WebKit types, so this -// class converts the data types. When the WebCore::Worker object wants to call -// WebCore::WorkerObjectProxy, this class will conver to Chrome data types first -// and then call the supplied WebWorkerClient. -class WebWorkerImpl : public WebWorkerBase, public WebWorker { -public: - explicit WebWorkerImpl(WebWorkerClient* client); - - // WebWorker methods: - virtual void startWorkerContext(const WebURL&, const WebString&, const WebString&); - virtual void terminateWorkerContext(); - virtual void postMessageToWorkerContext(const WebString&, const WebMessagePortChannelArray&); - virtual void workerObjectDestroyed(); - virtual void clientDestroyed(); - - // WebWorkerBase methods: - virtual WebWorkerClient* client() { return m_client; } - virtual WebCommonWorkerClient* commonClient(); - -private: - virtual ~WebWorkerImpl(); - - // Tasks that are run on the worker thread. - static void postMessageToWorkerContextTask( - WebCore::ScriptExecutionContext* context, - WebWorkerImpl* thisPtr, - const WTF::String& message, - PassOwnPtr<WebCore::MessagePortChannelArray> channels); - - WebWorkerClient* m_client; - -}; - -} // namespace WebKit - -#endif // ENABLE(WORKERS) - -#endif diff --git a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp deleted file mode 100644 index 058e947..0000000 --- a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WorkerAsyncFileSystemChromium.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystemCallbacks.h" -#include "FileMetadata.h" -#include "FileSystem.h" -#include "NotImplemented.h" -#include "WebFileSystem.h" -#include "WebFileSystemCallbacksImpl.h" -#include "WebFileWriter.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebWorkerBase.h" -#include "WorkerAsyncFileWriterChromium.h" -#include "WorkerContext.h" -#include "WorkerFileSystemCallbacksBridge.h" -#include "WorkerScriptController.h" -#include "WorkerThread.h" -#include <wtf/text/CString.h> - -using namespace WebKit; - -namespace WebCore { - -static const char fileSystemOperationsMode[] = "fileSystemOperationsMode"; - -WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, const String& rootPath, bool synchronous) - : AsyncFileSystem(rootPath) - , m_scriptExecutionContext(context) - , m_webFileSystem(WebKit::webKitClient()->fileSystem()) - , m_workerContext(static_cast<WorkerContext*>(context)) - , m_synchronous(synchronous) -{ - ASSERT(m_webFileSystem); - ASSERT(m_scriptExecutionContext->isWorkerContext()); - - WorkerLoaderProxy* workerLoaderProxy = &m_workerContext->thread()->workerLoaderProxy(); - m_worker = static_cast<WebWorkerBase*>(workerLoaderProxy); -} - -WorkerAsyncFileSystemChromium::~WorkerAsyncFileSystemChromium() -{ -} - -bool WorkerAsyncFileSystemChromium::waitForOperationToComplete() -{ - if (!m_bridgeForCurrentOperation.get()) - return false; - - RefPtr<WorkerFileSystemCallbacksBridge> bridge = m_bridgeForCurrentOperation.release(); - if (m_workerContext->thread()->runLoop().runInMode(m_workerContext, m_modeForCurrentOperation) == MessageQueueTerminated) { - bridge->stop(); - return false; - } - return true; -} - -void WorkerAsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postMoveToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postCopyToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveRecursivelyToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postCreateFileToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postCreateDirectoryToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postFileExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postDirectoryExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -void WorkerAsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(callbacks)->postReadDirectoryToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -class WorkerFileWriterHelperCallbacks : public AsyncFileSystemCallbacks { -public: - static PassOwnPtr<WorkerFileWriterHelperCallbacks> create(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext) - { - return adoptPtr(new WorkerFileWriterHelperCallbacks(client, path, webFileSystem, callbacks, workerContext)); - } - - virtual void didSucceed() - { - ASSERT_NOT_REACHED(); - } - - virtual void didReadMetadata(const FileMetadata& metadata) - { - ASSERT(m_callbacks); - if (metadata.type != FileMetadata::TypeFile || metadata.length < 0) - m_callbacks->didFail(WebKit::WebFileErrorInvalidState); - else { - OwnPtr<WorkerAsyncFileWriterChromium> asyncFileWriterChromium = WorkerAsyncFileWriterChromium::create(m_webFileSystem, m_path, m_workerContext, m_client, WorkerAsyncFileWriterChromium::Asynchronous); - m_callbacks->didCreateFileWriter(asyncFileWriterChromium.release(), metadata.length); - } - } - - virtual void didReadDirectoryEntry(const String& name, bool isDirectory) - { - ASSERT_NOT_REACHED(); - } - - virtual void didReadDirectoryEntries(bool hasMore) - { - ASSERT_NOT_REACHED(); - } - - virtual void didOpenFileSystem(const String&, PassOwnPtr<AsyncFileSystem>) - { - ASSERT_NOT_REACHED(); - } - - // Called when an AsyncFileWrter has been created successfully. - virtual void didCreateFileWriter(PassOwnPtr<AsyncFileWriter>, long long) - { - ASSERT_NOT_REACHED(); - } - - virtual void didFail(int code) - { - ASSERT(m_callbacks); - m_callbacks->didFail(code); - } - -private: - WorkerFileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext) - : m_client(client) - , m_path(path) - , m_webFileSystem(webFileSystem) - , m_callbacks(callbacks) - , m_workerContext(workerContext) - { - } - - AsyncFileWriterClient* m_client; - String m_path; - WebKit::WebFileSystem* m_webFileSystem; - OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; - WorkerContext* m_workerContext; -}; - -void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::create(client, path, m_webFileSystem, callbacks, m_workerContext))->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); -} - -PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks) -{ - ASSERT(!m_synchronous || !m_bridgeForCurrentOperation.get()); - - m_modeForCurrentOperation = fileSystemOperationsMode; - m_modeForCurrentOperation.append(String::number(m_workerContext->thread()->runLoop().createUniqueId())); - - m_bridgeForCurrentOperation = WorkerFileSystemCallbacksBridge::create(m_worker, m_scriptExecutionContext, new WebKit::WebFileSystemCallbacksImpl(callbacks)); - return m_bridgeForCurrentOperation; -} - -} // namespace WebCore - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h deleted file mode 100644 index 0b4b708..0000000 --- a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WorkerAsyncFileSystemChromium_h -#define WorkerAsyncFileSystemChromium_h - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystem.h" -#include "PlatformString.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/RefPtr.h> - -namespace WebKit { -class WebFileSystem; -class WebWorkerBase; -class WorkerFileSystemCallbacksBridge; -} - -namespace WebCore { - -class AsyncFileSystemCallbacks; -class ScriptExecutionContext; -class WorkerContext; - -class WorkerAsyncFileSystemChromium : public AsyncFileSystem { -public: - static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, const String& rootPath, bool synchronous) - { - return adoptPtr(new WorkerAsyncFileSystemChromium(context, rootPath, synchronous)); - } - - virtual ~WorkerAsyncFileSystemChromium(); - - // Runs one pending operation (to wait for completion in the sync-mode). - virtual bool waitForOperationToComplete(); - - virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>); - -private: - WorkerAsyncFileSystemChromium(ScriptExecutionContext*, const String& rootPath, bool synchronous); - - PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>); - - ScriptExecutionContext* m_scriptExecutionContext; - WebKit::WebFileSystem* m_webFileSystem; - WebKit::WebWorkerBase* m_worker; - WorkerContext* m_workerContext; - RefPtr<WebKit::WorkerFileSystemCallbacksBridge> m_bridgeForCurrentOperation; - String m_modeForCurrentOperation; - bool m_synchronous; -}; - -} // namespace WebCore - -#endif // ENABLE(FILE_SYSTEM) - -#endif // WorkerAsyncFileSystemChromium_h diff --git a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp deleted file mode 100644 index 0d0ac8b..0000000 --- a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WorkerAsyncFileWriterChromium.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileSystem.h" -#include "Blob.h" -#include "ScriptExecutionContext.h" -#include "WebFileSystem.h" -#include "WebFileWriter.h" -#include "WebURL.h" -#include "WebWorkerBase.h" -#include "WorkerContext.h" -#include "WorkerFileWriterCallbacksBridge.h" -#include "WorkerLoaderProxy.h" -#include "WorkerThread.h" -#include <wtf/Assertions.h> - -using namespace WebKit; - -namespace WebCore { - -WorkerAsyncFileWriterChromium::WorkerAsyncFileWriterChromium(WebFileSystem* webFileSystem, const String& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type) - : m_type(type) -{ - ASSERT(m_type == Asynchronous); // Synchronous is not implemented yet. - - WorkerLoaderProxy* proxy = &workerContext->thread()->workerLoaderProxy(); - m_bridge = WorkerFileWriterCallbacksBridge::create(path, proxy, workerContext, client); -} - -WorkerAsyncFileWriterChromium::~WorkerAsyncFileWriterChromium() -{ - m_bridge->postShutdownToMainThread(m_bridge); -} - -bool WorkerAsyncFileWriterChromium::waitForOperationToComplete() -{ - return m_bridge->waitForOperationToComplete(); -} - -void WorkerAsyncFileWriterChromium::write(long long position, Blob* data) -{ - m_bridge->postWriteToMainThread(position, data->url()); -} - -void WorkerAsyncFileWriterChromium::truncate(long long length) -{ - m_bridge->postTruncateToMainThread(length); -} - -void WorkerAsyncFileWriterChromium::abort() -{ - m_bridge->postAbortToMainThread(); -} - -} - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h b/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h deleted file mode 100644 index 01058c3..0000000 --- a/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WorkerAsyncFileWriterChromium_h -#define WorkerAsyncFileWriterChromium_h - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileWriter.h" -#include <wtf/PassOwnPtr.h> - -namespace WebKit { - class WebFileSystem; - class WebFileWriter; - class WorkerFileWriterCallbacksBridge; -} - -namespace WTF { - class String; -} -using WTF::String; - -namespace WebCore { - -class AsyncFileSystem; -class AsyncFileWriterClient; -class Blob; -class WorkerContext; - -class WorkerAsyncFileWriterChromium : public AsyncFileWriter { -public: - enum WriterType { - Asynchronous, - Synchronous, - }; - - static PassOwnPtr<WorkerAsyncFileWriterChromium> create(WebKit::WebFileSystem* webFileSystem, const String& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type) - { - return adoptPtr(new WorkerAsyncFileWriterChromium(webFileSystem, path, workerContext, client, type)); - } - ~WorkerAsyncFileWriterChromium(); - - bool waitForOperationToComplete(); - - // FileWriter - virtual void write(long long position, Blob* data); - virtual void truncate(long long length); - virtual void abort(); - -private: - - WorkerAsyncFileWriterChromium(WebKit::WebFileSystem*, const String& path, WorkerContext*, AsyncFileWriterClient*, WriterType); - RefPtr<WebKit::WorkerFileWriterCallbacksBridge> m_bridge; - WriterType m_type; -}; - -} // namespace - -#endif // ENABLE(FILE_SYSTEM) - -#endif // AsyncFileWriterChromium_h diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp deleted file mode 100644 index 6c31221..0000000 --- a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WorkerFileSystemCallbacksBridge.h" - -#if ENABLE(FILE_SYSTEM) - -#include "CrossThreadTask.h" -#include "WebCommonWorkerClient.h" -#include "WebFileInfo.h" -#include "WebFileSystemCallbacks.h" -#include "WebFileSystemEntry.h" -#include "WebString.h" -#include "WebWorkerBase.h" -#include "WorkerContext.h" -#include "WorkerScriptController.h" -#include "WorkerThread.h" -#include <wtf/MainThread.h> -#include <wtf/Threading.h> - -namespace WebCore { - -template<> struct CrossThreadCopierBase<false, false, WebKit::WebFileInfo> { - typedef WebKit::WebFileInfo Type; - static Type copy(const WebKit::WebFileInfo& info) - { - // Perform per-field copy to make sure we don't do any (unexpected) non-thread safe copy here. - struct WebKit::WebFileInfo newInfo; - newInfo.modificationTime = info.modificationTime; - newInfo.length = info.length; - newInfo.type = info.type; - return newInfo; - } -}; - -template<> struct CrossThreadCopierBase<false, false, WebKit::WebVector<WebKit::WebFileSystemEntry> > { - typedef WebKit::WebVector<WebKit::WebFileSystemEntry> Type; - static Type copy(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries) - { - WebKit::WebVector<WebKit::WebFileSystemEntry> newEntries(entries.size()); - for (size_t i = 0; i < entries.size(); ++i) { - String name = entries[i].name; - newEntries[i].isDirectory = entries[i].isDirectory; - newEntries[i].name = name.crossThreadString(); - } - return newEntries; - } -}; - -} - -using namespace WebCore; - -namespace WebKit { - -// FileSystemCallbacks that are to be dispatched on the main thread. -class MainThreadFileSystemCallbacks : public WebFileSystemCallbacks { -public: - // Callbacks are self-destructed and we always return leaked pointer here. - static MainThreadFileSystemCallbacks* createLeakedPtr(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode) - { - OwnPtr<MainThreadFileSystemCallbacks> callbacks = adoptPtr(new MainThreadFileSystemCallbacks(bridge, mode)); - return callbacks.leakPtr(); - } - - virtual ~MainThreadFileSystemCallbacks() - { - } - - virtual void didOpenFileSystem(const WebString& name, const WebString& path) - { - m_bridge->didOpenFileSystemOnMainThread(name, path, m_mode); - delete this; - } - - virtual void didFail(WebFileError error) - { - m_bridge->didFailOnMainThread(error, m_mode); - delete this; - } - - virtual void didSucceed() - { - m_bridge->didSucceedOnMainThread(m_mode); - delete this; - } - - virtual void didReadMetadata(const WebFileInfo& info) - { - m_bridge->didReadMetadataOnMainThread(info, m_mode); - delete this; - } - - virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore) - { - m_bridge->didReadDirectoryOnMainThread(entries, hasMore, m_mode); - delete this; - } - -private: - MainThreadFileSystemCallbacks(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode) - : m_bridge(bridge) - , m_mode(mode) - { - ASSERT(m_bridge.get()); - } - - friend class WorkerFileSystemCallbacksBridge; - RefPtr<WorkerFileSystemCallbacksBridge> m_bridge; - const String m_mode; -}; - -void WorkerFileSystemCallbacksBridge::stop() -{ - ASSERT(m_workerContext->isContextThread()); - MutexLocker locker(m_mutex); - m_worker = 0; - - if (m_callbacksOnWorkerThread) { - m_callbacksOnWorkerThread->didFail(WebFileErrorAbort); - m_callbacksOnWorkerThread = 0; - } -} - -void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, const String& mode) -{ - dispatchTaskToMainThread(createCallbackTask(&openFileSystemOnMainThread, commonClient, type, size, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postMoveToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode) -{ - dispatchTaskToMainThread(createCallbackTask(&moveOnMainThread, fileSystem, sourcePath, destinationPath, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postCopyToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode) -{ - dispatchTaskToMainThread(createCallbackTask(©OnMainThread, fileSystem, sourcePath, destinationPath, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postRemoveToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&removeOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&removeRecursivelyOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postReadMetadataToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&readMetadataOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postCreateFileToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode) -{ - dispatchTaskToMainThread(createCallbackTask(&createFileOnMainThread, fileSystem, path, exclusive, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postCreateDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&createDirectoryOnMainThread, fileSystem, path, exclusive, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postFileExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&fileExistsOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postDirectoryExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&directoryExistsOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::postReadDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode) -{ - ASSERT(fileSystem); - dispatchTaskToMainThread(createCallbackTask(&readDirectoryOnMainThread, fileSystem, path, this, mode)); -} - -void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - if (!commonClient) - bridge->didFailOnMainThread(WebFileErrorAbort, mode); - else { - commonClient->openFileSystem(type, size, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); - } -} - -void WorkerFileSystemCallbacksBridge::moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->move(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->copy(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->remove(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->removeRecursively(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->readMetadata(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->createFile(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->createDirectory(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->fileExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->directoryExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) -{ - fileSystem->readDirectory(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); -} - -void WorkerFileSystemCallbacksBridge::didFailOnMainThread(WebFileError error, const String& mode) -{ - mayPostTaskToWorker(createCallbackTask(&didFailOnWorkerThread, this, error), mode); -} - -void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode) -{ - mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, this, name, rootPath), mode); -} - -void WorkerFileSystemCallbacksBridge::didSucceedOnMainThread(const String& mode) -{ - mayPostTaskToWorker(createCallbackTask(&didSucceedOnWorkerThread, this), mode); -} - -void WorkerFileSystemCallbacksBridge::didReadMetadataOnMainThread(const WebFileInfo& info, const String& mode) -{ - mayPostTaskToWorker(createCallbackTask(&didReadMetadataOnWorkerThread, this, info), mode); -} - -void WorkerFileSystemCallbacksBridge::didReadDirectoryOnMainThread(const WebVector<WebFileSystemEntry>& entries, bool hasMore, const String& mode) -{ - mayPostTaskToWorker(createCallbackTask(&didReadDirectoryOnWorkerThread, this, entries, hasMore), mode); -} - -WorkerFileSystemCallbacksBridge::WorkerFileSystemCallbacksBridge(WebWorkerBase* worker, ScriptExecutionContext* scriptExecutionContext, WebFileSystemCallbacks* callbacks) - : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext)) - , m_worker(worker) - , m_workerContext(scriptExecutionContext) - , m_callbacksOnWorkerThread(callbacks) -{ - ASSERT(m_workerContext->isContextThread()); -} - -WorkerFileSystemCallbacksBridge::~WorkerFileSystemCallbacksBridge() -{ - ASSERT(!m_callbacksOnWorkerThread); -} - -void WorkerFileSystemCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, WebFileError error) -{ - bridge->m_callbacksOnWorkerThread->didFail(error); -} - -void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const String& name, const String& rootPath) -{ - bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootPath); -} - -void WorkerFileSystemCallbacksBridge::didSucceedOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge) -{ - bridge->m_callbacksOnWorkerThread->didSucceed(); -} - -void WorkerFileSystemCallbacksBridge::didReadMetadataOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const WebFileInfo& info) -{ - bridge->m_callbacksOnWorkerThread->didReadMetadata(info); -} - -void WorkerFileSystemCallbacksBridge::didReadDirectoryOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const WebVector<WebFileSystemEntry>& entries, bool hasMore) -{ - bridge->m_callbacksOnWorkerThread->didReadDirectory(entries, hasMore); -} - -bool WorkerFileSystemCallbacksBridge::derefIfWorkerIsStopped() -{ - WebWorkerBase* worker = 0; - { - MutexLocker locker(m_mutex); - worker = m_worker; - } - - if (!worker) { - m_selfRef.clear(); - return true; - } - return false; -} - -void WorkerFileSystemCallbacksBridge::runTaskOnMainThread(WebCore::ScriptExecutionContext* scriptExecutionContext, WorkerFileSystemCallbacksBridge* bridge, PassOwnPtr<WebCore::ScriptExecutionContext::Task> taskToRun) -{ - ASSERT(isMainThread()); - if (bridge->derefIfWorkerIsStopped()) - return; - taskToRun->performTask(scriptExecutionContext); -} - -void WorkerFileSystemCallbacksBridge::runTaskOnWorkerThread(WebCore::ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, PassOwnPtr<WebCore::ScriptExecutionContext::Task> taskToRun) -{ - if (!bridge->m_callbacksOnWorkerThread) - return; - ASSERT(bridge->m_workerContext->isContextThread()); - taskToRun->performTask(scriptExecutionContext); - bridge->m_callbacksOnWorkerThread = 0; -} - -void WorkerFileSystemCallbacksBridge::dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task> task) -{ - ASSERT(!m_selfRef); - ASSERT(m_worker); - ASSERT(m_workerContext->isContextThread()); - m_selfRef = this; - m_worker->dispatchTaskToMainThread(createCallbackTask(&runTaskOnMainThread, this, task)); -} - -void WorkerFileSystemCallbacksBridge::mayPostTaskToWorker(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode) -{ - ASSERT(isMainThread()); - { // Let go of the mutex before possibly deleting this due to m_selfRef.clear(). - MutexLocker locker(m_mutex); - if (m_worker) - m_worker->postTaskForModeToWorkerContext(createCallbackTask(&runTaskOnWorkerThread, m_selfRef, task), mode); - } - m_selfRef.clear(); -} - -} // namespace WebCore - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h deleted file mode 100644 index fa57f38..0000000 --- a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WorkerFileSystemCallbacksBridge_h -#define WorkerFileSystemCallbacksBridge_h - -#if ENABLE(FILE_SYSTEM) - -#include "PlatformString.h" -#include "ScriptExecutionContext.h" -#include "WebFileError.h" -#include "WebFileSystem.h" -#include "WebVector.h" -#include "WorkerContext.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/Threading.h> - -namespace WebKit { - -class AsyncFileSystem; -class MainThreadFileSystemCallbacks; -class ThreadableCallbacksBridgeWrapper; -class WebCommonWorkerClient; -class WebFileSystemCallbacks; -class WebWorkerBase; -struct WebFileInfo; -struct WebFileSystemEntry; - -// This class is used to post a openFileSystem request to the main thread and get called back for the request. This must be destructed on the worker thread. -// -// A typical flow for openFileSystem would look like this: -// Bridge::postOpenFileSystemToMainThread() on WorkerThread -// --> Bridge::openFileSystemOnMainThread() is called on MainThread -// This makes an IPC with a MainThreadFileSystemCallbacks instance -// [actual operation is down in the browser] -// --> MainThreadFileSystemCallbacks::didXxx is called on MainThread -// --> Bridge::didXxxOnMainThread is called on MainThread -// --> Bridge::didXxxOnWorkerThread is called on WorkerThread -// This calls the original callbacks (m_callbacksOnWorkerThread) and -// releases a self-reference to the bridge. -class WorkerFileSystemCallbacksBridge : public ThreadSafeShared<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer { -public: - ~WorkerFileSystemCallbacksBridge(); - - // WorkerContext::Observer method. - virtual void notifyStop() - { - stop(); - } - - void stop(); - - static PassRefPtr<WorkerFileSystemCallbacksBridge> create(WebWorkerBase* worker, WebCore::ScriptExecutionContext* workerContext, WebFileSystemCallbacks* callbacks) - { - return adoptRef(new WorkerFileSystemCallbacksBridge(worker, workerContext, callbacks)); - } - - // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread. - void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, const String& mode); - void postMoveToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode); - void postCopyToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode); - void postRemoveToMainThread(WebFileSystem*, const String& path, const String& mode); - void postRemoveRecursivelyToMainThread(WebFileSystem*, const String& path, const String& mode); - void postReadMetadataToMainThread(WebFileSystem*, const String& path, const String& mode); - void postCreateFileToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode); - void postCreateDirectoryToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode); - void postFileExistsToMainThread(WebFileSystem*, const String& path, const String& mode); - void postDirectoryExistsToMainThread(WebFileSystem*, const String& path, const String& mode); - void postReadDirectoryToMainThread(WebFileSystem*, const String& path, const String& mode); - - // Callback methods that are called on the main thread. - void didFailOnMainThread(WebFileError, const String& mode); - void didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode); - void didSucceedOnMainThread(const String& mode); - void didReadMetadataOnMainThread(const WebFileInfo&, const String& mode); - void didReadDirectoryOnMainThread(const WebVector<WebFileSystemEntry>&, bool hasMore, const String& mode); - -private: - WorkerFileSystemCallbacksBridge(WebWorkerBase*, WebCore::ScriptExecutionContext*, WebFileSystemCallbacks*); - - // Methods that are to be called on the main thread. - static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, WorkerFileSystemCallbacksBridge*, const String& mode); - static void moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode); - static void copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode); - static void removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - static void removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - static void readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - static void createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode); - static void createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode); - static void fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - static void directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - static void readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode); - - friend class MainThreadFileSystemCallbacks; - - // Methods that dispatch WebFileSystemCallbacks on the worker threads. - // They release a selfRef of the WorkerFileSystemCallbacksBridge. - static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, WebFileError); - static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const String& name, const String& rootPath); - static void didSucceedOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*); - static void didReadMetadataOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const WebFileInfo&); - static void didReadDirectoryOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const WebVector<WebFileSystemEntry>&, bool hasMore); - - // For early-exist; this deref's selfRef and returns true if the worker is already null. - bool derefIfWorkerIsStopped(); - - static void runTaskOnMainThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - static void runTaskOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - - void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - void mayPostTaskToWorker(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode); - - // m_selfRef keeps a reference to itself until a task is created for the worker thread (at which point the task holds the reference). - RefPtr<WorkerFileSystemCallbacksBridge> m_selfRef; - - Mutex m_mutex; - WebWorkerBase* m_worker; - WebCore::ScriptExecutionContext* m_workerContext; - - // This is self-destructed and must be fired on the worker thread. - WebFileSystemCallbacks* m_callbacksOnWorkerThread; -}; - -} // namespace WebCore - -#endif - -#endif // WorkerFileSystemCallbacksBridge_h diff --git a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp deleted file mode 100644 index 179aea5..0000000 --- a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WorkerFileWriterCallbacksBridge.h" - -#if ENABLE(FILE_SYSTEM) - -#include "AsyncFileWriterClient.h" -#include "CrossThreadTask.h" -#include "WebCString.h" -#include "WebFileSystem.h" -#include "WebFileWriter.h" -#include "WebKit.h" -#include "WebKitClient.h" -#include "WebWorkerBase.h" -#include "WorkerContext.h" -#include "WorkerLoaderProxy.h" -#include "WorkerThread.h" -#include <wtf/MainThread.h> -#include <wtf/Threading.h> - -using namespace WebCore; - -namespace WebKit { - -void WorkerFileWriterCallbacksBridge::notifyStop() -{ - ASSERT(m_workerContext->isContextThread()); - m_clientOnWorkerThread = 0; -} - -void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position, const KURL& data) -{ - ASSERT(!m_operationInProgress); - m_operationInProgress = true; - dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, this, position, data)); -} - -void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length) -{ - ASSERT(!m_operationInProgress); - m_operationInProgress = true; - dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, this, length)); -} - -void WorkerFileWriterCallbacksBridge::postAbortToMainThread() -{ - ASSERT(m_operationInProgress); - dispatchTaskToMainThread(createCallbackTask(&abortOnMainThread, this)); -} - -void WorkerFileWriterCallbacksBridge::postShutdownToMainThread(PassRefPtr<WorkerFileWriterCallbacksBridge> bridge) -{ - ASSERT(m_workerContext->isContextThread()); - m_clientOnWorkerThread = 0; - dispatchTaskToMainThread(createCallbackTask(&shutdownOnMainThread, bridge)); -} - -void WorkerFileWriterCallbacksBridge::writeOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long position, const KURL& data) -{ - bridge->m_writer->write(position, WebURL(data)); -} - -void WorkerFileWriterCallbacksBridge::truncateOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long length) -{ - bridge->m_writer->truncate(length); -} - -void WorkerFileWriterCallbacksBridge::abortOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge) -{ - bridge->m_writer->cancel(); -} - -void WorkerFileWriterCallbacksBridge::initOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, const String& path) -{ - ASSERT(!bridge->m_writer); - bridge->m_writer = webKitClient()->fileSystem()->createFileWriter(path, bridge.get()); -} - -void WorkerFileWriterCallbacksBridge::shutdownOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge) -{ - bridge->m_writerDeleted = true; - bridge->m_writer.clear(); -} - -void WorkerFileWriterCallbacksBridge::didWrite(long long bytes, bool complete) -{ - dispatchTaskToWorkerThread(createCallbackTask(&didWriteOnWorkerThread, this, bytes, complete)); -} - -void WorkerFileWriterCallbacksBridge::didFail(WebFileError error) -{ - dispatchTaskToWorkerThread(createCallbackTask(&didFailOnWorkerThread, this, error)); -} - -void WorkerFileWriterCallbacksBridge::didTruncate() -{ - dispatchTaskToWorkerThread(createCallbackTask(&didTruncateOnWorkerThread, this)); -} - -static const char fileWriterOperationsMode[] = "fileWriterOperationsMode"; - -WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge(const String& path, WorkerLoaderProxy* proxy, ScriptExecutionContext* scriptExecutionContext, AsyncFileWriterClient* client) - : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext)) - , m_proxy(proxy) - , m_workerContext(scriptExecutionContext) - , m_clientOnWorkerThread(client) - , m_writerDeleted(false) - , m_operationInProgress(false) -{ - ASSERT(m_workerContext->isContextThread()); - m_mode = fileWriterOperationsMode; - m_mode.append(String::number(static_cast<WorkerContext*>(scriptExecutionContext)->thread()->runLoop().createUniqueId())); - postInitToMainThread(path); -} - -void WorkerFileWriterCallbacksBridge::postInitToMainThread(const String& path) -{ - dispatchTaskToMainThread(createCallbackTask(&initOnMainThread, this, path)); -} - -WorkerFileWriterCallbacksBridge::~WorkerFileWriterCallbacksBridge() -{ - ASSERT(!m_clientOnWorkerThread); - ASSERT(!m_writer); -} - -// We know m_clientOnWorkerThread is still valid because it is only cleared on the context thread, and because we check in runTaskOnWorkerThread before calling any of these methods. -void WorkerFileWriterCallbacksBridge::didWriteOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, long long length, bool complete) -{ - ASSERT(bridge->m_workerContext->isContextThread()); - ASSERT(bridge->m_operationInProgress); - if (complete) - bridge->m_operationInProgress = false; - bridge->m_clientOnWorkerThread->didWrite(length, complete); -} - -void WorkerFileWriterCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, WebFileError error) -{ - ASSERT(bridge->m_workerContext->isContextThread()); - ASSERT(bridge->m_operationInProgress); - bridge->m_operationInProgress = false; - bridge->m_clientOnWorkerThread->didFail(static_cast<FileError::ErrorCode>(error)); -} - -void WorkerFileWriterCallbacksBridge::didTruncateOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge) -{ - ASSERT(bridge->m_workerContext->isContextThread()); - ASSERT(bridge->m_operationInProgress); - bridge->m_operationInProgress = false; - bridge->m_clientOnWorkerThread->didTruncate(); -} - -void WorkerFileWriterCallbacksBridge::runTaskOnMainThread(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, PassOwnPtr<ScriptExecutionContext::Task> taskToRun) -{ - ASSERT(isMainThread()); - if (!bridge->m_writerDeleted) - taskToRun->performTask(scriptExecutionContext); -} - -void WorkerFileWriterCallbacksBridge::runTaskOnWorkerThread(ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, PassOwnPtr<ScriptExecutionContext::Task> taskToRun) -{ - ASSERT(bridge->m_workerContext->isContextThread()); - if (bridge->m_clientOnWorkerThread) - taskToRun->performTask(scriptExecutionContext); -} - -void WorkerFileWriterCallbacksBridge::dispatchTaskToMainThread(PassOwnPtr<ScriptExecutionContext::Task> task) -{ - ASSERT(m_workerContext->isContextThread()); - WebWorkerBase::dispatchTaskToMainThread(createCallbackTask(&runTaskOnMainThread, this, task)); -} - -void WorkerFileWriterCallbacksBridge::dispatchTaskToWorkerThread(PassOwnPtr<ScriptExecutionContext::Task> task) -{ - ASSERT(isMainThread()); - m_proxy->postTaskForModeToWorkerContext(createCallbackTask(&runTaskOnWorkerThread, this, task), m_mode); -} - -bool WorkerFileWriterCallbacksBridge::waitForOperationToComplete() -{ - while (m_operationInProgress) { - WorkerContext* context = static_cast<WorkerContext*>(m_workerContext); - if (context->thread()->runLoop().runInMode(context, m_mode) == MessageQueueTerminated) - return false; - } - return true; -} - -} // namespace WebKit - -#endif // ENABLE(FILE_SYSTEM) diff --git a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h b/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h deleted file mode 100644 index 62e333c..0000000 --- a/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WorkerFileWriterCallbacksBridge_h -#define WorkerFileWriterCallbacksBridge_h - -#if ENABLE(FILE_SYSTEM) - -#include "WebFileError.h" -#include "WebFileWriterClient.h" -#include "WorkerContext.h" -#include <wtf/PassOwnPtr.h> -#include <wtf/PassRefPtr.h> -#include <wtf/ThreadSafeShared.h> - -namespace WebCore { - class AsyncFileWriterClient; - class KURL; - class WorkerLoaderProxy; -} - -namespace WTF { - class String; -} -using WTF::String; - -namespace WebKit { - -class WebFileSystem; -class WebFileWriter; -class WebFileWriterClient; -class WebWorkerBase; - -// This class is used as a mechanism to bridge calls between threads. -// Calls to a WebFileWriter must happen on the main thread, but they come from -// the context thread. The responses through the WebFileWriterClient interface -// start on the main thread, but must be sent via the worker context thread. -// -// A typical flow for write would look like this: -// Bridge::postWriteToMainThread() on WorkerThread -// --> Bridge::writeOnMainThread() is called on MainThread -// --> WebFileWriter::write() -// This makes an IPC; the actual operation is down in the browser. -// --> Bridge::didWrite is called on MainThread -// --> Bridge::didWriteOnWorkerThread is called on WorkerThread -// This calls the original client (m_clientOnWorkerThread). -// -// The bridge object is refcounted, so that it doesn't get deleted while there -// are cross-thread calls in flight. Each CrossThreadTask carries a reference -// to the bridge, which guarantees that the bridge will still be valid when the -// task is executed. In order to shut down the bridge, the WebFileWriterClient -// should call postShutdownToMainThread before dropping its reference to the -// bridge. This ensures that the WebFileWriter will be cleared on the main -// thread and that no further calls to the WebFileWriterClient will be made. -class WorkerFileWriterCallbacksBridge : public ThreadSafeShared<WorkerFileWriterCallbacksBridge>, public WebCore::WorkerContext::Observer, public WebFileWriterClient { -public: - ~WorkerFileWriterCallbacksBridge(); - - // WorkerContext::Observer method. - virtual void notifyStop(); - - static PassRefPtr<WorkerFileWriterCallbacksBridge> create(const String& path, WebCore::WorkerLoaderProxy* proxy, WebCore::ScriptExecutionContext* workerContext, WebCore::AsyncFileWriterClient* client) - { - return adoptRef(new WorkerFileWriterCallbacksBridge(path, proxy, workerContext, client)); - } - - // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread. - void postWriteToMainThread(long long position, const WebCore::KURL& data); - void postTruncateToMainThread(long long length); - void postAbortToMainThread(); - - // The owning WorkerAsyncFileWriterChromium should call this method before dropping its last reference to the bridge, on the context thread. - // The actual deletion of the WorkerFileWriterCallbacksBridge may happen on either the main or context thread, depending on where the last reference goes away; that's safe as long as this is called first. - void postShutdownToMainThread(PassRefPtr<WorkerFileWriterCallbacksBridge>); - - // Callback methods that are called on the main thread. - // These are the implementation of WebKit::WebFileWriterClient. - void didWrite(long long bytes, bool complete); - void didFail(WebFileError); - void didTruncate(); - - // Call this on the context thread to wait for the current operation to complete. - bool waitForOperationToComplete(); - -private: - WorkerFileWriterCallbacksBridge(const String& path, WebCore::WorkerLoaderProxy*, WebCore::ScriptExecutionContext*, WebCore::AsyncFileWriterClient*); - - void postInitToMainThread(const String& path); - - // Methods that are to be called on the main thread. - static void writeOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long position, const WebCore::KURL& data); - static void truncateOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long length); - static void abortOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>); - static void initOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, const String& path); - static void shutdownOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>); - - // Methods that dispatch to AsyncFileWriterClient on the worker threads. - static void didWriteOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long length, bool complete); - static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, WebFileError); - static void didTruncateOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>); - - // Called on the main thread to run the supplied task. - static void runTaskOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - // Called on the worker thread to run the supplied task. - static void runTaskOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - - // Called on the worker thread to dispatch to the main thread. - void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - // Called on the main thread to dispatch to the worker thread. - void dispatchTaskToWorkerThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>); - - // Used from the main thread to post tasks to the context thread. - WebCore::WorkerLoaderProxy* m_proxy; - - // Used on the context thread, only to check that we're running on the context thread. - WebCore::ScriptExecutionContext* m_workerContext; - - // Created and destroyed from the main thread. - OwnPtr<WebKit::WebFileWriter> m_writer; - - // Used on the context thread to call back into the client. - WebCore::AsyncFileWriterClient* m_clientOnWorkerThread; - - // Used to indicate that shutdown has started on the main thread, and hence the writer has been deleted. - bool m_writerDeleted; - - // Used by waitForOperationToComplete. - bool m_operationInProgress; - - // Used by postTaskForModeToWorkerContext and runInMode. - String m_mode; -}; - -} // namespace WebCore - -#endif - -#endif // WorkerFileWriterCallbacksBridge_h diff --git a/WebKit/chromium/src/WrappedResourceRequest.h b/WebKit/chromium/src/WrappedResourceRequest.h deleted file mode 100644 index 3057387..0000000 --- a/WebKit/chromium/src/WrappedResourceRequest.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WrappedResourceRequest_h -#define WrappedResourceRequest_h - -#include "WebURLRequest.h" -#include "WebURLRequestPrivate.h" - -namespace WebKit { - -class WrappedResourceRequest : public WebURLRequest { -public: - ~WrappedResourceRequest() - { - reset(); // Need to drop reference to m_handle - } - - WrappedResourceRequest() { } - - WrappedResourceRequest(WebCore::ResourceRequest& resourceRequest) - { - bind(resourceRequest); - } - - WrappedResourceRequest(const WebCore::ResourceRequest& resourceRequest) - { - bind(resourceRequest); - } - - void bind(WebCore::ResourceRequest& resourceRequest) - { - m_handle.m_resourceRequest = &resourceRequest; - assign(&m_handle); - } - - void bind(const WebCore::ResourceRequest& resourceRequest) - { - bind(*const_cast<WebCore::ResourceRequest*>(&resourceRequest)); - } - -private: - class Handle : public WebURLRequestPrivate { - public: - virtual void dispose() { m_resourceRequest = 0; } - }; - - Handle m_handle; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/WrappedResourceResponse.h b/WebKit/chromium/src/WrappedResourceResponse.h deleted file mode 100644 index 927582d..0000000 --- a/WebKit/chromium/src/WrappedResourceResponse.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WrappedResourceResponse_h -#define WrappedResourceResponse_h - -#include "WebURLResponse.h" -#include "WebURLResponsePrivate.h" - -namespace WebKit { - -class WrappedResourceResponse : public WebURLResponse { -public: - ~WrappedResourceResponse() - { - reset(); // Need to drop reference to m_handle - } - - WrappedResourceResponse() { } - - WrappedResourceResponse(WebCore::ResourceResponse& resourceResponse) - { - bind(resourceResponse); - } - - WrappedResourceResponse(const WebCore::ResourceResponse& resourceResponse) - { - bind(resourceResponse); - } - - void bind(WebCore::ResourceResponse& resourceResponse) - { - m_handle.m_resourceResponse = &resourceResponse; - assign(&m_handle); - } - - void bind(const WebCore::ResourceResponse& resourceResponse) - { - bind(*const_cast<WebCore::ResourceResponse*>(&resourceResponse)); - } - -private: - class Handle : public WebURLResponsePrivate { - public: - virtual void dispose() { m_resourceResponse = 0; } - }; - - Handle m_handle; -}; - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/src/gtk/WebFontInfo.cpp b/WebKit/chromium/src/gtk/WebFontInfo.cpp deleted file mode 100644 index dd25eb1..0000000 --- a/WebKit/chromium/src/gtk/WebFontInfo.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontInfo.h" -#include "WebFontRenderStyle.h" - -#include <fontconfig/fontconfig.h> -#include <string.h> -#include <unicode/utf16.h> - -namespace WebKit { - -WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCharacters) -{ - FcCharSet* cset = FcCharSetCreate(); - for (size_t i = 0; i < numCharacters; ++i) { - if (U16_IS_SURROGATE(characters[i]) - && U16_IS_SURROGATE_LEAD(characters[i]) - && i != numCharacters - 1 - && U16_IS_TRAIL(characters[i + 1])) { - FcCharSetAddChar(cset, U16_GET_SUPPLEMENTARY(characters[i], characters[i+1])); - i++; - } else - FcCharSetAddChar(cset, characters[i]); - } - FcPattern* pattern = FcPatternCreate(); - - FcValue fcvalue; - fcvalue.type = FcTypeCharSet; - fcvalue.u.c = cset; - FcPatternAdd(pattern, FC_CHARSET, fcvalue, FcFalse); - - fcvalue.type = FcTypeBool; - fcvalue.u.b = FcTrue; - FcPatternAdd(pattern, FC_SCALABLE, fcvalue, FcFalse); - - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); - - FcResult result; - FcFontSet* fontSet = FcFontSort(0, pattern, 0, 0, &result); - FcPatternDestroy(pattern); - FcCharSetDestroy(cset); - - if (!fontSet) - return WebCString(); - - // Older versions of fontconfig have a bug where they cannot select - // only scalable fonts so we have to manually filter the results. - for (int i = 0; i < fontSet->nfont; ++i) { - FcPattern* current = fontSet->fonts[i]; - FcBool isScalable; - - if (FcPatternGetBool(current, FC_SCALABLE, 0, &isScalable) != FcResultMatch - || !isScalable) - continue; - - // fontconfig can also return fonts which are unreadable - FcChar8* cFilename; - if (FcPatternGetString(current, FC_FILE, 0, &cFilename) != FcResultMatch) - continue; - - if (access(reinterpret_cast<char*>(cFilename), R_OK)) - continue; - - FcChar8* family; - WebCString result; - if (FcPatternGetString(current, FC_FAMILY, 0, &family) == FcResultMatch) { - const char* charFamily = reinterpret_cast<char*>(family); - result = WebCString(charFamily, strlen(charFamily)); - } - FcFontSetDestroy(fontSet); - return result; - } - - FcFontSetDestroy(fontSet); - return WebCString(); -} - -void WebFontInfo::renderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* out) -{ - bool isBold = sizeAndStyle & 1; - bool isItalic = sizeAndStyle & 2; - int pixelSize = sizeAndStyle >> 2; - - FcPattern* pattern = FcPatternCreate(); - FcValue fcvalue; - - fcvalue.type = FcTypeString; - fcvalue.u.s = reinterpret_cast<const FcChar8 *>(family); - FcPatternAdd(pattern, FC_FAMILY, fcvalue, FcFalse); - - fcvalue.type = FcTypeInteger; - fcvalue.u.i = isBold ? FC_WEIGHT_BOLD : FC_WEIGHT_NORMAL; - FcPatternAdd(pattern, FC_WEIGHT, fcvalue, FcFalse); - - fcvalue.type = FcTypeInteger; - fcvalue.u.i = isItalic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN; - FcPatternAdd(pattern, FC_SLANT, fcvalue, FcFalse); - - fcvalue.type = FcTypeBool; - fcvalue.u.b = FcTrue; - FcPatternAdd(pattern, FC_SCALABLE, fcvalue, FcFalse); - - fcvalue.type = FcTypeDouble; - fcvalue.u.d = pixelSize; - FcPatternAdd(pattern, FC_SIZE, fcvalue, FcFalse); - - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); - - FcResult result; - // Some versions of fontconfig don't actually write a value into result. - // However, it's not clear from the documentation if result should be a - // non-0 pointer: future versions might expect to be able to write to - // it. So we pass in a valid pointer and ignore it. - FcPattern* match = FcFontMatch(0, pattern, &result); - FcPatternDestroy(pattern); - - out->setDefaults(); - - if (!match) { - FcPatternDestroy(match); - return; - } - - FcBool b; - int i; - - if (FcPatternGetBool(match, FC_ANTIALIAS, 0, &b) == FcResultMatch) - out->useAntiAlias = b; - if (FcPatternGetBool(match, FC_EMBEDDED_BITMAP, 0, &b) == FcResultMatch) - out->useBitmaps = b; - if (FcPatternGetBool(match, FC_AUTOHINT, 0, &b) == FcResultMatch) - out->useAutoHint = b; - if (FcPatternGetBool(match, FC_HINTING, 0, &b) == FcResultMatch) - out->useHinting = b; - if (FcPatternGetInteger(match, FC_HINT_STYLE, 0, &i) == FcResultMatch) - out->hintStyle = i; - if (FcPatternGetInteger(match, FC_RGBA, 0, &i) == FcResultMatch) { - switch (i) { - case FC_RGBA_NONE: - out->useSubpixel = 0; - break; - case FC_RGBA_RGB: - case FC_RGBA_BGR: - case FC_RGBA_VRGB: - case FC_RGBA_VBGR: - out->useSubpixel = 1; - break; - default: - // This includes FC_RGBA_UNKNOWN. - out->useSubpixel = 2; - break; - } - } - - FcPatternDestroy(match); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp deleted file mode 100644 index 71d1b39..0000000 --- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright (C) 2006-2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputEventFactory.h" - -#include "KeyboardCodes.h" -#include "KeyCodeConversion.h" - -#include "WebInputEvent.h" - -#include <gdk/gdk.h> -#include <gdk/gdkkeysyms.h> -#include <gtk/gtk.h> -#include <gtk/gtkversion.h> - -#include <wtf/Assertions.h> - -namespace { - -bool countsAsDoubleClick(gint timeDiff, gint xDiff, gint yDiff) -{ - static GtkSettings* settings = gtk_settings_get_default(); - gint doubleClickTime = 250; - gint doubleClickDistance = 5; - g_object_get(G_OBJECT(settings), - "gtk-double-click-time", &doubleClickTime, - "gtk-double-click-distance", &doubleClickDistance, NULL); - return timeDiff <= doubleClickTime && abs(xDiff) <= doubleClickDistance && abs(yDiff) <= doubleClickDistance; -} - -} // namespace - -namespace WebKit { - -static double gdkEventTimeToWebEventTime(guint32 time) -{ - // Convert from time in ms to time in sec. - return time / 1000.0; -} - -static int gdkStateToWebEventModifiers(guint state) -{ - int modifiers = 0; - if (state & GDK_SHIFT_MASK) - modifiers |= WebInputEvent::ShiftKey; - if (state & GDK_CONTROL_MASK) - modifiers |= WebInputEvent::ControlKey; - if (state & GDK_MOD1_MASK) - modifiers |= WebInputEvent::AltKey; -#if GTK_CHECK_VERSION(2, 10, 0) - if (state & GDK_META_MASK) - modifiers |= WebInputEvent::MetaKey; -#endif - if (state & GDK_BUTTON1_MASK) - modifiers |= WebInputEvent::LeftButtonDown; - if (state & GDK_BUTTON2_MASK) - modifiers |= WebInputEvent::MiddleButtonDown; - if (state & GDK_BUTTON3_MASK) - modifiers |= WebInputEvent::RightButtonDown; - if (state & GDK_LOCK_MASK) - modifiers |= WebInputEvent::CapsLockOn; - if (state & GDK_MOD2_MASK) - modifiers |= WebInputEvent::NumLockOn; - return modifiers; -} - -static int gdkEventToWindowsKeyCode(const GdkEventKey* event) -{ - static const unsigned int hardwareCodeToGDKKeyval[] = { - 0, // 0x00: - 0, // 0x01: - 0, // 0x02: - 0, // 0x03: - 0, // 0x04: - 0, // 0x05: - 0, // 0x06: - 0, // 0x07: - 0, // 0x08: - 0, // 0x09: GDK_Escape - GDK_1, // 0x0A: GDK_1 - GDK_2, // 0x0B: GDK_2 - GDK_3, // 0x0C: GDK_3 - GDK_4, // 0x0D: GDK_4 - GDK_5, // 0x0E: GDK_5 - GDK_6, // 0x0F: GDK_6 - GDK_7, // 0x10: GDK_7 - GDK_8, // 0x11: GDK_8 - GDK_9, // 0x12: GDK_9 - GDK_0, // 0x13: GDK_0 - GDK_minus, // 0x14: GDK_minus - GDK_equal, // 0x15: GDK_equal - 0, // 0x16: GDK_BackSpace - 0, // 0x17: GDK_Tab - GDK_q, // 0x18: GDK_q - GDK_w, // 0x19: GDK_w - GDK_e, // 0x1A: GDK_e - GDK_r, // 0x1B: GDK_r - GDK_t, // 0x1C: GDK_t - GDK_y, // 0x1D: GDK_y - GDK_u, // 0x1E: GDK_u - GDK_i, // 0x1F: GDK_i - GDK_o, // 0x20: GDK_o - GDK_p, // 0x21: GDK_p - GDK_bracketleft, // 0x22: GDK_bracketleft - GDK_bracketright, // 0x23: GDK_bracketright - 0, // 0x24: GDK_Return - 0, // 0x25: GDK_Control_L - GDK_a, // 0x26: GDK_a - GDK_s, // 0x27: GDK_s - GDK_d, // 0x28: GDK_d - GDK_f, // 0x29: GDK_f - GDK_g, // 0x2A: GDK_g - GDK_h, // 0x2B: GDK_h - GDK_j, // 0x2C: GDK_j - GDK_k, // 0x2D: GDK_k - GDK_l, // 0x2E: GDK_l - GDK_semicolon, // 0x2F: GDK_semicolon - GDK_apostrophe, // 0x30: GDK_apostrophe - GDK_grave, // 0x31: GDK_grave - 0, // 0x32: GDK_Shift_L - GDK_backslash, // 0x33: GDK_backslash - GDK_z, // 0x34: GDK_z - GDK_x, // 0x35: GDK_x - GDK_c, // 0x36: GDK_c - GDK_v, // 0x37: GDK_v - GDK_b, // 0x38: GDK_b - GDK_n, // 0x39: GDK_n - GDK_m, // 0x3A: GDK_m - GDK_comma, // 0x3B: GDK_comma - GDK_period, // 0x3C: GDK_period - GDK_slash, // 0x3D: GDK_slash - 0, // 0x3E: GDK_Shift_R - 0, // 0x3F: - 0, // 0x40: - 0, // 0x41: - 0, // 0x42: - 0, // 0x43: - 0, // 0x44: - 0, // 0x45: - 0, // 0x46: - 0, // 0x47: - 0, // 0x48: - 0, // 0x49: - 0, // 0x4A: - 0, // 0x4B: - 0, // 0x4C: - 0, // 0x4D: - 0, // 0x4E: - 0, // 0x4F: - 0, // 0x50: - 0, // 0x51: - 0, // 0x52: - 0, // 0x53: - 0, // 0x54: - 0, // 0x55: - 0, // 0x56: - 0, // 0x57: - 0, // 0x58: - 0, // 0x59: - 0, // 0x5A: - 0, // 0x5B: - 0, // 0x5C: - 0, // 0x5D: - 0, // 0x5E: - 0, // 0x5F: - 0, // 0x60: - 0, // 0x61: - 0, // 0x62: - 0, // 0x63: - 0, // 0x64: - 0, // 0x65: - 0, // 0x66: - 0, // 0x67: - 0, // 0x68: - 0, // 0x69: - 0, // 0x6A: - 0, // 0x6B: - 0, // 0x6C: - 0, // 0x6D: - 0, // 0x6E: - 0, // 0x6F: - 0, // 0x70: - 0, // 0x71: - 0, // 0x72: - GDK_Super_L, // 0x73: GDK_Super_L - GDK_Super_R, // 0x74: GDK_Super_R - }; - - // |windowsKeyCode| has to include a valid virtual-key code even when we - // use non-US layouts, e.g. even when we type an 'A' key of a US keyboard - // on the Hebrew layout, |windowsKeyCode| should be VK_A. - // On the other hand, |event->keyval| value depends on the current - // GdkKeymap object, i.e. when we type an 'A' key of a US keyboard on - // the Hebrew layout, |event->keyval| becomes GDK_hebrew_shin and this - // WebCore::windowsKeyCodeForKeyEvent() call returns 0. - // To improve compatibilty with Windows, we use |event->hardware_keycode| - // for retrieving its Windows key-code for the keys when the - // WebCore::windowsKeyCodeForEvent() call returns 0. - // We shouldn't use |event->hardware_keycode| for keys that GdkKeymap - // objects cannot change because |event->hardware_keycode| doesn't change - // even when we change the layout options, e.g. when we swap a control - // key and a caps-lock key, GTK doesn't swap their - // |event->hardware_keycode| values but swap their |event->keyval| values. - int windowsKeyCode = WebCore::windowsKeyCodeForKeyEvent(event->keyval); - if (windowsKeyCode) - return windowsKeyCode; - - const int tableSize = sizeof(hardwareCodeToGDKKeyval) / sizeof(hardwareCodeToGDKKeyval[0]); - if (event->hardware_keycode < tableSize) { - int keyval = hardwareCodeToGDKKeyval[event->hardware_keycode]; - if (keyval) - return WebCore::windowsKeyCodeForKeyEvent(keyval); - } - - // This key is one that keyboard-layout drivers cannot change. - // Use |event->keyval| to retrieve its |windowsKeyCode| value. - return WebCore::windowsKeyCodeForKeyEvent(event->keyval); -} - -// Gets the corresponding control character of a specified key code. See: -// http://en.wikipedia.org/wiki/Control_characters -// We emulate Windows behavior here. -static WebUChar getControlCharacter(int windowsKeyCode, bool shift) -{ - if (windowsKeyCode >= WebCore::VKEY_A && windowsKeyCode <= WebCore::VKEY_Z) { - // ctrl-A ~ ctrl-Z map to \x01 ~ \x1A - return windowsKeyCode - WebCore::VKEY_A + 1; - } - if (shift) { - // following graphics chars require shift key to input. - switch (windowsKeyCode) { - // ctrl-@ maps to \x00 (Null byte) - case WebCore::VKEY_2: - return 0; - // ctrl-^ maps to \x1E (Record separator, Information separator two) - case WebCore::VKEY_6: - return 0x1E; - // ctrl-_ maps to \x1F (Unit separator, Information separator one) - case WebCore::VKEY_OEM_MINUS: - return 0x1F; - // Returns 0 for all other keys to avoid inputting unexpected chars. - default: - return 0; - } - } else { - switch (windowsKeyCode) { - // ctrl-[ maps to \x1B (Escape) - case WebCore::VKEY_OEM_4: - return 0x1B; - // ctrl-\ maps to \x1C (File separator, Information separator four) - case WebCore::VKEY_OEM_5: - return 0x1C; - // ctrl-] maps to \x1D (Group separator, Information separator three) - case WebCore::VKEY_OEM_6: - return 0x1D; - // ctrl-Enter maps to \x0A (Line feed) - case WebCore::VKEY_RETURN: - return 0x0A; - // Returns 0 for all other keys to avoid inputting unexpected chars. - default: - return 0; - } - } -} - -// WebKeyboardEvent ----------------------------------------------------------- - -WebKeyboardEvent WebInputEventFactory::keyboardEvent(const GdkEventKey* event) -{ - WebKeyboardEvent result; - - result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time); - result.modifiers = gdkStateToWebEventModifiers(event->state); - - switch (event->type) { - case GDK_KEY_RELEASE: - result.type = WebInputEvent::KeyUp; - break; - case GDK_KEY_PRESS: - result.type = WebInputEvent::RawKeyDown; - break; - default: - ASSERT_NOT_REACHED(); - } - - // According to MSDN: - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx - // Key events with Alt modifier and F10 are system key events. - // We just emulate this behavior. It's necessary to prevent webkit from - // processing keypress event generated by alt-d, etc. - // F10 is not special on Linux, so don't treat it as system key. - if (result.modifiers & WebInputEvent::AltKey) - result.isSystemKey = true; - - // The key code tells us which physical key was pressed (for example, the - // A key went down or up). It does not determine whether A should be lower - // or upper case. This is what text does, which should be the keyval. - result.windowsKeyCode = gdkEventToWindowsKeyCode(event); - result.nativeKeyCode = event->hardware_keycode; - - if (result.windowsKeyCode == WebCore::VKEY_RETURN) - // We need to treat the enter key as a key press of character \r. This - // is apparently just how webkit handles it and what it expects. - result.unmodifiedText[0] = '\r'; - else - // FIXME: fix for non BMP chars - result.unmodifiedText[0] = - static_cast<WebUChar>(gdk_keyval_to_unicode(event->keyval)); - - // If ctrl key is pressed down, then control character shall be input. - if (result.modifiers & WebInputEvent::ControlKey) - result.text[0] = getControlCharacter( - result.windowsKeyCode, result.modifiers & WebInputEvent::ShiftKey); - else - result.text[0] = result.unmodifiedText[0]; - - result.setKeyIdentifierFromWindowsKeyCode(); - - // FIXME: Do we need to set IsAutoRepeat or IsKeyPad? - - return result; -} - -WebKeyboardEvent WebInputEventFactory::keyboardEvent(wchar_t character, int state, double timeStampSeconds) -{ - // keyboardEvent(const GdkEventKey*) depends on the GdkEventKey object and - // it is hard to use/ it from signal handlers which don't use GdkEventKey - // objects (e.g. GtkIMContext signal handlers.) For such handlers, this - // function creates a WebInputEvent::Char event without using a - // GdkEventKey object. - WebKeyboardEvent result; - result.type = WebKit::WebInputEvent::Char; - result.timeStampSeconds = timeStampSeconds; - result.modifiers = gdkStateToWebEventModifiers(state); - result.windowsKeyCode = character; - result.nativeKeyCode = character; - result.text[0] = character; - result.unmodifiedText[0] = character; - - // According to MSDN: - // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx - // Key events with Alt modifier and F10 are system key events. - // We just emulate this behavior. It's necessary to prevent webkit from - // processing keypress event generated by alt-d, etc. - // F10 is not special on Linux, so don't treat it as system key. - if (result.modifiers & WebInputEvent::AltKey) - result.isSystemKey = true; - - return result; -} - -// WebMouseEvent -------------------------------------------------------------- - -WebMouseEvent WebInputEventFactory::mouseEvent(const GdkEventButton* event) -{ - WebMouseEvent result; - - result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time); - - result.modifiers = gdkStateToWebEventModifiers(event->state); - result.x = static_cast<int>(event->x); - result.y = static_cast<int>(event->y); - result.windowX = result.x; - result.windowY = result.y; - result.globalX = static_cast<int>(event->x_root); - result.globalY = static_cast<int>(event->y_root); - result.clickCount = 0; - - switch (event->type) { - case GDK_BUTTON_PRESS: - result.type = WebInputEvent::MouseDown; - break; - case GDK_BUTTON_RELEASE: - result.type = WebInputEvent::MouseUp; - break; - case GDK_3BUTTON_PRESS: - case GDK_2BUTTON_PRESS: - default: - ASSERT_NOT_REACHED(); - }; - - if (GDK_BUTTON_PRESS == event->type) { - static int numClicks = 0; - static GdkWindow* eventWindow = 0; - static gint lastLeftClickTime = 0; - static gint lastLeftClickX = 0; - static gint lastLeftClickY = 0; - - gint timeDiff = event->time - lastLeftClickTime; - gint xDiff = event->x - lastLeftClickX; - gint yDiff = event->y - lastLeftClickY; - if (eventWindow == event->window && countsAsDoubleClick(timeDiff, xDiff, yDiff)) - numClicks++; - else - numClicks = 1; - - result.clickCount = numClicks; - eventWindow = event->window; - lastLeftClickTime = event->time; - lastLeftClickX = event->x; - lastLeftClickY = event->y; - } - - result.button = WebMouseEvent::ButtonNone; - if (event->button == 1) - result.button = WebMouseEvent::ButtonLeft; - else if (event->button == 2) - result.button = WebMouseEvent::ButtonMiddle; - else if (event->button == 3) - result.button = WebMouseEvent::ButtonRight; - - return result; -} - -WebMouseEvent WebInputEventFactory::mouseEvent(const GdkEventMotion* event) -{ - WebMouseEvent result; - - result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time); - result.modifiers = gdkStateToWebEventModifiers(event->state); - result.x = static_cast<int>(event->x); - result.y = static_cast<int>(event->y); - result.windowX = result.x; - result.windowY = result.y; - result.globalX = static_cast<int>(event->x_root); - result.globalY = static_cast<int>(event->y_root); - - switch (event->type) { - case GDK_MOTION_NOTIFY: - result.type = WebInputEvent::MouseMove; - break; - default: - ASSERT_NOT_REACHED(); - } - - result.button = WebMouseEvent::ButtonNone; - if (event->state & GDK_BUTTON1_MASK) - result.button = WebMouseEvent::ButtonLeft; - else if (event->state & GDK_BUTTON2_MASK) - result.button = WebMouseEvent::ButtonMiddle; - else if (event->state & GDK_BUTTON3_MASK) - result.button = WebMouseEvent::ButtonRight; - - return result; -} - -WebMouseEvent WebInputEventFactory::mouseEvent(const GdkEventCrossing* event) -{ - WebMouseEvent result; - - result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time); - result.modifiers = gdkStateToWebEventModifiers(event->state); - result.x = static_cast<int>(event->x); - result.y = static_cast<int>(event->y); - result.windowX = result.x; - result.windowY = result.y; - result.globalX = static_cast<int>(event->x_root); - result.globalY = static_cast<int>(event->y_root); - - switch (event->type) { - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: - // Note that if we sent MouseEnter or MouseLeave to WebKit, it - // wouldn't work - they don't result in the proper JavaScript events. - // MouseMove does the right thing. - result.type = WebInputEvent::MouseMove; - break; - default: - ASSERT_NOT_REACHED(); - } - - result.button = WebMouseEvent::ButtonNone; - if (event->state & GDK_BUTTON1_MASK) - result.button = WebMouseEvent::ButtonLeft; - else if (event->state & GDK_BUTTON2_MASK) - result.button = WebMouseEvent::ButtonMiddle; - else if (event->state & GDK_BUTTON3_MASK) - result.button = WebMouseEvent::ButtonRight; - - return result; -} - -// WebMouseWheelEvent --------------------------------------------------------- - -WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(const GdkEventScroll* event) -{ - WebMouseWheelEvent result; - - result.type = WebInputEvent::MouseWheel; - result.button = WebMouseEvent::ButtonNone; - - result.timeStampSeconds = gdkEventTimeToWebEventTime(event->time); - result.modifiers = gdkStateToWebEventModifiers(event->state); - result.x = static_cast<int>(event->x); - result.y = static_cast<int>(event->y); - result.windowX = result.x; - result.windowY = result.y; - result.globalX = static_cast<int>(event->x_root); - result.globalY = static_cast<int>(event->y_root); - - // How much should we scroll per mouse wheel event? - // - Windows uses 3 lines by default and obeys a system setting. - // - Mozilla has a pref that lets you either use the "system" number of lines - // to scroll, or lets the user override it. - // For the "system" number of lines, it appears they've hardcoded 3. - // See case NS_MOUSE_SCROLL in content/events/src/nsEventStateManager.cpp - // and InitMouseScrollEvent in widget/src/gtk2/nsCommonWidget.cpp . - // - Gtk makes the scroll amount a function of the size of the scroll bar, - // which is not available to us here. - // Instead, we pick a number that empirically matches Firefox's behavior. - static const float scrollbarPixelsPerTick = 160.0f / 3.0f; - - switch (event->direction) { - case GDK_SCROLL_UP: - result.deltaY = scrollbarPixelsPerTick; - result.wheelTicksY = 1; - break; - case GDK_SCROLL_DOWN: - result.deltaY = -scrollbarPixelsPerTick; - result.wheelTicksY = -1; - break; - case GDK_SCROLL_LEFT: - result.deltaX = scrollbarPixelsPerTick; - result.wheelTicksX = 1; - break; - case GDK_SCROLL_RIGHT: - result.deltaX = -scrollbarPixelsPerTick; - result.wheelTicksX = -1; - break; - } - - return result; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js deleted file mode 100644 index d6536bc..0000000 --- a/WebKit/chromium/src/js/DevTools.js +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * FIXME: change field naming style to use trailing underscore. - * @fileoverview Tools is a main class that wires all components of the - * DevTools frontend together. It is also responsible for overriding existing - * WebInspector functionality while it is getting upstreamed into WebCore. - */ - -var context = {}; // Used by WebCore's inspector routines. - -(function () { - Preferences.ignoreWhitespace = false; - Preferences.samplingCPUProfiler = true; - Preferences.heapProfilerPresent = true; - Preferences.debuggerAlwaysEnabled = true; - Preferences.profilerAlwaysEnabled = true; - Preferences.canEditScriptSource = true; - Preferences.onlineDetectionEnabled = false; - Preferences.nativeInstrumentationEnabled = true; - Preferences.fileSystemEnabled = false; - Preferences.resourceExportEnabled = true; - Preferences.showTimingTab = true; - Preferences.showCookiesTab = true; -})(); - -var devtools = devtools || {}; - -devtools.domContentLoaded = function() -{ - WebInspector.setAttachedWindow(WebInspector.queryParamsObject.docked === "true"); - if (WebInspector.queryParamsObject.toolbar_color && WebInspector.queryParamsObject.text_color) - WebInspector.setToolbarColors(WebInspector.queryParamsObject.toolbar_color, WebInspector.queryParamsObject.text_color); -} -document.addEventListener("DOMContentLoaded", devtools.domContentLoaded, false); - - -// FIXME: This needs to be upstreamed. -(function InterceptProfilesPanelEvents() -{ - var oldShow = WebInspector.ProfilesPanel.prototype.show; - WebInspector.ProfilesPanel.prototype.show = function() - { - this.enableToggleButton.visible = false; - oldShow.call(this); - // Show is called on every show event of a panel, so - // we only need to intercept it once. - WebInspector.ProfilesPanel.prototype.show = oldShow; - }; -})(); - - -/* - * @override - * TODO(mnaganov): Restore l10n when it will be agreed that it is needed. - */ -WebInspector.UIString = function(string) -{ - return String.vsprintf(string, Array.prototype.slice.call(arguments, 1)); -}; - - -/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */ -(function() -{ - var originalDragStart = WebInspector.elementDragStart; - WebInspector.elementDragStart = function(element) - { - if (element) { - var glassPane = document.createElement("div"); - glassPane.style.cssText = "position:absolute;width:100%;height:100%;opacity:0;z-index:1"; - glassPane.id = "glass-pane-for-drag"; - element.parentElement.appendChild(glassPane); - } - - originalDragStart.apply(this, arguments); - }; - - var originalDragEnd = WebInspector.elementDragEnd; - WebInspector.elementDragEnd = function() - { - originalDragEnd.apply(this, arguments); - - var glassPane = document.getElementById("glass-pane-for-drag"); - if (glassPane) - glassPane.parentElement.removeChild(glassPane); - }; -})(); - - - -/////////////////////////////////////////// -// Chromium layout test harness support. // -/////////////////////////////////////////// - -WebInspector.runAfterPendingDispatchesQueue = []; - -WebInspector.TestController.prototype.runAfterPendingDispatches = function(callback) -{ - WebInspector.runAfterPendingDispatchesQueue.push(callback); -}; - -WebInspector.queuesAreEmpty = function() -{ - var copy = this.runAfterPendingDispatchesQueue.slice(); - this.runAfterPendingDispatchesQueue = []; - for (var i = 0; i < copy.length; ++i) - copy[i].call(this); -}; - - -///////////////////////////// -// Chromium theme support. // -///////////////////////////// - -WebInspector.setToolbarColors = function(backgroundColor, color) -{ - if (!WebInspector._themeStyleElement) { - WebInspector._themeStyleElement = document.createElement("style"); - document.head.appendChild(WebInspector._themeStyleElement); - } - WebInspector._themeStyleElement.textContent = - "#toolbar {\ - background-image: none !important;\ - background-color: " + backgroundColor + " !important;\ - }\ - \ - .toolbar-label {\ - color: " + color + " !important;\ - text-shadow: none;\ - }"; -} - -WebInspector.resetToolbarColors = function() -{ - if (WebInspector._themeStyleElement) - WebInspector._themeStyleElement.textContent = ""; - -} - -//////////////////////////////////////////////////////// -// Platform-specific WebInspector extensions support. // -//////////////////////////////////////////////////////// - -WebInspector.platformExtensionAPI = function(tabId) -{ - function getTabId() - { - return tabId; - } - webInspector.inspectedWindow.__proto__.__defineGetter__("tabId", getTabId); -} - -WebInspector.buildPlatformExtensionAPI = function() -{ - return "(" + WebInspector.platformExtensionAPI + ")(" + WebInspector._inspectedTabId + ");"; -} - -WebInspector.setInspectedTabId = function(tabId) -{ - WebInspector._inspectedTabId = tabId; -} diff --git a/WebKit/chromium/src/js/Images/segmentChromium.png b/WebKit/chromium/src/js/Images/segmentChromium.png Binary files differdeleted file mode 100755 index f4248e1..0000000 --- a/WebKit/chromium/src/js/Images/segmentChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/segmentHoverChromium.png b/WebKit/chromium/src/js/Images/segmentHoverChromium.png Binary files differdeleted file mode 100755 index 0a743d9..0000000 --- a/WebKit/chromium/src/js/Images/segmentHoverChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/segmentHoverEndChromium.png b/WebKit/chromium/src/js/Images/segmentHoverEndChromium.png Binary files differdeleted file mode 100755 index cf62072..0000000 --- a/WebKit/chromium/src/js/Images/segmentHoverEndChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/segmentSelectedChromium.png b/WebKit/chromium/src/js/Images/segmentSelectedChromium.png Binary files differdeleted file mode 100755 index a1f7251..0000000 --- a/WebKit/chromium/src/js/Images/segmentSelectedChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/segmentSelectedEndChromium.png b/WebKit/chromium/src/js/Images/segmentSelectedEndChromium.png Binary files differdeleted file mode 100755 index 07641db..0000000 --- a/WebKit/chromium/src/js/Images/segmentSelectedEndChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png Binary files differdeleted file mode 100755 index 7a760c1..0000000 --- a/WebKit/chromium/src/js/Images/statusbarBackgroundChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png b/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png Binary files differdeleted file mode 100755 index e3bc944..0000000 --- a/WebKit/chromium/src/js/Images/statusbarBottomBackgroundChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png b/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png Binary files differdeleted file mode 100755 index 136d5a8..0000000 --- a/WebKit/chromium/src/js/Images/statusbarButtonsChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png Binary files differdeleted file mode 100755 index 5ff61d9..0000000 --- a/WebKit/chromium/src/js/Images/statusbarMenuButtonChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Images/statusbarMenuButtonSelectedChromium.png b/WebKit/chromium/src/js/Images/statusbarMenuButtonSelectedChromium.png Binary files differdeleted file mode 100755 index 3c0aeec..0000000 --- a/WebKit/chromium/src/js/Images/statusbarMenuButtonSelectedChromium.png +++ /dev/null diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js deleted file mode 100644 index 55b24ea..0000000 --- a/WebKit/chromium/src/js/Tests.js +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/** - * @fileoverview This file contains small testing framework along with the - * test suite for the frontend. These tests are a part of the continues build - * and are executed by the devtools_sanity_unittest.cc as a part of the - * Interactive UI Test suite. - * FIXME: change field naming style to use trailing underscore. - */ - -if (window.domAutomationController) { - -var ___interactiveUiTestsMode = true; - -/** - * Test suite for interactive UI tests. - * @constructor - */ -TestSuite = function() -{ - this.controlTaken_ = false; - this.timerId_ = -1; -}; - - -/** - * Reports test failure. - * @param {string} message Failure description. - */ -TestSuite.prototype.fail = function(message) -{ - if (this.controlTaken_) - this.reportFailure_(message); - else - throw message; -}; - - -/** - * Equals assertion tests that expected === actual. - * @param {Object} expected Expected object. - * @param {Object} actual Actual object. - * @param {string} opt_message User message to print if the test fails. - */ -TestSuite.prototype.assertEquals = function(expected, actual, opt_message) -{ - if (expected !== actual) { - var message = "Expected: '" + expected + "', but was '" + actual + "'"; - if (opt_message) - message = opt_message + "(" + message + ")"; - this.fail(message); - } -}; - - -/** - * True assertion tests that value == true. - * @param {Object} value Actual object. - * @param {string} opt_message User message to print if the test fails. - */ -TestSuite.prototype.assertTrue = function(value, opt_message) -{ - this.assertEquals(true, !!value, opt_message); -}; - - -/** - * Contains assertion tests that string contains substring. - * @param {string} string Outer. - * @param {string} substring Inner. - */ -TestSuite.prototype.assertContains = function(string, substring) -{ - if (string.indexOf(substring) === -1) - this.fail("Expected to: '" + string + "' to contain '" + substring + "'"); -}; - - -/** - * Takes control over execution. - */ -TestSuite.prototype.takeControl = function() -{ - this.controlTaken_ = true; - // Set up guard timer. - var self = this; - this.timerId_ = setTimeout(function() { - self.reportFailure_("Timeout exceeded: 20 sec"); - }, 20000); -}; - - -/** - * Releases control over execution. - */ -TestSuite.prototype.releaseControl = function() -{ - if (this.timerId_ !== -1) { - clearTimeout(this.timerId_); - this.timerId_ = -1; - } - this.reportOk_(); -}; - - -/** - * Async tests use this one to report that they are completed. - */ -TestSuite.prototype.reportOk_ = function() -{ - window.domAutomationController.send("[OK]"); -}; - - -/** - * Async tests use this one to report failures. - */ -TestSuite.prototype.reportFailure_ = function(error) -{ - if (this.timerId_ !== -1) { - clearTimeout(this.timerId_); - this.timerId_ = -1; - } - window.domAutomationController.send("[FAILED] " + error); -}; - - -/** - * Runs all global functions starting with "test" as unit tests. - */ -TestSuite.prototype.runTest = function(testName) -{ - try { - this[testName](); - if (!this.controlTaken_) - this.reportOk_(); - } catch (e) { - this.reportFailure_(e); - } -}; - - -/** - * @param {string} panelName Name of the panel to show. - */ -TestSuite.prototype.showPanel = function(panelName) -{ - // Open Scripts panel. - var toolbar = document.getElementById("toolbar"); - var button = toolbar.getElementsByClassName(panelName)[0]; - button.click(); - this.assertEquals(WebInspector.panels[panelName], WebInspector.currentPanel); -}; - - -/** - * Overrides the method with specified name until it's called first time. - * @param {Object} receiver An object whose method to override. - * @param {string} methodName Name of the method to override. - * @param {Function} override A function that should be called right after the - * overriden method returns. - * @param {boolean} opt_sticky Whether restore original method after first run - * or not. - */ -TestSuite.prototype.addSniffer = function(receiver, methodName, override, opt_sticky) -{ - var orig = receiver[methodName]; - if (typeof orig !== "function") - this.fail("Cannot find method to override: " + methodName); - var test = this; - receiver[methodName] = function(var_args) { - try { - var result = orig.apply(this, arguments); - } finally { - if (!opt_sticky) - receiver[methodName] = orig; - } - // In case of exception the override won't be called. - try { - override.apply(this, arguments); - } catch (e) { - test.fail("Exception in overriden method '" + methodName + "': " + e); - } - return result; - }; -}; - - -// UI Tests - - -/** - * Tests that resources tab is enabled when corresponding item is selected. - */ -TestSuite.prototype.testEnableResourcesTab = function() -{ - this.showPanel("resources"); - - var test = this; - this.addSniffer(WebInspector, "updateResource", - function(payload) { - test.assertEquals("simple_page.html", payload.lastPathComponent); - WebInspector.panels.resources.refresh(); - WebInspector.panels.resources.revealAndSelectItem(WebInspector.resources[payload.id]); - - test.releaseControl(); - }); - - // Following call should lead to reload that we capture in the - // addResource override. - WebInspector.panels.resources._enableResourceTracking(); - - // We now have some time to report results to controller. - this.takeControl(); -}; - - -/** - * Tests that profiler works. - */ -TestSuite.prototype.testProfilerTab = function() -{ - this.showPanel("profiles"); - - var panel = WebInspector.panels.profiles; - var test = this; - - function findDisplayedNode() { - var node = panel.visibleView.profileDataGridTree.children[0]; - if (!node) { - // Profile hadn't been queried yet, re-schedule. - window.setTimeout(findDisplayedNode, 100); - return; - } - - // Iterate over displayed functions and search for a function - // that is called "fib" or "eternal_fib". If found, this will mean - // that we actually have profiled page's code. - while (node) { - if (node.functionName.indexOf("fib") !== -1) - test.releaseControl(); - node = node.traverseNextNode(true, null, true); - } - - test.fail(); - } - - function findVisibleView() { - if (!panel.visibleView) { - setTimeout(findVisibleView, 0); - return; - } - setTimeout(findDisplayedNode, 0); - } - - findVisibleView(); - this.takeControl(); -}; - - -/** - * Tests that heap profiler works. - */ -TestSuite.prototype.testHeapProfiler = function() -{ - this.showPanel("profiles"); - - var panel = WebInspector.panels.profiles; - var test = this; - - function findDisplayedNode() { - var node = panel.visibleView.dataGrid.children[0]; - if (!node) { - // Profile hadn't been queried yet, re-schedule. - window.setTimeout(findDisplayedNode, 100); - return; - } - - // Iterate over displayed functions and find node called "A" - // If found, this will mean that we actually have taken heap snapshot. - while (node) { - if (node.constructorName.indexOf("A") !== -1) { - test.releaseControl(); - return; - } - node = node.traverseNextNode(false, null, true); - } - - test.fail(); - } - - function findVisibleView() { - if (!panel.visibleView) { - setTimeout(findVisibleView, 0); - return; - } - setTimeout(findDisplayedNode, 0); - } - - WebInspector.HeapSnapshotProfileType.prototype.buttonClicked(); - findVisibleView(); - this.takeControl(); -}; - - -/** - * Tests that scripts tab can be open and populated with inspected scripts. - */ -TestSuite.prototype.testShowScriptsTab = function() -{ - this.showPanel("scripts"); - var test = this; - // There should be at least main page script. - this._waitUntilScriptsAreParsed(["debugger_test_page.html"], - function() { - test.releaseControl(); - }); - // Wait until all scripts are added to the debugger. - this.takeControl(); -}; - - -/** - * Tests that scripts tab is populated with inspected scripts even if it - * hadn't been shown by the moment inspected paged refreshed. - * @see http://crbug.com/26312 - */ -TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function() -{ - var test = this; - this.assertEquals(WebInspector.panels.elements, WebInspector.currentPanel, "Elements panel should be current one."); - - this.addSniffer(WebInspector.panels.scripts, "reset", waitUntilScriptIsParsed); - - // Reload inspected page. It will reset the debugger agent. - test.evaluateInConsole_( - "window.location.reload(true);", - function(resultText) {}); - - function waitUntilScriptIsParsed() { - test.showPanel("scripts"); - test._waitUntilScriptsAreParsed(["debugger_test_page.html"], - function() { - test.releaseControl(); - }); - } - - // Wait until all scripts are added to the debugger. - this.takeControl(); -}; - - -/** - * Tests that scripts list contains content scripts. - */ -TestSuite.prototype.testContentScriptIsPresent = function() -{ - this.showPanel("scripts"); - var test = this; - - test._waitUntilScriptsAreParsed( - ["page_with_content_script.html", "simple_content_script.js"], - function() { - test.releaseControl(); - }); - - // Wait until all scripts are added to the debugger. - this.takeControl(); -}; - - -/** - * Tests that scripts are not duplicaed on Scripts tab switch. - */ -TestSuite.prototype.testNoScriptDuplicatesOnPanelSwitch = function() -{ - var test = this; - - // There should be two scripts: one for the main page and another - // one which is source of console API(see - // InjectedScript._ensureCommandLineAPIInstalled). - var expectedScriptsCount = 2; - var parsedScripts = []; - - this.showPanel("scripts"); - - - function switchToElementsTab() { - test.showPanel("elements"); - setTimeout(switchToScriptsTab, 0); - } - - function switchToScriptsTab() { - test.showPanel("scripts"); - setTimeout(checkScriptsPanel, 0); - } - - function checkScriptsPanel() { - test.assertTrue(!!WebInspector.panels.scripts.visibleView, "No visible script view."); - test.assertTrue(test._scriptsAreParsed(["debugger_test_page.html"]), "Some scripts are missing."); - checkNoDuplicates(); - test.releaseControl(); - } - - function checkNoDuplicates() { - var scriptSelect = document.getElementById("scripts-files"); - var options = scriptSelect.options; - for (var i = 0; i < options.length; i++) { - var scriptName = options[i].text; - for (var j = i + 1; j < options.length; j++) - test.assertTrue(scriptName !== options[j].text, "Found script duplicates: " + test.optionsToString_(options)); - } - } - - test._waitUntilScriptsAreParsed( - ["debugger_test_page.html"], - function() { - checkNoDuplicates(); - setTimeout(switchToElementsTab, 0); - }); - - - // Wait until all scripts are added to the debugger. - this.takeControl(); -}; - - -// Tests that debugger works correctly if pause event occurs when DevTools -// frontend is being loaded. -TestSuite.prototype.testPauseWhenLoadingDevTools = function() -{ - this.showPanel("scripts"); - var test = this; - - var expectations = { - functionsOnStack: ["callDebugger"], - lineNumber: 8, - lineText: " debugger;" - }; - - - // Script execution can already be paused. - if (WebInspector.currentPanel.paused) { - var callFrame = WebInspector.currentPanel.sidebarPanes.callstack.selectedCallFrame; - this.assertEquals(expectations.functionsOnStack[0], callFrame.functionName); - var callbackInvoked = false; - this._checkSourceFrameWhenLoaded(expectations, function() { - callbackInvoked = true; - if (test.controlTaken_) - test.releaseControl(); - }); - if (!callbackInvoked) { - test.takeControl(); - } - return; - } - - this._waitForScriptPause( - { - functionsOnStack: ["callDebugger"], - lineNumber: 8, - lineText: " debugger;" - }, - function() { - test.releaseControl(); - }); - this.takeControl(); -}; - - -// Tests that pressing "Pause" will pause script execution if the script -// is already running. -TestSuite.prototype.testPauseWhenScriptIsRunning = function() -{ - this.showPanel("scripts"); - var test = this; - - test.evaluateInConsole_( - 'setTimeout("handleClick()" , 0)', - function(resultText) { - test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText); - testScriptPauseAfterDelay(); - }); - - // Wait for some time to make sure that inspected page is running the - // infinite loop. - function testScriptPauseAfterDelay() { - setTimeout(testScriptPause, 300); - } - - function testScriptPause() { - // The script should be in infinite loop. Click "Pause" button to - // pause it and wait for the result. - WebInspector.panels.scripts.pauseButton.click(); - - test._waitForScriptPause( - { - functionsOnStack: ["handleClick", ""], - lineNumber: 5, - lineText: " while(true) {" - }, - function() { - test.releaseControl(); - }); - } - - this.takeControl(); -}; - - -/** - * Serializes options collection to string. - * @param {HTMLOptionsCollection} options - * @return {string} - */ -TestSuite.prototype.optionsToString_ = function(options) -{ - var names = []; - for (var i = 0; i < options.length; i++) - names.push('"' + options[i].text + '"'); - return names.join(","); -}; - - -/** - * Ensures that main HTML resource is selected in Scripts panel and that its - * source frame is setup. Invokes the callback when the condition is satisfied. - * @param {HTMLOptionsCollection} options - * @param {function(WebInspector.SourceView,string)} callback - */ -TestSuite.prototype.showMainPageScriptSource_ = function(scriptName, callback) -{ - var test = this; - - var scriptSelect = document.getElementById("scripts-files"); - var options = scriptSelect.options; - - test.assertTrue(options.length, "Scripts list is empty"); - - // Select page's script if it's not current option. - var scriptResource; - if (options[scriptSelect.selectedIndex].text === scriptName) - scriptResource = options[scriptSelect.selectedIndex].representedObject; - else { - var pageScriptIndex = -1; - for (var i = 0; i < options.length; i++) { - if (options[i].text === scriptName) { - pageScriptIndex = i; - break; - } - } - test.assertTrue(-1 !== pageScriptIndex, "Script with url " + scriptName + " not found among " + test.optionsToString_(options)); - scriptResource = options[pageScriptIndex].representedObject; - - // Current panel is "Scripts". - WebInspector.currentPanel._showScriptOrResource(scriptResource); - test.assertEquals(pageScriptIndex, scriptSelect.selectedIndex, "Unexpected selected option index."); - } - - test.assertTrue(scriptResource instanceof WebInspector.Resource, - "Unexpected resource class."); - test.assertTrue(!!scriptResource.url, "Resource URL is null."); - test.assertTrue(scriptResource.url.search(scriptName + "$") !== -1, "Main HTML resource should be selected."); - - var scriptsPanel = WebInspector.panels.scripts; - - var view = scriptsPanel.visibleView; - test.assertTrue(view instanceof WebInspector.SourceView); - - if (!view.sourceFrame._loaded) { - test.addSniffer(view, "_sourceFrameSetupFinished", function(event) { - callback(view, scriptResource.url); - }); - } else - callback(view, scriptResource.url); -}; - - -/* - * Evaluates the code in the console as if user typed it manually and invokes - * the callback when the result message is received and added to the console. - * @param {string} code - * @param {function(string)} callback - */ -TestSuite.prototype.evaluateInConsole_ = function(code, callback) -{ - WebInspector.showConsole(); - WebInspector.console.prompt.text = code; - WebInspector.console.promptElement.dispatchEvent( TestSuite.createKeyEvent("Enter")); - - this.addSniffer(WebInspector.ConsoleView.prototype, "addMessage", - function(commandResult) { - callback(commandResult.toMessageElement().textContent); - }); -}; - - -/** - * Tests that console auto completion works when script execution is paused. - */ -TestSuite.prototype.testCompletionOnPause = function() -{ - this.showPanel("scripts"); - var test = this; - this._executeCodeWhenScriptsAreParsed("handleClick()", ["completion_on_pause.html"]); - - this._waitForScriptPause( - { - functionsOnStack: ["innerFunction", "handleClick", ""], - lineNumber: 9, - lineText: " debugger;" - }, - showConsole); - - function showConsole() { - if (WebInspector.currentFocusElement === WebInspector.console.promptElement) - testLocalsCompletion(); - else { - test.addSniffer(WebInspector.console, "afterShow", testLocalsCompletion); - WebInspector.showConsole(); - } - } - - function testLocalsCompletion() { - checkCompletions("th", ["parameter1", "closureLocal", "p", "createClosureLocal"], testThisCompletion); - } - - function testThisCompletion() { - checkCompletions("this.", ["field1", "field2", "m"], testFieldCompletion); - } - - function testFieldCompletion() { - checkCompletions("this.field1.", ["id", "name"], function() { test.releaseControl(); }); - } - - function checkCompletions(expression, expectedProperties, callback) { - test.addSniffer(WebInspector.console, "_reportCompletions", - function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) { - test.assertTrue(!isException, "Exception while collecting completions"); - for (var i = 0; i < expectedProperties.length; i++) { - var name = expectedProperties[i]; - test.assertTrue(result[name], "Name " + name + " not found among the completions: " + JSON.stringify(result)); - } - setTimeout(callback, 0); - }); - WebInspector.console.prompt.text = expression; - WebInspector.console.prompt.autoCompleteSoon(); - } - - this.takeControl(); -}; - - -/** - * Checks current execution line against expectations. - * @param {WebInspector.SourceFrame} sourceFrame - * @param {number} lineNumber Expected line number - * @param {string} lineContent Expected line text - */ -TestSuite.prototype._checkExecutionLine = function(sourceFrame, lineNumber, lineContent) -{ - this.assertEquals(lineNumber, sourceFrame.executionLine, "Unexpected execution line number."); - this.assertEquals(lineContent, sourceFrame._textModel.line(lineNumber - 1), "Unexpected execution line text."); -} - - -/** - * Checks that all expected scripts are present in the scripts list - * in the Scripts panel. - * @param {Array.<string>} expected Regular expressions describing - * expected script names. - * @return {boolean} Whether all the scripts are in "scripts-files" select - * box - */ -TestSuite.prototype._scriptsAreParsed = function(expected) -{ - var scriptSelect = document.getElementById("scripts-files"); - var options = scriptSelect.options; - - // Check that at least all the expected scripts are present. - var missing = expected.slice(0); - for (var i = 0 ; i < options.length; i++) { - for (var j = 0; j < missing.length; j++) { - if (options[i].text.search(missing[j]) !== -1) { - missing.splice(j, 1); - break; - } - } - } - return missing.length === 0; -}; - - -/** - * Waits for script pause, checks expectations, and invokes the callback. - * @param {Object} expectations Dictionary of expectations - * @param {function():void} callback - */ -TestSuite.prototype._waitForScriptPause = function(expectations, callback) -{ - var test = this; - // Wait until script is paused. - test.addSniffer( - WebInspector.debuggerModel, - "pausedScript", - function(details) { - var callFrames = details.callFrames; - var functionsOnStack = []; - for (var i = 0; i < callFrames.length; i++) - functionsOnStack.push(callFrames[i].functionName); - - test.assertEquals(expectations.functionsOnStack.join(","), functionsOnStack.join(","), "Unexpected stack."); - - // Check that execution line where the script is paused is - // expected one. - test._checkSourceFrameWhenLoaded(expectations, callback); - }); -}; - - -/** - * Waits for current source frame to load, checks expectations, and invokes - * the callback. - * @param {Object} expectations Dictionary of expectations - * @param {function():void} callback - */ -TestSuite.prototype._checkSourceFrameWhenLoaded = function(expectations, callback) -{ - var test = this; - - var frame = WebInspector.currentPanel.visibleView.sourceFrame; - if (frame._loaded) - checkExecLine(); - else { - setTimeout(function() { - test._checkSourceFrameWhenLoaded(expectations, callback); - }, 100); - } - function checkExecLine() { - test._checkExecutionLine(frame, expectations.lineNumber, expectations.lineText); - callback(); - } -}; - - -/** - * Waits until all the scripts are parsed and asynchronously executes the code - * in the inspected page. - */ -TestSuite.prototype._executeCodeWhenScriptsAreParsed = function(code, expectedScripts) -{ - var test = this; - - function executeFunctionInInspectedPage() { - // Since breakpoints are ignored in evals' calculate() function is - // execute after zero-timeout so that the breakpoint is hit. - test.evaluateInConsole_( - 'setTimeout("' + code + '" , 0)', - function(resultText) { - test.assertTrue(!isNaN(resultText), "Failed to get timer id: " + resultText + ". Code: " + code); - }); - } - - test._waitUntilScriptsAreParsed(expectedScripts, executeFunctionInInspectedPage); -}; - - -/** - * Waits until all the scripts are parsed and invokes the callback. - */ -TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callback) -{ - var test = this; - - function waitForAllScripts() { - if (test._scriptsAreParsed(expectedScripts)) - callback(); - else - test.addSniffer(WebInspector.debuggerModel, "parsedScriptSource", waitForAllScripts); - } - - waitForAllScripts(); -}; - - -/** - * Executes the 'code' with InjectedScriptAccess.getProperties overriden - * so that all callbacks passed to InjectedScriptAccess.getProperties are - * extended with the "hook". - * @param {Function} hook The hook function. - * @param {Function} code A code snippet to be executed. - */ -TestSuite.prototype._hookGetPropertiesCallback = function(hook, code) -{ - var accessor = InjectedScriptAccess.prototype; - var orig = accessor.getProperties; - accessor.getProperties = function(objectProxy, ignoreHasOwnProperty, abbreviate, callback) { - orig.call(this, objectProxy, ignoreHasOwnProperty, abbreviate, - function() { - callback.apply(this, arguments); - hook(); - }); - }; - try { - code(); - } finally { - accessor.getProperties = orig; - } -}; - - -/** - * Tests "Pause" button will pause debugger when a snippet is evaluated. - */ -TestSuite.prototype.testPauseInEval = function() -{ - this.showPanel("scripts"); - - var test = this; - - var pauseButton = document.getElementById("scripts-pause"); - pauseButton.click(); - - devtools.tools.evaluateJavaScript("fib(10)"); - - this.addSniffer(WebInspector.debuggerModel, "pausedScript", - function() { - test.releaseControl(); - }); - - test.takeControl(); -}; - - -/** - * Key event with given key identifier. - */ -TestSuite.createKeyEvent = function(keyIdentifier) -{ - var evt = document.createEvent("KeyboardEvent"); - evt.initKeyboardEvent("keydown", true /* can bubble */, true /* can cancel */, null /* view */, keyIdentifier, ""); - return evt; -}; - - -/** - * Test runner for the test suite. - */ -var uiTests = {}; - - -/** - * Run each test from the test suit on a fresh instance of the suite. - */ -uiTests.runAllTests = function() -{ - // For debugging purposes. - for (var name in TestSuite.prototype) { - if (name.substring(0, 4) === "test" && typeof TestSuite.prototype[name] === "function") - uiTests.runTest(name); - } -}; - - -/** - * Run specified test on a fresh instance of the test suite. - * @param {string} name Name of a test method from TestSuite class. - */ -uiTests.runTest = function(name) -{ - if (uiTests._populatedInterface) - new TestSuite().runTest(name); - else - uiTests._pendingTestName = name; -}; - -(function() { - -function runTests() -{ - uiTests._populatedInterface = true; - var name = uiTests._pendingTestName; - delete uiTests._pendingTestName; - if (name) - new TestSuite().runTest(name); -} - -var oldShowElementsPanel = WebInspector.showElementsPanel; -WebInspector.showElementsPanel = function() -{ - oldShowElementsPanel.call(this); - runTests(); -} - -var oldShowPanel = WebInspector.showPanel; -WebInspector.showPanel = function(name) -{ - oldShowPanel.call(this, name); - runTests(); -} - -})(); - -} diff --git a/WebKit/chromium/src/js/devTools.css b/WebKit/chromium/src/js/devTools.css deleted file mode 100644 index 64ea9d5..0000000 --- a/WebKit/chromium/src/js/devTools.css +++ /dev/null @@ -1,117 +0,0 @@ -.data-grid table { - line-height: 120%; -} - -body.attached #toolbar { - height: 34px; - border-top: 1px solid rgb(100, 100, 100); - cursor: default; /* overriden */ - padding-left: 0; -} - -/* Chrome theme overrides */ - -body.platform-windows #toolbar, body.platform-windows.inactive #toolbar { - background-image: none; -} - -body.detached.platform-mac-leopard #toolbar { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(175, 175, 175)), to(rgb(151, 151, 151))) !important; -} - -body.detached.platform-mac-leopard.inactive #toolbar { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(221, 221, 221)), to(rgb(207, 207, 207))) !important; -} - -body.detached.platform-mac-snowleopard #toolbar { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(189, 189, 189)), to(rgb(151, 151, 151))) !important; -} - -body.detached.platform-mac-snowleopard.inactive #toolbar { - background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(215, 215, 215)), to(rgb(207, 207, 207))) !important; -} - -body.platform-linux #scripts-files { - font-size: 11px; - font-weight: normal; - line-height: 12px; -} - -.console-group-messages .section > .header { - padding: 0 8px 0 0; - background-image: none; - border: none; - min-height: 0; -} - -#resources-filter { - background: -webkit-gradient(linear, left top, left bottom, from(rgb(233, 233, 233)), to(rgb(233, 233, 233))); -} - -.crumbs .crumb { - -webkit-border-image: url(Images/segmentChromium.png) 0 12 0 2; - margin-right: -3px; - padding-left: 6px; -} - -.crumbs .crumb.selected { - -webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2; - color: white; - text-shadow: rgba(255, 255, 255, 0.5) 0 0px 0; -} - -.crumbs .crumb.selected:hover { - -webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2; -} - -.crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover { - -webkit-border-image: url(Images/segmentSelectedEndChromium.png) 0 2 0 2; -} - -.crumbs .crumb:hover { - -webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2; -} - -.crumbs .crumb.dimmed:hover { - -webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2; -} - -.crumbs .crumb.end:hover { - -webkit-border-image: url(Images/segmentHoverEndChromium.png) 0 2 0 2; -} - -body.drawer-visible #main-status-bar { - background-image: url(Images/statusbarResizerVertical.png), url(Images/statusbarBackgroundChromium.png); -} - -.status-bar { - background-image: url(Images/statusbarBackgroundChromium.png); -} - -button.status-bar-item { - background-image: url(Images/statusbarButtonsChromium.png); -} - -select.status-bar-item:active { - -webkit-border-image: url(Images/statusbarMenuButtonSelectedChromium.png) 0 17 0 2; -} - -#drawer { - background-image: url(Images/statusbarBottomBackgroundChromium.png); -} - -select.status-bar-item { - -webkit-border-image: url(Images/statusbarMenuButtonChromium.png) 0 17 0 2; -} - -.scope-bar li.selected { - -webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0); -} - -.scope-bar li:active { - -webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0); -} - -.timeline-category-statusbar-item input { - vertical-align: middle; -} diff --git a/WebKit/chromium/src/linux/WebFontRenderStyle.cpp b/WebKit/chromium/src/linux/WebFontRenderStyle.cpp deleted file mode 100644 index 0b864d1..0000000 --- a/WebKit/chromium/src/linux/WebFontRenderStyle.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontRenderStyle.h" - -#include "FontRenderStyle.h" - -using WebCore::FontRenderStyle; - -namespace WebKit { - -void WebFontRenderStyle::toFontRenderStyle(FontRenderStyle* out) -{ - out->useBitmaps = useBitmaps; - out->useAutoHint = useAutoHint; - out->useHinting = useHinting; - out->hintStyle = hintStyle; - out->useAntiAlias = useAntiAlias; - out->useSubpixel = useSubpixel; -} - -void WebFontRenderStyle::setDefaults() -{ - useBitmaps = 2; - useAutoHint = 2; - useHinting = 2; - hintStyle = 0; - useAntiAlias = 2; - useSubpixel = 2; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/linux/WebFontRendering.cpp b/WebKit/chromium/src/linux/WebFontRendering.cpp deleted file mode 100644 index b9862f5..0000000 --- a/WebKit/chromium/src/linux/WebFontRendering.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebFontRendering.h" - -#include "FontPlatformData.h" - -using WebCore::FontPlatformData; - -namespace WebKit { - -// static -void WebFontRendering::setHinting(SkPaint::Hinting hinting) -{ - FontPlatformData::setHinting(hinting); -} - -// static -void WebFontRendering::setAntiAlias(bool isAntiAlias) -{ - FontPlatformData::setAntiAlias(isAntiAlias); -} - -// static -void WebFontRendering::setSubpixelGlyphs(bool isSubpixelGlyphs) -{ - FontPlatformData::setSubpixelGlyphs(isSubpixelGlyphs); -} - -// static -void WebFontRendering::setLCDOrder(SkFontHost::LCDOrder order) -{ - SkFontHost::SetSubpixelOrder(order); -} - -// static -void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) -{ - SkFontHost::SetSubpixelOrientation(orientation); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/linux/WebRenderTheme.cpp b/WebKit/chromium/src/linux/WebRenderTheme.cpp deleted file mode 100644 index 16ea22c..0000000 --- a/WebKit/chromium/src/linux/WebRenderTheme.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2010 Joel Stanley. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebRenderTheme.h" - -#include "RenderThemeChromiumLinux.h" -#include "WebView.h" - -using WebCore::RenderTheme; -using WebCore::RenderThemeChromiumLinux; - -namespace WebKit { - -void setCaretBlinkInterval(double interval) -{ - RenderThemeChromiumLinux::setCaretBlinkInterval(interval); -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/mac/WebInputEventFactory.mm b/WebKit/chromium/src/mac/WebInputEventFactory.mm deleted file mode 100644 index 55883c9..0000000 --- a/WebKit/chromium/src/mac/WebInputEventFactory.mm +++ /dev/null @@ -1,1206 +0,0 @@ -/* - * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. - * Copyright (C) 2006-2009 Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputEventFactory.h" - -#include <ApplicationServices/ApplicationServices.h> -#import <Cocoa/Cocoa.h> - -#include "WebInputEvent.h" -#include <wtf/ASCIICType.h> - -namespace WebKit { - -// WebKeyboardEvent ----------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// Begin Apple code, copied from KeyEventMac.mm -// -// We can share some of this code if we factored it out of KeyEventMac, but -// the main problem is that it relies on the NSString ctor on String for -// conversions, and since we're building without PLATFORM(MAC), we don't have -// that. As a result we have to use NSString here exclusively and thus tweak -// the code so it's not re-usable as-is. One possiblity would be to make the -// upstream code only use NSString, but I'm not certain how far that change -// would propagate. - -static inline bool isKeyUpEvent(NSEvent* event) -{ - if ([event type] != NSFlagsChanged) - return [event type] == NSKeyUp; - // FIXME: This logic fails if the user presses both Shift keys at once, for example: - // we treat releasing one of them as keyDown. - switch ([event keyCode]) { - case 54: // Right Command - case 55: // Left Command - return ([event modifierFlags] & NSCommandKeyMask) == 0; - - case 57: // Capslock - return ([event modifierFlags] & NSAlphaShiftKeyMask) == 0; - - case 56: // Left Shift - case 60: // Right Shift - return ([event modifierFlags] & NSShiftKeyMask) == 0; - - case 58: // Left Alt - case 61: // Right Alt - return ([event modifierFlags] & NSAlternateKeyMask) == 0; - - case 59: // Left Ctrl - case 62: // Right Ctrl - return ([event modifierFlags] & NSControlKeyMask) == 0; - - case 63: // Function - return ([event modifierFlags] & NSFunctionKeyMask) == 0; - } - return false; -} - -static bool isKeypadEvent(NSEvent* event) -{ - // Check that this is the type of event that has a keyCode. - switch ([event type]) { - case NSKeyDown: - case NSKeyUp: - case NSFlagsChanged: - break; - default: - return false; - } - - if ([event modifierFlags] & NSNumericPadKeyMask) - return true; - - switch ([event keyCode]) { - case 71: // Clear - case 81: // = - case 75: // / - case 67: // * - case 78: // - - case 69: // + - case 76: // Enter - case 65: // . - case 82: // 0 - case 83: // 1 - case 84: // 2 - case 85: // 3 - case 86: // 4 - case 87: // 5 - case 88: // 6 - case 89: // 7 - case 91: // 8 - case 92: // 9 - return true; - } - - return false; -} - -static int windowsKeyCodeForKeyEvent(NSEvent* event) -{ - switch ([event keyCode]) { - // VK_TAB (09) TAB key - case 48: - return 0x09; - - // VK_APPS (5D) Right windows/meta key - case 54: // Right Command - return 0x5D; - - // VK_LWIN (5B) Left windows/meta key - case 55: // Left Command - return 0x5B; - - // VK_CAPITAL (14) caps locks key - case 57: // Capslock - return 0x14; - - // VK_SHIFT (10) either shift key - case 56: // Left Shift - case 60: // Right Shift - return 0x10; - - // VK_MENU (12) either alt key - case 58: // Left Alt - case 61: // Right Alt - return 0x12; - - // VK_CONTROL (11) either ctrl key - case 59: // Left Ctrl - case 62: // Right Ctrl - return 0x11; - -// Begin non-Apple addition --------------------------------------------------- - case 63: // Function (no Windows key code) - return 0; -// End non-Apple addition ----------------------------------------------------- - - // VK_CLEAR (0C) CLEAR key - case 71: return 0x0C; - - // VK_NUMPAD0 (60) Numeric keypad 0 key - case 82: return 0x60; - // VK_NUMPAD1 (61) Numeric keypad 1 key - case 83: return 0x61; - // VK_NUMPAD2 (62) Numeric keypad 2 key - case 84: return 0x62; - // VK_NUMPAD3 (63) Numeric keypad 3 key - case 85: return 0x63; - // VK_NUMPAD4 (64) Numeric keypad 4 key - case 86: return 0x64; - // VK_NUMPAD5 (65) Numeric keypad 5 key - case 87: return 0x65; - // VK_NUMPAD6 (66) Numeric keypad 6 key - case 88: return 0x66; - // VK_NUMPAD7 (67) Numeric keypad 7 key - case 89: return 0x67; - // VK_NUMPAD8 (68) Numeric keypad 8 key - case 91: return 0x68; - // VK_NUMPAD9 (69) Numeric keypad 9 key - case 92: return 0x69; - // VK_MULTIPLY (6A) Multiply key - case 67: return 0x6A; - // VK_ADD (6B) Add key - case 69: return 0x6B; - - // VK_SUBTRACT (6D) Subtract key - case 78: return 0x6D; - // VK_DECIMAL (6E) Decimal key - case 65: return 0x6E; - // VK_DIVIDE (6F) Divide key - case 75: return 0x6F; - } - -// Begin non-Apple addition --------------------------------------------------- - // |-[NSEvent charactersIgnoringModifiers]| isn't allowed for - // NSFlagsChanged, and conceivably we may not have caught everything - // which causes an NSFlagsChanged above. - if ([event type] == NSFlagsChanged) - return 0; -// End non-Apple addition ----------------------------------------------------- - - NSString* s = [event charactersIgnoringModifiers]; - if ([s length] != 1) - return 0; - - switch ([s characterAtIndex:0]) { - // VK_LBUTTON (01) Left mouse button - // VK_RBUTTON (02) Right mouse button - // VK_CANCEL (03) Control-break processing - // VK_MBUTTON (04) Middle mouse button (three-button mouse) - // VK_XBUTTON1 (05) - // VK_XBUTTON2 (06) - - // VK_BACK (08) BACKSPACE key - case 8: case 0x7F: return 0x08; - // VK_TAB (09) TAB key - case 9: return 0x09; - - // VK_CLEAR (0C) CLEAR key - // handled by key code above - - // VK_RETURN (0D) - case 0xD: case 3: return 0x0D; - - // VK_SHIFT (10) SHIFT key - // VK_CONTROL (11) CTRL key - // VK_MENU (12) ALT key - - // VK_PAUSE (13) PAUSE key - case NSPauseFunctionKey: return 0x13; - - // VK_CAPITAL (14) CAPS LOCK key - // VK_KANA (15) Input Method Editor (IME) Kana mode - // VK_HANGUEL (15) IME Hanguel mode (maintained for compatibility; use VK_HANGUL) - // VK_HANGUL (15) IME Hangul mode - // VK_JUNJA (17) IME Junja mode - // VK_FINAL (18) IME final mode - // VK_HANJA (19) IME Hanja mode - // VK_KANJI (19) IME Kanji mode - - // VK_ESCAPE (1B) ESC key - case 0x1B: return 0x1B; - - // VK_CONVERT (1C) IME convert - // VK_NONCONVERT (1D) IME nonconvert - // VK_ACCEPT (1E) IME accept - // VK_MODECHANGE (1F) IME mode change request - - // VK_SPACE (20) SPACEBAR - case ' ': return 0x20; - // VK_PRIOR (21) PAGE UP key - case NSPageUpFunctionKey: return 0x21; - // VK_NEXT (22) PAGE DOWN key - case NSPageDownFunctionKey: return 0x22; - // VK_END (23) END key - case NSEndFunctionKey: return 0x23; - // VK_HOME (24) HOME key - case NSHomeFunctionKey: return 0x24; - // VK_LEFT (25) LEFT ARROW key - case NSLeftArrowFunctionKey: return 0x25; - // VK_UP (26) UP ARROW key - case NSUpArrowFunctionKey: return 0x26; - // VK_RIGHT (27) RIGHT ARROW key - case NSRightArrowFunctionKey: return 0x27; - // VK_DOWN (28) DOWN ARROW key - case NSDownArrowFunctionKey: return 0x28; - // VK_SELECT (29) SELECT key - case NSSelectFunctionKey: return 0x29; - // VK_PRINT (2A) PRINT key - case NSPrintFunctionKey: return 0x2A; - // VK_EXECUTE (2B) EXECUTE key - case NSExecuteFunctionKey: return 0x2B; - // VK_SNAPSHOT (2C) PRINT SCREEN key - case NSPrintScreenFunctionKey: return 0x2C; - // VK_INSERT (2D) INS key - case NSInsertFunctionKey: case NSHelpFunctionKey: return 0x2D; - // VK_DELETE (2E) DEL key - case NSDeleteFunctionKey: return 0x2E; - - // VK_HELP (2F) HELP key - - // (30) 0 key - case '0': case ')': return 0x30; - // (31) 1 key - case '1': case '!': return 0x31; - // (32) 2 key - case '2': case '@': return 0x32; - // (33) 3 key - case '3': case '#': return 0x33; - // (34) 4 key - case '4': case '$': return 0x34; - // (35) 5 key - case '5': case '%': return 0x35; - // (36) 6 key - case '6': case '^': return 0x36; - // (37) 7 key - case '7': case '&': return 0x37; - // (38) 8 key - case '8': case '*': return 0x38; - // (39) 9 key - case '9': case '(': return 0x39; - // (41) A key - case 'a': case 'A': return 0x41; - // (42) B key - case 'b': case 'B': return 0x42; - // (43) C key - case 'c': case 'C': return 0x43; - // (44) D key - case 'd': case 'D': return 0x44; - // (45) E key - case 'e': case 'E': return 0x45; - // (46) F key - case 'f': case 'F': return 0x46; - // (47) G key - case 'g': case 'G': return 0x47; - // (48) H key - case 'h': case 'H': return 0x48; - // (49) I key - case 'i': case 'I': return 0x49; - // (4A) J key - case 'j': case 'J': return 0x4A; - // (4B) K key - case 'k': case 'K': return 0x4B; - // (4C) L key - case 'l': case 'L': return 0x4C; - // (4D) M key - case 'm': case 'M': return 0x4D; - // (4E) N key - case 'n': case 'N': return 0x4E; - // (4F) O key - case 'o': case 'O': return 0x4F; - // (50) P key - case 'p': case 'P': return 0x50; - // (51) Q key - case 'q': case 'Q': return 0x51; - // (52) R key - case 'r': case 'R': return 0x52; - // (53) S key - case 's': case 'S': return 0x53; - // (54) T key - case 't': case 'T': return 0x54; - // (55) U key - case 'u': case 'U': return 0x55; - // (56) V key - case 'v': case 'V': return 0x56; - // (57) W key - case 'w': case 'W': return 0x57; - // (58) X key - case 'x': case 'X': return 0x58; - // (59) Y key - case 'y': case 'Y': return 0x59; - // (5A) Z key - case 'z': case 'Z': return 0x5A; - - // VK_LWIN (5B) Left Windows key (Microsoft Natural keyboard) - // VK_RWIN (5C) Right Windows key (Natural keyboard) - // VK_APPS (5D) Applications key (Natural keyboard) - // VK_SLEEP (5F) Computer Sleep key - - // VK_NUMPAD0 (60) Numeric keypad 0 key - // VK_NUMPAD1 (61) Numeric keypad 1 key - // VK_NUMPAD2 (62) Numeric keypad 2 key - // VK_NUMPAD3 (63) Numeric keypad 3 key - // VK_NUMPAD4 (64) Numeric keypad 4 key - // VK_NUMPAD5 (65) Numeric keypad 5 key - // VK_NUMPAD6 (66) Numeric keypad 6 key - // VK_NUMPAD7 (67) Numeric keypad 7 key - // VK_NUMPAD8 (68) Numeric keypad 8 key - // VK_NUMPAD9 (69) Numeric keypad 9 key - // VK_MULTIPLY (6A) Multiply key - // VK_ADD (6B) Add key - // handled by key code above - - // VK_SEPARATOR (6C) Separator key - - // VK_SUBTRACT (6D) Subtract key - // VK_DECIMAL (6E) Decimal key - // VK_DIVIDE (6F) Divide key - // handled by key code above - - // VK_F1 (70) F1 key - case NSF1FunctionKey: return 0x70; - // VK_F2 (71) F2 key - case NSF2FunctionKey: return 0x71; - // VK_F3 (72) F3 key - case NSF3FunctionKey: return 0x72; - // VK_F4 (73) F4 key - case NSF4FunctionKey: return 0x73; - // VK_F5 (74) F5 key - case NSF5FunctionKey: return 0x74; - // VK_F6 (75) F6 key - case NSF6FunctionKey: return 0x75; - // VK_F7 (76) F7 key - case NSF7FunctionKey: return 0x76; - // VK_F8 (77) F8 key - case NSF8FunctionKey: return 0x77; - // VK_F9 (78) F9 key - case NSF9FunctionKey: return 0x78; - // VK_F10 (79) F10 key - case NSF10FunctionKey: return 0x79; - // VK_F11 (7A) F11 key - case NSF11FunctionKey: return 0x7A; - // VK_F12 (7B) F12 key - case NSF12FunctionKey: return 0x7B; - // VK_F13 (7C) F13 key - case NSF13FunctionKey: return 0x7C; - // VK_F14 (7D) F14 key - case NSF14FunctionKey: return 0x7D; - // VK_F15 (7E) F15 key - case NSF15FunctionKey: return 0x7E; - // VK_F16 (7F) F16 key - case NSF16FunctionKey: return 0x7F; - // VK_F17 (80H) F17 key - case NSF17FunctionKey: return 0x80; - // VK_F18 (81H) F18 key - case NSF18FunctionKey: return 0x81; - // VK_F19 (82H) F19 key - case NSF19FunctionKey: return 0x82; - // VK_F20 (83H) F20 key - case NSF20FunctionKey: return 0x83; - // VK_F21 (84H) F21 key - case NSF21FunctionKey: return 0x84; - // VK_F22 (85H) F22 key - case NSF22FunctionKey: return 0x85; - // VK_F23 (86H) F23 key - case NSF23FunctionKey: return 0x86; - // VK_F24 (87H) F24 key - case NSF24FunctionKey: return 0x87; - - // VK_NUMLOCK (90) NUM LOCK key - - // VK_SCROLL (91) SCROLL LOCK key - case NSScrollLockFunctionKey: return 0x91; - - // VK_LSHIFT (A0) Left SHIFT key - // VK_RSHIFT (A1) Right SHIFT key - // VK_LCONTROL (A2) Left CONTROL key - // VK_RCONTROL (A3) Right CONTROL key - // VK_LMENU (A4) Left MENU key - // VK_RMENU (A5) Right MENU key - // VK_BROWSER_BACK (A6) Windows 2000/XP: Browser Back key - // VK_BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key - // VK_BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key - // VK_BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key - // VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key - // VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key - // VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key - // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key - // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key - // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key - // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key - // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key - // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key - // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key - // VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key - // VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key - // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key - // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key - - // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key - case ';': case ':': return 0xBA; - // VK_OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key - case '=': case '+': return 0xBB; - // VK_OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key - case ',': case '<': return 0xBC; - // VK_OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key - case '-': case '_': return 0xBD; - // VK_OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key - case '.': case '>': return 0xBE; - // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key - case '/': case '?': return 0xBF; - // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key - case '`': case '~': return 0xC0; - // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key - case '[': case '{': return 0xDB; - // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key - case '\\': case '|': return 0xDC; - // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key - case ']': case '}': return 0xDD; - // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key - case '\'': case '"': return 0xDE; - - // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. - // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard - // VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key - // VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP - // VK_ATTN (F6) Attn key - // VK_CRSEL (F7) CrSel key - // VK_EXSEL (F8) ExSel key - // VK_EREOF (F9) Erase EOF key - // VK_PLAY (FA) Play key - // VK_ZOOM (FB) Zoom key - // VK_NONAME (FC) Reserved for future use - // VK_PA1 (FD) PA1 key - // VK_OEM_CLEAR (FE) Clear key - } - - return 0; -} - -static inline NSString* textFromEvent(NSEvent* event) -{ - if ([event type] == NSFlagsChanged) - return @""; - return [event characters]; -} - -static inline NSString* unmodifiedTextFromEvent(NSEvent* event) -{ - if ([event type] == NSFlagsChanged) - return @""; - return [event charactersIgnoringModifiers]; -} - -static NSString* keyIdentifierForKeyEvent(NSEvent* event) -{ - if ([event type] == NSFlagsChanged) { - switch ([event keyCode]) { - case 54: // Right Command - case 55: // Left Command - return @"Meta"; - - case 57: // Capslock - return @"CapsLock"; - - case 56: // Left Shift - case 60: // Right Shift - return @"Shift"; - - case 58: // Left Alt - case 61: // Right Alt - return @"Alt"; - - case 59: // Left Ctrl - case 62: // Right Ctrl - return @"Control"; - -// Begin non-Apple addition/modification -------------------------------------- - case 63: // Function - return @"Function"; - - default: // Unknown, but this may be a strange/new keyboard. - return @"Unidentified"; -// End non-Apple addition/modification ---------------------------------------- - } - } - - NSString* s = [event charactersIgnoringModifiers]; - if ([s length] != 1) - return @"Unidentified"; - - unichar c = [s characterAtIndex:0]; - switch (c) { - // Each identifier listed in the DOM spec is listed here. - // Many are simply commented out since they do not appear on standard Macintosh keyboards - // or are on a key that doesn't have a corresponding character. - - // "Accept" - // "AllCandidates" - - // "Alt" - case NSMenuFunctionKey: - return @"Alt"; - - // "Apps" - // "BrowserBack" - // "BrowserForward" - // "BrowserHome" - // "BrowserRefresh" - // "BrowserSearch" - // "BrowserStop" - // "CapsLock" - - // "Clear" - case NSClearLineFunctionKey: - return @"Clear"; - - // "CodeInput" - // "Compose" - // "Control" - // "Crsel" - // "Convert" - // "Copy" - // "Cut" - - // "Down" - case NSDownArrowFunctionKey: - return @"Down"; - // "End" - case NSEndFunctionKey: - return @"End"; - // "Enter" - case 0x3: case 0xA: case 0xD: // Macintosh calls the one on the main keyboard Return, but Windows calls it Enter, so we'll do the same for the DOM - return @"Enter"; - - // "EraseEof" - - // "Execute" - case NSExecuteFunctionKey: - return @"Execute"; - - // "Exsel" - - // "F1" - case NSF1FunctionKey: - return @"F1"; - // "F2" - case NSF2FunctionKey: - return @"F2"; - // "F3" - case NSF3FunctionKey: - return @"F3"; - // "F4" - case NSF4FunctionKey: - return @"F4"; - // "F5" - case NSF5FunctionKey: - return @"F5"; - // "F6" - case NSF6FunctionKey: - return @"F6"; - // "F7" - case NSF7FunctionKey: - return @"F7"; - // "F8" - case NSF8FunctionKey: - return @"F8"; - // "F9" - case NSF9FunctionKey: - return @"F9"; - // "F10" - case NSF10FunctionKey: - return @"F10"; - // "F11" - case NSF11FunctionKey: - return @"F11"; - // "F12" - case NSF12FunctionKey: - return @"F12"; - // "F13" - case NSF13FunctionKey: - return @"F13"; - // "F14" - case NSF14FunctionKey: - return @"F14"; - // "F15" - case NSF15FunctionKey: - return @"F15"; - // "F16" - case NSF16FunctionKey: - return @"F16"; - // "F17" - case NSF17FunctionKey: - return @"F17"; - // "F18" - case NSF18FunctionKey: - return @"F18"; - // "F19" - case NSF19FunctionKey: - return @"F19"; - // "F20" - case NSF20FunctionKey: - return @"F20"; - // "F21" - case NSF21FunctionKey: - return @"F21"; - // "F22" - case NSF22FunctionKey: - return @"F22"; - // "F23" - case NSF23FunctionKey: - return @"F23"; - // "F24" - case NSF24FunctionKey: - return @"F24"; - - // "FinalMode" - - // "Find" - case NSFindFunctionKey: - return @"Find"; - - // "FullWidth" - // "HalfWidth" - // "HangulMode" - // "HanjaMode" - - // "Help" - case NSHelpFunctionKey: - return @"Help"; - - // "Hiragana" - - // "Home" - case NSHomeFunctionKey: - return @"Home"; - // "Insert" - case NSInsertFunctionKey: - return @"Insert"; - - // "JapaneseHiragana" - // "JapaneseKatakana" - // "JapaneseRomaji" - // "JunjaMode" - // "KanaMode" - // "KanjiMode" - // "Katakana" - // "LaunchApplication1" - // "LaunchApplication2" - // "LaunchMail" - - // "Left" - case NSLeftArrowFunctionKey: - return @"Left"; - - // "Meta" - // "MediaNextTrack" - // "MediaPlayPause" - // "MediaPreviousTrack" - // "MediaStop" - - // "ModeChange" - case NSModeSwitchFunctionKey: - return @"ModeChange"; - - // "Nonconvert" - // "NumLock" - - // "PageDown" - case NSPageDownFunctionKey: - return @"PageDown"; - // "PageUp" - case NSPageUpFunctionKey: - return @"PageUp"; - - // "Paste" - - // "Pause" - case NSPauseFunctionKey: - return @"Pause"; - - // "Play" - // "PreviousCandidate" - - // "PrintScreen" - case NSPrintScreenFunctionKey: - return @"PrintScreen"; - - // "Process" - // "Props" - - // "Right" - case NSRightArrowFunctionKey: - return @"Right"; - - // "RomanCharacters" - - // "Scroll" - case NSScrollLockFunctionKey: - return @"Scroll"; - // "Select" - case NSSelectFunctionKey: - return @"Select"; - - // "SelectMedia" - // "Shift" - - // "Stop" - case NSStopFunctionKey: - return @"Stop"; - // "Up" - case NSUpArrowFunctionKey: - return @"Up"; - // "Undo" - case NSUndoFunctionKey: - return @"Undo"; - - // "VolumeDown" - // "VolumeMute" - // "VolumeUp" - // "Win" - // "Zoom" - - // More function keys, not in the key identifier specification. - case NSF25FunctionKey: - return @"F25"; - case NSF26FunctionKey: - return @"F26"; - case NSF27FunctionKey: - return @"F27"; - case NSF28FunctionKey: - return @"F28"; - case NSF29FunctionKey: - return @"F29"; - case NSF30FunctionKey: - return @"F30"; - case NSF31FunctionKey: - return @"F31"; - case NSF32FunctionKey: - return @"F32"; - case NSF33FunctionKey: - return @"F33"; - case NSF34FunctionKey: - return @"F34"; - case NSF35FunctionKey: - return @"F35"; - - // Turn 0x7F into 0x08, because backspace needs to always be 0x08. - case 0x7F: - return @"U+0008"; - // Standard says that DEL becomes U+007F. - case NSDeleteFunctionKey: - return @"U+007F"; - - // Always use 0x09 for tab instead of AppKit's backtab character. - case NSBackTabCharacter: - return @"U+0009"; - - case NSBeginFunctionKey: - case NSBreakFunctionKey: - case NSClearDisplayFunctionKey: - case NSDeleteCharFunctionKey: - case NSDeleteLineFunctionKey: - case NSInsertCharFunctionKey: - case NSInsertLineFunctionKey: - case NSNextFunctionKey: - case NSPrevFunctionKey: - case NSPrintFunctionKey: - case NSRedoFunctionKey: - case NSResetFunctionKey: - case NSSysReqFunctionKey: - case NSSystemFunctionKey: - case NSUserFunctionKey: - // FIXME: We should use something other than the vendor-area Unicode values for the above keys. - // For now, just fall through to the default. - default: - return [NSString stringWithFormat:@"U+%04X", WTF::toASCIIUpper(c)]; - } -} - -// End Apple code. -// ---------------------------------------------------------------------------- - -static inline int modifiersFromEvent(NSEvent* event) { - int modifiers = 0; - - if ([event modifierFlags] & NSControlKeyMask) - modifiers |= WebInputEvent::ControlKey; - if ([event modifierFlags] & NSShiftKeyMask) - modifiers |= WebInputEvent::ShiftKey; - if ([event modifierFlags] & NSAlternateKeyMask) - modifiers |= WebInputEvent::AltKey; - if ([event modifierFlags] & NSCommandKeyMask) - modifiers |= WebInputEvent::MetaKey; - if ([event modifierFlags] & NSAlphaShiftKeyMask) - modifiers |= WebInputEvent::CapsLockOn; - // TODO(port): Set mouse button states - - return modifiers; -} - -static inline void setWebEventLocationFromEventInView(WebMouseEvent* result, - NSEvent* event, - NSView* view) { - NSPoint windowLocal = [event locationInWindow]; - - NSPoint screenLocal = [[view window] convertBaseToScreen:windowLocal]; - result->globalX = screenLocal.x; - // Flip y. - NSScreen* primaryScreen = ([[NSScreen screens] count] > 0) ? - [[NSScreen screens] objectAtIndex:0] : nil; - if (primaryScreen) - result->globalY = [primaryScreen frame].size.height - screenLocal.y; - else - result->globalY = screenLocal.y; - - NSPoint contentLocal = [view convertPoint:windowLocal fromView:nil]; - result->x = contentLocal.x; - result->y = [view frame].size.height - contentLocal.y; // Flip y. - - result->windowX = result->x; - result->windowY = result->y; -} - -WebKeyboardEvent WebInputEventFactory::keyboardEvent(NSEvent* event) -{ - WebKeyboardEvent result; - - result.type = - isKeyUpEvent(event) ? WebInputEvent::KeyUp : WebInputEvent::RawKeyDown; - - result.modifiers = modifiersFromEvent(event); - - if (isKeypadEvent(event)) - result.modifiers |= WebInputEvent::IsKeyPad; - - if (([event type] != NSFlagsChanged) && [event isARepeat]) - result.modifiers |= WebInputEvent::IsAutoRepeat; - - result.windowsKeyCode = windowsKeyCodeForKeyEvent(event); - result.nativeKeyCode = [event keyCode]; - - NSString* textStr = textFromEvent(event); - NSString* unmodifiedStr = unmodifiedTextFromEvent(event); - NSString* identifierStr = keyIdentifierForKeyEvent(event); - - // Begin Apple code, copied from KeyEventMac.mm - - // Always use 13 for Enter/Return -- we don't want to use AppKit's - // different character for Enter. - if (result.windowsKeyCode == '\r') { - textStr = @"\r"; - unmodifiedStr = @"\r"; - } - - // The adjustments below are only needed in backward compatibility mode, - // but we cannot tell what mode we are in from here. - - // Turn 0x7F into 8, because backspace needs to always be 8. - if ([textStr isEqualToString:@"\x7F"]) - textStr = @"\x8"; - if ([unmodifiedStr isEqualToString:@"\x7F"]) - unmodifiedStr = @"\x8"; - // Always use 9 for tab -- we don't want to use AppKit's different character - // for shift-tab. - if (result.windowsKeyCode == 9) { - textStr = @"\x9"; - unmodifiedStr = @"\x9"; - } - - // End Apple code. - - if ([textStr length] < WebKeyboardEvent::textLengthCap && - [unmodifiedStr length] < WebKeyboardEvent::textLengthCap) { - [textStr getCharacters:&result.text[0]]; - [unmodifiedStr getCharacters:&result.unmodifiedText[0]]; - } else - ASSERT_NOT_REACHED(); - - [identifierStr getCString:&result.keyIdentifier[0] - maxLength:sizeof(result.keyIdentifier) - encoding:NSASCIIStringEncoding]; - - result.timeStampSeconds = [event timestamp]; - - // Windows and Linux set |isSystemKey| if alt is down. WebKit looks at this - // flag to decide if it should handle a key or not. E.g. alt-left/right - // shouldn't be used by WebKit to scroll the current page, because we want - // to get that key back for it to do history navigation. Hence, the - // corresponding situation on OS X is to set this for cmd key presses. - if (result.modifiers & WebInputEvent::MetaKey) - result.isSystemKey = true; - - return result; -} - -WebKeyboardEvent WebInputEventFactory::keyboardEvent(wchar_t character, - int modifiers, - double timeStampSeconds) -{ - // keyboardEvent(NSEvent*) depends on the NSEvent object and - // it is hard to use it from methods of the NSTextInput protocol. For - // such methods, this function creates a WebInputEvent::Char event without - // using a NSEvent object. - WebKeyboardEvent result; - result.type = WebKit::WebInputEvent::Char; - result.timeStampSeconds = timeStampSeconds; - result.modifiers = modifiers; - result.windowsKeyCode = character; - result.nativeKeyCode = character; - result.text[0] = character; - result.unmodifiedText[0] = character; - - // Windows and Linux set |isSystemKey| if alt is down. WebKit looks at this - // flag to decide if it should handle a key or not. E.g. alt-left/right - // shouldn't be used by WebKit to scroll the current page, because we want - // to get that key back for it to do history navigation. Hence, the - // corresponding situation on OS X is to set this for cmd key presses. - if (result.modifiers & WebInputEvent::MetaKey) - result.isSystemKey = true; - - return result; -} - -// WebMouseEvent -------------------------------------------------------------- - -WebMouseEvent WebInputEventFactory::mouseEvent(NSEvent* event, NSView* view) -{ - WebMouseEvent result; - - result.clickCount = 0; - - switch ([event type]) { - case NSMouseExited: - result.type = WebInputEvent::MouseLeave; - result.button = WebMouseEvent::ButtonNone; - break; - case NSLeftMouseDown: - result.type = WebInputEvent::MouseDown; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonLeft; - break; - case NSOtherMouseDown: - result.type = WebInputEvent::MouseDown; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonMiddle; - break; - case NSRightMouseDown: - result.type = WebInputEvent::MouseDown; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonRight; - break; - case NSLeftMouseUp: - result.type = WebInputEvent::MouseUp; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonLeft; - break; - case NSOtherMouseUp: - result.type = WebInputEvent::MouseUp; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonMiddle; - break; - case NSRightMouseUp: - result.type = WebInputEvent::MouseUp; - result.clickCount = [event clickCount]; - result.button = WebMouseEvent::ButtonRight; - break; - case NSMouseMoved: - case NSMouseEntered: - result.type = WebInputEvent::MouseMove; - break; - case NSLeftMouseDragged: - result.type = WebInputEvent::MouseMove; - result.button = WebMouseEvent::ButtonLeft; - break; - case NSOtherMouseDragged: - result.type = WebInputEvent::MouseMove; - result.button = WebMouseEvent::ButtonMiddle; - break; - case NSRightMouseDragged: - result.type = WebInputEvent::MouseMove; - result.button = WebMouseEvent::ButtonRight; - break; - default: - ASSERT_NOT_REACHED(); - } - - setWebEventLocationFromEventInView(&result, event, view); - - result.modifiers = modifiersFromEvent(event); - - result.timeStampSeconds = [event timestamp]; - - return result; -} - -// WebMouseWheelEvent --------------------------------------------------------- - -WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(NSEvent* event, NSView* view) -{ - WebMouseWheelEvent result; - - result.type = WebInputEvent::MouseWheel; - result.button = WebMouseEvent::ButtonNone; - - result.modifiers = modifiersFromEvent(event); - - setWebEventLocationFromEventInView(&result, event, view); - - // Of Mice and Men - // --------------- - // - // There are three types of scroll data available on a scroll wheel CGEvent. - // Apple's documentation ([1]) is rather vague in their differences, and not - // terribly helpful in deciding which to use. This is what's really going on. - // - // First, these events behave very differently depending on whether a standard - // wheel mouse is used (one that scrolls in discrete units) or a - // trackpad/Mighty Mouse is used (which both provide continuous scrolling). - // You must check to see which was used for the event by testing the - // kCGScrollWheelEventIsContinuous field. - // - // Second, these events refer to "axes". Axis 1 is the y-axis, and axis 2 is - // the x-axis. - // - // Third, there is a concept of mouse acceleration. Scrolling the same amount - // of physical distance will give you different results logically depending on - // whether you scrolled a little at a time or in one continuous motion. Some - // fields account for this while others do not. - // - // Fourth, for trackpads there is a concept of chunkiness. When scrolling - // continuously, events can be delivered in chunks. That is to say, lots of - // scroll events with delta 0 will be delivered, and every so often an event - // with a non-zero delta will be delivered, containing the accumulated deltas - // from all the intermediate moves. [2] - // - // For notchy wheel mice (kCGScrollWheelEventIsContinuous == 0) - // ------------------------------------------------------------ - // - // kCGScrollWheelEventDeltaAxis* - // This is the rawest of raw events. For each mouse notch you get a value of - // +1/-1. This does not take acceleration into account and thus is less - // useful for building UIs. - // - // kCGScrollWheelEventPointDeltaAxis* - // This is smarter. In general, for each mouse notch you get a value of - // +1/-1, but this _does_ take acceleration into account, so you will get - // larger values on longer scrolls. This field would be ideal for building - // UIs except for one nasty bug: when the shift key is pressed, this set of - // fields fails to move the value into the axis2 field (the other two types - // of data do). This wouldn't be so bad except for the fact that while the - // number of axes is used in the creation of a CGScrollWheelEvent, there is - // no way to get that information out of the event once created. - // - // kCGScrollWheelEventFixedPtDeltaAxis* - // This is a fixed value, and for each mouse notch you get a value of - // +0.1/-0.1 (but, like above, scaled appropriately for acceleration). This - // value takes acceleration into account, and in fact is identical to the - // results you get from -[NSEvent delta*]. (That is, if you linked on Tiger - // or greater; see [2] for details.) - // - // A note about continuous devices - // ------------------------------- - // - // There are two devices that provide continuous scrolling events (trackpads - // and Mighty Mouses) and they behave rather differently. The Mighty Mouse - // behaves a lot like a regular mouse. There is no chunking, and the - // FixedPtDelta values are the PointDelta values multiplied by 0.1. With the - // trackpad, though, there is chunking. While the FixedPtDelta values are - // reasonable (they occur about every fifth event but have values five times - // larger than usual) the Delta values are unreasonable. They don't appear to - // accumulate properly. - // - // For continuous devices (kCGScrollWheelEventIsContinuous != 0) - // ------------------------------------------------------------- - // - // kCGScrollWheelEventDeltaAxis* - // This provides values with no acceleration. With a trackpad, these values - // are chunked but each non-zero value does not appear to be cumulative. - // This seems to be a bug. - // - // kCGScrollWheelEventPointDeltaAxis* - // This provides values with acceleration. With a trackpad, these values are - // not chunked and are highly accurate. - // - // kCGScrollWheelEventFixedPtDeltaAxis* - // This provides values with acceleration. With a trackpad, these values are - // chunked but unlike Delta events are properly cumulative. - // - // Summary - // ------- - // - // In general the best approach to take is: determine if the event is - // continuous. If it is not, then use the FixedPtDelta events (or just stick - // with Cocoa events). They provide both acceleration and proper horizontal - // scrolling. If the event is continuous, then doing pixel scrolling with the - // PointDelta is the way to go. In general, avoid the Delta events. They're - // the oldest (dating back to 10.4, before CGEvents were public) but they lack - // acceleration and precision, making them useful only in specific edge cases. - // - // References - // ---------- - // - // [1] <http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html> - // [2] <http://developer.apple.com/releasenotes/Cocoa/AppKitOlderNotes.html> - // Scroll to the section headed "NSScrollWheel events". - // - // P.S. The "smooth scrolling" option in the system preferences is utterly - // unrelated to any of this. - - CGEventRef cgEvent = [event CGEvent]; - ASSERT(cgEvent); - - // Wheel ticks are supposed to be raw, unaccelerated values, one per physical - // mouse wheel notch. The delta event is perfect for this (being a good - // "specific edge case" as mentioned above). Trackpads, unfortunately, do - // event chunking, and sending mousewheel events with 0 ticks causes some - // websites to malfunction. Therefore, for all continuous input devices we use - // the point delta data instead, since we cannot distinguish trackpad data - // from data from any other continuous device. - - // Conversion between wheel delta amounts and number of pixels to scroll. - static const double scrollbarPixelsPerCocoaTick = 40.0; - - if (CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventIsContinuous)) { - result.deltaX = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis2); - result.deltaY = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventPointDeltaAxis1); - result.wheelTicksX = result.deltaX / scrollbarPixelsPerCocoaTick; - result.wheelTicksY = result.deltaY / scrollbarPixelsPerCocoaTick; - } else { - result.deltaX = [event deltaX] * scrollbarPixelsPerCocoaTick; - result.deltaY = [event deltaY] * scrollbarPixelsPerCocoaTick; - result.wheelTicksY = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis1); - result.wheelTicksX = CGEventGetIntegerValueField(cgEvent, kCGScrollWheelEventDeltaAxis2); - } - - result.timeStampSeconds = [event timestamp]; - - return result; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/mac/WebScreenInfoFactory.mm b/WebKit/chromium/src/mac/WebScreenInfoFactory.mm deleted file mode 100644 index 2805f7a..0000000 --- a/WebKit/chromium/src/mac/WebScreenInfoFactory.mm +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScreenInfoFactory.h" - -#import <AppKit/AppKit.h> - -#include "WebScreenInfo.h" - -namespace WebKit { - -static NSScreen* screenForWindow(NSWindow* window) -{ - NSScreen* screen = [window screen]; // nil if the window is off-screen - if (screen) - return screen; - - NSArray* screens = [NSScreen screens]; - if ([screens count] > 0) - return [screens objectAtIndex:0]; // screen containing the menubar - - return nil; -} - -static WebRect toUserSpace(const NSRect& rect, NSWindow* destination) -{ - CGRect userRect = NSRectToCGRect(rect); - - userRect.origin.y = - NSMaxY([screenForWindow(destination) frame]) - (userRect.origin.y + userRect.size.height); // flip - - if (destination) { - CGFloat scale = 1 / [destination userSpaceScaleFactor]; // scale down - userRect.origin.x *= scale; - userRect.origin.y *= scale; - userRect.size.width *= scale; - userRect.size.height *= scale; - } - - return WebRect(userRect.origin.x, - userRect.origin.y, - userRect.size.width, - userRect.size.height); -} - -WebScreenInfo WebScreenInfoFactory::screenInfo(NSView* view) -{ - NSString *colorSpace = NSColorSpaceFromDepth([[NSScreen deepestScreen] depth]); - - WebScreenInfo results; - results.depth = - NSBitsPerPixelFromDepth([[NSScreen deepestScreen] depth]); - results.depthPerComponent = - NSBitsPerSampleFromDepth([[NSScreen deepestScreen] depth]); - results.isMonochrome = colorSpace == NSCalibratedWhiteColorSpace - || colorSpace == NSCalibratedBlackColorSpace - || colorSpace == NSDeviceWhiteColorSpace - || colorSpace == NSDeviceBlackColorSpace; - results.rect = - toUserSpace([screenForWindow([view window]) frame], [view window]); - results.availableRect = - toUserSpace([screenForWindow([view window]) visibleFrame], [view window]); - return results; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp deleted file mode 100644 index c71a3b6..0000000 --- a/WebKit/chromium/src/win/WebInputEventFactory.cpp +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (C) 2006-2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebInputEventFactory.h" - -#include "WebInputEvent.h" - -#include <wtf/Assertions.h> - -namespace WebKit { - -static const unsigned long defaultScrollLinesPerWheelDelta = 3; -static const unsigned long defaultScrollCharsPerWheelDelta = 1; - -// WebKeyboardEvent ----------------------------------------------------------- - -static bool isKeyPad(WPARAM wparam, LPARAM lparam) -{ - bool keypad = false; - switch (wparam) { - case VK_RETURN: - keypad = (lparam >> 16) & KF_EXTENDED; - break; - case VK_INSERT: - case VK_DELETE: - case VK_HOME: - case VK_END: - case VK_PRIOR: - case VK_NEXT: - case VK_UP: - case VK_DOWN: - case VK_LEFT: - case VK_RIGHT: - keypad = !((lparam >> 16) & KF_EXTENDED); - break; - case VK_NUMLOCK: - case VK_NUMPAD0: - case VK_NUMPAD1: - case VK_NUMPAD2: - case VK_NUMPAD3: - case VK_NUMPAD4: - case VK_NUMPAD5: - case VK_NUMPAD6: - case VK_NUMPAD7: - case VK_NUMPAD8: - case VK_NUMPAD9: - case VK_DIVIDE: - case VK_MULTIPLY: - case VK_SUBTRACT: - case VK_ADD: - case VK_DECIMAL: - case VK_CLEAR: - keypad = true; - break; - default: - keypad = false; - } - return keypad; -} - -// Loads the state for toggle keys into the event. -static void SetToggleKeyState(WebInputEvent* event) -{ - // Low bit set from GetKeyState indicates "toggled". - if (::GetKeyState(VK_NUMLOCK) & 1) - event->modifiers |= WebInputEvent::NumLockOn; - if (::GetKeyState(VK_CAPITAL) & 1) - event->modifiers |= WebInputEvent::CapsLockOn; -} - -WebKeyboardEvent WebInputEventFactory::keyboardEvent(HWND hwnd, UINT message, - WPARAM wparam, LPARAM lparam) -{ - WebKeyboardEvent result; - - // TODO(pkasting): http://b/1117926 Are we guaranteed that the message that - // GetMessageTime() refers to is the same one that we're passed in? Perhaps - // one of the construction parameters should be the time passed by the - // caller, who would know for sure. - result.timeStampSeconds = GetMessageTime() / 1000.0; - - result.windowsKeyCode = result.nativeKeyCode = static_cast<int>(wparam); - - switch (message) { - case WM_SYSKEYDOWN: - result.isSystemKey = true; - case WM_KEYDOWN: - result.type = WebInputEvent::RawKeyDown; - break; - case WM_SYSKEYUP: - result.isSystemKey = true; - case WM_KEYUP: - result.type = WebInputEvent::KeyUp; - break; - case WM_IME_CHAR: - result.type = WebInputEvent::Char; - break; - case WM_SYSCHAR: - result.isSystemKey = true; - result.type = WebInputEvent::Char; - case WM_CHAR: - result.type = WebInputEvent::Char; - break; - default: - ASSERT_NOT_REACHED(); - } - - if (result.type == WebInputEvent::Char || result.type == WebInputEvent::RawKeyDown) { - result.text[0] = result.windowsKeyCode; - result.unmodifiedText[0] = result.windowsKeyCode; - } - if (result.type != WebInputEvent::Char) - result.setKeyIdentifierFromWindowsKeyCode(); - - if (GetKeyState(VK_SHIFT) & 0x8000) - result.modifiers |= WebInputEvent::ShiftKey; - if (GetKeyState(VK_CONTROL) & 0x8000) - result.modifiers |= WebInputEvent::ControlKey; - if (GetKeyState(VK_MENU) & 0x8000) - result.modifiers |= WebInputEvent::AltKey; - // NOTE: There doesn't seem to be a way to query the mouse button state in - // this case. - - if (LOWORD(lparam) > 1) - result.modifiers |= WebInputEvent::IsAutoRepeat; - if (isKeyPad(wparam, lparam)) - result.modifiers |= WebInputEvent::IsKeyPad; - - SetToggleKeyState(&result); - return result; -} - -// WebMouseEvent -------------------------------------------------------------- - -static int gLastClickCount; -static double gLastClickTime; - -static LPARAM GetRelativeCursorPos(HWND hwnd) -{ - POINT pos = {-1, -1}; - GetCursorPos(&pos); - ScreenToClient(hwnd, &pos); - return MAKELPARAM(pos.x, pos.y); -} - -void WebInputEventFactory::resetLastClickState() -{ - gLastClickTime = gLastClickCount = 0; -} - -WebMouseEvent WebInputEventFactory::mouseEvent(HWND hwnd, UINT message, - WPARAM wparam, LPARAM lparam) -{ - WebMouseEvent result; //(WebInputEvent::Uninitialized()); - - switch (message) { - case WM_MOUSEMOVE: - result.type = WebInputEvent::MouseMove; - if (wparam & MK_LBUTTON) - result.button = WebMouseEvent::ButtonLeft; - else if (wparam & MK_MBUTTON) - result.button = WebMouseEvent::ButtonMiddle; - else if (wparam & MK_RBUTTON) - result.button = WebMouseEvent::ButtonRight; - else - result.button = WebMouseEvent::ButtonNone; - break; - case WM_MOUSELEAVE: - result.type = WebInputEvent::MouseLeave; - result.button = WebMouseEvent::ButtonNone; - // set the current mouse position (relative to the client area of the - // current window) since none is specified for this event - lparam = GetRelativeCursorPos(hwnd); - break; - case WM_LBUTTONDOWN: - case WM_LBUTTONDBLCLK: - result.type = WebInputEvent::MouseDown; - result.button = WebMouseEvent::ButtonLeft; - break; - case WM_MBUTTONDOWN: - case WM_MBUTTONDBLCLK: - result.type = WebInputEvent::MouseDown; - result.button = WebMouseEvent::ButtonMiddle; - break; - case WM_RBUTTONDOWN: - case WM_RBUTTONDBLCLK: - result.type = WebInputEvent::MouseDown; - result.button = WebMouseEvent::ButtonRight; - break; - case WM_LBUTTONUP: - result.type = WebInputEvent::MouseUp; - result.button = WebMouseEvent::ButtonLeft; - break; - case WM_MBUTTONUP: - result.type = WebInputEvent::MouseUp; - result.button = WebMouseEvent::ButtonMiddle; - break; - case WM_RBUTTONUP: - result.type = WebInputEvent::MouseUp; - result.button = WebMouseEvent::ButtonRight; - break; - default: - ASSERT_NOT_REACHED(); - } - - // TODO(pkasting): http://b/1117926 Are we guaranteed that the message that - // GetMessageTime() refers to is the same one that we're passed in? Perhaps - // one of the construction parameters should be the time passed by the - // caller, who would know for sure. - result.timeStampSeconds = GetMessageTime() / 1000.0; - - // set position fields: - - result.x = static_cast<short>(LOWORD(lparam)); - result.y = static_cast<short>(HIWORD(lparam)); - result.windowX = result.x; - result.windowY = result.y; - - POINT globalPoint = { result.x, result.y }; - ClientToScreen(hwnd, &globalPoint); - - result.globalX = globalPoint.x; - result.globalY = globalPoint.y; - - // calculate number of clicks: - - // This differs slightly from the WebKit code in WebKit/win/WebView.cpp - // where their original code looks buggy. - static int lastClickPositionX; - static int lastClickPositionY; - static WebMouseEvent::Button lastClickButton = WebMouseEvent::ButtonLeft; - - double currentTime = result.timeStampSeconds; - bool cancelPreviousClick = - (abs(lastClickPositionX - result.x) > (GetSystemMetrics(SM_CXDOUBLECLK) / 2)) - || (abs(lastClickPositionY - result.y) > (GetSystemMetrics(SM_CYDOUBLECLK) / 2)) - || ((currentTime - gLastClickTime) * 1000.0 > GetDoubleClickTime()); - - if (result.type == WebInputEvent::MouseDown) { - if (!cancelPreviousClick && (result.button == lastClickButton)) - ++gLastClickCount; - else { - gLastClickCount = 1; - lastClickPositionX = result.x; - lastClickPositionY = result.y; - } - gLastClickTime = currentTime; - lastClickButton = result.button; - } else if (result.type == WebInputEvent::MouseMove - || result.type == WebInputEvent::MouseLeave) { - if (cancelPreviousClick) { - gLastClickCount = 0; - lastClickPositionX = 0; - lastClickPositionY = 0; - gLastClickTime = 0; - } - } - result.clickCount = gLastClickCount; - - // set modifiers: - - if (wparam & MK_CONTROL) - result.modifiers |= WebInputEvent::ControlKey; - if (wparam & MK_SHIFT) - result.modifiers |= WebInputEvent::ShiftKey; - if (GetKeyState(VK_MENU) & 0x8000) - result.modifiers |= WebInputEvent::AltKey; - if (wparam & MK_LBUTTON) - result.modifiers |= WebInputEvent::LeftButtonDown; - if (wparam & MK_MBUTTON) - result.modifiers |= WebInputEvent::MiddleButtonDown; - if (wparam & MK_RBUTTON) - result.modifiers |= WebInputEvent::RightButtonDown; - - SetToggleKeyState(&result); - return result; -} - -// WebMouseWheelEvent --------------------------------------------------------- - -WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message, - WPARAM wparam, LPARAM lparam) -{ - WebMouseWheelEvent result; //(WebInputEvent::Uninitialized()); - - result.type = WebInputEvent::MouseWheel; - - // TODO(pkasting): http://b/1117926 Are we guaranteed that the message that - // GetMessageTime() refers to is the same one that we're passed in? Perhaps - // one of the construction parameters should be the time passed by the - // caller, who would know for sure. - result.timeStampSeconds = GetMessageTime() / 1000.0; - - result.button = WebMouseEvent::ButtonNone; - - // Get key state, coordinates, and wheel delta from event. - typedef SHORT (WINAPI *GetKeyStateFunction)(int key); - GetKeyStateFunction getKeyState; - UINT keyState; - float wheelDelta; - bool horizontalScroll = false; - if ((message == WM_VSCROLL) || (message == WM_HSCROLL)) { - // Synthesize mousewheel event from a scroll event. This is needed to - // simulate middle mouse scrolling in some laptops. Use GetAsyncKeyState - // for key state since we are synthesizing the input event. - getKeyState = GetAsyncKeyState; - keyState = 0; - if (getKeyState(VK_SHIFT)) - keyState |= MK_SHIFT; - if (getKeyState(VK_CONTROL)) - keyState |= MK_CONTROL; - // NOTE: There doesn't seem to be a way to query the mouse button state - // in this case. - - POINT cursorPosition = {0}; - GetCursorPos(&cursorPosition); - result.globalX = cursorPosition.x; - result.globalY = cursorPosition.y; - - switch (LOWORD(wparam)) { - case SB_LINEUP: // == SB_LINELEFT - wheelDelta = WHEEL_DELTA; - break; - case SB_LINEDOWN: // == SB_LINERIGHT - wheelDelta = -WHEEL_DELTA; - break; - case SB_PAGEUP: - wheelDelta = 1; - result.scrollByPage = true; - break; - case SB_PAGEDOWN: - wheelDelta = -1; - result.scrollByPage = true; - break; - default: // We don't supoprt SB_THUMBPOSITION or SB_THUMBTRACK here. - wheelDelta = 0; - break; - } - - if (message == WM_HSCROLL) - horizontalScroll = true; - } else { - // Non-synthesized event; we can just read data off the event. - getKeyState = GetKeyState; - keyState = GET_KEYSTATE_WPARAM(wparam); - - result.globalX = static_cast<short>(LOWORD(lparam)); - result.globalY = static_cast<short>(HIWORD(lparam)); - - wheelDelta = static_cast<float>(GET_WHEEL_DELTA_WPARAM(wparam)); - if (message == WM_MOUSEHWHEEL) { - horizontalScroll = true; - wheelDelta = -wheelDelta; // Windows is <- -/+ ->, WebKit <- +/- ->. - } - } - if (keyState & MK_SHIFT) - horizontalScroll = true; - - // Set modifiers based on key state. - if (keyState & MK_SHIFT) - result.modifiers |= WebInputEvent::ShiftKey; - if (keyState & MK_CONTROL) - result.modifiers |= WebInputEvent::ControlKey; - if (getKeyState(VK_MENU) & 0x8000) - result.modifiers |= WebInputEvent::AltKey; - if (keyState & MK_LBUTTON) - result.modifiers |= WebInputEvent::LeftButtonDown; - if (keyState & MK_MBUTTON) - result.modifiers |= WebInputEvent::MiddleButtonDown; - if (keyState & MK_RBUTTON) - result.modifiers |= WebInputEvent::RightButtonDown; - - SetToggleKeyState(&result); - - // Set coordinates by translating event coordinates from screen to client. - POINT clientPoint = { result.globalX, result.globalY }; - MapWindowPoints(0, hwnd, &clientPoint, 1); - result.x = clientPoint.x; - result.y = clientPoint.y; - result.windowX = result.x; - result.windowY = result.y; - - // Convert wheel delta amount to a number of pixels to scroll. - // - // How many pixels should we scroll per line? Gecko uses the height of the - // current line, which means scroll distance changes as you go through the - // page or go to different pages. IE 8 is ~60 px/line, although the value - // seems to vary slightly by page and zoom level. Also, IE defaults to - // smooth scrolling while Firefox doesn't, so it can get away with somewhat - // larger scroll values without feeling as jerky. Here we use 100 px per - // three lines (the default scroll amount is three lines per wheel tick). - // Even though we have smooth scrolling, we don't make this as large as IE - // because subjectively IE feels like it scrolls farther than you want while - // reading articles. - static const float scrollbarPixelsPerLine = 100.0f / 3.0f; - wheelDelta /= WHEEL_DELTA; - float scrollDelta = wheelDelta; - if (horizontalScroll) { - unsigned long scrollChars = defaultScrollCharsPerWheelDelta; - SystemParametersInfo(SPI_GETWHEELSCROLLCHARS, 0, &scrollChars, 0); - // TODO(pkasting): Should probably have a different multiplier - // scrollbarPixelsPerChar here. - scrollDelta *= static_cast<float>(scrollChars) * scrollbarPixelsPerLine; - } else { - unsigned long scrollLines = defaultScrollLinesPerWheelDelta; - SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &scrollLines, 0); - if (scrollLines == WHEEL_PAGESCROLL) - result.scrollByPage = true; - if (!result.scrollByPage) - scrollDelta *= static_cast<float>(scrollLines) * scrollbarPixelsPerLine; - } - - // Set scroll amount based on above calculations. WebKit expects positive - // deltaY to mean "scroll up" and positive deltaX to mean "scroll left". - if (horizontalScroll) { - result.deltaX = scrollDelta; - result.wheelTicksX = wheelDelta; - } else { - result.deltaY = scrollDelta; - result.wheelTicksY = wheelDelta; - } - - return result; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/win/WebScreenInfoFactory.cpp b/WebKit/chromium/src/win/WebScreenInfoFactory.cpp deleted file mode 100644 index 8416acc..0000000 --- a/WebKit/chromium/src/win/WebScreenInfoFactory.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScreenInfoFactory.h" - -#include "WebScreenInfo.h" - -#include <windows.h> - -namespace WebKit { - -static WebRect toWebRect(const RECT& input) -{ - WebRect output; - output.x = input.left; - output.y = input.top; - output.width = input.right - input.left; - output.height = input.bottom - input.top; - return output; -} - -WebScreenInfo WebScreenInfoFactory::screenInfo(HWND window) -{ - HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY); - - MONITORINFOEX monitorInfo; - monitorInfo.cbSize = sizeof(MONITORINFOEX); - GetMonitorInfo(monitor, &monitorInfo); - - DEVMODE devMode; - devMode.dmSize = sizeof(devMode); - devMode.dmDriverExtra = 0; - EnumDisplaySettings(monitorInfo.szDevice, ENUM_CURRENT_SETTINGS, &devMode); - - WebScreenInfo results; - results.depth = devMode.dmBitsPerPel; - results.depthPerComponent = devMode.dmBitsPerPel / 3; // Assumes RGB - results.isMonochrome = devMode.dmColor == DMCOLOR_MONOCHROME; - results.rect = toWebRect(monitorInfo.rcMonitor); - results.availableRect = toWebRect(monitorInfo.rcWork); - return results; -} - -} // namespace WebKit diff --git a/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp b/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp deleted file mode 100644 index 548880c..0000000 --- a/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2009 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebScreenInfoFactory.h" - -#include "WebScreenInfo.h" - -#include <X11/Xlib.h> - -namespace WebKit { - -WebScreenInfo WebScreenInfoFactory::screenInfo(Display* display, int screenNumber) -{ - WebScreenInfo results; - // FIXME: not all screens with use 8bpp. - results.depthPerComponent = 8; - - int displayWidth = XDisplayWidth(display, screenNumber); - int displayHeight = XDisplayHeight(display, screenNumber); - results.depth = XDisplayPlanes(display, screenNumber); - results.isMonochrome = results.depth == 1; - - results.rect = WebRect(0, 0, displayWidth, displayHeight); - - // I don't know of a way to query the "maximize" size of the window (e.g. - // screen size less sidebars etc) since this is something which only the - // window manager knows. - results.availableRect = results.rect; - - return results; -} - -} // namespace WebKit diff --git a/WebKit/chromium/tests/ArenaTestHelpers.h b/WebKit/chromium/tests/ArenaTestHelpers.h deleted file mode 100644 index 70936e5..0000000 --- a/WebKit/chromium/tests/ArenaTestHelpers.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ArenaTestHelpers_h -#define ArenaTestHelpers_h - -#include "PODArena.h" -#include <gtest/gtest.h> -#include <wtf/NotFound.h> -#include <wtf/Vector.h> - -namespace WebCore { -namespace ArenaTestHelpers { - -// An allocator for the PODArena which tracks the regions which have -// been allocated. -class TrackedAllocator : public PODArena::FastMallocAllocator { -public: - static PassRefPtr<TrackedAllocator> create() - { - return adoptRef(new TrackedAllocator); - } - - virtual void* allocate(size_t size) - { - void* result = PODArena::FastMallocAllocator::allocate(size); - m_allocatedRegions.append(result); - return result; - } - - virtual void free(void* ptr) - { - size_t slot = m_allocatedRegions.find(ptr); - ASSERT_NE(slot, notFound); - m_allocatedRegions.remove(slot); - PODArena::FastMallocAllocator::free(ptr); - } - - bool isEmpty() const - { - return !numRegions(); - } - - int numRegions() const - { - return m_allocatedRegions.size(); - } - -private: - TrackedAllocator() { } - Vector<void*> m_allocatedRegions; -}; - -} // namespace ArenaTestHelpers -} // namespace WebCore - -#endif // ArenaTestHelpers_h diff --git a/WebKit/chromium/tests/DragImageTest.cpp b/WebKit/chromium/tests/DragImageTest.cpp deleted file mode 100644 index 8ce6fe2..0000000 --- a/WebKit/chromium/tests/DragImageTest.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include <gtest/gtest.h> - -#include "DragImage.h" -#include "Image.h" -#include "NativeImageSkia.h" - -using namespace WebCore; - -namespace { - -class TestImage : public Image { -public: - - static PassRefPtr<TestImage> create(const IntSize& size) - { - return adoptRef(new TestImage(size)); - } - - explicit TestImage(const IntSize& size) - : Image(0) - , m_size(size) - { - m_nativeImage = new NativeImageSkia(); - m_nativeImage->setConfig(SkBitmap::kARGB_8888_Config, - size.width(), size.height(), 0); - m_nativeImage->allocPixels(); - } - - virtual ~TestImage() - { - delete m_nativeImage; - } - - virtual IntSize size() const - { - return m_size; - } - - virtual NativeImagePtr nativeImageForCurrentFrame() - { - if (m_size.isZero()) - return 0; - - return m_nativeImage; - } - - // Stub implementations of pure virtual Image functions. - virtual void destroyDecodedData(bool) - { - } - - virtual unsigned int decodedSize() const - { - return 0u; - } - - virtual void draw(WebCore::GraphicsContext*, const WebCore::FloatRect&, - const WebCore::FloatRect&, WebCore::ColorSpace, - WebCore::CompositeOperator) - { - } - -private: - - IntSize m_size; - - NativeImagePtr m_nativeImage; -}; - -TEST(DragImageTest, NullHandling) -{ - EXPECT_FALSE(createDragImageFromImage(0)); - - deleteDragImage(0); - EXPECT_TRUE(dragImageSize(0).isZero()); - EXPECT_FALSE(scaleDragImage(0, FloatSize(0.5, 0.5))); - EXPECT_FALSE(dissolveDragImageToFraction(0, 0.5)); - EXPECT_FALSE(createDragImageFromImage(0)); - EXPECT_FALSE(createDragImageIconForCachedImage(0)); -} - -TEST(DragImageTest, NonNullHandling) -{ - RefPtr<TestImage> testImage(TestImage::create(IntSize(2, 2))); - DragImageRef dragImage = createDragImageFromImage(testImage.get()); - ASSERT_TRUE(dragImage); - - dragImage = scaleDragImage(dragImage, FloatSize(0.5, 0.5)); - ASSERT_TRUE(dragImage); - IntSize size = dragImageSize(dragImage); - EXPECT_EQ(1, size.width()); - EXPECT_EQ(1, size.height()); - - dragImage = dissolveDragImageToFraction(dragImage, 0.5); - ASSERT_TRUE(dragImage); - - deleteDragImage(dragImage); -} - -TEST(DragImageTest, CreateDragImage) -{ - { - // Tests that the DrageImage implementation doesn't choke on null values - // of nativeImageForCurrentFrame(). - RefPtr<TestImage> testImage(TestImage::create(IntSize())); - EXPECT_FALSE(createDragImageFromImage(testImage.get())); - } - - { - // Tests that the drag image is a deep copy. - RefPtr<TestImage> testImage(TestImage::create(IntSize(1, 1))); - DragImageRef dragImage = createDragImageFromImage(testImage.get()); - ASSERT_TRUE(dragImage); - SkAutoLockPixels lock1(*dragImage), lock2(*(testImage->nativeImageForCurrentFrame())); - EXPECT_NE(dragImage->getPixels(), testImage->nativeImageForCurrentFrame()->getPixels()); - } -} - -} // anonymous namespace diff --git a/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp b/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp deleted file mode 100644 index 1b7f156..0000000 --- a/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBBindingUtilities.h" -#include "IDBKey.h" -#include "IDBKeyPath.h" -#include "SerializedScriptValue.h" - -#include <gtest/gtest.h> -#include <wtf/Vector.h> - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace { - -class LocalContext { -public: - LocalContext() - : m_context(v8::Context::New()) - { - m_context->Enter(); - } - - virtual ~LocalContext() - { - m_context->Exit(); - m_context.Dispose(); - } - -private: - v8::Locker m_locker; - v8::HandleScope m_scope; - v8::Persistent<v8::Context> m_context; -}; - -PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(SerializedScriptValue* value, const String& keyPath) -{ - Vector<IDBKeyPathElement> idbKeyPath; - IDBKeyPathParseError parseError; - IDBParseKeyPath(keyPath, idbKeyPath, parseError); - EXPECT_EQ(IDBKeyPathParseErrorNone, parseError); - return createIDBKeyFromSerializedValueAndKeyPath(value, idbKeyPath); -} - -void checkKeyPathNullValue(SerializedScriptValue* value, const String& keyPath) -{ - RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); - ASSERT_FALSE(idbKey.get()); -} - -void checkKeyPathStringValue(SerializedScriptValue* value, const String& keyPath, const String& expected) -{ - RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); - ASSERT_TRUE(idbKey.get()); - ASSERT_EQ(IDBKey::StringType, idbKey->type()); - ASSERT_TRUE(expected == idbKey->string()); -} - -void checkKeyPathNumberValue(SerializedScriptValue* value, const String& keyPath, int expected) -{ - RefPtr<IDBKey> idbKey = checkKeyFromValueAndKeyPathInternal(value, keyPath); - ASSERT_TRUE(idbKey.get()); - ASSERT_EQ(IDBKey::NumberType, idbKey->type()); - ASSERT_TRUE(expected == idbKey->number()); -} - -TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue) -{ - LocalContext v8context; - v8::Local<v8::Object> object = v8::Object::New(); - object->Set(v8::String::New("foo"), v8::String::New("zoo")); - - RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValue::create(object); - - checkKeyPathStringValue(serializedScriptValue.get(), "foo", "zoo"); - checkKeyPathNullValue(serializedScriptValue.get(), "bar"); - checkKeyPathNullValue(serializedScriptValue.get(), "[3]"); -} - -TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue) -{ - LocalContext v8context; - v8::Local<v8::Object> object = v8::Object::New(); - object->Set(v8::String::New("foo"), v8::Number::New(456)); - - RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValue::create(object); - - checkKeyPathNumberValue(serializedScriptValue.get(), "foo", 456); - checkKeyPathNullValue(serializedScriptValue.get(), "bar"); - checkKeyPathNullValue(serializedScriptValue.get(), "[3]"); -} - -TEST(IDBKeyFromValueAndKeyPathTest, TopLevelArrayElement) -{ - LocalContext v8context; - v8::Local<v8::Array> array = v8::Array::New(); - array->Set(3, v8::String::New("zoo")); - - RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValue::create(array); - - checkKeyPathStringValue(serializedScriptValue.get(), "[3]", "zoo"); - checkKeyPathNullValue(serializedScriptValue.get(), "foo"); - checkKeyPathNullValue(serializedScriptValue.get(), "bar"); -} - -TEST(IDBKeyFromValueAndKeyPathTest, SubProperty) -{ - LocalContext v8context; - v8::Local<v8::Object> object = v8::Object::New(); - v8::Local<v8::Object> subProperty = v8::Object::New(); - subProperty->Set(v8::String::New("bar"), v8::String::New("zee")); - object->Set(v8::String::New("foo"), subProperty); - - RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValue::create(object); - - checkKeyPathStringValue(serializedScriptValue.get(), "foo.bar", "zee"); - checkKeyPathNullValue(serializedScriptValue.get(), "bar"); - checkKeyPathNullValue(serializedScriptValue.get(), "[3]"); -} - -TEST(IDBKeyFromValueAndKeyPathTest, Array2D) -{ - LocalContext v8context; - v8::Local<v8::Object> object = v8::Object::New(); - v8::Local<v8::Array> array = v8::Array::New(); - v8::Local<v8::Array> subArray = v8::Array::New(); - subArray->Set(7, v8::String::New("zee")); - array->Set(3, subArray); - object->Set(v8::String::New("foo"), array); - - RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValue::create(object); - - checkKeyPathStringValue(serializedScriptValue.get(), "foo[3][7]", "zee"); - checkKeyPathNullValue(serializedScriptValue.get(), "bar"); - checkKeyPathNullValue(serializedScriptValue.get(), "[4]"); -} - -} // namespace - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/tests/IDBKeyPathTest.cpp b/WebKit/chromium/tests/IDBKeyPathTest.cpp deleted file mode 100644 index 6c378d6..0000000 --- a/WebKit/chromium/tests/IDBKeyPathTest.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "IDBKeyPath.h" - -#include <gtest/gtest.h> -#include <wtf/Vector.h> - -#if ENABLE(INDEXED_DATABASE) - -using namespace WebCore; - -namespace { - -IDBKeyPathElement ExpectedToken(const String& identifier, bool isIndexed, int index) -{ - IDBKeyPathElement expected; - if (isIndexed) { - expected.type = IDBKeyPathElement::IsIndexed; - expected.index = index; - } else { - expected.type = IDBKeyPathElement::IsNamed; - expected.identifier = identifier; - } - return expected; -} - -void checkKeyPath(const String& keyPath, const Vector<IDBKeyPathElement>& expected, int parserError) -{ - - IDBKeyPathParseError error; - Vector<IDBKeyPathElement> idbKeyPathElements; - IDBParseKeyPath(keyPath, idbKeyPathElements, error); - ASSERT_EQ(parserError, error); - if (error != IDBKeyPathParseErrorNone) - return; - ASSERT_EQ(expected.size(), idbKeyPathElements.size()); - for (size_t i = 0; i < expected.size(); ++i) { - ASSERT_TRUE(expected[i].type == idbKeyPathElements[i].type) << i; - if (expected[i].type == IDBKeyPathElement::IsIndexed) - ASSERT_EQ(expected[i].index, idbKeyPathElements[i].index) << i; - else if (expected[i].type == IDBKeyPathElement::IsNamed) - ASSERT_TRUE(expected[i].identifier == idbKeyPathElements[i].identifier) << i; - else - ASSERT_TRUE(false) << "Invalid IDBKeyPathElement type"; - } -} - -TEST(IDBKeyPathTest, ValidKeyPath0) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("foo.bar.zoo"); - expected.append(ExpectedToken("foo", false, 0)); - expected.append(ExpectedToken("bar", false, 0)); - expected.append(ExpectedToken("zoo", false, 0)); - checkKeyPath(keyPath, expected, 0); -} - -TEST(IDBKeyPathTest, ValidKeyPath1) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[34][20].foo[2].bar"); - expected.append(ExpectedToken("a", false, 0)); - expected.append(ExpectedToken(String(), true, 34)); - expected.append(ExpectedToken(String(), true, 20)); - expected.append(ExpectedToken("foo", false, 0)); - expected.append(ExpectedToken(String(), true, 2)); - expected.append(ExpectedToken("bar", false, 0)); - checkKeyPath(keyPath, expected, 0); -} - -TEST(IDBKeyPathTest, ValidKeyPath2) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("foo[ 34 ].Zoo_[00023]\t._c"); - expected.append(ExpectedToken("foo", false, 0)); - expected.append(ExpectedToken(String(), true, 34)); - expected.append(ExpectedToken("Zoo_", false, 0)); - expected.append(ExpectedToken(String(), true, 23)); - expected.append(ExpectedToken("_c", false, 0)); - checkKeyPath(keyPath, expected, 0); -} - -TEST(IDBKeyPathTest, ValidKeyPath3) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("foo[ 34 ]"); - expected.append(ExpectedToken("foo", false, 0)); - expected.append(ExpectedToken(String(), true, 34)); - checkKeyPath(keyPath, expected, 0); -} - -TEST(IDBKeyPathTest, ValidKeyPath4) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("[ 34 ]"); - expected.append(ExpectedToken(String(), true, 34)); - checkKeyPath(keyPath, expected, 0); -} - -TEST(IDBKeyPathTest, InvalidKeyPath2) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[[34]].b[2].c"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 3); -} - -TEST(IDBKeyPathTest, InvalidKeyPath3) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[[34].b[2].c"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 3); -} - -TEST(IDBKeyPathTest, InvalidKeyPath5) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[[34.b[2].c"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 3); -} - -TEST(IDBKeyPathTest, InvalidKeyPath6) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("+a[34].b[2].c"); - checkKeyPath(keyPath, expected, 1); -} - -TEST(IDBKeyPathTest, InvalidKeyPath7) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("%a[34].b[2].c"); - checkKeyPath(keyPath, expected, 1); -} - -TEST(IDBKeyPathTest, InvalidKeyPath8) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a{[34]}.b[2].c"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 2); -} - -TEST(IDBKeyPathTest, InvalidKeyPath9) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a..b[2].c"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 5); -} - -TEST(IDBKeyPathTest, InvalidKeyPath10) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[34]b.foo[2].bar"); - expected.append(ExpectedToken("a", false, 0)); - expected.append(ExpectedToken(String(), true, 34)); - checkKeyPath(keyPath, expected, 4); -} - -TEST(IDBKeyPathTest, InvalidKeyPath11) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[-1]"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 3); -} - -TEST(IDBKeyPathTest, InvalidKeyPath12) -{ - Vector<IDBKeyPathElement> expected; - String keyPath("a[9999999999999999999999999999999999]"); - expected.append(ExpectedToken("a", false, 0)); - checkKeyPath(keyPath, expected, 3); -} - -} // namespace - -#endif // ENABLE(INDEXED_DATABASE) diff --git a/WebKit/chromium/tests/KURLTest.cpp b/WebKit/chromium/tests/KURLTest.cpp deleted file mode 100644 index 152dd31..0000000 --- a/WebKit/chromium/tests/KURLTest.cpp +++ /dev/null @@ -1,615 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Basic tests that verify our KURL's interface behaves the same as the -// original KURL's. - -#include "config.h" - -#include <gtest/gtest.h> - -#include "KURL.h" - -namespace WTF { -// Output stream operator so gTest's macros work with WebCore strings. -std::ostream& operator<<(std::ostream& out, const String& str) -{ - return str.isEmpty() ? out : out << str.utf8().data(); -} -} // namespace WTF - -namespace { - - -struct ComponentCase { - const char* url; - const char* protocol; - const char* host; - const int port; - const char* user; - const char* pass; - const char* path; - const char* lastPath; - const char* query; - const char* ref; -}; - -// Test the cases where we should be the same as WebKit's old KURL. -TEST(KURLTest, SameGetters) -{ - struct GetterCase { - const char* url; - const char* protocol; - const char* host; - int port; - const char* user; - const char* pass; - const char* lastPathComponent; - const char* query; - const char* ref; - bool hasRef; - } cases[] = { - {"http://www.google.com/foo/blah?bar=baz#ref", "http", "www.google.com", 0, "", 0, "blah", "bar=baz", "ref", true}, - {"http://foo.com:1234/foo/bar/", "http", "foo.com", 1234, "", 0, "bar", 0, 0, false}, - {"http://www.google.com?#", "http", "www.google.com", 0, "", 0, 0, "", "", true}, - {"https://me:pass@google.com:23#foo", "https", "google.com", 23, "me", "pass", 0, 0, "foo", true}, - {"javascript:hello!//world", "javascript", "", 0, "", 0, "world", 0, 0, false}, - }; - - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { - // UTF-8 - WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); - - EXPECT_EQ(cases[i].protocol, kurl.protocol()); - EXPECT_EQ(cases[i].host, kurl.host()); - EXPECT_EQ(cases[i].port, kurl.port()); - EXPECT_EQ(cases[i].user, kurl.user()); - EXPECT_EQ(cases[i].pass, kurl.pass()); - EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent()); - EXPECT_EQ(cases[i].query, kurl.query()); - EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier()); - EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier()); - - // UTF-16 - WTF::String utf16(cases[i].url); - kurl = WebCore::KURL(WebCore::ParsedURLString, utf16); - - EXPECT_EQ(cases[i].protocol, kurl.protocol()); - EXPECT_EQ(cases[i].host, kurl.host()); - EXPECT_EQ(cases[i].port, kurl.port()); - EXPECT_EQ(cases[i].user, kurl.user()); - EXPECT_EQ(cases[i].pass, kurl.pass()); - EXPECT_EQ(cases[i].lastPathComponent, kurl.lastPathComponent()); - EXPECT_EQ(cases[i].query, kurl.query()); - EXPECT_EQ(cases[i].ref, kurl.fragmentIdentifier()); - EXPECT_EQ(cases[i].hasRef, kurl.hasFragmentIdentifier()); - } -} - -// Test a few cases where we're different just to make sure we give reasonable -// output. -TEST(KURLTest, DifferentGetters) -{ - ComponentCase cases[] = { - // url protocol host port user pass path lastPath query ref - - // Old WebKit allows references and queries in what we call "path" URLs - // like javascript, so the path here will only consist of "hello!". - {"javascript:hello!?#/\\world", "javascript", "", 0, "", 0, "hello!?#/\\world", "world", 0, 0}, - - // Old WebKit doesn't handle "parameters" in paths, so will - // disagree with us about where the path is for this URL. - {"http://a.com/hello;world", "http", "a.com", 0, "", 0, "/hello;world", "hello", 0, 0}, - - // WebKit doesn't like UTF-8 or UTF-16 input. - {"http://\xe4\xbd\xa0\xe5\xa5\xbd\xe4\xbd\xa0\xe5\xa5\xbd/", "http", "xn--6qqa088eba", 0, "", 0, "/", 0, 0, 0}, - - // WebKit %-escapes non-ASCII characters in reference, but we don't. - {"http://www.google.com/foo/blah?bar=baz#\xce\xb1\xce\xb2", "http", "www.google.com", 0, "", 0, "/foo/blah/", "blah", "bar=baz", "\xce\xb1\xce\xb2"}, - }; - - for (size_t i = 0; i < arraysize(cases); i++) { - WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); - - EXPECT_EQ(cases[i].protocol, kurl.protocol()); - EXPECT_EQ(cases[i].host, kurl.host()); - EXPECT_EQ(cases[i].port, kurl.port()); - EXPECT_EQ(cases[i].user, kurl.user()); - EXPECT_EQ(cases[i].pass, kurl.pass()); - EXPECT_EQ(cases[i].lastPath, kurl.lastPathComponent()); - EXPECT_EQ(cases[i].query, kurl.query()); - // Want to compare UCS-16 refs (or to null). - if (cases[i].ref) - EXPECT_EQ(WTF::String::fromUTF8(cases[i].ref), kurl.fragmentIdentifier()); - else - EXPECT_TRUE(kurl.fragmentIdentifier().isNull()); - } -} - -// Ensures that both ASCII and UTF-8 canonical URLs are handled properly and we -// get the correct string object out. -TEST(KURLTest, UTF8) -{ - const char asciiURL[] = "http://foo/bar#baz"; - WebCore::KURL asciiKURL(WebCore::ParsedURLString, asciiURL); - EXPECT_TRUE(asciiKURL.string() == WTF::String(asciiURL)); - - // When the result is ASCII, we should get an ASCII String. Some - // code depends on being able to compare the result of the .string() - // getter with another String, and the isASCIIness of the two - // strings must match for these functions (like equalIgnoringCase). - EXPECT_TRUE(WTF::equalIgnoringCase(asciiKURL, WTF::String(asciiURL))); - - // Reproduce code path in FrameLoader.cpp -- equalIgnoringCase implicitly - // expects gkurl.protocol() to have been created as ascii. - WebCore::KURL mailto(WebCore::ParsedURLString, "mailto:foo@foo.com"); - EXPECT_TRUE(WTF::equalIgnoringCase(mailto.protocol(), "mailto")); - - const char utf8URL[] = "http://foo/bar#\xe4\xbd\xa0\xe5\xa5\xbd"; - WebCore::KURL utf8KURL(WebCore::ParsedURLString, utf8URL); - - EXPECT_TRUE(utf8KURL.string() == WTF::String::fromUTF8(utf8URL)); -} - -TEST(KURLTest, Setters) -{ - // Replace the starting URL with the given components one at a time and - // verify that we're always the same as the old KURL. - // - // Note that old KURL won't canonicalize the default port away, so we - // can't set setting the http port to "80" (or even "0"). - // - // We also can't test clearing the query. - // - // The format is every other row is a test, and the row that follows it is the - // expected result. - struct ExpectedComponentCase { - const char* url; - const char* protocol; - const char* host; - const int port; - const char* user; - const char* pass; - const char* path; - const char* query; - const char* ref; - - // The full expected URL with the given "set" applied. - const char* expectedProtocol; - const char* expectedHost; - const char* expectedPort; - const char* expectedUser; - const char* expectedPass; - const char* expectedPath; - const char* expectedQuery; - const char* expectedRef; - } cases[] = { - // url protocol host port user pass path query ref - {"http://www.google.com/", "https", "news.google.com", 8888, "me", "pass", "/foo", "?q=asdf", "heehee", - "https://www.google.com/", - "https://news.google.com/", - "https://news.google.com:8888/", - "https://me@news.google.com:8888/", - "https://me:pass@news.google.com:8888/", - "https://me:pass@news.google.com:8888/foo", - "https://me:pass@news.google.com:8888/foo?q=asdf", - "https://me:pass@news.google.com:8888/foo?q=asdf#heehee"}, - - {"https://me:pass@google.com:88/a?f#b", "http", "goo.com", 92, "", "", "/", 0, "", - "http://me:pass@google.com:88/a?f#b", - "http://me:pass@goo.com:88/a?f#b", - "http://me:pass@goo.com:92/a?f#b", - "http://:pass@goo.com:92/a?f#b", - "http://goo.com:92/a?f#b", - "http://goo.com:92/?f#b", - "http://goo.com:92/#b", - "https://goo.com:92/"}, - }; - - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { - WebCore::KURL kurl(WebCore::ParsedURLString, cases[i].url); - - kurl.setProtocol(cases[i].protocol); - EXPECT_STREQ(cases[i].expectedProtocol, kurl.string().utf8().data()); - - kurl.setHost(cases[i].host); - EXPECT_STREQ(cases[i].expectedHost, kurl.string().utf8().data()); - - kurl.setPort(cases[i].port); - EXPECT_STREQ(cases[i].expectedPort, kurl.string().utf8().data()); - - kurl.setUser(cases[i].user); - EXPECT_STREQ(cases[i].expectedUser, kurl.string().utf8().data()); - - kurl.setPass(cases[i].pass); - EXPECT_STREQ(cases[i].expectedPass, kurl.string().utf8().data()); - - kurl.setPath(cases[i].path); - EXPECT_STREQ(cases[i].expectedPath, kurl.string().utf8().data()); - - kurl.setQuery(cases[i].query); - EXPECT_STREQ(cases[i].expectedQuery, kurl.string().utf8().data()); - - // Refs are tested below. On the Safari 3.1 branch, we don't match their - // KURL since we integrated a fix from their trunk. - } -} - -// Tests that KURL::decodeURLEscapeSequences works as expected -#if USE(GOOGLEURL) -TEST(KURLTest, Decode) -{ - struct DecodeCase { - const char* input; - const char* output; - } decodeCases[] = { - {"hello, world", "hello, world"}, - {"%01%02%03%04%05%06%07%08%09%0a%0B%0C%0D%0e%0f/", "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0B\x0C\x0D\x0e\x0f/"}, - {"%10%11%12%13%14%15%16%17%18%19%1a%1B%1C%1D%1e%1f/", "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1B\x1C\x1D\x1e\x1f/"}, - {"%20%21%22%23%24%25%26%27%28%29%2a%2B%2C%2D%2e%2f/", " !\"#$%&'()*+,-.//"}, - {"%30%31%32%33%34%35%36%37%38%39%3a%3B%3C%3D%3e%3f/", "0123456789:;<=>?/"}, - {"%40%41%42%43%44%45%46%47%48%49%4a%4B%4C%4D%4e%4f/", "@ABCDEFGHIJKLMNO/"}, - {"%50%51%52%53%54%55%56%57%58%59%5a%5B%5C%5D%5e%5f/", "PQRSTUVWXYZ[\\]^_/"}, - {"%60%61%62%63%64%65%66%67%68%69%6a%6B%6C%6D%6e%6f/", "`abcdefghijklmno/"}, - {"%70%71%72%73%74%75%76%77%78%79%7a%7B%7C%7D%7e%7f/", "pqrstuvwxyz{|}~\x7f/"}, - // Test un-UTF-8-ization. - {"%e4%bd%a0%e5%a5%bd", "\xe4\xbd\xa0\xe5\xa5\xbd"}, - }; - - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(decodeCases); i++) { - WTF::String input(decodeCases[i].input); - WTF::String str = WebCore::decodeURLEscapeSequences(input); - EXPECT_STREQ(decodeCases[i].output, str.utf8().data()); - } - - // Our decode should decode %00 - WTF::String zero = WebCore::decodeURLEscapeSequences("%00"); - EXPECT_STRNE("%00", zero.utf8().data()); - - // Test the error behavior for invalid UTF-8 (we differ from WebKit here). - WTF::String invalid = WebCore::decodeURLEscapeSequences( - "%e4%a0%e5%a5%bd"); - char16 invalidExpectedHelper[4] = { 0x00e4, 0x00a0, 0x597d, 0 }; - WTF::String invalidExpected( - reinterpret_cast<const ::UChar*>(invalidExpectedHelper), - 3); - EXPECT_EQ(invalidExpected, invalid); -} -#endif - -TEST(KURLTest, Encode) -{ - // Also test that it gets converted to UTF-8 properly. - char16 wideInputHelper[3] = { 0x4f60, 0x597d, 0 }; - WTF::String wideInput( - reinterpret_cast<const ::UChar*>(wideInputHelper), 2); - WTF::String wideReference("\xe4\xbd\xa0\xe5\xa5\xbd", 6); - WTF::String wideOutput = - WebCore::encodeWithURLEscapeSequences(wideInput); - EXPECT_EQ(wideReference, wideOutput); - - // Our encode only escapes NULLs for safety (see the implementation for - // more), so we only bother to test a few cases. - WTF::String input( - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 16); - WTF::String reference( - "%00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 18); - WTF::String output = WebCore::encodeWithURLEscapeSequences(input); - EXPECT_EQ(reference, output); -} - -TEST(KURLTest, ResolveEmpty) -{ - WebCore::KURL emptyBase; - - // WebKit likes to be able to resolve absolute input agains empty base URLs, - // which would normally be invalid since the base URL is invalid. - const char abs[] = "http://www.google.com/"; - WebCore::KURL resolveAbs(emptyBase, abs); - EXPECT_TRUE(resolveAbs.isValid()); - EXPECT_STREQ(abs, resolveAbs.string().utf8().data()); - - // Resolving a non-relative URL agains the empty one should still error. - const char rel[] = "foo.html"; - WebCore::KURL resolveErr(emptyBase, rel); - EXPECT_FALSE(resolveErr.isValid()); -} - -// WebKit will make empty URLs and set components on them. kurl doesn't allow -// replacements on invalid URLs, but here we do. -TEST(KURLTest, ReplaceInvalid) -{ - WebCore::KURL kurl; - - EXPECT_FALSE(kurl.isValid()); - EXPECT_TRUE(kurl.isEmpty()); - EXPECT_STREQ("", kurl.string().utf8().data()); - - kurl.setProtocol("http"); - // GKURL will say that a URL with just a scheme is invalid, KURL will not. -#if USE(GOOGLEURL) - EXPECT_FALSE(kurl.isValid()); -#else - EXPECT_TRUE(kurl.isValid()); -#endif - EXPECT_FALSE(kurl.isEmpty()); - // At this point, we do things slightly differently if there is only a scheme. - // We check the results here to make it more obvious what is going on, but it - // shouldn't be a big deal if these change. -#if USE(GOOGLEURL) - EXPECT_STREQ("http:", kurl.string().utf8().data()); -#else - EXPECT_STREQ("http:/", kurl.string().utf8().data()); -#endif - - kurl.setHost("www.google.com"); - EXPECT_TRUE(kurl.isValid()); - EXPECT_FALSE(kurl.isEmpty()); - EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data()); - - kurl.setPort(8000); - EXPECT_TRUE(kurl.isValid()); - EXPECT_FALSE(kurl.isEmpty()); - EXPECT_STREQ("http://www.google.com:8000/", kurl.string().utf8().data()); - - kurl.setPath("/favicon.ico"); - EXPECT_TRUE(kurl.isValid()); - EXPECT_FALSE(kurl.isEmpty()); - EXPECT_STREQ("http://www.google.com:8000/favicon.ico", kurl.string().utf8().data()); - - // Now let's test that giving an invalid replacement fails. Invalid - // protocols fail without modifying the URL, which should remain valid. -#if USE(GOOGLEURL) - EXPECT_FALSE(kurl.setProtocol("f/sj#@")); - EXPECT_TRUE(kurl.isValid()); -#endif -} - -TEST(KURLTest, Path) -{ - const char initial[] = "http://www.google.com/path/foo"; - WebCore::KURL kurl(WebCore::ParsedURLString, initial); - - // Clear by setting a null string. - WTF::String nullString; - EXPECT_TRUE(nullString.isNull()); - kurl.setPath(nullString); - EXPECT_STREQ("http://www.google.com/", kurl.string().utf8().data()); -} - -// Test that setting the query to different things works. Thq query is handled -// a littler differently than some of the other components. -TEST(KURLTest, Query) -{ - const char initial[] = "http://www.google.com/search?q=awesome"; - WebCore::KURL kurl(WebCore::ParsedURLString, initial); - - // Clear by setting a null string. - WTF::String nullString; - EXPECT_TRUE(nullString.isNull()); - kurl.setQuery(nullString); - EXPECT_STREQ("http://www.google.com/search", kurl.string().utf8().data()); - - // Clear by setting an empty string. - kurl = WebCore::KURL(WebCore::ParsedURLString, initial); - WTF::String emptyString(""); - EXPECT_FALSE(emptyString.isNull()); - kurl.setQuery(emptyString); - EXPECT_STREQ("http://www.google.com/search?", kurl.string().utf8().data()); - - // Set with something that begins in a question mark. - const char question[] = "?foo=bar"; - kurl.setQuery(question); - EXPECT_STREQ("http://www.google.com/search?foo=bar", - kurl.string().utf8().data()); - - // Set with something that doesn't begin in a question mark. - const char query[] = "foo=bar"; - kurl.setQuery(query); - EXPECT_STREQ("http://www.google.com/search?foo=bar", - kurl.string().utf8().data()); -} - -TEST(KURLTest, Ref) -{ - WebCore::KURL kurl(WebCore::ParsedURLString, "http://foo/bar#baz"); - - // Basic ref setting. - WebCore::KURL cur(WebCore::ParsedURLString, "http://foo/bar"); - cur.setFragmentIdentifier("asdf"); - EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data()); - cur = kurl; - cur.setFragmentIdentifier("asdf"); - EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data()); - - // Setting a ref to the empty string will set it to "#". - cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar"); - cur.setFragmentIdentifier(""); - EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data()); - cur = kurl; - cur.setFragmentIdentifier(""); - EXPECT_STREQ("http://foo/bar#", cur.string().utf8().data()); - - // Setting the ref to the null string will clear it altogether. - cur = WebCore::KURL(WebCore::ParsedURLString, "http://foo/bar"); - cur.setFragmentIdentifier(WTF::String()); - EXPECT_STREQ("http://foo/bar", cur.string().utf8().data()); - cur = kurl; - cur.setFragmentIdentifier(WTF::String()); - EXPECT_STREQ("http://foo/bar", cur.string().utf8().data()); -} - -TEST(KURLTest, Empty) -{ - WebCore::KURL kurl; - - // First test that regular empty URLs are the same. - EXPECT_TRUE(kurl.isEmpty()); - EXPECT_FALSE(kurl.isValid()); - EXPECT_TRUE(kurl.isNull()); - EXPECT_TRUE(kurl.string().isNull()); - EXPECT_TRUE(kurl.string().isEmpty()); - - // Test resolving a null URL on an empty string. - WebCore::KURL kurl2(kurl, ""); - EXPECT_FALSE(kurl2.isNull()); - EXPECT_TRUE(kurl2.isEmpty()); - EXPECT_FALSE(kurl2.isValid()); - EXPECT_FALSE(kurl2.string().isNull()); - EXPECT_TRUE(kurl2.string().isEmpty()); - EXPECT_FALSE(kurl2.string().isNull()); - EXPECT_TRUE(kurl2.string().isEmpty()); - - // Resolve the null URL on a null string. - WebCore::KURL kurl22(kurl, WTF::String()); - EXPECT_FALSE(kurl22.isNull()); - EXPECT_TRUE(kurl22.isEmpty()); - EXPECT_FALSE(kurl22.isValid()); - EXPECT_FALSE(kurl22.string().isNull()); - EXPECT_TRUE(kurl22.string().isEmpty()); - EXPECT_FALSE(kurl22.string().isNull()); - EXPECT_TRUE(kurl22.string().isEmpty()); - - // Test non-hierarchical schemes resolving. The actual URLs will be different. - // WebKit's one will set the string to "something.gif" and we'll set it to an - // empty string. I think either is OK, so we just check our behavior. -#if USE(GOOGLEURL) - WebCore::KURL kurl3(WebCore::KURL(WebCore::ParsedURLString, "data:foo"), - "something.gif"); - EXPECT_TRUE(kurl3.isEmpty()); - EXPECT_FALSE(kurl3.isValid()); -#endif - - // Test for weird isNull string input, - // see: http://bugs.webkit.org/show_bug.cgi?id=16487 - WebCore::KURL kurl4(WebCore::ParsedURLString, kurl.string()); - EXPECT_TRUE(kurl4.isEmpty()); - EXPECT_FALSE(kurl4.isValid()); - EXPECT_TRUE(kurl4.string().isNull()); - EXPECT_TRUE(kurl4.string().isEmpty()); - - // Resolving an empty URL on an invalid string. - WebCore::KURL kurl5(WebCore::KURL(), "foo.js"); - // We'll be empty in this case, but KURL won't be. Should be OK. - // EXPECT_EQ(kurl5.isEmpty(), kurl5.isEmpty()); - // EXPECT_EQ(kurl5.string().isEmpty(), kurl5.string().isEmpty()); - EXPECT_FALSE(kurl5.isValid()); - EXPECT_FALSE(kurl5.string().isNull()); - - // Empty string as input - WebCore::KURL kurl6(WebCore::ParsedURLString, ""); - EXPECT_TRUE(kurl6.isEmpty()); - EXPECT_FALSE(kurl6.isValid()); - EXPECT_FALSE(kurl6.string().isNull()); - EXPECT_TRUE(kurl6.string().isEmpty()); - - // Non-empty but invalid C string as input. - WebCore::KURL kurl7(WebCore::ParsedURLString, "foo.js"); - // WebKit will actually say this URL has the string "foo.js" but is invalid. - // We don't do that. - // EXPECT_EQ(kurl7.isEmpty(), kurl7.isEmpty()); - EXPECT_FALSE(kurl7.isValid()); - EXPECT_FALSE(kurl7.string().isNull()); -} - -TEST(KURLTest, UserPass) -{ - const char* src = "http://user:pass@google.com/"; - WebCore::KURL kurl(WebCore::ParsedURLString, src); - - // Clear just the username. - kurl.setUser(""); - EXPECT_EQ("http://:pass@google.com/", kurl.string()); - - // Clear just the password. - kurl = WebCore::KURL(WebCore::ParsedURLString, src); - kurl.setPass(""); - EXPECT_EQ("http://user@google.com/", kurl.string()); - - // Now clear both. - kurl.setUser(""); - EXPECT_EQ("http://google.com/", kurl.string()); -} - -TEST(KURLTest, Offsets) -{ - const char* src1 = "http://user:pass@google.com/foo/bar.html?baz=query#ref"; - WebCore::KURL kurl1(WebCore::ParsedURLString, src1); - - EXPECT_EQ(17u, kurl1.hostStart()); - EXPECT_EQ(27u, kurl1.hostEnd()); - EXPECT_EQ(27u, kurl1.pathStart()); - EXPECT_EQ(40u, kurl1.pathEnd()); - EXPECT_EQ(32u, kurl1.pathAfterLastSlash()); - - const char* src2 = "http://google.com/foo/"; - WebCore::KURL kurl2(WebCore::ParsedURLString, src2); - - EXPECT_EQ(7u, kurl2.hostStart()); - EXPECT_EQ(17u, kurl2.hostEnd()); - EXPECT_EQ(17u, kurl2.pathStart()); - EXPECT_EQ(22u, kurl2.pathEnd()); - EXPECT_EQ(22u, kurl2.pathAfterLastSlash()); - - const char* src3 = "javascript:foobar"; - WebCore::KURL kurl3(WebCore::ParsedURLString, src3); - - EXPECT_EQ(11u, kurl3.hostStart()); - EXPECT_EQ(11u, kurl3.hostEnd()); - EXPECT_EQ(11u, kurl3.pathStart()); - EXPECT_EQ(17u, kurl3.pathEnd()); - EXPECT_EQ(11u, kurl3.pathAfterLastSlash()); -} - -TEST(KURLTest, DeepCopy) -{ - const char url[] = "http://www.google.com/"; - WebCore::KURL src(WebCore::ParsedURLString, url); - EXPECT_TRUE(src.string() == url); // This really just initializes the cache. - WebCore::KURL dest = src.copy(); - EXPECT_TRUE(dest.string() == url); // This really just initializes the cache. - - // The pointers should be different for both UTF-8 and UTF-16. - EXPECT_NE(dest.string().characters(), src.string().characters()); - EXPECT_NE(dest.utf8String().data(), src.utf8String().data()); -} - -TEST(KURLTest, ProtocolIs) -{ - WebCore::KURL url1(WebCore::ParsedURLString, "foo://bar"); - EXPECT_TRUE(url1.protocolIs("foo")); - EXPECT_FALSE(url1.protocolIs("foo-bar")); - - WebCore::KURL url2(WebCore::ParsedURLString, "foo-bar:"); - EXPECT_TRUE(url2.protocolIs("foo-bar")); - EXPECT_FALSE(url2.protocolIs("foo")); -} - -} // namespace diff --git a/WebKit/chromium/tests/KeyboardTest.cpp b/WebKit/chromium/tests/KeyboardTest.cpp deleted file mode 100644 index 07bed3c..0000000 --- a/WebKit/chromium/tests/KeyboardTest.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include <gtest/gtest.h> - -#include "EditorClientImpl.h" -#include "EventTarget.h" -#include "KeyboardCodes.h" -#include "KeyboardEvent.h" -#include "WebInputEvent.h" -#include "WebInputEventConversion.h" - -using namespace WebCore; -using namespace WebKit; - -namespace { - -class KeyboardTest : public testing::Test { -public: - - // Pass a WebKeyboardEvent into the EditorClient and get back the string - // name of which editing event that key causes. - // E.g., sending in the enter key gives back "InsertNewline". - const char* interpretKeyEvent( - const WebKeyboardEvent& webKeyboardEvent, - PlatformKeyboardEvent::Type keyType) - { - EditorClientImpl editorImpl(0); - PlatformKeyboardEventBuilder evt(webKeyboardEvent); - evt.setKeyType(keyType); - RefPtr<KeyboardEvent> keyboardEvent = KeyboardEvent::create(evt, 0); - return editorImpl.interpretKeyEvent(keyboardEvent.get()); - } - - // Set up a WebKeyboardEvent KEY_DOWN event with key code and modifiers. - void setupKeyDownEvent(WebKeyboardEvent* keyboardEvent, - char keyCode, - int modifiers) - { - keyboardEvent->windowsKeyCode = keyCode; - keyboardEvent->modifiers = modifiers; - keyboardEvent->type = WebInputEvent::KeyDown; - keyboardEvent->text[0] = keyCode; - keyboardEvent->setKeyIdentifierFromWindowsKeyCode(); - } - - // Like interpretKeyEvent, but with pressing down OSModifier+|keyCode|. - // OSModifier is the platform's standard modifier key: control on most - // platforms, but meta (command) on Mac. - const char* interpretOSModifierKeyPress(char keyCode) - { - WebKeyboardEvent keyboardEvent; -#if OS(DARWIN) - WebInputEvent::Modifiers osModifier = WebInputEvent::MetaKey; -#else - WebInputEvent::Modifiers osModifier = WebInputEvent::ControlKey; -#endif - setupKeyDownEvent(&keyboardEvent, keyCode, osModifier); - return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown); - } - - // Like interpretKeyEvent, but with pressing down ctrl+|keyCode|. - const char* interpretCtrlKeyPress(char keyCode) - { - WebKeyboardEvent keyboardEvent; - setupKeyDownEvent(&keyboardEvent, keyCode, WebInputEvent::ControlKey); - return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::RawKeyDown); - } - - // Like interpretKeyEvent, but with typing a tab. - const char* interpretTab(int modifiers) - { - WebKeyboardEvent keyboardEvent; - setupKeyDownEvent(&keyboardEvent, '\t', modifiers); - return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char); - } - - // Like interpretKeyEvent, but with typing a newline. - const char* interpretNewLine(int modifiers) - { - WebKeyboardEvent keyboardEvent; - setupKeyDownEvent(&keyboardEvent, '\r', modifiers); - return interpretKeyEvent(keyboardEvent, PlatformKeyboardEvent::Char); - } - - // A name for "no modifiers set". - static const int noModifiers = 0; -}; - -TEST_F(KeyboardTest, TestCtrlReturn) -{ - EXPECT_STREQ("InsertNewline", interpretCtrlKeyPress(0xD)); -} - -TEST_F(KeyboardTest, TestOSModifierZ) -{ -#if !OS(DARWIN) - EXPECT_STREQ("Undo", interpretOSModifierKeyPress('Z')); -#endif -} - -TEST_F(KeyboardTest, TestOSModifierY) -{ -#if !OS(DARWIN) - EXPECT_STREQ("Redo", interpretOSModifierKeyPress('Y')); -#endif -} - -TEST_F(KeyboardTest, TestOSModifierA) -{ -#if !OS(DARWIN) - EXPECT_STREQ("SelectAll", interpretOSModifierKeyPress('A')); -#endif -} - -TEST_F(KeyboardTest, TestOSModifierX) -{ -#if !OS(DARWIN) - EXPECT_STREQ("Cut", interpretOSModifierKeyPress('X')); -#endif -} - -TEST_F(KeyboardTest, TestOSModifierC) -{ -#if !OS(DARWIN) - EXPECT_STREQ("Copy", interpretOSModifierKeyPress('C')); -#endif -} - -TEST_F(KeyboardTest, TestOSModifierV) -{ -#if !OS(DARWIN) - EXPECT_STREQ("Paste", interpretOSModifierKeyPress('V')); -#endif -} - -TEST_F(KeyboardTest, TestEscape) -{ - WebKeyboardEvent keyboardEvent; - setupKeyDownEvent(&keyboardEvent, WebCore::VKEY_ESCAPE, noModifiers); - - const char* result = interpretKeyEvent(keyboardEvent, - PlatformKeyboardEvent::RawKeyDown); - EXPECT_STREQ("Cancel", result); -} - -TEST_F(KeyboardTest, TestInsertTab) -{ - EXPECT_STREQ("InsertTab", interpretTab(noModifiers)); -} - -TEST_F(KeyboardTest, TestInsertBackTab) -{ - EXPECT_STREQ("InsertBacktab", interpretTab(WebInputEvent::ShiftKey)); -} - -TEST_F(KeyboardTest, TestInsertNewline) -{ - EXPECT_STREQ("InsertNewline", interpretNewLine(noModifiers)); -} - -TEST_F(KeyboardTest, TestInsertNewline2) -{ - EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::ControlKey)); -} - -TEST_F(KeyboardTest, TestInsertLineBreak) -{ - EXPECT_STREQ("InsertLineBreak", interpretNewLine(WebInputEvent::ShiftKey)); -} - -TEST_F(KeyboardTest, TestInsertNewline3) -{ - EXPECT_STREQ("InsertNewline", interpretNewLine(WebInputEvent::AltKey)); -} - -TEST_F(KeyboardTest, TestInsertNewline4) -{ - int modifiers = WebInputEvent::AltKey | WebInputEvent::ShiftKey; - const char* result = interpretNewLine(modifiers); - EXPECT_STREQ("InsertNewline", result); -} - -} // empty namespace diff --git a/WebKit/chromium/tests/PODArenaTest.cpp b/WebKit/chromium/tests/PODArenaTest.cpp deleted file mode 100644 index c5b1ede..0000000 --- a/WebKit/chromium/tests/PODArenaTest.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "PODArena.h" - -#include "ArenaTestHelpers.h" -#include <algorithm> -#include <gtest/gtest.h> -#include <wtf/FastMalloc.h> -#include <wtf/RefPtr.h> -#include <wtf/Vector.h> - -namespace WebCore { - -using ArenaTestHelpers::TrackedAllocator; - -namespace { - -// A couple of simple structs to allocate. -struct TestClass1 { - TestClass1() - : x(0), y(0), z(0), w(1) { } - - float x, y, z, w; -}; - -struct TestClass2 { - TestClass2() - : a(1), b(2), c(3), d(4) { } - - float a, b, c, d; -}; - -} // anonymous namespace - -class PODArenaTest : public testing::Test { -}; - -// Make sure the arena can successfully allocate from more than one -// region. -TEST_F(PODArenaTest, CanAllocateFromMoreThanOneRegion) -{ - RefPtr<TrackedAllocator> allocator = TrackedAllocator::create(); - RefPtr<PODArena> arena = PODArena::create(allocator); - int numIterations = 10 * PODArena::DefaultChunkSize / sizeof(TestClass1); - for (int i = 0; i < numIterations; ++i) - arena->allocateObject<TestClass1>(); - EXPECT_GT(allocator->numRegions(), 1); -} - -// Make sure the arena frees all allocated regions during destruction. -TEST_F(PODArenaTest, FreesAllAllocatedRegions) -{ - RefPtr<TrackedAllocator> allocator = TrackedAllocator::create(); - { - RefPtr<PODArena> arena = PODArena::create(allocator); - for (int i = 0; i < 3; i++) - arena->allocateObject<TestClass1>(); - EXPECT_GT(allocator->numRegions(), 0); - } - EXPECT_TRUE(allocator->isEmpty()); -} - -// Make sure the arena runs constructors of the objects allocated within. -TEST_F(PODArenaTest, RunsConstructors) -{ - RefPtr<PODArena> arena = PODArena::create(); - for (int i = 0; i < 10000; i++) { - TestClass1* tc1 = arena->allocateObject<TestClass1>(); - EXPECT_EQ(0, tc1->x); - EXPECT_EQ(0, tc1->y); - EXPECT_EQ(0, tc1->z); - EXPECT_EQ(1, tc1->w); - TestClass2* tc2 = arena->allocateObject<TestClass2>(); - EXPECT_EQ(1, tc2->a); - EXPECT_EQ(2, tc2->b); - EXPECT_EQ(3, tc2->c); - EXPECT_EQ(4, tc2->d); - } -} - -} // namespace WebCore diff --git a/WebKit/chromium/tests/PODIntervalTreeTest.cpp b/WebKit/chromium/tests/PODIntervalTreeTest.cpp deleted file mode 100644 index 8241a89..0000000 --- a/WebKit/chromium/tests/PODIntervalTreeTest.cpp +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Tests for the interval tree class. - -#include "config.h" - -#include "PODIntervalTree.h" - -#include "Logging.h" -#include "TreeTestHelpers.h" -#include <gtest/gtest.h> -#include <wtf/Vector.h> -#include <wtf/text/WTFString.h> - -namespace WebCore { - -using TreeTestHelpers::generateSeed; -using TreeTestHelpers::initRandom; -using TreeTestHelpers::nextRandom; - -#ifndef NDEBUG -template<> -struct ValueToString<float> { - static String string(const float& value) { return String::number(value); } -}; - -template<> -struct ValueToString<void*> { - static String string(void* const& value) - { - return String::format("0x%p", value); - } -}; -#endif - -TEST(PODIntervalTreeTest, TestInsertion) -{ - PODIntervalTree<float> tree; - tree.add(PODInterval<float>(2, 4)); - ASSERT_TRUE(tree.checkInvariants()); -} - -TEST(PODIntervalTreeTest, TestInsertionAndQuery) -{ - PODIntervalTree<float> tree; - tree.add(PODInterval<float>(2, 4)); - ASSERT_TRUE(tree.checkInvariants()); - Vector<PODInterval<float> > result = tree.allOverlaps(PODInterval<float>(1, 3)); - EXPECT_EQ(1U, result.size()); - EXPECT_EQ(2, result[0].low()); - EXPECT_EQ(4, result[0].high()); -} - -TEST(PODIntervalTreeTest, TestQueryAgainstZeroSizeInterval) -{ - PODIntervalTree<float> tree; - tree.add(PODInterval<float>(1, 2.5)); - tree.add(PODInterval<float>(3.5, 5)); - tree.add(PODInterval<float>(2, 4)); - ASSERT_TRUE(tree.checkInvariants()); - Vector<PODInterval<float> > result = tree.allOverlaps(PODInterval<float>(3, 3)); - EXPECT_EQ(1U, result.size()); - EXPECT_EQ(2, result[0].low()); - EXPECT_EQ(4, result[0].high()); -} - -#ifndef NDEBUG -template<> -struct ValueToString<int*> { - static String string(int* const& value) - { - return String::format("0x%p", value); - } -}; -#endif - -TEST(PODIntervalTreeTest, TestDuplicateElementInsertion) -{ - PODIntervalTree<float, int*> tree; - int tmp1 = 1; - int tmp2 = 2; - typedef PODIntervalTree<float, int*>::IntervalType IntervalType; - IntervalType interval1(1, 3, &tmp1); - IntervalType interval2(1, 3, &tmp2); - tree.add(interval1); - tree.add(interval2); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(interval1)); - EXPECT_TRUE(tree.contains(interval2)); - EXPECT_TRUE(tree.remove(interval1)); - EXPECT_TRUE(tree.contains(interval2)); - EXPECT_FALSE(tree.contains(interval1)); - EXPECT_TRUE(tree.remove(interval2)); - EXPECT_EQ(0, tree.size()); -} - -namespace { - -struct UserData1 { -public: - UserData1() - : a(0), b(1) { } - - float a; - int b; -}; - -} // anonymous namespace - -#ifndef NDEBUG -template<> -struct ValueToString<UserData1> { - static String string(const UserData1& value) - { - return String("[UserData1 a=") + String::number(value.a) + " b=" + String::number(value.b) + "]"; - } -}; -#endif - -TEST(PODIntervalTreeTest, TestInsertionOfComplexUserData) -{ - PODIntervalTree<float, UserData1> tree; - UserData1 data1; - data1.a = 5; - data1.b = 6; - tree.add(tree.createInterval(2, 4, data1)); - ASSERT_TRUE(tree.checkInvariants()); -} - -TEST(PODIntervalTreeTest, TestQueryingOfComplexUserData) -{ - PODIntervalTree<float, UserData1> tree; - UserData1 data1; - data1.a = 5; - data1.b = 6; - tree.add(tree.createInterval(2, 4, data1)); - ASSERT_TRUE(tree.checkInvariants()); - Vector<PODInterval<float, UserData1> > overlaps = tree.allOverlaps(tree.createInterval(3, 5, data1)); - EXPECT_EQ(1U, overlaps.size()); - EXPECT_EQ(5, overlaps[0].data().a); - EXPECT_EQ(6, overlaps[0].data().b); -} - -namespace { - -class EndpointType1 { -public: - explicit EndpointType1(int value) - : m_value(value) { } - - int value() const { return m_value; } - - bool operator<(const EndpointType1& other) const { return m_value < other.m_value; } - bool operator==(const EndpointType1& other) const { return m_value == other.m_value; } - -private: - int m_value; - // These operators should not be called by the interval tree. - bool operator>(const EndpointType1& other); - bool operator<=(const EndpointType1& other); - bool operator>=(const EndpointType1& other); - bool operator!=(const EndpointType1& other); -}; - -} // anonymous namespace - -#ifndef NDEBUG -template<> -struct ValueToString<EndpointType1> { - static String string(const EndpointType1& value) - { - return String("[EndpointType1 value=") + String::number(value.value()) + "]"; - } -}; -#endif - -TEST(PODIntervalTreeTest, TestTreeDoesNotRequireMostOperators) -{ - PODIntervalTree<EndpointType1> tree; - tree.add(tree.createInterval(EndpointType1(1), EndpointType1(2))); - ASSERT_TRUE(tree.checkInvariants()); -} - -// Uncomment to debug a failure of the insertion and deletion test. Won't work -// in release builds. -// #define DEBUG_INSERTION_AND_DELETION_TEST - -#ifndef NDEBUG -template<> -struct ValueToString<int> { - static String string(const int& value) { return String::number(value); } -}; -#endif - -namespace { - -void InsertionAndDeletionTest(int32_t seed, int treeSize) -{ - initRandom(seed); - int maximumValue = treeSize; - // Build the tree - PODIntervalTree<int> tree; - Vector<PODInterval<int> > addedElements; - Vector<PODInterval<int> > removedElements; - for (int i = 0; i < treeSize; i++) { - int left = nextRandom(maximumValue); - int length = nextRandom(maximumValue); - PODInterval<int> interval(left, left + length); - tree.add(interval); -#ifdef DEBUG_INSERTION_AND_DELETION_TEST - LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(interval).ascii().data()); -#endif - addedElements.append(interval); - } - // Churn the tree's contents. - // First remove half of the elements in random order. - for (int i = 0; i < treeSize / 2; i++) { - int index = nextRandom(addedElements.size()); -#ifdef DEBUG_INSERTION_AND_DELETION_TEST - LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data()); -#endif - ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed; - tree.remove(addedElements[index]); - removedElements.append(addedElements[index]); - addedElements.remove(index); - ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed; - } - // Now randomly add or remove elements. - for (int i = 0; i < 2 * treeSize; i++) { - bool add = false; - if (!addedElements.size()) - add = true; - else if (!removedElements.size()) - add = false; - else - add = (nextRandom(2) == 1); - if (add) { - int index = nextRandom(removedElements.size()); -#ifdef DEBUG_INSERTION_AND_DELETION_TEST - LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(removedElements[index]).ascii().data()); -#endif - tree.add(removedElements[index]); - addedElements.append(removedElements[index]); - removedElements.remove(index); - } else { - int index = nextRandom(addedElements.size()); -#ifdef DEBUG_INSERTION_AND_DELETION_TEST - LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data()); -#endif - ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed; - ASSERT_TRUE(tree.remove(addedElements[index])) << "Test failed for seed " << seed; - removedElements.append(addedElements[index]); - addedElements.remove(index); - } - ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed; - } -} - -} // anonymous namespace - -TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest1) -{ - InsertionAndDeletionTest(13972, 100); -} - -TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest2) -{ - InsertionAndDeletionTest(1283382113, 10); -} - -TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest3) -{ - // This is the sequence of insertions and deletions that triggered - // the failure in RandomDeletionAndInsertionRegressionTest2. - PODIntervalTree<int> tree; - tree.add(tree.createInterval(0, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(4, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(8, 9)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(1, 4)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(3, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(4, 12)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(0, 2)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(0, 2)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(9, 13)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(0, 1)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(0, 2)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(9, 13)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(0, 2)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(0, 1)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(4, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(4, 12)); - ASSERT_TRUE(tree.checkInvariants()); -} - -TEST(PODIntervalTreeTest, RandomDeletionAndInsertionRegressionTest4) -{ - // Even further reduced test case for RandomDeletionAndInsertionRegressionTest3. - PODIntervalTree<int> tree; - tree.add(tree.createInterval(0, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(8, 9)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(1, 4)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(3, 5)); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(tree.createInterval(4, 12)); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(tree.createInterval(4, 12)); - ASSERT_TRUE(tree.checkInvariants()); -} - -TEST(PODIntervalTreeTest, TestRandomDeletionAndInsertion) -{ - InsertionAndDeletionTest(generateSeed(), 1000); -} - -} // namespace WebCore diff --git a/WebKit/chromium/tests/PODRedBlackTreeTest.cpp b/WebKit/chromium/tests/PODRedBlackTreeTest.cpp deleted file mode 100644 index 0cc10e7..0000000 --- a/WebKit/chromium/tests/PODRedBlackTreeTest.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Tests for the red-black tree class. - -#include "config.h" - -#include "PODRedBlackTree.h" - -#include "ArenaTestHelpers.h" -#include "TreeTestHelpers.h" -#include <gtest/gtest.h> -#include <wtf/Vector.h> - -namespace WebCore { - -using ArenaTestHelpers::TrackedAllocator; -using TreeTestHelpers::generateSeed; -using TreeTestHelpers::initRandom; -using TreeTestHelpers::nextRandom; - -TEST(PODRedBlackTreeTest, TestTreeAllocatesFromArena) -{ - RefPtr<TrackedAllocator> allocator = TrackedAllocator::create(); - { - RefPtr<PODArena> arena = PODArena::create(allocator); - PODRedBlackTree<int> tree(arena); - int numAdditions = 2 * PODArena::DefaultChunkSize / sizeof(int); - for (int i = 0; i < numAdditions; ++i) - tree.add(i); - EXPECT_GT(allocator->numRegions(), 1); - } - EXPECT_EQ(allocator->numRegions(), 0); -} - -TEST(PODRedBlackTreeTest, TestSingleElementInsertion) -{ - PODRedBlackTree<int> tree; - tree.add(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(5)); -} - -TEST(PODRedBlackTreeTest, TestMultipleElementInsertion) -{ - PODRedBlackTree<int> tree; - tree.add(4); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(4)); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(3)); - tree.add(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(5)); - EXPECT_TRUE(tree.contains(4)); - EXPECT_TRUE(tree.contains(3)); -} - -TEST(PODRedBlackTreeTest, TestDuplicateElementInsertion) -{ - PODRedBlackTree<int> tree; - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_EQ(3, tree.size()); - EXPECT_TRUE(tree.contains(3)); -} - -TEST(PODRedBlackTreeTest, TestSingleElementInsertionAndDeletion) -{ - PODRedBlackTree<int> tree; - tree.add(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(5)); - tree.remove(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_FALSE(tree.contains(5)); -} - -TEST(PODRedBlackTreeTest, TestMultipleElementInsertionAndDeletion) -{ - PODRedBlackTree<int> tree; - tree.add(4); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(4)); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(3)); - tree.add(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(5)); - EXPECT_TRUE(tree.contains(4)); - EXPECT_TRUE(tree.contains(3)); - tree.remove(4); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(3)); - EXPECT_FALSE(tree.contains(4)); - EXPECT_TRUE(tree.contains(5)); - tree.remove(5); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_TRUE(tree.contains(3)); - EXPECT_FALSE(tree.contains(4)); - EXPECT_FALSE(tree.contains(5)); - EXPECT_EQ(1, tree.size()); -} - -TEST(PODRedBlackTreeTest, TestDuplicateElementInsertionAndDeletion) -{ - PODRedBlackTree<int> tree; - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_EQ(3, tree.size()); - EXPECT_TRUE(tree.contains(3)); - tree.remove(3); - ASSERT_TRUE(tree.checkInvariants()); - tree.remove(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_EQ(1, tree.size()); - EXPECT_TRUE(tree.contains(3)); - tree.remove(3); - ASSERT_TRUE(tree.checkInvariants()); - EXPECT_EQ(0, tree.size()); - EXPECT_FALSE(tree.contains(3)); -} - -TEST(PODRedBlackTreeTest, FailingInsertionRegressionTest1) -{ - // These numbers came from a previously-failing randomized test run. - PODRedBlackTree<int> tree; - tree.add(5113); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(4517); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(3373); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(9307); - ASSERT_TRUE(tree.checkInvariants()); - tree.add(7077); - ASSERT_TRUE(tree.checkInvariants()); -} - -namespace { -void InsertionAndDeletionTest(const int32_t seed, const int treeSize) -{ - initRandom(seed); - const int maximumValue = treeSize; - // Build the tree. - PODRedBlackTree<int> tree; - Vector<int> values; - for (int i = 0; i < treeSize; i++) { - int value = nextRandom(maximumValue); - tree.add(value); - ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed; - values.append(value); - } - // Churn the tree's contents. - for (int i = 0; i < treeSize; i++) { - // Pick a random value to remove. - int index = nextRandom(treeSize); - int value = values[index]; - // Remove this value. - tree.remove(value); - ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed; - // Replace it with a new one. - value = nextRandom(maximumValue); - values[index] = value; - tree.add(value); - ASSERT_TRUE(tree.checkInvariants()) << "Test failed for seed " << seed; - } -} -} // anonymous namespace - -TEST(PODRedBlackTreeTest, RandomDeletionAndInsertionRegressionTest1) -{ - InsertionAndDeletionTest(12311, 100); -} - -TEST(PODRedBlackTreeTest, TestRandomDeletionAndInsertion) -{ - InsertionAndDeletionTest(generateSeed(), 100); -} - -} // namespace WebCore diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp deleted file mode 100644 index 4b6b123..0000000 --- a/WebKit/chromium/tests/PopupMenuTest.cpp +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include <gtest/gtest.h> - -#include "Color.h" -#include "KeyboardCodes.h" -#include "PopupMenu.h" -#include "PopupMenuClient.h" -#include "PopupMenuChromium.h" -#include "WebFrameClient.h" -#include "WebFrameImpl.h" -#include "WebInputEvent.h" -#include "WebPopupMenuImpl.h" -#include "WebScreenInfo.h" -#include "WebViewClient.h" -#include "WebViewImpl.h" - -using namespace WebCore; -using namespace WebKit; - -namespace { - -class TestPopupMenuClient : public PopupMenuClient { -public: - // Item at index 0 is selected by default. - TestPopupMenuClient() : m_selectIndex(0) { } - virtual ~TestPopupMenuClient() {} - virtual void valueChanged(unsigned listIndex, bool fireEvents = true) - { - m_selectIndex = listIndex; - } - virtual void selectionChanged(unsigned, bool) {} - virtual void selectionCleared() {} - - virtual String itemText(unsigned listIndex) const - { - String str("Item "); - str.append(String::number(listIndex)); - return str; - } - virtual String itemLabel(unsigned) const { return String(); } - virtual String itemIcon(unsigned) const { return String(); } - virtual String itemToolTip(unsigned listIndex) const { return itemText(listIndex); } - virtual String itemAccessibilityText(unsigned listIndex) const { return itemText(listIndex); } - virtual bool itemIsEnabled(unsigned listIndex) const { return true; } - virtual PopupMenuStyle itemStyle(unsigned listIndex) const - { - Font font(FontPlatformData(12.0, false, false), false); - return PopupMenuStyle(Color::black, Color::white, font, true, false, Length(), TextDirection()); - } - virtual PopupMenuStyle menuStyle() const { return itemStyle(0); } - virtual int clientInsetLeft() const { return 0; } - virtual int clientInsetRight() const { return 0; } - virtual int clientPaddingLeft() const { return 0; } - virtual int clientPaddingRight() const { return 0; } - virtual int listSize() const { return 10; } - virtual int selectedIndex() const { return m_selectIndex; } - virtual void popupDidHide() { } - virtual bool itemIsSeparator(unsigned listIndex) const { return false; } - virtual bool itemIsLabel(unsigned listIndex) const { return false; } - virtual bool itemIsSelected(unsigned listIndex) const { return listIndex == m_selectIndex; } - virtual bool shouldPopOver() const { return false; } - virtual bool valueShouldChangeOnHotTrack() const { return false; } - virtual void setTextFromItem(unsigned listIndex) { } - - virtual FontSelector* fontSelector() const { return 0; } - virtual HostWindow* hostWindow() const { return 0; } - - virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize) { return 0; } - -private: - unsigned m_selectIndex; -}; - -class TestWebWidgetClient : public WebWidgetClient { -public: - ~TestWebWidgetClient() { } -}; - -class TestWebPopupMenuImpl : public WebPopupMenuImpl { -public: - static PassRefPtr<TestWebPopupMenuImpl> create(WebWidgetClient* client) - { - return adoptRef(new TestWebPopupMenuImpl(client)); - } - - ~TestWebPopupMenuImpl() { } - -private: - TestWebPopupMenuImpl(WebWidgetClient* client) : WebPopupMenuImpl(client) { } -}; - -class TestWebWidget : public WebWidget { -public: - virtual ~TestWebWidget() { } - virtual void close() { } - virtual WebSize size() { return WebSize(100, 100); } - virtual void resize(const WebSize&) { } - virtual void layout() { } - virtual void paint(WebCanvas*, const WebRect&) { } - virtual void themeChanged() { } - virtual void composite(bool finish) { } - virtual bool handleInputEvent(const WebInputEvent&) { return true; } - virtual void mouseCaptureLost() { } - virtual void setFocus(bool) { } - virtual bool setComposition( - const WebString& text, - const WebVector<WebCompositionUnderline>& underlines, - int selectionStart, - int selectionEnd) { return true; } - virtual bool confirmComposition() { return true; } - virtual bool confirmComposition(const WebString& text) { return true; } - virtual WebTextInputType textInputType() { return WebKit::WebTextInputTypeNone; } - virtual WebRect caretOrSelectionBounds() { return WebRect(); } - virtual void setTextDirection(WebTextDirection) { } -}; - -class TestWebViewClient : public WebViewClient { -public: - TestWebViewClient() : m_webPopupMenu(TestWebPopupMenuImpl::create(&m_webWidgetClient)) { } - ~TestWebViewClient() { } - - virtual WebWidget* createPopupMenu(WebPopupType) { return m_webPopupMenu.get(); } - - // We need to override this so that the popup menu size is not 0 - // (the layout code checks to see if the popup fits on the screen). - virtual WebScreenInfo screenInfo() - { - WebScreenInfo screenInfo; - screenInfo.availableRect.height = 2000; - screenInfo.availableRect.width = 2000; - return screenInfo; - } - -private: - TestWebWidgetClient m_webWidgetClient; - RefPtr<TestWebPopupMenuImpl> m_webPopupMenu; -}; - -class TestWebFrameClient : public WebFrameClient { -public: - ~TestWebFrameClient() { } -}; - -class SelectPopupMenuTest : public testing::Test { -public: - SelectPopupMenuTest() - { - } - -protected: - virtual void SetUp() - { - m_webView = static_cast<WebViewImpl*>(WebView::create(&m_webviewClient, 0)); - m_webView->initializeMainFrame(&m_webFrameClient); - m_popupMenu = adoptRef(new PopupMenuChromium(&m_popupMenuClient)); - } - - virtual void TearDown() - { - m_popupMenu = 0; - m_webView->close(); - } - - // Returns true if there currently is a select popup in the WebView. - bool popupOpen() const { return m_webView->selectPopup(); } - - int selectedIndex() const { return m_popupMenuClient.selectedIndex(); } - - void showPopup() - { - m_popupMenu->show(IntRect(0, 0, 100, 100), - static_cast<WebFrameImpl*>(m_webView->mainFrame())->frameView(), 0); - ASSERT_TRUE(popupOpen()); - EXPECT_TRUE(m_webView->selectPopup()->popupType() == PopupContainer::Select); - } - - void hidePopup() - { - m_popupMenu->hide(); - EXPECT_FALSE(popupOpen()); - } - - void simulateKeyDownEvent(int keyCode) - { - simulateKeyEvent(WebInputEvent::RawKeyDown, keyCode); - } - - void simulateKeyUpEvent(int keyCode) - { - simulateKeyEvent(WebInputEvent::KeyUp, keyCode); - } - - // Simulates a key event on the WebView. - // The WebView forwards the event to the select popup if one is open. - void simulateKeyEvent(WebInputEvent::Type eventType, int keyCode) - { - WebKeyboardEvent keyEvent; - keyEvent.windowsKeyCode = keyCode; - keyEvent.type = eventType; - m_webView->handleInputEvent(keyEvent); - } - - // Simulates a mouse event on the select popup. - void simulateLeftMouseDownEvent(const IntPoint& point) - { - PlatformMouseEvent mouseEvent(point, point, LeftButton, MouseEventPressed, - 1, false, false, false, false, 0); - m_webView->selectPopup()->handleMouseDownEvent(mouseEvent); - } - void simulateLeftMouseUpEvent(const IntPoint& point) - { - PlatformMouseEvent mouseEvent(point, point, LeftButton, MouseEventReleased, - 1, false, false, false, false, 0); - m_webView->selectPopup()->handleMouseReleaseEvent(mouseEvent); - } - -protected: - TestWebViewClient m_webviewClient; - WebViewImpl* m_webView; - TestWebFrameClient m_webFrameClient; - TestPopupMenuClient m_popupMenuClient; - RefPtr<PopupMenu> m_popupMenu; -}; - -// Tests that show/hide and repeats. Select popups are reused in web pages when -// they are reopened, that what this is testing. -TEST_F(SelectPopupMenuTest, ShowThenHide) -{ - for (int i = 0; i < 3; i++) { - showPopup(); - hidePopup(); - } -} - -// Tests that showing a select popup and deleting it does not cause problem. -// This happens in real-life if a page navigates while a select popup is showing. -TEST_F(SelectPopupMenuTest, ShowThenDelete) -{ - showPopup(); - // Nothing else to do, TearDown() deletes the popup. -} - -// Tests that losing focus closes the select popup. -TEST_F(SelectPopupMenuTest, ShowThenLoseFocus) -{ - showPopup(); - // Simulate losing focus. - m_webView->setFocus(false); - - // Popup should have closed. - EXPECT_FALSE(popupOpen()); -} - -// Tests that pressing ESC closes the popup. -TEST_F(SelectPopupMenuTest, ShowThenPressESC) -{ - showPopup(); - simulateKeyDownEvent(VKEY_ESCAPE); - // Popup should have closed. - EXPECT_FALSE(popupOpen()); -} - -// Tests selecting an item with the arrows and enter/esc/tab. -TEST_F(SelectPopupMenuTest, SelectWithKeys) -{ - showPopup(); - // Simulate selecting the 2nd item by pressing Down, Down, enter. - simulateKeyDownEvent(VKEY_DOWN); - simulateKeyDownEvent(VKEY_DOWN); - simulateKeyDownEvent(VKEY_RETURN); - - // Popup should have closed. - EXPECT_TRUE(!popupOpen()); - EXPECT_EQ(2, selectedIndex()); - - // It should work as well with ESC. - showPopup(); - simulateKeyDownEvent(VKEY_DOWN); - simulateKeyDownEvent(VKEY_ESCAPE); - EXPECT_FALSE(popupOpen()); - EXPECT_EQ(3, selectedIndex()); - - // It should work as well with TAB. - showPopup(); - simulateKeyDownEvent(VKEY_DOWN); - simulateKeyDownEvent(VKEY_TAB); - EXPECT_FALSE(popupOpen()); - EXPECT_EQ(4, selectedIndex()); -} - -// Tests that selecting an item with the mouse does select the item and close -// the popup. -TEST_F(SelectPopupMenuTest, ClickItem) -{ - showPopup(); - - // Y of 18 to be on the item at index 1 (12 font plus border and more to be safe). - IntPoint row1Point(2, 18); - // Simulate a click down/up on the first item. - simulateLeftMouseDownEvent(row1Point); - simulateLeftMouseUpEvent(row1Point); - - // Popup should have closed and the item at index 1 selected. - EXPECT_FALSE(popupOpen()); - EXPECT_EQ(1, selectedIndex()); -} - -// Tests that moving the mouse over an item and then clicking outside the select popup -// leaves the seleted item unchanged. -TEST_F(SelectPopupMenuTest, MouseOverItemClickOutside) -{ - showPopup(); - - // Y of 18 to be on the item at index 1 (12 font plus border and more to be safe). - IntPoint row1Point(2, 18); - // Simulate the mouse moving over the first item. - PlatformMouseEvent mouseEvent(row1Point, row1Point, NoButton, MouseEventMoved, - 1, false, false, false, false, 0); - m_webView->selectPopup()->handleMouseMoveEvent(mouseEvent); - - // Click outside the popup. - simulateLeftMouseDownEvent(IntPoint(1000, 1000)); - - // Popup should have closed and item 0 should still be selected. - EXPECT_FALSE(popupOpen()); - EXPECT_EQ(0, selectedIndex()); -} - -// Tests that selecting an item with the keyboard and then clicking outside the select -// popup does select that item. -TEST_F(SelectPopupMenuTest, SelectItemWithKeyboardItemClickOutside) -{ - showPopup(); - - // Simulate selecting the 2nd item by pressing Down, Down. - simulateKeyDownEvent(VKEY_DOWN); - simulateKeyDownEvent(VKEY_DOWN); - - // Click outside the popup. - simulateLeftMouseDownEvent(IntPoint(1000, 1000)); - - // Popup should have closed and the item should have been selected. - EXPECT_FALSE(popupOpen()); - EXPECT_EQ(2, selectedIndex()); -} - -} // namespace diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp deleted file mode 100644 index b213de7..0000000 --- a/WebKit/chromium/tests/RunAllTests.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// FIXME: Avoid this source dependency on Chromium's base module. -#include <base/test/test_suite.h> - -#include "WebKit.h" -#include "WebKitClient.h" -#include <webkit/support/webkit_support.h> - -#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST) -#include "WebUnitTests.h" -#endif - -int main(int argc, char** argv) -{ - TestSuite testSuite(argc, argv); - // TestSuite must be created before SetUpTestEnvironment so it performs - // initializations needed by WebKit support. - webkit_support::SetUpTestEnvironmentForUnitTests(); - -#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST) - // For chromium multi-dll build, need to call webkit api to create a - // TestSuite instance in webkit.dll and run all tests from there. - int result = WebKit::RunAllUnitTests(argc, argv); -#else - int result = testSuite.Run(); -#endif - - webkit_support::TearDownTestEnvironment(); - return result; -} diff --git a/WebKit/chromium/tests/TilingDataTest.cpp b/WebKit/chromium/tests/TilingDataTest.cpp deleted file mode 100755 index ec18f01..0000000 --- a/WebKit/chromium/tests/TilingDataTest.cpp +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "TilingData.h" - -#include <gtest/gtest.h> - -using namespace WebCore; - -namespace { - -TEST(TilingDataTest, numTiles_NoTiling) -{ - EXPECT_EQ(1, TilingData(16, 16, 16, false).numTiles()); - EXPECT_EQ(1, TilingData(16, 15, 15, true).numTiles()); - EXPECT_EQ(1, TilingData(16, 16, 16, true).numTiles()); - EXPECT_EQ(1, TilingData(16, 1, 16, false).numTiles()); - EXPECT_EQ(1, TilingData(15, 15, 15, true).numTiles()); -} - -TEST(TilingDataTest, numTiles_TilingNoBorders) -{ - EXPECT_EQ(1, TilingData(4, 1, 4, false).numTiles()); - EXPECT_EQ(1, TilingData(4, 2, 4, false).numTiles()); - EXPECT_EQ(1, TilingData(4, 3, 4, false).numTiles()); - EXPECT_EQ(1, TilingData(4, 4, 4, false).numTiles()); - EXPECT_EQ(2, TilingData(4, 5, 4, false).numTiles()); - EXPECT_EQ(2, TilingData(4, 6, 4, false).numTiles()); - EXPECT_EQ(2, TilingData(4, 7, 4, false).numTiles()); - EXPECT_EQ(2, TilingData(4, 8, 4, false).numTiles()); - EXPECT_EQ(3, TilingData(4, 9, 4, false).numTiles()); - EXPECT_EQ(3, TilingData(4, 10, 4, false).numTiles()); - EXPECT_EQ(3, TilingData(4, 11, 4, false).numTiles()); - - EXPECT_EQ(1, TilingData(5, 1, 5, false).numTiles()); - EXPECT_EQ(1, TilingData(5, 2, 5, false).numTiles()); - EXPECT_EQ(1, TilingData(5, 3, 5, false).numTiles()); - EXPECT_EQ(1, TilingData(5, 4, 5, false).numTiles()); - EXPECT_EQ(1, TilingData(5, 5, 5, false).numTiles()); - EXPECT_EQ(2, TilingData(5, 6, 5, false).numTiles()); - EXPECT_EQ(2, TilingData(5, 7, 5, false).numTiles()); - EXPECT_EQ(2, TilingData(5, 8, 5, false).numTiles()); - EXPECT_EQ(2, TilingData(5, 9, 5, false).numTiles()); - EXPECT_EQ(2, TilingData(5, 10, 5, false).numTiles()); - EXPECT_EQ(3, TilingData(5, 11, 5, false).numTiles()); - - EXPECT_EQ(1, TilingData(16, 16, 16, false).numTiles()); - EXPECT_EQ(1, TilingData(17, 16, 16, false).numTiles()); - EXPECT_EQ(4, TilingData(15, 16, 16, false).numTiles()); - EXPECT_EQ(4, TilingData(8, 16, 16, false).numTiles()); - EXPECT_EQ(6, TilingData(8, 17, 16, false).numTiles()); -} - -TEST(TilingDataTest, numTiles_TilingWithBorders) -{ - EXPECT_EQ(1, TilingData(3, 1, 3, true).numTiles()); - EXPECT_EQ(1, TilingData(3, 2, 3, true).numTiles()); - EXPECT_EQ(1, TilingData(3, 3, 3, true).numTiles()); - EXPECT_EQ(2, TilingData(3, 4, 3, true).numTiles()); - EXPECT_EQ(3, TilingData(3, 5, 3, true).numTiles()); - EXPECT_EQ(4, TilingData(3, 6, 3, true).numTiles()); - EXPECT_EQ(5, TilingData(3, 7, 3, true).numTiles()); - - EXPECT_EQ(1, TilingData(4, 1, 4, true).numTiles()); - EXPECT_EQ(1, TilingData(4, 2, 4, true).numTiles()); - EXPECT_EQ(1, TilingData(4, 3, 4, true).numTiles()); - EXPECT_EQ(1, TilingData(4, 4, 4, true).numTiles()); - EXPECT_EQ(2, TilingData(4, 5, 4, true).numTiles()); - EXPECT_EQ(2, TilingData(4, 6, 4, true).numTiles()); - EXPECT_EQ(3, TilingData(4, 7, 4, true).numTiles()); - EXPECT_EQ(3, TilingData(4, 8, 4, true).numTiles()); - EXPECT_EQ(4, TilingData(4, 9, 4, true).numTiles()); - EXPECT_EQ(4, TilingData(4, 10, 4, true).numTiles()); - EXPECT_EQ(5, TilingData(4, 11, 4, true).numTiles()); - - EXPECT_EQ(1, TilingData(5, 1, 5, true).numTiles()); - EXPECT_EQ(1, TilingData(5, 2, 5, true).numTiles()); - EXPECT_EQ(1, TilingData(5, 3, 5, true).numTiles()); - EXPECT_EQ(1, TilingData(5, 4, 5, true).numTiles()); - EXPECT_EQ(1, TilingData(5, 5, 5, true).numTiles()); - EXPECT_EQ(2, TilingData(5, 6, 5, true).numTiles()); - EXPECT_EQ(2, TilingData(5, 7, 5, true).numTiles()); - EXPECT_EQ(2, TilingData(5, 8, 5, true).numTiles()); - EXPECT_EQ(3, TilingData(5, 9, 5, true).numTiles()); - EXPECT_EQ(3, TilingData(5, 10, 5, true).numTiles()); - EXPECT_EQ(3, TilingData(5, 11, 5, true).numTiles()); -} - -TEST(TilingDataTest, tileXIndexFromSrcCoord) -{ - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(0)); - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(1)); - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(2)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(3)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(4)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(5)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(6)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(7)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(8)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(9)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(10)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileXIndexFromSrcCoord(11)); - - EXPECT_EQ(0, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(0)); - EXPECT_EQ(0, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(1)); - EXPECT_EQ(1, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(2)); - EXPECT_EQ(2, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(3)); - EXPECT_EQ(3, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(4)); - EXPECT_EQ(4, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(5)); - EXPECT_EQ(5, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(6)); - EXPECT_EQ(6, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(7)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(8)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(9)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(10)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileXIndexFromSrcCoord(11)); -} -TEST(TilingDataTest, tileYIndexFromSrcCoord) -{ - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(0)); - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(1)); - EXPECT_EQ(0, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(2)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(3)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(4)); - EXPECT_EQ(1, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(5)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(6)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(7)); - EXPECT_EQ(2, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(8)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(9)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(10)); - EXPECT_EQ(3, TilingData(3, 10, 10, false).tileYIndexFromSrcCoord(11)); - - EXPECT_EQ(0, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(0)); - EXPECT_EQ(0, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(1)); - EXPECT_EQ(1, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(2)); - EXPECT_EQ(2, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(3)); - EXPECT_EQ(3, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(4)); - EXPECT_EQ(4, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(5)); - EXPECT_EQ(5, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(6)); - EXPECT_EQ(6, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(7)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(8)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(9)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(10)); - EXPECT_EQ(7, TilingData(3, 10, 10, true).tileYIndexFromSrcCoord(11)); -} - -TEST(TilingDataTest, tileSizeX) -{ - EXPECT_EQ(5, TilingData(5, 5, 5, false).tileSizeX(0)); - EXPECT_EQ(5, TilingData(5, 5, 5, true).tileSizeX(0)); - - EXPECT_EQ(5, TilingData(5, 6, 6, false).tileSizeX(0)); - EXPECT_EQ(1, TilingData(5, 6, 6, false).tileSizeX(1)); - EXPECT_EQ(4, TilingData(5, 6, 6, true).tileSizeX(0)); - EXPECT_EQ(2, TilingData(5, 6, 6, true).tileSizeX(1)); - - EXPECT_EQ(5, TilingData(5, 8, 8, false).tileSizeX(0)); - EXPECT_EQ(3, TilingData(5, 8, 8, false).tileSizeX(1)); - EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeX(0)); - EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeX(1)); - - EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeX(0)); - EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeX(1)); - EXPECT_EQ(4, TilingData(5, 10, 10, true).tileSizeX(0)); - EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeX(1)); - EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeX(2)); - - EXPECT_EQ(4, TilingData(5, 11, 11, true).tileSizeX(2)); - EXPECT_EQ(3, TilingData(5, 12, 12, true).tileSizeX(2)); -} -TEST(TilingDataTest, tileSizeY) -{ - EXPECT_EQ(5, TilingData(5, 5, 5, false).tileSizeY(0)); - EXPECT_EQ(5, TilingData(5, 5, 5, true).tileSizeY(0)); - - EXPECT_EQ(5, TilingData(5, 6, 6, false).tileSizeY(0)); - EXPECT_EQ(1, TilingData(5, 6, 6, false).tileSizeY(1)); - EXPECT_EQ(4, TilingData(5, 6, 6, true).tileSizeY(0)); - EXPECT_EQ(2, TilingData(5, 6, 6, true).tileSizeY(1)); - - EXPECT_EQ(5, TilingData(5, 8, 8, false).tileSizeY(0)); - EXPECT_EQ(3, TilingData(5, 8, 8, false).tileSizeY(1)); - EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeY(0)); - EXPECT_EQ(4, TilingData(5, 8, 8, true).tileSizeY(1)); - - EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeY(0)); - EXPECT_EQ(5, TilingData(5, 10, 10, false).tileSizeY(1)); - EXPECT_EQ(4, TilingData(5, 10, 10, true).tileSizeY(0)); - EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeY(1)); - EXPECT_EQ(3, TilingData(5, 10, 10, true).tileSizeY(2)); - - EXPECT_EQ(4, TilingData(5, 11, 11, true).tileSizeY(2)); - EXPECT_EQ(3, TilingData(5, 12, 12, true).tileSizeY(2)); -} - -TEST(TilingDataTest, tileSizeX_and_tilePositionX) -{ - // Single tile cases: - EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionX(0)); - EXPECT_EQ(1, TilingData(3, 1, 100, false).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 1, 100, false).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 3, 1, false).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 3, 1, false).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 3, 100, false).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 3, 100, false).tilePositionX(0)); - EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionX(0)); - EXPECT_EQ(1, TilingData(3, 1, 100, true).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 1, 100, true).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 3, 1, true).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 3, 1, true).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 3, 100, true).tileSizeX(0)); - EXPECT_EQ(0, TilingData(3, 3, 100, true).tilePositionX(0)); - - // Multiple tiles: - // no border - // positions 0, 3 - EXPECT_EQ(2, TilingData(3, 6, 1, false).numTiles()); - EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(0)); - EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(1)); - EXPECT_EQ(0, TilingData(3, 6, 1, false).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 6, 1, false).tilePositionX(1)); - EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(0)); - EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(1)); - EXPECT_EQ(0, TilingData(3, 6, 100, false).tilePositionX(0)); - EXPECT_EQ(3, TilingData(3, 6, 100, false).tilePositionX(1)); - - // Multiple tiles: - // with border - // positions 0, 2, 3, 4 - EXPECT_EQ(4, TilingData(3, 6, 1, true).numTiles()); - EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(0)); - EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(1)); - EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(2)); - EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(3)); - EXPECT_EQ(0, TilingData(3, 6, 1, true).tilePositionX(0)); - EXPECT_EQ(2, TilingData(3, 6, 1, true).tilePositionX(1)); - EXPECT_EQ(3, TilingData(3, 6, 1, true).tilePositionX(2)); - EXPECT_EQ(4, TilingData(3, 6, 1, true).tilePositionX(3)); - EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(0)); - EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(1)); - EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(2)); - EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(3)); - EXPECT_EQ(0, TilingData(3, 6, 100, true).tilePositionX(0)); - EXPECT_EQ(2, TilingData(3, 6, 100, true).tilePositionX(1)); - EXPECT_EQ(3, TilingData(3, 6, 100, true).tilePositionX(2)); - EXPECT_EQ(4, TilingData(3, 6, 100, true).tilePositionX(3)); -} - -TEST(TilingDataTest, tileSizeY_and_tilePositionY) -{ - // Single tile cases: - EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionY(0)); - EXPECT_EQ(1, TilingData(3, 100, 1, false).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 100, 1, false).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 1, 3, false).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 1, 3, false).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 100, 3, false).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 100, 3, false).tilePositionY(0)); - EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionY(0)); - EXPECT_EQ(1, TilingData(3, 100, 1, true).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 100, 1, true).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 1, 3, true).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 1, 3, true).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 100, 3, true).tileSizeY(0)); - EXPECT_EQ(0, TilingData(3, 100, 3, true).tilePositionY(0)); - - // Multiple tiles: - // no border - // positions 0, 3 - EXPECT_EQ(2, TilingData(3, 1, 6, false).numTiles()); - EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(0)); - EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(1)); - EXPECT_EQ(0, TilingData(3, 1, 6, false).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 1, 6, false).tilePositionY(1)); - EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(0)); - EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(1)); - EXPECT_EQ(0, TilingData(3, 100, 6, false).tilePositionY(0)); - EXPECT_EQ(3, TilingData(3, 100, 6, false).tilePositionY(1)); - - // Multiple tiles: - // with border - // positions 0, 2, 3, 4 - EXPECT_EQ(4, TilingData(3, 1, 6, true).numTiles()); - EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(0)); - EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(1)); - EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(2)); - EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(3)); - EXPECT_EQ(0, TilingData(3, 1, 6, true).tilePositionY(0)); - EXPECT_EQ(2, TilingData(3, 1, 6, true).tilePositionY(1)); - EXPECT_EQ(3, TilingData(3, 1, 6, true).tilePositionY(2)); - EXPECT_EQ(4, TilingData(3, 1, 6, true).tilePositionY(3)); - EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(0)); - EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(1)); - EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(2)); - EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(3)); - EXPECT_EQ(0, TilingData(3, 100, 6, true).tilePositionY(0)); - EXPECT_EQ(2, TilingData(3, 100, 6, true).tilePositionY(1)); - EXPECT_EQ(3, TilingData(3, 100, 6, true).tilePositionY(2)); - EXPECT_EQ(4, TilingData(3, 100, 6, true).tilePositionY(3)); -} - -} // namespace diff --git a/WebKit/chromium/tests/TransparencyWinTest.cpp b/WebKit/chromium/tests/TransparencyWinTest.cpp deleted file mode 100644 index ed7f12f..0000000 --- a/WebKit/chromium/tests/TransparencyWinTest.cpp +++ /dev/null @@ -1,693 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "TransparencyWin.h" - -#include "AffineTransform.h" -#include "ImageBuffer.h" - -#include <gtest/gtest.h> -#include <windows.h> - -namespace WebCore { - -static FloatRect RECTToFloatRect(const RECT* rect) -{ - return FloatRect(static_cast<float>(rect->left), - static_cast<float>(rect->top), - static_cast<float>(rect->right - rect->left), - static_cast<float>(rect->bottom - rect->top)); -} - -static void drawNativeRect(GraphicsContext* context, - int x, int y, int w, int h) -{ - skia::PlatformCanvas* canvas = context->platformContext()->canvas(); - HDC dc = canvas->beginPlatformPaint(); - - RECT innerRc; - innerRc.left = x; - innerRc.top = y; - innerRc.right = x + w; - innerRc.bottom = y + h; - FillRect(dc, &innerRc, - reinterpret_cast<HBRUSH>(GetStockObject(BLACK_BRUSH))); - - canvas->endPlatformPaint(); -} - -static Color getPixelAt(GraphicsContext* context, int x, int y) -{ - const SkBitmap& bitmap = context->platformContext()->canvas()-> - getTopPlatformDevice().accessBitmap(false); - return Color(*reinterpret_cast<const RGBA32*>(bitmap.getAddr32(x, y))); -} - -// Resets the top layer's alpha channel to 0 for each pixel. This simulates -// Windows messing it up. -static void clearTopLayerAlphaChannel(GraphicsContext* context) -{ - SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> - canvas()->getTopPlatformDevice().accessBitmap(false)); - for (int y = 0; y < bitmap.height(); y++) { - uint32_t* row = bitmap.getAddr32(0, y); - for (int x = 0; x < bitmap.width(); x++) - row[x] &= 0x00FFFFFF; - } -} - -// Clears the alpha channel on the specified pixel. -static void clearTopLayerAlphaPixel(GraphicsContext* context, int x, int y) -{ - SkBitmap& bitmap = const_cast<SkBitmap&>(context->platformContext()-> - canvas()->getTopPlatformDevice().accessBitmap(false)); - *bitmap.getAddr32(x, y) &= 0x00FFFFFF; -} - -static std::ostream& operator<<(std::ostream& out, const Color& c) -{ - std::ios_base::fmtflags oldFlags = out.flags(std::ios_base::hex | - std::ios_base::showbase); - out << c.rgb(); - out.flags(oldFlags); - return out; -} - -TEST(TransparencyWin, NoLayer) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(17, 16), ColorSpaceDeviceRGB)); - - // KeepTransform - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::NoLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 12)); - - EXPECT_TRUE(src->context() == helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect()); - } - - // Untransform is not allowed for NoLayer. - - // ScaleTransform - src->context()->save(); - src->context()->scale(FloatSize(2.0, 0.5)); - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::NoLayer, - TransparencyWin::ScaleTransform, - IntRect(2, 2, 6, 6)); - helper.composite(); - - // The coordinate system should be based in the upper left of our box. - // It should be post-transformed. - EXPECT_TRUE(src->context() == helper.context()); - EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize); - EXPECT_TRUE(IntRect(4, 1, 12, 3) == helper.drawRect()); - } - src->context()->restore(); -} - -TEST(TransparencyWin, WhiteLayer) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // KeepTransform - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::WhiteLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 12)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect()); - } - - // Untransform - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::WhiteLayer, - TransparencyWin::Untransform, - IntRect(1, 1, 14, 12)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect()); - } - - // ScaleTransform - src->context()->save(); - src->context()->scale(FloatSize(2.0, 0.5)); - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::WhiteLayer, - TransparencyWin::ScaleTransform, - IntRect(2, 2, 6, 6)); - helper.composite(); - - // The coordinate system should be based in the upper left of our box. - // It should be post-transformed. - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize); - EXPECT_TRUE(IntRect(0, 0, 12, 3) == helper.drawRect()); - } - src->context()->restore(); -} - -TEST(TransparencyWin, TextComposite) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // KeepTransform is the only valid transform mode for TextComposite. - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::TextComposite, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 12)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect()); - } -} - -TEST(TransparencyWin, OpaqueCompositeLayer) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // KeepTransform - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 12)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect()); - } - - // KeepTransform with scroll applied. - src->context()->save(); - src->context()->translate(0, -1); - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 14)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 14) == helper.m_layerSize); - EXPECT_TRUE(IntRect(1, 1, 14, 14) == helper.drawRect()); - } - src->context()->restore(); - - // Untransform - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::Untransform, - IntRect(1, 1, 14, 12)); - helper.composite(); - - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); - EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect()); - } - - // ScaleTransform - src->context()->save(); - src->context()->scale(FloatSize(2.0, 0.5)); - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::ScaleTransform, - IntRect(2, 2, 6, 6)); - helper.composite(); - - // The coordinate system should be based in the upper left of our box. - // It should be post-transformed. - EXPECT_TRUE(src->context() != helper.context()); - EXPECT_TRUE(IntSize(12, 3) == helper.m_layerSize); - EXPECT_TRUE(IntRect(0, 0, 12, 3) == helper.drawRect()); - } - src->context()->restore(); -} - -TEST(TransparencyWin, WhiteLayerPixelTest) -{ - // Make a total transparent buffer, and draw the white layer inset by 1 px. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::WhiteLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 14)); - - // Coordinates should be in the original space, not the layer. - drawNativeRect(helper.context(), 3, 3, 1, 1); - clearTopLayerAlphaChannel(helper.context()); - helper.composite(); - } - - // The final image should be transparent around the edges for 1 px, white - // in the middle, with (3,3) (what we drew above) being opaque black. - EXPECT_EQ(Color(Color::transparent), getPixelAt(src->context(), 0, 0)); - EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 2, 2)); - EXPECT_EQ(Color(Color::black), getPixelAt(src->context(), 3, 3)); - EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 4, 4)); -} - -TEST(TransparencyWin, OpaqueCompositeLayerPixel) -{ - Color red(0xFFFF0000), darkRed(0xFFBF0000); - Color green(0xFF00FF00); - - // Make a red bottom layer, followed by a half green next layer @ 50%. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, red, ColorSpaceDeviceRGB); - src->context()->beginTransparencyLayer(0.5); - FloatRect rightHalf(8, 0, 8, 16); - src->context()->fillRect(rightHalf, green, ColorSpaceDeviceRGB); - - // Make a transparency layer inset by one pixel, and fill it inset by - // another pixel with 50% black. - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::KeepTransform, - IntRect(1, 1, 14, 14)); - - FloatRect inner(2, 2, 12, 12); - helper.context()->fillRect(inner, Color(0x7f000000), ColorSpaceDeviceRGB); - // These coordinates are relative to the layer, whish is inset by 1x1 - // pixels from the top left. So we're actually clearing (2, 2) and - // (13,13), which are the extreme corners of the black area (and which - // we check below). - clearTopLayerAlphaPixel(helper.context(), 1, 1); - clearTopLayerAlphaPixel(helper.context(), 12, 12); - helper.composite(); - } - - // Finish the compositing. - src->context()->endTransparencyLayer(); - - // Check that we got the right values, it should be like the rectangle was - // drawn with half opacity even though the alpha channel got messed up. - EXPECT_EQ(red, getPixelAt(src->context(), 0, 0)); - EXPECT_EQ(red, getPixelAt(src->context(), 1, 1)); - EXPECT_EQ(darkRed, getPixelAt(src->context(), 2, 2)); - - // The dark result is: - // (black @ 50% atop green) @ 50% atop red = 0xFF804000 - // which is 0xFFA02000 (Skia computes 0xFFA11F00 due to rounding). - Color darkGreenRed(0xFF803f00); - EXPECT_EQ(darkGreenRed, getPixelAt(src->context(), 13, 13)); - - // 50% green on top of red = FF808000 (rounded to what Skia will produce). - Color greenRed(0xFF807F00); - EXPECT_EQ(greenRed, getPixelAt(src->context(), 14, 14)); - EXPECT_EQ(greenRed, getPixelAt(src->context(), 15, 15)); -} - -// Tests that translations are properly handled when using KeepTransform. -TEST(TransparencyWin, TranslateOpaqueCompositeLayer) -{ - // Fill with white. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - Color white(0xFFFFFFFF); - FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, white, ColorSpaceDeviceRGB); - - // Scroll down by 8 (coordinate system goes up). - src->context()->save(); - src->context()->translate(0, -8); - - Color red(0xFFFF0000); - Color green(0xFF00FF00); - { - // Make the transparency layer after translation will be @ (0, -8) with - // size 16x16. - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::KeepTransform, - IntRect(0, 0, 16, 16)); - - // Draw a red pixel at (15, 15). This should be the at (15, 7) after - // the transform. - FloatRect bottomRight(15, 15, 1, 1); - helper.context()->fillRect(bottomRight, green, ColorSpaceDeviceRGB); - helper.composite(); - } - - src->context()->restore(); - - // Check the pixel we wrote. - EXPECT_EQ(green, getPixelAt(src->context(), 15, 7)); -} - -// Same as OpaqueCompositeLayer, but the canvas has a rotation applied. This -// tests that the propert transform is applied to the copied layer. -TEST(TransparencyWin, RotateOpaqueCompositeLayer) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // The background is white. - Color white(0xFFFFFFFF); - FloatRect fullRect(0, 0, 16, 16); - src->context()->fillRect(fullRect, white, ColorSpaceDeviceRGB); - - // Rotate the image by 90 degrees. This matrix is the same as - // cw90.rotate(90); but avoids rounding errors. Rounding errors can cause - // Skia to think that !rectStaysRect() and it will fall through to path - // drawing mode, which in turn gives us antialiasing. We want no - // antialiasing or other rounding problems since we're testing exact pixel - // values. - src->context()->save(); - AffineTransform cw90(0, 1, -1, 0, 0, 0); - src->context()->concatCTM(cw90); - - // Make a transparency layer consisting of a horizontal line of 50% black. - // Since the rotation is applied, this will actually be a vertical line - // down the middle of the image. - src->context()->beginTransparencyLayer(0.5); - FloatRect blackRect(0, -9, 16, 2); - Color black(0xFF000000); - src->context()->fillRect(blackRect, black, ColorSpaceDeviceRGB); - - // Now draw 50% red square. - { - // Create a transparency helper inset one pixel in the buffer. The - // coordinates are before transforming into this space, and maps to - // IntRect(1, 1, 14, 14). - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::Untransform, - IntRect(1, -15, 14, 14)); - - // Fill with red. - helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), ColorSpaceDeviceRGB); - clearTopLayerAlphaChannel(helper.context()); - helper.composite(); - } - - // Finish the compositing. - src->context()->endTransparencyLayer(); - - // Top corner should be the original background. - EXPECT_EQ(white, getPixelAt(src->context(), 0, 0)); - - // Check the stripe down the middle, first at the top... - Color gray(0xFF808080); - EXPECT_EQ(white, getPixelAt(src->context(), 6, 0)); - EXPECT_EQ(gray, getPixelAt(src->context(), 7, 0)); - EXPECT_EQ(gray, getPixelAt(src->context(), 8, 0)); - EXPECT_EQ(white, getPixelAt(src->context(), 9, 0)); - - // ...now at the bottom. - EXPECT_EQ(white, getPixelAt(src->context(), 6, 15)); - EXPECT_EQ(gray, getPixelAt(src->context(), 7, 15)); - EXPECT_EQ(gray, getPixelAt(src->context(), 8, 15)); - EXPECT_EQ(white, getPixelAt(src->context(), 9, 15)); - - // Our red square should be 25% red over the top of those two. - Color redwhite(0xFFdfbfbf); - Color redgray(0xFF9f8080); - EXPECT_EQ(white, getPixelAt(src->context(), 0, 1)); - EXPECT_EQ(redwhite, getPixelAt(src->context(), 1, 1)); - EXPECT_EQ(redwhite, getPixelAt(src->context(), 6, 1)); - EXPECT_EQ(redgray, getPixelAt(src->context(), 7, 1)); - EXPECT_EQ(redgray, getPixelAt(src->context(), 8, 1)); - EXPECT_EQ(redwhite, getPixelAt(src->context(), 9, 1)); - EXPECT_EQ(redwhite, getPixelAt(src->context(), 14, 1)); - EXPECT_EQ(white, getPixelAt(src->context(), 15, 1)); - - // Complete the 50% transparent layer. - src->context()->restore(); -} - -TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // The background is white on top with red on bottom. - Color white(0xFFFFFFFF); - FloatRect topRect(0, 0, 16, 8); - src->context()->fillRect(topRect, white, ColorSpaceDeviceRGB); - Color red(0xFFFF0000); - FloatRect bottomRect(0, 8, 16, 8); - src->context()->fillRect(bottomRect, red, ColorSpaceDeviceRGB); - - src->context()->save(); - - // Translate left by one pixel. - AffineTransform left; - left.translate(-1, 0); - - // Scale by 2x. - AffineTransform scale; - scale.scale(2.0); - src->context()->concatCTM(scale); - - // Then translate up by one pixel (which will actually be 2 due to scaling). - AffineTransform up; - up.translate(0, -1); - src->context()->concatCTM(up); - - // Now draw 50% red square. - { - // Create a transparency helper inset one pixel in the buffer. The - // coordinates are before transforming into this space, and maps to - // IntRect(1, 1, 14, 14). - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::KeepTransform, - IntRect(1, -15, 14, 14)); - - // Fill with red. - helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), ColorSpaceDeviceRGB); - clearTopLayerAlphaChannel(helper.context()); - helper.composite(); - } -} - -// Tests scale mode with no additional copy. -TEST(TransparencyWin, Scale) -{ - // Create an opaque white buffer. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - FloatRect fullBuffer(0, 0, 16, 16); - src->context()->fillRect(fullBuffer, Color::white, ColorSpaceDeviceRGB); - - // Scale by 2x. - src->context()->save(); - AffineTransform scale; - scale.scale(2.0); - src->context()->concatCTM(scale); - - // Start drawing a rectangle from 1->4. This should get scaled to 2->8. - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::NoLayer, - TransparencyWin::ScaleTransform, - IntRect(1, 1, 3, 3)); - - // The context should now have the identity transform and the returned - // rect should be scaled. - EXPECT_TRUE(helper.context()->getCTM().isIdentity()); - EXPECT_EQ(2, helper.drawRect().x()); - EXPECT_EQ(2, helper.drawRect().y()); - EXPECT_EQ(8, helper.drawRect().right()); - EXPECT_EQ(8, helper.drawRect().bottom()); - - // Set the pixel at (2, 2) to be transparent. This should be fixed when - // the helper goes out of scope. We don't want to call - // clearTopLayerAlphaChannel because that will actually clear the whole - // canvas (since we have no extra layer!). - SkBitmap& bitmap = const_cast<SkBitmap&>(helper.context()-> - platformContext()->canvas()->getTopPlatformDevice(). - accessBitmap(false)); - *bitmap.getAddr32(2, 2) &= 0x00FFFFFF; - helper.composite(); - } - - src->context()->restore(); - - // Check the pixel we previously made transparent, it should have gotten - // fixed back up to white. - - // The current version doesn't fixup transparency when there is no layer. - // This seems not to be necessary, so we don't bother, but if it becomes - // necessary, this line should be uncommented. - // EXPECT_EQ(Color(Color::white), getPixelAt(src->context(), 2, 2)); -} - -// Tests scale mode with an additional copy for transparency. This will happen -// if we have a scaled textbox, for example. WebKit will create a new -// transparency layer, draw the text field, then draw the text into it, then -// composite this down with an opacity. -TEST(TransparencyWin, ScaleTransparency) -{ - // Create an opaque white buffer. - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - FloatRect fullBuffer(0, 0, 16, 16); - src->context()->fillRect(fullBuffer, Color::white, ColorSpaceDeviceRGB); - - // Make another layer (which duplicates how WebKit will make this). We fill - // the top half with red, and have the layer be 50% opaque. - src->context()->beginTransparencyLayer(0.5); - FloatRect topHalf(0, 0, 16, 8); - src->context()->fillRect(topHalf, Color(0xFFFF0000), ColorSpaceDeviceRGB); - - // Scale by 2x. - src->context()->save(); - AffineTransform scale; - scale.scale(2.0); - src->context()->concatCTM(scale); - - // Make a layer inset two pixels (because of scaling, this is 2->14). And - // will it with 50% black. - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::OpaqueCompositeLayer, - TransparencyWin::ScaleTransform, - IntRect(1, 1, 6, 6)); - - helper.context()->fillRect(helper.drawRect(), Color(0x7f000000), ColorSpaceDeviceRGB); - clearTopLayerAlphaChannel(helper.context()); - helper.composite(); - } - - // Finish the layer. - src->context()->restore(); - src->context()->endTransparencyLayer(); - - Color redBackground(0xFFFF8080); // 50% red composited on white. - EXPECT_EQ(redBackground, getPixelAt(src->context(), 0, 0)); - EXPECT_EQ(redBackground, getPixelAt(src->context(), 1, 1)); - - // Top half (minus two pixel border) should be 50% gray atop opaque - // red = 0xFF804141. Then that's composited with 50% transparency on solid - // white = 0xFFC0A1A1. - Color darkRed(0xFFBF8080); - EXPECT_EQ(darkRed, getPixelAt(src->context(), 2, 2)); - EXPECT_EQ(darkRed, getPixelAt(src->context(), 7, 7)); - - // Bottom half (minus a two pixel border) should be a layer with 5% gray - // with another 50% opacity composited atop white. - Color darkWhite(0xFFBFBFBF); - EXPECT_EQ(darkWhite, getPixelAt(src->context(), 8, 8)); - EXPECT_EQ(darkWhite, getPixelAt(src->context(), 13, 13)); - - Color white(0xFFFFFFFF); // Background in the lower-right. - EXPECT_EQ(white, getPixelAt(src->context(), 14, 14)); - EXPECT_EQ(white, getPixelAt(src->context(), 15, 15)); -} - -TEST(TransparencyWin, Text) -{ - OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB)); - - // Our text should end up 50% transparent blue-green. - Color fullResult(0x80008080); - - { - TransparencyWin helper; - helper.init(src->context(), - TransparencyWin::TextComposite, - TransparencyWin::KeepTransform, - IntRect(0, 0, 16, 16)); - helper.setTextCompositeColor(fullResult); - - // Write several different squares to simulate ClearType. These should - // all reduce to 2/3 coverage. - FloatRect pixel(0, 0, 1, 1); - helper.context()->fillRect(pixel, 0xFFFF0000, ColorSpaceDeviceRGB); - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF00FF00, ColorSpaceDeviceRGB); - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF0000FF, ColorSpaceDeviceRGB); - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF008080, ColorSpaceDeviceRGB); - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF800080, ColorSpaceDeviceRGB); - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF808000, ColorSpaceDeviceRGB); - - // Try one with 100% coverage (opaque black). - pixel.move(1.0f, 0.0f); - helper.context()->fillRect(pixel, 0xFF000000, ColorSpaceDeviceRGB); - - // Now mess with the alpha channel. - clearTopLayerAlphaChannel(helper.context()); - helper.composite(); - } - - Color oneThirdResult(0x55005555); // = fullResult * 2 / 3 - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 0, 0)); - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 1, 0)); - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 2, 0)); - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 3, 0)); - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 4, 0)); - EXPECT_EQ(oneThirdResult, getPixelAt(src->context(), 5, 0)); - EXPECT_EQ(fullResult, getPixelAt(src->context(), 6, 0)); - EXPECT_EQ(Color::transparent, getPixelAt(src->context(), 7, 0)); -} - -} // namespace WebCore diff --git a/WebKit/chromium/tests/TreeTestHelpers.cpp b/WebKit/chromium/tests/TreeTestHelpers.cpp deleted file mode 100644 index 103b871..0000000 --- a/WebKit/chromium/tests/TreeTestHelpers.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "TreeTestHelpers.h" - -#include <cstdlib> -#include <wtf/CurrentTime.h> - -namespace WebCore { -namespace TreeTestHelpers { - -int32_t generateSeed() -{ - // A seed of 1 has the special behavior of resetting the random - // number generator. Assume that if we call this routine that we - // don't want this behavior. - int32_t seed; - do { - seed = static_cast<int32_t>(currentTime()); - } while (seed <= 1); - return seed; -} - -void initRandom(const int32_t seed) -{ - srand(seed); -} - -int32_t nextRandom(const int32_t maximumValue) -{ - // rand_r is not available on Windows - return rand() % maximumValue; -} - -} // namespace TreeTestHelpers -} // namespace WebCore diff --git a/WebKit/chromium/tests/TreeTestHelpers.h b/WebKit/chromium/tests/TreeTestHelpers.h deleted file mode 100644 index af07b2a..0000000 --- a/WebKit/chromium/tests/TreeTestHelpers.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Simple pseudorandom number generator helper functions, used by the -// red-black and interval tree tests. -// -// These are **not** thread safe! - -#ifndef TreeTestHelpers_h -#define TreeTestHelpers_h - -#include <stdint.h> - -namespace WebCore { -namespace TreeTestHelpers { - -// Generates a seed value to be passed to initRandom(). -int32_t generateSeed(); - -// Initializes the pseudo-random number generator with a specific seed. -void initRandom(const int32_t seed); - -// Produces the next pseudo-random number in the sequence, in the -// range from [0..maximumValue). Negative numbers are not allowed and will -// produce undefined results. -int32_t nextRandom(const int32_t maximumValue); - -} // namespace TreeTestHelpers -} // namespace WebCore - -#endif // TreeTestHelpers_h diff --git a/WebKit/chromium/tests/UniscribeHelperTest.cpp b/WebKit/chromium/tests/UniscribeHelperTest.cpp deleted file mode 100644 index 8aaed11..0000000 --- a/WebKit/chromium/tests/UniscribeHelperTest.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include <gtest/gtest.h> - -#include "PlatformString.h" -#include "UniscribeHelper.h" - -using namespace WebCore; - -namespace { - -class UniscribeTest : public testing::Test { -public: - UniscribeTest() - { - } - - // Returns an HFONT with the given name. The caller does not have to free - // this, it will be automatically freed at the end of the test. Returns 0 - // on failure. On success, the - HFONT MakeFont(const wchar_t* fontName, SCRIPT_CACHE** cache) - { - LOGFONT lf; - memset(&lf, 0, sizeof(LOGFONT)); - lf.lfHeight = 20; - wcscpy_s(lf.lfFaceName, fontName); - - HFONT hfont = CreateFontIndirect(&lf); - if (!hfont) - return 0; - - *cache = new SCRIPT_CACHE; - **cache = 0; - createdFonts.append(std::make_pair(hfont, *cache)); - return hfont; - } - -protected: - // Default font properties structure for tests to use. - SCRIPT_FONTPROPERTIES properties; - -private: - virtual void SetUp() - { - memset(&properties, 0, sizeof(SCRIPT_FONTPROPERTIES)); - properties.cBytes = sizeof(SCRIPT_FONTPROPERTIES); - properties.wgBlank = ' '; - properties.wgDefault = '?'; // Used when the char is not in the font. - properties.wgInvalid = '#'; // Used for invalid characters. - } - - virtual void TearDown() - { - // Free any allocated fonts. - for (size_t i = 0; i < createdFonts.size(); i++) { - DeleteObject(createdFonts[i].first); - ScriptFreeCache(createdFonts[i].second); - delete createdFonts[i].second; - } - createdFonts.clear(); - } - - // Tracks allocated fonts so we can delete them at the end of the test. - // The script cache pointer is heap allocated and must be freed. - Vector< std::pair<HFONT, SCRIPT_CACHE*> > createdFonts; -}; - -} // namespace - -// This test tests giving Uniscribe a very large buffer, which will cause a -// failure. -TEST_F(UniscribeTest, TooBig) -{ - // Make a large string with an e with a zillion combining accents. - String input(L"e"); - for (int i = 0; i < 100000; i++) - input.append(static_cast<UChar>(0x301)); // Combining acute accent. - - SCRIPT_CACHE* scriptCache; - HFONT hfont = MakeFont(L"Times New Roman", &scriptCache); - ASSERT_TRUE(hfont); - - // Test a long string without the normal length protection we have. This - // will cause shaping to fail. - { - UniscribeHelper uniscribe( - input.characters(), static_cast<int>(input.length()), - false, hfont, scriptCache, &properties); - uniscribe.initWithOptionalLengthProtection(false); - - // There should be one shaping entry, with nothing in it. - ASSERT_EQ(1, uniscribe.m_shapes.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_glyphs.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_logs.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_visualAttributes.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_advance.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_offsets.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_justify.size()); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_abc.abcA); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_abc.abcB); - EXPECT_EQ(0, uniscribe.m_shapes[0].m_abc.abcC); - - // The sizes of the other stuff should match the shaping entry. - EXPECT_EQ(1, uniscribe.m_runs.size()); - EXPECT_EQ(1, uniscribe.m_screenOrder.size()); - - // Check that the various querying functions handle the empty case - // properly. - EXPECT_EQ(0, uniscribe.width()); - EXPECT_EQ(0, uniscribe.firstGlyphForCharacter(0)); - EXPECT_EQ(0, uniscribe.firstGlyphForCharacter(1000)); - EXPECT_EQ(0, uniscribe.xToCharacter(0)); - EXPECT_EQ(0, uniscribe.xToCharacter(1000)); - } - - // Now test the very large string and make sure it is handled properly by - // the length protection. - { - UniscribeHelper uniscribe( - input.characters(), static_cast<int>(input.length()), - false, hfont, scriptCache, &properties); - uniscribe.initWithOptionalLengthProtection(true); - - // There should be 0 runs and shapes. - EXPECT_EQ(0, uniscribe.m_runs.size()); - EXPECT_EQ(0, uniscribe.m_shapes.size()); - EXPECT_EQ(0, uniscribe.m_screenOrder.size()); - - EXPECT_EQ(0, uniscribe.width()); - EXPECT_EQ(0, uniscribe.firstGlyphForCharacter(0)); - EXPECT_EQ(0, uniscribe.firstGlyphForCharacter(1000)); - EXPECT_EQ(0, uniscribe.xToCharacter(0)); - EXPECT_EQ(0, uniscribe.xToCharacter(1000)); - } -} diff --git a/WebKit/chromium/tests/WebFrameTest.cpp b/WebKit/chromium/tests/WebFrameTest.cpp deleted file mode 100644 index cf91cb4..0000000 --- a/WebKit/chromium/tests/WebFrameTest.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include <googleurl/src/gurl.h> -#include <gtest/gtest.h> -#include <webkit/support/webkit_support.h> -#include "WebFrame.h" -#include "WebFrameClient.h" -#include "WebString.h" -#include "WebURL.h" -#include "WebURLRequest.h" -#include "WebURLResponse.h" -#include "WebView.h" - -using namespace WebKit; - -namespace { - -class WebFrameTest : public testing::Test { -public: - WebFrameTest() {} - - virtual void TearDown() - { - webkit_support::UnregisterAllMockedURLs(); - } - - void registerMockedURLLoad(const WebURL& url, const WebURLResponse& response, const WebString& fileName) - { - std::string filePath = webkit_support::GetWebKitRootDir().utf8(); - filePath.append("/WebKit/chromium/tests/data/"); - filePath.append(fileName.utf8()); - webkit_support::RegisterMockedURL(url, response, WebString::fromUTF8(filePath)); - } - - void serveRequests() - { - webkit_support::ServeAsynchronousMockedRequests(); - } -}; - -class TestWebFrameClient : public WebFrameClient { -}; - -TEST_F(WebFrameTest, ContentText) -{ - // Register our resources. - WebURLResponse response; - response.initialize(); - response.setMIMEType("text/html"); - std::string rootURL = "http://www.test.com/"; - const char* files[] = { "iframes_test.html", "visible_iframe.html", - "invisible_iframe.html", "zero_sized_iframe.html" }; - for (int i = 0; i < (sizeof(files) / sizeof(char*)); ++i) { - WebURL webURL = GURL(rootURL + files[i]); - registerMockedURLLoad(webURL, response, WebString::fromUTF8(files[i])); - } - - // Create and initialize the WebView. - TestWebFrameClient webFrameClient; - WebView* webView = WebView::create(0, 0); - webView->initializeMainFrame(&webFrameClient); - - // Load the main frame URL. - WebURL testURL(GURL(rootURL + files[0])); - WebURLRequest urlRequest; - urlRequest.initialize(); - urlRequest.setURL(testURL); - webView->mainFrame()->loadRequest(urlRequest); - - // Load all pending asynchronous requests. - serveRequests(); - - // Now retrieve the frames text and test it only includes visible elements. - std::string content = webView->mainFrame()->contentAsText(1024).utf8(); - EXPECT_NE(std::string::npos, content.find(" visible paragraph")); - EXPECT_NE(std::string::npos, content.find(" visible iframe")); - EXPECT_EQ(std::string::npos, content.find(" invisible pararaph")); - EXPECT_EQ(std::string::npos, content.find(" invisible iframe")); - EXPECT_EQ(std::string::npos, content.find("iframe with zero size")); - - webView->close(); -} - -} diff --git a/WebKit/chromium/tests/WebInputEventFactoryTestGtk.cpp b/WebKit/chromium/tests/WebInputEventFactoryTestGtk.cpp deleted file mode 100644 index 7cd4837..0000000 --- a/WebKit/chromium/tests/WebInputEventFactoryTestGtk.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include <gdk/gdk.h> -#include <gtest/gtest.h> - -#include "WebInputEvent.h" -#include "WebInputEventFactory.h" - -using WebKit::WebMouseEvent; -using WebKit::WebInputEventFactory; - -namespace { - -TEST(WebInputEventFactoryTest, DoubleClick) -{ - GdkEventButton firstClick; - firstClick.type = GDK_BUTTON_PRESS; - firstClick.window = static_cast<GdkWindow*>(GINT_TO_POINTER(1)); - firstClick.x = firstClick.y = firstClick.x_root = firstClick.y_root = 100; - firstClick.state = 0; - firstClick.time = 0; - firstClick.button = 1; - - // Single click works. - WebMouseEvent firstClickEvent = WebInputEventFactory::mouseEvent(&firstClick); - EXPECT_EQ(1, firstClickEvent.clickCount); - - // Make sure double click works. - GdkEventButton secondClick = firstClick; - secondClick.time = firstClick.time + 100; - WebMouseEvent secondClickEvent = WebInputEventFactory::mouseEvent(&secondClick); - EXPECT_EQ(2, secondClickEvent.clickCount); - - // Reset the click count. - firstClick.time += 10000; - firstClickEvent = WebInputEventFactory::mouseEvent(&firstClick); - EXPECT_EQ(1, firstClickEvent.clickCount); - - // Two clicks with a long gap in between aren't counted as a double click. - secondClick = firstClick; - secondClick.time = firstClick.time + 1000; - secondClickEvent = WebInputEventFactory::mouseEvent(&secondClick); - EXPECT_EQ(1, secondClickEvent.clickCount); - - // Reset the click count. - firstClick.time += 10000; - firstClickEvent = WebInputEventFactory::mouseEvent(&firstClick); - EXPECT_EQ(1, firstClickEvent.clickCount); - - // Two clicks far apart (horizontally) aren't counted as a double click. - secondClick = firstClick; - secondClick.time = firstClick.time + 1; - secondClick.x = firstClick.x + 100; - secondClickEvent = WebInputEventFactory::mouseEvent(&secondClick); - EXPECT_EQ(1, secondClickEvent.clickCount); - - // Reset the click count. - firstClick.time += 10000; - firstClickEvent = WebInputEventFactory::mouseEvent(&firstClick); - EXPECT_EQ(1, firstClickEvent.clickCount); - - // Two clicks far apart (vertically) aren't counted as a double click. - secondClick = firstClick; - secondClick.time = firstClick.time + 1; - secondClick.x = firstClick.y + 100; - secondClickEvent = WebInputEventFactory::mouseEvent(&secondClick); - EXPECT_EQ(1, secondClickEvent.clickCount); - - // Reset the click count. - firstClick.time += 10000; - firstClickEvent = WebInputEventFactory::mouseEvent(&firstClick); - EXPECT_EQ(1, firstClickEvent.clickCount); - - // Two clicks on different windows aren't a double click. - secondClick = firstClick; - secondClick.time = firstClick.time + 1; - secondClick.window = static_cast<GdkWindow*>(GINT_TO_POINTER(2)); - secondClickEvent = WebInputEventFactory::mouseEvent(&secondClick); - EXPECT_EQ(1, secondClickEvent.clickCount); -} - -} // anonymous namespace diff --git a/WebKit/chromium/tests/WebUnitTests.cpp b/WebKit/chromium/tests/WebUnitTests.cpp deleted file mode 100644 index 5e207f3..0000000 --- a/WebKit/chromium/tests/WebUnitTests.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "WebUnitTests.h" - -#include <base/test/test_suite.h> - -namespace WebKit { - -int RunAllUnitTests(int argc, char** argv) -{ - TestSuite testSuite(argc, argv); - return testSuite.Run(); -} - -} // namespace WebKit diff --git a/WebKit/chromium/tests/WebUnitTests.h b/WebKit/chromium/tests/WebUnitTests.h deleted file mode 100644 index 3add1c2..0000000 --- a/WebKit/chromium/tests/WebUnitTests.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2010 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef WebUnitTests_h -#define WebUnitTests_h - -#include "WebCommon.h" - -namespace WebKit { - -// In chromium multi-dll build, webkit unittest code are compiled in webkit.dll. -// This is the API to run all unittests inside webkit.dll. -WEBKIT_API int RunAllUnitTests(int argc, char** argv); - -} // namespace WebKit - -#endif diff --git a/WebKit/chromium/tests/data/iframes_test.html b/WebKit/chromium/tests/data/iframes_test.html deleted file mode 100644 index 425709b..0000000 --- a/WebKit/chromium/tests/data/iframes_test.html +++ /dev/null @@ -1,9 +0,0 @@ -<html> - <body> - <iframe src="visible_iframe.html"></iframe> - <iframe width=0 height=0 src="zero_sized_iframe.html"></iframe> - <iframe style="visibility:hidden;" src="invisible_iframe.html"></iframe> - <p>This is a visible paragraph.</p> - <p style="visibility:hidden;">This is an invisible paragraph.</p> - </body> -</html> diff --git a/WebKit/chromium/tests/data/invisible_iframe.html b/WebKit/chromium/tests/data/invisible_iframe.html deleted file mode 100644 index e5686c7..0000000 --- a/WebKit/chromium/tests/data/invisible_iframe.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> - <body> - This is an invisible frame. - </body> -</html> diff --git a/WebKit/chromium/tests/data/visible_iframe.html b/WebKit/chromium/tests/data/visible_iframe.html deleted file mode 100644 index 291af3d..0000000 --- a/WebKit/chromium/tests/data/visible_iframe.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> - <body> - This is a visible iframe. - </body> -</html> diff --git a/WebKit/chromium/tests/data/zero_sized_iframe.html b/WebKit/chromium/tests/data/zero_sized_iframe.html deleted file mode 100644 index 6728cab..0000000 --- a/WebKit/chromium/tests/data/zero_sized_iframe.html +++ /dev/null @@ -1,5 +0,0 @@ -<html> - <body> - This is an iframe with zero size. - </body> -</html> |