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

Side by Side Diff: sky/engine/core/css/CSSImageSetValue.cpp

Issue 714013002: Remove some more zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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
« no previous file with comments | « no previous file | sky/engine/core/dom/Touch.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(ResourceFetcher* loader, float deviceScaleFactor, const ResourceLoaderOptions& options) 92 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(ResourceFetcher* loader, float deviceScaleFactor, const ResourceLoaderOptions& options)
93 { 93 {
94 ASSERT(loader); 94 ASSERT(loader);
95 95
96 m_scaleFactor = deviceScaleFactor; 96 m_scaleFactor = deviceScaleFactor;
97 97
98 if (!m_imagesInSet.size()) 98 if (!m_imagesInSet.size())
99 fillImageSet(); 99 fillImageSet();
100 100
101 if (!m_accessedBestFitImage) { 101 if (!m_accessedBestFitImage) {
102 // FIXME: In the future, we want to take much more than deviceScaleFacto r into acount here.
103 // All forms of scale should be included: Page::pageScaleFactor(), Local Frame::pageZoomFactor(),
104 // and any CSS transforms. https://bugs.webkit.org/show_bug.cgi?id=81698
105 ImageWithScale image = bestImageForScaleFactor(); 102 ImageWithScale image = bestImageForScaleFactor();
106 if (Document* document = loader->document()) { 103 if (Document* document = loader->document()) {
107 FetchRequest request(ResourceRequest(document->completeURL(image.ima geURL)), FetchInitiatorTypeNames::css, options); 104 FetchRequest request(ResourceRequest(document->completeURL(image.ima geURL)), FetchInitiatorTypeNames::css, options);
108 request.mutableResourceRequest().setHTTPReferrer(image.referrer); 105 request.mutableResourceRequest().setHTTPReferrer(image.referrer);
109 106
110 if (ResourcePtr<ImageResource> cachedImage = loader->fetchImage(requ est)) { 107 if (ResourcePtr<ImageResource> cachedImage = loader->fetchImage(requ est)) {
111 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), ima ge.scaleFactor, this); 108 m_imageSet = StyleFetchedImageSet::create(cachedImage.get(), ima ge.scaleFactor, this);
112 m_accessedBestFitImage = true; 109 m_accessedBestFitImage = true;
113 } 110 }
114 } 111 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 { 180 {
184 // Non-CSSValueList data is not accessible through CSS OM, no need to clone. 181 // Non-CSSValueList data is not accessible through CSS OM, no need to clone.
185 } 182 }
186 183
187 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const 184 PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const
188 { 185 {
189 return adoptRef(new CSSImageSetValue(*this)); 186 return adoptRef(new CSSImageSetValue(*this));
190 } 187 }
191 188
192 } // namespace blink 189 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/Touch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698