| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 void LocalDOMWindow::moveBy(int x, int y) const | 1226 void LocalDOMWindow::moveBy(int x, int y) const |
| 1227 { | 1227 { |
| 1228 if (!frame() || !frame()->isMainFrame()) | 1228 if (!frame() || !frame()->isMainFrame()) |
| 1229 return; | 1229 return; |
| 1230 | 1230 |
| 1231 FrameHost* host = frame()->host(); | 1231 FrameHost* host = frame()->host(); |
| 1232 if (!host) | 1232 if (!host) |
| 1233 return; | 1233 return; |
| 1234 | 1234 |
| 1235 IntRect windowRect = host->chromeClient().rootWindowRect(); | 1235 IntRect windowRect = host->chromeClient().rootWindowRect(); |
| 1236 windowRect.move(x, y); | 1236 windowRect.saturatedMove(x, y); |
| 1237 // Security check (the spec talks about UniversalBrowserWrite to disable thi
s check...) | 1237 // Security check (the spec talks about UniversalBrowserWrite to disable thi
s check...) |
| 1238 host->chromeClient().setWindowRectWithAdjustment(windowRect, *frame()); | 1238 host->chromeClient().setWindowRectWithAdjustment(windowRect, *frame()); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 void LocalDOMWindow::moveTo(int x, int y) const | 1241 void LocalDOMWindow::moveTo(int x, int y) const |
| 1242 { | 1242 { |
| 1243 if (!frame() || !frame()->isMainFrame()) | 1243 if (!frame() || !frame()->isMainFrame()) |
| 1244 return; | 1244 return; |
| 1245 | 1245 |
| 1246 FrameHost* host = frame()->host(); | 1246 FrameHost* host = frame()->host(); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 { | 1542 { |
| 1543 // If the LocalDOMWindow still has a frame reference, that frame must point | 1543 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1544 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1544 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1545 // where script execution leaks between different LocalDOMWindows. | 1545 // where script execution leaks between different LocalDOMWindows. |
| 1546 if (m_frameObserver->frame()) | 1546 if (m_frameObserver->frame()) |
| 1547 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1547 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
| 1548 return m_frameObserver->frame(); | 1548 return m_frameObserver->frame(); |
| 1549 } | 1549 } |
| 1550 | 1550 |
| 1551 } // namespace blink | 1551 } // namespace blink |
| OLD | NEW |