OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
597 } | 597 } |
598 } | 598 } |
599 | 599 |
600 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const | 600 bool WebFrameWidgetImpl::isAcceleratedCompositingActive() const |
601 { | 601 { |
602 return m_isAcceleratedCompositingActive; | 602 return m_isAcceleratedCompositingActive; |
603 } | 603 } |
604 | 604 |
605 void WebFrameWidgetImpl::willCloseLayerTreeView() | 605 void WebFrameWidgetImpl::willCloseLayerTreeView() |
606 { | 606 { |
607 if (page() && m_layerTreeView) | |
dcheng
2015/12/01 01:16:30
Out of curiosity... how can we have a null page he
loyso (OOO)
2015/12/01 05:41:03
There is a comment:
// Returns the page object
loyso (OOO)
2015/12/01 06:45:39
Well, we have it null here in fast/forms/ layout t
| |
608 page()->willCloseLayerTreeView(*m_layerTreeView); | |
609 | |
607 setIsAcceleratedCompositingActive(false); | 610 setIsAcceleratedCompositingActive(false); |
608 m_layerTreeView = nullptr; | 611 m_layerTreeView = nullptr; |
609 m_layerTreeViewClosed = true; | 612 m_layerTreeViewClosed = true; |
610 } | 613 } |
611 | 614 |
612 void WebFrameWidgetImpl::didChangeWindowResizerRect() | 615 void WebFrameWidgetImpl::didChangeWindowResizerRect() |
613 { | 616 { |
614 if (m_localRoot->frameView()) | 617 if (m_localRoot->frameView()) |
615 m_localRoot->frameView()->windowResizerRectChanged(); | 618 m_localRoot->frameView()->windowResizerRectChanged(); |
616 } | 619 } |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
971 { | 974 { |
972 if (m_client) { | 975 if (m_client) { |
973 m_client->initializeLayerTreeView(); | 976 m_client->initializeLayerTreeView(); |
974 m_layerTreeView = m_client->layerTreeView(); | 977 m_layerTreeView = m_client->layerTreeView(); |
975 } | 978 } |
976 | 979 |
977 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl()) | 980 if (WebDevToolsAgentImpl* devTools = m_localRoot->devToolsAgentImpl()) |
978 devTools->layerTreeViewChanged(m_layerTreeView); | 981 devTools->layerTreeViewChanged(m_layerTreeView); |
979 | 982 |
980 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); | 983 page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); |
984 if (m_layerTreeView) | |
985 page()->layerTreeViewInitialized(*m_layerTreeView); | |
981 | 986 |
982 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) | 987 // FIXME: only unittests, click to play, Android priting, and printing (for headers and footers) |
983 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. | 988 // make this assert necessary. We should make them not hit this code and the n delete allowsBrokenNullLayerTreeView. |
984 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); | 989 ASSERT(m_layerTreeView || !m_client || m_client->allowsBrokenNullLayerTreeVi ew()); |
985 } | 990 } |
986 | 991 |
987 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) | 992 void WebFrameWidgetImpl::setIsAcceleratedCompositingActive(bool active) |
988 { | 993 { |
989 // In the middle of shutting down; don't try to spin back up a compositor. | 994 // In the middle of shutting down; don't try to spin back up a compositor. |
990 // FIXME: compositing startup/shutdown should be refactored so that it | 995 // FIXME: compositing startup/shutdown should be refactored so that it |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1069 | 1074 |
1070 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) | 1075 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) |
1071 { | 1076 { |
1072 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); | 1077 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); |
1073 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 1078 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
1074 result.setToShadowHostIfInUserAgentShadowRoot(); | 1079 result.setToShadowHostIfInUserAgentShadowRoot(); |
1075 return result; | 1080 return result; |
1076 } | 1081 } |
1077 | 1082 |
1078 } // namespace blink | 1083 } // namespace blink |
OLD | NEW |