Based on the following patch from SeungSeop Park
<sns.park@samsung.com> (original commit message):
This patch deals with following upstream changes:
1. Include path changes:
- ui/gfx/point.h => ui/gfx/geometry/point.h
- ui/gfx/rect.h => ui/gfx/geometry/rect.h
- ui/gfx/size.h => ui/gfx/geometry/size.h
2. Significant changes in notification.
As for now, related codes have been commented out as hotfix.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10487
3. An additional argument 'main_frame_routing_id' in
WebContentsDeletate::ShouldCreateWebContents().
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10488
4. GLContext::SetSwapInterval(int interval) is no longer abstract, and
a new abstract method GLContext::OnSetSwapInterval() is provided.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10489
5. Intermediate output folder gen/webkit changed to gen/blink.
6. APIs moved from RenderViewObserver to RenderFrameObserver:
- WillSubmitForm()
- DidChangeScrollOffset()
Patch moves previous implementions for these APIs from
RenderViewObserverEfl to new added RenderFrameObserverEfl class.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10490
7. Vibration design changes in upstream.
See https://codereview.chromium.org/
583663003 .
As for now, the related code has been commented out.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10491
8. RenderViewObserver::OrientationChangeEvent() removed.
Patch removes our implementation for the API since it was dummy anyway.
9. commandState() and commandValue() removed from WebFrame (blink).
Patch temporarily disables references to API using BRINGUP_EWK guard.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10492
10. Several APIs of NetworkDelegate became abstract.
From the code diff, it turned out the default implementations for them
were moved to a newly added class NetworkDelegateImpl.
The prepared solution is to just change NetworkDelegateEfl so to inherit
NetworkDelegateImpl to avoid code duplication.
11. API changes in GestureRecognizer.
Following APIs are no longer available:
- ProcessTouchEventPostDispatch
- ProcessTouchEventOnAsyncAck
Although alternative APIs were found in the class, it seems like the
behaviours of them are somewhat different from previous counterparts.
So, rather than providing unverified solution with new APIs, the related
code is disabled using BRINGUP_EWK guard postponing the proper solution
as future work.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10493
12. Type change of ProcessTouchEventPreDispatch()'s first argument.
- TouchEvent& -> TouchEvent*
13. content::UpdateWebTouchEventFromUIEvent removed.
See https://codereview.chromium.org/
510793003 .
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10494
14. Additional parameter SiteInstance* in Navigator::RequestOpenURL().
See https://codereview.chromium.org/
743773003/ for upstream change.
Current solution is to give NULL for the argument.
TODO: http://107.108.218.239/bugzilla/show_bug.cgi?id=10495
15. Finally, patch changes branch to dev/m41_2272 in sync_repos.sh and
updates rpm package version to 41.2272.0.4.
Known Issues:
- With touch related changes (11~13), Touch did not work in mobile target,
i.e., no IME for input element and no site navigation for link click.
Since these are considered basic features that can block us to test other
features, patch walkarounds it by disabling kEnableTouch command line option
for mobile target (i.e., will use mouse event as in TV).
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=10434
Reviewed by: Antonio Gomes, Piotr Tworek
#ifndef IM_CONTEXT_EFL
#define IM_CONTEXT_EFL
-#include "ui/base/ime/text_input_mode.h"
-#include "ui/base/ime/text_input_type.h"
-#include "ui/base/ime/composition_text.h"
-#include "ui/gfx/rect.h"
+#include <Evas.h>
+
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/browser/renderer_host/web_event_factory_efl.h"
-
-#include <Evas.h>
+#include "ui/base/ime/composition_text.h"
+#include "ui/gfx/geometry/rect.h"
typedef std::queue<base::string16> CommitQueue;
typedef std::queue<ui::CompositionText> PreeditQueue;
}
void RenderWidgetHostViewEfl::HandleTouchEvent(ui::TouchEvent* event) {
- if (!gesture_recognizer_->ProcessTouchEventPreDispatch(*event, this)) {
+ if (!gesture_recognizer_->ProcessTouchEventPreDispatch(event, this)) {
event->StopPropagation();
return;
}
// Update the touch event first.
+ // [M41_2272] FIXME: UpdateWebTouchEventFromUIEvent has been removed.
+ // See https://codereview.chromium.org/510793003.
blink::WebTouchPoint* point =
- content::UpdateWebTouchEventFromUIEvent(*event, &touch_event_);
+#if !defined(EWK_BRINGUP)
+ content::UpdateWebTouchEventFromUIEvent(event, &touch_event_);
+#else
+ NULL;
+#endif
// Forward the touch event only if a touch point was updated, and there's a
// touch-event handler in the page, and no other touch-event is in the queue.
// It is important to always consume the event if there is a touch-event
if (forwarded)
return;
+#if !defined(EWK_BRINGUP)
scoped_ptr<ui::GestureRecognizer::Gestures> gestures(
- gesture_recognizer_->ProcessTouchEventPostDispatch(*event, ui::ER_UNHANDLED, this));
+ gesture_recognizer_->ProcessTouchEventPostDispatch(event, ui::ER_UNHANDLED, this));
if (!gestures)
return;
for (size_t j = 0; j < gestures->size(); ++j) {
ui::GestureEvent* event = gestures->get().at(j);
HandleGesture(event);
}
+#endif
}
void RenderWidgetHostViewEfl::ProcessAckedTouchEvent(
if (!MakeUITouchEventsFromWebTouchEvents(touch, &events, LOCAL_COORDINATES))
return;
+#if !defined(EWK_BRINGUP)
ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) ?
ui::ER_HANDLED : ui::ER_UNHANDLED;
for (ScopedVector<ui::TouchEvent>::const_iterator iter = events.begin(),
}
}
}
+#endif
}
void RenderWidgetHostViewEfl::OnOrientationChangeEvent(int orientation) {
return handle_;
}
- void SetSwapInterval(int) override {
+ void OnSetSwapInterval(int interval) override {
NOTREACHED();
}
#include "components/autofill/core/browser/autofill_popup_delegate.h"
#include "browser/password_manager/password_form_manager.h"
#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/point.h"
+#include "ui/gfx/geometry/point.h"
using namespace password_manager;
class EWebView;
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/browser_thread.h"
-#include "ui/gfx/rect.h"
+#include "ui/gfx/geometry/rect.h"
#include <Elementary.h>
#include "tizen_webview/public/tw_web_context.h"
BrowsingDataRemoverEfl* BRDE = static_cast<BrowsingDataRemoverEfl*>(user_data);
//information about end of process is not needed so cb left empty
net::CompletionCallback cb;
- for (map<GURL, content::AppCacheInfoVector>::iterator iter = collection->infos_by_origin.begin();
+ for (std::map<GURL, content::AppCacheInfoVector>::iterator iter = collection->infos_by_origin.begin();
iter != collection->infos_by_origin.end();
++iter) {
BRDE->DeleteAppCachesForOrigin(iter->first);
#include "components/autofill/core/common/password_form.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "ui/gfx/rect.h"
namespace password_manager {
PasswordGenerationManager::PasswordGenerationManager(
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "ui/gfx/rect.h"
+#include "ui/gfx/geometry/rect.h"
namespace autofill {
bool BrowserContextEfl::ResourceContextEfl::HTTPCustomHeaderRemove(
const char* name) {
base::AutoLock locker(http_custom_headers_lock_);
- return http_custom_headers_.erase(string(name));
+ return http_custom_headers_.erase(std::string(name));
}
void BrowserContextEfl::ResourceContextEfl::HTTPCustomHeaderClear() {
#endif
#if defined(OS_TIZEN_MOBILE)
+// [M34_2272] FIXME: Temporarily disable touch due to upstream change.
+#if !defined(EWK_BRINGUP)
p_command_line->AppendSwitch(switches::kTouchEvents);
+#endif
p_command_line->AppendSwitch(switches::kEnablePinch);
p_command_line->AppendSwitch(switches::kUseMobileUserAgent);
p_command_line->AppendSwitch(switches::kEnableViewportMeta);
#include "base/memory/shared_memory.h"
#include "printing/printing_export.h"
#include "third_party/WebKit/public/web/WebPrintScalingOption.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
struct PrintParams {
PrintParams();
#include "content/public/browser/render_widget_host_iterator.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/show_desktop_notification_params.h"
+#include "content/public/common/platform_notification_data.h"
#include "common/web_contents_utils.h"
#if defined(OS_TIZEN)
void ContentBrowserClientEfl::RenderProcessWillLaunch(
content::RenderProcessHost* host) {
host->AddFilter(new RenderMessageFilterEfl(host->GetID()));
+#if !defined(EWK_BRINGUP)
host->AddFilter(new VibrationMessageFilter());
+#endif
host->AddFilter(new editing::EditorClientObserver(host->GetID()));
#if defined(OS_TIZEN_MOBILE)
host->AddFilter(new TtsMessageFilterEfl());
'public',
'<(DEPTH)/third_party/skia/include/core',
'<(DEPTH)/v8/include',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/',
+ '<(SHARED_INTERMEDIATE_DIR)/blink/',
],
'dependencies': [
'browser/selectpicker/popup_menu_item_private.h',
'browser/selectpicker/popup_menu_item.h',
- 'browser/vibration/vibration_provider_client.cc',
- 'browser/vibration/vibration_message_filter.h',
- 'browser/vibration/vibration_message_filter.cc',
- 'browser/vibration/vibration_provider_client.h',
+ # [M41_2272] Temporary removal for switching to new chromium.
+ # FIXME: http://107.108.218.239/bugzilla/show_bug.cgi?id=10491
+ #'browser/vibration/vibration_provider_client.cc',
+ #'browser/vibration/vibration_message_filter.h',
+ #'browser/vibration/vibration_message_filter.cc',
+ #'browser/vibration/vibration_provider_client.h',
'browser/web_cache_efl/web_cache_manager_efl.cc',
'browser/web_cache_efl/web_cache_manager_efl.h',
}
EWebContext::~EWebContext() {
+#if !defined(EWK_BRINGUP)
VibrationProviderClient::DeleteInstance();
+#endif
}
void EWebContext::ClearNetworkCache() {
#include "web_contents_delegate_efl.h"
#include "context_menu_controller_efl.h"
#include "file_chooser_controller_efl.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/size.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
#include "browser/inputpicker/InputPicker.h"
#include "tizen_webview/public/tw_hit_test.h"
#include "popup_controller_efl.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "net/base/network_delegate.h"
+#include "net/base/network_delegate_impl.h"
#include "cookie_manager.h"
namespace net {
-class NetworkDelegateEfl : public NetworkDelegate {
+class NetworkDelegateEfl : public NetworkDelegateImpl {
public:
NetworkDelegateEfl(scoped_refptr<CookieManager> cookie_manager);
#include <Eina.h>
#include <Evas.h>
-#include <ui/gfx/point.h>
+#include <ui/gfx/geometry/point.h>
struct SelectionColor {
int r;
Ewk_Vibration_Client_Vibration_Cancel_Cb cancel,
void* data)
{
+#if !defined(EWK_BRINGUP)
VibrationProviderClient* vibra_client = VibrationProviderClient::GetInstance();
vibra_client->SetVibrationClientCallbacks(vibrate, cancel, data);
+#endif
}
Eina_Bool ewk_context_tizen_extensible_api_string_set(Ewk_Context* ewkContext, const char* extensibleAPI, Eina_Bool enable)
#include "common/render_messages_ewk.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
+#include "third_party/WebKit/public/web/WebFormElement.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
#endif
void RenderFrameObserverEfl::OnMoveNextSelectElement() {
+#if !defined(EWK_BRINGUP)
content::RenderView* render_view_ = render_frame()->GetRenderView();
render_view_->GetWebView()->moveSelectElementToNext();
+#endif
}
void RenderFrameObserverEfl::OnMovePreviousSelectElement() {
+#if !defined(EWK_BRINGUP)
content::RenderView* render_view_ = render_frame()->GetRenderView();
render_view_->GetWebView()->moveSelectElementToPrevious();
+#endif
+}
+
+void RenderFrameObserverEfl::DidChangeScrollOffset() {
+ if (render_frame()->GetRenderView()->GetMainRenderFrame() != render_frame())
+ return;
+
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
+
+ if (max_scroll_offset_ != frame->maximumScrollOffset()) {
+ max_scroll_offset_ = frame->maximumScrollOffset();
+ Send(new EwkHostMsg_DidChangeMaxScrollOffset(render_frame()->GetRoutingID(),
+ frame->maximumScrollOffset().width,
+ frame->maximumScrollOffset().height));
+ }
+
+ if (last_scroll_offset_ != frame->scrollOffset()) {
+ last_scroll_offset_ = frame->scrollOffset();
+ Send(new EwkHostMsg_DidChangeScrollOffset(render_frame()->GetRoutingID(),
+ frame->scrollOffset().width,
+ frame->scrollOffset().height));
+ }
+}
+
+void RenderFrameObserverEfl::WillSubmitForm(
+ const blink::WebFormElement& form) {
+ GURL url(form.action());
+ Send(new EwkHostMsg_FormSubmit(routing_id(),url));
}
} // namespace content
#include <vector>
#include "content/public/renderer/render_frame_observer.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
namespace blink {
class WebElement;
// IPC::Listener implementation.
bool OnMessageReceived(const IPC::Message& message) override;
+ void DidChangeScrollOffset() override;
+
+ void WillSubmitForm(const blink::WebFormElement& form) override;
+
private:
#if defined(OS_TIZEN)
void OnSelectPopupMenuItems(bool canceled,
void OnMovePreviousSelectElement();
void OnMoveNextSelectElement();
+
+ blink::WebSize max_scroll_offset_;
+ blink::WebSize last_scroll_offset_;
};
} // namespace content
Send(new EwkHostMsg_PlainTextGetContents(render_view()->GetRoutingID(), content.utf8(), plain_text_get_callback_id));
}
-void RenderViewObserverEfl::DidChangeScrollOffset(blink::WebLocalFrame* frame)
-{
- if (!frame || (render_view()->GetWebView()->mainFrame() != frame))
- return;
-
- if (max_scroll_offset_ != frame->maximumScrollOffset()) {
- max_scroll_offset_ = frame->maximumScrollOffset();
- Send(new EwkHostMsg_DidChangeMaxScrollOffset(render_view()->GetRoutingID(),
- frame->maximumScrollOffset().width,
- frame->maximumScrollOffset().height));
- }
-
- if(last_scroll_offset_ != frame->scrollOffset()) {
- last_scroll_offset_ = frame->scrollOffset();
- Send(new EwkHostMsg_DidChangeScrollOffset(render_view()->GetRoutingID(),
- frame->scrollOffset().width,
- frame->scrollOffset().height));
- }
-}
-
void RenderViewObserverEfl::OnGetSelectionStyle()
{
blink::WebView* view = render_view()->GetWebView();
view->scrollFocusedNodeIntoView();
}
-void RenderViewObserverEfl::OrientationChangeEvent()
-{
- ScrollToFocusedEditableNode();
-}
-
-void RenderViewObserverEfl::WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form)
-{
- GURL url(form.action());
- Send(new EwkHostMsg_FormSubmit(routing_id(),url));
-}
-
void RenderViewObserverEfl::OnSetBrowserFont()
{
#if !defined(EWK_BRINGUP)
ContentRendererClientEfl* render_client);
virtual ~RenderViewObserverEfl();
- void DidChangeScrollOffset(blink::WebLocalFrame* frame) override;
bool OnMessageReceived(const IPC::Message& message) override;
virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override;
- void OrientationChangeEvent() override;
#if !defined(EWK_BRINGUP)
virtual void DidChangePageScaleFactor() override;
#endif
//So using this notification to update minimum and maximum page scale factor values
virtual void DidUpdateLayout() override;
- void WillSubmitForm(blink::WebLocalFrame* frame, const blink::WebFormElement& form) override;
-
private:
void OnSetContentSecurityPolicy(const std::string& policy, Ewk_CSP_Header_Type header_type);
void OnScale(double scale_factor, int x, int y);
void OnSetViewMode(blink::WebViewMode view_mode);
void ScrollToFocusedEditableNode();
-
- blink::WebSize max_scroll_offset_;
- blink::WebSize last_scroll_offset_;
float cached_min_page_scale_factor_;
float cached_max_page_scale_factor_;
gfx::Size last_sent_contents_size_;
#ifndef _SCROLL_DETECTOR_H
#define _SCROLL_DETECTOR_H
-#include "ui/gfx/rect.h"
+#include "ui/gfx/geometry/rect.h"
class EWebView;
#include "content/public/common/context_menu_params.h"
#include "content/public/common/menu_item.h"
#include "ui/gfx/range/range.h"
-#include "ui/gfx/rect.h"
+#include "ui/gfx/geometry/rect.h"
class EWebView;
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "eweb_view.h"
#include "selection_controller_efl.h"
-#include "selection_box_efl.h"
-#include "selection_magnifier_efl.h"
-#include "ui/gfx/screen.h"
-#include "tizen_webview/public/tw_hit_test.h"
#include <Edje.h>
+#include "eweb_view.h"
+#include "tizen_webview/public/tw_hit_test.h"
+
using namespace tizen_webview;
namespace content {
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
-#include "ui/gfx/range/range.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/rect.h"
#include "selection_box_efl.h"
#include "selection_handle_efl.h"
#include "selection_magnifier_efl.h"
-
+#include "ui/gfx/range/range.h"
+#include "ui/gfx/geometry/rect.h"
#include "tizen_webview/public/tw_selection_controller.h"
+#include "tizen_webview/public/tw_hit_test.h"
#if defined(OS_TIZEN)
#include "vconf/vconf.h"
#ifndef selection_handle_h
#define selection_handle_h
-#include "ui/gfx/point.h"
+#include "ui/gfx/geometry/point.h"
#include <Evas.h>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "selection_magnifier_efl.h"
+
+#include <Elementary.h>
+
#include "base/path_service.h"
#include "base/files/file_path.h"
#include "content/common/paths_efl.h"
#include "content/public/browser/browser_thread.h"
#include "eweb_view.h"
-#include "selection_magnifier_efl.h"
#include "selection_controller_efl.h"
-#include <Elementary.h>
-
namespace content {
// Inherited from WK2 w.r.t tizen style
#ifndef selection_magnifier_efl_h
#define selection_magnifier_efl_h
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/point.h"
-
#include <Ecore.h>
#include <Eina.h>
#include <Evas.h>
+#include "ui/gfx/image/image_skia.h"
+#include "ui/gfx/geometry/point.h"
+
namespace content {
class SelectionControllerEfl;
bool WebContentsDelegateEfl::ShouldCreateWebContents(
WebContents* web_contents,
int route_id,
+ int main_frame_route_id,
WindowContainerType window_container_type,
const string16& /*frame_name*/,
const GURL& target_url,
virtual bool ShouldCreateWebContents(
WebContents*,
int route_id,
+ int main_frame_route_id,
WindowContainerType,
const base::string16& frame_name,
const GURL& target_url,