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

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: Add RAII-style helper to toggle REF. Rebase. Created 4 years, 3 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 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 int elementId = 0; 1566 int elementId = 0;
1567 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone; 1567 uint32_t primaryMutableProperties = CompositorMutableProperty::kNone;
1568 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone; 1568 uint32_t scrollMutableProperties = CompositorMutableProperty::kNone;
1569 1569
1570 Node* owningNode = m_owningLayer.layoutObject()->node(); 1570 Node* owningNode = m_owningLayer.layoutObject()->node();
1571 Element* animatingElement = nullptr; 1571 Element* animatingElement = nullptr;
1572 const ComputedStyle* animatingStyle = nullptr; 1572 const ComputedStyle* animatingStyle = nullptr;
1573 if (owningNode) { 1573 if (owningNode) {
1574 Document& document = owningNode->document(); 1574 Document& document = owningNode->document();
1575 Element* scrollingElement = document.scrollingElement(); 1575 Element* scrollingElement = document.scrollingElement();
1576 LocalFrame* frame = document.frame(); 1576 if (owningNode->isElementNode() && (!RuntimeEnabledFeatures::rootLayerSc rollingEnabled() || owningNode != scrollingElement)) {
1577 Settings* settings = frame ? frame->settings() : nullptr;
1578 bool rootLayerScrolls = settings && settings->rootLayerScrolls();
1579 if (owningNode->isElementNode() && (!rootLayerScrolls || owningNode != s crollingElement)) {
1580 animatingElement = toElement(owningNode); 1577 animatingElement = toElement(owningNode);
1581 animatingStyle = m_owningLayer.layoutObject()->style(); 1578 animatingStyle = m_owningLayer.layoutObject()->style();
1582 } else if (owningNode->isDocumentNode() && rootLayerScrolls) { 1579 } else if (owningNode->isDocumentNode() && RuntimeEnabledFeatures::rootL ayerScrollingEnabled()) {
1583 owningNode = animatingElement = scrollingElement; 1580 owningNode = animatingElement = scrollingElement;
1584 if (scrollingElement) 1581 if (scrollingElement)
1585 animatingStyle = scrollingElement->layoutObject()->style(); 1582 animatingStyle = scrollingElement->layoutObject()->style();
1586 } 1583 }
1587 } 1584 }
1588 1585
1589 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement && animatingStyle->hasCompositorProxy()) { 1586 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && animatingElement && animatingStyle->hasCompositorProxy()) {
1590 uint32_t compositorMutableProperties = animatingElement->compositorMutab leProperties(); 1587 uint32_t compositorMutableProperties = animatingElement->compositorMutab leProperties();
1591 elementId = DOMNodeIds::idForNode(owningNode); 1588 elementId = DOMNodeIds::idForNode(owningNode);
1592 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos itorMutableProperty::kTransform) & compositorMutableProperties; 1589 primaryMutableProperties = (CompositorMutableProperty::kOpacity | Compos itorMutableProperty::kTransform) & compositorMutableProperties;
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2708 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2712 name = "Scrolling Contents Layer"; 2709 name = "Scrolling Contents Layer";
2713 } else { 2710 } else {
2714 ASSERT_NOT_REACHED(); 2711 ASSERT_NOT_REACHED();
2715 } 2712 }
2716 2713
2717 return name; 2714 return name;
2718 } 2715 }
2719 2716
2720 } // namespace blink 2717 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698