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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 969 |
970 m_renderView.frameView()->positionScrollbarLayers(); | 970 m_renderView.frameView()->positionScrollbarLayers(); |
971 } | 971 } |
972 | 972 |
973 void RenderLayerCompositor::ensureRootLayer() | 973 void RenderLayerCompositor::ensureRootLayer() |
974 { | 974 { |
975 RootLayerAttachment expectedAttachment = m_renderView.frame()->isLocalRoot()
? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame; | 975 RootLayerAttachment expectedAttachment = m_renderView.frame()->isLocalRoot()
? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame; |
976 if (expectedAttachment == m_rootLayerAttachment) | 976 if (expectedAttachment == m_rootLayerAttachment) |
977 return; | 977 return; |
978 | 978 |
| 979 Settings* settings = m_renderView.document().settings(); |
979 if (!m_rootContentLayer) { | 980 if (!m_rootContentLayer) { |
980 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this)
; | 981 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this)
; |
981 IntRect overflowRect = m_renderView.pixelSnappedLayoutOverflowRect(); | 982 IntRect overflowRect = m_renderView.pixelSnappedLayoutOverflowRect(); |
982 m_rootContentLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.
maxY())); | 983 m_rootContentLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.
maxY())); |
983 m_rootContentLayer->setPosition(FloatPoint()); | 984 m_rootContentLayer->setPosition(FloatPoint()); |
984 m_rootContentLayer->setOwnerNodeId(InspectorNodeIds::idForNode(m_renderV
iew.generatingNode())); | 985 m_rootContentLayer->setOwnerNodeId(InspectorNodeIds::idForNode(m_renderV
iew.generatingNode())); |
985 | 986 |
986 // Need to clip to prevent transformed content showing outside this fram
e | 987 // FIXME: with rootLayerScrolls, we probably don't even need m_rootConte
ntLayer? |
987 m_rootContentLayer->setMasksToBounds(true); | 988 if (!(settings && settings->rootLayerScrolls())) { |
| 989 // Need to clip to prevent transformed content showing outside this
frame |
| 990 m_rootContentLayer->setMasksToBounds(true); |
| 991 } |
988 } | 992 } |
989 | 993 |
990 if (!m_overflowControlsHostLayer) { | 994 if (!m_overflowControlsHostLayer) { |
991 ASSERT(!m_scrollLayer); | 995 ASSERT(!m_scrollLayer); |
992 ASSERT(!m_containerLayer); | 996 ASSERT(!m_containerLayer); |
993 | 997 |
994 // Create a layer to host the clipping layer and the overflow controls l
ayers. | 998 // Create a layer to host the clipping layer and the overflow controls l
ayers. |
995 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory
(), this); | 999 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory
(), this); |
996 | 1000 |
997 // Clip iframe's overflow controls layer. | 1001 // Clip iframe's overflow controls layer. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 } else if (graphicsLayer == m_scrollLayer.get()) { | 1193 } else if (graphicsLayer == m_scrollLayer.get()) { |
1190 name = "LocalFrame Scrolling Layer"; | 1194 name = "LocalFrame Scrolling Layer"; |
1191 } else { | 1195 } else { |
1192 ASSERT_NOT_REACHED(); | 1196 ASSERT_NOT_REACHED(); |
1193 } | 1197 } |
1194 | 1198 |
1195 return name; | 1199 return name; |
1196 } | 1200 } |
1197 | 1201 |
1198 } // namespace blink | 1202 } // namespace blink |
OLD | NEW |