Title: [143705] trunk/Source/WebKit2
Revision
143705
Author
mikhail.pozdnya...@intel.com
Date
2013-02-22 01:33:50 -0800 (Fri, 22 Feb 2013)

Log Message

[WK2][EFL] Clean up PageViewportControllerClientEfl class
https://bugs.webkit.org/show_bug.cgi?id=110438

Reviewed by Andreas Kling.

Cleaned up PageViewportControllerClientEfl class from unused methods
and class members, eliminated access to WK2 internals from this class.

* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
* UIProcess/efl/PageViewportControllerClientEfl.h:
(WebKit::PageViewportControllerClientEfl::~PageViewportControllerClientEfl):
(PageViewportControllerClientEfl):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::WebView):
(WebKit::WebView::updateViewportSize):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (143704 => 143705)


--- trunk/Source/WebKit2/ChangeLog	2013-02-22 09:33:11 UTC (rev 143704)
+++ trunk/Source/WebKit2/ChangeLog	2013-02-22 09:33:50 UTC (rev 143705)
@@ -1,3 +1,22 @@
+2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
+
+        [WK2][EFL] Clean up PageViewportControllerClientEfl class
+        https://bugs.webkit.org/show_bug.cgi?id=110438
+
+        Reviewed by Andreas Kling.
+
+        Cleaned up PageViewportControllerClientEfl class from unused methods
+        and class members, eliminated access to WK2 internals from this class.
+
+        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
+        (WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
+        * UIProcess/efl/PageViewportControllerClientEfl.h:
+        (WebKit::PageViewportControllerClientEfl::~PageViewportControllerClientEfl):
+        (PageViewportControllerClientEfl):
+        * UIProcess/efl/WebView.cpp:
+        (WebKit::WebView::WebView):
+        (WebKit::WebView::updateViewportSize):
+
 2013-02-22  Michał Pakuła vel Rutka  <m.pak...@samsung.com>
 
         [WK2][EFL][GTK][Qt] Add context menu item tags for C API

Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h (143704 => 143705)


--- trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h	2013-02-22 09:33:11 UTC (rev 143704)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h	2013-02-22 09:33:50 UTC (rev 143705)
@@ -124,7 +124,6 @@
     EwkSettings* settings() { return m_settings.get(); }
     EwkBackForwardList* backForwardList() { return m_backForwardList.get(); }
     EwkWindowFeatures* windowFeatures();
-    WebKit::PageViewportControllerClientEfl* pageViewportControllerClient() { return m_pageViewportControllerClient.get(); }
     WebKit::PageViewportController* pageViewportController() { return m_pageViewportController.get(); }
 
     bool isFocused() const;

Modified: trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.cpp (143704 => 143705)


--- trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.cpp	2013-02-22 09:33:11 UTC (rev 143704)
+++ trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.cpp	2013-02-22 09:33:50 UTC (rev 143705)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2013 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,11 +27,8 @@
 #include "config.h"
 #include "PageViewportControllerClientEfl.h"
 
-#include "CoordinatedLayerTreeHostProxy.h"
 #include "EwkView.h"
 #include "PageViewportController.h"
-#include "TransformationMatrix.h"
-#include <WebCore/CoordinatedGraphicsScene.h>
 
 using namespace WebCore;
 
@@ -43,32 +41,8 @@
     ASSERT(m_view);
 }
 
-PageViewportControllerClientEfl::~PageViewportControllerClientEfl()
+void PageViewportControllerClientEfl::didChangeContentsSize(const WebCore::IntSize&)
 {
-}
-
-DrawingAreaProxy* PageViewportControllerClientEfl::drawingArea() const
-{
-    return m_view->page()->drawingArea();
-}
-
-void PageViewportControllerClientEfl::setRendererActive(bool active)
-{
-    drawingArea()->coordinatedLayerTreeHostProxy()->coordinatedGraphicsScene()->setActive(active);
-}
-
-void PageViewportControllerClientEfl::updateViewportSize()
-{
-    ASSERT(m_controller);
-    FloatSize size = m_view->size();
-    // The viewport controller expects sizes in UI units, and not raw device units.
-    size.scale(1 / m_controller->deviceScaleFactor());
-    m_controller->didChangeViewportSize(size);
-}
-
-void PageViewportControllerClientEfl::didChangeContentsSize(const WebCore::IntSize& contentsSize)
-{
-    UNUSED_PARAM(contentsSize);
     m_view->scheduleUpdateDisplay();
 }
 

