OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/LayerPainter.h" | 6 #include "core/paint/LayerPainter.h" |
7 | 7 |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
10 #include "core/layout/FilterEffectRenderer.h" | 10 #include "core/layout/FilterEffectRenderer.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 OwnPtr<LayerClipRecorder> clipRecorder; | 459 OwnPtr<LayerClipRecorder> clipRecorder; |
460 | 460 |
461 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) { | 461 if (needsToClip(localPaintingInfo, fragment.backgroundRect)) { |
462 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer
(), context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect, &l
ocalPaintingInfo, fragment.paginationOffset, paintFlags)); | 462 clipRecorder = adoptPtr(new LayerClipRecorder(m_renderLayer.renderer
(), context, DisplayItem::ClipLayerOverflowControls, fragment.backgroundRect, &l
ocalPaintingInfo, fragment.paginationOffset, paintFlags)); |
463 } | 463 } |
464 if (LayerScrollableArea* scrollableArea = m_renderLayer.scrollableArea()
) | 464 if (LayerScrollableArea* scrollableArea = m_renderLayer.scrollableArea()
) |
465 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context
, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_renderLayer.render
BoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulat
ion, m_renderLayer.compositingState()))), pixelSnappedIntRect(fragment.backgroun
dRect.rect()), true); | 465 ScrollableAreaPainter(*scrollableArea).paintOverflowControls(context
, roundedIntPoint(toPoint(fragment.layerBounds.location() - m_renderLayer.render
BoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulat
ion, m_renderLayer.compositingState()))), pixelSnappedIntRect(fragment.backgroun
dRect.rect()), true); |
466 } | 466 } |
467 } | 467 } |
468 | 468 |
469 static bool checkContainingBlockChainForPagination(LayoutLayerModelObject* rende
rer, RenderBox* ancestorColumnsRenderer) | 469 static bool checkContainingBlockChainForPagination(LayoutBoxModelObject* rendere
r, RenderBox* ancestorColumnsRenderer) |
470 { | 470 { |
471 RenderView* view = renderer->view(); | 471 RenderView* view = renderer->view(); |
472 LayoutLayerModelObject* prevBlock = renderer; | 472 LayoutBoxModelObject* prevBlock = renderer; |
473 RenderBlock* containingBlock; | 473 RenderBlock* containingBlock; |
474 for (containingBlock = renderer->containingBlock(); | 474 for (containingBlock = renderer->containingBlock(); |
475 containingBlock && containingBlock != view && containingBlock != ancesto
rColumnsRenderer; | 475 containingBlock && containingBlock != view && containingBlock != ancesto
rColumnsRenderer; |
476 containingBlock = containingBlock->containingBlock()) | 476 containingBlock = containingBlock->containingBlock()) |
477 prevBlock = containingBlock; | 477 prevBlock = containingBlock; |
478 | 478 |
479 // If the columns block wasn't in our containing block chain, then we aren't
paginated by it. | 479 // If the columns block wasn't in our containing block chain, then we aren't
paginated by it. |
480 if (containingBlock != ancestorColumnsRenderer) | 480 if (containingBlock != ancestorColumnsRenderer) |
481 return false; | 481 return false; |
482 | 482 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 if (!m_renderLayer.containsDirtyOverlayScrollbars()) | 707 if (!m_renderLayer.containsDirtyOverlayScrollbars()) |
708 return; | 708 return; |
709 | 709 |
710 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); | 710 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); |
711 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 711 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
712 | 712 |
713 m_renderLayer.setContainsDirtyOverlayScrollbars(false); | 713 m_renderLayer.setContainsDirtyOverlayScrollbars(false); |
714 } | 714 } |
715 | 715 |
716 } // namespace blink | 716 } // namespace blink |
OLD | NEW |