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

Unified Diff: Source/core/layout/line/EllipsisBox.cpp

Issue 1065783002: Remove legacy markup box behavior when line-clamping. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename new layout test to reflect intent. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/line/EllipsisBox.h ('k') | Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/EllipsisBox.cpp
diff --git a/Source/core/layout/line/EllipsisBox.cpp b/Source/core/layout/line/EllipsisBox.cpp
index df402bf99b0446f61757da1a89eff24f6abfa420..4b5e446307955556331cf99e51f86dd0121cda9f 100644
--- a/Source/core/layout/line/EllipsisBox.cpp
+++ b/Source/core/layout/line/EllipsisBox.cpp
@@ -38,25 +38,6 @@ void EllipsisBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
EllipsisBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBottom);
}
-InlineBox* EllipsisBox::markupBox() const
-{
- if (!m_shouldPaintMarkupBox || !layoutObject().isLayoutBlock())
- return 0;
-
- LayoutBlock& block = toLayoutBlock(layoutObject());
- RootInlineBox* lastLine = block.lineAtIndex(block.lineCount() - 1);
- if (!lastLine)
- return 0;
-
- // If the last line-box on the last line of a block is a link, -webkit-line-clamp paints that box after the ellipsis.
- // It does not actually move the link.
- InlineBox* anchorBox = lastLine->lastChild();
- if (!anchorBox || !anchorBox->layoutObject().style()->isLink())
- return 0;
-
- return anchorBox;
-}
-
IntRect EllipsisBox::selectionRect()
{
const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
@@ -70,17 +51,6 @@ bool EllipsisBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
// the transition to LayoutUnit-based types is complete (crbug.com/321237)
LayoutPoint adjustedLocation = accumulatedOffset + topLeft().roundedLayoutPoint();
- // Hit test the markup box.
- if (InlineBox* markupBox = this->markupBox()) {
- const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
- LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - markupBox->x();
- LayoutUnit mty = adjustedLocation.y() + style.fontMetrics().ascent() - (markupBox->y() + markupBox->layoutObject().style(isFirstLineStyle())->fontMetrics().ascent());
- if (markupBox->nodeAtPoint(result, locationInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom)) {
- layoutObject().updateHitTestResult(result, locationInContainer.point() - LayoutSize(mtx, mty));
- return true;
- }
- }
-
FloatPointWillBeLayoutPoint boxOrigin = locationIncludingFlipping();
boxOrigin.moveBy(accumulatedOffset);
FloatRectWillBeLayoutRect boundsRect(boxOrigin, size());
« no previous file with comments | « Source/core/layout/line/EllipsisBox.h ('k') | Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698