| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 bool DocumentLoader::maybeLoadEmpty() | 587 bool DocumentLoader::maybeLoadEmpty() |
| 588 { | 588 { |
| 589 bool shouldLoadEmpty = !m_substituteData.isValid() && (m_request.url().isEmp
ty() || SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(m_request.url().proto
col())); | 589 bool shouldLoadEmpty = !m_substituteData.isValid() && (m_request.url().isEmp
ty() || SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(m_request.url().proto
col())); |
| 590 if (!shouldLoadEmpty) | 590 if (!shouldLoadEmpty) |
| 591 return false; | 591 return false; |
| 592 | 592 |
| 593 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni
tialEmptyDocument()) | 593 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni
tialEmptyDocument()) |
| 594 m_request.setURL(blankURL()); | 594 m_request.setURL(blankURL()); |
| 595 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str
ing()); | 595 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str
ing()); |
| 596 m_applicationCacheHost->didReceiveResponseForMainResource(m_response); |
| 596 finishedLoading(monotonicallyIncreasingTime()); | 597 finishedLoading(monotonicallyIncreasingTime()); |
| 597 return true; | 598 return true; |
| 598 } | 599 } |
| 599 | 600 |
| 600 void DocumentLoader::startLoadingMainResource() | 601 void DocumentLoader::startLoadingMainResource() |
| 601 { | 602 { |
| 602 timing().markNavigationStart(); | 603 timing().markNavigationStart(); |
| 603 ASSERT(!m_mainResource); | 604 ASSERT(!m_mainResource); |
| 604 ASSERT(m_state == NotStarted); | 605 ASSERT(m_state == NotStarted); |
| 605 m_state = Provisional; | 606 m_state = Provisional; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 { | 674 { |
| 674 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); | 675 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); |
| 675 if (!source.isNull()) | 676 if (!source.isNull()) |
| 676 m_writer->appendReplacingData(source); | 677 m_writer->appendReplacingData(source); |
| 677 endWriting(m_writer.get()); | 678 endWriting(m_writer.get()); |
| 678 } | 679 } |
| 679 | 680 |
| 680 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 681 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 681 | 682 |
| 682 } // namespace blink | 683 } // namespace blink |
| OLD | NEW |