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

Side by Side Diff: Source/core/html/parser/HTMLSrcsetParser.cpp

Issue 1013213002: Fix template angle bracket syntax in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // 8. If url ends with a U+002C COMMA character (,) 280 // 8. If url ends with a U+002C COMMA character (,)
281 if (isComma(*(position - 1))) { 281 if (isComma(*(position - 1))) {
282 // Remove all trailing U+002C COMMA characters from url. 282 // Remove all trailing U+002C COMMA characters from url.
283 imageURLEnd = position - 1; 283 imageURLEnd = position - 1;
284 reverseSkipWhile<CharType, isComma>(imageURLEnd, imageURLStart); 284 reverseSkipWhile<CharType, isComma>(imageURLEnd, imageURLStart);
285 ++imageURLEnd; 285 ++imageURLEnd;
286 // If url is empty, then jump to the step labeled splitting loop. 286 // If url is empty, then jump to the step labeled splitting loop.
287 if (imageURLStart == imageURLEnd) 287 if (imageURLStart == imageURLEnd)
288 continue; 288 continue;
289 } else { 289 } else {
290 skipWhile<CharType, isHTMLSpace<CharType> >(position, attributeEnd); 290 skipWhile<CharType, isHTMLSpace<CharType>>(position, attributeEnd);
291 Vector<DescriptorToken> descriptorTokens; 291 Vector<DescriptorToken> descriptorTokens;
292 tokenizeDescriptors(attributeStart, position, attributeEnd, descript orTokens); 292 tokenizeDescriptors(attributeStart, position, attributeEnd, descript orTokens);
293 // Contrary to spec language - descriptor parsing happens on each ca ndidate. 293 // Contrary to spec language - descriptor parsing happens on each ca ndidate.
294 // This is a black-box equivalent, to avoid storing descriptor lists for each candidate. 294 // This is a black-box equivalent, to avoid storing descriptor lists for each candidate.
295 if (!parseDescriptors(attribute, descriptorTokens, result, document) ) { 295 if (!parseDescriptors(attribute, descriptorTokens, result, document) ) {
296 if (document) { 296 if (document) {
297 UseCounter::count(document, UseCounter::SrcsetDroppedCandida te); 297 UseCounter::count(document, UseCounter::SrcsetDroppedCandida te);
298 if (document->frame()) 298 if (document->frame())
299 document->frame()->console().addMessage(ConsoleMessage:: create(OtherMessageSource, ErrorMessageLevel, String("Dropped srcset candidate " ) + String(imageURLStart, imageURLEnd - imageURLStart))); 299 document->frame()->console().addMessage(ConsoleMessage:: create(OtherMessageSource, ErrorMessageLevel, String("Dropped srcset candidate " ) + String(imageURLStart, imageURLEnd - imageURLStart)));
300 } 300 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 Vector<ImageCandidate> imageCandidates; 431 Vector<ImageCandidate> imageCandidates;
432 imageCandidates.append(srcsetImageCandidate); 432 imageCandidates.append(srcsetImageCandidate);
433 433
434 if (!srcAttribute.isEmpty()) 434 if (!srcAttribute.isEmpty())
435 imageCandidates.append(ImageCandidate(srcAttribute, 0, srcAttribute.leng th(), DescriptorParsingResult(), ImageCandidate::SrcOrigin)); 435 imageCandidates.append(ImageCandidate(srcAttribute, 0, srcAttribute.leng th(), DescriptorParsingResult(), ImageCandidate::SrcOrigin));
436 436
437 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates ).toString(); 437 return pickBestImageCandidate(deviceScaleFactor, sourceSize, imageCandidates ).toString();
438 } 438 }
439 439
440 } 440 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/imagebitmap/ImageBitmapFactories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698