| 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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 // and then trigger a full document recalc. We also need to clear it here si
nce the | 1640 // and then trigger a full document recalc. We also need to clear it here si
nce the |
| 1641 // call to styleForElement on the body above can cache bad values for rem un
its if the | 1641 // call to styleForElement on the body above can cache bad values for rem un
its if the |
| 1642 // documentElement's style was dirty. We could keep track of which elements
depend on | 1642 // documentElement's style was dirty. We could keep track of which elements
depend on |
| 1643 // rem units like we do for viewport styles, but we assume root font size ch
anges are | 1643 // rem units like we do for viewport styles, but we assume root font size ch
anges are |
| 1644 // rare and just invalidate the cache for now. | 1644 // rare and just invalidate the cache for now. |
| 1645 if (styleEngine().usesRemUnits() && (documentElement()->needsAttach() || !do
cumentElement()->computedStyle() || documentElement()->computedStyle()->fontSize
() != documentElementStyle->fontSize())) { | 1645 if (styleEngine().usesRemUnits() && (documentElement()->needsAttach() || !do
cumentElement()->computedStyle() || documentElement()->computedStyle()->fontSize
() != documentElementStyle->fontSize())) { |
| 1646 ensureStyleResolver().invalidateMatchedPropertiesCache(); | 1646 ensureStyleResolver().invalidateMatchedPropertiesCache(); |
| 1647 documentElement()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeRe
asonForTracing::create(StyleChangeReason::FontSizeChange)); | 1647 documentElement()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeRe
asonForTracing::create(StyleChangeReason::FontSizeChange)); |
| 1648 } | 1648 } |
| 1649 | 1649 |
| 1650 EOverflow overflowX = OAUTO; | 1650 EOverflow overflowX = OverflowAuto; |
| 1651 EOverflow overflowY = OAUTO; | 1651 EOverflow overflowY = OverflowAuto; |
| 1652 float columnGap = 0; | 1652 float columnGap = 0; |
| 1653 if (overflowStyle) { | 1653 if (overflowStyle) { |
| 1654 overflowX = overflowStyle->overflowX(); | 1654 overflowX = overflowStyle->overflowX(); |
| 1655 overflowY = overflowStyle->overflowY(); | 1655 overflowY = overflowStyle->overflowY(); |
| 1656 // Visible overflow on the viewport is meaningless, and the spec says to
treat it as 'auto': | 1656 // Visible overflow on the viewport is meaningless, and the spec says to
treat it as 'auto': |
| 1657 if (overflowX == OVISIBLE) | 1657 if (overflowX == OverflowVisible) |
| 1658 overflowX = OAUTO; | 1658 overflowX = OverflowAuto; |
| 1659 if (overflowY == OVISIBLE) | 1659 if (overflowY == OverflowVisible) |
| 1660 overflowY = OAUTO; | 1660 overflowY = OverflowAuto; |
| 1661 // Column-gap is (ab)used by the current paged overflow implementation (
in lack of other | 1661 // Column-gap is (ab)used by the current paged overflow implementation (
in lack of other |
| 1662 // ways to specify gaps between pages), so we have to propagate it too. | 1662 // ways to specify gaps between pages), so we have to propagate it too. |
| 1663 columnGap = overflowStyle->columnGap(); | 1663 columnGap = overflowStyle->columnGap(); |
| 1664 } | 1664 } |
| 1665 | 1665 |
| 1666 RefPtr<ComputedStyle> documentStyle = layoutView()->mutableStyle(); | 1666 RefPtr<ComputedStyle> documentStyle = layoutView()->mutableStyle(); |
| 1667 if (documentStyle->getWritingMode() != rootWritingMode | 1667 if (documentStyle->getWritingMode() != rootWritingMode |
| 1668 || documentStyle->direction() != rootDirection | 1668 || documentStyle->direction() != rootDirection |
| 1669 || documentStyle->visitedDependentColor(CSSPropertyBackgroundColor) != b
ackgroundColor | 1669 || documentStyle->visitedDependentColor(CSSPropertyBackgroundColor) != b
ackgroundColor |
| 1670 || documentStyle->backgroundLayers() != backgroundLayers | 1670 || documentStyle->backgroundLayers() != backgroundLayers |
| (...skipping 4325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5996 #ifndef NDEBUG | 5996 #ifndef NDEBUG |
| 5997 using namespace blink; | 5997 using namespace blink; |
| 5998 void showLiveDocumentInstances() | 5998 void showLiveDocumentInstances() |
| 5999 { | 5999 { |
| 6000 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6000 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 6001 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6001 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6002 for (Document* document : set) | 6002 for (Document* document : set) |
| 6003 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6003 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6004 } | 6004 } |
| 6005 #endif | 6005 #endif |
| OLD | NEW |