Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 784453003: Initial scroll-blocks-on compositor integration (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Eliminate scrollbars from iframe test for cross-platform output consistency Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto': 1682 // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
1683 if (overflowX == OVISIBLE) 1683 if (overflowX == OVISIBLE)
1684 overflowX = OAUTO; 1684 overflowX = OAUTO;
1685 if (overflowY == OVISIBLE) 1685 if (overflowY == OVISIBLE)
1686 overflowY = OAUTO; 1686 overflowY = OAUTO;
1687 // Column-gap is (ab)used by the current paged overflow implementation ( in lack of other 1687 // Column-gap is (ab)used by the current paged overflow implementation ( in lack of other
1688 // ways to specify gaps between pages), so we have to propagate it too. 1688 // ways to specify gaps between pages), so we have to propagate it too.
1689 columnGap = overflowStyle->columnGap(); 1689 columnGap = overflowStyle->columnGap();
1690 } 1690 }
1691 1691
1692 WebScrollBlocksOn scrollBlocksOn = documentElementStyle->scrollBlocksOn();
1693
1692 RefPtr<RenderStyle> documentStyle = renderView()->style(); 1694 RefPtr<RenderStyle> documentStyle = renderView()->style();
1693 if (documentStyle->writingMode() != rootWritingMode 1695 if (documentStyle->writingMode() != rootWritingMode
1694 || documentStyle->direction() != rootDirection 1696 || documentStyle->direction() != rootDirection
1695 || documentStyle->overflowX() != overflowX 1697 || documentStyle->overflowX() != overflowX
1696 || documentStyle->overflowY() != overflowY 1698 || documentStyle->overflowY() != overflowY
1697 || documentStyle->columnGap() != columnGap) { 1699 || documentStyle->columnGap() != columnGap
1700 || documentStyle->scrollBlocksOn() != scrollBlocksOn) {
1698 RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get()); 1701 RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get());
1699 newStyle->setWritingMode(rootWritingMode); 1702 newStyle->setWritingMode(rootWritingMode);
1700 newStyle->setDirection(rootDirection); 1703 newStyle->setDirection(rootDirection);
1701 newStyle->setColumnGap(columnGap); 1704 newStyle->setColumnGap(columnGap);
1702 newStyle->setOverflowX(overflowX); 1705 newStyle->setOverflowX(overflowX);
1703 newStyle->setOverflowY(overflowY); 1706 newStyle->setOverflowY(overflowY);
1707 newStyle->setScrollBlocksOn(scrollBlocksOn);
1704 renderView()->setStyle(newStyle); 1708 renderView()->setStyle(newStyle);
1705 setupFontBuilder(newStyle.get()); 1709 setupFontBuilder(newStyle.get());
1706 } 1710 }
1707 1711
1708 if (body) { 1712 if (body) {
1709 if (RenderStyle* style = body->renderStyle()) { 1713 if (RenderStyle* style = body->renderStyle()) {
1710 if (style->direction() != rootDirection || style->writingMode() != r ootWritingMode) 1714 if (style->direction() != rootDirection || style->writingMode() != r ootWritingMode)
1711 body->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonF orTracing::create(StyleChangeReason::WritingModeChange)); 1715 body->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonF orTracing::create(StyleChangeReason::WritingModeChange));
1712 } 1716 }
1713 } 1717 }
(...skipping 4044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5758 #ifndef NDEBUG 5762 #ifndef NDEBUG
5759 using namespace blink; 5763 using namespace blink;
5760 void showLiveDocumentInstances() 5764 void showLiveDocumentInstances()
5761 { 5765 {
5762 WeakDocumentSet& set = liveDocumentSet(); 5766 WeakDocumentSet& set = liveDocumentSet();
5763 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5767 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5764 for (Document* document : set) 5768 for (Document* document : set)
5765 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5769 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5766 } 5770 }
5767 #endif 5771 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698