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

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

Issue 2570293003: Revert of Set overflow: auto in StyleResolver::styleForDocument. (Closed)
Patch Set: 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 documentStyle->setZIndex(0); 614 documentStyle->setZIndex(0);
615 documentStyle->setIsStackingContext(true); 615 documentStyle->setIsStackingContext(true);
616 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE 616 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE
617 : READ_ONLY); 617 : READ_ONLY);
618 // These are designed to match the user-agent stylesheet values for the 618 // These are designed to match the user-agent stylesheet values for the
619 // document element so that the common case doesn't need to create a new 619 // document element so that the common case doesn't need to create a new
620 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles. 620 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles.
621 documentStyle->setDisplay(EDisplay::Block); 621 documentStyle->setDisplay(EDisplay::Block);
622 documentStyle->setPosition(AbsolutePosition); 622 documentStyle->setPosition(AbsolutePosition);
623 623
624 // Document::inheritHtmlAndBodyElementStyles will set the final overflow
625 // style values, but they should initially be auto to avoid premature
626 // scrollbar removal in PaintLayerScrollableArea::updateAfterStyleChange.
627 documentStyle->setOverflowX(OverflowAuto);
628 documentStyle->setOverflowY(OverflowAuto);
629
630 document.setupFontBuilder(*documentStyle); 624 document.setupFontBuilder(*documentStyle);
631 625
632 return documentStyle.release(); 626 return documentStyle.release();
633 } 627 }
634 628
635 void StyleResolver::adjustComputedStyle(StyleResolverState& state, 629 void StyleResolver::adjustComputedStyle(StyleResolverState& state,
636 Element* element) { 630 Element* element) {
637 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(), 631 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(),
638 *state.parentStyle(), element); 632 *state.parentStyle(), element);
639 } 633 }
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 DEFINE_TRACE(StyleResolver) { 1967 DEFINE_TRACE(StyleResolver) {
1974 visitor->trace(m_matchedPropertiesCache); 1968 visitor->trace(m_matchedPropertiesCache);
1975 visitor->trace(m_selectorFilter); 1969 visitor->trace(m_selectorFilter);
1976 visitor->trace(m_styleSharingLists); 1970 visitor->trace(m_styleSharingLists);
1977 visitor->trace(m_pendingStyleSheets); 1971 visitor->trace(m_pendingStyleSheets);
1978 visitor->trace(m_document); 1972 visitor->trace(m_document);
1979 visitor->trace(m_tracker); 1973 visitor->trace(m_tracker);
1980 } 1974 }
1981 1975
1982 } // namespace blink 1976 } // 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