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

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

Issue 2310823002: Skeleton implementation of CSS Properties and Values API (Closed)
Patch Set: fix stylevardata copy ctor Created 4 years, 3 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 { 518 {
519 Node* styledNode = this->styledNode(); 519 Node* styledNode = this->styledNode();
520 if (!styledNode) 520 if (!styledNode)
521 return nullptr; 521 return nullptr;
522 522
523 styledNode->document().updateStyleAndLayoutTreeForNode(styledNode); 523 styledNode->document().updateStyleAndLayoutTreeForNode(styledNode);
524 524
525 const ComputedStyle* style = computeComputedStyle(); 525 const ComputedStyle* style = computeComputedStyle();
526 if (!style) 526 if (!style)
527 return nullptr; 527 return nullptr;
528 return ComputedStyleCSSValueMapping::get(customPropertyName, *style); 528 return ComputedStyleCSSValueMapping::get(customPropertyName, *style, styledN ode->document().propertyRegistry());
529 } 529 }
530 530
531 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> CSSComputedStyle Declaration::getVariables() const 531 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> CSSComputedStyle Declaration::getVariables() const
532 { 532 {
533 const ComputedStyle* style = computeComputedStyle(); 533 const ComputedStyle* style = computeComputedStyle();
534 if (!style) 534 if (!style)
535 return nullptr; 535 return nullptr;
536 return ComputedStyleCSSValueMapping::getVariables(*style); 536 return ComputedStyleCSSValueMapping::getVariables(*style);
537 } 537 }
538 538
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 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.");
700 } 700 }
701 701
702 DEFINE_TRACE(CSSComputedStyleDeclaration) 702 DEFINE_TRACE(CSSComputedStyleDeclaration)
703 { 703 {
704 visitor->trace(m_node); 704 visitor->trace(m_node);
705 CSSStyleDeclaration::trace(visitor); 705 CSSStyleDeclaration::trace(visitor);
706 } 706 }
707 707
708 } // namespace blink 708 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/BUILD.gn ('k') | third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698