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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize; | 83 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize; |
84 } | 84 } |
85 | 85 |
86 static bool checkShapeImageOrigin(Document& document, const StyleImage& styleIma
ge) | 86 static bool checkShapeImageOrigin(Document& document, const StyleImage& styleIma
ge) |
87 { | 87 { |
88 if (styleImage.isGeneratedImage()) | 88 if (styleImage.isGeneratedImage()) |
89 return true; | 89 return true; |
90 | 90 |
91 ASSERT(styleImage.cachedImage()); | 91 ASSERT(styleImage.cachedImage()); |
92 ImageResource& imageResource = *(styleImage.cachedImage()); | 92 ImageResource& imageResource = *(styleImage.cachedImage()); |
93 if (imageResource.isAccessAllowed(document.securityOrigin())) | 93 if (imageResource.isAccessAllowed(document.getSecurityOrigin())) |
94 return true; | 94 return true; |
95 | 95 |
96 const KURL& url = imageResource.url(); | 96 const KURL& url = imageResource.url(); |
97 String urlString = url.isNull() ? "''" : url.elidedString(); | 97 String urlString = url.isNull() ? "''" : url.elidedString(); |
98 document.addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, Err
orMessageLevel, "Unsafe attempt to load URL " + urlString + ".")); | 98 document.addConsoleMessage(ConsoleMessage::create(SecurityMessageSource, Err
orMessageLevel, "Unsafe attempt to load URL " + urlString + ".")); |
99 | 99 |
100 return false; | 100 return false; |
101 } | 101 } |
102 | 102 |
103 static LayoutRect getShapeImageMarginRect(const LayoutBox& layoutBox, const Layo
utSize& referenceBoxLogicalSize) | 103 static LayoutRect getShapeImageMarginRect(const LayoutBox& layoutBox, const Layo
utSize& referenceBoxLogicalSize) |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } | 344 } |
345 | 345 |
346 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const | 346 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const |
347 { | 347 { |
348 if (!m_layoutBox.style()->isHorizontalWritingMode()) | 348 if (!m_layoutBox.style()->isHorizontalWritingMode()) |
349 return size.transposedSize(); | 349 return size.transposedSize(); |
350 return size; | 350 return size; |
351 } | 351 } |
352 | 352 |
353 } // namespace blink | 353 } // namespace blink |
OLD | NEW |