OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010 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 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 textOffset += toLayoutSize(containerRenderer->location()); | 197 textOffset += toLayoutSize(containerRenderer->location()); |
198 placeholderBox->setLocation(textOffset); | 198 placeholderBox->setLocation(textOffset); |
199 | 199 |
200 // The placeholder gets layout last, after the parent text control and i
ts other children, | 200 // The placeholder gets layout last, after the parent text control and i
ts other children, |
201 // so in order to get the correct overflow from the placeholder we need
to recompute it now. | 201 // so in order to get the correct overflow from the placeholder we need
to recompute it now. |
202 if (neededLayout) | 202 if (neededLayout) |
203 computeOverflow(clientLogicalBottom()); | 203 computeOverflow(clientLogicalBottom()); |
204 } | 204 } |
205 } | 205 } |
206 | 206 |
207 bool LayoutTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, Hit
TestResult& result, const HitTestLocation& locationInContainer, const LayoutPoin
t& accumulatedOffset, HitTestAction hitTestAction) | 207 bool LayoutTextControlSingleLine::nodeAtPoint(HitTestResult& result, const HitTe
stLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAc
tion hitTestAction) |
208 { | 208 { |
209 if (!LayoutTextControl::nodeAtPoint(request, result, locationInContainer, ac
cumulatedOffset, hitTestAction)) | 209 if (!LayoutTextControl::nodeAtPoint(result, locationInContainer, accumulated
Offset, hitTestAction)) |
210 return false; | 210 return false; |
211 | 211 |
212 // Say that we hit the inner text element if | 212 // Say that we hit the inner text element if |
213 // - we hit a node inside the inner text element, | 213 // - we hit a node inside the inner text element, |
214 // - we hit the <input> element (e.g. we're over the border or padding), or | 214 // - we hit the <input> element (e.g. we're over the border or padding), or |
215 // - we hit regions not in any decoration buttons. | 215 // - we hit regions not in any decoration buttons. |
216 Element* container = containerElement(); | 216 Element* container = containerElement(); |
217 if (result.innerNode()->isDescendantOf(innerEditorElement()) || result.inner
Node() == node() || (container && container == result.innerNode())) { | 217 if (result.innerNode()->isDescendantOf(innerEditorElement()) || result.inner
Node() == node() || (container && container == result.innerNode())) { |
218 LayoutPoint pointInParent = locationInContainer.point(); | 218 LayoutPoint pointInParent = locationInContainer.point(); |
219 if (container && editingViewPortElement()) { | 219 if (container && editingViewPortElement()) { |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 if (innerEditorElement()) | 431 if (innerEditorElement()) |
432 innerEditorElement()->setScrollTop(newTop); | 432 innerEditorElement()->setScrollTop(newTop); |
433 } | 433 } |
434 | 434 |
435 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 435 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
436 { | 436 { |
437 return toHTMLInputElement(node()); | 437 return toHTMLInputElement(node()); |
438 } | 438 } |
439 | 439 |
440 } | 440 } |
OLD | NEW |