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

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

Issue 767283005: Take continuation into consideration when calculating absoluteClippedOverflowRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments and rebaseline Created 5 years, 11 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
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-div-in-anchor-expected.txt ('k') | no next file » | 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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo otBox.lineBottom()) - logicalTop; 1017 LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRo otBox.lineBottom()) - logicalTop;
1018 1018
1019 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); 1019 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
1020 if (!style()->isHorizontalWritingMode()) 1020 if (!style()->isHorizontalWritingMode())
1021 rect = rect.transposedRect(); 1021 rect = rect.transposedRect();
1022 return rect; 1022 return rect;
1023 } 1023 }
1024 1024
1025 LayoutRect RenderInline::absoluteClippedOverflowRect() const 1025 LayoutRect RenderInline::absoluteClippedOverflowRect() const
1026 { 1026 {
1027 return clippedOverflowRect(view()); 1027 if (!continuation())
1028 return clippedOverflowRect(view());
1029
1030 FloatRect floatResult;
1031 LinesBoundingBoxGeneratorContext context(floatResult);
1032
1033 RenderInline* endContinuation = inlineElementContinuation();
1034 while (endContinuation->inlineElementContinuation())
1035 endContinuation = endContinuation->inlineElementContinuation();
1036
1037 for (RenderBlock* currBlock = containingBlock(); currBlock && currBlock->isA nonymousBlock(); currBlock = toRenderBlock(currBlock->nextSibling())) {
1038 for (RenderObject* curr = currBlock->firstChild(); curr; curr = curr->ne xtSibling()) {
1039 LayoutRect rect = curr->clippedOverflowRectForPaintInvalidation(view ());
1040 context(rect);
1041 if (curr == endContinuation)
1042 return enclosingIntRect(floatResult);
1043 }
1044 }
1045 return LayoutRect();
1028 } 1046 }
1029 1047
1030 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const 1048 LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLay erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const
1031 { 1049 {
1032 // If we don't create line boxes, we don't have any invalidations to do. 1050 // If we don't create line boxes, we don't have any invalidations to do.
1033 if (!alwaysCreateLineBoxes()) 1051 if (!alwaysCreateLineBoxes())
1034 return LayoutRect(); 1052 return LayoutRect();
1035 return clippedOverflowRect(paintInvalidationContainer); 1053 return clippedOverflowRect(paintInvalidationContainer);
1036 } 1054 }
1037 1055
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 container = this; 1441 container = this;
1424 1442
1425 FloatPoint absPos = container->localToAbsolute(); 1443 FloatPoint absPos = container->localToAbsolute();
1426 region.bounds.setX(absPos.x() + region.bounds.x()); 1444 region.bounds.setX(absPos.x() + region.bounds.x());
1427 region.bounds.setY(absPos.y() + region.bounds.y()); 1445 region.bounds.setY(absPos.y() + region.bounds.y());
1428 1446
1429 regions.append(region); 1447 regions.append(region);
1430 } 1448 }
1431 1449
1432 } // namespace blink 1450 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-div-in-anchor-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698