OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 { | 1089 { |
1090 return m_frame->document()->lifecycle(); | 1090 return m_frame->document()->lifecycle(); |
1091 } | 1091 } |
1092 | 1092 |
1093 void FrameView::gatherDebugLayoutRects(RenderObject* layoutRoot) | 1093 void FrameView::gatherDebugLayoutRects(RenderObject* layoutRoot) |
1094 { | 1094 { |
1095 bool isTracing; | 1095 bool isTracing; |
1096 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.debug.la
yout"), &isTracing); | 1096 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("blink.debug.la
yout"), &isTracing); |
1097 if (!isTracing) | 1097 if (!isTracing) |
1098 return; | 1098 return; |
1099 if (!layoutRoot->enclosingLayer()->hasCompositedLayerMapping()) | 1099 |
| 1100 CompositedLayerMapping* compositedLayerMapping = layoutRoot->enclosingLayer(
)->compositedLayerMapping(); |
| 1101 if (!compositedLayerMapping) |
1100 return; | 1102 return; |
1101 // For access to compositedLayerMapping(). | 1103 // For access to compositedLayerMapping(). |
1102 DisableCompositingQueryAsserts disabler; | 1104 DisableCompositingQueryAsserts disabler; |
1103 GraphicsLayer* graphicsLayer = layoutRoot->enclosingLayer()->compositedLayer
Mapping()->mainGraphicsLayer(); | 1105 GraphicsLayer* graphicsLayer = compositedLayerMapping->mainGraphicsLayer(); |
1104 if (!graphicsLayer) | 1106 if (!graphicsLayer) |
1105 return; | 1107 return; |
1106 | 1108 |
1107 GraphicsLayerDebugInfo& debugInfo = graphicsLayer->debugInfo(); | 1109 GraphicsLayerDebugInfo& debugInfo = graphicsLayer->debugInfo(); |
1108 | 1110 |
1109 debugInfo.currentLayoutRects().clear(); | 1111 debugInfo.currentLayoutRects().clear(); |
1110 for (RenderObject* renderer = layoutRoot; renderer; renderer = renderer->nex
tInPreOrder()) { | 1112 for (RenderObject* renderer = layoutRoot; renderer; renderer = renderer->nex
tInPreOrder()) { |
1111 if (renderer->layoutDidGetCalledSinceLastFrame()) { | 1113 if (renderer->layoutDidGetCalledSinceLastFrame()) { |
1112 FloatQuad quad = renderer->localToAbsoluteQuad(FloatQuad(renderer->p
reviousPaintInvalidationRect())); | 1114 FloatQuad quad = renderer->localToAbsoluteQuad(FloatQuad(renderer->p
reviousPaintInvalidationRect())); |
1113 LayoutRect rect = quad.enclosingBoundingBox(); | 1115 LayoutRect rect = quad.enclosingBoundingBox(); |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1918 | 1920 |
1919 bool FrameView::isTransparent() const | 1921 bool FrameView::isTransparent() const |
1920 { | 1922 { |
1921 return m_isTransparent; | 1923 return m_isTransparent; |
1922 } | 1924 } |
1923 | 1925 |
1924 void FrameView::setTransparent(bool isTransparent) | 1926 void FrameView::setTransparent(bool isTransparent) |
1925 { | 1927 { |
1926 m_isTransparent = isTransparent; | 1928 m_isTransparent = isTransparent; |
1927 DisableCompositingQueryAsserts disabler; | 1929 DisableCompositingQueryAsserts disabler; |
1928 if (renderView() && renderView()->layer()->hasCompositedLayerMapping()) | 1930 |
1929 renderView()->layer()->compositedLayerMapping()->updateContentsOpaque(); | 1931 if (!renderView()) |
| 1932 return; |
| 1933 |
| 1934 if (CompositedLayerMapping* compositedLayerMapping = renderView()->layer()->
compositedLayerMapping()) |
| 1935 compositedLayerMapping->updateContentsOpaque(); |
1930 } | 1936 } |
1931 | 1937 |
1932 bool FrameView::hasOpaqueBackground() const | 1938 bool FrameView::hasOpaqueBackground() const |
1933 { | 1939 { |
1934 return !m_isTransparent && !m_baseBackgroundColor.hasAlpha(); | 1940 return !m_isTransparent && !m_baseBackgroundColor.hasAlpha(); |
1935 } | 1941 } |
1936 | 1942 |
1937 Color FrameView::baseBackgroundColor() const | 1943 Color FrameView::baseBackgroundColor() const |
1938 { | 1944 { |
1939 return m_baseBackgroundColor; | 1945 return m_baseBackgroundColor; |
1940 } | 1946 } |
1941 | 1947 |
1942 void FrameView::setBaseBackgroundColor(const Color& backgroundColor) | 1948 void FrameView::setBaseBackgroundColor(const Color& backgroundColor) |
1943 { | 1949 { |
1944 m_baseBackgroundColor = backgroundColor; | 1950 m_baseBackgroundColor = backgroundColor; |
1945 | 1951 |
1946 if (renderView() && renderView()->layer()->hasCompositedLayerMapping()) { | 1952 if (renderView()) { |
1947 CompositedLayerMapping* compositedLayerMapping = renderView()->layer()->
compositedLayerMapping(); | 1953 if (CompositedLayerMapping* compositedLayerMapping = renderView()->layer
()->compositedLayerMapping()) { |
1948 compositedLayerMapping->updateContentsOpaque(); | 1954 compositedLayerMapping->updateContentsOpaque(); |
1949 if (compositedLayerMapping->mainGraphicsLayer()) | 1955 if (compositedLayerMapping->mainGraphicsLayer()) |
1950 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay(); | 1956 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay(); |
| 1957 } |
1951 } | 1958 } |
1952 recalculateScrollbarOverlayStyle(); | 1959 recalculateScrollbarOverlayStyle(); |
1953 } | 1960 } |
1954 | 1961 |
1955 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool t
ransparent) | 1962 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, bool t
ransparent) |
1956 { | 1963 { |
1957 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext
(m_frame.get())) { | 1964 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext
(m_frame.get())) { |
1958 if (!frame->isLocalFrame()) | 1965 if (!frame->isLocalFrame()) |
1959 continue; | 1966 continue; |
1960 if (FrameView* view = toLocalFrame(frame)->view()) { | 1967 if (FrameView* view = toLocalFrame(frame)->view()) { |
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3997 return; | 4004 return; |
3998 | 4005 |
3999 ScrollableArea::setScrollOrigin(origin); | 4006 ScrollableArea::setScrollOrigin(origin); |
4000 | 4007 |
4001 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4008 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
4002 if (updatePositionAtAll && updatePositionSynchronously) | 4009 if (updatePositionAtAll && updatePositionSynchronously) |
4003 updateScrollbars(scrollOffsetDouble()); | 4010 updateScrollbars(scrollOffsetDouble()); |
4004 } | 4011 } |
4005 | 4012 |
4006 } // namespace blink | 4013 } // namespace blink |
OLD | NEW |