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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/EllipsisBox.h

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc.
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 13 matching lines...) Expand all
24 #include "core/layout/line/InlineBox.h" 24 #include "core/layout/line/InlineBox.h"
25 25
26 namespace blink { 26 namespace blink {
27 27
28 class HitTestRequest; 28 class HitTestRequest;
29 class HitTestResult; 29 class HitTestResult;
30 30
31 class EllipsisBox final : public InlineBox { 31 class EllipsisBox final : public InlineBox {
32 public: 32 public:
33 EllipsisBox(InlineBox* inlineBox, const AtomicString& ellipsisStr, InlineFlo wBox* parent, 33 EllipsisBox(InlineBox* inlineBox, const AtomicString& ellipsisStr, InlineFlo wBox* parent,
34 int width, int height, int x, int y, bool firstLine, bool isVertical) 34 LayoutUnit width, int height, int x, int y, bool firstLine, bool isVerti cal)
35 : InlineBox(inlineBox, LayoutPoint(x, y), width, firstLine, true, false, false, isVertical, 0, 0, parent) 35 : InlineBox(inlineBox, LayoutPoint(x, y), width, firstLine, true, false, false, isVertical, 0, 0, parent)
36 , m_height(height) 36 , m_height(height)
37 , m_str(ellipsisStr) 37 , m_str(ellipsisStr)
38 , m_selectionState(SelectionNone) 38 , m_selectionState(SelectionNone)
39 { 39 {
40 setHasVirtualLogicalHeight(); 40 setHasVirtualLogicalHeight();
41 } 41 }
42 42
43 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom) const override; 43 void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutU nit lineBottom) const override;
44 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom ) override; 44 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom ) override;
45 void setSelectionState(SelectionState s) { m_selectionState = s; } 45 void setSelectionState(SelectionState s) { m_selectionState = s; }
46 IntRect selectionRect() const; 46 IntRect selectionRect() const;
47 47
48 LayoutUnit virtualLogicalHeight() const override { return LayoutUnit(m_heigh t); } 48 LayoutUnit virtualLogicalHeight() const override { return LayoutUnit(m_heigh t); }
49 SelectionState selectionState() const override { return m_selectionState; } 49 SelectionState selectionState() const override { return m_selectionState; }
50 const AtomicString& ellipsisStr() const { return m_str; } 50 const AtomicString& ellipsisStr() const { return m_str; }
51 51
52 const char* boxName() const override; 52 const char* boxName() const override;
53 53
54 private: 54 private:
55 55
56 int m_height; 56 int m_height;
57 AtomicString m_str; 57 AtomicString m_str;
58 SelectionState m_selectionState; 58 SelectionState m_selectionState;
59 }; 59 };
60 60
61 } // namespace blink 61 } // namespace blink
62 62
63 #endif // EllipsisBox_h 63 #endif // EllipsisBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698