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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into scroll-boundary Created 3 years, 9 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "platform/graphics/CompositorFilterOperations.h" 70 #include "platform/graphics/CompositorFilterOperations.h"
71 #include "platform/graphics/CompositorMutableProperties.h" 71 #include "platform/graphics/CompositorMutableProperties.h"
72 #include "platform/graphics/GraphicsContext.h" 72 #include "platform/graphics/GraphicsContext.h"
73 #include "platform/graphics/paint/ClipDisplayItem.h" 73 #include "platform/graphics/paint/ClipDisplayItem.h"
74 #include "platform/graphics/paint/CullRect.h" 74 #include "platform/graphics/paint/CullRect.h"
75 #include "platform/graphics/paint/DrawingRecorder.h" 75 #include "platform/graphics/paint/DrawingRecorder.h"
76 #include "platform/graphics/paint/PaintController.h" 76 #include "platform/graphics/paint/PaintController.h"
77 #include "platform/graphics/paint/PaintRecordBuilder.h" 77 #include "platform/graphics/paint/PaintRecordBuilder.h"
78 #include "platform/graphics/paint/TransformDisplayItem.h" 78 #include "platform/graphics/paint/TransformDisplayItem.h"
79 #include "public/platform/WebLayerStickyPositionConstraint.h" 79 #include "public/platform/WebLayerStickyPositionConstraint.h"
80 #include "public/platform/WebScrollBoundaryBehavior.h"
80 #include "wtf/CurrentTime.h" 81 #include "wtf/CurrentTime.h"
81 #include "wtf/text/StringBuilder.h" 82 #include "wtf/text/StringBuilder.h"
82 83
83 namespace blink { 84 namespace blink {
84 85
85 using namespace HTMLNames; 86 using namespace HTMLNames;
86 87
87 static IntRect clipBox(LayoutBox& layoutObject); 88 static IntRect clipBox(LayoutBox& layoutObject);
88 89
89 static IntRect contentsRect(const LayoutObject& layoutObject) { 90 static IntRect contentsRect(const LayoutObject& layoutObject) {
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 updateBackgroundColor(); 1074 updateBackgroundColor();
1074 updateDrawsContent(); 1075 updateDrawsContent();
1075 updateElementIdAndCompositorMutableProperties(); 1076 updateElementIdAndCompositorMutableProperties();
1076 updateBackgroundPaintsOntoScrollingContentsLayer(); 1077 updateBackgroundPaintsOntoScrollingContentsLayer();
1077 updateContentsOpaque(); 1078 updateContentsOpaque();
1078 updateAfterPartResize(); 1079 updateAfterPartResize();
1079 updateRenderingContext(); 1080 updateRenderingContext();
1080 updateShouldFlattenTransform(); 1081 updateShouldFlattenTransform();
1081 updateChildrenTransform(); 1082 updateChildrenTransform();
1082 updateScrollParent(scrollParent()); 1083 updateScrollParent(scrollParent());
1084 updateScrollBoundaryBehavior();
bokan 2017/03/23 13:18:26 Hmm...I'm not sure CLM::updateGraphicsLayerGeometr
sunyunjia 2017/03/23 20:16:54 I checked the call stack, and found both CLM::upda
1083 registerScrollingLayers(); 1085 registerScrollingLayers();
1084 1086
1085 updateCompositingReasons(); 1087 updateCompositingReasons();
1086 } 1088 }
1087 1089
1090 void CompositedLayerMapping::updateScrollBoundaryBehavior() {
1091 ScrollBoundaryBehavior behavior =
1092 layoutObject().styleRef().getScrollBoundaryBehavior();
1093 if (m_scrollingContentsLayer) {
1094 m_scrollingContentsLayer->setScrollBoundaryBehavior(
1095 static_cast<WebScrollBoundaryBehavior>(behavior));
1096 }
1097 }
1098
1088 void CompositedLayerMapping::updateMainGraphicsLayerGeometry( 1099 void CompositedLayerMapping::updateMainGraphicsLayerGeometry(
1089 const IntRect& relativeCompositingBounds, 1100 const IntRect& relativeCompositingBounds,
1090 const IntRect& localCompositingBounds, 1101 const IntRect& localCompositingBounds,
1091 const IntPoint& graphicsLayerParentLocation) { 1102 const IntPoint& graphicsLayerParentLocation) {
1092 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() - 1103 m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() -
1093 graphicsLayerParentLocation)); 1104 graphicsLayerParentLocation));
1094 m_graphicsLayer->setOffsetFromLayoutObject( 1105 m_graphicsLayer->setOffsetFromLayoutObject(
1095 toIntSize(localCompositingBounds.location())); 1106 toIntSize(localCompositingBounds.location()));
1096 1107
1097 FloatSize oldSize = m_graphicsLayer->size(); 1108 FloatSize oldSize = m_graphicsLayer->size();
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3498 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { 3509 } else if (graphicsLayer == m_decorationOutlineLayer.get()) {
3499 name = "Decoration Layer"; 3510 name = "Decoration Layer";
3500 } else { 3511 } else {
3501 ASSERT_NOT_REACHED(); 3512 ASSERT_NOT_REACHED();
3502 } 3513 }
3503 3514
3504 return name; 3515 return name;
3505 } 3516 }
3506 3517
3507 } // namespace blink 3518 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698