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: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Renamed members Created 4 years, 2 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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 documentStyle->setZoom(frame && !document.printing() ? frame->pageZoomFactor () : 1); 682 documentStyle->setZoom(frame && !document.printing() ? frame->pageZoomFactor () : 1);
683 FontDescription documentFontDescription = documentStyle->getFontDescription( ); 683 FontDescription documentFontDescription = documentStyle->getFontDescription( );
684 documentFontDescription.setLocale(LayoutLocale::get(document.contentLanguage ())); 684 documentFontDescription.setLocale(LayoutLocale::get(document.contentLanguage ()));
685 documentStyle->setFontDescription(documentFontDescription); 685 documentStyle->setFontDescription(documentFontDescription);
686 documentStyle->setZIndex(0); 686 documentStyle->setZIndex(0);
687 documentStyle->setIsStackingContext(true); 687 documentStyle->setIsStackingContext(true);
688 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONL Y); 688 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONL Y);
689 // These are designed to match the user-agent stylesheet values for the docu ment element 689 // These are designed to match the user-agent stylesheet values for the docu ment element
690 // so that the common case doesn't need to create a new ComputedStyle in 690 // so that the common case doesn't need to create a new ComputedStyle in
691 // Document::inheritHtmlAndBodyElementStyles. 691 // Document::inheritHtmlAndBodyElementStyles.
692 documentStyle->setDisplay(BLOCK); 692 documentStyle->setDisplay(EDisplay::Block);
693 documentStyle->setPosition(AbsolutePosition); 693 documentStyle->setPosition(AbsolutePosition);
694 694
695 document.setupFontBuilder(*documentStyle); 695 document.setupFontBuilder(*documentStyle);
696 696
697 return documentStyle.release(); 697 return documentStyle.release();
698 } 698 }
699 699
700 void StyleResolver::adjustComputedStyle(StyleResolverState& state, Element* elem ent) 700 void StyleResolver::adjustComputedStyle(StyleResolverState& state, Element* elem ent)
701 { 701 {
702 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(), *state.parentSty le(), element); 702 StyleAdjuster::adjustComputedStyle(state.mutableStyleRef(), *state.parentSty le(), element);
(...skipping 10 matching lines...) Expand all
713 { 713 {
714 ASSERT(document().settings()); 714 ASSERT(document().settings());
715 ASSERT(!hasPendingAuthorStyleSheets()); 715 ASSERT(!hasPendingAuthorStyleSheets());
716 ASSERT(!m_needCollectFeatures); 716 ASSERT(!m_needCollectFeatures);
717 717
718 // Once an element has a layoutObject, we don't try to destroy it, since oth erwise the layoutObject 718 // Once an element has a layoutObject, we don't try to destroy it, since oth erwise the layoutObject
719 // will vanish if a style recalc happens during loading. 719 // will vanish if a style recalc happens during loading.
720 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->layoutObject()) { 720 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->layoutObject()) {
721 if (!s_styleNotYetAvailable) { 721 if (!s_styleNotYetAvailable) {
722 s_styleNotYetAvailable = ComputedStyle::create().leakRef(); 722 s_styleNotYetAvailable = ComputedStyle::create().leakRef();
723 s_styleNotYetAvailable->setDisplay(NONE); 723 s_styleNotYetAvailable->setDisplay(EDisplay::None);
724 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector()); 724 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector());
725 } 725 }
726 726
727 document().setHasNodesWithPlaceholderStyle(); 727 document().setHasNodesWithPlaceholderStyle();
728 return s_styleNotYetAvailable; 728 return s_styleNotYetAvailable;
729 } 729 }
730 730
731 document().styleEngine().incStyleForElementCount(); 731 document().styleEngine().incStyleForElementCount();
732 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1); 732 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1);
733 733
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 visitor->trace(m_siblingRuleSet); 1743 visitor->trace(m_siblingRuleSet);
1744 visitor->trace(m_uncommonAttributeRuleSet); 1744 visitor->trace(m_uncommonAttributeRuleSet);
1745 visitor->trace(m_watchedSelectorsRules); 1745 visitor->trace(m_watchedSelectorsRules);
1746 visitor->trace(m_treeBoundaryCrossingScopes); 1746 visitor->trace(m_treeBoundaryCrossingScopes);
1747 visitor->trace(m_styleSharingLists); 1747 visitor->trace(m_styleSharingLists);
1748 visitor->trace(m_pendingStyleSheets); 1748 visitor->trace(m_pendingStyleSheets);
1749 visitor->trace(m_document); 1749 visitor->trace(m_document);
1750 } 1750 }
1751 1751
1752 } // namespace blink 1752 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698