| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // This test documents the existing behavior so that we are aware when/if | 150 // This test documents the existing behavior so that we are aware when/if |
| 151 // it changes. It would also be reasonable for addContentsVisualOverflow to | 151 // it changes. It would also be reasonable for addContentsVisualOverflow to |
| 152 // expand in this situation. | 152 // expand in this situation. |
| 153 m_overflow.addContentsVisualOverflow(LayoutRect(0, 0, 10, 10)); | 153 m_overflow.addContentsVisualOverflow(LayoutRect(0, 0, 10, 10)); |
| 154 m_overflow.addContentsVisualOverflow(LayoutRect(20, 20, 0, 0)); | 154 m_overflow.addContentsVisualOverflow(LayoutRect(20, 20, 0, 0)); |
| 155 EXPECT_EQ(LayoutRect(0, 0, 10, 10), m_overflow.contentsVisualOverflowRect())
; | 155 EXPECT_EQ(LayoutRect(0, 0, 10, 10), m_overflow.contentsVisualOverflowRect())
; |
| 156 } | 156 } |
| 157 | 157 |
| 158 TEST_F(OverflowModelTest, MoveAffectsLayoutOverflow) | 158 TEST_F(OverflowModelTest, MoveAffectsLayoutOverflow) |
| 159 { | 159 { |
| 160 m_overflow.move(500, 100); | 160 m_overflow.move(LayoutUnit(500), LayoutUnit(100)); |
| 161 EXPECT_EQ(LayoutRect(510, 110, 80, 80), m_overflow.layoutOverflowRect()); | 161 EXPECT_EQ(LayoutRect(510, 110, 80, 80), m_overflow.layoutOverflowRect()); |
| 162 } | 162 } |
| 163 | 163 |
| 164 TEST_F(OverflowModelTest, MoveAffectsVisualOverflow) | 164 TEST_F(OverflowModelTest, MoveAffectsVisualOverflow) |
| 165 { | 165 { |
| 166 m_overflow.move(500, 100); | 166 m_overflow.move(LayoutUnit(500), LayoutUnit(100)); |
| 167 EXPECT_EQ(LayoutRect(500, 100, 100, 100), m_overflow.visualOverflowRect()); | 167 EXPECT_EQ(LayoutRect(500, 100, 100, 100), m_overflow.visualOverflowRect()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 TEST_F(OverflowModelTest, MoveAffectsContentsVisualOverflow) | 170 TEST_F(OverflowModelTest, MoveAffectsContentsVisualOverflow) |
| 171 { | 171 { |
| 172 m_overflow.addContentsVisualOverflow(LayoutRect(0, 0, 10, 10)); | 172 m_overflow.addContentsVisualOverflow(LayoutRect(0, 0, 10, 10)); |
| 173 m_overflow.move(500, 100); | 173 m_overflow.move(LayoutUnit(500), LayoutUnit(100)); |
| 174 EXPECT_EQ(LayoutRect(500, 100, 10, 10), m_overflow.contentsVisualOverflowRec
t()); | 174 EXPECT_EQ(LayoutRect(500, 100, 10, 10), m_overflow.contentsVisualOverflowRec
t()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // anonymous namespace | 177 } // anonymous namespace |
| 178 } // namespace blink | 178 } // namespace blink |
| OLD | NEW |