| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index d891063ca9a660948d3bc8c85d2f77a383a99653..398ec16378d30a75a30fc2ff02e8278416c3834b 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -65,7 +65,6 @@
|
| #include "core/rendering/HitTestRequest.h"
|
| #include "core/rendering/HitTestResult.h"
|
| #include "core/rendering/HitTestingTransformState.h"
|
| -#include "core/rendering/RenderFlowThread.h"
|
| #include "core/rendering/RenderGeometryMap.h"
|
| #include "core/rendering/RenderInline.h"
|
| #include "core/rendering/RenderLayerCompositor.h"
|
| @@ -287,11 +286,6 @@ void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, UpdateLay
|
| if (hasCompositedLayerMapping())
|
| flags &= ~IsCompositingUpdateRoot;
|
|
|
| - if (useRegionBasedColumns() && renderer()->isInFlowRenderFlowThread()) {
|
| - updatePagination();
|
| - flags |= UpdatePagination;
|
| - }
|
| -
|
| if (renderer()->hasColumns())
|
| flags |= UpdatePagination;
|
|
|
| @@ -598,12 +592,6 @@ static bool checkContainingBlockChainForPagination(RenderLayerModelObject* rende
|
| return true;
|
| }
|
|
|
| -bool RenderLayer::useRegionBasedColumns() const
|
| -{
|
| - const Settings* settings = renderer()->document().settings();
|
| - return settings && settings->regionBasedColumnsEnabled();
|
| -}
|
| -
|
| void RenderLayer::updatePagination()
|
| {
|
| m_isPaginated = false;
|
| @@ -613,50 +601,8 @@ void RenderLayer::updatePagination()
|
| return; // FIXME: We will have to deal with paginated compositing layers someday.
|
| // FIXME: For now the RenderView can't be paginated. Eventually printing will move to a model where it is though.
|
|
|
| - // The main difference between the paginated booleans for the old column code and the new column code
|
| - // is that each paginated layer has to paint on its own with the new code. There is no
|
| - // recurring into child layers. This means that the m_isPaginated bits for the new column code can't just be set on
|
| - // "roots" that get split and paint all their descendants. Instead each layer has to be checked individually and
|
| - // genuinely know if it is going to have to split itself up when painting only its contents (and not any other descendant
|
| - // layers). We track an enclosingPaginationLayer instead of using a simple bit, since we want to be able to get back
|
| - // to that layer easily.
|
| - bool regionBasedColumnsUsed = useRegionBasedColumns();
|
| - if (regionBasedColumnsUsed && renderer()->isInFlowRenderFlowThread()) {
|
| - m_enclosingPaginationLayer = this;
|
| - return;
|
| - }
|
| -
|
| if (m_stackingNode->isNormalFlowOnly()) {
|
| - if (regionBasedColumnsUsed) {
|
| - // Content inside a transform is not considered to be paginated, since we simply
|
| - // paint the transform multiple times in each column, so we don't have to use
|
| - // fragments for the transformed content.
|
| - m_enclosingPaginationLayer = parent()->enclosingPaginationLayer();
|
| - if (m_enclosingPaginationLayer && m_enclosingPaginationLayer->hasTransform())
|
| - m_enclosingPaginationLayer = 0;
|
| - } else
|
| - m_isPaginated = parent()->renderer()->hasColumns();
|
| - return;
|
| - }
|
| -
|
| - // For the new columns code, we want to walk up our containing block chain looking for an enclosing layer. Once
|
| - // we find one, then we just check its pagination status.
|
| - if (regionBasedColumnsUsed) {
|
| - RenderView* view = renderer()->view();
|
| - RenderBlock* containingBlock;
|
| - for (containingBlock = renderer()->containingBlock();
|
| - containingBlock && containingBlock != view;
|
| - containingBlock = containingBlock->containingBlock()) {
|
| - if (containingBlock->hasLayer()) {
|
| - // Content inside a transform is not considered to be paginated, since we simply
|
| - // paint the transform multiple times in each column, so we don't have to use
|
| - // fragments for the transformed content.
|
| - m_enclosingPaginationLayer = containingBlock->layer()->enclosingPaginationLayer();
|
| - if (m_enclosingPaginationLayer && m_enclosingPaginationLayer->hasTransform())
|
| - m_enclosingPaginationLayer = 0;
|
| - return;
|
| - }
|
| - }
|
| + m_isPaginated = parent()->renderer()->hasColumns();
|
| return;
|
| }
|
|
|
| @@ -1247,12 +1193,6 @@ static LayoutRect transparencyClipBox(const RenderLayer* layer, const RenderLaye
|
| if (!paginationLayer)
|
| return result;
|
|
|
| - // We have to break up the transformed extent across our columns.
|
| - // Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
|
| - // get our true bounding box.
|
| - RenderFlowThread* enclosingFlowThread = toRenderFlowThread(paginationLayer->renderer());
|
| - result = enclosingFlowThread->fragmentsBoundingBox(result);
|
| -
|
| LayoutPoint rootLayerDelta;
|
| paginationLayer->convertToLayerCoords(rootLayer, rootLayerDelta);
|
| result.moveBy(rootLayerDelta);
|
| @@ -1490,17 +1430,7 @@ static inline const RenderLayer* accumulateOffsetTowardsAncestor(const RenderLay
|
| const RenderLayerModelObject* renderer = layer->renderer();
|
| EPosition position = renderer->style()->position();
|
|
|
| - // FIXME: Special casing RenderFlowThread so much for fixed positioning here is not great.
|
| - RenderFlowThread* fixedFlowThreadContainer = position == FixedPosition ? renderer->flowThreadContainingBlock() : 0;
|
| - if (fixedFlowThreadContainer && !fixedFlowThreadContainer->isOutOfFlowPositioned())
|
| - fixedFlowThreadContainer = 0;
|
| -
|
| - // FIXME: Positioning of out-of-flow(fixed, absolute) elements collected in a RenderFlowThread
|
| - // may need to be revisited in a future patch.
|
| - // If the fixed renderer is inside a RenderFlowThread, we should not compute location using localToAbsolute,
|
| - // since localToAbsolute maps the coordinates from named flow to regions coordinates and regions can be
|
| - // positioned in a completely different place in the viewport (RenderView).
|
| - if (position == FixedPosition && !fixedFlowThreadContainer && (!ancestorLayer || ancestorLayer == renderer->view()->layer())) {
|
| + if (position == FixedPosition && (!ancestorLayer || ancestorLayer == renderer->view()->layer())) {
|
| // If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling
|
| // localToAbsolute() on the RenderView.
|
| FloatPoint absPos = renderer->localToAbsolute(FloatPoint(), IsFixed);
|
| @@ -1508,10 +1438,7 @@ static inline const RenderLayer* accumulateOffsetTowardsAncestor(const RenderLay
|
| return ancestorLayer;
|
| }
|
|
|
| - // For the fixed positioned elements inside a render flow thread, we should also skip the code path below
|
| - // Otherwise, for the case of ancestorLayer == rootLayer and fixed positioned element child of a transformed
|
| - // element in render flow thread, we will hit the fixed positioned container before hitting the ancestor layer.
|
| - if (position == FixedPosition && !fixedFlowThreadContainer) {
|
| + if (position == FixedPosition) {
|
| // For a fixed layers, we need to walk up to the root to see if there's a fixed position container
|
| // (e.g. a transformed layer). It's an error to call convertToLayerCoords() across a layer with a transform,
|
| // so we should always find the ancestor at or before we find the fixed position container.
|
| @@ -1564,11 +1491,6 @@ static inline const RenderLayer* accumulateOffsetTowardsAncestor(const RenderLay
|
| parentLayer = parentLayer->parent();
|
| }
|
|
|
| - // We should not reach RenderView layer past the RenderFlowThread layer for any
|
| - // children of the RenderFlowThread.
|
| - if (renderer->flowThreadContainingBlock() && !layer->isOutOfFlowRenderFlowThread())
|
| - ASSERT(parentLayer != renderer->view()->layer());
|
| -
|
| if (foundAncestorFirst) {
|
| // Found ancestorLayer before the abs. positioned container, so compute offset of both relative
|
| // to enclosingPositionedAncestor and subtract.
|
| @@ -1715,11 +1637,11 @@ bool RenderLayer::hasOverflowControls() const
|
| return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollableArea->hasScrollCorner() || renderer()->style()->resize() != RESIZE_NONE);
|
| }
|
|
|
| -void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot, RenderRegion* region, PaintLayerFlags paintFlags)
|
| +void RenderLayer::paint(GraphicsContext* context, const LayoutRect& damageRect, PaintBehavior paintBehavior, RenderObject* paintingRoot, PaintLayerFlags paintFlags)
|
| {
|
| OverlapTestRequestMap overlapTestRequests;
|
|
|
| - LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot, region, &overlapTestRequests);
|
| + LayerPaintingInfo paintingInfo(this, enclosingIntRect(damageRect), paintBehavior, LayoutSize(), paintingRoot, &overlapTestRequests);
|
| paintLayer(context, paintingInfo, paintFlags);
|
|
|
| OverlapTestRequestMap::iterator end = overlapTestRequests.end();
|
| @@ -1879,7 +1801,7 @@ void RenderLayer::paintLayer(GraphicsContext* context, const LayerPaintingInfo&
|
| // Make sure the parent's clip rects have been calculated.
|
| ClipRect clipRect = paintingInfo.paintDirtyRect;
|
| if (parent()) {
|
| - ClipRectsContext clipRectsContext(paintingInfo.rootLayer, paintingInfo.region, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
|
| + ClipRectsContext clipRectsContext(paintingInfo.rootLayer, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
|
| IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
|
| clipRect = clipper().backgroundClipRect(clipRectsContext);
|
| clipRect.intersect(paintingInfo.paintDirtyRect);
|
| @@ -2072,7 +1994,7 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
|
| if (shouldPaintContent || shouldPaintOutline || isPaintingOverlayScrollbars) {
|
| // Collect the fragments. This will compute the clip rectangles and paint offsets for each layer fragment, as well as whether or not the content of each
|
| // fragment should paint.
|
| - collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.region, localPaintingInfo.paintDirtyRect,
|
| + collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect,
|
| (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
|
| (isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation);
|
| updatePaintingInfoForFragments(layerFragments, localPaintingInfo, paintFlags, shouldPaintContent, &offsetFromRoot);
|
| @@ -2150,7 +2072,7 @@ void RenderLayer::paintLayerByApplyingTransform(GraphicsContext* context, const
|
|
|
| // Now do a paint with the root layer shifted to be us.
|
| LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior,
|
| - adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.region, paintingInfo.overlapTestRequests);
|
| + adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.overlapTestRequests);
|
| paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags);
|
| }
|
|
|
| @@ -2178,14 +2100,14 @@ void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* conte
|
| }
|
| }
|
|
|
| -void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer* rootLayer, RenderRegion* region, const LayoutRect& dirtyRect,
|
| +void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer* rootLayer, const LayoutRect& dirtyRect,
|
| ClipRectsType clipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowClip, const LayoutPoint* offsetFromRoot,
|
| const LayoutSize& subPixelAccumulation, const LayoutRect* layerBoundingBox)
|
| {
|
| if (!enclosingPaginationLayer() || hasTransform()) {
|
| // For unpaginated layers, there is only one fragment.
|
| LayerFragment fragment;
|
| - ClipRectsContext clipRectsContext(rootLayer, region, clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip, subPixelAccumulation);
|
| + ClipRectsContext clipRectsContext(rootLayer, clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip, subPixelAccumulation);
|
| clipper().calculateRects(clipRectsContext, dirtyRect, fragment.layerBounds, fragment.backgroundRect, fragment.foregroundRect, fragment.outlineRect, offsetFromRoot);
|
| fragments.append(fragment);
|
| return;
|
| @@ -2197,7 +2119,7 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
|
|
|
| // Calculate clip rects relative to the enclosingPaginationLayer. The purpose of this call is to determine our bounds clipped to intermediate
|
| // layers between us and the pagination context. It's important to minimize the number of fragments we need to create and this helps with that.
|
| - ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), region, clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip);
|
| + ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip);
|
| LayoutRect layerBoundsInFlowThread;
|
| ClipRect backgroundRectInFlowThread;
|
| ClipRect foregroundRectInFlowThread;
|
| @@ -2214,40 +2136,6 @@ void RenderLayer::collectFragments(LayerFragments& fragments, const RenderLayer*
|
| enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPaginationLayerFromRoot);
|
| LayoutRect dirtyRectInFlowThread(dirtyRect);
|
| dirtyRectInFlowThread.moveBy(-offsetOfPaginationLayerFromRoot);
|
| -
|
| - // Tell the flow thread to collect the fragments. We pass enough information to create a minimal number of fragments based off the pages/columns
|
| - // that intersect the actual dirtyRect as well as the pages/columns that intersect our layer's bounding box.
|
| - RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginationLayer()->renderer());
|
| - enclosingFlowThread->collectLayerFragments(fragments, layerBoundingBoxInFlowThread, dirtyRectInFlowThread);
|
| -
|
| - if (fragments.isEmpty())
|
| - return;
|
| -
|
| - // Get the parent clip rects of the pagination layer, since we need to intersect with that when painting column contents.
|
| - ClipRect ancestorClipRect = dirtyRect;
|
| - if (enclosingPaginationLayer()->parent()) {
|
| - ClipRectsContext clipRectsContext(rootLayer, region, clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip);
|
| - ancestorClipRect = enclosingPaginationLayer()->clipper().backgroundClipRect(clipRectsContext);
|
| - ancestorClipRect.intersect(dirtyRect);
|
| - }
|
| -
|
| - for (size_t i = 0; i < fragments.size(); ++i) {
|
| - LayerFragment& fragment = fragments.at(i);
|
| -
|
| - // Set our four rects with all clipping applied that was internal to the flow thread.
|
| - fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThread, outlineRectInFlowThread);
|
| -
|
| - // Shift to the root-relative physical position used when painting the flow thread in this fragment.
|
| - fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
|
| -
|
| - // Intersect the fragment with our ancestor's background clip so that e.g., columns in an overflow:hidden block are
|
| - // properly clipped by the overflow.
|
| - fragment.intersect(ancestorClipRect.rect());
|
| -
|
| - // Now intersect with our pagination clip. This will typically mean we're just intersecting the dirty rect with the column
|
| - // clip, so the column clip ends up being all we apply.
|
| - fragment.intersect(fragment.paginationClip);
|
| - }
|
| }
|
|
|
| void RenderLayer::updatePaintingInfoForFragments(LayerFragments& fragments, const LayerPaintingInfo& localPaintingInfo, PaintLayerFlags localPaintFlags,
|
| @@ -2269,7 +2157,7 @@ void RenderLayer::paintTransformedLayerIntoFragments(GraphicsContext* context, c
|
| LayerFragments enclosingPaginationFragments;
|
| LayoutPoint offsetOfPaginationLayerFromRoot;
|
| LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), PaintingTransparencyClipBox, RootOfTransparencyClipBox, paintingInfo.paintBehavior);
|
| - enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, paintingInfo.rootLayer, paintingInfo.region, paintingInfo.paintDirtyRect,
|
| + enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, paintingInfo.rootLayer, paintingInfo.paintDirtyRect,
|
| (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
|
| (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetOfPaginationLayerFromRoot, paintingInfo.subPixelAccumulation, &transformedExtent);
|
|
|
| @@ -2284,7 +2172,7 @@ void RenderLayer::paintTransformedLayerIntoFragments(GraphicsContext* context, c
|
| if (parent() != enclosingPaginationLayer()) {
|
| enclosingPaginationLayer()->convertToLayerCoords(paintingInfo.rootLayer, offsetOfPaginationLayerFromRoot);
|
|
|
| - ClipRectsContext clipRectsContext(enclosingPaginationLayer(), paintingInfo.region, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
|
| + ClipRectsContext clipRectsContext(enclosingPaginationLayer(), (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
|
| IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
|
| LayoutRect parentClipRect = clipper().backgroundClipRect(clipRectsContext).rect();
|
| parentClipRect.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
|
| @@ -2327,7 +2215,7 @@ void RenderLayer::paintBackgroundForFragments(const LayerFragments& layerFragmen
|
|
|
| // Paint the background.
|
| // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| + PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, compositingState())));
|
|
|
| if (localPaintingInfo.clipToDirtyRect)
|
| @@ -2385,7 +2273,7 @@ void RenderLayer::paintForegroundForFragmentsWithPhase(PaintPhase phase, const L
|
| if (shouldClip)
|
| clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
|
|
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect.rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| + PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect.rect()), phase, paintBehavior, paintingRootForRenderer, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| if (phase == PaintPhaseForeground)
|
| paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests;
|
| renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, compositingState())));
|
| @@ -2404,7 +2292,7 @@ void RenderLayer::paintOutlineForFragments(const LayerFragments& layerFragments,
|
| continue;
|
|
|
| // Paint our own outline
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.rect()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| + PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.rect()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius);
|
| renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, compositingState())));
|
| restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.outlineRect);
|
| @@ -2424,7 +2312,7 @@ void RenderLayer::paintMaskForFragments(const LayerFragments& layerFragments, Gr
|
|
|
| // Paint the mask.
|
| // FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| + PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, compositingState())));
|
|
|
| if (localPaintingInfo.clipToDirtyRect)
|
| @@ -2444,7 +2332,7 @@ void RenderLayer::paintChildClippingMaskForFragments(const LayerFragments& layer
|
| clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect, IncludeSelfForBorderRadius); // Child clipping mask painting will handle clipping to self.
|
|
|
| // Paint the the clipped mask.
|
| - PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseClippingMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| + PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseClippingMask, PaintBehaviorNormal, paintingRootForRenderer, 0, 0, localPaintingInfo.rootLayer->renderer());
|
| renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + subPixelAccumulationIfNeeded(localPaintingInfo.subPixelAccumulation, compositingState())));
|
|
|
| if (localPaintingInfo.clipToDirtyRect)
|
| @@ -2602,7 +2490,7 @@ bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
|
| ASSERT(!renderer()->frame()->view()->layoutPending());
|
| ASSERT(!renderer()->document().renderer()->needsLayout());
|
|
|
| - LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(renderer())->borderBoxRect() : renderer()->view()->documentRect();
|
| + LayoutRect hitTestArea = renderer()->view()->documentRect();
|
| if (!request.ignoreClipping())
|
| hitTestArea.intersect(frameVisibleRect(renderer()));
|
|
|
| @@ -2749,7 +2637,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
|
|
|
| // Make sure the parent's clip rects have been calculated.
|
| if (parent()) {
|
| - ClipRectsContext clipRectsContext(rootLayer, hitTestLocation.region(), RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
| + ClipRectsContext clipRectsContext(rootLayer, RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
| ClipRect clipRect = clipper().backgroundClipRect(clipRectsContext);
|
| // Go ahead and test the enclosing clip now.
|
| if (!clipRect.intersects(hitTestLocation))
|
| @@ -2835,7 +2723,7 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
|
|
|
| // Collect the fragments. This will compute the clip rectangles for each layer fragment.
|
| LayerFragments layerFragments;
|
| - collectFragments(layerFragments, rootLayer, hitTestLocation.region(), hitTestRect, RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
| + collectFragments(layerFragments, rootLayer, hitTestRect, RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
|
|
| if (m_scrollableArea && m_scrollableArea->hitTestResizerInFragments(layerFragments, hitTestLocation)) {
|
| renderer()->updateHitTestResult(result, hitTestLocation.point());
|
| @@ -2918,7 +2806,7 @@ RenderLayer* RenderLayer::hitTestTransformedLayerInFragments(RenderLayer* rootLa
|
| LayerFragments enclosingPaginationFragments;
|
| LayoutPoint offsetOfPaginationLayerFromRoot;
|
| LayoutRect transformedExtent = transparencyClipBox(this, enclosingPaginationLayer(), HitTestingTransparencyClipBox, RootOfTransparencyClipBox);
|
| - enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, rootLayer, hitTestLocation.region(), hitTestRect,
|
| + enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, rootLayer, hitTestRect,
|
| RootRelativeClipRects, IncludeOverlayScrollbarSize, RespectOverflowClip, &offsetOfPaginationLayerFromRoot, LayoutSize(), &transformedExtent);
|
|
|
| for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
|
| @@ -2932,7 +2820,7 @@ RenderLayer* RenderLayer::hitTestTransformedLayerInFragments(RenderLayer* rootLa
|
| if (parent() != enclosingPaginationLayer()) {
|
| enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPaginationLayerFromRoot);
|
|
|
| - ClipRectsContext clipRectsContext(enclosingPaginationLayer(), hitTestLocation.region(), RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
| + ClipRectsContext clipRectsContext(enclosingPaginationLayer(), RootRelativeClipRects, IncludeOverlayScrollbarSize);
|
| LayoutRect parentClipRect = clipper().backgroundClipRect(clipRectsContext).rect();
|
| parentClipRect.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
|
| clipRect.intersect(parentClipRect);
|
| @@ -3190,10 +3078,10 @@ void RenderLayer::repaintBlockSelectionGaps()
|
| RenderBox* box = renderBox();
|
| rect.move(-box->scrolledContentOffset());
|
| if (!scrollableArea()->usesCompositedScrolling())
|
| - rect.intersect(box->overflowClipRect(LayoutPoint(), 0)); // FIXME: Regions not accounted for.
|
| + rect.intersect(box->overflowClipRect(LayoutPoint()));
|
| }
|
| if (renderer()->hasClip())
|
| - rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint(), 0)); // FIXME: Regions not accounted for.
|
| + rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint()));
|
| if (!rect.isEmpty())
|
| renderer()->repaintRectangle(rect);
|
| }
|
| @@ -3283,25 +3171,6 @@ LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer, CalculateL
|
| else
|
| renderer()->containingBlock()->flipForWritingMode(result);
|
|
|
| - if (enclosingPaginationLayer() && (flags & UseFragmentBoxes)) {
|
| - // Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
|
| - // get our true bounding box.
|
| - LayoutPoint offsetWithinPaginationLayer;
|
| - convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginationLayer);
|
| - result.moveBy(offsetWithinPaginationLayer);
|
| -
|
| - RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginationLayer()->renderer());
|
| - result = enclosingFlowThread->fragmentsBoundingBox(result);
|
| -
|
| - LayoutPoint delta;
|
| - if (offsetFromRoot)
|
| - delta = *offsetFromRoot;
|
| - else
|
| - enclosingPaginationLayer()->convertToLayerCoords(ancestorLayer, delta);
|
| - result.moveBy(delta);
|
| - return result;
|
| - }
|
| -
|
| LayoutPoint delta;
|
| if (offsetFromRoot)
|
| delta = *offsetFromRoot;
|
|
|