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

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 { 417 {
418 if (!m_node) 418 if (!m_node)
419 return nullptr; 419 return nullptr;
420 420
421 m_node->document().updateLayoutIgnorePendingStylesheets(); 421 m_node->document().updateLayoutIgnorePendingStylesheets();
422 422
423 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpec ifier); 423 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpec ifier);
424 if (!style) 424 if (!style)
425 return nullptr; 425 return nullptr;
426 426
427 if (int keywordSize = style->fontDescription().keywordSize()) 427 if (int keywordSize = style->getFontDescription().keywordSize())
428 return cssValuePool().createIdentifierValue(cssIdentifierForFontSizeKeyw ord(keywordSize)); 428 return cssValuePool().createIdentifierValue(cssIdentifierForFontSizeKeyw ord(keywordSize));
429 429
430 430
431 return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), *style); 431 return zoomAdjustedPixelValue(style->getFontDescription().computedPixelSize( ), *style);
432 } 432 }
433 433
434 bool CSSComputedStyleDeclaration::isMonospaceFont() const 434 bool CSSComputedStyleDeclaration::isMonospaceFont() const
435 { 435 {
436 if (!m_node) 436 if (!m_node)
437 return false; 437 return false;
438 438
439 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpec ifier); 439 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpec ifier);
440 if (!style) 440 if (!style)
441 return false; 441 return false;
442 442
443 return style->fontDescription().isMonospace(); 443 return style->getFontDescription().isMonospace();
444 } 444 }
445 445
446 static void logUnimplementedPropertyID(CSSPropertyID propertyID) 446 static void logUnimplementedPropertyID(CSSPropertyID propertyID)
447 { 447 {
448 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); 448 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ());
449 if (!propertyIDSet.add(propertyID).isNewEntry) 449 if (!propertyIDSet.add(propertyID).isNewEntry)
450 return; 450 return;
451 451
452 WTF_LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", ge tPropertyName(propertyID)); 452 WTF_LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", ge tPropertyName(propertyID));
453 } 453 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return ""; 605 return "";
606 606
607 return getPropertyNameString(computableProperties()[i]); 607 return getPropertyNameString(computableProperties()[i]);
608 } 608 }
609 609
610 bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, c onst CSSValue* propertyValue) const 610 bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, c onst CSSValue* propertyValue) const
611 { 611 {
612 if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() & & m_node) { 612 if (propertyID == CSSPropertyFontSize && propertyValue->isPrimitiveValue() & & m_node) {
613 m_node->document().updateLayoutIgnorePendingStylesheets(); 613 m_node->document().updateLayoutIgnorePendingStylesheets();
614 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElement Specifier); 614 const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElement Specifier);
615 if (style && style->fontDescription().keywordSize()) { 615 if (style && style->getFontDescription().keywordSize()) {
616 CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDe scription().keywordSize()); 616 CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->getFon tDescription().keywordSize());
617 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(proper tyValue); 617 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(proper tyValue);
618 if (primitiveValue->isValueID() && primitiveValue->getValueID() == s izeValue) 618 if (primitiveValue->isValueID() && primitiveValue->getValueID() == s izeValue)
619 return true; 619 return true;
620 } 620 }
621 } 621 }
622 RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID); 622 RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(propertyID);
623 return value && propertyValue && value->equals(*propertyValue); 623 return value && propertyValue && value->equals(*propertyValue);
624 } 624 }
625 625
626 PassRefPtrWillBeRawPtr<MutableStylePropertySet> CSSComputedStyleDeclaration::cop yProperties() const 626 PassRefPtrWillBeRawPtr<MutableStylePropertySet> CSSComputedStyleDeclaration::cop yProperties() const
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 703 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
704 } 704 }
705 705
706 DEFINE_TRACE(CSSComputedStyleDeclaration) 706 DEFINE_TRACE(CSSComputedStyleDeclaration)
707 { 707 {
708 visitor->trace(m_node); 708 visitor->trace(m_node);
709 CSSStyleDeclaration::trace(visitor); 709 CSSStyleDeclaration::trace(visitor);
710 } 710 }
711 711
712 } // namespace blink 712 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataTransfer.cpp ('k') | third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698