| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (m_frame->view()) | 123 if (m_frame->view()) |
| 124 m_frame->view()->clear(); | 124 m_frame->view()->clear(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void FrameLoader::finishedParsing() | 127 void FrameLoader::finishedParsing() |
| 128 { | 128 { |
| 129 // This can be called from the LocalFrame's destructor, in which case we sho
uldn't protect ourselves | 129 // This can be called from the LocalFrame's destructor, in which case we sho
uldn't protect ourselves |
| 130 // because doing so will cause us to re-enter the destructor when protector
goes out of scope. | 130 // because doing so will cause us to re-enter the destructor when protector
goes out of scope. |
| 131 // Null-checking the FrameView indicates whether or not we're in the destruc
tor. | 131 // Null-checking the FrameView indicates whether or not we're in the destruc
tor. |
| 132 RefPtr<LocalFrame> protector = m_frame->view() ? m_frame : 0; | 132 RefPtr<LocalFrame> protector = m_frame->view() ? m_frame : 0; |
| 133 | |
| 134 m_frame->document()->checkCompleted(); | 133 m_frame->document()->checkCompleted(); |
| 135 | |
| 136 // Check if the scrollbars are really needed for the content. | |
| 137 // If not, remove them, relayout, and repaint. | |
| 138 if (m_frame->view()) | |
| 139 m_frame->view()->restoreScrollbar(); | |
| 140 } | 134 } |
| 141 | 135 |
| 142 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) | 136 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) |
| 143 { | 137 { |
| 144 // FIXME(sky): Move this to Frame? | 138 // FIXME(sky): Move this to Frame? |
| 145 ASSERT(!url.isEmpty()); | 139 ASSERT(!url.isEmpty()); |
| 146 if (!frame) | 140 if (!frame) |
| 147 return; | 141 return; |
| 148 | 142 |
| 149 frame->document()->addConsoleMessage(ConsoleMessage::create(SecurityMessageS
ource, ErrorMessageLevel, "Not allowed to load local resource: " + url)); | 143 frame->document()->addConsoleMessage(ConsoleMessage::create(SecurityMessageS
ource, ErrorMessageLevel, "Not allowed to load local resource: " + url)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 168 // still parsing. Failure to do so can cause a world leak. | 162 // still parsing. Failure to do so can cause a world leak. |
| 169 if (m_frame->document()->parsing()) | 163 if (m_frame->document()->parsing()) |
| 170 stopLoading(); | 164 stopLoading(); |
| 171 | 165 |
| 172 m_frame->document()->fetcher()->stopFetching(); | 166 m_frame->document()->fetcher()->stopFetching(); |
| 173 | 167 |
| 174 m_inStopAllLoaders = false; | 168 m_inStopAllLoaders = false; |
| 175 } | 169 } |
| 176 | 170 |
| 177 } // namespace blink | 171 } // namespace blink |
| OLD | NEW |