OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 | 1296 |
1297 if (needsSquashingLayers) { | 1297 if (needsSquashingLayers) { |
1298 ASSERT(compositor()->layerSquashingEnabled()); | 1298 ASSERT(compositor()->layerSquashingEnabled()); |
1299 | 1299 |
1300 if (!m_squashingLayer) { | 1300 if (!m_squashingLayer) { |
1301 ASSERT(!m_squashingContainmentLayer); | 1301 ASSERT(!m_squashingContainmentLayer); |
1302 | 1302 |
1303 m_squashingLayer = createGraphicsLayer(CompositingReasonOverlap); | 1303 m_squashingLayer = createGraphicsLayer(CompositingReasonOverlap); |
1304 m_squashingLayer->setDrawsContent(true); | 1304 m_squashingLayer->setDrawsContent(true); |
1305 m_squashingLayer->setNeedsDisplay(); | 1305 m_squashingLayer->setNeedsDisplay(); |
1306 layersChanged = true; | |
1307 | 1306 |
1308 // FIXME: containment layer needs a new CompositingReason, Compositi
ngReasonOverlap is not appropriate. | 1307 // FIXME: containment layer needs a new CompositingReason, Compositi
ngReasonOverlap is not appropriate. |
1309 m_squashingContainmentLayer = createGraphicsLayer(CompositingReasonO
verlap); | 1308 m_squashingContainmentLayer = createGraphicsLayer(CompositingReasonO
verlap); |
1310 // FIXME: reflections should force transform-style to be flat in the
style: https://bugs.webkit.org/show_bug.cgi?id=106959 | 1309 // FIXME: reflections should force transform-style to be flat in the
style: https://bugs.webkit.org/show_bug.cgi?id=106959 |
1311 bool preserves3D = renderer()->style()->transformStyle3D() == Transf
ormStyle3DPreserve3D && !renderer()->hasReflection(); | 1310 bool preserves3D = renderer()->style()->transformStyle3D() == Transf
ormStyle3DPreserve3D && !renderer()->hasReflection(); |
1312 m_squashingContainmentLayer->setPreserves3D(preserves3D); | 1311 m_squashingContainmentLayer->setPreserves3D(preserves3D); |
1313 layersChanged = true; | 1312 layersChanged = true; |
1314 } | 1313 } |
1315 | 1314 |
1316 ASSERT(m_squashingLayer && m_squashingContainmentLayer); | 1315 ASSERT(m_squashingLayer && m_squashingContainmentLayer); |
1317 } else { | 1316 } else { |
1318 if (m_squashingLayer) { | 1317 if (m_squashingLayer) { |
1319 m_squashingLayer->removeFromParent(); | 1318 m_squashingLayer->removeFromParent(); |
1320 m_squashingLayer = nullptr; | 1319 m_squashingLayer = nullptr; |
1321 layersChanged = true; | |
1322 // FIXME: do we need to invalidate something here? | 1320 // FIXME: do we need to invalidate something here? |
1323 | 1321 |
1324 ASSERT(m_squashingContainmentLayer); | 1322 ASSERT(m_squashingContainmentLayer); |
1325 m_squashingContainmentLayer->removeFromParent(); | 1323 m_squashingContainmentLayer->removeFromParent(); |
1326 m_squashingContainmentLayer = nullptr; | 1324 m_squashingContainmentLayer = nullptr; |
1327 layersChanged = true; | 1325 layersChanged = true; |
1328 } | 1326 } |
1329 | 1327 |
1330 ASSERT(!m_squashingLayer && !m_squashingContainmentLayer); | 1328 ASSERT(!m_squashingLayer && !m_squashingContainmentLayer); |
1331 } | 1329 } |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2202 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2200 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2203 name = "Scrolling Contents Layer"; | 2201 name = "Scrolling Contents Layer"; |
2204 } else { | 2202 } else { |
2205 ASSERT_NOT_REACHED(); | 2203 ASSERT_NOT_REACHED(); |
2206 } | 2204 } |
2207 | 2205 |
2208 return name; | 2206 return name; |
2209 } | 2207 } |
2210 | 2208 |
2211 } // namespace WebCore | 2209 } // namespace WebCore |
OLD | NEW |