Source/WebKit/ChangeLog

 12014-01-15 Ryuan Choi <ryuan.choi@samsung.com>
 2
 3 [EFL][WK1] Implement ProgressTrackerClientEfl to fix the crash
 4 https://bugs.webkit.org/show_bug.cgi?id=127031
 5
 6 Reviewed by Gyuyoung Kim.
 7
 8 * PlatformEfl.cmake: Added ProgressTrackerClientEfl.cpp into source lists.
 9
1102014-01-14 Anders Carlsson <andersca@apple.com>
211
312 Create separate progress tracker clients

Source/WebKit/efl/ChangeLog

 12014-01-15 Ryuan Choi <ryuan.choi@samsung.com>
 2
 3 [EFL][WK1] Implement ProgressTrackerClientEfl to fix the crash
 4 https://bugs.webkit.org/show_bug.cgi?id=127031
 5
 6 Reviewed by Gyuyoung Kim.
 7
 8 Implmemented and moved ProgressTrackerClient logic from FrameLoaderClientEfl.
 9 ProgressTrackerClient should be indenpendent instance since r162034
 10
 11 * WebCoreSupport/FrameLoaderClientEfl.cpp:
 12 * WebCoreSupport/FrameLoaderClientEfl.h:
 13 * WebCoreSupport/ProgressTrackerClientEfl.cpp:
 14 (WebCore::ProgressTrackerClientEfl::ProgressTrackerClientEfl):
 15 (WebCore::ProgressTrackerClientEfl::progressTrackerDestroyed):
 16 (WebCore::ProgressTrackerClientEfl::progressStarted):
 17 (WebCore::ProgressTrackerClientEfl::progressEstimateChanged):
 18 (WebCore::ProgressTrackerClientEfl::progressFinished):
 19 * WebCoreSupport/ProgressTrackerClientEfl.h: Added.
 20 * ewk/ewk_view.cpp:
 21 (_ewk_view_priv_new):
 22
1232014-01-13 Ryuan Choi <ryuan.choi@samsung.com>
224
325 [EFL] Do not store reference variables as a pointer in private data structure

Source/WebKit/PlatformEfl.cmake

