| 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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 int elementId = 0; | 1549 int elementId = 0; |
| 1550 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone; | 1550 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone; |
| 1551 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone; | 1551 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone; |
| 1552 | 1552 |
| 1553 Node* owningNode = m_owningLayer.layoutObject()->node(); | 1553 Node* owningNode = m_owningLayer.layoutObject()->node(); |
| 1554 Element* animatingElement = nullptr; | 1554 Element* animatingElement = nullptr; |
| 1555 const ComputedStyle* animatingStyle = nullptr; | 1555 const ComputedStyle* animatingStyle = nullptr; |
| 1556 if (owningNode) { | 1556 if (owningNode) { |
| 1557 Document& document = owningNode->document(); | 1557 Document& document = owningNode->document(); |
| 1558 Element* scrollingElement = document.scrollingElement(); | 1558 Element* scrollingElement = document.scrollingElement(); |
| 1559 LocalFrame* frame = document.frame(); | 1559 if (owningNode->isElementNode() && (!RuntimeEnabledFeatures::rootLayerSc
rollingEnabled() || owningNode != scrollingElement)) { |
| 1560 Settings* settings = frame ? frame->settings() : nullptr; | |
| 1561 bool rootLayerScrolls = settings && settings->rootLayerScrolls(); | |
| 1562 if (owningNode->isElementNode() && (!rootLayerScrolls || owningNode != s
crollingElement)) { | |
| 1563 animatingElement = toElement(owningNode); | 1560 animatingElement = toElement(owningNode); |
| 1564 animatingStyle = m_owningLayer.layoutObject()->style(); | 1561 animatingStyle = m_owningLayer.layoutObject()->style(); |
| 1565 } else if (owningNode->isDocumentNode() && rootLayerScrolls) { | 1562 } else if (owningNode->isDocumentNode() && RuntimeEnabledFeatures::rootL
ayerScrollingEnabled()) { |
| 1566 owningNode = animatingElement = scrollingElement; | 1563 owningNode = animatingElement = scrollingElement; |
| 1567 if (scrollingElement) | 1564 if (scrollingElement) |
| 1568 animatingStyle = scrollingElement->layoutObject()->style(); | 1565 animatingStyle = scrollingElement->layoutObject()->style(); |
| 1569 } | 1566 } |
| 1570 } | 1567 } |
| 1571 | 1568 |
| 1572 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement &&
animatingStyle->hasCompositorProxy()) { | 1569 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement &&
animatingStyle->hasCompositorProxy()) { |
| 1573 uint32_t compositorMutableProperties = animatingElement->compositorMutab
leProperties(); | 1570 uint32_t compositorMutableProperties = animatingElement->compositorMutab
leProperties(); |
| 1574 elementId = DOMNodeIds::idForNode(owningNode); | 1571 elementId = DOMNodeIds::idForNode(owningNode); |
| 1575 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos
itorMutableProperty::kTransform) & compositorMutableProperties; | 1572 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos
itorMutableProperty::kTransform) & compositorMutableProperties; |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2691 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2695 name = "Scrolling Contents Layer"; | 2692 name = "Scrolling Contents Layer"; |
| 2696 } else { | 2693 } else { |
| 2697 ASSERT_NOT_REACHED(); | 2694 ASSERT_NOT_REACHED(); |
| 2698 } | 2695 } |
| 2699 | 2696 |
| 2700 return name; | 2697 return name; |
| 2701 } | 2698 } |
| 2702 | 2699 |
| 2703 } // namespace blink | 2700 } // namespace blink |
| OLD | NEW |