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

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

Issue 1521323002: Show custom properties in the computed style pane of the inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nicer test. Created 5 years 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 return element; 527 return element;
528 } 528 }
529 return m_node.get(); 529 return m_node.get();
530 } 530 }
531 531
532 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu e(AtomicString customPropertyName) const 532 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu e(AtomicString customPropertyName) const
533 { 533 {
534 return ComputedStyleCSSValueMapping::get(customPropertyName, *computeCompute dStyle()); 534 return ComputedStyleCSSValueMapping::get(customPropertyName, *computeCompute dStyle());
535 } 535 }
536 536
537 const HashMap<AtomicString, RefPtr<CSSVariableData>>* CSSComputedStyleDeclaratio n::getVariables() const
538 {
539 return ComputedStyleCSSValueMapping::getVariables(*computeComputedStyle());
540 }
541
537 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu e(CSSPropertyID propertyID) const 542 PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu e(CSSPropertyID propertyID) const
538 { 543 {
539 Node* styledNode = this->styledNode(); 544 Node* styledNode = this->styledNode();
540 if (!styledNode) 545 if (!styledNode)
541 return nullptr; 546 return nullptr;
542 LayoutObject* layoutObject = styledNode->layoutObject(); 547 LayoutObject* layoutObject = styledNode->layoutObject();
543 const ComputedStyle* style; 548 const ComputedStyle* style;
544 549
545 Document& document = styledNode->document(); 550 Document& document = styledNode->document();
546 551
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 700 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
696 } 701 }
697 702
698 DEFINE_TRACE(CSSComputedStyleDeclaration) 703 DEFINE_TRACE(CSSComputedStyleDeclaration)
699 { 704 {
700 visitor->trace(m_node); 705 visitor->trace(m_node);
701 CSSStyleDeclaration::trace(visitor); 706 CSSStyleDeclaration::trace(visitor);
702 } 707 }
703 708
704 } // namespace blink 709 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698