Changeset 148431 in webkit
- Timestamp:
- Apr 15, 2013 5:02:19 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148426 r148431 1 2013-04-15 Rune Lillesveen <rune@opera.com> 2 3 color-index media feature not supported 4 https://bugs.webkit.org/show_bug.cgi?id=114468 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Added testcases for checking support and handling invalid values for 9 the color-index media feature. 10 11 * fast/media/mq-color-index-01-expected.html: Added. 12 * fast/media/mq-color-index-01.html: Added. 13 * fast/media/mq-color-index-02-expected.txt: Added. 14 * fast/media/mq-color-index-02.html: Added. 15 1 16 2013-04-15 Seokju Kwon <seokju.kwon@gmail.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r148430 r148431 1 2013-04-15 Rune Lillesveen <rune@opera.com> 2 3 color-index media feature not supported 4 https://bugs.webkit.org/show_bug.cgi?id=114468 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Support the color-index media feature. Currently assumes that no WebKit 9 browser will have an output device that uses a color lookup table. 10 11 Tests: fast/media/mq-color-index-01.html 12 fast/media/mq-color-index-02.html 13 14 * css/MediaFeatureNames.h: 15 (MediaFeatureNames): 16 * css/MediaQueryEvaluator.cpp: 17 (WebCore::color_indexMediaFeatureEval): 18 (WebCore): 19 (WebCore::min_color_indexMediaFeatureEval): 20 (WebCore::max_color_indexMediaFeatureEval): 21 * css/MediaQueryExp.cpp: 22 (WebCore::featureWithPositiveInteger): 23 (WebCore::featureWithoutValue): 24 1 25 2013-04-15 Balazs Kelemen <kbalazs@webkit.org> 2 26 -
trunk/Source/WebCore/css/MediaFeatureNames.h
r145255 r148431 34 34 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \ 35 35 macro(color, "color") \ 36 macro(color_index, "color-index") \ 36 37 macro(grid, "grid") \ 37 38 macro(monochrome, "monochrome") \ … … 46 47 macro(device_width, "device-width") \ 47 48 macro(max_color, "max-color") \ 49 macro(max_color_index, "max-color-index") \ 48 50 macro(max_aspect_ratio, "max-aspect-ratio") \ 49 51 macro(max_device_aspect_ratio, "max-device-aspect-ratio") \ … … 56 58 macro(max_resolution, "max-resolution") \ 57 59 macro(min_color, "min-color") \ 60 macro(min_color_index, "min-color-index") \ 58 61 macro(min_aspect_ratio, "min-aspect-ratio") \ 59 62 macro(min_device_aspect_ratio, "min-device-aspect-ratio") \ -
trunk/Source/WebCore/css/MediaQueryEvaluator.cpp
r148186 r148431 70 70 71 71 /* 72 * FIXME: following media features are not implemented: color_index,scan72 * FIXME: following media features are not implemented: scan 73 73 * 74 * color_index, min-color-index, max_color_index: It's unknown how to retrieve75 * the information if the display mode is indexed76 74 * scan: The "scan" media feature describes the scanning process of 77 75 * tv output devices. It's unknown how to retrieve this information from … … 219 217 } 220 218 219 static bool color_indexMediaFeatureEval(CSSValue* value, RenderStyle*, Frame*, MediaFeaturePrefix op) 220 { 221 // FIXME: It's unknown how to retrieve the information if the display mode is indexed 222 // Assume we don't support indexed display. 223 if (!value) 224 return false; 225 226 float number; 227 return numberValue(value, number) && compareValue(0, static_cast<int>(number), op); 228 } 229 221 230 static bool monochromeMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op) 222 231 { … … 420 429 { 421 430 return colorMediaFeatureEval(value, style, frame, MaxPrefix); 431 } 432 433 static bool min_color_indexMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix) 434 { 435 return color_indexMediaFeatureEval(value, style, frame, MinPrefix); 436 } 437 438 static bool max_color_indexMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix) 439 { 440 return color_indexMediaFeatureEval(value, style, frame, MaxPrefix); 422 441 } 423 442 -
trunk/Source/WebCore/css/MediaQueryExp.cpp
r145255 r148431 89 89 || mediaFeature == MediaFeatureNames::max_colorMediaFeature 90 90 || mediaFeature == MediaFeatureNames::min_colorMediaFeature 91 || mediaFeature == MediaFeatureNames::color_indexMediaFeature 92 || mediaFeature == MediaFeatureNames::max_color_indexMediaFeature 93 || mediaFeature == MediaFeatureNames::min_color_indexMediaFeature 91 94 || mediaFeature == MediaFeatureNames::min_monochromeMediaFeature 92 95 || mediaFeature == MediaFeatureNames::max_monochromeMediaFeature; … … 131 134 return mediaFeature == MediaFeatureNames::monochromeMediaFeature 132 135 || mediaFeature == MediaFeatureNames::colorMediaFeature 136 || mediaFeature == MediaFeatureNames::color_indexMediaFeature 133 137 || mediaFeature == MediaFeatureNames::gridMediaFeature 134 138 || mediaFeature == MediaFeatureNames::heightMediaFeature
Note: See TracChangeset
for help on using the changeset viewer.