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

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

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 documentFontDescription.setLocale( 554 documentFontDescription.setLocale(
555 LayoutLocale::get(document.contentLanguage())); 555 LayoutLocale::get(document.contentLanguage()));
556 documentStyle->setFontDescription(documentFontDescription); 556 documentStyle->setFontDescription(documentFontDescription);
557 documentStyle->setZIndex(0); 557 documentStyle->setZIndex(0);
558 documentStyle->setIsStackingContext(true); 558 documentStyle->setIsStackingContext(true);
559 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE 559 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE
560 : READ_ONLY); 560 : READ_ONLY);
561 // These are designed to match the user-agent stylesheet values for the 561 // These are designed to match the user-agent stylesheet values for the
562 // document element so that the common case doesn't need to create a new 562 // document element so that the common case doesn't need to create a new
563 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles. 563 // ComputedStyle in Document::inheritHtmlAndBodyElementStyles.
564 documentStyle->setDisplay(EDisplay::Block); 564 documentStyle->setDisplay(EDisplay::kBlock);
565 documentStyle->setPosition(EPosition::kAbsolute); 565 documentStyle->setPosition(EPosition::kAbsolute);
566 566
567 // Document::inheritHtmlAndBodyElementStyles will set the final overflow 567 // Document::inheritHtmlAndBodyElementStyles will set the final overflow
568 // style values, but they should initially be auto to avoid premature 568 // style values, but they should initially be auto to avoid premature
569 // scrollbar removal in PaintLayerScrollableArea::updateAfterStyleChange. 569 // scrollbar removal in PaintLayerScrollableArea::updateAfterStyleChange.
570 documentStyle->setOverflowX(EOverflow::kAuto); 570 documentStyle->setOverflowX(EOverflow::kAuto);
571 documentStyle->setOverflowY(EOverflow::kAuto); 571 documentStyle->setOverflowY(EOverflow::kAuto);
572 572
573 document.setupFontBuilder(*documentStyle); 573 document.setupFontBuilder(*documentStyle);
574 574
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 DCHECK(document().frame()); 629 DCHECK(document().frame());
630 DCHECK(document().settings()); 630 DCHECK(document().settings());
631 631
632 // Once an element has a layoutObject, we don't try to destroy it, since 632 // Once an element has a layoutObject, we don't try to destroy it, since
633 // otherwise the layoutObject will vanish if a style recalc happens during 633 // otherwise the layoutObject will vanish if a style recalc happens during
634 // loading. 634 // loading.
635 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() && 635 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() &&
636 !element->layoutObject()) { 636 !element->layoutObject()) {
637 if (!s_styleNotYetAvailable) { 637 if (!s_styleNotYetAvailable) {
638 s_styleNotYetAvailable = ComputedStyle::create().leakRef(); 638 s_styleNotYetAvailable = ComputedStyle::create().leakRef();
639 s_styleNotYetAvailable->setDisplay(EDisplay::None); 639 s_styleNotYetAvailable->setDisplay(EDisplay::kNone);
640 s_styleNotYetAvailable->font().update( 640 s_styleNotYetAvailable->font().update(
641 document().styleEngine().fontSelector()); 641 document().styleEngine().fontSelector());
642 } 642 }
643 643
644 document().setHasNodesWithPlaceholderStyle(); 644 document().setHasNodesWithPlaceholderStyle();
645 return s_styleNotYetAvailable; 645 return s_styleNotYetAvailable;
646 } 646 }
647 647
648 document().styleEngine().incStyleForElementCount(); 648 document().styleEngine().incStyleForElementCount();
649 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1); 649 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1);
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 1963
1964 DEFINE_TRACE(StyleResolver) { 1964 DEFINE_TRACE(StyleResolver) {
1965 visitor->trace(m_matchedPropertiesCache); 1965 visitor->trace(m_matchedPropertiesCache);
1966 visitor->trace(m_selectorFilter); 1966 visitor->trace(m_selectorFilter);
1967 visitor->trace(m_styleSharingLists); 1967 visitor->trace(m_styleSharingLists);
1968 visitor->trace(m_document); 1968 visitor->trace(m_document);
1969 visitor->trace(m_tracker); 1969 visitor->trace(m_tracker);
1970 } 1970 }
1971 1971
1972 } // namespace blink 1972 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698