@@list(APPEND WebKit_SOURCES
120120 efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
121121 efl/WebCoreSupport/PageClientEfl.cpp
122122 efl/WebCoreSupport/PlatformStrategiesEfl.cpp
 123 efl/WebCoreSupport/ProgressTrackerClientEfl.cpp
123124 efl/WebCoreSupport/PopupMenuEfl.cpp
124125 efl/WebCoreSupport/SearchPopupMenuEfl.cpp
125126 efl/WebCoreSupport/StorageTrackerClientEfl.cpp

Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

@@void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identi
243243 evas_object_smart_callback_call(m_view, "resource,request,new", &request);
244244}
245245
246 void FrameLoaderClientEfl::progressStarted(WebCore::Frame& frame)
247 {
248  ewk_frame_load_started(m_frame);
249  progressEstimateChanged(frame);
250 }
251 
252 void FrameLoaderClientEfl::progressEstimateChanged(Frame&)
253 {
254  ewk_frame_load_progress_changed(m_frame);
255 }
256 
257 void FrameLoaderClientEfl::progressFinished(Frame&)
258 {
259  notImplemented();
260 }
261 
262246void FrameLoaderClientEfl::frameLoaderDestroyed()
263247{
264248 if (m_frame)

Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h

3636#include "EWebKit.h"
3737#include "FrameLoaderClient.h"
3838#include "PluginView.h"
39 #include "ProgressTrackerClient.h"
4039#include "ResourceError.h"
4140#include "ResourceResponse.h"
4241

@@namespace WebCore {
4443
4544class FormState;
4645
47 class FrameLoaderClientEfl : public FrameLoaderClient, public ProgressTrackerClient {
 46class FrameLoaderClientEfl : public FrameLoaderClient {
4847 public:
4948 explicit FrameLoaderClientEfl(Evas_Object *view);
5049 virtual ~FrameLoaderClientEfl() { }

@@class FrameLoaderClientEfl : public FrameLoaderClient, public ProgressTrackerCli
125124 virtual void revertToProvisionalState(DocumentLoader*) { }
126125 virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
127126
128  virtual void progressStarted(Frame&);
129  virtual void progressEstimateChanged(Frame&);
130  virtual void progressFinished(Frame&);
131 
132127 virtual PassRefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*,
133128 const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
134129

Source/WebKit/efl/WebCoreSupport/ProgressTrackerClientEfl.cpp

 1/*
 2 * Copyright (C) 2014 Samsung Electronics
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "ProgressTrackerClientEfl.h"
 28
 29#include "Frame.h"
 30#include "NotImplemented.h"
 31#include "ewk_frame_private.h"
 32
 33namespace WebCore {
 34
 35ProgressTrackerClientEfl::ProgressTrackerClientEfl(Evas_Object* view)
 36 : m_view(view)
 37{
 38 ASSERT(m_view);
 39}
 40
 41void ProgressTrackerClientEfl::progressTrackerDestroyed()
 42{
 43 delete this;
 44}
 45
 46void ProgressTrackerClientEfl::progressStarted(Frame& originatingProgressFrame)
 47{
 48 ewk_frame_load_started(EWKPrivate::kitFrame(&originatingProgressFrame));
 49 progressEstimateChanged(originatingProgressFrame);
 50}
 51
 52void ProgressTrackerClientEfl::progressEstimateChanged(Frame& originatingProgressFrame)
 53{
 54 ewk_frame_load_progress_changed(EWKPrivate::kitFrame(&originatingProgressFrame));
 55}
 56
 57void ProgressTrackerClientEfl::progressFinished(Frame&)
 58{
 59 notImplemented();
 60}
 61
 62} // namespace WebCore

Source/WebKit/efl/WebCoreSupport/ProgressTrackerClientEfl.h

 1/*
 2 * Copyright (C) 2014 Samsung Electronics
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef ProgressTrackerClientEfl_h
 27#define ProgressTrackerClientEfl_h
 28
 29#include "ProgressTrackerClient.h"
 30
 31#if USE(EO)
 32typedef struct _Eo_Opaque Evas_Object;
 33#else
 34typedef struct _Evas_Object Evas_Object;
 35#endif
 36
 37namespace WebCore {
 38
 39class ProgressTrackerClientEfl FINAL : public WebCore::ProgressTrackerClient {
 40public:
 41 explicit ProgressTrackerClientEfl(Evas_Object*);
 42
 43private:
 44 virtual void progressTrackerDestroyed() OVERRIDE;
 45
 46 virtual void progressStarted(WebCore::Frame& originatingProgressFrame) OVERRIDE;
 47 virtual void progressEstimateChanged(WebCore::Frame& originatingProgressFrame) OVERRIDE;
 48 virtual void progressFinished(WebCore::Frame& originatingProgressFrame) OVERRIDE;
 49
 50 Evas_Object* m_view;
 51};
 52
 53} // namespace WebCore
 54
 55#endif // ProgressTrackerClientEfl_h

Source/WebKit/efl/ewk/ewk_view.cpp

5959#include "PlatformMouseEvent.h"
6060#include "PopupMenuClient.h"
6161#include "ProgressTracker.h"
 62#include "ProgressTrackerClientEfl.h"
6263#include "RefPtrCairo.h"
6364#include "RenderThemeEfl.h"
6465#include "ResourceHandle.h"

@@static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
681682 pageClients.inspectorClient = new WebCore::InspectorClientEfl(smartData->self);
682683#endif
683684 pageClients.loaderClientForMainFrame = new WebCore::FrameLoaderClientEfl(smartData->self);
684  pageClients.progressTrackerClient = static_cast<WebCore::FrameLoaderClientEfl*>(pageClients.loaderClientForMainFrame);
 685 pageClients.progressTrackerClient = new WebCore::ProgressTrackerClientEfl(smartData->self);
685686 priv->page = adoptPtr(new WebCore::Page(pageClients));
686687
687688#if ENABLE(DEVICE_ORIENTATION)