summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-13 06:44:40 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-13 06:44:40 -0700
commit08014c20784f3db5df3a89b73cce46037b77eb59 (patch)
tree47749210d31e19e6e2f64036fa8fae2ad693476f /WebKit/chromium
parent860220379e56aeb66424861ad602b07ee22b4055 (diff)
parent4c3661f7918f8b3f139f824efb7855bedccb4c94 (diff)
downloadexternal_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.zip
external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.gz
external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.bz2
Merge changes Ide388898,Ic49f367c,I1158a808,Iacb6ca5d,I2100dd3a,I5c1abe54,Ib0ef9902,I31dbc523,I570314b3
* changes: Merge WebKit at r75315: Update WebKit version Merge WebKit at r75315: Add FrameLoaderClient PageCache stubs Merge WebKit at r75315: Stub out AXObjectCache::remove() Merge WebKit at r75315: Fix ImageBuffer Merge WebKit at r75315: Fix PluginData::initPlugins() Merge WebKit at r75315: Fix conflicts Merge WebKit at r75315: Fix Makefiles Merge WebKit at r75315: Move Android-specific WebCore files to Source Merge WebKit at r75315: Initial merge by git.
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog427
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/README16
-rw-r--r--WebKit/chromium/WebKit.grd4
-rw-r--r--WebKit/chromium/WebKit.gyp39
-rw-r--r--WebKit/chromium/public/WebAnimationController.h21
-rw-r--r--WebKit/chromium/public/WebAudioDevice.h55
-rw-r--r--WebKit/chromium/public/WebAutoFillClient.h90
-rw-r--r--WebKit/chromium/public/WebFormElement.h8
-rw-r--r--WebKit/chromium/public/WebIDBDatabaseError.h8
-rw-r--r--WebKit/chromium/public/WebIDBKey.h4
-rw-r--r--WebKit/chromium/public/WebInputElement.h8
-rw-r--r--WebKit/chromium/public/WebKitClient.h5
-rw-r--r--WebKit/chromium/public/WebLabelElement.h8
-rw-r--r--WebKit/chromium/public/WebOptionElement.h8
-rw-r--r--WebKit/chromium/public/WebSelectElement.h12
-rw-r--r--WebKit/chromium/public/WebWidget.h9
-rw-r--r--WebKit/chromium/public/linux/WebThemeEngine.h7
-rw-r--r--WebKit/chromium/public/mac/WebThemeEngine.h78
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp21
-rw-r--r--WebKit/chromium/src/AudioDestinationChromium.cpp125
-rw-r--r--WebKit/chromium/src/AudioDestinationChromium.h67
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp34
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp8
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h2
-rw-r--r--WebKit/chromium/src/GraphicsContext3DChromium.cpp567
-rw-r--r--WebKit/chromium/src/GraphicsContext3DInternal.h311
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp1
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp16
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebPopupMenuImpl.h1
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp5
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp249
-rw-r--r--WebKit/chromium/src/WebViewImpl.h3
-rw-r--r--WebKit/chromium/tests/PopupMenuTest.cpp1
35 files changed, 1531 insertions, 694 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 335732a..54ca8ce 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,430 @@
+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.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 0992f31..7fbcbcd 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '68558'
+ 'chromium_rev': '70840'
}
deps = {
diff --git a/WebKit/chromium/README b/WebKit/chromium/README
index 9173454..ecac503 100644
--- a/WebKit/chromium/README
+++ b/WebKit/chromium/README
@@ -27,6 +27,22 @@ DEFINES
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
diff --git a/WebKit/chromium/WebKit.grd b/WebKit/chromium/WebKit.grd
index 3b7209a..ab89640 100644
--- a/WebKit/chromium/WebKit.grd
+++ b/WebKit/chromium/WebKit.grd
@@ -9,8 +9,8 @@
</outputs>
<release seq="1">
<includes>
- <include name="IDR_DEVTOOLS_DEBUGGER_SCRIPT_JS" file="..\..\WebCore\bindings\v8\DebuggerScript.js" type="BINDATA"/>
- <include name="IDR_DEVTOOLS_INJECT_WEBKIT_JS" file="..\..\WebCore\inspector\front-end\InjectedScript.js" type="BINDATA"/>
+ <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
index 3612a08..9385778 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -30,7 +30,7 @@
{
'includes': [
- '../../WebCore/WebCore.gypi',
+ '../../Source/WebCore/WebCore.gypi',
'../../Tools/DumpRenderTree/DumpRenderTree.gypi',
'WebKit.gypi',
'features.gypi',
@@ -73,7 +73,7 @@
'target_name': 'webkit',
'msvs_guid': '5ECEC9E5-8F23-47B6-93E0-C3B328B3BE65',
'dependencies': [
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '../../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',
@@ -101,6 +101,7 @@
'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',
@@ -110,6 +111,8 @@
'public/WebApplicationCacheHostClient.h',
'public/WebAttribute.h',
'public/WebAudioBus.h',
+ 'public/WebAudioDevice.h',
+ 'public/WebAutoFillClient.h',
'public/WebBindings.h',
'public/WebBlobData.h',
'public/WebBlobRegistry.h',
@@ -303,6 +306,8 @@
'src/AsyncFileSystemChromium.h',
'src/AsyncFileWriterChromium.cpp',
'src/AsyncFileWriterChromium.h',
+ 'src/AudioDestinationChromium.cpp',
+ 'src/AudioDestinationChromium.h',
'src/AutoFillPopupMenuClient.cpp',
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
@@ -586,7 +591,7 @@
'WEBKIT_DLL',
],
'dependencies': [
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '../../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',
@@ -697,7 +702,7 @@
'type': 'none',
'dependencies': [
'devtools_html',
- '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
+ '../../Source/WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources',
],
'conditions': [
['debug_devtools==0', {
@@ -738,7 +743,7 @@
'scripts/generate_devtools_html.py',
# See issue 29695: WebKit.gypi is a source file for devtools.html.
'WebKit.gypi',
- '../../WebCore/inspector/front-end/inspector.html',
+ '../../Source/WebCore/inspector/front-end/inspector.html',
],
'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools.html'],
'action': ['python', '<@(_inputs)', '<@(_outputs)', '<@(debug_devtools)', '<@(devtools_files)'],
@@ -749,13 +754,13 @@
'type': 'none',
'dependencies': [
'devtools_html',
- '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources'
+ '../../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': '../../WebCore/inspector/front-end/inspector.html',
+ 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html',
'inputs': [
'<@(_script_name)',
'<@(_input_page)',
@@ -764,7 +769,7 @@
'<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js'
],
'search_path': [
- '../../WebCore/inspector/front-end',
+ '../../Source/WebCore/inspector/front-end',
'src/js',
'<(SHARED_INTERMEDIATE_DIR)/webcore',
],
@@ -782,7 +787,7 @@
'actions': [{
'action_name': 'concatenate_devtools_css',
'script_name': 'scripts/concatenate_css_files.py',
- 'input_page': '../../WebCore/inspector/front-end/inspector.html',
+ 'input_page': '../../Source/WebCore/inspector/front-end/inspector.html',
'inputs': [
'<@(_script_name)',
'<@(_input_page)',
@@ -790,7 +795,7 @@
'<@(devtools_files)'
],
'search_path': [
- '../../WebCore/inspector/front-end',
+ '../../Source/WebCore/inspector/front-end',
'src/js',
],
'outputs': ['<(PRODUCT_DIR)/resources/inspector/devTools.css'],
@@ -803,7 +808,7 @@
'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
'dependencies': [
'webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '../../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',
@@ -879,11 +884,11 @@
'type': 'executable',
'dependencies': [
'webkit',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
- '../../JavaScriptCore',
+ '../../Source/JavaScriptCore',
'<(DEPTH)',
],
'sources': [
@@ -900,7 +905,7 @@
'TestNetscapePlugIn',
'copy_TestNetscapePlugIn',
'webkit',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf_config',
+ '../../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',
@@ -909,8 +914,8 @@
'include_dirs': [
'<(chromium_src_dir)',
'public',
- '../../JavaScriptCore',
- '../../JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
+ '../../Source/JavaScriptCore',
+ '../../Source/JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
'<(DEPTH)',
],
'defines': [
@@ -942,7 +947,7 @@
'public',
],
'dependencies': [
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
+ '../../Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
],
}],
['inside_chromium_build==1', {
diff --git a/WebKit/chromium/public/WebAnimationController.h b/WebKit/chromium/public/WebAnimationController.h
index 0d3fcf5..c61e531 100644
--- a/WebKit/chromium/public/WebAnimationController.h
+++ b/WebKit/chromium/public/WebAnimationController.h
@@ -43,16 +43,17 @@ class WebURL;
// owned by a WebFrame and its life span is bound to that WebFrame.
class WebAnimationController {
public:
- WEBKIT_API virtual bool pauseAnimationAtTime(WebElement&,
- const WebString& animationName,
- double time) = 0;
- WEBKIT_API virtual bool pauseTransitionAtTime(WebElement&,
- const WebString& propertyName,
- double time) = 0;
-
- WEBKIT_API virtual unsigned numberOfActiveAnimations() const = 0;
- WEBKIT_API virtual void suspendAnimations() const = 0;
- WEBKIT_API virtual void resumeAnimations() const = 0;
+ 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() { }
};
diff --git a/WebKit/chromium/public/WebAudioDevice.h b/WebKit/chromium/public/WebAudioDevice.h
new file mode 100644
index 0000000..a9f5a1c
--- /dev/null
+++ b/WebKit/chromium/public/WebAudioDevice.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Google Inc. 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
new file mode 100644
index 0000000..4e73be0
--- /dev/null
+++ b/WebKit/chromium/public/WebAutoFillClient.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING 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/WebFormElement.h b/WebKit/chromium/public/WebFormElement.h
index 2b4ee53..53554d7 100644
--- a/WebKit/chromium/public/WebFormElement.h
+++ b/WebKit/chromium/public/WebFormElement.h
@@ -50,14 +50,14 @@ namespace WebKit {
~WebFormElement() { reset(); }
WebFormElement() : WebElement() { }
- WebFormElement(const WebFormElement& e) : WebElement(e) { }
+ WebFormElement(const WebFormElement& element) : WebElement(element) { }
- WebFormElement& operator=(const WebFormElement& e)
+ WebFormElement& operator=(const WebFormElement& element)
{
- WebElement::assign(e);
+ WebElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebFormElement& e) { WebElement::assign(e); }
+ void assign(const WebFormElement& element) { WebElement::assign(element); }
WEBKIT_API bool autoComplete() const;
WEBKIT_API WebString action() const;
diff --git a/WebKit/chromium/public/WebIDBDatabaseError.h b/WebKit/chromium/public/WebIDBDatabaseError.h
index c181f78..f247b36 100644
--- a/WebKit/chromium/public/WebIDBDatabaseError.h
+++ b/WebKit/chromium/public/WebIDBDatabaseError.h
@@ -42,11 +42,11 @@ class WebIDBDatabaseError {
public:
~WebIDBDatabaseError() { reset(); }
- WEBKIT_API WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
- WEBKIT_API WebIDBDatabaseError(const WebIDBDatabaseError& e) { assign(e); }
- WEBKIT_API WebIDBDatabaseError& operator=(const WebIDBDatabaseError& e)
+ WebIDBDatabaseError(unsigned short code, const WebString& message) { assign(code, message); }
+ WebIDBDatabaseError(const WebIDBDatabaseError& error) { assign(error); }
+ WebIDBDatabaseError& operator=(const WebIDBDatabaseError& error)
{
- assign(e);
+ assign(error);
return *this;
}
diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h
index 561af2f..376d1c5 100644
--- a/WebKit/chromium/public/WebIDBKey.h
+++ b/WebKit/chromium/public/WebIDBKey.h
@@ -50,10 +50,6 @@ public:
WEBKIT_API static WebIDBKey createInvalid();
WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScriptValue&, const WebIDBKeyPath&);
- // FIXME: Remove these two constructors after Chromium side is done.
- WebIDBKey(const WebString& string) { assignString(string); }
- WebIDBKey(double number) { assignNumber(number); }
-
WebIDBKey(const WebIDBKey& e) { assign(e); }
WebIDBKey& operator=(const WebIDBKey& e)
{
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 3dd7e40..be8623c 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -43,14 +43,14 @@ namespace WebKit {
class WebInputElement : public WebFormControlElement {
public:
WebInputElement() : WebFormControlElement() { }
- WebInputElement(const WebInputElement& e) : WebFormControlElement(e) { }
+ WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
- WebInputElement& operator=(const WebInputElement& e)
+ WebInputElement& operator=(const WebInputElement& element)
{
- WebFormControlElement::assign(e);
+ WebFormControlElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebInputElement& e) { WebFormControlElement::assign(e); }
+ 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.
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index bf9a97b..ae7892d 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -32,6 +32,7 @@
#define WebKitClient_h
#include "WebAudioBus.h"
+#include "WebAudioDevice.h"
#include "WebCommon.h"
#include "WebData.h"
#include "WebLocalizedString.h"
@@ -277,6 +278,10 @@ public:
// 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.
diff --git a/WebKit/chromium/public/WebLabelElement.h b/WebKit/chromium/public/WebLabelElement.h
index 3e97c39..eb9b06d 100644
--- a/WebKit/chromium/public/WebLabelElement.h
+++ b/WebKit/chromium/public/WebLabelElement.h
@@ -44,15 +44,15 @@ namespace WebKit {
class WebLabelElement : public WebElement {
public:
WebLabelElement() : WebElement() { }
- WebLabelElement(const WebLabelElement& e) : WebElement(e) { }
+ WebLabelElement(const WebLabelElement& element) : WebElement(element) { }
- WebLabelElement& operator=(const WebLabelElement& e)
+ WebLabelElement& operator=(const WebLabelElement& element)
{
- WebElement::assign(e);
+ WebElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebLabelElement& e) { WebElement::assign(e); }
+ void assign(const WebLabelElement& element) { WebElement::assign(element); }
WEBKIT_API WebElement correspondingControl();
diff --git a/WebKit/chromium/public/WebOptionElement.h b/WebKit/chromium/public/WebOptionElement.h
index 1689a57..24a6eaa 100644
--- a/WebKit/chromium/public/WebOptionElement.h
+++ b/WebKit/chromium/public/WebOptionElement.h
@@ -44,14 +44,14 @@ namespace WebKit {
class WebOptionElement : public WebFormControlElement {
public:
WebOptionElement() : WebFormControlElement() { }
- WebOptionElement(const WebOptionElement& e) : WebFormControlElement(e) { }
+ WebOptionElement(const WebOptionElement& element) : WebFormControlElement(element) { }
- WebOptionElement& operator=(const WebOptionElement& e)
+ WebOptionElement& operator=(const WebOptionElement& element)
{
- WebFormControlElement::assign(e);
+ WebFormControlElement::assign(element);
return *this;
}
- WEBKIT_API void assign(const WebOptionElement& e) { WebFormControlElement::assign(e); }
+ void assign(const WebOptionElement& element) { WebFormControlElement::assign(element); }
WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value() const;
diff --git a/WebKit/chromium/public/WebSelectElement.h b/WebKit/chromium/public/WebSelectElement.h
index 3e7f5e2..97d3a78 100644
--- a/WebKit/chromium/public/WebSelectElement.h
+++ b/WebKit/chromium/public/WebSelectElement.h
@@ -45,14 +45,14 @@ namespace WebKit {
class WebSelectElement : public WebFormControlElement {
public:
WebSelectElement() : WebFormControlElement() { }
- WebSelectElement(const WebSelectElement& e) : WebFormControlElement(e) { }
+ WebSelectElement(const WebSelectElement& element) : WebFormControlElement(element) { }
- WebSelectElement& operator=(const WebSelectElement& e)
- {
- WebFormControlElement::assign(e);
- return *this;
+ WebSelectElement& operator=(const WebSelectElement& element)
+ {
+ WebFormControlElement::assign(element);
+ return *this;
}
- WEBKIT_API void assign(const WebSelectElement& e) { WebFormControlElement::assign(e); }
+ void assign(const WebSelectElement& element) { WebFormControlElement::assign(element); }
WEBKIT_API void setValue(const WebString&);
WEBKIT_API WebString value();
diff --git a/WebKit/chromium/public/WebWidget.h b/WebKit/chromium/public/WebWidget.h
index d010270..ccad134 100644
--- a/WebKit/chromium/public/WebWidget.h
+++ b/WebKit/chromium/public/WebWidget.h
@@ -103,9 +103,18 @@ public:
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;
diff --git a/WebKit/chromium/public/linux/WebThemeEngine.h b/WebKit/chromium/public/linux/WebThemeEngine.h
index fd72cf7..6f8cdc7 100644
--- a/WebKit/chromium/public/linux/WebThemeEngine.h
+++ b/WebKit/chromium/public/linux/WebThemeEngine.h
@@ -39,6 +39,9 @@ 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.
@@ -49,7 +52,7 @@ public:
PartScrollbarUpArrow,
PartScrollbarHorizontalThumb,
PartScrollbarVerticalThumb,
- PartScrollbarHoriztonalTrack,
+ PartScrollbarHorizontalTrack,
PartScrollbarVerticalTrack
};
@@ -61,7 +64,7 @@ public:
StatePressed,
};
- // Extra parameters for drawing the PartScrollbarHoriztonalTrack and
+ // Extra parameters for drawing the PartScrollbarHorizontalTrack and
// PartScrollbarVerticalTrack.
struct ScrollbarTrackExtraParams {
// The bounds of the entire track, as opposed to the part being painted.
diff --git a/WebKit/chromium/public/mac/WebThemeEngine.h b/WebKit/chromium/public/mac/WebThemeEngine.h
new file mode 100644
index 0000000..8938816
--- /dev/null
+++ b/WebKit/chromium/public/mac/WebThemeEngine.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING 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/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index ba9b4e7..936b8db 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -79,6 +79,11 @@
#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)
@@ -393,3 +398,19 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR)
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/AudioDestinationChromium.cpp b/WebKit/chromium/src/AudioDestinationChromium.cpp
new file mode 100644
index 0000000..bed2562
--- /dev/null
+++ b/WebKit/chromium/src/AudioDestinationChromium.cpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2010 Google Inc. 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
new file mode 100644
index 0000000..a2a2b58
--- /dev/null
+++ b/WebKit/chromium/src/AudioDestinationChromium.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 Google Inc. 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/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index e94a04f..38a3f1d 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -62,6 +62,10 @@
#include "WebViewImpl.h"
#include "WebWorkerClientImpl.h"
+#if PLATFORM(CG)
+#include <CoreGraphics/CGContext.h>
+#endif
+
#if OS(WINDOWS)
#include "WebRect.h"
#include "win/WebThemeEngine.h"
@@ -73,6 +77,10 @@
#include "WebFontRenderStyle.h"
#endif
+#if OS(DARWIN)
+#include "mac/WebThemeEngine.h"
+#endif
+
#if WEBKIT_USING_SKIA
#include "NativeImageSkia.h"
#endif
@@ -795,7 +803,7 @@ static WebThemeEngine::Part WebThemePart(ChromiumBridge::ThemePart part)
case ChromiumBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow;
case ChromiumBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb;
case ChromiumBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
- case ChromiumBridge::PartScrollbarHoriztonalTrack: return WebThemeEngine::PartScrollbarHoriztonalTrack;
+ case ChromiumBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack;
case ChromiumBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
}
ASSERT_NOT_REACHED();
@@ -816,7 +824,7 @@ static WebThemeEngine::State WebThemeState(ChromiumBridge::ThemePaintState state
static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridge::ThemePaintState state, const ChromiumBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
{
- if (part == ChromiumBridge::PartScrollbarHoriztonalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) {
+ 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;
@@ -838,6 +846,28 @@ void ChromiumBridge::paintThemePart(
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 ----------------------------------------------------------------
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 9beef26..c84889e 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1349,6 +1349,14 @@ void FrameLoaderClientImpl::transitionToCommittedForNewPage()
makeDocumentView();
}
+void FrameLoaderClientImpl::didSaveToPageCache()
+{
+}
+
+void FrameLoaderClientImpl::didRestoreFromPageCache()
+{
+}
+
void FrameLoaderClientImpl::dispatchDidBecomeFrameset(bool)
{
}
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index ef00ed3..1d7a741 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -169,6 +169,8 @@ public:
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(
diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 2dff52b..686d01c 100644
--- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -246,6 +246,11 @@ void GraphicsContext3DInternal::reshape(int width, int height)
#endif // PLATFORM(CG)
}
+IntSize GraphicsContext3DInternal::getInternalFramebufferSize()
+{
+ return IntSize(m_impl->width(), m_impl->height());
+}
+
bool GraphicsContext3DInternal::isContextLost()
{
return m_impl->isContextLost();
@@ -363,76 +368,76 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
}
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
-DELEGATE_TO_IMPL_1R(sizeInBytes, int, int)
+DELEGATE_TO_IMPL_1R(sizeInBytes, GC3Denum, unsigned int)
bool GraphicsContext3DInternal::isGLES2Compliant() const
{
return m_impl->isGLES2Compliant();
}
-DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
+DELEGATE_TO_IMPL_1(activeTexture, GC3Denum)
DELEGATE_TO_IMPL_2(attachShader, Platform3DObject, Platform3DObject)
-void GraphicsContext3DInternal::bindAttribLocation(Platform3DObject program, unsigned long index, const String& name)
+void GraphicsContext3DInternal::bindAttribLocation(Platform3DObject program, GC3Duint index, const String& name)
{
m_impl->bindAttribLocation(program, index, name.utf8().data());
}
-DELEGATE_TO_IMPL_2(bindBuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindFramebuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindRenderbuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_2(bindTexture, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_4(blendColor, double, double, double, double)
-DELEGATE_TO_IMPL_1(blendEquation, unsigned long)
-DELEGATE_TO_IMPL_2(blendEquationSeparate, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_2(blendFunc, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
+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(unsigned long target, int size, unsigned long usage)
+void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, GC3Denum usage)
{
m_impl->bufferData(target, size, 0, usage);
}
-void GraphicsContext3DInternal::bufferData(unsigned long target, int size, const void* data, unsigned long usage)
+void GraphicsContext3DInternal::bufferData(GC3Denum target, GC3Dsizeiptr size, const void* data, GC3Denum usage)
{
m_impl->bufferData(target, size, data, usage);
}
-void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, int size, const void* data)
+void GraphicsContext3DInternal::bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr size, const void* data)
{
m_impl->bufferSubData(target, offset, size, data);
}
-DELEGATE_TO_IMPL_1R(checkFramebufferStatus, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1(clear, unsigned long)
-DELEGATE_TO_IMPL_4(clearColor, double, double, double, double)
-DELEGATE_TO_IMPL_1(clearDepth, double)
-DELEGATE_TO_IMPL_1(clearStencil, long)
-DELEGATE_TO_IMPL_4(colorMask, bool, bool, bool, bool)
+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, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long)
-DELEGATE_TO_IMPL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1(cullFace, unsigned long)
-DELEGATE_TO_IMPL_1(depthFunc, unsigned long)
-DELEGATE_TO_IMPL_1(depthMask, bool)
-DELEGATE_TO_IMPL_2(depthRange, double, double)
+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, unsigned long)
-DELEGATE_TO_IMPL_1(disableVertexAttribArray, unsigned long)
-DELEGATE_TO_IMPL_3(drawArrays, unsigned long, long, long)
-DELEGATE_TO_IMPL_4(drawElements, unsigned long, unsigned long, unsigned long, long)
+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, unsigned long)
-DELEGATE_TO_IMPL_1(enableVertexAttribArray, unsigned long)
+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, unsigned long, unsigned long, unsigned long, Platform3DObject)
-DELEGATE_TO_IMPL_5(framebufferTexture2D, unsigned long, unsigned long, unsigned long, Platform3DObject, long)
-DELEGATE_TO_IMPL_1(frontFace, unsigned long)
-DELEGATE_TO_IMPL_1(generateMipmap, unsigned long)
+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, unsigned long index, ActiveInfo& info)
+bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, GC3Duint index, ActiveInfo& info)
{
WebKit::WebGraphicsContext3D::ActiveInfo webInfo;
if (!m_impl->getActiveAttrib(program, index, webInfo))
@@ -443,7 +448,7 @@ bool GraphicsContext3DInternal::getActiveAttrib(Platform3DObject program, unsign
return true;
}
-bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, unsigned long index, ActiveInfo& info)
+bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, GC3Duint index, ActiveInfo& info)
{
WebKit::WebGraphicsContext3D::ActiveInfo webInfo;
if (!m_impl->getActiveUniform(program, index, webInfo))
@@ -454,16 +459,16 @@ bool GraphicsContext3DInternal::getActiveUniform(Platform3DObject program, unsig
return true;
}
-DELEGATE_TO_IMPL_4(getAttachedShaders, Platform3DObject, int, int*, unsigned int*)
+DELEGATE_TO_IMPL_4(getAttachedShaders, Platform3DObject, GC3Dsizei, GC3Dsizei*, Platform3DObject*)
-int GraphicsContext3DInternal::getAttribLocation(Platform3DObject program, const String& name)
+GC3Dint GraphicsContext3DInternal::getAttribLocation(Platform3DObject program, const String& name)
{
return m_impl->getAttribLocation(program, name.utf8().data());
}
-DELEGATE_TO_IMPL_2(getBooleanv, unsigned long, unsigned char*)
+DELEGATE_TO_IMPL_2(getBooleanv, GC3Denum, GC3Dboolean*)
-DELEGATE_TO_IMPL_3(getBufferParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getBufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes()
{
@@ -477,24 +482,24 @@ GraphicsContext3D::Attributes GraphicsContext3DInternal::getContextAttributes()
return attributes;
}
-DELEGATE_TO_IMPL_R(getError, unsigned long)
+DELEGATE_TO_IMPL_R(getError, GC3Denum)
-DELEGATE_TO_IMPL_2(getFloatv, unsigned long, float*)
+DELEGATE_TO_IMPL_2(getFloatv, GC3Denum, GC3Dfloat*)
-DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_4(getFramebufferAttachmentParameteriv, GC3Denum, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_2(getIntegerv, unsigned long, int*)
+DELEGATE_TO_IMPL_2(getIntegerv, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getProgramiv, Platform3DObject, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getProgramiv, Platform3DObject, GC3Denum, GC3Dint*)
String GraphicsContext3DInternal::getProgramInfoLog(Platform3DObject program)
{
return m_impl->getProgramInfoLog(program);
}
-DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getRenderbufferParameteriv, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getShaderiv, Platform3DObject, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getShaderiv, Platform3DObject, GC3Denum, GC3Dint*)
String GraphicsContext3DInternal::getShaderInfoLog(Platform3DObject shader)
{
@@ -506,139 +511,138 @@ String GraphicsContext3DInternal::getShaderSource(Platform3DObject shader)
return m_impl->getShaderSource(shader);
}
-String GraphicsContext3DInternal::getString(unsigned long name)
+String GraphicsContext3DInternal::getString(GC3Denum name)
{
return m_impl->getString(name);
}
-DELEGATE_TO_IMPL_3(getTexParameterfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_IMPL_3(getTexParameteriv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getTexParameterfv, GC3Denum, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getTexParameteriv, GC3Denum, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_3(getUniformfv, Platform3DObject, long, float*)
-DELEGATE_TO_IMPL_3(getUniformiv, Platform3DObject, long, int*)
+DELEGATE_TO_IMPL_3(getUniformfv, Platform3DObject, GC3Dint, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getUniformiv, Platform3DObject, GC3Dint, GC3Dint*)
-long GraphicsContext3DInternal::getUniformLocation(Platform3DObject program, const String& name)
+GC3Dint GraphicsContext3DInternal::getUniformLocation(Platform3DObject program, const String& name)
{
return m_impl->getUniformLocation(program, name.utf8().data());
}
-DELEGATE_TO_IMPL_3(getVertexAttribfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_IMPL_3(getVertexAttribiv, unsigned long, unsigned long, int*)
+DELEGATE_TO_IMPL_3(getVertexAttribfv, GC3Duint, GC3Denum, GC3Dfloat*)
+DELEGATE_TO_IMPL_3(getVertexAttribiv, GC3Duint, GC3Denum, GC3Dint*)
-DELEGATE_TO_IMPL_2R(getVertexAttribOffset, unsigned long, unsigned long, long)
+DELEGATE_TO_IMPL_2R(getVertexAttribOffset, GC3Duint, GC3Denum, GC3Dsizeiptr)
-DELEGATE_TO_IMPL_2(hint, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_1R(isBuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isEnabled, unsigned long, bool)
-DELEGATE_TO_IMPL_1R(isFramebuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isProgram, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isRenderbuffer, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isShader, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1R(isTexture, Platform3DObject, bool)
-DELEGATE_TO_IMPL_1(lineWidth, double)
+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, unsigned long, long)
-DELEGATE_TO_IMPL_2(polygonOffset, double, double)
-DELEGATE_TO_IMPL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*)
+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, unsigned long, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_2(sampleCoverage, double, bool)
-DELEGATE_TO_IMPL_4(scissor, long, long, unsigned long, unsigned long)
+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, unsigned long, long, unsigned long)
-DELEGATE_TO_IMPL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long)
-DELEGATE_TO_IMPL_1(stencilMask, unsigned long)
-DELEGATE_TO_IMPL_2(stencilMaskSeparate, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_3(stencilOp, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_IMPL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
+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)
-int GraphicsContext3DInternal::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels)
+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 0;
+ return true;
}
-DELEGATE_TO_IMPL_3(texParameterf, unsigned, unsigned, float)
-DELEGATE_TO_IMPL_3(texParameteri, unsigned, unsigned, int)
+DELEGATE_TO_IMPL_3(texParameterf, GC3Denum, GC3Denum, GC3Dfloat)
+DELEGATE_TO_IMPL_3(texParameteri, GC3Denum, GC3Denum, GC3Dint)
-int GraphicsContext3DInternal::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels)
+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);
- return 0;
}
-DELEGATE_TO_IMPL_2(uniform1f, long, float)
+DELEGATE_TO_IMPL_2(uniform1f, GC3Dint, GC3Dfloat)
-void GraphicsContext3DInternal::uniform1fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform1fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform1fv(location, size, v);
}
-DELEGATE_TO_IMPL_2(uniform1i, long, int)
+DELEGATE_TO_IMPL_2(uniform1i, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform1iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform1iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform1iv(location, size, v);
}
-DELEGATE_TO_IMPL_3(uniform2f, long, float, float)
+DELEGATE_TO_IMPL_3(uniform2f, GC3Dint, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform2fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform2fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform2fv(location, size, v);
}
-DELEGATE_TO_IMPL_3(uniform2i, long, int, int)
+DELEGATE_TO_IMPL_3(uniform2i, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform2iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform2iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform2iv(location, size, v);
}
-DELEGATE_TO_IMPL_4(uniform3f, long, float, float, float)
+DELEGATE_TO_IMPL_4(uniform3f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform3fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform3fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform3fv(location, size, v);
}
-DELEGATE_TO_IMPL_4(uniform3i, long, int, int, int)
+DELEGATE_TO_IMPL_4(uniform3i, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform3iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform3iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform3iv(location, size, v);
}
-DELEGATE_TO_IMPL_5(uniform4f, long, float, float, float, float)
+DELEGATE_TO_IMPL_5(uniform4f, GC3Dint, GC3Dfloat, GC3Dfloat, GC3Dfloat, GC3Dfloat)
-void GraphicsContext3DInternal::uniform4fv(long location, float* v, int size)
+void GraphicsContext3DInternal::uniform4fv(GC3Dint location, GC3Dfloat* v, GC3Dsizei size)
{
m_impl->uniform4fv(location, size, v);
}
-DELEGATE_TO_IMPL_5(uniform4i, long, int, int, int, int)
+DELEGATE_TO_IMPL_5(uniform4i, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint)
-void GraphicsContext3DInternal::uniform4iv(long location, int* v, int size)
+void GraphicsContext3DInternal::uniform4iv(GC3Dint location, GC3Dint* v, GC3Dsizei size)
{
m_impl->uniform4iv(location, size, v);
}
-void GraphicsContext3DInternal::uniformMatrix2fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix2fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix2fv(location, size, transpose, value);
}
-void GraphicsContext3DInternal::uniformMatrix3fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix3fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix3fv(location, size, transpose, value);
}
-void GraphicsContext3DInternal::uniformMatrix4fv(long location, bool transpose, float* value, int size)
+void GraphicsContext3DInternal::uniformMatrix4fv(GC3Dint location, GC3Dboolean transpose, GC3Dfloat* value, GC3Dsizei size)
{
m_impl->uniformMatrix4fv(location, size, transpose, value);
}
@@ -646,33 +650,33 @@ void GraphicsContext3DInternal::uniformMatrix4fv(long location, bool transpose,
DELEGATE_TO_IMPL_1(useProgram, Platform3DObject)
DELEGATE_TO_IMPL_1(validateProgram, Platform3DObject)
-DELEGATE_TO_IMPL_2(vertexAttrib1f, unsigned long, float)
-DELEGATE_TO_IMPL_2(vertexAttrib1fv, unsigned long, float*)
-DELEGATE_TO_IMPL_3(vertexAttrib2f, unsigned long, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib2fv, unsigned long, float*)
-DELEGATE_TO_IMPL_4(vertexAttrib3f, unsigned long, float, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib3fv, unsigned long, float*)
-DELEGATE_TO_IMPL_5(vertexAttrib4f, unsigned long, float, float, float, float)
-DELEGATE_TO_IMPL_2(vertexAttrib4fv, unsigned long, float*)
-DELEGATE_TO_IMPL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long)
-
-DELEGATE_TO_IMPL_4(viewport, long, long, unsigned long, unsigned long)
-
-DELEGATE_TO_IMPL_R(createBuffer, unsigned)
-DELEGATE_TO_IMPL_R(createFramebuffer, unsigned)
-DELEGATE_TO_IMPL_R(createProgram, unsigned)
-DELEGATE_TO_IMPL_R(createRenderbuffer, unsigned)
-DELEGATE_TO_IMPL_1R(createShader, unsigned long, unsigned)
-DELEGATE_TO_IMPL_R(createTexture, unsigned)
-
-DELEGATE_TO_IMPL_1(deleteBuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteFramebuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteProgram, unsigned)
-DELEGATE_TO_IMPL_1(deleteRenderbuffer, unsigned)
-DELEGATE_TO_IMPL_1(deleteShader, unsigned)
-DELEGATE_TO_IMPL_1(deleteTexture, unsigned)
-
-DELEGATE_TO_IMPL_1(synthesizeGLError, unsigned long)
+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()
{
@@ -731,11 +735,11 @@ bool GraphicsContext3DInternal::ensureExtensionEnabled(const String& name)
return m_enabledExtensions.contains(name);
}
-DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, unsigned, int, int, unsigned, void*)
+DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*)
DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*)
-DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, unsigned, int, int, int, int, int, unsigned, unsigned, unsigned, 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, unsigned, unsigned)
+DELEGATE_TO_IMPL_2(copyTextureToParentTextureCHROMIUM, Platform3DObject, Platform3DObject)
//----------------------------------------------------------------------
// GraphicsContext3D
@@ -840,6 +844,12 @@ void GraphicsContext3D::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7, t8
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) \
{ \
@@ -890,169 +900,150 @@ PlatformLayer* GraphicsContext3D::platformLayer() const
#endif
DELEGATE_TO_INTERNAL(makeContextCurrent)
-DELEGATE_TO_INTERNAL_1R(sizeInBytes, int, int)
+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, unsigned long)
+DELEGATE_TO_INTERNAL_1(activeTexture, GC3Denum)
DELEGATE_TO_INTERNAL_2(attachShader, Platform3DObject, Platform3DObject)
-DELEGATE_TO_INTERNAL_3(bindAttribLocation, Platform3DObject, unsigned long, const String&)
-
-DELEGATE_TO_INTERNAL_2(bindBuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindFramebuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindRenderbuffer, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_2(bindTexture, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_4(blendColor, double, double, double, double)
-DELEGATE_TO_INTERNAL_1(blendEquation, unsigned long)
-DELEGATE_TO_INTERNAL_2(blendEquationSeparate, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_2(blendFunc, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
-
-DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, int, unsigned long)
-DELEGATE_TO_INTERNAL_4(bufferData, unsigned long, int, const void*, unsigned long)
-DELEGATE_TO_INTERNAL_4(bufferSubData, unsigned long, long, int, const void*)
-
-DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1(clear, unsigned long)
-DELEGATE_TO_INTERNAL_4(clearColor, double, double, double, double)
-DELEGATE_TO_INTERNAL_1(clearDepth, double)
-DELEGATE_TO_INTERNAL_1(clearStencil, long)
-DELEGATE_TO_INTERNAL_4(colorMask, bool, bool, bool, bool)
+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, unsigned long, long, unsigned long, long, long, unsigned long, unsigned long, long)
-DELEGATE_TO_INTERNAL_8(copyTexSubImage2D, unsigned long, long, long, long, long, long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1(cullFace, unsigned long)
-DELEGATE_TO_INTERNAL_1(depthFunc, unsigned long)
-DELEGATE_TO_INTERNAL_1(depthMask, bool)
-DELEGATE_TO_INTERNAL_2(depthRange, double, double)
+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, unsigned long)
-DELEGATE_TO_INTERNAL_1(disableVertexAttribArray, unsigned long)
-DELEGATE_TO_INTERNAL_3(drawArrays, unsigned long, long, long)
-DELEGATE_TO_INTERNAL_4(drawElements, unsigned long, unsigned long, unsigned long, long)
+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, unsigned long)
-DELEGATE_TO_INTERNAL_1(enableVertexAttribArray, unsigned long)
+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, unsigned long, unsigned long, unsigned long, Platform3DObject)
-DELEGATE_TO_INTERNAL_5(framebufferTexture2D, unsigned long, unsigned long, unsigned long, Platform3DObject, long)
-DELEGATE_TO_INTERNAL_1(frontFace, unsigned long)
-DELEGATE_TO_INTERNAL_1(generateMipmap, unsigned long)
-
-DELEGATE_TO_INTERNAL_3R(getActiveAttrib, Platform3DObject, unsigned long, ActiveInfo&, bool)
-DELEGATE_TO_INTERNAL_3R(getActiveUniform, Platform3DObject, unsigned long, ActiveInfo&, bool)
-
-DELEGATE_TO_INTERNAL_4(getAttachedShaders, Platform3DObject, int, int*, unsigned int*)
-
-DELEGATE_TO_INTERNAL_2R(getAttribLocation, Platform3DObject, const String&, int)
-
-DELEGATE_TO_INTERNAL_2(getBooleanv, unsigned long, unsigned char*)
-
-DELEGATE_TO_INTERNAL_3(getBufferParameteriv, unsigned long, unsigned long, int*)
-
+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, unsigned long)
-
-DELEGATE_TO_INTERNAL_2(getFloatv, unsigned long, float*)
-
-DELEGATE_TO_INTERNAL_4(getFramebufferAttachmentParameteriv, unsigned long, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_2(getIntegerv, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getProgramiv, Platform3DObject, unsigned long, int*)
-
+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, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getShaderiv, Platform3DObject, unsigned long, int*)
-
+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, unsigned long, String)
-
-DELEGATE_TO_INTERNAL_3(getTexParameterfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(getTexParameteriv, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_3(getUniformfv, Platform3DObject, long, float*)
-DELEGATE_TO_INTERNAL_3(getUniformiv, Platform3DObject, long, int*)
-
-DELEGATE_TO_INTERNAL_2R(getUniformLocation, Platform3DObject, const String&, long)
-
-DELEGATE_TO_INTERNAL_3(getVertexAttribfv, unsigned long, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(getVertexAttribiv, unsigned long, unsigned long, int*)
-
-DELEGATE_TO_INTERNAL_2R(getVertexAttribOffset, unsigned long, unsigned long, long)
-
-DELEGATE_TO_INTERNAL_2(hint, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_1R(isBuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isEnabled, unsigned long, bool)
-DELEGATE_TO_INTERNAL_1R(isFramebuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isProgram, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isRenderbuffer, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isShader, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1R(isTexture, Platform3DObject, bool)
-DELEGATE_TO_INTERNAL_1(lineWidth, double)
+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, unsigned long, long)
-DELEGATE_TO_INTERNAL_2(polygonOffset, double, double)
+DELEGATE_TO_INTERNAL_2(pixelStorei, GC3Denum, GC3Dint)
+DELEGATE_TO_INTERNAL_2(polygonOffset, GC3Dfloat, GC3Dfloat)
-DELEGATE_TO_INTERNAL_7(readPixels, long, long, unsigned long, unsigned long, unsigned long, unsigned long, void*)
+DELEGATE_TO_INTERNAL_7(readPixels, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, void*)
DELEGATE_TO_INTERNAL(releaseShaderCompiler)
-DELEGATE_TO_INTERNAL_4(renderbufferStorage, unsigned long, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_2(sampleCoverage, double, bool)
-DELEGATE_TO_INTERNAL_4(scissor, long, long, unsigned long, unsigned long)
+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, unsigned long, long, unsigned long)
-DELEGATE_TO_INTERNAL_4(stencilFuncSeparate, unsigned long, unsigned long, long, unsigned long)
-DELEGATE_TO_INTERNAL_1(stencilMask, unsigned long)
-DELEGATE_TO_INTERNAL_2(stencilMaskSeparate, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
-
-DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float)
-DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int)
-DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-
-DELEGATE_TO_INTERNAL_2(uniform1f, long, float)
-DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int)
-DELEGATE_TO_INTERNAL_2(uniform1i, long, int)
-DELEGATE_TO_INTERNAL_3(uniform1iv, long, int*, int)
-DELEGATE_TO_INTERNAL_3(uniform2f, long, float, float)
-DELEGATE_TO_INTERNAL_3(uniform2fv, long, float*, int)
-DELEGATE_TO_INTERNAL_3(uniform2i, long, int, int)
-DELEGATE_TO_INTERNAL_3(uniform2iv, long, int*, int)
-DELEGATE_TO_INTERNAL_4(uniform3f, long, float, float, float)
-DELEGATE_TO_INTERNAL_3(uniform3fv, long, float*, int)
-DELEGATE_TO_INTERNAL_4(uniform3i, long, int, int, int)
-DELEGATE_TO_INTERNAL_3(uniform3iv, long, int*, int)
-DELEGATE_TO_INTERNAL_5(uniform4f, long, float, float, float, float)
-DELEGATE_TO_INTERNAL_3(uniform4fv, long, float*, int)
-DELEGATE_TO_INTERNAL_5(uniform4i, long, int, int, int, int)
-DELEGATE_TO_INTERNAL_3(uniform4iv, long, int*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix2fv, long, bool, float*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix3fv, long, bool, float*, int)
-DELEGATE_TO_INTERNAL_4(uniformMatrix4fv, long, bool, float*, int)
+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, unsigned long, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib1fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_3(vertexAttrib2f, unsigned long, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib2fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_4(vertexAttrib3f, unsigned long, float, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib3fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_5(vertexAttrib4f, unsigned long, float, float, float, float)
-DELEGATE_TO_INTERNAL_2(vertexAttrib4fv, unsigned long, float*)
-DELEGATE_TO_INTERNAL_6(vertexAttribPointer, unsigned long, int, int, bool, unsigned long, unsigned long)
+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, long, long, unsigned long, unsigned long)
+DELEGATE_TO_INTERNAL_4(viewport, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei)
DELEGATE_TO_INTERNAL_1(paintRenderingResultsToCanvas, CanvasRenderingContext*)
@@ -1061,21 +1052,21 @@ bool GraphicsContext3D::paintsIntoCanvasBuffer() const
return m_internal->paintsIntoCanvasBuffer();
}
-DELEGATE_TO_INTERNAL_R(createBuffer, unsigned)
-DELEGATE_TO_INTERNAL_R(createFramebuffer, unsigned)
-DELEGATE_TO_INTERNAL_R(createProgram, unsigned)
-DELEGATE_TO_INTERNAL_R(createRenderbuffer, unsigned)
-DELEGATE_TO_INTERNAL_1R(createShader, unsigned long, unsigned)
-DELEGATE_TO_INTERNAL_R(createTexture, unsigned)
+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, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteFramebuffer, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteProgram, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteRenderbuffer, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteShader, unsigned)
-DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned)
+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, unsigned long)
+DELEGATE_TO_INTERNAL_1(synthesizeGLError, GC3Denum)
DELEGATE_TO_INTERNAL_R(getExtensions, Extensions3D*)
bool GraphicsContext3D::isGLES2Compliant() const
diff --git a/WebKit/chromium/src/GraphicsContext3DInternal.h b/WebKit/chromium/src/GraphicsContext3DInternal.h
index ad54a4f..30a8e57 100644
--- a/WebKit/chromium/src/GraphicsContext3DInternal.h
+++ b/WebKit/chromium/src/GraphicsContext3DInternal.h
@@ -62,9 +62,10 @@ public:
bool makeContextCurrent();
- int sizeInBytes(int type);
+ unsigned int sizeInBytes(GC3Denum type);
void reshape(int width, int height);
+ IntSize getInternalFramebufferSize();
void paintRenderingResultsToCanvas(CanvasRenderingContext*);
bool paintsIntoCanvasBuffer() const;
@@ -76,191 +77,169 @@ public:
#endif
bool isGLES2Compliant() const;
+ void releaseShaderCompiler();
+ bool isContextLost();
+
//----------------------------------------------------------------------
// Entry points for WebGL.
//
- void activeTexture(unsigned long texture);
+ void activeTexture(GC3Denum texture);
void attachShader(Platform3DObject program, Platform3DObject shader);
- void bindAttribLocation(Platform3DObject, unsigned long index, const String& name);
- void bindBuffer(unsigned long target, Platform3DObject);
- void bindFramebuffer(unsigned long target, Platform3DObject);
- void bindRenderbuffer(unsigned long target, Platform3DObject);
- void bindTexture(unsigned long target, Platform3DObject texture);
- void blendColor(double red, double green, double blue, double alpha);
- void blendEquation(unsigned long mode);
- void blendEquationSeparate(unsigned long modeRGB, unsigned long modeAlpha);
- void blendFunc(unsigned long sfactor, unsigned long dfactor);
- void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
-
- void bufferData(unsigned long target, int size, unsigned long usage);
- void bufferData(unsigned long target, int size, const void* data, unsigned long usage);
- void bufferSubData(unsigned long target, long offset, int size, const void* data);
-
- unsigned long checkFramebufferStatus(unsigned long target);
- void clear(unsigned long mask);
- void clearColor(double red, double green, double blue, double alpha);
- void clearDepth(double depth);
- void clearStencil(long s);
- void colorMask(bool red, bool green, bool blue, bool alpha);
+ 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(unsigned long target, long level, unsigned long internalformat, long x, long y, unsigned long width, unsigned long height, long border);
- void copyTexSubImage2D(unsigned long target, long level, long xoffset, long yoffset, long x, long y, unsigned long width, unsigned long height);
- void cullFace(unsigned long mode);
- void depthFunc(unsigned long func);
- void depthMask(bool flag);
- void depthRange(double zNear, double zFar);
+ 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(unsigned long cap);
- void disableVertexAttribArray(unsigned long index);
- void drawArrays(unsigned long mode, long first, long count);
- void drawElements(unsigned long mode, unsigned long count, unsigned long type, long offset);
+ 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(unsigned long cap);
- void enableVertexAttribArray(unsigned long index);
+ void enable(GC3Denum cap);
+ void enableVertexAttribArray(GC3Duint index);
void finish();
void flush();
- void framebufferRenderbuffer(unsigned long target, unsigned long attachment, unsigned long renderbuffertarget, Platform3DObject);
- void framebufferTexture2D(unsigned long target, unsigned long attachment, unsigned long textarget, Platform3DObject, long level);
- void frontFace(unsigned long mode);
- void generateMipmap(unsigned long target);
-
- bool getActiveAttrib(Platform3DObject program, unsigned long index, ActiveInfo&);
- bool getActiveUniform(Platform3DObject program, unsigned long index, ActiveInfo&);
-
- void getAttachedShaders(Platform3DObject program, int maxCount, int* count, unsigned int* shaders);
-
- int getAttribLocation(Platform3DObject, const String& name);
-
- void getBooleanv(unsigned long pname, unsigned char* value);
-
- void getBufferParameteriv(unsigned long target, unsigned long pname, int* value);
-
+ 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();
-
- unsigned long getError();
-
- bool isContextLost();
-
- void getFloatv(unsigned long pname, float* value);
-
- void getFramebufferAttachmentParameteriv(unsigned long target, unsigned long attachment, unsigned long pname, int* value);
-
- void getIntegerv(unsigned long pname, int* value);
-
- void getProgramiv(Platform3DObject program, unsigned long pname, int* value);
-
+ 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(unsigned long target, unsigned long pname, int* value);
-
- void getShaderiv(Platform3DObject, unsigned long pname, int* value);
-
+ void getRenderbufferParameteriv(GC3Denum target, GC3Denum pname, GC3Dint* value);
+ void getShaderiv(Platform3DObject, GC3Denum pname, GC3Dint* value);
String getShaderInfoLog(Platform3DObject);
String getShaderSource(Platform3DObject);
- String getString(unsigned long name);
-
- void getTexParameterfv(unsigned long target, unsigned long pname, float* value);
- void getTexParameteriv(unsigned long target, unsigned long pname, int* value);
-
- void getUniformfv(Platform3DObject program, long location, float* value);
- void getUniformiv(Platform3DObject program, long location, int* value);
-
- long getUniformLocation(Platform3DObject, const String& name);
-
- void getVertexAttribfv(unsigned long index, unsigned long pname, float* value);
- void getVertexAttribiv(unsigned long index, unsigned long pname, int* value);
-
- long getVertexAttribOffset(unsigned long index, unsigned long pname);
-
- void hint(unsigned long target, unsigned long mode);
- bool isBuffer(Platform3DObject);
- bool isEnabled(unsigned long cap);
- bool isFramebuffer(Platform3DObject);
- bool isProgram(Platform3DObject);
- bool isRenderbuffer(Platform3DObject);
- bool isShader(Platform3DObject);
- bool isTexture(Platform3DObject);
- void lineWidth(double);
+ 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(unsigned long pname, long param);
- void polygonOffset(double factor, double units);
+ void pixelStorei(GC3Denum pname, GC3Dint param);
+ void polygonOffset(GC3Dfloat factor, GC3Dfloat units);
- void readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* data);
+ void readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, void* data);
- void releaseShaderCompiler();
- void renderbufferStorage(unsigned long target, unsigned long internalformat, unsigned long width, unsigned long height);
- void sampleCoverage(double value, bool invert);
- void scissor(long x, long y, unsigned long width, unsigned long height);
+ 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(unsigned long func, long ref, unsigned long mask);
- void stencilFuncSeparate(unsigned long face, unsigned long func, long ref, unsigned long mask);
- void stencilMask(unsigned long mask);
- void stencilMaskSeparate(unsigned long face, unsigned long mask);
- void stencilOp(unsigned long fail, unsigned long zfail, unsigned long zpass);
- void stencilOpSeparate(unsigned long face, unsigned long fail, unsigned long zfail, unsigned long zpass);
-
- // These next several functions return an error code (0 if no errors) rather than using an ExceptionCode.
- // Currently they return -1 on any error.
- int texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels);
-
- void texParameterf(unsigned target, unsigned pname, float param);
- void texParameteri(unsigned target, unsigned pname, int param);
-
- int texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels);
-
- void uniform1f(long location, float x);
- void uniform1fv(long location, float* v, int size);
- void uniform1i(long location, int x);
- void uniform1iv(long location, int* v, int size);
- void uniform2f(long location, float x, float y);
- void uniform2fv(long location, float* v, int size);
- void uniform2i(long location, int x, int y);
- void uniform2iv(long location, int* v, int size);
- void uniform3f(long location, float x, float y, float z);
- void uniform3fv(long location, float* v, int size);
- void uniform3i(long location, int x, int y, int z);
- void uniform3iv(long location, int* v, int size);
- void uniform4f(long location, float x, float y, float z, float w);
- void uniform4fv(long location, float* v, int size);
- void uniform4i(long location, int x, int y, int z, int w);
- void uniform4iv(long location, int* v, int size);
- void uniformMatrix2fv(long location, bool transpose, float* value, int size);
- void uniformMatrix3fv(long location, bool transpose, float* value, int size);
- void uniformMatrix4fv(long location, bool transpose, float* value, int size);
+ 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(unsigned long indx, float x);
- void vertexAttrib1fv(unsigned long indx, float* values);
- void vertexAttrib2f(unsigned long indx, float x, float y);
- void vertexAttrib2fv(unsigned long indx, float* values);
- void vertexAttrib3f(unsigned long indx, float x, float y, float z);
- void vertexAttrib3fv(unsigned long indx, float* values);
- void vertexAttrib4f(unsigned long indx, float x, float y, float z, float w);
- void vertexAttrib4fv(unsigned long indx, float* values);
- void vertexAttribPointer(unsigned long indx, int size, int type, bool normalized,
- unsigned long stride, unsigned long offset);
-
- void viewport(long x, long y, unsigned long width, unsigned long height);
-
- unsigned createBuffer();
- unsigned createFramebuffer();
- unsigned createProgram();
- unsigned createRenderbuffer();
- unsigned createShader(unsigned long);
- unsigned createTexture();
-
- void deleteBuffer(unsigned);
- void deleteFramebuffer(unsigned);
- void deleteProgram(unsigned);
- void deleteRenderbuffer(unsigned);
- void deleteShader(unsigned);
- void deleteTexture(unsigned);
-
- void synthesizeGLError(unsigned long error);
+ 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();
@@ -272,14 +251,14 @@ public:
// GL_CHROMIUM_map_sub
bool supportsMapSubCHROMIUM();
- void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access);
+ void* mapBufferSubDataCHROMIUM(GC3Denum target, GC3Dsizeiptr offset, GC3Dsizei size, GC3Denum access);
void unmapBufferSubDataCHROMIUM(const void*);
- void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access);
+ 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(unsigned texture, unsigned parentTexture);
+ void copyTextureToParentTextureCHROMIUM(Platform3DObject texture, Platform3DObject parentTexture);
private:
OwnPtr<WebKit::WebGraphicsContext3D> m_impl;
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index 345e43e..caeffb6 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -38,7 +38,6 @@
#include "Document.h"
#include "Event.h"
#include "Frame.h"
-#include "InspectorBackend.h"
#include "InspectorController.h"
#include "InspectorFrontendClientImpl.h"
#include "InspectorFrontendHost.h"
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 4422e1b..5baf73b 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -82,6 +82,7 @@
#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"
@@ -712,7 +713,7 @@ WebPerformance WebFrameImpl::performance() const
if (!m_frame || !m_frame->domWindow())
return WebPerformance();
- return WebPerformance(m_frame->domWindow()->webkitPerformance());
+ return WebPerformance(m_frame->domWindow()->performance());
}
WebSecurityOrigin WebFrameImpl::securityOrigin() const
@@ -1073,7 +1074,12 @@ void WebFrameImpl::replaceSelection(const WebString& text)
void WebFrameImpl::insertText(const WebString& text)
{
- frame()->editor()->insertText(text, 0);
+ Editor* editor = frame()->editor();
+
+ if (editor->hasComposition())
+ editor->confirmComposition(text);
+ else
+ editor->insertText(text, 0);
}
void WebFrameImpl::setMarkedText(
@@ -1081,8 +1087,6 @@ void WebFrameImpl::setMarkedText(
{
Editor* editor = frame()->editor();
- editor->confirmComposition(text);
-
Vector<CompositionUnderline> decorations;
editor->setComposition(text, decorations, location, length);
}
@@ -1150,11 +1154,11 @@ bool WebFrameImpl::executeCommand(const WebString& name)
// support.
if (command == "DeleteToEndOfParagraph") {
Editor* editor = frame()->editor();
- if (!editor->deleteWithDirection(SelectionController::DirectionForward,
+ if (!editor->deleteWithDirection(DirectionForward,
ParagraphBoundary,
true,
false)) {
- editor->deleteWithDirection(SelectionController::DirectionForward,
+ editor->deleteWithDirection(DirectionForward,
CharacterGranularity,
true,
false);
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.cpp b/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 085a157..63ebed8 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -253,6 +253,11 @@ bool WebPopupMenuImpl::confirmComposition()
return false;
}
+bool WebPopupMenuImpl::confirmComposition(const WebString& text)
+{
+ return false;
+}
+
WebTextInputType WebPopupMenuImpl::textInputType()
{
return WebTextInputTypeNone;
diff --git a/WebKit/chromium/src/WebPopupMenuImpl.h b/WebKit/chromium/src/WebPopupMenuImpl.h
index 221ba03..b8ef7ba 100644
--- a/WebKit/chromium/src/WebPopupMenuImpl.h
+++ b/WebKit/chromium/src/WebPopupMenuImpl.h
@@ -73,6 +73,7 @@ public:
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);
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 178e4db..8e27a67 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -46,6 +46,7 @@
#include "WebFormElement.h"
using namespace WebCore;
+using namespace HTMLNames;
namespace {
@@ -128,13 +129,13 @@ bool IsSelectInDefaultState(const HTMLSelectElement* select)
// 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 defaultChecked state.
+// 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->defaultChecked();
+ return inputElement->checked() == inputElement->hasAttribute(checkedAttr);
} else if (formElement->hasTagName(HTMLNames::selectTag))
return IsSelectInDefaultState(static_cast<const HTMLSelectElement*>(formElement));
return true;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index ac05dd2..e47c89e 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -69,7 +69,6 @@
#include "HTMLNames.h"
#include "Image.h"
#include "ImageBuffer.h"
-#include "ImageData.h"
#include "InspectorController.h"
#include "KeyboardCodes.h"
#include "KeyboardEvent.h"
@@ -120,6 +119,7 @@
#include "WebString.h"
#include "WebVector.h"
#include "WebViewClient.h"
+#include <wtf/ByteArray.h>
#include <wtf/RefPtr.h>
#if PLATFORM(CG)
@@ -1020,10 +1020,10 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
IntRect invertRect(rect.x(), bitmapHeight - rect.bottom(), rect.width(), rect.height());
OwnPtr<ImageBuffer> imageBuffer(ImageBuffer::create(rect.size()));
- RefPtr<ImageData> imageData(ImageData::create(rect.width(), rect.height()));
- if (imageBuffer.get() && imageData.get()) {
- m_layerRenderer->getFramebufferPixels(imageData->data()->data()->data(), invertRect);
- imageBuffer->putPremultipliedImageData(imageData.get(), IntRect(IntPoint(), rect.size()), IntPoint());
+ 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));
@@ -1303,11 +1303,16 @@ bool WebViewImpl::setComposition(
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())
+ if (!editor || (!editor->hasComposition() && !text.length()))
return false;
// We should verify the parent node of this IME composition node are
@@ -1321,7 +1326,14 @@ bool WebViewImpl::confirmComposition()
return false;
}
- editor->confirmComposition();
+ if (editor->hasComposition()) {
+ if (text.length())
+ editor->confirmComposition(String(text));
+ else
+ editor->confirmComposition();
+ } else
+ editor->insertText(String(text), 0);
+
return true;
}
@@ -2268,70 +2280,6 @@ void WebViewImpl::setRootLayerNeedsDisplay()
void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect& clipRect)
{
- ASSERT(m_layerRenderer);
- // Compute the damage rect in viewport space.
- WebFrameImpl* webframe = mainFrameImpl();
- if (!webframe)
- return;
- FrameView* view = webframe->frameView();
- if (!view)
- return;
-
- IntRect contentRect = view->visibleContentRect(false);
- IntRect screenRect = view->contentsToWindow(contentRect);
-
- // We support fast scrolling in one direction at a time.
- if (scrollDelta.width() && scrollDelta.height()) {
- invalidateRootLayerRect(WebRect(screenRect));
- return;
- }
-
- // Compute the region we will expose by scrolling. We use the
- // content rect for invalidation. Using this space for damage
- // rects allows us to intermix invalidates with scrolls.
- IntRect damagedContentsRect;
- if (scrollDelta.width()) {
- int dx = scrollDelta.width();
- damagedContentsRect.setY(screenRect.y());
- damagedContentsRect.setHeight(screenRect.height());
- if (dx > 0) {
- damagedContentsRect.setX(screenRect.x());
- damagedContentsRect.setWidth(dx);
- } else {
- damagedContentsRect.setX(screenRect.right() + dx);
- damagedContentsRect.setWidth(-dx);
- }
- } else {
- int dy = scrollDelta.height();
- damagedContentsRect.setX(screenRect.x());
- damagedContentsRect.setWidth(screenRect.width());
- if (dy > 0) {
- damagedContentsRect.setY(screenRect.y());
- damagedContentsRect.setHeight(dy);
- } else {
- damagedContentsRect.setY(screenRect.bottom() + dy);
- damagedContentsRect.setHeight(-dy);
- }
- }
-
- // Move the previous damage
- m_rootLayerScrollDamage.move(scrollDelta.width(), scrollDelta.height());
- // Union with the new damage rect.
- m_rootLayerScrollDamage.unite(damagedContentsRect);
-
- // Scroll any existing damage that intersects with clip rect
- if (clipRect.intersects(m_rootLayerDirtyRect)) {
- // Find the inner damage
- IntRect innerDamage(clipRect);
- innerDamage.intersect(m_rootLayerDirtyRect);
-
- // Move the damage
- innerDamage.move(scrollDelta.width(), scrollDelta.height());
-
- // Merge it back into the damaged rect
- m_rootLayerDirtyRect.unite(innerDamage);
- }
-
setRootLayerNeedsDisplay();
}
@@ -2342,9 +2290,12 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
if (!page())
return;
- // FIXME: add a smarter damage aggregation logic and/or unify with
- // LayerChromium's damage logic
- m_rootLayerDirtyRect.unite(rect);
+ 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();
}
@@ -2361,89 +2312,77 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (m_layerRenderer)
m_layerRenderer->finish(); // finish all GL rendering before we hide the window?
m_client->didActivateAcceleratedCompositing(false);
- return;
- }
-
- if (m_layerRenderer) {
+ } 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);
- return;
- }
-
- 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;
+ 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);
}
-void WebViewImpl::updateRootLayerContents(const IntRect& rect)
-{
- if (!isAcceleratedCompositingActive())
- return;
-
- WebFrameImpl* webframe = mainFrameImpl();
- if (!webframe)
- return;
- FrameView* view = webframe->frameView();
- if (!view)
- return;
-
- LayerChromium* rootLayer = m_layerRenderer->rootLayer();
- if (rootLayer) {
- IntRect visibleRect = view->visibleContentRect(true);
-
- m_layerRenderer->setRootLayerCanvasSize(IntSize(rect.width(), rect.height()));
- GraphicsContext* rootLayerContext = m_layerRenderer->rootLayerGraphicsContext();
-
-#if PLATFORM(SKIA)
- PlatformContextSkia* skiaContext = rootLayerContext->platformContext();
- skia::PlatformCanvas* platformCanvas = skiaContext->canvas();
-
- platformCanvas->save();
-
- // Bring the canvas into the coordinate system of the paint rect.
- platformCanvas->translate(static_cast<SkScalar>(-rect.x()), static_cast<SkScalar>(-rect.y()));
-
- rootLayerContext->save();
-
- webframe->paintWithContext(*rootLayerContext, rect);
- rootLayerContext->restore();
+class WebViewImplTilePaintInterface : public TilePaintInterface {
+public:
+ explicit WebViewImplTilePaintInterface(WebViewImpl* webViewImpl)
+ : m_webViewImpl(webViewImpl)
+ {
+ }
- platformCanvas->restore();
-#elif PLATFORM(CG)
- CGContextRef cgContext = rootLayerContext->platformContext();
+ 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);
+ }
- CGContextSaveGState(cgContext);
+private:
+ WebViewImpl* m_webViewImpl;
+};
- // Bring the CoreGraphics context into the coordinate system of the paint rect.
- CGContextTranslateCTM(cgContext, -rect.x(), -rect.y());
- rootLayerContext->save();
+class WebViewImplScrollbarPaintInterface : public TilePaintInterface {
+public:
+ explicit WebViewImplScrollbarPaintInterface(WebViewImpl* webViewImpl)
+ : m_webViewImpl(webViewImpl)
+ {
+ }
- webframe->paintWithContext(*rootLayerContext, rect);
- rootLayerContext->restore();
+ virtual void paint(GraphicsContext& context, const IntRect& contentRect)
+ {
+ Page* page = m_webViewImpl->page();
+ if (!page)
+ return;
+ FrameView* view = page->mainFrame()->view();
- CGContextRestoreGState(cgContext);
-#else
-#error Must port to your platform
-#endif
+ context.translate(view->scrollX(), view->scrollY());
+ IntRect windowRect = view->contentsToWindow(contentRect);
+ view->paintScrollbars(&context, windowRect);
}
-}
+
+private:
+ WebViewImpl* m_webViewImpl;
+};
void WebViewImpl::doComposite()
{
@@ -2455,32 +2394,12 @@ void WebViewImpl::doComposite()
// The visibleRect includes scrollbars whereas the contentRect doesn't.
IntRect visibleRect = view->visibleContentRect(true);
IntRect contentRect = view->visibleContentRect(false);
- IntRect viewPort = IntRect(0, 0, m_size.width, m_size.height);
-
- // Give the compositor a chance to setup/resize the root texture handle and perform scrolling.
- m_layerRenderer->prepareToDrawLayers(visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY()));
+ IntPoint scroll(view->scrollX(), view->scrollY());
- // Draw the contents of the root layer.
- Vector<IntRect> damageRects;
- damageRects.append(m_rootLayerScrollDamage);
- damageRects.append(m_rootLayerDirtyRect);
- for (size_t i = 0; i < damageRects.size(); ++i) {
- IntRect damagedRect = damageRects[i];
-
- // Intersect this rectangle with the viewPort.
- damagedRect.intersect(viewPort);
-
- // Now render it.
- if (damagedRect.width() && damagedRect.height()) {
- updateRootLayerContents(damagedRect);
- m_layerRenderer->updateRootLayerTextureRect(damagedRect);
- }
- }
- m_rootLayerDirtyRect = IntRect();
- m_rootLayerScrollDamage = IntRect();
+ WebViewImplTilePaintInterface tilePaint(this);
- // Draw the actual layers...
- m_layerRenderer->drawLayers(visibleRect, contentRect);
+ WebViewImplScrollbarPaintInterface scrollbarPaint(this);
+ m_layerRenderer->drawLayers(visibleRect, contentRect, scroll, tilePaint, scrollbarPaint);
}
void WebViewImpl::reallocateRenderer()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 6e8dcac..cc25c84 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -105,6 +105,7 @@ public:
int selectionStart,
int selectionEnd);
virtual bool confirmComposition();
+ virtual bool confirmComposition(const WebString& text);
virtual WebTextInputType textInputType();
virtual WebRect caretOrSelectionBounds();
virtual void setTextDirection(WebTextDirection direction);
@@ -396,7 +397,6 @@ private:
#if USE(ACCELERATED_COMPOSITING)
void setIsAcceleratedCompositingActive(bool);
- void updateRootLayerContents(const WebCore::IntRect&);
void doComposite();
void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
void reallocateRenderer();
@@ -528,7 +528,6 @@ private:
RefPtr<WebCore::Node> m_mouseCaptureNode;
#if USE(ACCELERATED_COMPOSITING)
- WebCore::IntRect m_rootLayerDirtyRect;
WebCore::IntRect m_rootLayerScrollDamage;
RefPtr<WebCore::LayerRendererChromium> m_layerRenderer;
bool m_isAcceleratedCompositingActive;
diff --git a/WebKit/chromium/tests/PopupMenuTest.cpp b/WebKit/chromium/tests/PopupMenuTest.cpp
index b68980f..4b6b123 100644
--- a/WebKit/chromium/tests/PopupMenuTest.cpp
+++ b/WebKit/chromium/tests/PopupMenuTest.cpp
@@ -139,6 +139,7 @@ public:
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) { }