Commit 892cfe00 authored by hyatt@apple.com's avatar hyatt@apple.com
Browse files

https://bugs.webkit.org/show_bug.cgi?id=21049, opacity and position:relative...

https://bugs.webkit.org/show_bug.cgi?id=21049, opacity and position:relative fail in multi-column layouts.
        
Reviewed by Oliver Hunt.

Make layers split painting across columns just as normal flow content does.  This is actually very
challenging, since intermediate multicol layers can exist between a child that has to be split and
its enclosing stacking context.
        
In order to properly paginate layers, a bit is set on all pagination roots, i.e., layers that will get
split and thus split any descendant layers that they are also responsible for painting.  For a paginated
root, we walk up the layer hierarchy and collect all intermediate multicol blocks between the child
and the enclosing stacking context.
        
We then recur from the outside in, applying clipping and translation as we break up the layer into strips.
        
Composited layers remain unsplittable and have a hacked offset still in order to be placed in the right
column.
        
Painting and hit testing of columns has been simplified in all of the functions to use the x position of
the column rect instead of trying to increment an x offset by adding in widths and column gaps.  This
makes those functions directionality-independent (and the LTR/RTL code paths are now the same).
        
Fix repainting of columns as well to make sure rects are split across columns only after relative position
and transforms have been applied.
        
