Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2258523006: Convert Settings::rootLayerScrolls to RuntimeEnabledFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 int elementId = 0; 1546 int elementId = 0;
1547 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone; 1547 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone;
1548 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone; 1548 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone;
1549 1549
1550 Node* owningNode = m_owningLayer.layoutObject()->node(); 1550 Node* owningNode = m_owningLayer.layoutObject()->node();
1551 Element* animatingElement = nullptr; 1551 Element* animatingElement = nullptr;
1552 const ComputedStyle* animatingStyle = nullptr; 1552 const ComputedStyle* animatingStyle = nullptr;
1553 if (owningNode) { 1553 if (owningNode) {
1554 Document& document = owningNode->document(); 1554 Document& document = owningNode->document();
1555 Element* scrollingElement = document.scrollingElement(); 1555 Element* scrollingElement = document.scrollingElement();
1556 LocalFrame* frame = document.frame(); 1556 if (owningNode->isElementNode() && (!RuntimeEnabledFeatures::rootLayerSc rollingEnabled() || owningNode != scrollingElement)) {
1557 Settings* settings = frame ? frame->settings() : nullptr;
1558 bool rootLayerScrolls = settings && settings->rootLayerScrolls();
1559 if (owningNode->isElementNode() && (!rootLayerScrolls || owningNode != s crollingElement)) {
1560 animatingElement = toElement(owningNode); 1557 animatingElement = toElement(owningNode);
1561 animatingStyle = m_owningLayer.layoutObject()->style(); 1558 animatingStyle = m_owningLayer.layoutObject()->style();
1562 } else if (owningNode->isDocumentNode() && rootLayerScrolls) { 1559 } else if (owningNode->isDocumentNode() && RuntimeEnabledFeatures::rootL ayerScrollingEnabled()) {
1563 owningNode = animatingElement = scrollingElement; 1560 owningNode = animatingElement = scrollingElement;
1564 if (scrollingElement) 1561 if (scrollingElement)
1565 animatingStyle = scrollingElement->layoutObject()->style(); 1562 animatingStyle = scrollingElement->layoutObject()->style();
1566 } 1563 }
1567 } 1564 }
1568 1565
1569 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement && animatingStyle->hasCompositorProxy()) { 1566 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement && animatingStyle->hasCompositorProxy()) {
1570 uint32_t compositorMutableProperties = animatingElement->compositorMutab leProperties(); 1567 uint32_t compositorMutableProperties = animatingElement->compositorMutab leProperties();
1571 elementId = DOMNodeIds::idForNode(owningNode); 1568 elementId = DOMNodeIds::idForNode(owningNode);
1572 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos itorMutableProperty::kTransform) & compositorMutableProperties; 1569 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos itorMutableProperty::kTransform) & compositorMutableProperties;
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2688 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2692 name = "Scrolling Contents Layer"; 2689 name = "Scrolling Contents Layer";
2693 } else { 2690 } else {
2694 ASSERT_NOT_REACHED(); 2691 ASSERT_NOT_REACHED();
2695 } 2692 }
2696 2693
2697 return name; 2694 return name;
2698 } 2695 }
2699 2696
2700 } // namespace blink 2697 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698