Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: Source/core/rendering/RenderInline.cpp

Issue 945803004: Merge back LayoutLayerModelObject into RenderBoxModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Better rebasing. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderInline.h ('k') | Source/core/rendering/RenderListMarker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 for (LayoutObject* curr = currBlock->firstChild(); curr; curr = curr->ne xtSibling()) { 1042 for (LayoutObject* curr = currBlock->firstChild(); curr; curr = curr->ne xtSibling()) {
1043 LayoutRect rect = curr->clippedOverflowRectForPaintInvalidation(view ()); 1043 LayoutRect rect = curr->clippedOverflowRectForPaintInvalidation(view ());
1044 context(rect); 1044 context(rect);
1045 if (curr == endContinuation) 1045 if (curr == endContinuation)
1046 return enclosingIntRect(floatResult); 1046 return enclosingIntRect(floatResult);
1047 } 1047 }
1048 } 1048 }
1049 return LayoutRect(); 1049 return LayoutRect();
1050 } 1050 }
1051 1051
1052 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const LayoutLay erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const 1052 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const LayoutBox ModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInva lidationState) const
1053 { 1053 {
1054 // If we don't create line boxes, we don't have any invalidations to do. 1054 // If we don't create line boxes, we don't have any invalidations to do.
1055 if (!alwaysCreateLineBoxes()) 1055 if (!alwaysCreateLineBoxes())
1056 return LayoutRect(); 1056 return LayoutRect();
1057 return clippedOverflowRect(paintInvalidationContainer); 1057 return clippedOverflowRect(paintInvalidationContainer);
1058 } 1058 }
1059 1059
1060 LayoutRect RenderInline::clippedOverflowRect(const LayoutLayerModelObject* paint InvalidationContainer, const PaintInvalidationState* paintInvalidationState) con st 1060 LayoutRect RenderInline::clippedOverflowRect(const LayoutBoxModelObject* paintIn validationContainer, const PaintInvalidationState* paintInvalidationState) const
1061 { 1061 {
1062 if ((!firstLineBoxIncludingCulling() && !continuation()) || style()->visibil ity() != VISIBLE) 1062 if ((!firstLineBoxIncludingCulling() && !continuation()) || style()->visibil ity() != VISIBLE)
1063 return LayoutRect(); 1063 return LayoutRect();
1064 1064
1065 LayoutRect overflowRect(linesVisualOverflowBoundingBox()); 1065 LayoutRect overflowRect(linesVisualOverflowBoundingBox());
1066 1066
1067 LayoutUnit outlineSize = style()->outlineSize(); 1067 LayoutUnit outlineSize = style()->outlineSize();
1068 overflowRect.inflate(outlineSize); 1068 overflowRect.inflate(outlineSize);
1069 1069
1070 mapRectToPaintInvalidationBacking(paintInvalidationContainer, overflowRect, paintInvalidationState); 1070 mapRectToPaintInvalidationBacking(paintInvalidationContainer, overflowRect, paintInvalidationState);
1071 1071
1072 if (outlineSize) { 1072 if (outlineSize) {
1073 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling() ) { 1073 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling() ) {
1074 if (!curr->isText()) 1074 if (!curr->isText())
1075 overflowRect.unite(curr->rectWithOutlineForPaintInvalidation(pai ntInvalidationContainer, outlineSize)); 1075 overflowRect.unite(curr->rectWithOutlineForPaintInvalidation(pai ntInvalidationContainer, outlineSize));
1076 } 1076 }
1077 1077
1078 if (continuation() && !continuation()->isInline() && continuation()->par ent()) 1078 if (continuation() && !continuation()->isInline() && continuation()->par ent())
1079 overflowRect.unite(continuation()->rectWithOutlineForPaintInvalidati on(paintInvalidationContainer, outlineSize)); 1079 overflowRect.unite(continuation()->rectWithOutlineForPaintInvalidati on(paintInvalidationContainer, outlineSize));
1080 } 1080 }
1081 1081
1082 return overflowRect; 1082 return overflowRect;
1083 } 1083 }
1084 1084
1085 LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const LayoutLayerMo delObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInval idationState* paintInvalidationState) const 1085 LayoutRect RenderInline::rectWithOutlineForPaintInvalidation(const LayoutBoxMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* paintInvalidationState) const
1086 { 1086 {
1087 LayoutRect r(LayoutBoxModelObject::rectWithOutlineForPaintInvalidation(paint InvalidationContainer, outlineWidth, paintInvalidationState)); 1087 LayoutRect r(LayoutBoxModelObject::rectWithOutlineForPaintInvalidation(paint InvalidationContainer, outlineWidth, paintInvalidationState));
1088 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling()) { 1088 for (LayoutObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
1089 if (!curr->isText()) 1089 if (!curr->isText())
1090 r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationC ontainer, outlineWidth, paintInvalidationState)); 1090 r.unite(curr->rectWithOutlineForPaintInvalidation(paintInvalidationC ontainer, outlineWidth, paintInvalidationState));
1091 } 1091 }
1092 return r; 1092 return r;
1093 } 1093 }
1094 1094
1095 void RenderInline::mapRectToPaintInvalidationBacking(const LayoutLayerModelObjec t* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* p aintInvalidationState) const 1095 void RenderInline::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* pai ntInvalidationState) const
1096 { 1096 {
1097 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) { 1097 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) {
1098 if (style()->hasInFlowPosition() && layer()) 1098 if (style()->hasInFlowPosition() && layer())
1099 rect.move(layer()->offsetForInFlowPosition()); 1099 rect.move(layer()->offsetForInFlowPosition());
1100 rect.move(paintInvalidationState->paintOffset()); 1100 rect.move(paintInvalidationState->paintOffset());
1101 if (paintInvalidationState->isClipped()) 1101 if (paintInvalidationState->isClipped())
1102 rect.intersect(paintInvalidationState->clipRect()); 1102 rect.intersect(paintInvalidationState->clipRect());
1103 return; 1103 return;
1104 } 1104 }
1105 1105
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 1166
1167 if (offsetDependsOnPoint) { 1167 if (offsetDependsOnPoint) {
1168 *offsetDependsOnPoint = container->hasColumns() 1168 *offsetDependsOnPoint = container->hasColumns()
1169 || (container->isBox() && container->style()->isFlippedBlocksWriting Mode()) 1169 || (container->isBox() && container->style()->isFlippedBlocksWriting Mode())
1170 || container->isLayoutFlowThread(); 1170 || container->isLayoutFlowThread();
1171 } 1171 }
1172 1172
1173 return offset; 1173 return offset;
1174 } 1174 }
1175 1175
1176 void RenderInline::mapLocalToContainer(const LayoutLayerModelObject* paintInvali dationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const 1176 void RenderInline::mapLocalToContainer(const LayoutBoxModelObject* paintInvalida tionContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* w asFixed, const PaintInvalidationState* paintInvalidationState) const
1177 { 1177 {
1178 if (paintInvalidationContainer == this) 1178 if (paintInvalidationContainer == this)
1179 return; 1179 return;
1180 1180
1181 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) { 1181 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain tInvalidationContainer)) {
1182 LayoutSize offset = paintInvalidationState->paintOffset(); 1182 LayoutSize offset = paintInvalidationState->paintOffset();
1183 if (style()->hasInFlowPosition() && layer()) 1183 if (style()->hasInFlowPosition() && layer())
1184 offset += layer()->offsetForInFlowPosition(); 1184 offset += layer()->offsetForInFlowPosition();
1185 transformState.move(offset); 1185 transformState.move(offset);
1186 return; 1186 return;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 } 1452 }
1453 1453
1454 void RenderInline::invalidateDisplayItemClients(DisplayItemList* displayItemList ) const 1454 void RenderInline::invalidateDisplayItemClients(DisplayItemList* displayItemList ) const
1455 { 1455 {
1456 LayoutBoxModelObject::invalidateDisplayItemClients(displayItemList); 1456 LayoutBoxModelObject::invalidateDisplayItemClients(displayItemList);
1457 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1457 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1458 displayItemList->invalidate(box->displayItemClient()); 1458 displayItemList->invalidate(box->displayItemClient());
1459 } 1459 }
1460 1460
1461 } // namespace blink 1461 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderInline.h ('k') | Source/core/rendering/RenderListMarker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698