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

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

Issue 2312293003: [CSSTypedOM] Computed StylePropertyMap use ComputedStyle for Lengths (Closed)
Patch Set: Change style recalc. Use CSSComputedStyleDec instead of CSSStyleDec. 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 return layoutObject->isLayoutGrid(); 492 return layoutObject->isLayoutGrid();
493 default: 493 default:
494 return false; 494 return false;
495 } 495 }
496 } 496 }
497 497
498 const ComputedStyle* CSSComputedStyleDeclaration::computeComputedStyle() const 498 const ComputedStyle* CSSComputedStyleDeclaration::computeComputedStyle() const
499 { 499 {
500 Node* styledNode = this->styledNode(); 500 Node* styledNode = this->styledNode();
501 ASSERT(styledNode); 501 ASSERT(styledNode);
502 return styledNode->ensureComputedStyle(styledNode->isPseudoElement() ? Pseud oIdNone : m_pseudoElementSpecifier); 502 // TODO(rjwright): Put this change in its own CL.
503 return styledNode->ensureComputedStyle(styledNode->getPseudoId());
503 } 504 }
504 505
505 Node* CSSComputedStyleDeclaration::styledNode() const 506 Node* CSSComputedStyleDeclaration::styledNode() const
506 { 507 {
507 if (!m_node) 508 if (!m_node)
508 return nullptr; 509 return nullptr;
509 if (m_node->isElementNode()) { 510 if (m_node->isElementNode()) {
510 if (PseudoElement* element = toElement(m_node)->pseudoElement(m_pseudoEl ementSpecifier)) 511 if (PseudoElement* element = toElement(m_node)->pseudoElement(m_pseudoEl ementSpecifier))
511 return element; 512 return element;
512 } 513 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 699 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
699 } 700 }
700 701
701 DEFINE_TRACE(CSSComputedStyleDeclaration) 702 DEFINE_TRACE(CSSComputedStyleDeclaration)
702 { 703 {
703 visitor->trace(m_node); 704 visitor->trace(m_node);
704 CSSStyleDeclaration::trace(visitor); 705 CSSStyleDeclaration::trace(visitor);
705 } 706 }
706 707
707 } // namespace blink 708 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698