Changeset 261548 in webkit
- Timestamp:
- May 12, 2020 12:20:57 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r261547 r261548 1 2020-05-12 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Need to advertise support for WebP in the Accept header 4 https://bugs.webkit.org/show_bug.cgi?id=211735 5 6 Reviewed by Darin Adler. 7 8 * http/tests/misc/resources/image-checks-for-accept.php: 9 Make sure the Accept header accepts all images mime types. 10 1 11 2020-05-11 Diego Pino Garcia <dpino@igalia.com> 2 12 -
trunk/LayoutTests/http/tests/misc/resources/image-checks-for-accept.php
r225472 r261548 1 1 <?php 2 if($_SERVER["HTTP_ACCEPT"] == "image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5" 3 || $_SERVER["HTTP_ACCEPT"] == "image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5") 2 $allimages = 'image/*'; 3 $pos = strpos($_SERVER["HTTP_ACCEPT"], $allimages); 4 if ($pos !== false) 4 5 { 5 6 header("Content-Type: image/jpg"); -
trunk/Source/WebCore/ChangeLog
r261546 r261548 1 2020-05-12 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 Need to advertise support for WebP in the Accept header 4 https://bugs.webkit.org/show_bug.cgi?id=211735 5 6 Reviewed by Darin Adler. 7 8 On Mac and iOS, the system has to support WebP: HAVE(WEBP). 9 On other platforms, WebKit has to be able to decode WebP images: USE(WEBP). 10 11 * css/CSSCalculationValue.cpp: 12 (WebCore::createCSS): 13 Fix unrealted coding style issue. 14 15 * loader/cache/CachedResourceRequest.cpp: 16 (WebCore::acceptHeaderValueForImageResource): 17 (WebCore::acceptHeaderValueFromType): 18 1 19 2020-05-11 Darin Adler <darin@apple.com> 2 20 -
trunk/Source/WebCore/css/CSSCalculationValue.cpp
r259703 r261548 1955 1955 return nullptr; 1956 1956 return CSSCalcOperationNode::createSum(WTFMove(children)); 1957 } case CalcOperator::Subtract: { 1957 } 1958 case CalcOperator::Subtract: { 1958 1959 ASSERT(operationChildren.size() == 2); 1959 1960 -
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp
r261036 r261548 123 123 } 124 124 125 static inline constexpr ASCIILiteral acceptHeaderValueForImageResource(bool supportsVideoImage) 126 { 127 #if HAVE(WEBP) || USE(WEBP) 128 #define WEBP_HEADER_PART "image/webp," 129 #else 130 #define WEBP_HEADER_PART "" 131 #endif 132 if (supportsVideoImage) 133 return WEBP_HEADER_PART "image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5"_s; 134 return WEBP_HEADER_PART "image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"_s; 135 #undef WEBP_HEADER_PART 136 } 137 125 138 static inline String acceptHeaderValueFromType(CachedResource::Type type) 126 139 { … … 129 142 return "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"_s; 130 143 case CachedResource::Type::ImageResource: 131 if (ImageDecoder::supportsMediaType(ImageDecoder::MediaType::Video)) 132 return "image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5"_s; 133 return "image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5"_s; 144 return acceptHeaderValueForImageResource(ImageDecoder::supportsMediaType(ImageDecoder::MediaType::Video)); 134 145 case CachedResource::Type::CSSStyleSheet: 135 146 return "text/css,*/*;q=0.1"_s;
Note: See TracChangeset
for help on using the changeset viewer.