Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 998 return WebHistoryItem(frame()->page()->historyController().previousItemForEx port()); | 998 return WebHistoryItem(frame()->page()->historyController().previousItemForEx port()); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 WebHistoryItem WebFrameImpl::currentHistoryItem() const | 1001 WebHistoryItem WebFrameImpl::currentHistoryItem() const |
| 1002 { | 1002 { |
| 1003 ASSERT(frame()); | 1003 ASSERT(frame()); |
| 1004 | 1004 |
| 1005 // We're shutting down. | 1005 // We're shutting down. |
| 1006 if (!frame()->loader().documentLoader()) | 1006 if (!frame()->loader().documentLoader()) |
| 1007 return WebHistoryItem(); | 1007 return WebHistoryItem(); |
| 1008 | |
| 1009 // Lazily update the document state if it was dirtied. Doing it here | |
| 1010 // avoids synchronously serializing forms as they're changing. | |
| 1011 frame()->loader().saveDocumentState(); | |
|
Nate Chapin
2014/04/17 21:16:25
This whole function is already dead as a result of
| |
| 1012 | |
| 1013 return WebHistoryItem(frame()->page()->historyController().currentItemForExp ort()); | 1008 return WebHistoryItem(frame()->page()->historyController().currentItemForExp ort()); |
| 1014 } | 1009 } |
| 1015 | 1010 |
| 1016 void WebFrameImpl::enableViewSourceMode(bool enable) | 1011 void WebFrameImpl::enableViewSourceMode(bool enable) |
| 1017 { | 1012 { |
| 1018 if (frame()) | 1013 if (frame()) |
| 1019 frame()->setInViewSourceMode(enable); | 1014 frame()->setInViewSourceMode(enable); |
| 1020 } | 1015 } |
| 1021 | 1016 |
| 1022 bool WebFrameImpl::isViewSourceModeEnabled() const | 1017 bool WebFrameImpl::isViewSourceModeEnabled() const |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1989 | 1984 |
| 1990 void WebFrameImpl::invalidateAll() const | 1985 void WebFrameImpl::invalidateAll() const |
| 1991 { | 1986 { |
| 1992 ASSERT(frame() && frame()->view()); | 1987 ASSERT(frame() && frame()->view()); |
| 1993 FrameView* view = frame()->view(); | 1988 FrameView* view = frame()->view(); |
| 1994 view->invalidateRect(view->frameRect()); | 1989 view->invalidateRect(view->frameRect()); |
| 1995 invalidateScrollbar(); | 1990 invalidateScrollbar(); |
| 1996 } | 1991 } |
| 1997 | 1992 |
| 1998 } // namespace blink | 1993 } // namespace blink |
| OLD | NEW |