OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |