| 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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 } | 1630 } |
| 1631 EImageRendering imageRendering = backgroundStyle->imageRendering(); | 1631 EImageRendering imageRendering = backgroundStyle->imageRendering(); |
| 1632 | 1632 |
| 1633 const ComputedStyle* overflowStyle = nullptr; | 1633 const ComputedStyle* overflowStyle = nullptr; |
| 1634 if (Element* element = viewportDefiningElement(documentElementStyle.get()))
{ | 1634 if (Element* element = viewportDefiningElement(documentElementStyle.get()))
{ |
| 1635 if (element == body) { | 1635 if (element == body) { |
| 1636 overflowStyle = bodyStyle.get(); | 1636 overflowStyle = bodyStyle.get(); |
| 1637 } else { | 1637 } else { |
| 1638 ASSERT(element == documentElement()); | 1638 ASSERT(element == documentElement()); |
| 1639 overflowStyle = documentElementStyle.get(); | 1639 overflowStyle = documentElementStyle.get(); |
| 1640 |
| 1641 // The body element has its own scrolling box, independent from the
viewport. |
| 1642 // This is a bit of a weird edge case in the CSS spec that we might
want to try to |
| 1643 // eliminate some day (eg. for ScrollTopLeftInterop - see http://crb
ug.com/157855). |
| 1644 if (bodyStyle && !bodyStyle->isOverflowVisible()) |
| 1645 UseCounter::count(*this, UseCounter::BodyScrollsInAdditionToView
port); |
| 1640 } | 1646 } |
| 1641 } | 1647 } |
| 1642 | 1648 |
| 1643 // Resolved rem units are stored in the matched properties cache so we need
to make sure to | 1649 // Resolved rem units are stored in the matched properties cache so we need
to make sure to |
| 1644 // invalidate the cache if the documentElement needed to reattach or the fon
t size changed | 1650 // invalidate the cache if the documentElement needed to reattach or the fon
t size changed |
| 1645 // and then trigger a full document recalc. We also need to clear it here si
nce the | 1651 // and then trigger a full document recalc. We also need to clear it here si
nce the |
| 1646 // call to styleForElement on the body above can cache bad values for rem un
its if the | 1652 // call to styleForElement on the body above can cache bad values for rem un
its if the |
| 1647 // documentElement's style was dirty. We could keep track of which elements
depend on | 1653 // documentElement's style was dirty. We could keep track of which elements
depend on |
| 1648 // rem units like we do for viewport styles, but we assume root font size ch
anges are | 1654 // rem units like we do for viewport styles, but we assume root font size ch
anges are |
| 1649 // rare and just invalidate the cache for now. | 1655 // rare and just invalidate the cache for now. |
| (...skipping 4266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5916 #ifndef NDEBUG | 5922 #ifndef NDEBUG |
| 5917 using namespace blink; | 5923 using namespace blink; |
| 5918 void showLiveDocumentInstances() | 5924 void showLiveDocumentInstances() |
| 5919 { | 5925 { |
| 5920 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5926 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 5921 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5927 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5922 for (Document* document : set) | 5928 for (Document* document : set) |
| 5923 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5929 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5924 } | 5930 } |
| 5925 #endif | 5931 #endif |
| OLD | NEW |