OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // If any descendant blocks exist then they will be in the next anonymou
s block and its siblings. | 186 // If any descendant blocks exist then they will be in the next anonymou
s block and its siblings. |
187 RenderObject* block = containingBlock()->nextSibling(); | 187 RenderObject* block = containingBlock()->nextSibling(); |
188 ASSERT(block && block->isAnonymousBlock()); | 188 ASSERT(block && block->isAnonymousBlock()); |
189 updateStyleOfAnonymousBlockContinuations(block, newStyle, oldStyle); | 189 updateStyleOfAnonymousBlockContinuations(block, newStyle, oldStyle); |
190 } | 190 } |
191 | 191 |
192 if (!m_alwaysCreateLineBoxes) { | 192 if (!m_alwaysCreateLineBoxes) { |
193 bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations
() || newStyle->hasPadding() || newStyle->hasMargin() || hasOutline(); | 193 bool alwaysCreateLineBoxes = hasSelfPaintingLayer() || hasBoxDecorations
() || newStyle->hasPadding() || newStyle->hasMargin() || hasOutline(); |
194 if (oldStyle && alwaysCreateLineBoxes) { | 194 if (oldStyle && alwaysCreateLineBoxes) { |
195 dirtyLineBoxes(false); | 195 dirtyLineBoxes(false); |
196 setNeedsLayoutAndFullRepaint(); | 196 setNeedsLayoutAndFullPaintInvalidation(); |
197 } | 197 } |
198 m_alwaysCreateLineBoxes = alwaysCreateLineBoxes; | 198 m_alwaysCreateLineBoxes = alwaysCreateLineBoxes; |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout) | 202 void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout) |
203 { | 203 { |
204 // Once we have been tainted once, just assume it will happen again. This wa
y effects like hover highlighting that change the | 204 // Once we have been tainted once, just assume it will happen again. This wa
y effects like hover highlighting that change the |
205 // background color will only cause a layout on the first rollover. | 205 // background color will only cause a layout on the first rollover. |
206 if (m_alwaysCreateLineBoxes) | 206 if (m_alwaysCreateLineBoxes) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 newBox->setStyle(newStyle.release()); | 317 newBox->setStyle(newStyle.release()); |
318 RenderBoxModelObject* oldContinuation = continuation(); | 318 RenderBoxModelObject* oldContinuation = continuation(); |
319 setContinuation(newBox); | 319 setContinuation(newBox); |
320 | 320 |
321 splitFlow(beforeChild, newBox, newChild, oldContinuation); | 321 splitFlow(beforeChild, newBox, newChild, oldContinuation); |
322 return; | 322 return; |
323 } | 323 } |
324 | 324 |
325 RenderBoxModelObject::addChild(newChild, beforeChild); | 325 RenderBoxModelObject::addChild(newChild, beforeChild); |
326 | 326 |
327 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 327 newChild->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
328 } | 328 } |
329 | 329 |
330 RenderInline* RenderInline::clone() const | 330 RenderInline* RenderInline::clone() const |
331 { | 331 { |
332 RenderInline* cloneInline = new RenderInline(node()); | 332 RenderInline* cloneInline = new RenderInline(node()); |
333 cloneInline->setStyle(style()); | 333 cloneInline->setStyle(style()); |
334 cloneInline->setFlowThreadState(flowThreadState()); | 334 cloneInline->setFlowThreadState(flowThreadState()); |
335 return cloneInline; | 335 return cloneInline; |
336 } | 336 } |
337 | 337 |
(...skipping 16 matching lines...) Expand all Loading... |
354 beforeChild = fullscreen->fullScreenRenderer(); | 354 beforeChild = fullscreen->fullScreenRenderer(); |
355 } | 355 } |
356 | 356 |
357 // Now take all of the children from beforeChild to the end and remove | 357 // Now take all of the children from beforeChild to the end and remove |
358 // them from |this| and place them in the clone. | 358 // them from |this| and place them in the clone. |
359 RenderObject* o = beforeChild; | 359 RenderObject* o = beforeChild; |
360 while (o) { | 360 while (o) { |
361 RenderObject* tmp = o; | 361 RenderObject* tmp = o; |
362 o = tmp->nextSibling(); | 362 o = tmp->nextSibling(); |
363 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th
is, tmp), 0); | 363 cloneInline->addChildIgnoringContinuation(children()->removeChildNode(th
is, tmp), 0); |
364 tmp->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 364 tmp->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
365 } | 365 } |
366 | 366 |
367 // Hook |clone| up as the continuation of the middle block. | 367 // Hook |clone| up as the continuation of the middle block. |
368 middleBlock->setContinuation(cloneInline); | 368 middleBlock->setContinuation(cloneInline); |
369 | 369 |
370 // We have been reparented and are now under the fromBlock. We need | 370 // We have been reparented and are now under the fromBlock. We need |
371 // to walk up our inline parent chain until we hit the containing block. | 371 // to walk up our inline parent chain until we hit the containing block. |
372 // Once we hit the containing block we're done. | 372 // Once we hit the containing block we're done. |
373 RenderBoxModelObject* curr = toRenderBoxModelObject(parent()); | 373 RenderBoxModelObject* curr = toRenderBoxModelObject(parent()); |
374 RenderBoxModelObject* currChild = this; | 374 RenderBoxModelObject* currChild = this; |
(...skipping 20 matching lines...) Expand all Loading... |
395 inlineCurr->setContinuation(cloneInline); | 395 inlineCurr->setContinuation(cloneInline); |
396 cloneInline->setContinuation(oldCont); | 396 cloneInline->setContinuation(oldCont); |
397 | 397 |
398 // Now we need to take all of the children starting from the first c
hild | 398 // Now we need to take all of the children starting from the first c
hild |
399 // *after* currChild and append them all to the clone. | 399 // *after* currChild and append them all to the clone. |
400 o = currChild->nextSibling(); | 400 o = currChild->nextSibling(); |
401 while (o) { | 401 while (o) { |
402 RenderObject* tmp = o; | 402 RenderObject* tmp = o; |
403 o = tmp->nextSibling(); | 403 o = tmp->nextSibling(); |
404 cloneInline->addChildIgnoringContinuation(inlineCurr->children()
->removeChildNode(curr, tmp), 0); | 404 cloneInline->addChildIgnoringContinuation(inlineCurr->children()
->removeChildNode(curr, tmp), 0); |
405 tmp->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 405 tmp->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation()
; |
406 } | 406 } |
407 } | 407 } |
408 | 408 |
409 // Keep walking up the chain. | 409 // Keep walking up the chain. |
410 currChild = curr; | 410 currChild = curr; |
411 curr = toRenderBoxModelObject(curr->parent()); | 411 curr = toRenderBoxModelObject(curr->parent()); |
412 splitDepth++; | 412 splitDepth++; |
413 } | 413 } |
414 | 414 |
415 // Now we are at the block level. We need to put the clone into the toBlock. | 415 // Now we are at the block level. We need to put the clone into the toBlock. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 block->children()->insertChildNode(block, newBlockBox, boxFirst); | 456 block->children()->insertChildNode(block, newBlockBox, boxFirst); |
457 block->children()->insertChildNode(block, post, boxFirst); | 457 block->children()->insertChildNode(block, post, boxFirst); |
458 block->setChildrenInline(false); | 458 block->setChildrenInline(false); |
459 | 459 |
460 if (madeNewBeforeBlock) { | 460 if (madeNewBeforeBlock) { |
461 RenderObject* o = boxFirst; | 461 RenderObject* o = boxFirst; |
462 while (o) { | 462 while (o) { |
463 RenderObject* no = o; | 463 RenderObject* no = o; |
464 o = no->nextSibling(); | 464 o = no->nextSibling(); |
465 pre->children()->appendChildNode(pre, block->children()->removeChild
Node(block, no)); | 465 pre->children()->appendChildNode(pre, block->children()->removeChild
Node(block, no)); |
466 no->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 466 no->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
467 } | 467 } |
468 } | 468 } |
469 | 469 |
470 splitInlines(pre, post, newBlockBox, beforeChild, oldCont); | 470 splitInlines(pre, post, newBlockBox, beforeChild, oldCont); |
471 | 471 |
472 // We already know the newBlockBox isn't going to contain inline kids, so av
oid wasting | 472 // We already know the newBlockBox isn't going to contain inline kids, so av
oid wasting |
473 // time in makeChildrenNonInline by just setting this explicitly up front. | 473 // time in makeChildrenNonInline by just setting this explicitly up front. |
474 newBlockBox->setChildrenInline(false); | 474 newBlockBox->setChildrenInline(false); |
475 | 475 |
476 newBlockBox->addChild(newChild); | 476 newBlockBox->addChild(newChild); |
477 | 477 |
478 // Always just do a full layout in order to ensure that line boxes (especial
ly wrappers for images) | 478 // Always just do a full layout in order to ensure that line boxes (especial
ly wrappers for images) |
479 // get deleted properly. Because objects moves from the pre block into the
post block, we want to | 479 // get deleted properly. Because objects moves from the pre block into the
post block, we want to |
480 // make new line boxes instead of leaving the old line boxes around. | 480 // make new line boxes instead of leaving the old line boxes around. |
481 pre->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 481 pre->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
482 block->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 482 block->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
483 post->setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); | 483 post->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); |
484 } | 484 } |
485 | 485 |
486 void RenderInline::addChildToContinuation(RenderObject* newChild, RenderObject*
beforeChild) | 486 void RenderInline::addChildToContinuation(RenderObject* newChild, RenderObject*
beforeChild) |
487 { | 487 { |
488 RenderBoxModelObject* flow = continuationBefore(beforeChild); | 488 RenderBoxModelObject* flow = continuationBefore(beforeChild); |
489 ASSERT(!beforeChild || beforeChild->parent()->isRenderBlock() || beforeChild
->parent()->isRenderInline()); | 489 ASSERT(!beforeChild || beforeChild->parent()->isRenderBlock() || beforeChild
->parent()->isRenderInline()); |
490 RenderBoxModelObject* beforeChildParent = 0; | 490 RenderBoxModelObject* beforeChildParent = 0; |
491 if (beforeChild) | 491 if (beforeChild) |
492 beforeChildParent = toRenderBoxModelObject(beforeChild->parent()); | 492 beforeChildParent = toRenderBoxModelObject(beforeChild->parent()); |
493 else { | 493 else { |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 LayoutUnit logicalTop = firstLineBox()->logicalTopVisualOverflow(firstRootBo
x.lineTop()); | 985 LayoutUnit logicalTop = firstLineBox()->logicalTopVisualOverflow(firstRootBo
x.lineTop()); |
986 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide; | 986 LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide; |
987 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox.lineBottom()) - logicalTop; | 987 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo
otBox.lineBottom()) - logicalTop; |
988 | 988 |
989 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); | 989 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); |
990 if (!style()->isHorizontalWritingMode()) | 990 if (!style()->isHorizontalWritingMode()) |
991 rect = rect.transposedRect(); | 991 rect = rect.transposedRect(); |
992 return rect; | 992 return rect; |
993 } | 993 } |
994 | 994 |
995 LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObj
ect* repaintContainer) const | 995 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay
erModelObject* paintInvalidationContainer) const |
996 { | 996 { |
997 ASSERT(!view() || !view()->layoutStateEnabled()); | 997 ASSERT(!view() || !view()->layoutStateEnabled()); |
998 | 998 |
999 if (!firstLineBoxIncludingCulling() && !continuation()) | 999 if (!firstLineBoxIncludingCulling() && !continuation()) |
1000 return LayoutRect(); | 1000 return LayoutRect(); |
1001 | 1001 |
1002 LayoutRect repaintRect(linesVisualOverflowBoundingBox()); | 1002 LayoutRect repaintRect(linesVisualOverflowBoundingBox()); |
1003 bool hitRepaintContainer = false; | 1003 bool hitRepaintContainer = false; |
1004 | 1004 |
1005 // We need to add in the in-flow position offsets of any inlines (including
us) up to our | 1005 // We need to add in the in-flow position offsets of any inlines (including
us) up to our |
1006 // containing block. | 1006 // containing block. |
1007 RenderBlock* cb = containingBlock(); | 1007 RenderBlock* cb = containingBlock(); |
1008 for (const RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isRend
erInline() && inlineFlow != cb; | 1008 for (const RenderObject* inlineFlow = this; inlineFlow && inlineFlow->isRend
erInline() && inlineFlow != cb; |
1009 inlineFlow = inlineFlow->parent()) { | 1009 inlineFlow = inlineFlow->parent()) { |
1010 if (inlineFlow == repaintContainer) { | 1010 if (inlineFlow == paintInvalidationContainer) { |
1011 hitRepaintContainer = true; | 1011 hitRepaintContainer = true; |
1012 break; | 1012 break; |
1013 } | 1013 } |
1014 if (inlineFlow->style()->hasInFlowPosition() && inlineFlow->hasLayer()) | 1014 if (inlineFlow->style()->hasInFlowPosition() && inlineFlow->hasLayer()) |
1015 repaintRect.move(toRenderInline(inlineFlow)->layer()->offsetForInFlo
wPosition()); | 1015 repaintRect.move(toRenderInline(inlineFlow)->layer()->offsetForInFlo
wPosition()); |
1016 } | 1016 } |
1017 | 1017 |
1018 LayoutUnit outlineSize = style()->outlineSize(); | 1018 LayoutUnit outlineSize = style()->outlineSize(); |
1019 repaintRect.inflate(outlineSize); | 1019 repaintRect.inflate(outlineSize); |
1020 | 1020 |
1021 if (hitRepaintContainer || !cb) | 1021 if (hitRepaintContainer || !cb) |
1022 return repaintRect; | 1022 return repaintRect; |
1023 | 1023 |
1024 if (cb->hasColumns()) | 1024 if (cb->hasColumns()) |
1025 cb->adjustRectForColumns(repaintRect); | 1025 cb->adjustRectForColumns(repaintRect); |
1026 | 1026 |
1027 if (cb->hasOverflowClip()) | 1027 if (cb->hasOverflowClip()) |
1028 cb->applyCachedClipAndScrollOffsetForRepaint(repaintRect); | 1028 cb->applyCachedClipAndScrollOffsetForRepaint(repaintRect); |
1029 | 1029 |
1030 cb->mapRectToRepaintBacking(repaintContainer, repaintRect); | 1030 cb->mapRectToPaintInvalidationBacking(paintInvalidationContainer, repaintRec
t); |
1031 | 1031 |
1032 if (outlineSize) { | 1032 if (outlineSize) { |
1033 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()
) { | 1033 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()
) { |
1034 if (!curr->isText()) | 1034 if (!curr->isText()) |
1035 repaintRect.unite(curr->rectWithOutlineForRepaint(repaintContain
er, outlineSize)); | 1035 repaintRect.unite(curr->rectWithOutlineForPaintInvalidation(pain
tInvalidationContainer, outlineSize)); |
1036 } | 1036 } |
1037 | 1037 |
1038 if (continuation() && !continuation()->isInline() && continuation()->par
ent()) | 1038 if (continuation() && !continuation()->isInline() && continuation()->par
ent()) |
1039 repaintRect.unite(continuation()->rectWithOutlineForRepaint(repaintC
ontainer, outlineSize)); | 1039 repaintRect.unite(continuation()->rectWithOutlineForPaintInvalidatio
n(paintInvalidationContainer, outlineSize)); |
1040 } | 1040 } |
1041 | 1041 |
1042 return repaintRect; | 1042 return repaintRect; |
1043 } | 1043 } |
1044 | 1044 |
1045 LayoutRect RenderInline::rectWithOutlineForRepaint(const RenderLayerModelObject*
repaintContainer, LayoutUnit outlineWidth) const | 1045 LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, LayoutUnit outlineWidth) const |
1046 { | 1046 { |
1047 LayoutRect r(RenderBoxModelObject::rectWithOutlineForRepaint(repaintContaine
r, outlineWidth)); | 1047 LayoutRect r(RenderBoxModelObject::rectWithOutlineForPaintInvalidation(paint
InvalidationContainer, outlineWidth)); |
1048 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { | 1048 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { |
1049 if (!curr->isText()) | 1049 if (!curr->isText()) |
1050 r.unite(curr->rectWithOutlineForRepaint(repaintContainer, outlineWid
th)); | 1050 r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationC
ontainer, outlineWidth)); |
1051 } | 1051 } |
1052 return r; | 1052 return r; |
1053 } | 1053 } |
1054 | 1054 |
1055 void RenderInline::mapRectToRepaintBacking(const RenderLayerModelObject* repaint
Container, LayoutRect& rect, bool fixed) const | 1055 void RenderInline::mapRectToPaintInvalidationBacking(const RenderLayerModelObjec
t* paintInvalidationContainer, LayoutRect& rect, bool fixed) const |
1056 { | 1056 { |
1057 if (RenderView* v = view()) { | 1057 if (RenderView* v = view()) { |
1058 // LayoutState is only valid for root-relative repainting | 1058 // LayoutState is only valid for root-relative repainting |
1059 if (v->canUseLayoutStateForContainer(repaintContainer)) { | 1059 if (v->canUseLayoutStateForContainer(paintInvalidationContainer)) { |
1060 LayoutState* layoutState = v->layoutState(); | 1060 LayoutState* layoutState = v->layoutState(); |
1061 if (style()->hasInFlowPosition() && layer()) | 1061 if (style()->hasInFlowPosition() && layer()) |
1062 rect.move(layer()->offsetForInFlowPosition()); | 1062 rect.move(layer()->offsetForInFlowPosition()); |
1063 rect.move(layoutState->paintOffset()); | 1063 rect.move(layoutState->paintOffset()); |
1064 if (layoutState->isClipped()) | 1064 if (layoutState->isClipped()) |
1065 rect.intersect(layoutState->clipRect()); | 1065 rect.intersect(layoutState->clipRect()); |
1066 return; | 1066 return; |
1067 } | 1067 } |
1068 } | 1068 } |
1069 | 1069 |
1070 if (repaintContainer == this) | 1070 if (paintInvalidationContainer == this) |
1071 return; | 1071 return; |
1072 | 1072 |
1073 bool containerSkipped; | 1073 bool containerSkipped; |
1074 RenderObject* o = container(repaintContainer, &containerSkipped); | 1074 RenderObject* o = container(paintInvalidationContainer, &containerSkipped); |
1075 if (!o) | 1075 if (!o) |
1076 return; | 1076 return; |
1077 | 1077 |
1078 LayoutPoint topLeft = rect.location(); | 1078 LayoutPoint topLeft = rect.location(); |
1079 | 1079 |
1080 if (o->isRenderBlockFlow() && !style()->hasOutOfFlowPosition()) { | 1080 if (o->isRenderBlockFlow() && !style()->hasOutOfFlowPosition()) { |
1081 RenderBlock* cb = toRenderBlock(o); | 1081 RenderBlock* cb = toRenderBlock(o); |
1082 if (cb->hasColumns()) { | 1082 if (cb->hasColumns()) { |
1083 LayoutRect repaintRect(topLeft, rect.size()); | 1083 LayoutRect repaintRect(topLeft, rect.size()); |
1084 cb->adjustRectForColumns(repaintRect); | 1084 cb->adjustRectForColumns(repaintRect); |
(...skipping 14 matching lines...) Expand all Loading... |
1099 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. | 1099 // its controlClipRect will be wrong. For overflow clip we use the values ca
ched by the layer. |
1100 rect.setLocation(topLeft); | 1100 rect.setLocation(topLeft); |
1101 if (o->hasOverflowClip()) { | 1101 if (o->hasOverflowClip()) { |
1102 RenderBox* containerBox = toRenderBox(o); | 1102 RenderBox* containerBox = toRenderBox(o); |
1103 containerBox->applyCachedClipAndScrollOffsetForRepaint(rect); | 1103 containerBox->applyCachedClipAndScrollOffsetForRepaint(rect); |
1104 if (rect.isEmpty()) | 1104 if (rect.isEmpty()) |
1105 return; | 1105 return; |
1106 } | 1106 } |
1107 | 1107 |
1108 if (containerSkipped) { | 1108 if (containerSkipped) { |
1109 // If the repaintContainer is below o, then we need to map the rect into
repaintContainer's coordinates. | 1109 // If the paintInvalidationContainer is below o, then we need to map the
rect into paintInvalidationContainer's coordinates. |
1110 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(o); | 1110 LayoutSize containerOffset = paintInvalidationContainer->offsetFromAnces
torContainer(o); |
1111 rect.move(-containerOffset); | 1111 rect.move(-containerOffset); |
1112 return; | 1112 return; |
1113 } | 1113 } |
1114 | 1114 |
1115 o->mapRectToRepaintBacking(repaintContainer, rect, fixed); | 1115 o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, fixed
); |
1116 } | 1116 } |
1117 | 1117 |
1118 LayoutSize RenderInline::offsetFromContainer(const RenderObject* container, cons
t LayoutPoint& point, bool* offsetDependsOnPoint) const | 1118 LayoutSize RenderInline::offsetFromContainer(const RenderObject* container, cons
t LayoutPoint& point, bool* offsetDependsOnPoint) const |
1119 { | 1119 { |
1120 ASSERT(container == this->container()); | 1120 ASSERT(container == this->container()); |
1121 | 1121 |
1122 LayoutSize offset; | 1122 LayoutSize offset; |
1123 if (isInFlowPositioned()) | 1123 if (isInFlowPositioned()) |
1124 offset += offsetForInFlowPosition(); | 1124 offset += offsetForInFlowPosition(); |
1125 | 1125 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1349 |
1350 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) | 1350 void RenderInline::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
additionalOffset, const RenderLayerModelObject* paintContainer) |
1351 { | 1351 { |
1352 AbsoluteRectsGeneratorContext context(rects, additionalOffset); | 1352 AbsoluteRectsGeneratorContext context(rects, additionalOffset); |
1353 generateLineBoxRects(context); | 1353 generateLineBoxRects(context); |
1354 | 1354 |
1355 addChildFocusRingRects(rects, additionalOffset, paintContainer); | 1355 addChildFocusRingRects(rects, additionalOffset, paintContainer); |
1356 | 1356 |
1357 if (continuation()) { | 1357 if (continuation()) { |
1358 // If the continuation doesn't paint into the same container, let its re
paint container handle it. | 1358 // If the continuation doesn't paint into the same container, let its re
paint container handle it. |
1359 if (paintContainer != continuation()->containerForRepaint()) | 1359 if (paintContainer != continuation()->containerForPaintInvalidation()) |
1360 return; | 1360 return; |
1361 if (continuation()->isInline()) | 1361 if (continuation()->isInline()) |
1362 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); | 1362 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + continuation()->containingBlock()->location() - containingBlock()->lo
cation()), paintContainer); |
1363 else | 1363 else |
1364 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); | 1364 continuation()->addFocusRingRects(rects, flooredLayoutPoint(addition
alOffset + toRenderBox(continuation())->location() - containingBlock()->location
()), paintContainer); |
1365 } | 1365 } |
1366 } | 1366 } |
1367 | 1367 |
1368 namespace { | 1368 namespace { |
1369 | 1369 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 container = this; | 1566 container = this; |
1567 | 1567 |
1568 FloatPoint absPos = container->localToAbsolute(); | 1568 FloatPoint absPos = container->localToAbsolute(); |
1569 region.bounds.setX(absPos.x() + region.bounds.x()); | 1569 region.bounds.setX(absPos.x() + region.bounds.x()); |
1570 region.bounds.setY(absPos.y() + region.bounds.y()); | 1570 region.bounds.setY(absPos.y() + region.bounds.y()); |
1571 | 1571 |
1572 regions.append(region); | 1572 regions.append(region); |
1573 } | 1573 } |
1574 | 1574 |
1575 } // namespace WebCore | 1575 } // namespace WebCore |
OLD | NEW |