| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 innerTextRenderer->style()->setWidth(Length(desiredWidth, Fixed)); | 83 innerTextRenderer->style()->setWidth(Length(desiredWidth, Fixed)); |
| 84 | 84 |
| 85 RenderBlock::layoutBlock(relayoutChildren); | 85 RenderBlock::layoutBlock(relayoutChildren); |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool RenderTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitT
estResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction) | 88 bool RenderTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitT
estResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction) |
| 89 { | 89 { |
| 90 if (!RenderTextControl::nodeAtPoint(request, result, x, y, tx, ty, hitTestAc
tion)) | 90 if (!RenderTextControl::nodeAtPoint(request, result, x, y, tx, ty, hitTestAc
tion)) |
| 91 return false; | 91 return false; |
| 92 | 92 |
| 93 if (result.innerNode() == node()) { | 93 hitInnerTextBlock(result, x, y, tx, ty); |
| 94 hitInnerTextBlock(result, x, y, tx, ty); | 94 return true; |
| 95 return true; | |
| 96 } | |
| 97 | |
| 98 return false; | |
| 99 } | 95 } |
| 100 | 96 |
| 101 void RenderTextControlMultiLine::forwardEvent(Event* event) | 97 void RenderTextControlMultiLine::forwardEvent(Event* event) |
| 102 { | 98 { |
| 103 RenderTextControl::forwardEvent(event); | 99 RenderTextControl::forwardEvent(event); |
| 104 } | 100 } |
| 105 | 101 |
| 106 int RenderTextControlMultiLine::preferredContentWidth(float charWidth) const | 102 int RenderTextControlMultiLine::preferredContentWidth(float charWidth) const |
| 107 { | 103 { |
| 108 int factor = static_cast<HTMLTextAreaElement*>(node())->cols(); | 104 int factor = static_cast<HTMLTextAreaElement*>(node())->cols(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 textBlockStyle->setWhiteSpace(PRE); | 150 textBlockStyle->setWhiteSpace(PRE); |
| 155 textBlockStyle->setWordWrap(NormalWordWrap); | 151 textBlockStyle->setWordWrap(NormalWordWrap); |
| 156 } | 152 } |
| 157 | 153 |
| 158 textBlockStyle->setDisplay(BLOCK); | 154 textBlockStyle->setDisplay(BLOCK); |
| 159 | 155 |
| 160 return textBlockStyle.release(); | 156 return textBlockStyle.release(); |
| 161 } | 157 } |
| 162 | 158 |
| 163 } | 159 } |
| OLD | NEW |