| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 ViewportConstraints() | 68 ViewportConstraints() |
| 69 : m_anchorEdges(0) | 69 : m_anchorEdges(0) |
| 70 { } | 70 { } |
| 71 | 71 |
| 72 FloatSize m_alignmentOffset; | 72 FloatSize m_alignmentOffset; |
| 73 AnchorEdges m_anchorEdges; | 73 AnchorEdges m_anchorEdges; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class FixedPositionViewportConstraints FINAL : public ViewportConstraints { | 76 class FixedPositionViewportConstraints final : public ViewportConstraints { |
| 77 public: | 77 public: |
| 78 FixedPositionViewportConstraints() | 78 FixedPositionViewportConstraints() |
| 79 : ViewportConstraints() | 79 : ViewportConstraints() |
| 80 { } | 80 { } |
| 81 | 81 |
| 82 FixedPositionViewportConstraints(const FixedPositionViewportConstraints& oth
er) | 82 FixedPositionViewportConstraints(const FixedPositionViewportConstraints& oth
er) |
| 83 : ViewportConstraints(other) | 83 : ViewportConstraints(other) |
| 84 , m_viewportRectAtLastLayout(other.m_viewportRectAtLastLayout) | 84 , m_viewportRectAtLastLayout(other.m_viewportRectAtLastLayout) |
| 85 , m_layerPositionAtLastLayout(other.m_layerPositionAtLastLayout) | 85 , m_layerPositionAtLastLayout(other.m_layerPositionAtLastLayout) |
| 86 { } | 86 { } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 { | 97 { |
| 98 return m_alignmentOffset == other.m_alignmentOffset | 98 return m_alignmentOffset == other.m_alignmentOffset |
| 99 && m_anchorEdges == other.m_anchorEdges | 99 && m_anchorEdges == other.m_anchorEdges |
| 100 && m_viewportRectAtLastLayout == other.m_viewportRectAtLastLayout | 100 && m_viewportRectAtLastLayout == other.m_viewportRectAtLastLayout |
| 101 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; | 101 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool operator!=(const FixedPositionViewportConstraints& other) const { retur
n !(*this == other); } | 104 bool operator!=(const FixedPositionViewportConstraints& other) const { retur
n !(*this == other); } |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 virtual ConstraintType constraintType() const OVERRIDE { return FixedPositio
nConstaint; } | 107 virtual ConstraintType constraintType() const override { return FixedPositio
nConstaint; } |
| 108 | 108 |
| 109 FloatRect m_viewportRectAtLastLayout; | 109 FloatRect m_viewportRectAtLastLayout; |
| 110 FloatPoint m_layerPositionAtLastLayout; | 110 FloatPoint m_layerPositionAtLastLayout; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| 114 | 114 |
| 115 #endif // ScrollingConstraints_h | 115 #endif // ScrollingConstraints_h |
| OLD | NEW |