| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void disconnectImageElement() { m_imageElement = 0; } | 44 void disconnectImageElement() { m_imageElement = 0; } |
| 45 | 45 |
| 46 void windowSizeChanged(); | 46 void windowSizeChanged(); |
| 47 void imageUpdated(); | 47 void imageUpdated(); |
| 48 void imageClicked(int x, int y); | 48 void imageClicked(int x, int y); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 ImageDocument(Frame*, const KURL&); | 51 ImageDocument(Frame*, const KURL&); |
| 52 | 52 |
| 53 virtual PassRefPtr<DocumentParser> createParser(); | 53 virtual PassRefPtr<DocumentParser> createParser(); |
| 54 virtual bool isImageDocument() const { return true; } | 54 |
| 55 | |
| 56 void createDocumentStructure(); | 55 void createDocumentStructure(); |
| 57 void resizeImageToFit(); | 56 void resizeImageToFit(); |
| 58 void restoreImageSize(); | 57 void restoreImageSize(); |
| 59 bool imageFitsInWindow() const; | 58 bool imageFitsInWindow() const; |
| 60 bool shouldShrinkToFit() const; | 59 bool shouldShrinkToFit() const; |
| 61 float scale() const; | 60 float scale() const; |
| 62 | 61 |
| 63 ImageDocumentElement* m_imageElement; | 62 ImageDocumentElement* m_imageElement; |
| 64 | 63 |
| 65 // Whether enough of the image has been loaded to determine its size | 64 // Whether enough of the image has been loaded to determine its size |
| (...skipping 17 matching lines...) Expand all Loading... |
| 83 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isImageDocument()); | 82 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isImageDocument()); |
| 84 return static_cast<const ImageDocument*>(document); | 83 return static_cast<const ImageDocument*>(document); |
| 85 } | 84 } |
| 86 | 85 |
| 87 // This will catch anyone doing an unnecessary cast. | 86 // This will catch anyone doing an unnecessary cast. |
| 88 void toImageDocument(const ImageDocument*); | 87 void toImageDocument(const ImageDocument*); |
| 89 | 88 |
| 90 } | 89 } |
| 91 | 90 |
| 92 #endif // ImageDocument_h | 91 #endif // ImageDocument_h |
| OLD | NEW |