| 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 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 FontBuilder fontBuilder(*this); | 1593 FontBuilder fontBuilder(*this); |
| 1594 RefPtrWillBeRawPtr<CSSFontSelector> selector = styleEngine().fontSelector(); | 1594 RefPtrWillBeRawPtr<CSSFontSelector> selector = styleEngine().fontSelector(); |
| 1595 fontBuilder.createFontForDocument(selector, documentStyle); | 1595 fontBuilder.createFontForDocument(selector, documentStyle); |
| 1596 } | 1596 } |
| 1597 | 1597 |
| 1598 void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change) | 1598 void Document::inheritHtmlAndBodyElementStyles(StyleRecalcChange change) |
| 1599 { | 1599 { |
| 1600 ASSERT(inStyleRecalc()); | 1600 ASSERT(inStyleRecalc()); |
| 1601 ASSERT(documentElement()); | 1601 ASSERT(documentElement()); |
| 1602 | 1602 |
| 1603 bool didRecalcDocumentElement = false; |
| 1603 RefPtr<LayoutStyle> documentElementStyle = documentElement()->layoutStyle(); | 1604 RefPtr<LayoutStyle> documentElementStyle = documentElement()->layoutStyle(); |
| 1604 if (!documentElementStyle || documentElement()->needsStyleRecalc() || change
== Force) | 1605 if (change == Force) |
| 1606 documentElement()->clearAnimationStyleChange(); |
| 1607 if (!documentElementStyle || documentElement()->needsStyleRecalc() || change
== Force) { |
| 1605 documentElementStyle = ensureStyleResolver().styleForElement(documentEle
ment()); | 1608 documentElementStyle = ensureStyleResolver().styleForElement(documentEle
ment()); |
| 1609 didRecalcDocumentElement = true; |
| 1610 } |
| 1606 | 1611 |
| 1607 WritingMode rootWritingMode = documentElementStyle->writingMode(); | 1612 WritingMode rootWritingMode = documentElementStyle->writingMode(); |
| 1608 TextDirection rootDirection = documentElementStyle->direction(); | 1613 TextDirection rootDirection = documentElementStyle->direction(); |
| 1609 | 1614 |
| 1610 HTMLElement* body = this->body(); | 1615 HTMLElement* body = this->body(); |
| 1611 RefPtr<LayoutStyle> bodyStyle; | 1616 RefPtr<LayoutStyle> bodyStyle; |
| 1617 |
| 1612 if (body) { | 1618 if (body) { |
| 1613 bodyStyle = body->layoutStyle(); | 1619 bodyStyle = body->layoutStyle(); |
| 1614 if (!bodyStyle || body->needsStyleRecalc() || documentElement()->needsSt
yleRecalc() || change == Force) | 1620 if (didRecalcDocumentElement) |
| 1621 body->clearAnimationStyleChange(); |
| 1622 if (!bodyStyle || body->needsStyleRecalc() || didRecalcDocumentElement) |
| 1615 bodyStyle = ensureStyleResolver().styleForElement(body, documentElem
entStyle.get()); | 1623 bodyStyle = ensureStyleResolver().styleForElement(body, documentElem
entStyle.get()); |
| 1616 rootWritingMode = bodyStyle->writingMode(); | 1624 rootWritingMode = bodyStyle->writingMode(); |
| 1617 rootDirection = bodyStyle->direction(); | 1625 rootDirection = bodyStyle->direction(); |
| 1618 } | 1626 } |
| 1619 | 1627 |
| 1620 RefPtr<LayoutStyle> overflowStyle; | 1628 RefPtr<LayoutStyle> overflowStyle; |
| 1621 if (Element* element = viewportDefiningElement(documentElementStyle.get()))
{ | 1629 if (Element* element = viewportDefiningElement(documentElementStyle.get()))
{ |
| 1622 if (element == body) { | 1630 if (element == body) { |
| 1623 overflowStyle = bodyStyle; | 1631 overflowStyle = bodyStyle; |
| 1624 } else { | 1632 } else { |
| (...skipping 4094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5719 #ifndef NDEBUG | 5727 #ifndef NDEBUG |
| 5720 using namespace blink; | 5728 using namespace blink; |
| 5721 void showLiveDocumentInstances() | 5729 void showLiveDocumentInstances() |
| 5722 { | 5730 { |
| 5723 WeakDocumentSet& set = liveDocumentSet(); | 5731 WeakDocumentSet& set = liveDocumentSet(); |
| 5724 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5732 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5725 for (Document* document : set) | 5733 for (Document* document : set) |
| 5726 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5734 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5727 } | 5735 } |
| 5728 #endif | 5736 #endif |
| OLD | NEW |