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

Unified Diff: third_party/WebKit/Source/core/css/MediaValues.cpp

Issue 2392343005: Reflow comments in core/css (Closed)
Patch Set: Revert clang-format Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/MediaValues.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index b045fd4a10393d1380b9f620c0e629cea6145524..298802c93e24c87239e19ed8a6e8a48bc829db66 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -146,11 +146,13 @@ bool MediaValues::computeLengthImpl(double value,
double viewportWidth,
double viewportHeight,
double& result) {
- // The logic in this function is duplicated from CSSToLengthConversionData::zoomedComputedPixels()
- // because MediaValues::computeLength() needs nearly identical logic, but we haven't found a way to make
- // CSSToLengthConversionData::zoomedComputedPixels() more generic (to solve both cases) without hurting performance.
-
- // FIXME - Unite the logic here with CSSToLengthConversionData in a performant way.
+ // The logic in this function is duplicated from
+ // CSSToLengthConversionData::zoomedComputedPixels() because
+ // MediaValues::computeLength() needs nearly identical logic, but we haven't
+ // found a way to make CSSToLengthConversionData::zoomedComputedPixels() more
+ // generic (to solve both cases) without hurting performance.
+ // FIXME - Unite the logic here with CSSToLengthConversionData in a performant
+ // way.
switch (type) {
case CSSPrimitiveValue::UnitType::Ems:
case CSSPrimitiveValue::UnitType::Rems:
@@ -161,10 +163,12 @@ bool MediaValues::computeLengthImpl(double value,
result = value;
return true;
case CSSPrimitiveValue::UnitType::Exs:
- // FIXME: We have a bug right now where the zoom will be applied twice to EX units.
+ // FIXME: We have a bug right now where the zoom will be applied twice to EX
+ // units.
case CSSPrimitiveValue::UnitType::Chs:
// FIXME: We don't seem to be able to cache fontMetrics related values.
- // Trying to access them is triggering some sort of microtask. Serving the spec's default instead.
+ // Trying to access them is triggering some sort of microtask. Serving the
+ // spec's default instead.
result = (value * defaultFontSize) / 2.0;
return true;
case CSSPrimitiveValue::UnitType::ViewportWidth:
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryMatcher.h ('k') | third_party/WebKit/Source/core/css/MediaValuesCached.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698