Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 758843004: Delete most of rendering/compositing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "sky/engine/core/html/ime/InputMethodContext.h" 54 #include "sky/engine/core/html/ime/InputMethodContext.h"
55 #include "sky/engine/core/loader/FrameLoader.h" 55 #include "sky/engine/core/loader/FrameLoader.h"
56 #include "sky/engine/core/loader/UniqueIdentifier.h" 56 #include "sky/engine/core/loader/UniqueIdentifier.h"
57 #include "sky/engine/core/page/Chrome.h" 57 #include "sky/engine/core/page/Chrome.h"
58 #include "sky/engine/core/page/EventHandler.h" 58 #include "sky/engine/core/page/EventHandler.h"
59 #include "sky/engine/core/page/EventWithHitTestResults.h" 59 #include "sky/engine/core/page/EventWithHitTestResults.h"
60 #include "sky/engine/core/page/FocusController.h" 60 #include "sky/engine/core/page/FocusController.h"
61 #include "sky/engine/core/page/Page.h" 61 #include "sky/engine/core/page/Page.h"
62 #include "sky/engine/core/page/TouchDisambiguation.h" 62 #include "sky/engine/core/page/TouchDisambiguation.h"
63 #include "sky/engine/core/rendering/RenderView.h" 63 #include "sky/engine/core/rendering/RenderView.h"
64 #include "sky/engine/core/rendering/compositing/RenderLayerCompositor.h"
65 #include "sky/engine/platform/Cursor.h" 64 #include "sky/engine/platform/Cursor.h"
66 #include "sky/engine/platform/KeyboardCodes.h" 65 #include "sky/engine/platform/KeyboardCodes.h"
67 #include "sky/engine/platform/Logging.h" 66 #include "sky/engine/platform/Logging.h"
68 #include "sky/engine/platform/NotImplemented.h" 67 #include "sky/engine/platform/NotImplemented.h"
69 #include "sky/engine/platform/PlatformGestureEvent.h" 68 #include "sky/engine/platform/PlatformGestureEvent.h"
70 #include "sky/engine/platform/PlatformKeyboardEvent.h" 69 #include "sky/engine/platform/PlatformKeyboardEvent.h"
71 #include "sky/engine/platform/PlatformMouseEvent.h" 70 #include "sky/engine/platform/PlatformMouseEvent.h"
72 #include "sky/engine/platform/PlatformWheelEvent.h" 71 #include "sky/engine/platform/PlatformWheelEvent.h"
73 #include "sky/engine/platform/TraceEvent.h" 72 #include "sky/engine/platform/TraceEvent.h"
74 #include "sky/engine/platform/UserGestureIndicator.h" 73 #include "sky/engine/platform/UserGestureIndicator.h"
(...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 { 1884 {
1886 ASSERT(m_ignoreInputEvents != newValue); 1885 ASSERT(m_ignoreInputEvents != newValue);
1887 m_ignoreInputEvents = newValue; 1886 m_ignoreInputEvents = newValue;
1888 } 1887 }
1889 1888
1890 void WebViewImpl::setBackgroundColorOverride(WebColor color) 1889 void WebViewImpl::setBackgroundColorOverride(WebColor color)
1891 { 1890 {
1892 m_backgroundColorOverride = color; 1891 m_backgroundColorOverride = color;
1893 } 1892 }
1894 1893
1895 void WebViewImpl::setOverlayLayer(GraphicsLayer* layer)
1896 {
1897 if (!m_rootGraphicsLayer)
1898 return;
1899
1900 // FIXME(bokan): This path goes away after virtual viewport pinch is enabled everywhere.
1901 if (!m_rootTransformLayer)
1902 m_rootTransformLayer = m_page->mainFrame()->view()->renderView()->compos itor()->ensureRootTransformLayer();
1903
1904 if (m_rootTransformLayer) {
1905 if (layer->parent() != m_rootTransformLayer)
1906 m_rootTransformLayer->addChild(layer);
1907 }
1908 }
1909
1910 Element* WebViewImpl::focusedElement() const 1894 Element* WebViewImpl::focusedElement() const
1911 { 1895 {
1912 LocalFrame* frame = m_page->focusController().focusedFrame(); 1896 LocalFrame* frame = m_page->focusController().focusedFrame();
1913 if (!frame) 1897 if (!frame)
1914 return 0; 1898 return 0;
1915 1899
1916 Document* document = frame->document(); 1900 Document* document = frame->document();
1917 if (!document) 1901 if (!document)
1918 return 0; 1902 return 0;
1919 1903
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 void WebViewImpl::invalidateRect(const IntRect& rect) 1941 void WebViewImpl::invalidateRect(const IntRect& rect)
1958 { 1942 {
1959 m_client->didInvalidateRect(rect); 1943 m_client->didInvalidateRect(rect);
1960 } 1944 }
1961 1945
1962 GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const 1946 GraphicsLayerFactory* WebViewImpl::graphicsLayerFactory() const
1963 { 1947 {
1964 return m_graphicsLayerFactory.get(); 1948 return m_graphicsLayerFactory.get();
1965 } 1949 }
1966 1950
1967 RenderLayerCompositor* WebViewImpl::compositor() const
1968 {
1969 if (!page() || !page()->mainFrame())
1970 return 0;
1971
1972 if (!page()->mainFrame()->document() || !page()->mainFrame()->document()->re nderView())
1973 return 0;
1974
1975 return page()->mainFrame()->document()->renderView()->compositor();
1976 }
1977
1978 GraphicsLayer* WebViewImpl::rootGraphicsLayer() 1951 GraphicsLayer* WebViewImpl::rootGraphicsLayer()
1979 { 1952 {
1980 return m_rootGraphicsLayer; 1953 return m_rootGraphicsLayer;
1981 } 1954 }
1982 1955
1983 void WebViewImpl::scheduleAnimation() 1956 void WebViewImpl::scheduleAnimation()
1984 { 1957 {
1985 m_client->scheduleAnimation(); 1958 m_client->scheduleAnimation();
1986 } 1959 }
1987 1960
1988 void WebViewImpl::updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool programmaticScroll) 1961 void WebViewImpl::updateMainFrameScrollPosition(const IntPoint& scrollPosition, bool programmaticScroll)
1989 { 1962 {
1990 // FIXME(sky): Remove 1963 // FIXME(sky): Remove
1991 } 1964 }
1992 1965
1993 void WebViewImpl::updateRootLayerTransform() 1966 void WebViewImpl::updateRootLayerTransform()
1994 { 1967 {
1995 // If we don't have a root graphics layer, we won't bother trying to find 1968 // FIXME(sky): Remove
1996 // or update the transform layer.
1997 if (!m_rootGraphicsLayer)
1998 return;
1999
2000 // FIXME(bokan): m_rootTransformLayer is always set here in pinch virtual vi ewport. This can go away once
2001 // that's default everywhere.
2002 if (!m_rootTransformLayer)
2003 m_rootTransformLayer = m_page->mainFrame()->view()->renderView()->compos itor()->ensureRootTransformLayer();
2004
2005 if (m_rootTransformLayer) {
2006 TransformationMatrix transform;
2007 transform.translate(m_rootLayerOffset.width, m_rootLayerOffset.height);
2008 transform = transform.scale(m_rootLayerScale);
2009 m_rootTransformLayer->setTransform(transform);
2010 }
2011 } 1969 }
2012 1970
2013 bool WebViewImpl::detectContentOnTouch(const WebPoint& position) 1971 bool WebViewImpl::detectContentOnTouch(const WebPoint& position)
2014 { 1972 {
2015 HitTestResult touchHit = hitTestResultForWindowPos(position); 1973 HitTestResult touchHit = hitTestResultForWindowPos(position);
2016 1974
2017 if (touchHit.isContentEditable()) 1975 if (touchHit.isContentEditable())
2018 return false; 1976 return false;
2019 1977
2020 Node* node = touchHit.innerNode(); 1978 Node* node = touchHit.innerNode();
(...skipping 22 matching lines...) Expand all
2043 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 2001 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
2044 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 2002 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
2045 } 2003 }
2046 2004
2047 bool WebViewImpl::shouldDisableDesktopWorkarounds() 2005 bool WebViewImpl::shouldDisableDesktopWorkarounds()
2048 { 2006 {
2049 return true; 2007 return true;
2050 } 2008 }
2051 2009
2052 } // namespace blink 2010 } // namespace blink
OLDNEW
« sky/engine/core/rendering/RenderObject.h ('K') | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698