OLD | NEW |
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 19 matching lines...) Expand all Loading... |
30 LayoutTextControlMultiLine::LayoutTextControlMultiLine(HTMLTextAreaElement* elem
ent) | 30 LayoutTextControlMultiLine::LayoutTextControlMultiLine(HTMLTextAreaElement* elem
ent) |
31 : LayoutTextControl(element) | 31 : LayoutTextControl(element) |
32 { | 32 { |
33 ASSERT(element); | 33 ASSERT(element); |
34 } | 34 } |
35 | 35 |
36 LayoutTextControlMultiLine::~LayoutTextControlMultiLine() | 36 LayoutTextControlMultiLine::~LayoutTextControlMultiLine() |
37 { | 37 { |
38 } | 38 } |
39 | 39 |
40 bool LayoutTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitT
estResult& result, const HitTestLocation& locationInContainer, const LayoutPoint
& accumulatedOffset, HitTestAction hitTestAction) | 40 bool LayoutTextControlMultiLine::nodeAtPoint(HitTestResult& result, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion hitTestAction) |
41 { | 41 { |
42 if (!LayoutTextControl::nodeAtPoint(request, result, locationInContainer, ac
cumulatedOffset, hitTestAction)) | 42 if (!LayoutTextControl::nodeAtPoint(result, locationInContainer, accumulated
Offset, hitTestAction)) |
43 return false; | 43 return false; |
44 | 44 |
45 if (result.innerNode() == node() || result.innerNode() == innerEditorElement
()) | 45 if (result.innerNode() == node() || result.innerNode() == innerEditorElement
()) |
46 hitInnerEditorElement(result, locationInContainer.point(), accumulatedOf
fset); | 46 hitInnerEditorElement(result, locationInContainer.point(), accumulatedOf
fset); |
47 | 47 |
48 return true; | 48 return true; |
49 } | 49 } |
50 | 50 |
51 float LayoutTextControlMultiLine::getAvgCharWidth(AtomicString family) | 51 float LayoutTextControlMultiLine::getAvgCharWidth(AtomicString family) |
52 { | 52 { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return placeholderRenderer; | 95 return placeholderRenderer; |
96 LayoutBox* placeholderBox = toLayoutBox(placeholderRenderer); | 96 LayoutBox* placeholderBox = toLayoutBox(placeholderRenderer); |
97 placeholderBox->style()->setLogicalWidth(Length(contentLogicalWidth() - plac
eholderBox->borderAndPaddingLogicalWidth(), Fixed)); | 97 placeholderBox->style()->setLogicalWidth(Length(contentLogicalWidth() - plac
eholderBox->borderAndPaddingLogicalWidth(), Fixed)); |
98 placeholderBox->layoutIfNeeded(); | 98 placeholderBox->layoutIfNeeded(); |
99 placeholderBox->setX(borderLeft() + paddingLeft()); | 99 placeholderBox->setX(borderLeft() + paddingLeft()); |
100 placeholderBox->setY(borderTop() + paddingTop()); | 100 placeholderBox->setY(borderTop() + paddingTop()); |
101 return placeholderRenderer; | 101 return placeholderRenderer; |
102 } | 102 } |
103 | 103 |
104 } | 104 } |
OLD | NEW |