Chromium Code Reviews| 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2050 m_baseBackgroundColor = backgroundColor; | 2050 m_baseBackgroundColor = backgroundColor; |
| 2051 | 2051 |
| 2052 if (!layoutViewItem().isNull() && | 2052 if (!layoutViewItem().isNull() && |
| 2053 layoutViewItem().layer()->hasCompositedLayerMapping()) { | 2053 layoutViewItem().layer()->hasCompositedLayerMapping()) { |
| 2054 CompositedLayerMapping* compositedLayerMapping = | 2054 CompositedLayerMapping* compositedLayerMapping = |
| 2055 layoutViewItem().layer()->compositedLayerMapping(); | 2055 layoutViewItem().layer()->compositedLayerMapping(); |
| 2056 compositedLayerMapping->updateContentsOpaque(); | 2056 compositedLayerMapping->updateContentsOpaque(); |
| 2057 if (compositedLayerMapping->mainGraphicsLayer()) | 2057 if (compositedLayerMapping->mainGraphicsLayer()) |
| 2058 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay(); | 2058 compositedLayerMapping->mainGraphicsLayer()->setNeedsDisplay(); |
| 2059 } | 2059 } |
| 2060 recalculateScrollbarOverlayStyle(documentBackgroundColor()); | 2060 recalculateScrollbarOverlayStyle(documentBackgroundColor(), isTransparent()); |
| 2061 | 2061 |
| 2062 if (!shouldThrottleRendering()) | 2062 if (!shouldThrottleRendering()) |
| 2063 page()->animator().scheduleVisualUpdate(m_frame.get()); | 2063 page()->animator().scheduleVisualUpdate(m_frame.get()); |
| 2064 } | 2064 } |
| 2065 | 2065 |
| 2066 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, | 2066 void FrameView::updateBackgroundRecursively(const Color& backgroundColor, |
| 2067 bool transparent) { | 2067 bool transparent) { |
| 2068 forAllNonThrottledFrameViews( | 2068 forAllNonThrottledFrameViews( |
| 2069 [backgroundColor, transparent](FrameView& frameView) { | 2069 [backgroundColor, transparent](FrameView& frameView) { |
| 2070 frameView.setTransparent(transparent); | 2070 frameView.setTransparent(transparent); |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2405 void FrameView::scrollbarStyleChanged() { | 2405 void FrameView::scrollbarStyleChanged() { |
| 2406 // FIXME: Why does this only apply to the main frame? | 2406 // FIXME: Why does this only apply to the main frame? |
| 2407 if (!m_frame->isMainFrame()) | 2407 if (!m_frame->isMainFrame()) |
| 2408 return; | 2408 return; |
| 2409 adjustScrollbarOpacity(); | 2409 adjustScrollbarOpacity(); |
| 2410 contentsResized(); | 2410 contentsResized(); |
| 2411 updateScrollbars(); | 2411 updateScrollbars(); |
| 2412 positionScrollbarLayers(); | 2412 positionScrollbarLayers(); |
| 2413 } | 2413 } |
| 2414 | 2414 |
| 2415 ScrollbarOverlayStyle FrameView::getScrollbarOverlayStyle() const { | |
| 2416 ScrollbarOverlayStyle style = ScrollableArea::getScrollbarOverlayStyle(); | |
| 2417 | |
| 2418 if (style == ScrollbarOverlayStyleDefault) { | |
| 2419 const FrameView* view = this; | |
| 2420 | |
| 2421 while (view->isTransparent() && view->parentFrameView()) | |
|
bokan
2016/10/18 19:55:25
I don't think this is doing what you want it to. F
| |
| 2422 view = view->parentFrameView(); | |
| 2423 | |
| 2424 if (view->viewportLayoutObject()) { | |
| 2425 Color color = | |
| 2426 view->viewportLayoutObject()->style()->visitedDependentColor( | |
| 2427 CSSPropertyBackgroundColor); | |
| 2428 style = calculateScrollbarOverlayStyle(color); | |
| 2429 } | |
| 2430 } | |
| 2431 | |
| 2432 return style; | |
| 2433 } | |
| 2434 | |
| 2415 void FrameView::notifyPageThatContentAreaWillPaint() const { | 2435 void FrameView::notifyPageThatContentAreaWillPaint() const { |
| 2416 Page* page = m_frame->page(); | 2436 Page* page = m_frame->page(); |
| 2417 if (!page) | 2437 if (!page) |
| 2418 return; | 2438 return; |
| 2419 | 2439 |
| 2420 contentAreaWillPaint(); | 2440 contentAreaWillPaint(); |
| 2421 | 2441 |
| 2422 if (!m_scrollableAreas) | 2442 if (!m_scrollableAreas) |
| 2423 return; | 2443 return; |
| 2424 | 2444 |
| (...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4473 } | 4493 } |
| 4474 | 4494 |
| 4475 bool FrameView::canThrottleRendering() const { | 4495 bool FrameView::canThrottleRendering() const { |
| 4476 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4496 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4477 return false; | 4497 return false; |
| 4478 return m_subtreeThrottled || | 4498 return m_subtreeThrottled || |
| 4479 (m_hiddenForThrottling && m_crossOriginForThrottling); | 4499 (m_hiddenForThrottling && m_crossOriginForThrottling); |
| 4480 } | 4500 } |
| 4481 | 4501 |
| 4482 } // namespace blink | 4502 } // namespace blink |
| OLD | NEW |