Modified: trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.h (143704 => 143705)


--- trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.h	2013-02-22 09:33:11 UTC (rev 143704)
+++ trunk/Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.h	2013-02-22 09:33:50 UTC (rev 143705)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ * Copyright (C) 2013 Intel Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,10 +27,12 @@
 #ifndef PageViewportControllerClientEfl_h
 #define PageViewportControllerClientEfl_h
 
-#include "EwkView.h"
 #include "PageViewportControllerClient.h"
+#include <WebCore/FloatPoint.h>
 #include <wtf/PassOwnPtr.h>
 
+class EwkView;
+
 namespace WebKit {
 
 class PageViewportControllerClientEfl : public PageViewportControllerClient {
@@ -38,30 +41,22 @@
     {
         return adoptPtr(new PageViewportControllerClientEfl(viewImpl));
     }
-    ~PageViewportControllerClientEfl();
+    virtual ~PageViewportControllerClientEfl() { }
 
-    DrawingAreaProxy* drawingArea() const;
-    WebCore::IntSize viewSize() { return m_viewportSize; }
-    WebCore::FloatPoint contentPosition() const { return m_contentPosition; }
+    virtual void setViewportPosition(const WebCore::FloatPoint&) OVERRIDE;
+    virtual void setPageScaleFactor(float) OVERRIDE;
 
-    void updateViewportSize();
-    void setRendererActive(bool);
+    virtual void didResumeContent() OVERRIDE;
+    virtual void didChangeContentsSize(const WebCore::IntSize&) OVERRIDE;
+    virtual void didChangeVisibleContents() OVERRIDE;
+    virtual void didChangeViewportAttributes() OVERRIDE;
 
-    virtual void setViewportPosition(const WebCore::FloatPoint& contentsPoint);
-    virtual void setPageScaleFactor(float);
+    virtual void setController(PageViewportController*) OVERRIDE;
 
-    virtual void didResumeContent();
-    virtual void didChangeContentsSize(const WebCore::IntSize&);
-    virtual void didChangeVisibleContents();
-    virtual void didChangeViewportAttributes();
-
-    virtual void setController(PageViewportController*);
-
 private:
     explicit PageViewportControllerClientEfl(EwkView*);
 
     EwkView* m_view;
-    WebCore::IntSize m_viewportSize;
     WebCore::FloatPoint m_contentPosition;
     PageViewportController* m_controller;
 };

Modified: trunk/Source/WebKit2/UIProcess/efl/WebView.cpp (143704 => 143705)


--- trunk/Source/WebKit2/UIProcess/efl/WebView.cpp	2013-02-22 09:33:11 UTC (rev 143704)
+++ trunk/Source/WebKit2/UIProcess/efl/WebView.cpp	2013-02-22 09:33:50 UTC (rev 143705)
@@ -196,7 +196,10 @@
 void WebView::updateViewportSize()
 {
     if (m_page->useFixedLayout()) {
-        m_ewkView->pageViewportControllerClient()->updateViewportSize();
+        FloatSize size = m_ewkView->size();
+        // The viewport controller expects sizes in UI units, and not raw device units.
+        size.scale(1 / m_page->deviceScaleFactor());
+        m_ewkView->pageViewportController()->didChangeViewportSize(size);
         return;
     }
     m_page->drawingArea()->setVisibleContentsRect(IntRect(roundedIntPoint(m_ewkView->pagePosition()), m_ewkView->size()), FloatPoint());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to