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 {
bool MediaQueryEvaluator::MediaTypeMatch(
const String& media_type_to_match) const {
return media_type_to_match.IsEmpty() ||
DeprecatedEqualIgnoringCase(media_type_to_match,
media_type_names::kAll) ||
DeprecatedEqualIgnoringCase(media_type_to_match, MediaType());
EqualIgnoringASCIICase(media_type_to_match, media_type_names::kAll) ||
EqualIgnoringASCIICase(media_type_to_match, MediaType());
}
static bool ApplyRestrictor(MediaQuery::RestrictorType r, bool value) {
......@@ -332,11 +331,11 @@ static bool EvalResolution(const MediaQueryExpValue& value,
// 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
// media type of the query will either be "print" or "all".
if (DeprecatedEqualIgnoringCase(media_values.MediaType(),
media_type_names::kScreen)) {
if (EqualIgnoringASCIICase(media_values.MediaType(),
media_type_names::kScreen)) {
actual_resolution = clampTo<float>(media_values.DevicePixelRatio());
} else if (DeprecatedEqualIgnoringCase(media_values.MediaType(),
media_type_names::kPrint)) {
} else if (EqualIgnoringASCIICase(media_values.MediaType(),
media_type_names::kPrint)) {
// The resolution of images while printing should not depend on the DPI
// of the screen. Until we support proper ways of querying this info
// we use 300px which is considered minimum for current printers.
......@@ -787,8 +786,7 @@ static bool ScanMediaFeatureEval(const MediaQueryExpValue& value,
MediaFeaturePrefix,
const MediaValues& media_values) {
// Scan only applies to 'tv' media.
if (!DeprecatedEqualIgnoringCase(media_values.MediaType(),
media_type_names::kTv))
if (!EqualIgnoringASCIICase(media_values.MediaType(), media_type_names::kTv))
return false;
if (!value.IsValid())
......
......@@ -2279,8 +2279,8 @@ void StyleResolver::ComputeFont(Element& element,
void StyleResolver::UpdateMediaType() {
if (LocalFrameView* view = GetDocument().View()) {
bool was_print = print_media_type_;
print_media_type_ = DeprecatedEqualIgnoringCase(view->MediaType(),
media_type_names::kPrint);
print_media_type_ =
EqualIgnoringASCIICase(view->MediaType(), media_type_names::kPrint);
if (was_print != print_media_type_)
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