| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPain
terChromium> contentPaint) | 39 NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPain
terChromium> contentPaint) |
| 40 : m_contentPaint(contentPaint) | 40 : m_contentPaint(contentPaint) |
| 41 , m_showDebugBorders(false) | 41 , m_showDebugBorders(false) |
| 42 { | 42 { |
| 43 m_graphicsLayer = WebCore::GraphicsLayer::create(this); | 43 m_graphicsLayer = WebCore::GraphicsLayer::create(this); |
| 44 #ifndef NDEBUG | 44 #ifndef NDEBUG |
| 45 m_graphicsLayer->setName("non-composited content"); | 45 m_graphicsLayer->setName("non-composited content"); |
| 46 #endif | 46 #endif |
| 47 m_graphicsLayer->setDrawsContent(true); | 47 m_graphicsLayer->setDrawsContent(true); |
| 48 m_graphicsLayer->platformLayer()->setIsNonCompositedContent(true); | 48 m_graphicsLayer->platformLayer()->setIsNonCompositedContent(true); |
| 49 #if !ENABLE(RUBBER_BANDING) | |
| 50 m_graphicsLayer->platformLayer()->setBackgroundCoversViewport(true); | |
| 51 #endif | |
| 52 m_graphicsLayer->platformLayer()->setOpaque(true); | 49 m_graphicsLayer->platformLayer()->setOpaque(true); |
| 53 } | 50 } |
| 54 | 51 |
| 55 NonCompositedContentHost::~NonCompositedContentHost() | 52 NonCompositedContentHost::~NonCompositedContentHost() |
| 56 { | 53 { |
| 57 } | 54 } |
| 58 | 55 |
| 59 void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color) | 56 void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color) |
| 60 { | 57 { |
| 61 if (color.isValid()) | 58 m_graphicsLayer->platformLayer()->setBackgroundColor(color); |
| 62 m_graphicsLayer->platformLayer()->setBackgroundColor(color); | |
| 63 else | |
| 64 m_graphicsLayer->platformLayer()->setBackgroundColor(WebCore::Color::whi
te); | |
| 65 } | 59 } |
| 66 | 60 |
| 67 void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer) | 61 void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer) |
| 68 { | 62 { |
| 69 m_graphicsLayer->setNeedsDisplay(); | 63 m_graphicsLayer->setNeedsDisplay(); |
| 70 | 64 |
| 71 if (!layer) { | 65 if (!layer) { |
| 72 m_graphicsLayer->removeFromParent(); | 66 m_graphicsLayer->removeFromParent(); |
| 73 m_graphicsLayer->platformLayer()->setLayerTreeHost(0); | 67 m_graphicsLayer->platformLayer()->setLayerTreeHost(0); |
| 74 return; | 68 return; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 { | 173 { |
| 180 return m_showDebugBorders; | 174 return m_showDebugBorders; |
| 181 } | 175 } |
| 182 | 176 |
| 183 bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*)
const | 177 bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*)
const |
| 184 { | 178 { |
| 185 return false; | 179 return false; |
| 186 } | 180 } |
| 187 | 181 |
| 188 } // namespace WebKit | 182 } // namespace WebKit |
| OLD | NEW |