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

Side by Side Diff: Source/core/rendering/RenderTextControl.h

Issue 613783002: Smaller vtbls in RenderObject (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase better. Created 6 years, 2 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) 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 virtual void updateFromElement() override; 63 virtual void updateFromElement() override;
64 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override; 64 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic alTop, LogicalExtentComputedValues&) const override;
65 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt reeLayoutScope&) override; 65 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt reeLayoutScope&) override;
66 66
67 // We need to override this function because we don't want overflow:hidden o n an <input> 67 // We need to override this function because we don't want overflow:hidden o n an <input>
68 // to affect the baseline calculation. This is necessary because we are an i nline-block 68 // to affect the baseline calculation. This is necessary because we are an i nline-block
69 // element as an implementation detail which would normally be affected by t his. 69 // element as an implementation detail which would normally be affected by t his.
70 virtual int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); } 70 virtual int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); }
71 71
72 virtual bool isOfType(RenderObjectType type) const override { return type == RenderObjectTextControl || RenderBlockFlow::isOfType(type); }
73
72 private: 74 private:
73 virtual const char* renderName() const override { return "RenderTextControl" ; } 75 virtual const char* renderName() const override { return "RenderTextControl" ; }
74 virtual bool isTextControl() const override final { return true; }
75 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override final; 76 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override final;
76 virtual void computePreferredLogicalWidths() override final; 77 virtual void computePreferredLogicalWidths() override final;
77 virtual void removeLeftoverAnonymousBlock(RenderBlock*) override final { } 78 virtual void removeLeftoverAnonymousBlock(RenderBlock*) override final { }
78 virtual bool avoidsFloats() const override final { return true; } 79 virtual bool avoidsFloats() const override final { return true; }
79 virtual bool canHaveGeneratedChildren() const override final { return false; } 80 virtual bool canHaveGeneratedChildren() const override final { return false; }
80 81
81 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override final; 82 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) override final;
82 83
83 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const override final; 84 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const override final;
84 85
(...skipping 18 matching lines...) Expand all
103 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos ition); 104 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos ition);
104 } 105 }
105 virtual int firstLineBoxBaseline() const override { return RenderBlock::firs tLineBoxBaseline(); } 106 virtual int firstLineBoxBaseline() const override { return RenderBlock::firs tLineBoxBaseline(); }
106 virtual int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); } 107 virtual int inlineBlockBaseline(LineDirectionMode direction) const override { return lastLineBoxBaseline(direction); }
107 }; 108 };
108 109
109 110
110 } // namespace blink 111 } // namespace blink
111 112
112 #endif // RenderTextControl_h 113 #endif // RenderTextControl_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | Source/core/rendering/RenderTextControlMultiLine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698