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

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: Comment 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 11 matching lines...) Expand all
714 DCHECK(document().frame()); 714 DCHECK(document().frame());
715 ASSERT(document().settings()); 715 ASSERT(document().settings());
716 ASSERT(!hasPendingAuthorStyleSheets()); 716 ASSERT(!hasPendingAuthorStyleSheets());
717 ASSERT(!m_needCollectFeatures); 717 ASSERT(!m_needCollectFeatures);
718 718
719 // Once an element has a layoutObject, we don't try to destroy it, since oth erwise the layoutObject 719 // Once an element has a layoutObject, we don't try to destroy it, since oth erwise the layoutObject
720 // will vanish if a style recalc happens during loading. 720 // will vanish if a style recalc happens during loading.
721 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->layoutObject()) { 721 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->layoutObject()) {
722 if (!s_styleNotYetAvailable) { 722 if (!s_styleNotYetAvailable) {
723 s_styleNotYetAvailable = ComputedStyle::create().leakRef(); 723 s_styleNotYetAvailable = ComputedStyle::create().leakRef();
724 s_styleNotYetAvailable->setDisplay(NONE); 724 s_styleNotYetAvailable->setDisplay(EDisplay::None);
725 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector()); 725 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector());
726 } 726 }
727 727
728 document().setHasNodesWithPlaceholderStyle(); 728 document().setHasNodesWithPlaceholderStyle();
729 return s_styleNotYetAvailable; 729 return s_styleNotYetAvailable;
730 } 730 }
731 731
732 document().styleEngine().incStyleForElementCount(); 732 document().styleEngine().incStyleForElementCount();
733 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1); 733 INCREMENT_STYLE_STATS_COUNTER(document().styleEngine(), elementsStyled, 1);
734 734
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 visitor->trace(m_siblingRuleSet); 1744 visitor->trace(m_siblingRuleSet);
1745 visitor->trace(m_uncommonAttributeRuleSet); 1745 visitor->trace(m_uncommonAttributeRuleSet);
1746 visitor->trace(m_watchedSelectorsRules); 1746 visitor->trace(m_watchedSelectorsRules);
1747 visitor->trace(m_treeBoundaryCrossingScopes); 1747 visitor->trace(m_treeBoundaryCrossingScopes);
1748 visitor->trace(m_styleSharingLists); 1748 visitor->trace(m_styleSharingLists);
1749 visitor->trace(m_pendingStyleSheets); 1749 visitor->trace(m_pendingStyleSheets);
1750 visitor->trace(m_document); 1750 visitor->trace(m_document);
1751 } 1751 }
1752 1752
1753 } // namespace blink 1753 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698