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

Unified Diff: third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h

Issue 2251303003: Implement position: sticky updates on compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add unit test for impl side sticky position update. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.h b/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
similarity index 62%
copy from third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.h
copy to third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
index cd68f1171a62c553f8546a46797bd42518e1744b..8a7fe5ea93b934b8997b850ecbe1ad6b8533a721 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceRotationRate.h
+++ b/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
@@ -23,34 +23,39 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DeviceRotationRate_h
-#define DeviceRotationRate_h
-
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "modules/device_orientation/DeviceMotionData.h"
-#include "platform/heap/Handle.h"
+#ifndef WebLayerStickyPositionConstraint_h
+#define WebLayerStickyPositionConstraint_h
namespace blink {
-class DeviceRotationRate final : public GarbageCollected<DeviceRotationRate>, public ScriptWrappable {
- DEFINE_WRAPPERTYPEINFO();
-public:
- static DeviceRotationRate* create(DeviceMotionData::RotationRate* rotationRate)
+// TODO(flackr): Combine with WebLayerPositionConstraint.
+struct WebLayerStickyPositionConstraint {
+ bool isSticky : 1;
+ bool isAnchoredLeft : 1;
+ bool isAnchoredRight : 1;
+ bool isAnchoredTop : 1;
+ bool isAnchoredBottom : 1;
+ float leftOffset;
+ float rightOffset;
+ float topOffset;
+ float bottomOffset;
+ WebRect absoluteStickyBoxRect;
+ WebRect absoluteContainingBlockRect;
+ WebLayerStickyPositionConstraint()
+ : isSticky(false)
+ , isAnchoredLeft(false)
+ , isAnchoredRight(false)
+ , isAnchoredTop(false)
+ , isAnchoredBottom(false)
+ , leftOffset(0.f)
+ , rightOffset(0.f)
+ , topOffset(0.f)
+ , bottomOffset(0.f)
{
- return new DeviceRotationRate(rotationRate);
}
- DECLARE_TRACE();
-
- double alpha(bool& isNull) const;
- double beta(bool& isNull) const;
- double gamma(bool& isNull) const;
-
-private:
- explicit DeviceRotationRate(DeviceMotionData::RotationRate*);
-
- Member<DeviceMotionData::RotationRate> m_rotationRate;
};
} // namespace blink
-#endif // DeviceRotationRate_h
+#endif // WebLayerStickyPositionConstraint_h
+

Powered by Google App Engine
This is Rietveld 408576698