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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

Issue 2888093006: Place ellipsis correctly in inline blocks separated by spaces (Closed)
Patch Set: bug 133700 Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 2519
2520 // Each atomic inline block (e.g. a <span>) inside a blockflow is managed by 2520 // Each atomic inline block (e.g. a <span>) inside a blockflow is managed by
2521 // an 2521 // an
2522 // InlineBox that allows us to access the lineboxes that live inside the 2522 // InlineBox that allows us to access the lineboxes that live inside the
2523 // atomic 2523 // atomic
2524 // inline block. 2524 // inline block.
2525 bool found_box = false; 2525 bool found_box = false;
2526 for (InlineBox* box = ltr ? root->FirstChild() : root->LastChild(); box; 2526 for (InlineBox* box = ltr ? root->FirstChild() : root->LastChild(); box;
2527 box = ltr ? box->NextOnLine() : box->PrevOnLine()) { 2527 box = ltr ? box->NextOnLine() : box->PrevOnLine()) {
2528 if (!box->GetLineLayoutItem().IsAtomicInlineLevel() || 2528 if (!box->GetLineLayoutItem().IsAtomicInlineLevel() ||
2529 !box->GetLineLayoutItem().IsLayoutBlockFlow()) 2529 !box->GetLineLayoutItem().IsLayoutBlockFlow()) {
2530 if (box->GetLineLayoutItem().IsText())
2531 logical_left_offset += box->LogicalWidth();
2530 continue; 2532 continue;
2533 }
2531 2534
2532 RootInlineBox* first_root_box = 2535 RootInlineBox* first_root_box =
2533 LineLayoutBlockFlow(box->GetLineLayoutItem()).FirstRootBox(); 2536 LineLayoutBlockFlow(box->GetLineLayoutItem()).FirstRootBox();
2534 if (!first_root_box) 2537 if (!first_root_box)
2535 continue; 2538 continue;
2536 2539
2537 bool placed_ellipsis = false; 2540 bool placed_ellipsis = false;
2538 // Move the right edge of the block in so that we can test it against the 2541 // Move the right edge of the block in so that we can test it against the
2539 // width of the root line boxes. We don't resize or move the linebox to 2542 // width of the root line boxes. We don't resize or move the linebox to
2540 // respect text-align because it is the final one of a sequence on the line. 2543 // respect text-align because it is the final one of a sequence on the line.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 2654
2652 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 2655 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
2653 // LayoutBlockFlow is in charge of paint invalidation of the first line. 2656 // LayoutBlockFlow is in charge of paint invalidation of the first line.
2654 if (FirstLineBox()) 2657 if (FirstLineBox())
2655 return false; 2658 return false;
2656 2659
2657 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); 2660 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize();
2658 } 2661 }
2659 2662
2660 } // namespace blink 2663 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698