OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 static float pageZoomFactor(const Document* document) | 101 static float pageZoomFactor(const Document* document) |
102 { | 102 { |
103 LocalFrame* frame = document->frame(); | 103 LocalFrame* frame = document->frame(); |
104 return frame ? frame->pageZoomFactor() : 1; | 104 return frame ? frame->pageZoomFactor() : 1; |
105 } | 105 } |
106 | 106 |
107 static String imageTitle(const String& filename, const IntSize& size) | 107 static String imageTitle(const String& filename, const IntSize& size) |
108 { | 108 { |
109 StringBuilder result; | 109 StringBuilder result; |
110 result.append(filename); | 110 result.append(filename); |
111 result.append(" ("); | 111 result.appendLiteral(" ("); |
112 // FIXME: Localize numbers. Safari/OSX shows localized numbers with group | 112 // FIXME: Localize numbers. Safari/OSX shows localized numbers with group |
113 // separaters. For example, "1,920x1,080". | 113 // separaters. For example, "1,920x1,080". |
114 result.append(String::number(size.width())); | 114 result.append(String::number(size.width())); |
115 result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign) | 115 result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign) |
116 result.append(String::number(size.height())); | 116 result.append(String::number(size.height())); |
117 result.append(')'); | 117 result.append(')'); |
118 return result.toString(); | 118 return result.toString(); |
119 } | 119 } |
120 | 120 |
121 void ImageDocumentParser::appendBytes(const char* data, size_t length) | 121 void ImageDocumentParser::appendBytes(const char* data, size_t length) |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 } | 393 } |
394 | 394 |
395 bool ImageEventListener::operator==(const EventListener& listener) | 395 bool ImageEventListener::operator==(const EventListener& listener) |
396 { | 396 { |
397 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 397 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
398 return m_doc == imageEventListener->m_doc; | 398 return m_doc == imageEventListener->m_doc; |
399 return false; | 399 return false; |
400 } | 400 } |
401 | 401 |
402 } | 402 } |
OLD | NEW |