| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Constrain the window position within the valid screen area. | 61 // Constrain the window position within the valid screen area. |
| 62 window.SetX(std::max(screen.X(), | 62 window.SetX(std::max(screen.X(), |
| 63 std::min(window.X(), screen.MaxX() - window.Width()))); | 63 std::min(window.X(), screen.MaxX() - window.Width()))); |
| 64 window.SetY(std::max(screen.Y(), | 64 window.SetY(std::max(screen.Y(), |
| 65 std::min(window.Y(), screen.MaxY() - window.Height()))); | 65 std::min(window.Y(), screen.MaxY() - window.Height()))); |
| 66 SetWindowRect(window, frame); | 66 SetWindowRect(window, frame); |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool ChromeClient::CanOpenModalIfDuringPageDismissal( | 69 bool ChromeClient::CanOpenModalIfDuringPageDismissal( |
| 70 Frame* main_frame, | 70 Frame& main_frame, |
| 71 ChromeClient::DialogType dialog, | 71 ChromeClient::DialogType dialog, |
| 72 const String& message) { | 72 const String& message) { |
| 73 for (Frame* frame = main_frame; frame; frame = frame->Tree().TraverseNext()) { | 73 for (Frame* frame = &main_frame; frame; |
| 74 frame = frame->Tree().TraverseNext()) { |
| 74 if (!frame->IsLocalFrame()) | 75 if (!frame->IsLocalFrame()) |
| 75 continue; | 76 continue; |
| 76 LocalFrame& local_frame = ToLocalFrame(*frame); | 77 LocalFrame& local_frame = ToLocalFrame(*frame); |
| 77 Document::PageDismissalType dismissal = | 78 Document::PageDismissalType dismissal = |
| 78 local_frame.GetDocument()->PageDismissalEventBeingDispatched(); | 79 local_frame.GetDocument()->PageDismissalEventBeingDispatched(); |
| 79 if (dismissal != Document::kNoDismissal) { | 80 if (dismissal != Document::kNoDismissal) { |
| 80 return ShouldOpenModalDialogDuringPageDismissal(local_frame, dialog, | 81 return ShouldOpenModalDialogDuringPageDismissal(local_frame, dialog, |
| 81 message, dismissal); | 82 message, dismissal); |
| 82 } | 83 } |
| 83 } | 84 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // Suspend pages in case the client method runs a new event loop that would | 234 // Suspend pages in case the client method runs a new event loop that would |
| 234 // otherwise cause the load to continue while we're in the middle of | 235 // otherwise cause the load to continue while we're in the middle of |
| 235 // executing JavaScript. | 236 // executing JavaScript. |
| 236 ScopedPageSuspender suspender; | 237 ScopedPageSuspender suspender; |
| 237 | 238 |
| 238 PrintDelegate(frame); | 239 PrintDelegate(frame); |
| 239 return true; | 240 return true; |
| 240 } | 241 } |
| 241 | 242 |
| 242 } // namespace blink | 243 } // namespace blink |
| OLD | NEW |