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

Side by Side Diff: Source/core/layout/line/InlineBox.cpp

Issue 1183003003: Move overflow in InlineTextBox::adjustPosition() if it has glyph overflows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/layout/line/InlineBox.h ('k') | Source/core/layout/line/InlineFlowBox.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) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 toLayoutBox(layoutObject()).setInlineBoxWrapper(nullptr); 189 toLayoutBox(layoutObject()).setInlineBoxWrapper(nullptr);
190 } 190 }
191 191
192 void InlineBox::attachLine() 192 void InlineBox::attachLine()
193 { 193 {
194 m_bitfields.setExtracted(false); 194 m_bitfields.setExtracted(false);
195 if (layoutObject().isBox()) 195 if (layoutObject().isBox())
196 toLayoutBox(layoutObject()).setInlineBoxWrapper(this); 196 toLayoutBox(layoutObject()).setInlineBoxWrapper(this);
197 } 197 }
198 198
199 void InlineBox::adjustPosition(LayoutUnit dx, LayoutUnit dy) 199 void InlineBox::move(const LayoutSize& delta)
200 { 200 {
201 m_topLeft.move(dx, dy); 201 m_topLeft.move(delta);
202 202
203 if (layoutObject().isReplaced()) 203 if (layoutObject().isReplaced())
204 toLayoutBox(layoutObject()).move(dx, dy); 204 toLayoutBox(layoutObject()).move(delta.width(), delta.height());
205 } 205 }
206 206
207 void InlineBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset , LayoutUnit /* lineTop */, LayoutUnit /* lineBottom */) 207 void InlineBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset , LayoutUnit /* lineTop */, LayoutUnit /* lineBottom */)
208 { 208 {
209 // Text clips are painted only for the direct inline children of the object that has a text clip style on it, not block children. 209 // Text clips are painted only for the direct inline children of the object that has a text clip style on it, not block children.
210 if (paintInfo.phase != PaintPhaseTextClip) 210 if (paintInfo.phase != PaintPhaseTextClip)
211 BlockPainter::paintInlineBox(*this, paintInfo, paintOffset); 211 BlockPainter::paintInlineBox(*this, paintInfo, paintOffset);
212 } 212 }
213 213
214 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */) 214 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */)
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 void showLineTree(const blink::InlineBox* b) 394 void showLineTree(const blink::InlineBox* b)
395 { 395 {
396 if (b) 396 if (b)
397 b->showLineTreeForThis(); 397 b->showLineTreeForThis();
398 else 398 else
399 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 399 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
400 } 400 }
401 401
402 #endif 402 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/layout/line/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698