| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 void LayoutTextControl::hitInnerEditorElement(HitTestResult& result, const Layou
tPoint& pointInContainer, const LayoutPoint& accumulatedOffset) | 151 void LayoutTextControl::hitInnerEditorElement(HitTestResult& result, const Layou
tPoint& pointInContainer, const LayoutPoint& accumulatedOffset) |
| 152 { | 152 { |
| 153 HTMLElement* innerEditor = innerEditorElement(); | 153 HTMLElement* innerEditor = innerEditorElement(); |
| 154 if (!innerEditor->layoutObject()) | 154 if (!innerEditor->layoutObject()) |
| 155 return; | 155 return; |
| 156 | 156 |
| 157 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 157 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
| 158 LayoutPoint localPoint = pointInContainer - toLayoutSize(adjustedLocation +
innerEditor->layoutBox()->location()); | 158 LayoutPoint localPoint = pointInContainer - toLayoutSize(adjustedLocation +
innerEditor->layoutBox()->location()); |
| 159 if (hasOverflowClip()) | 159 if (hasOverflowClip()) |
| 160 localPoint += scrolledContentOffset(); | 160 localPoint += scrolledContentOffset(); |
| 161 result.setInnerNode(innerEditor); | 161 result.setNodeAndPosition(innerEditor, localPoint); |
| 162 result.setLocalPoint(localPoint); | |
| 163 } | 162 } |
| 164 | 163 |
| 165 static const char* const fontFamiliesWithInvalidCharWidth[] = { | 164 static const char* const fontFamiliesWithInvalidCharWidth[] = { |
| 166 "American Typewriter", | 165 "American Typewriter", |
| 167 "Arial Hebrew", | 166 "Arial Hebrew", |
| 168 "Chalkboard", | 167 "Chalkboard", |
| 169 "Cochin", | 168 "Cochin", |
| 170 "Corsiva Hebrew", | 169 "Corsiva Hebrew", |
| 171 "Courier", | 170 "Courier", |
| 172 "Euphemia UCAS", | 171 "Euphemia UCAS", |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); | 292 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder
Element(); |
| 294 LayoutObject* placeholderRenderer = placeholder ? placeholder->layoutObject(
) : 0; | 293 LayoutObject* placeholderRenderer = placeholder ? placeholder->layoutObject(
) : 0; |
| 295 if (!placeholderRenderer) | 294 if (!placeholderRenderer) |
| 296 return 0; | 295 return 0; |
| 297 if (relayoutChildren) | 296 if (relayoutChildren) |
| 298 layoutScope.setChildNeedsLayout(placeholderRenderer); | 297 layoutScope.setChildNeedsLayout(placeholderRenderer); |
| 299 return placeholderRenderer; | 298 return placeholderRenderer; |
| 300 } | 299 } |
| 301 | 300 |
| 302 } // namespace blink | 301 } // namespace blink |
| OLD | NEW |