Changeset 133094 in webkit


Ignore:
Timestamp:
Oct 31, 2012 4:27:04 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Adding window.external to our port
https://bugs.webkit.org/show_bug.cgi?id=100868

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-31
Reviewed by Rob Buis.

Source/WebKit:

Adding ExternalExtension classes to the BB cmake file.

  • PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

Attaching the window.external interface to the frame when
it loads up.

When called, the external interface methods call stubs declared
in ChromeClientBlackBerry. The method passes in the url of the search
provider and the url of the frame. Cross-site check has to be done in the
implementation PR.

  • WebCoreSupport/ChromeClientBlackBerry.cpp:

(WebCore::ChromeClientBlackBerry::addSearchProvider):
(WebCore):
(WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):

  • WebCoreSupport/ChromeClientBlackBerry.h:

(ChromeClientBlackBerry):

  • WebCoreSupport/ExternalExtension.cpp: Added.

(addSearchProviderMethod):
(IsSearchProviderInstalledMethod):
(externalExtensionInitialize):
(externalExtensionFinalize):

  • WebCoreSupport/ExternalExtension.h: Added.

(WebCore):

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):

LayoutTests:

Adding BlackBerry platform specific DRT tests for window.external interface.

  • platform/blackberry/external/search-provider/search-provider-installed-expected.txt: Added.
  • platform/blackberry/external/search-provider/search-provider-installed.html: Added.
Location:
trunk
Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r133093 r133094  
     12012-10-31  Otto Derek Cheung  <otcheung@rim.com>
     2
     3        [BlackBerry] Adding window.external to our port
     4        https://bugs.webkit.org/show_bug.cgi?id=100868
     5
     6        Reviewed by Rob Buis.
     7
     8        Adding BlackBerry platform specific DRT tests for window.external interface.
     9
     10        * platform/blackberry/external/search-provider/search-provider-installed-expected.txt: Added.
     11        * platform/blackberry/external/search-provider/search-provider-installed.html: Added.
     12
    1132012-10-31  Stephen White  <senorblanco@chromium.org>
    214
  • trunk/Source/WebKit/ChangeLog

    r133000 r133094  
     12012-10-31  Otto Derek Cheung  <otcheung@rim.com>
     2
     3        [BlackBerry] Adding window.external to our port
     4        https://bugs.webkit.org/show_bug.cgi?id=100868
     5
     6        Reviewed by Rob Buis.
     7
     8        Adding ExternalExtension classes to the BB cmake file.
     9
     10        * PlatformBlackBerry.cmake:
     11
    1122012-10-31  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
    213
  • trunk/Source/WebKit/PlatformBlackBerry.cmake

    r132978 r133094  
    108108    blackberry/WebCoreSupport/DragClientBlackBerry.cpp
    109109    blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
     110    blackberry/WebCoreSupport/ExternalExtension.cpp
    110111    blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
    111112    blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
  • trunk/Source/WebKit/blackberry/ChangeLog

    r132978 r133094  
     12012-10-31  Otto Derek Cheung  <otcheung@rim.com>
     2
     3        [BlackBerry] Adding window.external to our port
     4        https://bugs.webkit.org/show_bug.cgi?id=100868
     5
     6        Reviewed by Rob Buis.
     7
     8        Attaching the window.external interface to the frame when
     9        it loads up.
     10
     11        When called, the external interface methods call stubs declared
     12        in ChromeClientBlackBerry. The method passes in the url of the search
     13        provider and the url of the frame. Cross-site check has to be done in the
     14        implementation PR.
     15
     16        * WebCoreSupport/ChromeClientBlackBerry.cpp:
     17        (WebCore::ChromeClientBlackBerry::addSearchProvider):
     18        (WebCore):
     19        (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
     20        * WebCoreSupport/ChromeClientBlackBerry.h:
     21        (ChromeClientBlackBerry):
     22        * WebCoreSupport/ExternalExtension.cpp: Added.
     23        (addSearchProviderMethod):
     24        (IsSearchProviderInstalledMethod):
     25        (externalExtensionInitialize):
     26        (externalExtensionFinalize):
     27        * WebCoreSupport/ExternalExtension.h: Added.
     28        (WebCore):
     29        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     30        (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
     31
    1322012-10-30  Peter Wang  <peter.wang@torchmobile.com.cn>
    233
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp

    r132391 r133094  
    837837#endif
    838838
     839void ChromeClientBlackBerry::addSearchProvider(const BlackBerry::Platform::String& originURL, const BlackBerry::Platform::String& newURL)
     840{
     841    notImplemented();
     842}
     843
     844int ChromeClientBlackBerry::isSearchProviderInstalled(const BlackBerry::Platform::String& originURL, const BlackBerry::Platform::String& newURL)
     845{
     846//    Returns a value based on comparing url to the URLs of the results pages of the installed search engines.
     847//    0 - None of the installed search engines match url.
     848//    1 - One or more installed search engines match url, but none are the user's default search engine.
     849//    2 - The user's default search engine matches url.
     850    return 0;
     851}
     852
    839853} // namespace WebCore
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h

    r131316 r133094  
    161161#endif
    162162
     163    virtual void addSearchProvider(const BlackBerry::Platform::String&, const BlackBerry::Platform::String&);
     164    virtual int isSearchProviderInstalled(const BlackBerry::Platform::String&, const BlackBerry::Platform::String&);
     165
    163166    BlackBerry::WebKit::WebPagePrivate* webPagePrivate() const { return m_webPagePrivate; }
    164167
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r132054 r133094  
    3434#include "CredentialTransformData.h"
    3535#include "DumpRenderTreeClient.h"
     36#include "ExternalExtension.h"
    3637#include "FrameNetworkingContextBlackBerry.h"
    3738#include "FrameView.h"
     
    907908        attachExtensionObjectToFrame(m_frame, m_webPagePrivate->m_client);
    908909
     910    attachExternalExtensionObjectToFrame(m_frame);
     911
    909912    m_webPagePrivate->m_client->notifyWindowObjectCleared();
    910913
Note: See TracChangeset for help on using the changeset viewer.