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

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1162793003: Add CSS image-orientation: from-image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add converter Created 5 years, 5 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
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/style/ComputedStyle.h » ('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) 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "core/page/scrolling/ScrollingCoordinator.h" 50 #include "core/page/scrolling/ScrollingCoordinator.h"
51 #include "core/paint/DeprecatedPaintLayerPainter.h" 51 #include "core/paint/DeprecatedPaintLayerPainter.h"
52 #include "core/paint/DeprecatedPaintLayerStackingNodeIterator.h" 52 #include "core/paint/DeprecatedPaintLayerStackingNodeIterator.h"
53 #include "core/paint/ScrollableAreaPainter.h" 53 #include "core/paint/ScrollableAreaPainter.h"
54 #include "core/paint/TransformRecorder.h" 54 #include "core/paint/TransformRecorder.h"
55 #include "core/plugins/PluginView.h" 55 #include "core/plugins/PluginView.h"
56 #include "platform/LengthFunctions.h" 56 #include "platform/LengthFunctions.h"
57 #include "platform/RuntimeEnabledFeatures.h" 57 #include "platform/RuntimeEnabledFeatures.h"
58 #include "platform/fonts/FontCache.h" 58 #include "platform/fonts/FontCache.h"
59 #include "platform/geometry/TransformState.h" 59 #include "platform/geometry/TransformState.h"
60 #include "platform/graphics/BitmapImage.h"
60 #include "platform/graphics/GraphicsContext.h" 61 #include "platform/graphics/GraphicsContext.h"
61 #include "platform/graphics/paint/ClipDisplayItem.h" 62 #include "platform/graphics/paint/ClipDisplayItem.h"
62 #include "platform/graphics/paint/DisplayItemList.h" 63 #include "platform/graphics/paint/DisplayItemList.h"
63 #include "platform/graphics/paint/TransformDisplayItem.h" 64 #include "platform/graphics/paint/TransformDisplayItem.h"
64 #include "wtf/CurrentTime.h" 65 #include "wtf/CurrentTime.h"
65 #include "wtf/text/StringBuilder.h" 66 #include "wtf/text/StringBuilder.h"
66 67
67 namespace blink { 68 namespace blink {
68 69
69 using namespace HTMLNames; 70 using namespace HTMLNames;
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 LayoutObject* layoutObject = this->layoutObject(); 1845 LayoutObject* layoutObject = this->layoutObject();
1845 if (m_owningLayer.hasBoxDecorationsOrBackground() || layoutObject->hasClip() || layoutObject->hasClipPath()) 1846 if (m_owningLayer.hasBoxDecorationsOrBackground() || layoutObject->hasClip() || layoutObject->hasClipPath())
1846 return false; 1847 return false;
1847 1848
1848 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject); 1849 LayoutImage* imageLayoutObject = toLayoutImage(layoutObject);
1849 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) { 1850 if (ImageResource* cachedImage = imageLayoutObject->cachedImage()) {
1850 if (!cachedImage->hasImage()) 1851 if (!cachedImage->hasImage())
1851 return false; 1852 return false;
1852 1853
1853 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject); 1854 Image* image = cachedImage->imageForLayoutObject(imageLayoutObject);
1854 return image->isBitmapImage(); 1855 if (!image->isBitmapImage())
1856 return false;
1857
1858 // FIXME: We should be able to handle bitmap images using direct composi ting
1859 // no matter what image-orientation value. See crbug.com/502267
1860 if (imageLayoutObject->style()->respectImageOrientation() != RespectImag eOrientation)
1861 return true;
1855 } 1862 }
1856 1863
1857 return false; 1864 return false;
1858 } 1865 }
1859 1866
1860 void CompositedDeprecatedPaintLayerMapping::contentChanged(ContentChangeType cha ngeType) 1867 void CompositedDeprecatedPaintLayerMapping::contentChanged(ContentChangeType cha ngeType)
1861 { 1868 {
1862 if ((changeType == ImageChanged) && layoutObject()->isImage() && isDirectlyC ompositedImage()) { 1869 if ((changeType == ImageChanged) && layoutObject()->isImage() && isDirectlyC ompositedImage()) {
1863 updateImageContents(); 1870 updateImageContents();
1864 return; 1871 return;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2363 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2357 name = "Scrolling Block Selection Layer"; 2364 name = "Scrolling Block Selection Layer";
2358 } else { 2365 } else {
2359 ASSERT_NOT_REACHED(); 2366 ASSERT_NOT_REACHED();
2360 } 2367 }
2361 2368
2362 return name; 2369 return name;
2363 } 2370 }
2364 2371
2365 } // namespace blink 2372 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698