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

Side by Side Diff: Source/core/css/StylePropertySet.cpp

Issue 879443006: Remove isInternalProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 | « Source/core/css/StylePropertySerializer.cpp ('k') | Source/core/css/parser/CSSParserMode.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #endif 103 #endif
104 } 104 }
105 105
106 int ImmutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 106 int ImmutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
107 { 107 {
108 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid 108 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid
109 // the compiler converting it to an int multiple times in the loop. 109 // the compiler converting it to an int multiple times in the loop.
110 uint16_t id = static_cast<uint16_t>(propertyID); 110 uint16_t id = static_cast<uint16_t>(propertyID);
111 for (int n = m_arraySize - 1 ; n >= 0; --n) { 111 for (int n = m_arraySize - 1 ; n >= 0; --n) {
112 if (metadataArray()[n].m_propertyID == id) { 112 if (metadataArray()[n].m_propertyID == id) {
113 // Only enabled or internal properties should be part of the style. 113 // Only enabled properties should be part of the style.
114 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID) || isInter nalProperty(propertyID)); 114 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID));
115 return n; 115 return n;
116 } 116 }
117 } 117 }
118 118
119 return -1; 119 return -1;
120 } 120 }
121 121
122 void ImmutableStylePropertySet::traceAfterDispatch(Visitor* visitor) 122 void ImmutableStylePropertySet::traceAfterDispatch(Visitor* visitor)
123 { 123 {
124 const RawPtrWillBeMember<CSSValue>* values = valueArray(); 124 const RawPtrWillBeMember<CSSValue>* values = valueArray();
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 } 543 }
544 544
545 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 545 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
546 { 546 {
547 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid 547 // Convert here propertyID into an uint16_t to compare it with the metadata' s m_propertyID to avoid
548 // the compiler converting it to an int multiple times in the loop. 548 // the compiler converting it to an int multiple times in the loop.
549 uint16_t id = static_cast<uint16_t>(propertyID); 549 uint16_t id = static_cast<uint16_t>(propertyID);
550 const CSSProperty* properties = m_propertyVector.data(); 550 const CSSProperty* properties = m_propertyVector.data();
551 for (int n = m_propertyVector.size() - 1 ; n >= 0; --n) { 551 for (int n = m_propertyVector.size() - 1 ; n >= 0; --n) {
552 if (properties[n].metadata().m_propertyID == id) { 552 if (properties[n].metadata().m_propertyID == id) {
553 // Only enabled or internal properties should be part of the style. 553 // Only enabled properties should be part of the style.
554 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID) || isInter nalProperty(propertyID)); 554 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID));
555 return n; 555 return n;
556 } 556 }
557 } 557 }
558 558
559 return -1; 559 return -1;
560 } 560 }
561 561
562 void MutableStylePropertySet::traceAfterDispatch(Visitor* visitor) 562 void MutableStylePropertySet::traceAfterDispatch(Visitor* visitor)
563 { 563 {
564 visitor->trace(m_cssomWrapper); 564 visitor->trace(m_cssomWrapper);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 result.appendLiteral(": "); 607 result.appendLiteral(": ");
608 result.append(propertyValue()->cssText()); 608 result.append(propertyValue()->cssText());
609 if (isImportant()) 609 if (isImportant())
610 result.appendLiteral(" !important"); 610 result.appendLiteral(" !important");
611 result.append(';'); 611 result.append(';');
612 return result.toString(); 612 return result.toString();
613 } 613 }
614 614
615 615
616 } // namespace blink 616 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/StylePropertySerializer.cpp ('k') | Source/core/css/parser/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698