Changeset 118785 in webkit


Ignore:
Timestamp:
May 29, 2012 9:06:16 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] WebKit-side implementation of SelectionOverlay
https://bugs.webkit.org/show_bug.cgi?id=87605

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
Reviewed by Rob Buis.

Source/WebKit:

Add SelectionOverlay to the build system.

PR #160263

  • PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

Leverage the new WebOverlay API to move SelectionOverlay to the WebKit
library, so we always draw selection regardless of which embedder is
integrating WebKit.

PR #160263

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPage::selectionOverlay):
(WebKit):

  • Api/WebPage.h:

(WebKit):

  • Api/WebPage_p.h:

(WebPagePrivate):

  • Api/WebSelectionOverlay.h: Added.

(WebKit):

  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):

  • WebKitSupport/SelectionOverlay.cpp: Added.

(WebKit):
(BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
(BlackBerry::WebKit::SelectionOverlay::~SelectionOverlay):
(BlackBerry::WebKit::SelectionOverlay::draw):
(BlackBerry::WebKit::SelectionOverlay::hide):
(BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
(BlackBerry::WebKit::SelectionOverlay::paintContents):

  • WebKitSupport/SelectionOverlay.h: Added.

(WebKit):
(SelectionOverlay):
(BlackBerry::WebKit::SelectionOverlay::create):
(BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
(BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
(BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
(BlackBerry::WebKit::SelectionOverlay::contentsVisible):

Location:
trunk/Source/WebKit
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r118750 r118785  
     12012-05-29  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] WebKit-side implementation of SelectionOverlay
     4        https://bugs.webkit.org/show_bug.cgi?id=87605
     5
     6        Reviewed by Rob Buis.
     7
     8        Add SelectionOverlay to the build system.
     9
     10        PR #160263
     11
     12        * PlatformBlackBerry.cmake:
     13
    1142012-05-29  Arvid Nilsson  <anilsson@rim.com>
    215
  • trunk/Source/WebKit/PlatformBlackBerry.cmake

    r118750 r118785  
    9191    blackberry/WebKitSupport/RenderQueue.cpp
    9292    blackberry/WebKitSupport/SelectionHandler.cpp
     93    blackberry/WebKitSupport/SelectionOverlay.cpp
    9394    blackberry/WebKitSupport/SurfacePool.cpp
    9495    blackberry/WebKitSupport/TouchEventHandler.cpp
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r118750 r118785  
    4343#include "DatabaseSync.h"
    4444#include "DatabaseTracker.h"
     45#include "DefaultTapHighlight.h"
    4546#include "DeviceMotionClientBlackBerry.h"
    4647#include "DeviceOrientationClientBlackBerry.h"
     
    101102#include "ScrollTypes.h"
    102103#include "SelectionHandler.h"
     104#include "SelectionOverlay.h"
    103105#include "Settings.h"
    104106#include "Storage.h"
     
    135137
    136138#if USE(ACCELERATED_COMPOSITING)
    137 #include "DefaultTapHighlight.h"
    138139#include "FrameLayers.h"
    139140#include "WebPageCompositor_p.h"
     
    510511#if USE(ACCELERATED_COMPOSITING)
    511512    m_tapHighlight = DefaultTapHighlight::create(this);
     513    m_selectionOverlay = SelectionOverlay::create(this);
    512514#endif
    513515
     
    62096211}
    62106212
     6213WebSelectionOverlay* WebPage::selectionOverlay() const
     6214{
     6215    return d->m_selectionOverlay.get();
     6216}
     6217
    62116218void WebPage::addOverlay(WebOverlay* overlay)
    62126219{
  • trunk/Source/WebKit/blackberry/Api/WebPage.h

    r118750 r118785  
    6868class WebPageGroupLoadDeferrer;
    6969class WebPagePrivate;
     70class WebSelectionOverlay;
    7071class WebSettings;
    7172class WebTapHighlight;
     
    340341    void setTapHighlight(WebTapHighlight*);
    341342
     343    WebSelectionOverlay* selectionOverlay() const;
     344
    342345    // Adds an overlay that can be modified on the WebKit thread, and
    343346    // whose attributes can be overridden on the compositing thread.
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r118719 r118785  
    433433    WebSettings* m_webSettings;
    434434    OwnPtr<WebTapHighlight> m_tapHighlight;
     435    OwnPtr<WebSelectionOverlay> m_selectionOverlay;
    435436
    436437#if ENABLE(JAVASCRIPT_DEBUGGER)
  • trunk/Source/WebKit/blackberry/ChangeLog

    r118750 r118785  
     12012-05-29  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] WebKit-side implementation of SelectionOverlay
     4        https://bugs.webkit.org/show_bug.cgi?id=87605
     5
     6        Reviewed by Rob Buis.
     7
     8        Leverage the new WebOverlay API to move SelectionOverlay to the WebKit
     9        library, so we always draw selection regardless of which embedder is
     10        integrating WebKit.
     11
     12        PR #160263
     13
     14        * Api/WebPage.cpp:
     15        (BlackBerry::WebKit::WebPagePrivate::init):
     16        (BlackBerry::WebKit::WebPage::selectionOverlay):
     17        (WebKit):
     18        * Api/WebPage.h:
     19        (WebKit):
     20        * Api/WebPage_p.h:
     21        (WebPagePrivate):
     22        * Api/WebSelectionOverlay.h: Added.
     23        (WebKit):
     24        * WebKitSupport/SelectionHandler.cpp:
     25        (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
     26        * WebKitSupport/SelectionOverlay.cpp: Added.
     27        (WebKit):
     28        (BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
     29        (BlackBerry::WebKit::SelectionOverlay::~SelectionOverlay):
     30        (BlackBerry::WebKit::SelectionOverlay::draw):
     31        (BlackBerry::WebKit::SelectionOverlay::hide):
     32        (BlackBerry::WebKit::SelectionOverlay::notifySyncRequired):
     33        (BlackBerry::WebKit::SelectionOverlay::paintContents):
     34        * WebKitSupport/SelectionOverlay.h: Added.
     35        (WebKit):
     36        (SelectionOverlay):
     37        (BlackBerry::WebKit::SelectionOverlay::create):
     38        (BlackBerry::WebKit::SelectionOverlay::notifyAnimationStarted):
     39        (BlackBerry::WebKit::SelectionOverlay::showDebugBorders):
     40        (BlackBerry::WebKit::SelectionOverlay::showRepaintCounter):
     41        (BlackBerry::WebKit::SelectionOverlay::contentsVisible):
     42
    1432012-05-29  Arvid Nilsson  <anilsson@rim.com>
    244
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r118403 r118785  
    3333#include "WebPageClient.h"
    3434#include "WebPage_p.h"
     35#include "WebSelectionOverlay.h"
    3536
    3637#include "htmlediting.h"
     
    925926                    startCaret.x(), startCaret.y(), startCaret.width(), startCaret.height(), endCaret.x(), endCaret.y(), endCaret.width(), endCaret.height());
    926927
     928    if (m_webPage->m_selectionOverlay)
     929        m_webPage->m_selectionOverlay->draw(visibleSelectionRegion);
    927930
    928931    m_webPage->m_client->notifySelectionDetailsChanged(startCaret, endCaret, visibleSelectionRegion, inputNodeOverridesTouch());
Note: See TracChangeset for help on using the changeset viewer.