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

Side by Side Diff: Source/core/layout/LayoutTextControl.h

Issue 1253543003: Cleanup LayoutTextControl and its subclasses. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « no previous file | Source/core/layout/LayoutTextControl.cpp » ('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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; 52 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
53 53
54 void hitInnerEditorElement(HitTestResult&, const LayoutPoint& pointInContain er, const LayoutPoint& accumulatedOffset); 54 void hitInnerEditorElement(HitTestResult&, const LayoutPoint& pointInContain er, const LayoutPoint& accumulatedOffset);
55 55
56 int textBlockLogicalWidth() const; 56 int textBlockLogicalWidth() const;
57 int textBlockLogicalHeight() const; 57 int textBlockLogicalHeight() const;
58 58
59 float scaleEmToUnits(int x) const; 59 float scaleEmToUnits(int x) const;
60 60
61 static bool hasValidAvgCharWidth(AtomicString family); 61 static bool hasValidAvgCharWidth(const AtomicString& family);
62 virtual float getAvgCharWidth(AtomicString family); 62 virtual float getAvgCharWidth(const AtomicString& family) const;
63 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const = 0; 63 virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const = 0;
64 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout Unit nonContentHeight) const = 0; 64 virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, Layout Unit nonContentHeight) const = 0;
65 65
66 void updateFromElement() override; 66 void updateFromElement() override;
67 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override; 67 void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, L ogicalExtentComputedValues&) const override;
68 LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren, SubtreeLayou tScope&) override; 68 LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren, SubtreeLayou tScope&) override;
69 69
70 // We need to override this function because we don't want overflow:hidden o n an <input> 70 // We need to override this function because we don't want overflow:hidden o n an <input>
71 // to affect the baseline calculation. This is necessary because we are an i nline-block 71 // to affect the baseline calculation. This is necessary because we are an i nline-block
72 // element as an implementation detail which would normally be affected by t his. 72 // element as an implementation detail which would normally be affected by t his.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos ition); 105 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos ition);
106 } 106 }
107 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox Baseline(); } 107 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox Baseline(); }
108 int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); } 108 int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); }
109 }; 109 };
110 110
111 111
112 } // namespace blink 112 } // namespace blink
113 113
114 #endif // LayoutTextControl_h 114 #endif // LayoutTextControl_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/LayoutTextControl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698