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

Unified Diff: Source/core/css/parser/SizesAttributeParser.cpp

Issue 259193004: Enable calc() parsing in the sizes attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@calc4
Patch Set: Fixed a test following zcorpan's comment Created 6 years, 8 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
« no previous file with comments | « no previous file | Source/core/css/parser/SizesAttributeParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/SizesAttributeParser.cpp
diff --git a/Source/core/css/parser/SizesAttributeParser.cpp b/Source/core/css/parser/SizesAttributeParser.cpp
index 5c126e0f5d0267b3ac983ec7864af1eb0dafc67c..d46afb0c345ac92e26fbee4f39931f967dd3349e 100644
--- a/Source/core/css/parser/SizesAttributeParser.cpp
+++ b/Source/core/css/parser/SizesAttributeParser.cpp
@@ -8,6 +8,7 @@
#include "MediaTypeNames.h"
#include "core/css/MediaQueryEvaluator.h"
#include "core/css/parser/MediaQueryTokenizer.h"
+#include "core/css/parser/SizesCalcParser.h"
namespace WebCore {
@@ -33,8 +34,10 @@ bool SizesAttributeParser::calculateLengthInPixels(MediaQueryTokenIterator start
result = (unsigned)length;
return true;
}
+ } else if (type == FunctionToken) {
+ return SizesCalcParser::parse(startToken, endToken, m_mediaValues, result);
}
- // FIXME - Handle calc() FunctionToken here!
+
return false;
}
« no previous file with comments | « no previous file | Source/core/css/parser/SizesAttributeParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698