diff options
Diffstat (limited to 'Source/WebKit')
38 files changed, 794 insertions, 276 deletions
diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp index 092fe4c78..929cd9921 100644 --- a/Source/WebKit/blackberry/Api/BackingStore.cpp +++ b/Source/WebKit/blackberry/Api/BackingStore.cpp @@ -1011,6 +1011,12 @@ bool BackingStorePrivate::render(const Platform::IntRect& rect) if (shouldDirectRenderingToWindow()) return renderDirectToWindow(rect); + // If direct rendering is off, even though we're not active, someone else + // has to render the root layer. There are no tiles available for us to + // draw to. + if (!isActive()) + return false; + TileRectList tileRectList = mapFromTransformedContentsToTiles(rect); if (tileRectList.isEmpty()) return false; diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp index 5f8894548..684279e30 100644 --- a/Source/WebKit/blackberry/Api/WebPage.cpp +++ b/Source/WebKit/blackberry/Api/WebPage.cpp @@ -638,7 +638,13 @@ void WebPage::loadFile(const char* path, const char* overrideContentType) void WebPage::download(const Platform::NetworkRequest& request) { - d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "", request.getSuggestedSaveName().c_str()); + vector<const char*> headers; + Platform::NetworkRequest::HeaderList& list = request.getHeaderListRef(); + for (unsigned i = 0; i < list.size(); i++) { + headers.push_back(list[i].first.c_str()); + headers.push_back(list[i].second.c_str()); + } + d->load(request.getUrlRef().c_str(), 0, "GET", Platform::NetworkRequest::UseProtocolCachePolicy, 0, 0, headers.empty() ? 0 : &headers[0], headers.size(), false, false, true, "", request.getSuggestedSaveName().c_str()); } void WebPagePrivate::loadString(const char* string, const char* baseURL, const char* contentType, const char* failingURL) @@ -892,11 +898,17 @@ void WebPagePrivate::setLoadState(LoadState state) m_virtualViewportHeight = m_defaultLayoutSize.height(); } // Check if we have already process the meta viewport tag, this only happens on history navigation. + // For back/forward history navigation, we should only keep these previous values if the document + // has the meta viewport tag when the state is Committed in setLoadState. // Refreshing should keep these previous values as well. + static ViewportArguments defaultViewportArguments; + bool documentHasViewportArguments = false; FrameLoadType frameLoadType = FrameLoadTypeStandard; + if (m_mainFrame && m_mainFrame->document() && !(m_mainFrame->document()->viewportArguments() == defaultViewportArguments)) + documentHasViewportArguments = true; if (m_mainFrame && m_mainFrame->loader()) frameLoadType = m_mainFrame->loader()->loadType(); - if (!m_didRestoreFromPageCache && !(frameLoadType == FrameLoadTypeReload || frameLoadType == FrameLoadTypeReloadFromOrigin)) { + if (!((m_didRestoreFromPageCache && documentHasViewportArguments) || (frameLoadType == FrameLoadTypeReload || frameLoadType == FrameLoadTypeReloadFromOrigin))) { m_viewportArguments = ViewportArguments(); // At the moment we commit a new load, set the viewport arguments @@ -5618,6 +5630,8 @@ void WebPagePrivate::setCompositor(PassRefPtr<WebPageCompositorPrivate> composit } m_compositor = compositor; + if (m_compositor) + m_compositor->setPage(this); // The previous compositor, if any, has now released it's OpenGL resources, // so we can safely free the owned context, if any. @@ -5850,6 +5864,9 @@ void WebPagePrivate::destroyCompositor() if (!m_ownedContext) return; + // m_compositor is a RefPtr, so it may live on beyond this point. + // Disconnect the compositor from us + m_compositor->setPage(0); m_compositor.clear(); m_ownedContext.clear(); } diff --git a/Source/WebKit/blackberry/Api/WebPageCompositor.cpp b/Source/WebKit/blackberry/Api/WebPageCompositor.cpp index 8e4c17778..da629adae 100644 --- a/Source/WebKit/blackberry/Api/WebPageCompositor.cpp +++ b/Source/WebKit/blackberry/Api/WebPageCompositor.cpp @@ -109,7 +109,7 @@ void WebPageCompositorPrivate::render(const IntRect& dstRect, const IntRect& tra bool WebPageCompositorPrivate::drawsRootLayer() const { - return m_drawsRootLayer; + return m_rootLayer && m_drawsRootLayer; } bool WebPageCompositorPrivate::drawLayers(const IntRect& dstRect, const FloatRect& contents) @@ -190,14 +190,16 @@ WebPageCompositor::~WebPageCompositor() { using namespace BlackBerry::Platform; - webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), PassRefPtr<WebPageCompositorPrivate>(0))); + // If we're being destroyed before the page, send a message to disconnect us + if (d->page()) + webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), PassRefPtr<WebPageCompositorPrivate>(0))); d->compositorDestroyed(); d->deref(); } WebPageCompositorClient* WebPageCompositor::client() const { - return 0; + return d->client(); } void WebPageCompositor::prepareFrame(Platform::Graphics::GLES2Context* context, double timestamp) diff --git a/Source/WebKit/blackberry/Api/WebPageCompositor_p.h b/Source/WebKit/blackberry/Api/WebPageCompositor_p.h index 4bd06c404..cb41e1164 100644 --- a/Source/WebKit/blackberry/Api/WebPageCompositor_p.h +++ b/Source/WebKit/blackberry/Api/WebPageCompositor_p.h @@ -82,6 +82,7 @@ public: void releaseLayerResources(); WebPagePrivate* page() const { return m_webPage; } + void setPage(WebPagePrivate* page) { m_webPage = page; } WebPageCompositorClient* client() const { return m_client; } void compositorDestroyed(); diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog index b77cf99ae..93583a78a 100644 --- a/Source/WebKit/blackberry/ChangeLog +++ b/Source/WebKit/blackberry/ChangeLog @@ -1,3 +1,137 @@ +2012-05-27 Arvid Nilsson <anilsson@rim.com> + + [BlackBerry] Crash when deleting WebPageCompositor + https://bugs.webkit.org/show_bug.cgi?id=87589 + + Reviewed by Rob Buis. + + The WebPageCompositorPrivate is reference counted, so it may outlive + either the WebPage or the WebPageCompositor, depending on who releases + its reference first. + + Fixed by disconnecting the objects properly, regardless of who goes + away first. + + Reviewed internally by Mike Lattanzio. + + PR #156444 + + * Api/WebPage.cpp: + (BlackBerry::WebKit::WebPagePrivate::setCompositor): + (BlackBerry::WebKit::WebPagePrivate::destroyCompositor): + * Api/WebPageCompositor.cpp: + (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor): + (BlackBerry::WebKit::WebPageCompositor::client): + * Api/WebPageCompositor_p.h: + (BlackBerry::WebKit::WebPageCompositorPrivate::setPage): + +2012-05-27 Arvid Nilsson <anilsson@rim.com> + + 2012-04-18 Arvid Nilsson <anilsson@rim.com> + + [BlackBerry] BackingStore accesses tiles even though it's not active + https://bugs.webkit.org/show_bug.cgi?id=87563 + + Reviewed by Antonio Gomes. + + There are many scenarios that can call render and cause tile access, + and they used to be rerouted to the direct rendering code when the + backing store was not active. This was thanks to an implicit check for + isActive() by virtue of calling shouldDirectRenderingToWindow() from + render(). + + If we're using OpenGL for compositing the backing store contents + however, direct rendering is always disabled and we jump right into the + tile based rendering code. + + Fixed by adding an explicit check for isActive() in render(), now that + the implicit check in shouldDirectRenderingToWindow() is conditional on + having raster usage. + + Since PR136381/bug83131, when OpenGL compositing is used, and the + backing store is not active, it is not in charge of drawing the root + layer. Instead, we switch off the paintingGoesToWindow flag on the root + RenderLayer so no invalidates will reach the ChromeClient or the + BackingStore any more. Instead, invalidations will cause the root + accelerated compositing layer to be repainted. Any BackingStore render + calls while in this state are pointless, and can safely do an early + return. + + Reviewed internally by Jakob Petsovits. + + PR #150403 + + * Api/BackingStore.cpp: + (BlackBerry::WebKit::BackingStorePrivate::render): + +2012-05-27 Arvid Nilsson <anilsson@rim.com> + + 2012-04-12 Arvid Nilsson <anilsson@rim.com> + + [BlackBerry] Web page fails to render after clicking link with target=_blank + https://bugs.webkit.org/show_bug.cgi?id=87562 + + Reviewed by Antonio Gomes. + + Clicking such a link opens a new tab. The compositor was briefly in + charge of drawing the root layer while the backing store was inactive + and the user was looking at the other tab. The problem was that the + compositor believed it was still painting the root layer even after the + backing store became active again. The flag was not properly cleared + when turning off compositing. + + Fixed by returning false from drawsRootLayer() if we don't have a root + layer. + + Reviewed internally by Filip Spacek. + + PR #149342 + + * Api/WebPageCompositor.cpp: + (BlackBerry::WebKit::WebPageCompositorPrivate::drawsRootLayer): + +2012-05-24 Jacky Jiang <zhajiang@rim.com> + + [BlackBerry] History navigation caused google.com scale not kept + https://bugs.webkit.org/show_bug.cgi?id=87438 + + Reviewed by Antonio Gomes. + Patch by Jacky Jiang <zhajiang@rim.com> + + PR: 159923 + For back/forward history navigation, we were trying to keep the values + set by dispatchViewportDataDidChange. However, when we went back from + the previous page, if the current page didn't contain the meta viewport + tag, then those values set by previous page would never be reset. + Although the current page could get correct saved scale when restoring + view state, the scale would still be clamped by zoomToFitScale which + was based on the virtual viewport of the previous page which could make + the scale incorrect. + Since we know the viewport arguments of the current document before + setLoadState on back/forward history navigation, we can reset these + previous values if the document doesn't have viewport arguments during + setLoadState. + + * Api/WebPage.cpp: + (BlackBerry::WebKit::WebPagePrivate::setLoadState): + +2012-05-25 Mary Wu <mary.wu@torchmobile.com.cn> + + [BlackBerry] Pass http headers to loader in download request + https://bugs.webkit.org/show_bug.cgi?id=87449 + + Reviewed by Rob Buis. + + PR# 149283 + + This is to support byte-range download and we could pass http headers like + "Range" in download request to loader. + + Reviewed internally by Lyon Chen. + + * Api/WebPage.cpp: + (BlackBerry::WebKit::WebPage::download): + 2012-05-24 Mike Fenton <mifenton@rim.com> [BlackBerry] InputHandler can hold a ref on an object when document is cleared. diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog index 8f2e70401..2baa8ecc1 100644 --- a/Source/WebKit/chromium/ChangeLog +++ b/Source/WebKit/chromium/ChangeLog @@ -1,3 +1,165 @@ +2012-05-25 Ryosuke Niwa <rniwa@webkit.org> + + Roll chromium DEPS from r139156 to r139184. + + * DEPS: + +2012-05-25 Garrett Casto <gcasto@chromium.org> + + Allow WebTextFieldDecoratorClient to see applied decorations. + https://bugs.webkit.org/show_bug.cgi?id=86557 + + Reviewed by Kent Tamura. + + * WebKit.gyp: Added new files. + * public/WebInputElement.h: + (WebKit::WebInputElement::decorationElementFor): Returns the + WebElement attached to the WebInputElement by the given + WebTextFieldDecoratorClient, if one exists. + * src/TextFieldDecoratorImpl.cpp: + (WebKit): + * src/TextFieldDecoratorImpl.h: + (TextFieldDecoratorImpl::decoratorClient): Get the + WebTextFieldDecoratorClient owned by this object. + +2012-05-25 Mihai Parparita <mihaip@chromium.org> + + Allow synchronous XHRs to be disabled in documents + https://bugs.webkit.org/show_bug.cgi?id=87540 + + Reviewed by Eric Seidel. + + Synchronous XMLHttpRequests are a problematic API, since they result + in blocked UI threads. Some clients may wish to always disable them; + give them a setting to do so (see also r103629 for other cases where + synchronous XHRs are disabled). + + * public/WebSettings.h: + * src/WebSettingsImpl.cpp: + (WebKit::WebSettingsImpl::setSyncXHRInDocumentsEnabled): + (WebKit): + * src/WebSettingsImpl.h: + (WebSettingsImpl): + +2012-05-25 Kinuko Yasuda <kinuko@chromium.org> + + [chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata + https://bugs.webkit.org/show_bug.cgi?id=87492 + + Reviewed by Adam Barth. + + * src/PlatformSupport.cpp: + (WebCore::PlatformSupport::getFileMetadata): + +2012-05-25 Ryosuke Niwa <rniwa@webkit.org> + + Roll Chromium DEPS from r139024 to r139156 in an attempt to fix Chromium Win builds. + + * DEPS: + +2012-05-25 Mark Pilgrim <pilgrim@chromium.org> + + [Chomium] Move sandboxSupport to Platform.h + https://bugs.webkit.org/show_bug.cgi?id=87518 + + Reviewed by Adam Barth. + + Part of a refactoring series. See tracking bug 82948. + + * WebKit.gyp: + * public/platform/WebKitPlatformSupport.h: + (WebKit): + (WebKitPlatformSupport): + * public/platform/android/WebSandboxSupport.h: + * public/platform/linux/WebFontFamily.h: + * public/platform/linux/WebSandboxSupport.h: + * public/platform/mac/WebSandboxSupport.h: + * public/platform/win/WebSandboxSupport.h: + * src/PlatformSupport.cpp: + (WebCore::PlatformSupport::ensureFontLoaded): + (WebCore::PlatformSupport::loadFont): + (WebCore::PlatformSupport::getFontFamilyForCharacters): + (WebCore::PlatformSupport::getRenderStyleForStrike): + +2012-05-25 Dana Jansens <danakj@chromium.org> + + [chromium] WebLayerTreeViewImpl should not hide methods in CCLayerTreeHost with signatures that match the Client interface + https://bugs.webkit.org/show_bug.cgi?id=87301 + + Reviewed by James Robinson. + + Most methods in the CCLayerTreeHostClient interface have a matching + method signature on CCLayerTreeHost that simply calls the client, if + one exists at all. However, CCLayerTreeHost::updateAnimations() does + important work in addition to calling the client. + + Currently WebLayerTreeViewImpl itself implements the interface for + CCLayerTreeHostClient as well as CCLayerTreeHost, and simply forwards + any call to a method in the client interface to its own client. This + blocks WebViewImpl from calling CCLayerTreeHost::updateAnimations, since + the method is also in the client interface. + + We change WebLayerTreeViewImpl to own a CCLayerTreeHost and a + WebLayerTreeHostClientAdapter. This fixes the shadowing by making + the two interfaces separate, and resolves lifetime issues by + ensuring that the CCLayerTreeHost is destroyed before its client. + + * src/WebLayerTreeView.cpp: + (WebKit::WebLayerTreeView::setSurfaceReady): + (WebKit::WebLayerTreeView::setRootLayer): + (WebKit::WebLayerTreeView::compositorIdentifier): + (WebKit::WebLayerTreeView::setViewportSize): + (WebKit::WebLayerTreeView::viewportSize): + (WebKit::WebLayerTreeView::setBackgroundColor): + (WebKit::WebLayerTreeView::setVisible): + (WebKit::WebLayerTreeView::setPageScaleFactorAndLimits): + (WebKit::WebLayerTreeView::startPageScaleAnimation): + (WebKit::WebLayerTreeView::setNeedsAnimate): + (WebKit::WebLayerTreeView::setNeedsRedraw): + (WebKit::WebLayerTreeView::commitRequested): + (WebKit::WebLayerTreeView::composite): + (WebKit::WebLayerTreeView::updateAnimations): + (WebKit::WebLayerTreeView::compositeAndReadback): + (WebKit::WebLayerTreeView::finishAllRendering): + (WebKit::WebLayerTreeView::context): + (WebKit::WebLayerTreeView::loseCompositorContext): + * src/WebLayerTreeViewImpl.cpp: + (WebKit): + (WebLayerTreeViewClientAdapter): + (WebKit::WebLayerTreeViewClientAdapter::WebLayerTreeViewClientAdapter): + (WebKit::WebLayerTreeViewClientAdapter::~WebLayerTreeViewClientAdapter): + (WebKit::WebLayerTreeViewImpl::create): + (WebKit::WebLayerTreeViewImpl::WebLayerTreeViewImpl): + (WebKit::WebLayerTreeViewImpl::~WebLayerTreeViewImpl): + * src/WebLayerTreeViewImpl.h: + (WebCore): + (WebKit): + (WebKit::WebLayerTreeViewImpl::layerTreeHost): + (WebLayerTreeViewImpl): + +2012-05-25 Kinuko Yasuda <kinuko@chromium.org> + + Unreviewed; rolling chromium deps. + + * DEPS: + +2012-05-25 W. James MacLean <wjmaclean@chromium.org> + + [chromium] LayerChromium should recognise existing layer active animations when the layer is added. + https://bugs.webkit.org/show_bug.cgi?id=87166 + + Reviewed by Adrienne Walker. + + * tests/CCLayerTreeHostTest.cpp: + (WTF::MockLayerTreeHost::didAddAnimationWasCalled): + (MockLayerTreeHost): + (WTF::MockLayerTreeHost::MockLayerTreeHost): + (WTF): + (CCLayerTreeHostTestLayerAddedWithAnimation): + (WTF::CCLayerTreeHostTestLayerAddedWithAnimation::CCLayerTreeHostTestLayerAddedWithAnimation): + (WTF::CCLayerTreeHostTestLayerAddedWithAnimation::beginTest): + (WTF::CCLayerTreeHostTestLayerAddedWithAnimation::afterTest): + 2012-05-17 Andrey Kosyakov <caseq@chromium.org> [chromium] add instrumentation for compositing diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS index 27037d819..e12c78f59 100644 --- a/Source/WebKit/chromium/DEPS +++ b/Source/WebKit/chromium/DEPS @@ -32,7 +32,7 @@ vars = { 'chromium_svn': 'http://src.chromium.org/svn/trunk/src', - 'chromium_rev': '138307' + 'chromium_rev': '139184' } deps = { diff --git a/Source/WebKit/chromium/WebKit.gyp b/Source/WebKit/chromium/WebKit.gyp index b657c2589..dc155c9a6 100644 --- a/Source/WebKit/chromium/WebKit.gyp +++ b/Source/WebKit/chromium/WebKit.gyp @@ -339,9 +339,6 @@ 'public/platform/WebURLRequest.h', 'public/platform/WebURLResponse.h', 'public/platform/WebVector.h', - 'public/platform/android/WebSandboxSupport.h', - 'public/platform/mac/WebSandboxSupport.h', - 'public/platform/win/WebSandboxSupport.h', 'public/win/WebInputEventFactory.h', 'public/win/WebSandboxSupport.h', 'public/win/WebScreenInfoFactory.h', @@ -652,6 +649,7 @@ 'src/WebTextRun.cpp', 'src/WebURLLoadTiming.cpp', 'src/WebScopedUserGesture.cpp', + 'src/WebTextFieldDecoratorClient.cpp', 'src/WebUserMediaRequest.cpp', 'src/WebVideoLayer.cpp', 'src/WebViewImpl.cpp', diff --git a/Source/WebKit/chromium/public/WebInputElement.h b/Source/WebKit/chromium/public/WebInputElement.h index 23e85aa73..913740d66 100644 --- a/Source/WebKit/chromium/public/WebInputElement.h +++ b/Source/WebKit/chromium/public/WebInputElement.h @@ -40,6 +40,7 @@ namespace WebCore { class HTMLInputElement; } namespace WebKit { class WebNodeCollection; + class WebTextFieldDecoratorClient; // Provides readonly access to some properties of a DOM input element node. class WebInputElement : public WebFormControlElement { @@ -103,6 +104,9 @@ namespace WebKit { // Exposes the default value of the maxLength attribute. WEBKIT_EXPORT static int defaultMaxLength(); + // Return the decoration added by the specified decorator if one exists. + WEBKIT_EXPORT WebElement decorationElementFor(WebTextFieldDecoratorClient*); + #if WEBKIT_IMPLEMENTATION WebInputElement(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); WebInputElement& operator=(const WTF::PassRefPtr<WebCore::HTMLInputElement>&); diff --git a/Source/WebKit/chromium/public/WebSettings.h b/Source/WebKit/chromium/public/WebSettings.h index 3089b0bdc..d9016847a 100644 --- a/Source/WebKit/chromium/public/WebSettings.h +++ b/Source/WebKit/chromium/public/WebSettings.h @@ -153,7 +153,7 @@ public: virtual void setDefaultTileSize(WebSize) = 0; virtual void setMaxUntiledLayerSize(WebSize) = 0; virtual void setFixedPositionCreatesStackingContext(bool) = 0; - + virtual void setSyncXHRInDocumentsEnabled(bool) = 0; protected: ~WebSettings() { } diff --git a/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h b/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h index a8d29f93e..772e1216b 100644 --- a/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h +++ b/Source/WebKit/chromium/public/WebTextFieldDecoratorClient.h @@ -33,6 +33,10 @@ #include "platform/WebCString.h" +#if WEBKIT_IMPLEMENTATION +namespace WebCore { class TextFieldDecorator; } +#endif + namespace WebKit { class WebInputElement; @@ -43,6 +47,8 @@ public: // have a decoration icon. This function is called whenever a text field is // created, and should not take much time. virtual bool shouldAddDecorationTo(const WebInputElement&) = 0; + // Returns true if the decoration should be visible when it's created. + virtual bool visibleByDefault() = 0; // Image resource name for the normal state. The image is stretched to // font-size x font-size square. The function must return an existing @@ -63,6 +69,10 @@ public: // state of WebKit objects. virtual void willDetach(const WebInputElement&) = 0; +#if WEBKIT_IMPLEMENTATION + bool isClientFor(WebCore::TextFieldDecorator*); +#endif + virtual ~WebTextFieldDecoratorClient() { } }; diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h index 3e916d373..908152149 100644 --- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h +++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h @@ -53,16 +53,12 @@ class WebIDBKey; // FIXME: Does this belong in platform? class WebIDBKeyPath; // FIXME: Does this belong in platform? class WebMessagePortChannel; // FIXME: Does this belong in platform? class WebPluginListBuilder; // FIXME: Does this belong in platform? -class WebSandboxSupport; class WebSharedWorkerRepository; // FIXME: Does this belong in platform? class WebStorageNamespace; // FIXME: Does this belong in platform? // FIXME: Eventually all these API will need to move to WebKit::Platform. class WebKitPlatformSupport : public Platform { public: - // May return null if sandbox support is not necessary - virtual WebSandboxSupport* sandboxSupport() { return 0; } - // DOM Storage -------------------------------------------------- // Return a LocalStorage namespace that corresponds to the following path. diff --git a/Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h b/Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h index 3f39f195d..ab984e1b5 100644 --- a/Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h +++ b/Source/WebKit/chromium/public/platform/android/WebSandboxSupport.h @@ -28,16 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -namespace WebKit { - -// Empty class, as we need it to compile. -class WebSandboxSupport { -public: -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/android/WebSandboxSupport.h" diff --git a/Source/WebKit/chromium/public/platform/linux/WebFontFamily.h b/Source/WebKit/chromium/public/platform/linux/WebFontFamily.h index 47f037882..a37750bfd 100644 --- a/Source/WebKit/chromium/public/platform/linux/WebFontFamily.h +++ b/Source/WebKit/chromium/public/platform/linux/WebFontFamily.h @@ -28,20 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebFontFamily_h -#define WebFontFamily_h - -#include "../WebCString.h" -#include "../WebCommon.h" - -namespace WebKit { - -struct WebFontFamily { - WebCString name; - bool isBold; - bool isItalic; -}; - -} // namespace WebKit - -#endif // WebFontFamily_h +#include "../../../../../Platform/chromium/public/linux/WebFontFamily.h" diff --git a/Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h b/Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h index 154505662..23f4319df 100644 --- a/Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h +++ b/Source/WebKit/chromium/public/platform/linux/WebSandboxSupport.h @@ -28,38 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -#include "../WebCommon.h" -#include "../WebString.h" -#include "WebFontFamily.h" - -namespace WebKit { - -struct WebFontRenderStyle; - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Fonts --------------------------------------------------------------- - - // Get a font family which contains glyphs for the given Unicode - // code-points. - // characters: a UTF-16 encoded string - // numCharacters: the number of 16-bit words in |characters| - // preferredLocale: preferred locale identifier for the |characters| - // (e.g. "en", "ja", "zh-CN") - // - // Returns a string with the font family on an empty string if the - // request cannot be satisfied. - // Returns a WebFontFamily instance with the font name. The instance has empty font name if the request cannot be satisfied. - // FIXME: Make this to be a pure virtual function after transition. - virtual void getFontFamilyForCharacters(const WebUChar* characters, size_t numCharacters, const char* preferredLocale, WebFontFamily*) = 0; - - virtual void getRenderStyleForStrike(const char* family, int sizeAndStyle, WebFontRenderStyle* style) = 0; -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/linux/WebSandboxSupport.h" diff --git a/Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h b/Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h index 34280c6eb..d01ccf6b6 100644 --- a/Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h +++ b/Source/WebKit/chromium/public/platform/mac/WebSandboxSupport.h @@ -28,34 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -typedef struct CGFont* CGFontRef; - -#ifdef __OBJC__ -@class NSFont; -#else -class NSFont; -#endif - -namespace WebKit { - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Given an input font - |srcFont| [which can't be loaded due to sandbox - // restrictions]. Return a font belonging to an equivalent font file - // that can be used to access the font and a unique identifier corresponding - // to the on-disk font file. - // - // If this function succeeds, the caller assumes ownership of the |out| - // parameter and must call CGFontRelease() to unload it when done. - // - // Returns: true on success, false on error. - virtual bool loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) = 0; -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/mac/WebSandboxSupport.h" diff --git a/Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h b/Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h index 3522c7284..20d957770 100644 --- a/Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h +++ b/Source/WebKit/chromium/public/platform/win/WebSandboxSupport.h @@ -28,25 +28,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebSandboxSupport_h -#define WebSandboxSupport_h - -typedef struct HFONT__* HFONT; - -namespace WebKit { - -// Put methods here that are required due to sandbox restrictions. -class WebSandboxSupport { -public: - // Sometimes a Win32 API call will fail because a font is not loaded, - // and due to sandbox restrictions, the current process may be unable - // to access the filesystem to load the font. So, this call serves as - // a failover to ask the embedder to try some other way to load the - // font (usually by delegating to an empowered process to have it load - // the font). Returns true if the font was successfully loaded. - virtual bool ensureFontLoaded(HFONT) = 0; -}; - -} // namespace WebKit - -#endif +#include "../../../../../Platform/chromium/public/win/WebSandboxSupport.h" diff --git a/Source/WebKit/chromium/src/ChromeClientImpl.cpp b/Source/WebKit/chromium/src/ChromeClientImpl.cpp index bc3061fb8..467d6389d 100644 --- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp +++ b/Source/WebKit/chromium/src/ChromeClientImpl.cpp @@ -1037,7 +1037,7 @@ void ChromeClientImpl::addTextFieldDecorationsTo(HTMLInputElement* input) if (!decorators[i]->willAddDecorationTo(input)) continue; RefPtr<TextFieldDecorationElement> decoration = TextFieldDecorationElement::create(input->document(), decorators[i].get()); - decoration->decorate(input); + decoration->decorate(input, decorators[i]->visibleByDefault()); } } diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp index fb06ccdf4..7cc7f5a6e 100644 --- a/Source/WebKit/chromium/src/PlatformSupport.cpp +++ b/Source/WebKit/chromium/src/PlatformSupport.cpp @@ -317,20 +317,6 @@ bool PlatformSupport::deleteEmptyDirectory(const String& path) return WebKit::Platform::current()->fileUtilities()->deleteEmptyDirectory(path); } -bool PlatformSupport::getFileSize(const String& path, long long& result) -{ - return WebKit::Platform::current()->fileUtilities()->getFileSize(path, result); -} - -bool PlatformSupport::getFileModificationTime(const String& path, time_t& result) -{ - double modificationTime; - if (!WebKit::Platform::current()->fileUtilities()->getFileModificationTime(path, modificationTime)) - return false; - result = static_cast<time_t>(modificationTime); - return true; -} - bool PlatformSupport::getFileMetadata(const String& path, FileMetadata& result) { WebFileInfo webFileInfo; @@ -414,7 +400,7 @@ PassOwnPtr<AsyncFileSystem> PlatformSupport::createAsyncFileSystem() #if OS(WINDOWS) bool PlatformSupport::ensureFontLoaded(HFONT font) { - WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); + WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); // if there is no sandbox, then we can assume the font // was able to be loaded successfully already @@ -425,7 +411,7 @@ bool PlatformSupport::ensureFontLoaded(HFONT font) #if OS(DARWIN) bool PlatformSupport::loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID) { - WebSandboxSupport* ss = webKitPlatformSupport()->sandboxSupport(); + WebSandboxSupport* ss = WebKit::Platform::current()->sandboxSupport(); if (ss) return ss->loadFont(srcFont, out, fontID); @@ -448,8 +434,8 @@ void PlatformSupport::getFontFamilyForCharacters(const UChar* characters, size_t family->isItalic = false; #else WebFontFamily webFamily; - if (webKitPlatformSupport()->sandboxSupport()) - webKitPlatformSupport()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); + if (WebKit::Platform::current()->sandboxSupport()) + WebKit::Platform::current()->sandboxSupport()->getFontFamilyForCharacters(characters, numCharacters, preferredLocale, &webFamily); else WebFontInfo::familyForChars(characters, numCharacters, preferredLocale, &webFamily); family->name = String::fromUTF8(webFamily.name.data(), webFamily.name.length()); @@ -463,8 +449,8 @@ void PlatformSupport::getRenderStyleForStrike(const char* font, int sizeAndStyle #if !OS(ANDROID) WebFontRenderStyle style; - if (webKitPlatformSupport()->sandboxSupport()) - webKitPlatformSupport()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); + if (WebKit::Platform::current()->sandboxSupport()) + WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); else WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); diff --git a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp index e58c022ee..a74aa825a 100644 --- a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp +++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.cpp @@ -56,12 +56,22 @@ TextFieldDecoratorImpl::~TextFieldDecoratorImpl() { } +WebTextFieldDecoratorClient* TextFieldDecoratorImpl::decoratorClient() +{ + return m_client; +} + bool TextFieldDecoratorImpl::willAddDecorationTo(HTMLInputElement* input) { ASSERT(input); return m_client->shouldAddDecorationTo(WebInputElement(input)); } +bool TextFieldDecoratorImpl::visibleByDefault() +{ + return m_client->visibleByDefault(); +} + CachedImage* TextFieldDecoratorImpl::imageForNormalState() { if (!m_cachedImageForNormalState) { diff --git a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h index 667475282..8f52069ba 100644 --- a/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h +++ b/Source/WebKit/chromium/src/TextFieldDecoratorImpl.h @@ -43,8 +43,11 @@ public: static PassOwnPtr<TextFieldDecoratorImpl> create(WebTextFieldDecoratorClient*); virtual ~TextFieldDecoratorImpl(); + WebTextFieldDecoratorClient* decoratorClient(); + private: virtual bool willAddDecorationTo(WebCore::HTMLInputElement*) OVERRIDE; + virtual bool visibleByDefault() OVERRIDE; virtual WebCore::CachedImage* imageForNormalState() OVERRIDE; virtual WebCore::CachedImage* imageForDisabledState() OVERRIDE; virtual WebCore::CachedImage* imageForReadonlyState() OVERRIDE; diff --git a/Source/WebKit/chromium/src/WebInputElement.cpp b/Source/WebKit/chromium/src/WebInputElement.cpp index adae9dac8..c58e90704 100644 --- a/Source/WebKit/chromium/src/WebInputElement.cpp +++ b/Source/WebKit/chromium/src/WebInputElement.cpp @@ -31,11 +31,16 @@ #include "config.h" #include "WebInputElement.h" +#include "ElementShadow.h" #include "HTMLDataListElement.h" #include "HTMLInputElement.h" #include "HTMLNames.h" +#include "ShadowRoot.h" #include "TextControlInnerElements.h" +#include "TextFieldDecorationElement.h" +#include "TextFieldDecoratorImpl.h" #include "WebNodeCollection.h" +#include "WebTextFieldDecoratorClient.h" #include "platform/WebString.h" #include <wtf/PassRefPtr.h> @@ -221,6 +226,18 @@ int WebInputElement::defaultMaxLength() return HTMLInputElement::maximumLength; } +WebElement WebInputElement::decorationElementFor(WebTextFieldDecoratorClient* decoratorClient) +{ + ShadowRoot* shadowRoot = unwrap<HTMLInputElement>()->youngestShadowRoot(); + while (shadowRoot) { + TextFieldDecorationElement* decoration = TextFieldDecorationElement::fromShadowRoot(shadowRoot); + if (decoration && decoratorClient->isClientFor(decoration->textFieldDecorator())) + return WebElement(decoration); + shadowRoot = shadowRoot->olderShadowRoot(); + } + return WebElement(); +} + WebInputElement::WebInputElement(const PassRefPtr<HTMLInputElement>& elem) : WebFormControlElement(elem) { diff --git a/Source/WebKit/chromium/src/WebLayerTreeView.cpp b/Source/WebKit/chromium/src/WebLayerTreeView.cpp index a4d7d918a..65a2a63b1 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeView.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeView.cpp @@ -75,98 +75,98 @@ bool WebLayerTreeView::initialize(WebLayerTreeViewClient* client, const WebLayer void WebLayerTreeView::setSurfaceReady() { - m_private->setSurfaceReady(); + m_private->layerTreeHost()->setSurfaceReady(); } void WebLayerTreeView::setRootLayer(WebLayer *root) { if (root) - m_private->setRootLayer(*root); + m_private->layerTreeHost()->setRootLayer(*root); else - m_private->setRootLayer(PassRefPtr<LayerChromium>()); + m_private->layerTreeHost()->setRootLayer(PassRefPtr<LayerChromium>()); } int WebLayerTreeView::compositorIdentifier() { - return m_private->compositorIdentifier(); + return m_private->layerTreeHost()->compositorIdentifier(); } void WebLayerTreeView::setViewportSize(const WebSize& viewportSize) { - m_private->setViewportSize(viewportSize); + m_private->layerTreeHost()->setViewportSize(viewportSize); } WebSize WebLayerTreeView::viewportSize() const { - return WebSize(m_private->viewportSize()); + return WebSize(m_private->layerTreeHost()->viewportSize()); } void WebLayerTreeView::setBackgroundColor(WebColor color) { - m_private->setBackgroundColor(color); + m_private->layerTreeHost()->setBackgroundColor(color); } void WebLayerTreeView::setVisible(bool visible) { - m_private->setVisible(visible); + m_private->layerTreeHost()->setVisible(visible); } void WebLayerTreeView::setPageScaleFactorAndLimits(float pageScaleFactor, float minimum, float maximum) { - m_private->setPageScaleFactorAndLimits(pageScaleFactor, minimum, maximum); + m_private->layerTreeHost()->setPageScaleFactorAndLimits(pageScaleFactor, minimum, maximum); } void WebLayerTreeView::startPageScaleAnimation(const WebPoint& scroll, bool useAnchor, float newPageScale, double durationSec) { - m_private->startPageScaleAnimation(IntSize(scroll.x, scroll.y), useAnchor, newPageScale, durationSec); + m_private->layerTreeHost()->startPageScaleAnimation(IntSize(scroll.x, scroll.y), useAnchor, newPageScale, durationSec); } void WebLayerTreeView::setNeedsAnimate() { - m_private->setNeedsAnimate(); + m_private->layerTreeHost()->setNeedsAnimate(); } void WebLayerTreeView::setNeedsRedraw() { - m_private->setNeedsRedraw(); + m_private->layerTreeHost()->setNeedsRedraw(); } bool WebLayerTreeView::commitRequested() const { - return m_private->commitRequested(); + return m_private->layerTreeHost()->commitRequested(); } void WebLayerTreeView::composite() { if (CCProxy::hasImplThread()) - m_private->setNeedsCommit(); + m_private->layerTreeHost()->setNeedsCommit(); else - m_private->composite(); + m_private->layerTreeHost()->composite(); } void WebLayerTreeView::updateAnimations(double frameBeginTime) { - m_private->updateAnimations(frameBeginTime); + m_private->layerTreeHost()->updateAnimations(frameBeginTime); } bool WebLayerTreeView::compositeAndReadback(void *pixels, const WebRect& rect) { - return m_private->compositeAndReadback(pixels, rect); + return m_private->layerTreeHost()->compositeAndReadback(pixels, rect); } void WebLayerTreeView::finishAllRendering() { - m_private->finishAllRendering(); + m_private->layerTreeHost()->finishAllRendering(); } WebGraphicsContext3D* WebLayerTreeView::context() { - return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_private->context()); + return GraphicsContext3DPrivate::extractWebGraphicsContext3D(m_private->layerTreeHost()->context()); } void WebLayerTreeView::loseCompositorContext(int numTimes) { - m_private->loseContext(numTimes); + m_private->layerTreeHost()->loseContext(numTimes); } } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp index 1c0a0e816..45a99603c 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.cpp @@ -29,6 +29,7 @@ #include "CCThreadImpl.h" #include "GraphicsContext3DPrivate.h" #include "LayerChromium.h" +#include "cc/CCLayerTreeHost.h" #include "cc/CCThreadProxy.h" #include "platform/WebGraphicsContext3D.h" #include "platform/WebLayer.h" @@ -41,18 +42,48 @@ using namespace WebCore; namespace WebKit { +// Converts messages from CCLayerTreeHostClient to WebLayerTreeViewClient. +class WebLayerTreeViewClientAdapter : public WebCore::CCLayerTreeHostClient { +public: + WebLayerTreeViewClientAdapter(WebLayerTreeViewClient* client) : m_client(client) { } + virtual ~WebLayerTreeViewClientAdapter() { } + + // CCLayerTreeHostClient implementation + virtual void willBeginFrame() OVERRIDE { m_client->willBeginFrame(); } + virtual void didBeginFrame() OVERRIDE { m_client->didBeginFrame(); } + virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE { m_client->updateAnimations(monotonicFrameBeginTime); } + virtual void layout() OVERRIDE { m_client->layout(); } + virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE { m_client->applyScrollAndScale(scrollDelta, pageScale); } + virtual PassRefPtr<WebCore::GraphicsContext3D> createContext() OVERRIDE + { + OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D()); + if (!webContext) + return 0; + return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow, false /* preserveDrawingBuffer */ ); + } + virtual void didRecreateContext(bool success) OVERRIDE { m_client->didRebindGraphicsContext(success); } + virtual void willCommit() OVERRIDE { m_client->willCommit(); } + virtual void didCommit() OVERRIDE { m_client->didCommit(); } + virtual void didCommitAndDrawFrame() OVERRIDE { m_client->didCommitAndDrawFrame(); } + virtual void didCompleteSwapBuffers() OVERRIDE { m_client->didCompleteSwapBuffers(); } + virtual void scheduleComposite() OVERRIDE { m_client->scheduleComposite(); } + +private: + WebLayerTreeViewClient* m_client; +}; + PassOwnPtr<WebLayerTreeViewImpl> WebLayerTreeViewImpl::create(WebLayerTreeViewClient* client, const WebLayer& root, const WebLayerTreeView::Settings& settings) { - OwnPtr<WebLayerTreeViewImpl> host = adoptPtr(new WebLayerTreeViewImpl(client, settings)); - if (!host->initialize()) + OwnPtr<WebLayerTreeViewImpl> impl = adoptPtr(new WebLayerTreeViewImpl(client, settings)); + if (!impl->layerTreeHost()) return nullptr; - host->setRootLayer(root); - return host.release(); + impl->layerTreeHost()->setRootLayer(root); + return impl.release(); } WebLayerTreeViewImpl::WebLayerTreeViewImpl(WebLayerTreeViewClient* client, const WebLayerTreeView::Settings& settings) - : CCLayerTreeHost(this, settings) - , m_client(client) + : m_clientAdapter(adoptPtr(new WebLayerTreeViewClientAdapter(client))) + , m_layerTreeHost(CCLayerTreeHost::create(m_clientAdapter.get(), settings)) { } @@ -60,68 +91,4 @@ WebLayerTreeViewImpl::~WebLayerTreeViewImpl() { } -void WebLayerTreeViewImpl::willBeginFrame() -{ - m_client->willBeginFrame(); -} - -void WebLayerTreeViewImpl::didBeginFrame() -{ - m_client->didBeginFrame(); -} - -void WebLayerTreeViewImpl::updateAnimations(double monotonicFrameBeginTime) -{ - m_client->updateAnimations(monotonicFrameBeginTime); -} - -void WebLayerTreeViewImpl::layout() -{ - m_client->layout(); -} - -void WebLayerTreeViewImpl::applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) -{ - m_client->applyScrollAndScale(WebSize(scrollDelta), pageScale); -} - -PassRefPtr<GraphicsContext3D> WebLayerTreeViewImpl::createContext() -{ - OwnPtr<WebGraphicsContext3D> webContext = adoptPtr(m_client->createContext3D()); - if (!webContext) - return 0; - - return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), GraphicsContext3D::RenderDirectlyToHostWindow, false /* preserveDrawingBuffer */ ); -} - -void WebLayerTreeViewImpl::didRecreateContext(bool success) -{ - m_client->didRebindGraphicsContext(success); -} - -void WebLayerTreeViewImpl::willCommit() -{ - m_client->willCommit(); -} - -void WebLayerTreeViewImpl::didCommit() -{ - m_client->didCommit(); -} - -void WebLayerTreeViewImpl::didCommitAndDrawFrame() -{ - m_client->didCommitAndDrawFrame(); -} - -void WebLayerTreeViewImpl::didCompleteSwapBuffers() -{ - m_client->didCompleteSwapBuffers(); -} - -void WebLayerTreeViewImpl::scheduleComposite() -{ - m_client->scheduleComposite(); -} - } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h index f854b7e60..1184342e8 100644 --- a/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h +++ b/Source/WebKit/chromium/src/WebLayerTreeViewImpl.h @@ -27,37 +27,30 @@ #define WebLayerTreeViewImpl_h #include "platform/WebLayerTreeView.h" -#include "cc/CCLayerTreeHost.h" +#include <wtf/OwnPtr.h> #include <wtf/PassOwnPtr.h> +namespace WebCore { +class CCLayerTreeHost; +} + namespace WebKit { class WebLayer; class WebLayerTreeViewClient; +class WebLayerTreeViewClientAdapter; -class WebLayerTreeViewImpl : public WebCore::CCLayerTreeHost, public WebCore::CCLayerTreeHostClient { +class WebLayerTreeViewImpl { public: static PassOwnPtr<WebLayerTreeViewImpl> create(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&); virtual ~WebLayerTreeViewImpl(); - virtual void willBeginFrame() OVERRIDE; - virtual void didBeginFrame() OVERRIDE; - virtual void updateAnimations(double monotonicFrameBeginTime) OVERRIDE; - virtual void layout() OVERRIDE; - virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float pageScale) OVERRIDE; - virtual PassRefPtr<WebCore::GraphicsContext3D> createContext() OVERRIDE; - virtual void didRecreateContext(bool success) OVERRIDE; - virtual void willCommit() OVERRIDE; - virtual void didCommit() OVERRIDE; - virtual void didCommitAndDrawFrame() OVERRIDE; - virtual void didCompleteSwapBuffers() OVERRIDE; - - // Only used in the single threaded path. - virtual void scheduleComposite() OVERRIDE; + WebCore::CCLayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); } private: WebLayerTreeViewImpl(WebLayerTreeViewClient*, const WebLayerTreeView::Settings&); - WebLayerTreeViewClient* m_client; + OwnPtr<WebLayerTreeViewClientAdapter> m_clientAdapter; + OwnPtr<WebCore::CCLayerTreeHost> m_layerTreeHost; }; } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.cpp b/Source/WebKit/chromium/src/WebSettingsImpl.cpp index 78770a95c..ffb8c9bfe 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.cpp +++ b/Source/WebKit/chromium/src/WebSettingsImpl.cpp @@ -611,4 +611,10 @@ void WebSettingsImpl::setMaxUntiledLayerSize(WebSize size) m_maxUntiledLayerSize = size; } +void WebSettingsImpl::setSyncXHRInDocumentsEnabled(bool enabled) +{ + m_settings->setSyncXHRInDocumentsEnabled(enabled); +} + + } // namespace WebKit diff --git a/Source/WebKit/chromium/src/WebSettingsImpl.h b/Source/WebKit/chromium/src/WebSettingsImpl.h index 1c3b0e7e2..033784039 100644 --- a/Source/WebKit/chromium/src/WebSettingsImpl.h +++ b/Source/WebKit/chromium/src/WebSettingsImpl.h @@ -147,6 +147,7 @@ public: virtual void setViewportEnabled(bool); virtual void setMediaPlaybackRequiresUserGesture(bool); virtual bool viewportEnabled() const { return m_viewportEnabled; } + virtual void setSyncXHRInDocumentsEnabled(bool); bool showFPSCounter() const { return m_showFPSCounter; } bool showPlatformLayerTree() const { return m_showPlatformLayerTree; } diff --git a/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp b/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp new file mode 100644 index 000000000..4d5b16174 --- /dev/null +++ b/Source/WebKit/chromium/src/WebTextFieldDecoratorClient.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebTextFieldDecoratorClient.h" + +#include "TextFieldDecorationElement.h" +#include "TextFieldDecoratorImpl.h" + +using namespace WebCore; + +namespace WebKit { + +bool WebTextFieldDecoratorClient::isClientFor(TextFieldDecorator* decorator) +{ + return static_cast<TextFieldDecoratorImpl*>(decorator)->decoratorClient() == this; +} + +} // namespace WebKit diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp index 9e28a5b82..1275ec854 100644 --- a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp +++ b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp @@ -26,6 +26,7 @@ #include "cc/CCLayerTreeHost.h" +#include "AnimationIdVendor.h" #include "CCAnimationTestCommon.h" #include "CCOcclusionTrackerTestCommon.h" #include "CCTiledLayerTestCommon.h" @@ -44,6 +45,7 @@ #include "cc/CCScopedThreadProxy.h" #include "cc/CCTextureUpdater.h" #include "cc/CCThreadTask.h" +#include "cc/CCTimingFunction.h" #include "platform/WebThread.h" #include <gmock/gmock.h> #include <gtest/gtest.h> @@ -181,14 +183,27 @@ public: return MockLayerTreeHostImpl::create(m_testHooks, copySettings, client); } + virtual void didAddAnimation() OVERRIDE + { + m_didAddAnimationWasCalled = true; + CCLayerTreeHost::didAddAnimation(); + } + + bool didAddAnimationWasCalled() + { + return m_didAddAnimationWasCalled; + } + private: MockLayerTreeHost(TestHooks* testHooks, CCLayerTreeHostClient* client, const CCSettings& settings) : CCLayerTreeHost(client, settings) , m_testHooks(testHooks) + , m_didAddAnimationWasCalled(false) { } TestHooks* m_testHooks; + bool m_didAddAnimationWasCalled; }; class CompositorFakeWebGraphicsContext3DWithTextureTracking : public CompositorFakeWebGraphicsContext3D { @@ -2814,4 +2829,37 @@ private: SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestFinishAllRendering) +// Layers added to tree with existing active animations should have the animation +// correctly recognized. +class CCLayerTreeHostTestLayerAddedWithAnimation : public CCLayerTreeHostTest { +public: + CCLayerTreeHostTestLayerAddedWithAnimation() { } + + virtual void beginTest() + { + EXPECT_FALSE(static_cast<MockLayerTreeHost*>(layerTreeHost())->didAddAnimationWasCalled()); + + RefPtr<LayerChromium> layer = LayerChromium::create(); + layer->setLayerAnimationDelegate(&m_animationDelegate); + + // Any valid CCAnimationCurve will do here. + OwnPtr<CCAnimationCurve> curve(CCEaseTimingFunction::create()); + OwnPtr<CCActiveAnimation> animation(CCActiveAnimation::create(curve.release(), AnimationIdVendor::getNextAnimationId(), AnimationIdVendor::getNextGroupId(), CCActiveAnimation::Opacity)); + layer->layerAnimationController()->add(animation.release()); + + // We add the animation *before* attaching the layer to the tree. + m_layerTreeHost->rootLayer()->addChild(layer); + EXPECT_TRUE(static_cast<MockLayerTreeHost*>(layerTreeHost())->didAddAnimationWasCalled()); + + endTest(); + } + + virtual void afterTest() { } + +private: + ::TestHooks m_animationDelegate; +}; + +SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestLayerAddedWithAnimation) + } // namespace diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog index 406c4c3dc..71935613b 100644 --- a/Source/WebKit/gtk/ChangeLog +++ b/Source/WebKit/gtk/ChangeLog @@ -1 +1,17 @@ +2012-05-25 Lu Guanqun <guanqun.lu@intel.com> + + [GTK] fix compilation for webkitwebview.cpp + https://bugs.webkit.org/show_bug.cgi?id=87473 + + Reviewed by Martin Robinson. + + When ACCELERATED_COMPOSITING and TEXTURE_MAPPER_GL is not set, + the local variable 'priv' won't be used. Therefore the following warning: + + ../../../Source/WebKit/gtk/webkit/webkitwebview.cpp: In function ‘void webkit_web_view_realize(GtkWidget*)’: + ../../../Source/WebKit/gtk/webkit/webkitwebview.cpp:971:27: warning: unused variable ‘priv’ [-Wunused-variable] + + * webkit/webkitwebview.cpp: + (webkit_web_view_realize): + == Rolled over to ChangeLog-2012-05-22 == diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp index 300ea8c99..1a54ea877 100644 --- a/Source/WebKit/gtk/webkit/webkitwebview.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp @@ -968,8 +968,6 @@ static gboolean webkit_web_view_focus_out_event(GtkWidget* widget, GdkEventFocus static void webkit_web_view_realize(GtkWidget* widget) { - WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW(widget)->priv; - gtk_widget_set_realized(widget, TRUE); GtkAllocation allocation; @@ -1010,6 +1008,7 @@ static void webkit_web_view_realize(GtkWidget* widget) GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask); #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) + WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW(widget)->priv; priv->hasNativeWindow = gdk_window_ensure_native(window); #endif gtk_widget_set_window(widget, window); diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 1d020e11c..bdf204b14 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -1011,9 +1011,9 @@ void QWebElement::appendInside(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); - ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception); + m_element->appendChild(fragment, exception); } @@ -1056,9 +1056,8 @@ void QWebElement::prependInside(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); - ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception); if (m_element->hasChildNodes()) m_element->insertBefore(fragment, m_element->firstChild(), exception); @@ -1108,9 +1107,9 @@ void QWebElement::prependOutside(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); - ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception); + parent->insertBefore(fragment, m_element, exception); } @@ -1158,9 +1157,9 @@ void QWebElement::appendOutside(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); - ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception); + if (!m_element->nextSibling()) parent->appendChild(fragment, exception); else @@ -1304,7 +1303,8 @@ void QWebElement::encloseContentsWith(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); + ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception); if (!fragment || !fragment->firstChild()) return; @@ -1314,8 +1314,6 @@ void QWebElement::encloseContentsWith(const QString &markup) if (!insertionPoint) return; - ExceptionCode exception = 0; - // reparent children for (RefPtr<Node> child = m_element->firstChild(); child;) { RefPtr<Node> next = child->nextSibling(); @@ -1379,7 +1377,8 @@ void QWebElement::encloseWith(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); + ExceptionCode exception = 0; + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception); if (!fragment || !fragment->firstChild()) return; @@ -1395,7 +1394,6 @@ void QWebElement::encloseWith(const QString &markup) // we no longer have access to the nodes it contained. Node* siblingNode = m_element->nextSibling(); - ExceptionCode exception = 0; insertionPoint->appendChild(m_element, exception); if (!siblingNode) diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index 9e84eeeab..d9b00773b 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -2143,7 +2143,7 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr // double the &'s because single & will underline the following character // (Accelerator mnemonics) QString escMsg(msg); - escMsg.replace(QChar::fromAscii('&'), QString::fromAscii("&&")); + escMsg.replace(QChar::fromLatin1('&'), QLatin1String("&&")); dlg.setLabelText(escMsg); dlg.setTextEchoMode(QLineEdit::Normal); diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index e823f86e5..bf8496bbb 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,27 @@ +2012-05-27 Simon Hausmann <simon.hausmann@nokia.com> + + [Qt] Trivial unreviewed build fix with newer Qt + + * Api/qwebpage.cpp: + (QWebPage::javaScriptPrompt): Don't use deprecated QString/QChar functions. + +2012-05-24 Ryosuke Niwa <rniwa@webkit.org> + + createContextualFragment and insertAdjacentHTML should throw syntax error + https://bugs.webkit.org/show_bug.cgi?id=87454 + + Reviewed by Darin Adler. + + Pass an ExceptionCode to createContextualFragment. + + * Api/qwebelement.cpp: + (QWebElement::appendInside): + (QWebElement::prependInside): + (QWebElement::prependOutside): + (QWebElement::appendOutside): + (QWebElement::encloseContentsWith): + (QWebElement::encloseWith): + 2012-05-25 Csaba Osztrogonác <ossy@webkit.org> [Qt] Buildfix for newer Qt5 diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog index 471fef3de..8e6d35209 100644 --- a/Source/WebKit/win/ChangeLog +++ b/Source/WebKit/win/ChangeLog @@ -1,3 +1,20 @@ +2012-05-25 Lynn Neir <lynn.neir@skype.net> + + Added methods needed to implement backend for DRT's TextInputController on windows, https://bugs.webkit.org/show_bug.cgi?id=32021 + + Reviewed by Eric Seidel. + + * Interfaces/IWebViewPrivate.idl: + * WebView.cpp: + (WebView::setCompositionForTesting): + (WebView::hasCompositionForTesting): + (WebView::confirmCompositionForTesting): + (WebView::compositionRangeForTesting): + (WebView::firstRectForCharacterRangeForTesting): + (WebView::selectedRangeForTesting): + * WebView.h: + (WebView): + 2012-05-21 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Move setEditingBehavior() from layoutTestController to window.internals diff --git a/Source/WebKit/win/Interfaces/IWebViewPrivate.idl b/Source/WebKit/win/Interfaces/IWebViewPrivate.idl index b4619494f..6b51cb3e5 100644 --- a/Source/WebKit/win/Interfaces/IWebViewPrivate.idl +++ b/Source/WebKit/win/Interfaces/IWebViewPrivate.idl @@ -277,4 +277,17 @@ interface IWebViewPrivate : IUnknown HRESULT registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing([in] BSTR scheme); HRESULT registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing([in] BSTR scheme); + // Used by TextInputController in DumpRenderTree + + HRESULT setCompositionForTesting([in] BSTR composition,[in] UINT from,[in] UINT length); + + HRESULT hasCompositionForTesting([out, retval] BOOL* result); + + HRESULT confirmCompositionForTesting([in] BSTR composition); + + HRESULT compositionRangeForTesting([out] UINT* startPosition, [out] UINT* length); + + HRESULT firstRectForCharacterRangeForTesting([in] UINT location, [in] UINT length, [out, retval] RECT* resultRect); + + HRESULT selectedRangeForTesting([out] UINT* location, [out] UINT* length); } diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp index faebc7533..cc2df329b 100644 --- a/Source/WebKit/win/WebView.cpp +++ b/Source/WebKit/win/WebView.cpp @@ -33,6 +33,7 @@ #include "FullscreenVideoController.h" #include "MarshallingHelpers.h" #include "SoftLinking.h" +#include "TextIterator.h" #include "WebBackForwardList.h" #include "WebChromeClient.h" #include "WebContextMenuClient.h" @@ -6883,3 +6884,140 @@ void WebView::fullScreenClientForceRepaint() } #endif +// Used by TextInputController in DumpRenderTree + +HRESULT STDMETHODCALLTYPE WebView::setCompositionForTesting( + /* [in] */ BSTR composition, + /* [in] */ UINT from, + /* [in] */ UINT length) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame || !frame->editor()->canEdit()) + return E_FAIL; + + String compositionStr(composition, SysStringLen(composition)); + + Vector<CompositionUnderline> underlines; + underlines.append(CompositionUnderline(0, compositionStr.length(), Color(Color::black), false)); + frame->editor()->setComposition(compositionStr, underlines, from, from + length); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::hasCompositionForTesting(/* [out, retval] */ BOOL* result) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame) + return E_FAIL; + + *result = frame && frame->editor()->hasComposition(); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::confirmCompositionForTesting(/* [in] */ BSTR composition) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame || !frame->editor()->canEdit()) + return E_FAIL; + + String compositionStr(composition, SysStringLen(composition)); + + if (compositionStr.isNull()) + frame->editor()->confirmComposition(); + + frame->editor()->confirmComposition(compositionStr); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::compositionRangeForTesting(/* [out] */ UINT* startPosition, /* [out] */ UINT* length) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame || !frame->editor()->canEdit()) + return E_FAIL; + + RefPtr<Range> range = frame->editor()->compositionRange(); + + if (!range) + return E_FAIL; + + *startPosition = range->startOffset(); + *length = range->startOffset() + range->endOffset(); + + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE WebView::firstRectForCharacterRangeForTesting( + /* [in] */ UINT location, + /* [in] */ UINT length, + /* [out, retval] */ RECT* resultRect) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame) + return E_FAIL; + + IntRect resultIntRect; + resultIntRect.setLocation(IntPoint(0, 0)); + resultIntRect.setSize(IntSize(0, 0)); + + if (location > INT_MAX) + return E_FAIL; + if (length > INT_MAX || location + length > INT_MAX) + length = INT_MAX - location; + + RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length); + + if (!range) + return E_FAIL; + + ASSERT(range->startContainer()); + ASSERT(range->endContainer()); + + IntRect rect = frame->editor()->firstRectForRange(range.get()); + resultIntRect = frame->view()->contentsToWindow(rect); + + resultRect->left = resultIntRect.x(); + resultRect->top = resultIntRect.y(); + resultRect->right = resultIntRect.x() + resultIntRect.width(); + resultRect->bottom = resultIntRect.y() + resultIntRect.height(); + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE WebView::selectedRangeForTesting(/* [out] */ UINT* location, /* [out] */ UINT* length) +{ + if (!m_page) + return E_FAIL; + + Frame* frame = m_page->focusController()->focusedOrMainFrame(); + if (!frame) + return E_FAIL; + + RefPtr<Range> range = frame->editor()->selectedRange(); + + size_t locationSize; + size_t lengthSize; + if (range && TextIterator::getLocationAndLengthFromRange(frame->selection()->rootEditableElementOrDocumentElement(), range.get(), locationSize, lengthSize)) { + *location = static_cast<UINT>(locationSize); + *length = static_cast<UINT>(lengthSize); + } + + return S_OK; +} diff --git a/Source/WebKit/win/WebView.h b/Source/WebKit/win/WebView.h index 3a0f95aff..821c7e9f4 100644 --- a/Source/WebKit/win/WebView.h +++ b/Source/WebKit/win/WebView.h @@ -962,6 +962,25 @@ public: WebCore::Element* fullScreenElement() const { return m_fullScreenElement.get(); } #endif + // Used by TextInputController in DumpRenderTree + + HRESULT STDMETHODCALLTYPE setCompositionForTesting( + /* [in] */ BSTR composition, + /* [in] */ UINT from, + /* [in] */ UINT length); + + HRESULT STDMETHODCALLTYPE hasCompositionForTesting(/* [out, retval] */ BOOL* result); + + HRESULT STDMETHODCALLTYPE confirmCompositionForTesting(/* [in] */ BSTR composition); + + HRESULT STDMETHODCALLTYPE compositionRangeForTesting(/* [out] */ UINT* startPosition, /* [out] */ UINT* length); + + HRESULT STDMETHODCALLTYPE firstRectForCharacterRangeForTesting( + /* [in] */ UINT location, + /* [in] */ UINT length, + /* [out, retval] */ RECT* resultRect); + + HRESULT STDMETHODCALLTYPE selectedRangeForTesting(/* [out] */ UINT* location, /* [out] */ UINT* length); private: void setZoomMultiplier(float multiplier, bool isTextOnly); float zoomMultiplier(bool isTextOnly); |
