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

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

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Worked on review comments Created 5 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 LayoutUnit LayoutTextControlMultiLine::computeControlLogicalHeight(LayoutUnit li neHeight, LayoutUnit nonContentHeight) const 70 LayoutUnit LayoutTextControlMultiLine::computeControlLogicalHeight(LayoutUnit li neHeight, LayoutUnit nonContentHeight) const
71 { 71 {
72 return lineHeight * toHTMLTextAreaElement(node())->rows() + nonContentHeight ; 72 return lineHeight * toHTMLTextAreaElement(node())->rows() + nonContentHeight ;
73 } 73 }
74 74
75 int LayoutTextControlMultiLine::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) cons t 75 int LayoutTextControlMultiLine::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) cons t
76 { 76 {
77 return LayoutBox::baselinePosition(baselineType, firstLine, direction, lineP ositionMode); 77 return LayoutBox::baselinePosition(baselineType, firstLine, direction, lineP ositionMode);
78 } 78 }
79 79
80 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::createInnerEditorStyle(con st ComputedStyle& startStyle) const 80 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::createInnerEditorStyle(con st ComputedStyle& startStyle)
81 { 81 {
82 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); 82 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create();
83 textBlockStyle->inheritFrom(startStyle); 83 textBlockStyle->inheritFrom(startStyle);
84 adjustInnerEditorStyle(*textBlockStyle); 84 adjustInnerEditorStyle(*textBlockStyle);
85 textBlockStyle->setDisplay(BLOCK); 85 textBlockStyle->setDisplay(BLOCK);
86 textBlockStyle->setUnique(); 86 textBlockStyle->setUnique();
87 87
88 return textBlockStyle.release(); 88 return textBlockStyle.release();
89 } 89 }
90 90
91 LayoutObject* LayoutTextControlMultiLine::layoutSpecialExcludedChild(bool relayo utChildren, SubtreeLayoutScope& layoutScope) 91 LayoutObject* LayoutTextControlMultiLine::layoutSpecialExcludedChild(bool relayo utChildren, SubtreeLayoutScope& layoutScope)
92 { 92 {
93 LayoutObject* placeholderLayoutObject = LayoutTextControl::layoutSpecialExcl udedChild(relayoutChildren, layoutScope); 93 LayoutObject* placeholderLayoutObject = LayoutTextControl::layoutSpecialExcl udedChild(relayoutChildren, layoutScope);
94 if (!placeholderLayoutObject) 94 if (!placeholderLayoutObject)
95 return nullptr; 95 return nullptr;
96 if (!placeholderLayoutObject->isBox()) 96 if (!placeholderLayoutObject->isBox())
97 return placeholderLayoutObject; 97 return placeholderLayoutObject;
98 LayoutBox* placeholderBox = toLayoutBox(placeholderLayoutObject); 98 LayoutBox* placeholderBox = toLayoutBox(placeholderLayoutObject);
99 placeholderBox->mutableStyleRef().setLogicalWidth(Length(contentLogicalWidth () - placeholderBox->borderAndPaddingLogicalWidth(), Fixed)); 99 placeholderBox->mutableStyleRef().setLogicalWidth(Length(contentLogicalWidth () - placeholderBox->borderAndPaddingLogicalWidth(), Fixed));
100 placeholderBox->layoutIfNeeded(); 100 placeholderBox->layoutIfNeeded();
101 placeholderBox->setX(borderLeft() + paddingLeft()); 101 placeholderBox->setX(borderLeft() + paddingLeft());
102 placeholderBox->setY(borderTop() + paddingTop()); 102 placeholderBox->setY(borderTop() + paddingTop());
103 return placeholderLayoutObject; 103 return placeholderLayoutObject;
104 } 104 }
105 105
106 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698