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

Side by Side Diff: Source/core/rendering/shapes/ShapeOutsideInfo.cpp

Issue 732323004: Add use counter for credentialed CORS access from null origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tweak spelling Created 6 years 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
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize; 82 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize;
83 } 83 }
84 84
85 static bool checkShapeImageOrigin(Document& document, const StyleImage& styleIma ge) 85 static bool checkShapeImageOrigin(Document& document, const StyleImage& styleIma ge)
86 { 86 {
87 if (styleImage.isGeneratedImage()) 87 if (styleImage.isGeneratedImage())
88 return true; 88 return true;
89 89
90 ASSERT(styleImage.cachedImage()); 90 ASSERT(styleImage.cachedImage());
91 ImageResource& imageResource = *(styleImage.cachedImage()); 91 ImageResource& imageResource = *(styleImage.cachedImage());
92 if (imageResource.isAccessAllowed(document.securityOrigin())) 92 if (imageResource.isAccessAllowed(&document, document.securityOrigin()))
93 return true; 93 return true;
94 94
95 const KURL& url = imageResource.url(); 95 const KURL& url = imageResource.url();
96 String urlString = url.isNull() ? "''" : url.elidedString(); 96 String urlString = url.isNull() ? "''" : url.elidedString();
97 document.addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, Err orMessageLevel, "Unsafe attempt to load URL " + urlString + ".")); 97 document.addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, Err orMessageLevel, "Unsafe attempt to load URL " + urlString + "."));
98 98
99 return false; 99 return false;
100 } 100 }
101 101
102 static LayoutRect getShapeImageMarginRect(const RenderBox& renderBox, const Layo utSize& referenceBoxLogicalSize) 102 static LayoutRect getShapeImageMarginRect(const RenderBox& renderBox, const Layo utSize& referenceBoxLogicalSize)
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 341 }
342 342
343 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const 343 FloatSize ShapeOutsideInfo::shapeToRendererSize(FloatSize size) const
344 { 344 {
345 if (!m_renderer.style()->isHorizontalWritingMode()) 345 if (!m_renderer.style()->isHorizontalWritingMode())
346 return size.transposedSize(); 346 return size.transposedSize();
347 return size; 347 return size;
348 } 348 }
349 349
350 } // namespace blink 350 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698