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

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: Remove unneeded TODO 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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto': 1722 // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
1723 if (overflowX == OVISIBLE) 1723 if (overflowX == OVISIBLE)
1724 overflowX = OAUTO; 1724 overflowX = OAUTO;
1725 if (overflowY == OVISIBLE) 1725 if (overflowY == OVISIBLE)
1726 overflowY = OAUTO; 1726 overflowY = OAUTO;
1727 // Column-gap is (ab)used by the current paged overflow implementation ( in lack of other 1727 // Column-gap is (ab)used by the current paged overflow implementation ( in lack of other
1728 // ways to specify gaps between pages), so we have to propagate it too. 1728 // ways to specify gaps between pages), so we have to propagate it too.
1729 columnGap = overflowStyle->columnGap(); 1729 columnGap = overflowStyle->columnGap();
1730 } 1730 }
1731 1731
1732 WebScrollBlocksOn scrollBlocksOn = documentElementStyle->scrollBlocksOn();
1733
1732 RefPtr<RenderStyle> documentStyle = renderView()->style(); 1734 RefPtr<RenderStyle> documentStyle = renderView()->style();
1733 if (documentStyle->writingMode() != rootWritingMode 1735 if (documentStyle->writingMode() != rootWritingMode
1734 || documentStyle->direction() != rootDirection 1736 || documentStyle->direction() != rootDirection
1735 || documentStyle->overflowX() != overflowX 1737 || documentStyle->overflowX() != overflowX
1736 || documentStyle->overflowY() != overflowY 1738 || documentStyle->overflowY() != overflowY
1737 || documentStyle->columnGap() != columnGap) { 1739 || documentStyle->columnGap() != columnGap
1740 || documentStyle->scrollBlocksOn() != scrollBlocksOn) {
1738 RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get()); 1741 RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get());
1739 newStyle->setWritingMode(rootWritingMode); 1742 newStyle->setWritingMode(rootWritingMode);
1740 newStyle->setDirection(rootDirection); 1743 newStyle->setDirection(rootDirection);
1741 newStyle->setColumnGap(columnGap); 1744 newStyle->setColumnGap(columnGap);
1742 newStyle->setOverflowX(overflowX); 1745 newStyle->setOverflowX(overflowX);
1743 newStyle->setOverflowY(overflowY); 1746 newStyle->setOverflowY(overflowY);
1747 newStyle->setScrollBlocksOn(scrollBlocksOn);
1744 renderView()->setStyle(newStyle); 1748 renderView()->setStyle(newStyle);
1745 setupFontBuilder(newStyle.get()); 1749 setupFontBuilder(newStyle.get());
1746 } 1750 }
1747 1751
1748 if (body) { 1752 if (body) {
1749 if (RenderStyle* style = body->renderStyle()) { 1753 if (RenderStyle* style = body->renderStyle()) {
1750 if (style->direction() != rootDirection || style->writingMode() != r ootWritingMode) 1754 if (style->direction() != rootDirection || style->writingMode() != r ootWritingMode)
1751 body->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonF orTracing::create(StyleChangeReason::WritingModeChange)); 1755 body->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonF orTracing::create(StyleChangeReason::WritingModeChange));
1752 } 1756 }
1753 } 1757 }
(...skipping 4099 matching lines...) Expand 10 before | Expand all | Expand 10 after
5853 #ifndef NDEBUG 5857 #ifndef NDEBUG
5854 using namespace blink; 5858 using namespace blink;
5855 void showLiveDocumentInstances() 5859 void showLiveDocumentInstances()
5856 { 5860 {
5857 WeakDocumentSet& set = liveDocumentSet(); 5861 WeakDocumentSet& set = liveDocumentSet();
5858 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5862 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5859 for (Document* document : set) 5863 for (Document* document : set)
5860 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5864 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5861 } 5865 }
5862 #endif 5866 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698