Chromium Code Reviews| 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1522 { | 1522 { |
| 1523 if (!root) { | 1523 if (!root) { |
| 1524 exceptionState.throwDOMException(NotSupportedError, "The provided node i s invalid."); | 1524 exceptionState.throwDOMException(NotSupportedError, "The provided node i s invalid."); |
| 1525 return 0; | 1525 return 0; |
| 1526 } | 1526 } |
| 1527 return TreeWalker::create(root, whatToShow, filter); | 1527 return TreeWalker::create(root, whatToShow, filter); |
| 1528 } | 1528 } |
| 1529 | 1529 |
| 1530 void Document::scheduleStyleRecalc() | 1530 void Document::scheduleStyleRecalc() |
| 1531 { | 1531 { |
| 1532 if (!isActive()) | |
| 1533 return; | |
| 1534 | |
| 1532 if (shouldDisplaySeamlesslyWithParent()) { | 1535 if (shouldDisplaySeamlesslyWithParent()) { |
| 1533 // When we're seamless, our parent document manages our style recalcs. | 1536 // When we're seamless, our parent document manages our style recalcs. |
| 1534 ownerElement()->setNeedsStyleRecalc(); | 1537 ownerElement()->setNeedsStyleRecalc(); |
| 1535 ownerElement()->document().scheduleStyleRecalc(); | 1538 ownerElement()->document().scheduleStyleRecalc(); |
| 1536 return; | 1539 return; |
| 1537 } | 1540 } |
| 1538 | 1541 |
| 1539 if (m_styleRecalcTimer.isActive()) | 1542 if (m_styleRecalcTimer.isActive() || !shouldScheduleLayout()) |
|
esprehn
2014/01/23 22:13:00
Are we sure this is safe? It means we'll fail to s
abarth-chromium
2014/01/23 22:22:53
Nope.
| |
| 1540 return; | 1543 return; |
| 1541 | 1544 |
| 1542 ASSERT(needsStyleRecalc() || childNeedsStyleRecalc() || childNeedsDistributi onRecalc() || !m_useElementsNeedingUpdate.isEmpty()); | 1545 ASSERT(needsStyleRecalc() || childNeedsStyleRecalc() || childNeedsDistributi onRecalc() || !m_useElementsNeedingUpdate.isEmpty()); |
| 1543 | 1546 |
| 1544 m_styleRecalcTimer.startOneShot(0); | 1547 m_styleRecalcTimer.startOneShot(0); |
| 1545 | 1548 |
| 1546 InspectorInstrumentation::didScheduleStyleRecalculation(this); | 1549 InspectorInstrumentation::didScheduleStyleRecalculation(this); |
| 1547 } | 1550 } |
| 1548 | 1551 |
| 1549 void Document::unscheduleStyleRecalc() | 1552 void Document::unscheduleStyleRecalc() |
| (...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5355 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) | 5358 if (!page->focusController().isActive() || !page->focusController().isFocuse d()) |
| 5356 return false; | 5359 return false; |
| 5357 if (Frame* focusedFrame = page->focusController().focusedFrame()) { | 5360 if (Frame* focusedFrame = page->focusController().focusedFrame()) { |
| 5358 if (focusedFrame->tree().isDescendantOf(frame())) | 5361 if (focusedFrame->tree().isDescendantOf(frame())) |
| 5359 return true; | 5362 return true; |
| 5360 } | 5363 } |
| 5361 return false; | 5364 return false; |
| 5362 } | 5365 } |
| 5363 | 5366 |
| 5364 } // namespace WebCore | 5367 } // namespace WebCore |
| OLD | NEW |