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: sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 689283003: Remove scroll corners and resizers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 // FIXME(sky): Remove 622 // FIXME(sky): Remove
623 return false; 623 return false;
624 } 624 }
625 625
626 bool RenderLayerCompositor::requiresVerticalScrollbarLayer() const 626 bool RenderLayerCompositor::requiresVerticalScrollbarLayer() const
627 { 627 {
628 // FIXME(sky): Remove 628 // FIXME(sky): Remove
629 return false; 629 return false;
630 } 630 }
631 631
632 bool RenderLayerCompositor::requiresScrollCornerLayer() const
633 {
634 // FIXME(sky): Remove
635 return false;
636 }
637
638 void RenderLayerCompositor::updateOverflowControlsLayers() 632 void RenderLayerCompositor::updateOverflowControlsLayers()
639 { 633 {
640 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform Layer.get() : m_overflowControlsHostLayer.get(); 634 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform Layer.get() : m_overflowControlsHostLayer.get();
641 635
642 if (requiresHorizontalScrollbarLayer()) { 636 if (requiresHorizontalScrollbarLayer()) {
643 if (!m_layerForHorizontalScrollbar) { 637 if (!m_layerForHorizontalScrollbar) {
644 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this); 638 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this);
645 } 639 }
646 640
647 if (m_layerForHorizontalScrollbar->parent() != controlsParent) { 641 if (m_layerForHorizontalScrollbar->parent() != controlsParent) {
648 controlsParent->addChild(m_layerForHorizontalScrollbar.get()); 642 controlsParent->addChild(m_layerForHorizontalScrollbar.get());
649 } 643 }
650 } else if (m_layerForHorizontalScrollbar) { 644 } else if (m_layerForHorizontalScrollbar) {
651 m_layerForHorizontalScrollbar->removeFromParent(); 645 m_layerForHorizontalScrollbar->removeFromParent();
652 m_layerForHorizontalScrollbar = nullptr; 646 m_layerForHorizontalScrollbar = nullptr;
653 } 647 }
654 648
655 if (requiresVerticalScrollbarLayer()) { 649 if (requiresVerticalScrollbarLayer()) {
656 if (!m_layerForVerticalScrollbar) { 650 if (!m_layerForVerticalScrollbar) {
657 m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFac tory(), this); 651 m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFac tory(), this);
658 } 652 }
659 653
660 if (m_layerForVerticalScrollbar->parent() != controlsParent) { 654 if (m_layerForVerticalScrollbar->parent() != controlsParent) {
661 controlsParent->addChild(m_layerForVerticalScrollbar.get()); 655 controlsParent->addChild(m_layerForVerticalScrollbar.get());
662 } 656 }
663 } else if (m_layerForVerticalScrollbar) { 657 } else if (m_layerForVerticalScrollbar) {
664 m_layerForVerticalScrollbar->removeFromParent(); 658 m_layerForVerticalScrollbar->removeFromParent();
665 m_layerForVerticalScrollbar = nullptr; 659 m_layerForVerticalScrollbar = nullptr;
666 } 660 }
667
668 if (requiresScrollCornerLayer()) {
669 if (!m_layerForScrollCorner) {
670 m_layerForScrollCorner = GraphicsLayer::create(graphicsLayerFactory( ), this);
671 controlsParent->addChild(m_layerForScrollCorner.get());
672 }
673 } else if (m_layerForScrollCorner) {
674 m_layerForScrollCorner->removeFromParent();
675 m_layerForScrollCorner = nullptr;
676 }
677 } 661 }
678 662
679 void RenderLayerCompositor::ensureRootLayer() 663 void RenderLayerCompositor::ensureRootLayer()
680 { 664 {
681 RootLayerAttachment expectedAttachment = RootLayerAttachedViaChromeClient; 665 RootLayerAttachment expectedAttachment = RootLayerAttachedViaChromeClient;
682 if (expectedAttachment == m_rootLayerAttachment) 666 if (expectedAttachment == m_rootLayerAttachment)
683 return; 667 return;
684 668
685 if (!m_rootContentLayer) { 669 if (!m_rootContentLayer) {
686 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this) ; 670 m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this) ;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 if (m_layerForHorizontalScrollbar) { 720 if (m_layerForHorizontalScrollbar) {
737 m_layerForHorizontalScrollbar->removeFromParent(); 721 m_layerForHorizontalScrollbar->removeFromParent();
738 m_layerForHorizontalScrollbar = nullptr; 722 m_layerForHorizontalScrollbar = nullptr;
739 } 723 }
740 724
741 if (m_layerForVerticalScrollbar) { 725 if (m_layerForVerticalScrollbar) {
742 m_layerForVerticalScrollbar->removeFromParent(); 726 m_layerForVerticalScrollbar->removeFromParent();
743 m_layerForVerticalScrollbar = nullptr; 727 m_layerForVerticalScrollbar = nullptr;
744 } 728 }
745 729
746 if (m_layerForScrollCorner) {
747 m_layerForScrollCorner = nullptr;
748 }
749
750 if (m_overflowControlsHostLayer) { 730 if (m_overflowControlsHostLayer) {
751 m_overflowControlsHostLayer = nullptr; 731 m_overflowControlsHostLayer = nullptr;
752 m_containerLayer = nullptr; 732 m_containerLayer = nullptr;
753 m_scrollLayer = nullptr; 733 m_scrollLayer = nullptr;
754 } 734 }
755 ASSERT(!m_scrollLayer); 735 ASSERT(!m_scrollLayer);
756 m_rootContentLayer = nullptr; 736 m_rootContentLayer = nullptr;
757 m_rootTransformLayer = nullptr; 737 m_rootTransformLayer = nullptr;
758 } 738 }
759 739
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 if (graphicsLayer == m_rootContentLayer.get()) { 822 if (graphicsLayer == m_rootContentLayer.get()) {
843 name = "Content Root Layer"; 823 name = "Content Root Layer";
844 } else if (graphicsLayer == m_rootTransformLayer.get()) { 824 } else if (graphicsLayer == m_rootTransformLayer.get()) {
845 name = "Root Transform Layer"; 825 name = "Root Transform Layer";
846 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) { 826 } else if (graphicsLayer == m_overflowControlsHostLayer.get()) {
847 name = "Overflow Controls Host Layer"; 827 name = "Overflow Controls Host Layer";
848 } else if (graphicsLayer == m_layerForHorizontalScrollbar.get()) { 828 } else if (graphicsLayer == m_layerForHorizontalScrollbar.get()) {
849 name = "Horizontal Scrollbar Layer"; 829 name = "Horizontal Scrollbar Layer";
850 } else if (graphicsLayer == m_layerForVerticalScrollbar.get()) { 830 } else if (graphicsLayer == m_layerForVerticalScrollbar.get()) {
851 name = "Vertical Scrollbar Layer"; 831 name = "Vertical Scrollbar Layer";
852 } else if (graphicsLayer == m_layerForScrollCorner.get()) {
853 name = "Scroll Corner Layer";
854 } else if (graphicsLayer == m_containerLayer.get()) { 832 } else if (graphicsLayer == m_containerLayer.get()) {
855 name = "LocalFrame Clipping Layer"; 833 name = "LocalFrame Clipping Layer";
856 } else if (graphicsLayer == m_scrollLayer.get()) { 834 } else if (graphicsLayer == m_scrollLayer.get()) {
857 name = "LocalFrame Scrolling Layer"; 835 name = "LocalFrame Scrolling Layer";
858 } else { 836 } else {
859 ASSERT_NOT_REACHED(); 837 ASSERT_NOT_REACHED();
860 } 838 }
861 839
862 return name; 840 return name;
863 } 841 }
864 842
865 } // namespace blink 843 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/compositing/RenderLayerCompositor.h ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698