Commit 59970c04 authored by DongJun Kim's avatar DongJun Kim Committed by Commit Bot

Remove DeprecatedEqualIgnoringCase in renderer/core/css

This Cl updates the calls to DeprecatedEqualIgnoringCase to use
EqualIgnoringASCIICase as needed.

Bug: 627682
Signed-off-by: default avatarDongJun Kim <djmix.kim@samsung.com>
Change-Id: Id288a4886a9e5c13133d6d29015431fac55386e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105265Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751509}
parent a1c89026
...@@ -101,9 +101,8 @@ const String MediaQueryEvaluator::MediaType() const { ...@@ -101,9 +101,8 @@ const String MediaQueryEvaluator::MediaType() const {
bool MediaQueryEvaluator::MediaTypeMatch( bool MediaQueryEvaluator::MediaTypeMatch(
const String& media_type_to_match) const { const String& media_type_to_match) const {
return media_type_to_match.IsEmpty() || return media_type_to_match.IsEmpty() ||
DeprecatedEqualIgnoringCase(media_type_to_match, EqualIgnoringASCIICase(media_type_to_match, media_type_names::kAll) ||
media_type_names::kAll) || EqualIgnoringASCIICase(media_type_to_match, MediaType());
DeprecatedEqualIgnoringCase(media_type_to_match, MediaType());
} }
static bool ApplyRestrictor(MediaQuery::RestrictorType r, bool value) { static bool ApplyRestrictor(MediaQuery::RestrictorType r, bool value) {
...@@ -332,11 +331,11 @@ static bool EvalResolution(const MediaQueryExpValue& value, ...@@ -332,11 +331,11 @@ static bool EvalResolution(const MediaQueryExpValue& value,
// this method only got called if this media type matches the one defined // this method only got called if this media type matches the one defined
// in the query. Thus, if if the document's media type is "print", the // in the query. Thus, if if the document's media type is "print", the
// media type of the query will either be "print" or "all". // media type of the query will either be "print" or "all".
if (DeprecatedEqualIgnoringCase(media_values.MediaType(), if (EqualIgnoringASCIICase(media_values.MediaType(),
media_type_names::kScreen)) { media_type_names::kScreen)) {
actual_resolution = clampTo<float>(media_values.DevicePixelRatio()); actual_resolution = clampTo<float>(media_values.DevicePixelRatio());
} else if (DeprecatedEqualIgnoringCase(media_values.MediaType(), } else if (EqualIgnoringASCIICase(media_values.MediaType(),
media_type_names::kPrint)) { media_type_names::kPrint)) {
// The resolution of images while printing should not depend on the DPI // The resolution of images while printing should not depend on the DPI
// of the screen. Until we support proper ways of querying this info // of the screen. Until we support proper ways of querying this info
// we use 300px which is considered minimum for current printers. // we use 300px which is considered minimum for current printers.
...@@ -787,8 +786,7 @@ static bool ScanMediaFeatureEval(const MediaQueryExpValue& value, ...@@ -787,8 +786,7 @@ static bool ScanMediaFeatureEval(const MediaQueryExpValue& value,
MediaFeaturePrefix, MediaFeaturePrefix,
const MediaValues& media_values) { const MediaValues& media_values) {
// Scan only applies to 'tv' media. // Scan only applies to 'tv' media.
if (!DeprecatedEqualIgnoringCase(media_values.MediaType(), if (!EqualIgnoringASCIICase(media_values.MediaType(), media_type_names::kTv))
media_type_names::kTv))
return false; return false;
if (!value.IsValid()) if (!value.IsValid())
......
...@@ -2279,8 +2279,8 @@ void StyleResolver::ComputeFont(Element& element, ...@@ -2279,8 +2279,8 @@ void StyleResolver::ComputeFont(Element& element,
void StyleResolver::UpdateMediaType() { void StyleResolver::UpdateMediaType() {
if (LocalFrameView* view = GetDocument().View()) { if (LocalFrameView* view = GetDocument().View()) {
bool was_print = print_media_type_; bool was_print = print_media_type_;
print_media_type_ = DeprecatedEqualIgnoringCase(view->MediaType(), print_media_type_ =
media_type_names::kPrint); EqualIgnoringASCIICase(view->MediaType(), media_type_names::kPrint);
if (was_print != print_media_type_) if (was_print != print_media_type_)
matched_properties_cache_.ClearViewportDependent(); matched_properties_cache_.ClearViewportDependent();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment