| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 static float pageZoomFactor(const Document* document) | 115 static float pageZoomFactor(const Document* document) |
| 116 { | 116 { |
| 117 LocalFrame* frame = document->frame(); | 117 LocalFrame* frame = document->frame(); |
| 118 return frame ? frame->pageZoomFactor() : 1; | 118 return frame ? frame->pageZoomFactor() : 1; |
| 119 } | 119 } |
| 120 | 120 |
| 121 static String imageTitle(const String& filename, const IntSize& size) | 121 static String imageTitle(const String& filename, const IntSize& size) |
| 122 { | 122 { |
| 123 StringBuilder result; | 123 StringBuilder result; |
| 124 result.append(filename); | 124 result.append(filename); |
| 125 result.appendLiteral(" ("); | 125 result.append(" ("); |
| 126 // FIXME: Localize numbers. Safari/OSX shows localized numbers with group | 126 // FIXME: Localize numbers. Safari/OSX shows localized numbers with group |
| 127 // separaters. For example, "1,920x1,080". | 127 // separaters. For example, "1,920x1,080". |
| 128 result.appendNumber(size.width()); | 128 result.appendNumber(size.width()); |
| 129 result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign) | 129 result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign) |
| 130 result.appendNumber(size.height()); | 130 result.appendNumber(size.height()); |
| 131 result.append(')'); | 131 result.append(')'); |
| 132 return result.toString(); | 132 return result.toString(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void ImageDocumentParser::appendBytes(const char* data, size_t length) | 135 void ImageDocumentParser::appendBytes(const char* data, size_t length) |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 442 } |
| 443 | 443 |
| 444 bool ImageEventListener::operator==(const EventListener& listener) const | 444 bool ImageEventListener::operator==(const EventListener& listener) const |
| 445 { | 445 { |
| 446 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 446 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
| 447 return m_doc == imageEventListener->m_doc; | 447 return m_doc == imageEventListener->m_doc; |
| 448 return false; | 448 return false; |
| 449 } | 449 } |
| 450 | 450 |
| 451 } // namespace blink | 451 } // namespace blink |
| OLD | NEW |