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

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

Issue 2032243003: Make CSSValueList store const CSSValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_computedstyledeclaration_return_const
Patch Set: Small fix n CSSOM Created 4 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageValue.h » ('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) 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 if (forceFullLayout) { 559 if (forceFullLayout) {
560 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode) ; 560 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode) ;
561 styledNode = this->styledNode(); 561 styledNode = this->styledNode();
562 style = computeComputedStyle(); 562 style = computeComputedStyle();
563 layoutObject = styledNode->layoutObject(); 563 layoutObject = styledNode->layoutObject();
564 } 564 }
565 565
566 if (!style) 566 if (!style)
567 return nullptr; 567 return nullptr;
568 568
569 CSSValue* value = ComputedStyleCSSValueMapping::get(propertyID, *style, layo utObject, styledNode, m_allowVisitedStyle); 569 const CSSValue* value = ComputedStyleCSSValueMapping::get(propertyID, *style , layoutObject, styledNode, m_allowVisitedStyle);
570 if (value) 570 if (value)
571 return value; 571 return value;
572 572
573 logUnimplementedPropertyID(propertyID); 573 logUnimplementedPropertyID(propertyID);
574 return nullptr; 574 return nullptr;
575 } 575 }
576 576
577 String CSSComputedStyleDeclaration::getPropertyValue(CSSPropertyID propertyID) c onst 577 String CSSComputedStyleDeclaration::getPropertyValue(CSSPropertyID propertyID) c onst
578 { 578 {
579 const CSSValue* value = getPropertyCSSValue(propertyID); 579 const CSSValue* value = getPropertyCSSValue(propertyID);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 694 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
695 } 695 }
696 696
697 DEFINE_TRACE(CSSComputedStyleDeclaration) 697 DEFINE_TRACE(CSSComputedStyleDeclaration)
698 { 698 {
699 visitor->trace(m_node); 699 visitor->trace(m_node);
700 CSSStyleDeclaration::trace(visitor); 700 CSSStyleDeclaration::trace(visitor);
701 } 701 }
702 702
703 } // namespace blink 703 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698