OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 | 27 |
28 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 28 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
29 | 29 |
30 #include "core/animation/DocumentAnimations.h" | 30 #include "core/animation/DocumentAnimations.h" |
| 31 #include "core/dom/DOMNodeIds.h" |
31 #include "core/dom/Fullscreen.h" | 32 #include "core/dom/Fullscreen.h" |
32 #include "core/editing/FrameSelection.h" | 33 #include "core/editing/FrameSelection.h" |
33 #include "core/frame/FrameHost.h" | 34 #include "core/frame/FrameHost.h" |
34 #include "core/frame/FrameView.h" | 35 #include "core/frame/FrameView.h" |
35 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
36 #include "core/frame/Settings.h" | 37 #include "core/frame/Settings.h" |
37 #include "core/html/HTMLIFrameElement.h" | 38 #include "core/html/HTMLIFrameElement.h" |
38 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
39 #include "core/inspector/InspectorNodeIds.h" | |
40 #include "core/layout/LayoutPart.h" | 40 #include "core/layout/LayoutPart.h" |
41 #include "core/layout/LayoutVideo.h" | 41 #include "core/layout/LayoutVideo.h" |
42 #include "core/layout/LayoutView.h" | 42 #include "core/layout/LayoutView.h" |
43 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" | 43 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" |
44 #include "core/layout/compositing/CompositingInputsUpdater.h" | 44 #include "core/layout/compositing/CompositingInputsUpdater.h" |
45 #include "core/layout/compositing/CompositingLayerAssigner.h" | 45 #include "core/layout/compositing/CompositingLayerAssigner.h" |
46 #include "core/layout/compositing/CompositingRequirementsUpdater.h" | 46 #include "core/layout/compositing/CompositingRequirementsUpdater.h" |
47 #include "core/layout/compositing/GraphicsLayerTreeBuilder.h" | 47 #include "core/layout/compositing/GraphicsLayerTreeBuilder.h" |
48 #include "core/layout/compositing/GraphicsLayerUpdater.h" | 48 #include "core/layout/compositing/GraphicsLayerUpdater.h" |
49 #include "core/loader/FrameLoaderClient.h" | 49 #include "core/loader/FrameLoaderClient.h" |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 RootLayerAttachment expectedAttachment = m_layoutView.frame()->isLocalRoot()
? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame; | 956 RootLayerAttachment expectedAttachment = m_layoutView.frame()->isLocalRoot()
? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame; |
957 if (expectedAttachment == m_rootLayerAttachment) | 957 if (expectedAttachment == m_rootLayerAttachment) |
958 return; | 958 return; |
959 | 959 |
960 Settings* settings = m_layoutView.document().settings(); | 960 Settings* settings = m_layoutView.document().settings(); |
961 if (!m_rootContentLayer) { | 961 if (!m_rootContentLayer) { |
962 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this)
; | 962 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this)
; |
963 IntRect overflowRect = m_layoutView.pixelSnappedLayoutOverflowRect(); | 963 IntRect overflowRect = m_layoutView.pixelSnappedLayoutOverflowRect(); |
964 m_rootContentLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.
maxY())); | 964 m_rootContentLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.
maxY())); |
965 m_rootContentLayer->setPosition(FloatPoint()); | 965 m_rootContentLayer->setPosition(FloatPoint()); |
966 m_rootContentLayer->setOwnerNodeId(InspectorNodeIds::idForNode(m_layoutV
iew.generatingNode())); | 966 m_rootContentLayer->setOwnerNodeId(DOMNodeIds::idForNode(m_layoutView.ge
neratingNode())); |
967 | 967 |
968 // FIXME: with rootLayerScrolls, we probably don't even need m_rootConte
ntLayer? | 968 // FIXME: with rootLayerScrolls, we probably don't even need m_rootConte
ntLayer? |
969 if (!(settings && settings->rootLayerScrolls())) { | 969 if (!(settings && settings->rootLayerScrolls())) { |
970 // Need to clip to prevent transformed content showing outside this
frame | 970 // Need to clip to prevent transformed content showing outside this
frame |
971 m_rootContentLayer->setMasksToBounds(true); | 971 m_rootContentLayer->setMasksToBounds(true); |
972 } | 972 } |
973 } | 973 } |
974 | 974 |
975 if (!m_overflowControlsHostLayer) { | 975 if (!m_overflowControlsHostLayer) { |
976 ASSERT(!m_scrollLayer); | 976 ASSERT(!m_scrollLayer); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 } else if (graphicsLayer == m_scrollLayer.get()) { | 1159 } else if (graphicsLayer == m_scrollLayer.get()) { |
1160 name = "LocalFrame Scrolling Layer"; | 1160 name = "LocalFrame Scrolling Layer"; |
1161 } else { | 1161 } else { |
1162 ASSERT_NOT_REACHED(); | 1162 ASSERT_NOT_REACHED(); |
1163 } | 1163 } |
1164 | 1164 |
1165 return name; | 1165 return name; |
1166 } | 1166 } |
1167 | 1167 |
1168 } // namespace blink | 1168 } // namespace blink |
OLD | NEW |