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

Side by Side Diff: third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 markShapeAsDirty(); 91 markShapeAsDirty();
92 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize; 92 m_referenceBoxLogicalSize = newReferenceBoxLogicalSize;
93 } 93 }
94 94
95 static bool checkShapeImageOrigin(Document& document, 95 static bool checkShapeImageOrigin(Document& document,
96 const StyleImage& styleImage) { 96 const StyleImage& styleImage) {
97 if (styleImage.isGeneratedImage()) 97 if (styleImage.isGeneratedImage())
98 return true; 98 return true;
99 99
100 ASSERT(styleImage.cachedImage()); 100 ASSERT(styleImage.cachedImage());
101 ImageResource& imageResource = *(styleImage.cachedImage()); 101 ImageResourceContent& imageResource = *(styleImage.cachedImage());
102 if (imageResource.isAccessAllowed(document.getSecurityOrigin())) 102 if (imageResource.isAccessAllowed(document.getSecurityOrigin()))
103 return true; 103 return true;
104 104
105 const KURL& url = imageResource.url(); 105 const KURL& url = imageResource.url();
106 String urlString = url.isNull() ? "''" : url.elidedString(); 106 String urlString = url.isNull() ? "''" : url.elidedString();
107 document.addConsoleMessage( 107 document.addConsoleMessage(
108 ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel, 108 ConsoleMessage::create(SecurityMessageSource, ErrorMessageLevel,
109 "Unsafe attempt to load URL " + urlString + ".")); 109 "Unsafe attempt to load URL " + urlString + "."));
110 110
111 return false; 111 return false;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 return result; 434 return result;
435 } 435 }
436 436
437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const { 437 FloatSize ShapeOutsideInfo::shapeToLayoutObjectSize(FloatSize size) const {
438 if (!m_layoutBox.style()->isHorizontalWritingMode()) 438 if (!m_layoutBox.style()->isHorizontalWritingMode())
439 return size.transposedSize(); 439 return size.transposedSize();
440 return size; 440 return size;
441 } 441 }
442 442
443 } // namespace blink 443 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/shapes/Shape.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698