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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2571893003: Set overflow: auto in StyleResolver::styleForDocument. (Closed)
Patch Set: resolve merge conflict with r438458 Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 documentStyle->setZIndex(0); 615 documentStyle->setZIndex(0);
616 documentStyle->setIsStackingContext(true); 616 documentStyle->setIsStackingContext(true);
617 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE 617 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE
618 : READ_ONLY); 618 : READ_ONLY);
619 // These are designed to match the user-agent stylesheet values for the 619 // These are designed to match the user-agent stylesheet values for the
620 // document element so that the common case doesn't need to create a new 620 // document element so that the common case doesn't need to create a new
621 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles. 621 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles.
622 documentStyle->setDisplay(EDisplay::Block); 622 documentStyle->setDisplay(EDisplay::Block);
623 documentStyle->setPosition(AbsolutePosition); 623 documentStyle->setPosition(AbsolutePosition);
624 624
625 // Document::inheritHtmlAndBodyElementStyles will set the final overflow
626 // style values, but they should initially be auto to avoid premature
627 // scrollbar removal in PaintLayerScrollableArea::updateAfterStyleChange.
628 documentStyle->setOverflowX(EOverflow::Auto);
629 documentStyle->setOverflowY(EOverflow::Auto);
630
625 document.setupFontBuilder(*documentStyle); 631 document.setupFontBuilder(*documentStyle);
626 632
627 return documentStyle.release(); 633 return documentStyle.release();
628 } 634 }
629 635
630 void StyleResolver::adjustComputedStyle(StyleResolverState& state, 636 void StyleResolver::adjustComputedStyle(StyleResolverState& state,
631 Element* element) { 637 Element* element) {
632 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(), 638 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(),
633 *state.parentStyle(), element); 639 *state.parentStyle(), element);
634 } 640 }
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 DEFINE_TRACE(StyleResolver) { 1982 DEFINE_TRACE(StyleResolver) {
1977 visitor->trace(m_matchedPropertiesCache); 1983 visitor->trace(m_matchedPropertiesCache);
1978 visitor->trace(m_selectorFilter); 1984 visitor->trace(m_selectorFilter);
1979 visitor->trace(m_styleSharingLists); 1985 visitor->trace(m_styleSharingLists);
1980 visitor->trace(m_pendingStyleSheets); 1986 visitor->trace(m_pendingStyleSheets);
1981 visitor->trace(m_document); 1987 visitor->trace(m_document);
1982 visitor->trace(m_tracker); 1988 visitor->trace(m_tracker);
1983 } 1989 }
1984 1990
1985 } // namespace blink 1991 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698