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

Side by Side Diff: sky/engine/core/css/CSSComputedStyleDeclaration.cpp

Issue 834693007: Remove the remaining parts of ignorePendingStylesheets and placeholder styles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove comment. Created 5 years, 11 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 | sky/engine/core/css/resolver/StyleResolver.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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 ASSERT_ARG(keywordSize, keywordSize); 947 ASSERT_ARG(keywordSize, keywordSize);
948 ASSERT_ARG(keywordSize, keywordSize <= 8); 948 ASSERT_ARG(keywordSize, keywordSize <= 8);
949 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1); 949 return static_cast<CSSValueID>(CSSValueXxSmall + keywordSize - 1);
950 } 950 }
951 951
952 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK eyword() const 952 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK eyword() const
953 { 953 {
954 if (!m_node) 954 if (!m_node)
955 return nullptr; 955 return nullptr;
956 956
957 m_node->document().updateLayoutIgnorePendingStylesheets(); 957 m_node->document().updateLayout();
958 958
959 RefPtr<RenderStyle> style = m_node->computedStyle(m_pseudoElementSpecifier); 959 RefPtr<RenderStyle> style = m_node->computedStyle(m_pseudoElementSpecifier);
960 if (!style) 960 if (!style)
961 return nullptr; 961 return nullptr;
962 962
963 if (int keywordSize = style->fontDescription().keywordSize()) 963 if (int keywordSize = style->fontDescription().keywordSize())
964 return cssValuePool().createIdentifierValue(cssIdentifierForFontSizeKeyw ord(keywordSize)); 964 return cssValuePool().createIdentifierValue(cssIdentifierForFontSizeKeyw ord(keywordSize));
965 965
966 966
967 return pixelValue(style->fontDescription().computedPixelSize(), *style); 967 return pixelValue(style->fontDescription().computedPixelSize(), *style);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 Document& document = m_node->document(); 1268 Document& document = m_node->document();
1269 1269
1270 document.updateRenderTreeForNodeIfNeeded(m_node.get()); 1270 document.updateRenderTreeForNodeIfNeeded(m_node.get());
1271 renderer = m_node->renderer(); 1271 renderer = m_node->renderer();
1272 1272
1273 style = computeRenderStyle(propertyID); 1273 style = computeRenderStyle(propertyID);
1274 1274
1275 bool forceFullLayout = isLayoutDependent(propertyID, style, renderer) || m_node->isInShadowTree(); 1275 bool forceFullLayout = isLayoutDependent(propertyID, style, renderer) || m_node->isInShadowTree();
1276 1276
1277 if (forceFullLayout) { 1277 if (forceFullLayout) {
1278 document.updateLayoutIgnorePendingStylesheets(); 1278 document.updateLayout();
1279 style = computeRenderStyle(propertyID); 1279 style = computeRenderStyle(propertyID);
1280 renderer = m_node->renderer(); 1280 renderer = m_node->renderer();
1281 } 1281 }
1282 } else { 1282 } else {
1283 style = computeRenderStyle(propertyID); 1283 style = computeRenderStyle(propertyID);
1284 } 1284 }
1285 1285
1286 if (!style) 1286 if (!style)
1287 return nullptr; 1287 return nullptr;
1288 1288
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 { 2252 {
2253 if (i >= length()) 2253 if (i >= length())
2254 return ""; 2254 return "";
2255 2255
2256 return getPropertyNameString(computableProperties()[i]); 2256 return getPropertyNameString(computableProperties()[i]);
2257 } 2257 }
2258 2258
2259 bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, c onst CSSValue* propertyValue) const 2259 bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, c onst CSSValue* propertyValue) const
2260 { 2260 {
2261 if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() & & m_node) { 2261 if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() & & m_node) {
2262 m_node->document().updateLayoutIgnorePendingStylesheets(); 2262 m_node->document().updateLayout();
2263 RenderStyle* style = m_node->computedStyle(m_pseudoElementSpecifier); 2263 RenderStyle* style = m_node->computedStyle(m_pseudoElementSpecifier);
2264 if (style && style->fontDescription().keywordSize()) { 2264 if (style && style->fontDescription().keywordSize()) {
2265 CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDe scription().keywordSize()); 2265 CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDe scription().keywordSize());
2266 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(proper tyValue); 2266 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(proper tyValue);
2267 if (primitiveValue->isValueID() && primitiveValue->getValueID() == s izeValue) 2267 if (primitiveValue->isValueID() && primitiveValue->getValueID() == s izeValue)
2268 return true; 2268 return true;
2269 } 2269 }
2270 } 2270 }
2271 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID); 2271 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
2272 return value && propertyValue && value->equals(*propertyValue); 2272 return value && propertyValue && value->equals(*propertyValue);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2395 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2396 CSSPropertyB ackgroundClip }; 2396 CSSPropertyB ackgroundClip };
2397 2397
2398 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2398 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2399 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 2399 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
2400 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 2400 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
2401 return list.release(); 2401 return list.release();
2402 } 2402 }
2403 2403
2404 } // namespace blink 2404 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698