| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 void Document::setParsing(bool b) | 1436 void Document::setParsing(bool b) |
| 1437 { | 1437 { |
| 1438 m_isParsing = b; | 1438 m_isParsing = b; |
| 1439 | 1439 |
| 1440 if (m_isParsing && !m_elementDataCache) | 1440 if (m_isParsing && !m_elementDataCache) |
| 1441 m_elementDataCache = ElementDataCache::create(); | 1441 m_elementDataCache = ElementDataCache::create(); |
| 1442 } | 1442 } |
| 1443 | 1443 |
| 1444 bool Document::shouldScheduleLayout() const | 1444 bool Document::shouldScheduleLayout() const |
| 1445 { | 1445 { |
| 1446 // This function will only be called when FrameView thinks a layout is neede
d. | 1446 return isActive(); |
| 1447 // This enforces a couple extra rules. | |
| 1448 // | |
| 1449 // (a) Only schedule a layout once the stylesheets are loaded. | |
| 1450 // (b) Only schedule layout once we have a body element. | |
| 1451 if (!isActive()) | |
| 1452 return false; | |
| 1453 | |
| 1454 if (isRenderingReady()) | |
| 1455 return true; | |
| 1456 | |
| 1457 return false; | |
| 1458 } | 1447 } |
| 1459 | 1448 |
| 1460 int Document::elapsedTime() const | 1449 int Document::elapsedTime() const |
| 1461 { | 1450 { |
| 1462 return static_cast<int>((currentTime() - m_startTime) * 1000); | 1451 return static_cast<int>((currentTime() - m_startTime) * 1000); |
| 1463 } | 1452 } |
| 1464 | 1453 |
| 1465 const KURL& Document::virtualURL() const | 1454 const KURL& Document::virtualURL() const |
| 1466 { | 1455 { |
| 1467 return m_url; | 1456 return m_url; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1519 didLoadAllParserBlockingResources(); | 1508 didLoadAllParserBlockingResources(); |
| 1520 } | 1509 } |
| 1521 | 1510 |
| 1522 void Document::didLoadAllParserBlockingResources() | 1511 void Document::didLoadAllParserBlockingResources() |
| 1523 { | 1512 { |
| 1524 m_resumeParserWaitingForResourcesTimer.startOneShot(0, FROM_HERE); | 1513 m_resumeParserWaitingForResourcesTimer.startOneShot(0, FROM_HERE); |
| 1525 } | 1514 } |
| 1526 | 1515 |
| 1527 void Document::resumeParserWaitingForResourcesTimerFired(Timer<Document>*) | 1516 void Document::resumeParserWaitingForResourcesTimerFired(Timer<Document>*) |
| 1528 { | 1517 { |
| 1529 if (!isRenderingReady()) | 1518 if (!haveImportsLoaded()) |
| 1530 return; | 1519 return; |
| 1531 if (m_parser) | 1520 if (m_parser) |
| 1532 m_parser->resumeAfterWaitingForImports(); | 1521 m_parser->resumeAfterWaitingForImports(); |
| 1533 } | 1522 } |
| 1534 | 1523 |
| 1535 TextPosition Document::parserPosition() const | 1524 TextPosition Document::parserPosition() const |
| 1536 { | 1525 { |
| 1537 if (m_parser) | 1526 if (m_parser) |
| 1538 m_parser->textPosition(); | 1527 m_parser->textPosition(); |
| 1539 return TextPosition::belowRangePosition(); | 1528 return TextPosition::belowRangePosition(); |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2663 using namespace blink; | 2652 using namespace blink; |
| 2664 void showLiveDocumentInstances() | 2653 void showLiveDocumentInstances() |
| 2665 { | 2654 { |
| 2666 WeakDocumentSet& set = liveDocumentSet(); | 2655 WeakDocumentSet& set = liveDocumentSet(); |
| 2667 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 2656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 2668 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 2657 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 2669 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 2658 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 2670 } | 2659 } |
| 2671 } | 2660 } |
| 2672 #endif | 2661 #endif |
| OLD | NEW |