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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1468023002: Rename imageSizeForLayoutObject() to imageSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make LayoutObject::shouldRespectImageOrientation class static and make use of it Created 5 years 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 1915
1916 ImageResource* cachedImage = imageLayoutObject->cachedImage(); 1916 ImageResource* cachedImage = imageLayoutObject->cachedImage();
1917 if (!cachedImage) 1917 if (!cachedImage)
1918 return; 1918 return;
1919 1919
1920 Image* image = cachedImage->image(); 1920 Image* image = cachedImage->image();
1921 if (!image) 1921 if (!image)
1922 return; 1922 return;
1923 1923
1924 // This is a no-op if the layer doesn't have an inner layer for the image. 1924 // This is a no-op if the layer doesn't have an inner layer for the image.
1925 m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectI mageOrientation()); 1925 m_graphicsLayer->setContentsToImage(image, LayoutObject::shouldRespectImageO rientation(imageLayoutObject));
1926 1926
1927 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering() == ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality); 1927 m_graphicsLayer->setFilterQuality(layoutObject()->style()->imageRendering() == ImageRenderingPixelated ? kNone_SkFilterQuality : kLow_SkFilterQuality);
1928 1928
1929 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632 1929 // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632
1930 updateDrawsContent(); 1930 updateDrawsContent();
1931 1931
1932 // Image animation is "lazy", in that it automatically stops unless someone is drawing 1932 // Image animation is "lazy", in that it automatically stops unless someone is drawing
1933 // the image. So we have to kick the animation each time; this has the downs ide that the 1933 // the image. So we have to kick the animation each time; this has the downs ide that the
1934 // image will keep animating, even if its layer is not visible. 1934 // image will keep animating, even if its layer is not visible.
1935 image->startAnimation(); 1935 image->startAnimation();
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2561 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2562 name = "Scrolling Block Selection Layer"; 2562 name = "Scrolling Block Selection Layer";
2563 } else { 2563 } else {
2564 ASSERT_NOT_REACHED(); 2564 ASSERT_NOT_REACHED();
2565 } 2565 }
2566 2566
2567 return name; 2567 return name;
2568 } 2568 }
2569 2569
2570 } // namespace blink 2570 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698