Added fast/multicol/layers-split-across-columns.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnContents):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::adjustForColumns):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updatePagination):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::paintPaginatedChildLayer):
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::hitTestPaginatedChildLayer):
(WebCore::RenderLayer::hitTestChildLayerColumns):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::):
(WebCore::RenderLayer::isPaginated):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 44972691
<html>
<head>
<style>
.container { display:inline-block; width:220px; }
.multicol { -moz-column-width:100px; -webkit-column-width:100px; height:300px; border:5px solid black; -webkit-column-gap: 10px; -moz-column-gap: 10px }
.block { width:100px; height:100px }
.block:hover { background-color: maroon !important; }
.layer { height:400px; width:100px }
</style>
<body>
<div class="container">
Overflow:
<div class="multicol">
<div class="block" style="display:inline-block; background-color:black"></div>
<div style="overflow:hidden;" class="layer">
<div class="block" style="background-color: #0000f0"></div>
<div class="block" style="background-color: #0000d0"></div>
<div class="block" style="background-color: #0000b0"></div>
<div class="block" style="background-color: #000090"></div>
</div>
<div class="block" style="display:inline-block; background-color:black"></div>
</div>
</div>
<div class="container">
Transforms:
<div class="multicol">
<div class="block" style="display:inline-block; background-color:black"></div>
<div style="margin-left: -100px; -webkit-transform: translate(100px, 0);" class="layer">
<div class="block" style="background-color: #0000f0"></div>
<div class="block" style="background-color: #0000d0"></div>
<div class="block" style="background-color: #0000b0"></div>
<div class="block" style="background-color: #000090"></div>
</div>
<div class="block" style="display:inline-block; background-color:black"></div>
</div>
</div>
</div>
<div class="container">
Relative Positioning:
<div class="multicol">
<div class="block" style="display:inline-block; background-color:black"></div>
<div style="position:relative; margin-left:-100px; left:100px" class="layer">
<div class="block" style="background-color: #0000f0"></div>
<div class="block" style="background-color: #0000d0"></div>
<div class="block" style="background-color: #0000b0"></div>
<div class="block" style="background-color: #000090"></div>
</div>
<div class="block" style="display:inline-block; background-color:black"></div>
</div>
</div>
<div class="container">
Opacity:
<div class="multicol">
<div class="block" style="display:inline-block; background-color:black"></div>
<div style="opacity:0.99;" class="layer">
<div class="block" style="background-color: #0000f0"></div>
<div class="block" style="background-color: #0000d0"></div>
<div class="block" style="background-color: #0000b0"></div>
<div class="block" style="background-color: #000090"></div>
</div>
<div class="block" style="display:inline-block; background-color:black"></div>
</div>
</div>
\ No newline at end of file
......@@ -349,21 +349,7 @@ layer at (8,354) size 769x310
RenderText {#text} at (136,234) size 106x18
text run at (136,234) width 106: "This is some text"
RenderBR {BR} at (136,248) size 0x0
layer at (271,31) size 100x270
layer at (13,265) size 100x270
RenderBlock (relative positioned) {DIV} at (0,0) size 100x270 [bgcolor=#008000]
layer at (787,-275) size 183x18 backgroundClip at (0,0) size 1287x672 clip at (0,0) size 1287x672 outlineClip at (0,0) size 1287x672
RenderInline {SPAN} at (0,0) size 183x18
RenderText {#text} at (0,486) size 183x18
text run at (0,486) width 183: "This is some transparent text."
RenderBR {BR} at (183,500) size 0x0
layer at (797,229) size 242x18
RenderBlock (relative positioned) {DIV} at (5,1013) size 242x18
RenderText {#text} at (0,0) size 192x18
text run at (0,0) width 192: "This is relative positioned text."
layer at (414,359) size 100x270
layer at (155,593) size 100x270 backgroundClip at (0,0) size 1287x672 clip at (0,0) size 1287x672 outlineClip at (0,0) size 1287x672
RenderBlock (relative positioned) {DIV} at (142,0) size 100x270 [bgcolor=#008000]
layer at (-234,557) size 242x18 backgroundClip at (0,0) size 1287x672 clip at (0,0) size 1287x672 outlineClip at (0,0) size 1287x672
RenderBlock (relative positioned) {DIV} at (5,1013) size 242x18
RenderText {#text} at (50,0) size 192x18
text run at (50,0) width 4 RTL: "."
text run at (54,0) width 188: "This is relative positioned text"
5d5a6b56e674486e116c9f67b60865d9
\ No newline at end of file
layer at (0,0) size 785x676
RenderView at (0,0) size 785x600
layer at (0,0) size 785x676
RenderBlock {HTML} at (0,0) size 785x676
RenderBody {BODY} at (8,8) size 769x660
RenderBlock {DIV} at (0,0) size 220x328
RenderBlock (anonymous) at (0,0) size 220x18
RenderText {#text} at (0,0) size 65x18
text run at (0,0) width 65: "Overflow:"
RenderText {#text} at (220,314) size 4x18
text run at (220,314) width 4: " "
RenderBlock {DIV} at (224,0) size 220x328
RenderBlock (anonymous) at (0,0) size 220x18
RenderText {#text} at (0,0) size 76x18
text run at (0,0) width 76: "Transforms:"
RenderText {#text} at (444,314) size 4x18
text run at (444,314) width 4: " "
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (448,0) size 220x328
RenderBlock (anonymous) at (0,0) size 220x18
RenderText {#text} at (0,0) size 131x18
text run at (0,0) width 131: "Relative Positioning:"
RenderText {#text} at (0,0) size 0x0
RenderBlock {DIV} at (0,332) size 220x328
RenderBlock (anonymous) at (0,0) size 220x18
RenderText {#text} at (0,0) size 54x18
text run at (0,0) width 54: "Opacity:"
layer at (8,26) size 220x310
RenderBlock {DIV} at (0,18) size 220x310 [border: (5px solid #000000)]
RenderBlock (anonymous) at (5,5) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
RenderBlock (anonymous) at (5,505) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
layer at (13,131) size 100x400
RenderBlock {DIV} at (5,105) size 100x400
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#0000F0]
RenderBlock {DIV} at (0,100) size 100x100 [bgcolor=#0000D0]
RenderBlock {DIV} at (0,200) size 100x100 [bgcolor=#0000B0]
RenderBlock {DIV} at (0,300) size 100x100 [bgcolor=#000090]
layer at (232,26) size 220x310
RenderBlock {DIV} at (0,18) size 220x310 [border: (5px solid #000000)]
RenderBlock (anonymous) at (5,5) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
RenderBlock (anonymous) at (5,505) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
layer at (456,26) size 220x310
RenderBlock {DIV} at (0,18) size 220x310 [border: (5px solid #000000)]
RenderBlock (anonymous) at (5,5) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
RenderBlock (anonymous) at (5,505) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
layer at (8,358) size 220x310
RenderBlock {DIV} at (0,18) size 220x310 [border: (5px solid #000000)]
RenderBlock (anonymous) at (5,5) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
RenderBlock (anonymous) at (5,505) size 100x100
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#000000]
RenderText {#text} at (0,0) size 0x0
layer at (137,131) size 100x400
RenderBlock {DIV} at (-95,105) size 100x400
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#0000F0]
RenderBlock {DIV} at (0,100) size 100x100 [bgcolor=#0000D0]
RenderBlock {DIV} at (0,200) size 100x100 [bgcolor=#0000B0]
RenderBlock {DIV} at (0,300) size 100x100 [bgcolor=#000090]
layer at (461,131) size 100x400
RenderBlock (relative positioned) {DIV} at (-95,105) size 100x400
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#0000F0]
RenderBlock {DIV} at (0,100) size 100x100 [bgcolor=#0000D0]
RenderBlock {DIV} at (0,200) size 100x100 [bgcolor=#0000B0]
RenderBlock {DIV} at (0,300) size 100x100 [bgcolor=#000090]
layer at (13,463) size 100x400 backgroundClip at (0,0) size 785x676 clip at (0,0) size 785x676 outlineClip at (0,0) size 785x676
RenderBlock {DIV} at (5,105) size 100x400
RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#0000F0]
RenderBlock {DIV} at (0,100) size 100x100 [bgcolor=#0000D0]
RenderBlock {DIV} at (0,200) size 100x100 [bgcolor=#0000B0]
RenderBlock {DIV} at (0,300) size 100x100 [bgcolor=#000090]
......@@ -48,35 +48,3 @@ layer at (8,8) size 750x500
text run at (0,18) width 154: "Nulla varius enim ac mi."
RenderText {#text} at (0,0) size 0x0
RenderText {#text} at (0,0) size 0x0
layer at (391,123) size 367x216
RenderBlock {DIV} at (0,612) size 367x216
RenderText {#text} at (0,0) size 175x396
text run at (0,0) width 139: "Lorem ipsum dolor sit"
text run at (0,18) width 116: "amet, consectetuer"
text run at (0,36) width 172: "adipiscing elit. Nulla varius"
text run at (0,54) width 137: "enim ac mi. Curabitur"
text run at (0,72) width 173: "sollicitudin felis quis lectus."
text run at (0,90) width 175: "Quisque adipiscing rhoncus"
text run at (0,108) width 145: "sem. Proin nulla purus,"
text run at (0,126) width 147: "vulputate vel, varius ut,"
text run at (0,144) width 164: "euismod et, nisi. Sed vitae"
text run at (0,162) width 124: "felis vel orci sagittis"
text run at (0,180) width 147: "aliquam. Cras convallis"
text run at (0,198) width 132: "adipiscing sem. Nam"
text run at (0,216) width 154: "nonummy enim. Nullam"
text run at (0,234) width 160: "bibendum lobortis neque."
text run at (0,252) width 136: "Vestibulum velit orci,"
text run at (0,270) width 158: "tempus euismod, pretium"
text run at (0,288) width 167: "quis, interdum vitae, nulla."
text run at (0,306) width 172: "Phasellus eget ante et tortor"
text run at (0,324) width 163: "condimentum vestibulum."
text run at (0,342) width 137: "Suspendisse hendrerit"
text run at (0,360) width 165: "quam nec felis. Sed varius"
text run at (0,378) width 111: "turpis vitae pede. "
RenderText {#text} at (0,0) size 0x0
layer at (582,-93) size 173x54 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
RenderInline (relative positioned) {SPAN} at (0,0) size 173x54
RenderText {#text} at (111,378) size 173x54
text run at (111,378) width 42: "Lorem"
text run at (0,396) width 131: "ipsum dolor sit amet,"
text run at (0,414) width 173: "consectetuer adipiscing elit."
2010-05-18 David Hyatt <hyatt@apple.com>
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=21049, opacity and position:relative fail in multi-column layouts.
Make layers split painting across columns just as normal flow content does. This is actually very
challenging, since intermediate multicol layers can exist between a child that has to be split and
its enclosing stacking context.
In order to properly paginate layers, a bit is set on all pagination roots, i.e., layers that will get
split and thus split any descendant layers that they are also responsible for painting. For a paginated
root, we walk up the layer hierarchy and collect all intermediate multicol blocks between the child
and the enclosing stacking context.
We then recur from the outside in, applying clipping and translation as we break up the layer into strips.
Composited layers remain unsplittable and have a hacked offset still in order to be placed in the right
column.
Painting and hit testing of columns has been simplified in all of the functions to use the x position of
the column rect instead of trying to increment an x offset by adding in widths and column gaps. This
makes those functions directionality-independent (and the LTR/RTL code paths are now the same).
Fix repainting of columns as well to make sure rects are split across columns only after relative position
and transforms have been applied.
Added fast/multicol/layers-split-across-columns.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintColumnContents):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::adjustForColumns):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updatePagination):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::paintPaginatedChildLayer):
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::hitTestPaginatedChildLayer):
(WebCore::RenderLayer::hitTestChildLayerColumns):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::):
(WebCore::RenderLayer::isPaginated):
2010-05-18 Dirk Pranke <dpranke@chromium.org>
 
Reviewed by Dimitri Glazkov.
......@@ -1605,24 +1605,27 @@ void RenderBlock::paintColumnContents(PaintInfo& paintInfo, int tx, int ty, bool
// For each rect, we clip to the rect, and then we adjust our coords.
IntRect colRect = colRects->at(i);
colRect.move(tx, ty);
context->save();
// Each strip pushes a clip, since column boxes are specified as being
// like overflow:hidden.
context->clip(colRect);
// Adjust tx and ty to change where we paint.
PaintInfo info(paintInfo);
info.rect.intersect(colRect);
// Adjust our x and y when painting.
int finalX = tx + currXOffset;
int finalY = ty + currYOffset;
if (paintingFloats)
paintFloats(info, finalX, finalY, paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip);
else
paintContents(info, finalX, finalY);
if (!info.rect.isEmpty()) {
context->save();
// Each strip pushes a clip, since column boxes are specified as being
// like overflow:hidden.
context->clip(colRect);
// Adjust our x and y when painting.
int finalX = tx + currXOffset;
int finalY = ty + currYOffset;
if (paintingFloats)
paintFloats(info, finalX, finalY, paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip);
else
paintContents(info, finalX, finalY);
context->restore();
}
// Move to the next position.
if (style()->direction() == LTR)
currXOffset += colRect.width() + colGap;
......@@ -1630,8 +1633,6 @@ void RenderBlock::paintColumnContents(PaintInfo& paintInfo, int tx, int ty, bool
currXOffset -= (colRect.width() + colGap);
currYOffset -= colRect.height();
context->restore();
}
}
......@@ -3370,17 +3371,19 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
bool RenderBlock::hitTestColumns(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
{
// We need to do multiple passes, breaking up our hit testing into strips.
// We can always go left to right, since column contents are clipped (meaning that there
// can't be any overlap).
Vector<IntRect>* colRects = columnRects();
unsigned colCount = colRects->size();
int colCount = colRects->size();
if (!colCount)
return false;
int currXOffset = style()->direction() == LTR ? 0 : contentWidth() - colRects->at(0).width();
int left = borderLeft() + paddingLeft();
int currYOffset = 0;
int colGap = columnGap();
for (unsigned i = 0; i < colCount; i++) {
int i;
for (i = 0; i < colCount; i++)
currYOffset -= colRects->at(i).height();
for (i = colCount - 1; i >= 0; i--) {
IntRect colRect = colRects->at(i);
int currXOffset = colRect.x() - left;
currYOffset += colRect.height();
colRect.move(tx, ty);
if (colRect.contains(x, y)) {
......@@ -3391,14 +3394,6 @@ bool RenderBlock::hitTestColumns(const HitTestRequest& request, HitTestResult& r
int finalY = ty + currYOffset;
return hitTestContents(request, result, x, y, finalX, finalY, hitTestAction);
}
// Move to the next position.
if (style()->direction() == LTR)
currXOffset += colRect.width() + colGap;
else
currXOffset -= (colRect.width() + colGap);
currYOffset -= colRect.height();
}
return false;
......@@ -3903,11 +3898,13 @@ void RenderBlock::adjustRectForColumns(IntRect& r) const
unsigned colCount = colRects->size();
if (!colCount)
return;
int currXOffset = style()->direction() == LTR ? 0 : contentWidth() - colRects->at(0).width();
int left = borderLeft() + paddingLeft();
int currYOffset = 0;
int colGap = columnGap();
for (unsigned i = 0; i < colCount; i++) {
IntRect colRect = colRects->at(i);
int currXOffset = colRect.x() - left;
IntRect repaintRect = r;
repaintRect.move(currXOffset, currYOffset);
......@@ -3917,11 +3914,6 @@ void RenderBlock::adjustRectForColumns(IntRect& r) const
result.unite(repaintRect);
// Move to the next position.
if (style()->direction() == LTR)
currXOffset += colRect.width() + colGap;
else
currXOffset -= (colRect.width() + colGap);
currYOffset -= colRect.height();
}
......@@ -3934,23 +3926,18 @@ void RenderBlock::adjustForColumns(IntSize& offset, const IntPoint& point) const
return;
Vector<IntRect>& columnRects = *this->columnRects();
int gapWidth = columnGap();
int xOffset = style()->direction() == LTR ? 0 : contentWidth() - columnRects[0].width();
int left = borderLeft() + paddingLeft();
int yOffset = 0;
size_t columnCount = columnRects.size();
for (size_t i = 0; i < columnCount; ++i) {
IntRect columnRect = columnRects[i];
int xOffset = columnRect.x() - left;
if (point.y() < columnRect.bottom() + yOffset) {
offset.expand(xOffset, -yOffset);
return;
}
if (style()->direction() == LTR)
xOffset += columnRect.width() + gapWidth;
else
xOffset -= columnRect.width() + gapWidth;
yOffset += columnRect.height();
}
}
......
......@@ -143,6 +143,9 @@ public:
static void appendRunsForObject(int start, int end, RenderObject*, InlineBidiResolver&);
static bool requiresLineBox(const InlineIterator&, bool isLineEmpty = true, bool previousLineBrokeCleanly = true);
Vector<IntRect>* columnRects() const;
int columnGap() const;
protected:
void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* child);
void moveChildTo(RenderObject* to, RenderObjectChildList* toChildList, RenderObject* beforeChild, RenderObject* child);
......@@ -200,7 +203,7 @@ protected:
virtual bool hasLineIfEmpty() const;
bool layoutOnlyPositionedObjects();
private:
virtual RenderObjectChildList* virtualChildren() { return children(); }
virtual const RenderObjectChildList* virtualChildren() const { return children(); }
......@@ -348,10 +351,8 @@ private:
int desiredColumnWidth() const;
unsigned desiredColumnCount() const;
Vector<IntRect>* columnRects() const;
void setDesiredColumnCountAndWidth(int count, int width);
int columnGap() const;
void paintContinuationOutlines(PaintInfo&, int tx, int ty);
virtual IntRect localCaretRect(InlineBox*, int caretOffset, int* extraWidthToEndOfLine = 0);
......
......@@ -1188,22 +1188,11 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, In
EPosition position = style()->position();
if (o->isBlockFlow() && position != AbsolutePosition && position != FixedPosition) {
RenderBlock* cb = toRenderBlock(o);
if (cb->hasColumns()) {
IntRect repaintRect(topLeft, rect.size());
cb->adjustRectForColumns(repaintRect);
topLeft = repaintRect.location();
rect = repaintRect;
}
}
// We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
// in the parent's coordinate space that encloses us.
if (layer() && layer()->transform()) {
fixed = position == FixedPosition;
rect = layer()->transform()->mapRect(rect);
// FIXME: this clobbers topLeft adjustment done for multicol above
topLeft = rect.location();
topLeft.move(x(), y());
} else if (position == FixedPosition)
......@@ -1219,6 +1208,16 @@ void RenderBox::computeRectForRepaint(RenderBoxModelObject* repaintContainer, In
topLeft += layer()->relativePositionOffset();
}
if (o->isBlockFlow() && position != AbsolutePosition && position != FixedPosition) {
RenderBlock* cb = toRenderBlock(o);
if (cb->hasColumns()) {
IntRect repaintRect(topLeft, rect.size());
cb->adjustRectForColumns(repaintRect);
topLeft = repaintRect.location();
rect = repaintRect;
}
}
// FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
// its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
if (o->hasOverflowClip()) {
......
This diff is collapsed.
......@@ -303,6 +303,7 @@ public:
CheckForRepaint = 1 << 1,
IsCompositingUpdateRoot = 1 << 2,
UpdateCompositingLayers = 1 << 3,
UpdatePagination = 1 << 4
};
typedef unsigned UpdateLayerPositionsFlags;
void updateLayerPositions(UpdateLayerPositionsFlags = DoFullRepaint | IsCompositingUpdateRoot | UpdateCompositingLayers, IntPoint* cachedOffset = 0);
......@@ -478,12 +479,35 @@ private:
void paintLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect,
PaintBehavior, RenderObject* paintingRoot, RenderObject::OverlapTestRequestMap* = 0,
PaintLayerFlags paintFlags = 0);
PaintLayerFlags = 0);
void paintList(Vector<RenderLayer*>*, RenderLayer* rootLayer, GraphicsContext* p,
const IntRect& paintDirtyRect, PaintBehavior,
RenderObject* paintingRoot, RenderObject::OverlapTestRequestMap*,
PaintLayerFlags);
void paintPaginatedChildLayer(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext*,
const IntRect& paintDirtyRect, PaintBehavior,
RenderObject* paintingRoot, RenderObject::OverlapTestRequestMap*,
PaintLayerFlags);
void paintChildLayerIntoColumns(RenderLayer* childLayer, RenderLayer* rootLayer, GraphicsContext*,
const IntRect& paintDirtyRect, PaintBehavior,
RenderObject* paintingRoot, RenderObject::OverlapTestRequestMap*,
PaintLayerFlags, const Vector<RenderLayer*>& columnLayers, size_t columnIndex);
RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result,
const IntRect& hitTestRect, const IntPoint& hitTestPoint, bool appliedTransform,
const HitTestingTransformState* transformState = 0, double* zOffset = 0);
const IntRect& hitTestRect, const IntPoint& hitTestPoint, bool appliedTransform,
const HitTestingTransformState* transformState = 0, double* zOffset = 0);
RenderLayer* hitTestList(Vector<RenderLayer*>*, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result,
const IntRect& hitTestRect, const IntPoint& hitTestPoint,
const HitTestingTransformState* transformState, double* zOffsetForDescendants, double* zOffset,
const HitTestingTransformState* unflattenedTransformState, bool depthSortDescendants);
RenderLayer* hitTestPaginatedChildLayer(RenderLayer* childLayer, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result,
const IntRect& hitTestRect, const IntPoint& hitTestPoint,
const HitTestingTransformState* transformState, double* zOffset);
RenderLayer* hitTestChildLayerColumns(RenderLayer* childLayer, RenderLayer* rootLayer, const HitTestRequest& request, HitTestResult& result,
const IntRect& hitTestRect, const IntPoint& hitTestPoint,
const HitTestingTransformState* transformState, double* zOffset,
const Vector<RenderLayer*>& columnLayers, size_t columnIndex);
PassRefPtr<HitTestingTransformState> createLocalTransformState(RenderLayer* rootLayer, RenderLayer* containerLayer,
const IntRect& hitTestRect, const IntPoint& hitTestPoint,
const HitTestingTransformState* containerTransformState) const;
......@@ -540,6 +564,9 @@ private:
void updateScrollCornerStyle();
void updateResizerStyle();
void updatePagination();
bool isPaginated() const { return m_isPaginated; }
#if USE(ACCELERATED_COMPOSITING)
bool hasCompositingDescendant() const { return m_hasCompositingDescendant; }
void setHasCompositingDescendant(bool b) { m_hasCompositingDescendant = b; }
......@@ -633,6 +660,8 @@ protected:
bool m_visibleDescendantStatusDirty : 1;
bool m_hasVisibleDescendant : 1;
bool m_isPaginated : 1; // If we think this layer is split by a multi-column ancestor, then this bit will be set.
bool m_3DTransformedDescendantStatusDirty : 1;
bool m_has3DTransformedDescendant : 1; // Set on a stacking context layer that has 3D descendants anywhere
// in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment