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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h

Issue 1756763004: Merge image sizing algorithms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unused variable 'styleImage' in release Created 4 years, 9 months 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) 1999 Lars Knoll <knoll@kde.org> 2 * Copyright (C) 1999 Lars Knoll <knoll@kde.org>
3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org> 3 * Copyright (C) 1999 Antti Koivisto <koivisto@kde.org>
4 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com> 4 * Copyright (C) 2006 Allan Sandfeld Jensen <kde@carewolf.com>
5 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 5 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 7 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 void initialize(LayoutObject*) override; 45 void initialize(LayoutObject*) override;
46 void shutdown() override; 46 void shutdown() override;
47 47
48 bool hasImage() const override { return true; } 48 bool hasImage() const override { return true; }
49 PassRefPtr<Image> image(const IntSize&, float) const override; 49 PassRefPtr<Image> image(const IntSize&, float) const override;
50 bool errorOccurred() const override { return m_styleImage->errorOccurred(); } 50 bool errorOccurred() const override { return m_styleImage->errorOccurred(); }
51 51
52 bool imageHasRelativeSize() const override { return m_styleImage->imageHasRe lativeSize(); } 52 bool imageHasRelativeSize() const override { return m_styleImage->imageHasRe lativeSize(); }
53 53
54 LayoutSize imageSize(float multiplier) const override { return m_styleImage- >imageSize(m_layoutObject, multiplier); } 54 LayoutSize imageSize(float multiplier) const override
55 {
56 // TODO(davve): Find out the default object size, if any, in this contex t.
57 return m_styleImage->imageSize(m_layoutObject, multiplier, LayoutSize()) ;
58 }
55 59
56 WrappedImagePtr imagePtr() const override { return m_styleImage->data(); } 60 WrappedImagePtr imagePtr() const override { return m_styleImage->data(); }
57 61
58 DECLARE_VIRTUAL_TRACE(); 62 DECLARE_VIRTUAL_TRACE();
59 63
60 private: 64 private:
61 explicit LayoutImageResourceStyleImage(StyleImage*); 65 explicit LayoutImageResourceStyleImage(StyleImage*);
62 RefPtrWillBeMember<StyleImage> m_styleImage; 66 RefPtrWillBeMember<StyleImage> m_styleImage;
63 }; 67 };
64 68
65 } // namespace blink 69 } // namespace blink
66 70
67 #endif // LayoutImageStyleImage_h 71 #endif // LayoutImageStyleImage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698