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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/CharacterData.cpp » ('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. 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 PassRefPtr<LayoutStyle> StyleResolver::styleForElement(Element* element, LayoutS tyle* defaultParent, StyleSharingBehavior sharingBehavior, 530 PassRefPtr<LayoutStyle> StyleResolver::styleForElement(Element* element, LayoutS tyle* defaultParent, StyleSharingBehavior sharingBehavior,
531 RuleMatchingBehavior matchingBehavior) 531 RuleMatchingBehavior matchingBehavior)
532 { 532 {
533 ASSERT(document().frame()); 533 ASSERT(document().frame());
534 ASSERT(document().settings()); 534 ASSERT(document().settings());
535 ASSERT(!hasPendingAuthorStyleSheets()); 535 ASSERT(!hasPendingAuthorStyleSheets());
536 ASSERT(!m_needCollectFeatures); 536 ASSERT(!m_needCollectFeatures);
537 537
538 // Once an element has a renderer, we don't try to destroy it, since otherwi se the renderer 538 // Once an element has a renderer, we don't try to destroy it, since otherwi se the renderer
539 // will vanish if a style recalc happens during loading. 539 // will vanish if a style recalc happens during loading.
540 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->renderer()) { 540 if (sharingBehavior == AllowStyleSharing && !document().isRenderingReady() & & !element->layoutObject()) {
541 if (!s_styleNotYetAvailable) { 541 if (!s_styleNotYetAvailable) {
542 s_styleNotYetAvailable = LayoutStyle::create().leakRef(); 542 s_styleNotYetAvailable = LayoutStyle::create().leakRef();
543 s_styleNotYetAvailable->setDisplay(NONE); 543 s_styleNotYetAvailable->setDisplay(NONE);
544 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector()); 544 s_styleNotYetAvailable->font().update(document().styleEngine().fontS elector());
545 } 545 }
546 546
547 document().setHasNodesWithPlaceholderStyle(); 547 document().setHasNodesWithPlaceholderStyle();
548 return s_styleNotYetAvailable; 548 return s_styleNotYetAvailable;
549 } 549 }
550 550
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId) 711 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId)
712 { 712 {
713 if (pseudoId == FIRST_LETTER) 713 if (pseudoId == FIRST_LETTER)
714 return FirstLetterPseudoElement::create(parent); 714 return FirstLetterPseudoElement::create(parent);
715 return PseudoElement::create(parent, pseudoId); 715 return PseudoElement::create(parent, pseudoId);
716 } 716 }
717 717
718 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElementIfNeeded (Element& parent, PseudoId pseudoId) 718 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElementIfNeeded (Element& parent, PseudoId pseudoId)
719 { 719 {
720 LayoutObject* parentRenderer = parent.renderer(); 720 LayoutObject* parentRenderer = parent.layoutObject();
721 if (!parentRenderer) 721 if (!parentRenderer)
722 return nullptr; 722 return nullptr;
723 723
724 // The first letter pseudo element has to look up the tree and see if any 724 // The first letter pseudo element has to look up the tree and see if any
725 // of the ancestors are first letter. 725 // of the ancestors are first letter.
726 if (pseudoId < FIRST_INTERNAL_PSEUDOID && pseudoId != FIRST_LETTER && !paren tRenderer->style()->hasPseudoStyle(pseudoId)) 726 if (pseudoId < FIRST_INTERNAL_PSEUDOID && pseudoId != FIRST_LETTER && !paren tRenderer->style()->hasPseudoStyle(pseudoId))
727 return nullptr; 727 return nullptr;
728 728
729 if (pseudoId == BACKDROP && !parent.isInTopLayer()) 729 if (pseudoId == BACKDROP && !parent.isInTopLayer())
730 return nullptr; 730 return nullptr;
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 visitor->trace(m_uncommonAttributeRuleSet); 1515 visitor->trace(m_uncommonAttributeRuleSet);
1516 visitor->trace(m_watchedSelectorsRules); 1516 visitor->trace(m_watchedSelectorsRules);
1517 visitor->trace(m_treeBoundaryCrossingRules); 1517 visitor->trace(m_treeBoundaryCrossingRules);
1518 visitor->trace(m_styleSharingLists); 1518 visitor->trace(m_styleSharingLists);
1519 visitor->trace(m_pendingStyleSheets); 1519 visitor->trace(m_pendingStyleSheets);
1520 visitor->trace(m_document); 1520 visitor->trace(m_document);
1521 #endif 1521 #endif
1522 } 1522 }
1523 1523
1524 } // namespace blink 1524 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/CharacterData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698