| 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. | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. |
| 4 * (http://www.torchmobile.com/) | 4 * (http://www.torchmobile.com/) |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 style.setUserModify(node.isDisabledOrReadOnly() ? READ_ONLY | 70 style.setUserModify(node.isDisabledOrReadOnly() ? READ_ONLY |
| 71 : READ_WRITE_PLAINTEXT_ONLY); | 71 : READ_WRITE_PLAINTEXT_ONLY); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void LayoutTextControl::adjustInnerEditorStyle( | 74 void LayoutTextControl::adjustInnerEditorStyle( |
| 75 ComputedStyle& textBlockStyle) const { | 75 ComputedStyle& textBlockStyle) const { |
| 76 // The inner block, if present, always has its direction set to LTR, | 76 // The inner block, if present, always has its direction set to LTR, |
| 77 // so we need to inherit the direction and unicode-bidi style from the | 77 // so we need to inherit the direction and unicode-bidi style from the |
| 78 // element. | 78 // element. |
| 79 textBlockStyle.setDirection(style()->direction()); | 79 textBlockStyle.setDirection(style()->direction()); |
| 80 textBlockStyle.setUnicodeBidi(style()->unicodeBidi()); | 80 textBlockStyle.setUnicodeBidi(style()->getUnicodeBidi()); |
| 81 | 81 |
| 82 updateUserModifyProperty(*textControlElement(), textBlockStyle); | 82 updateUserModifyProperty(*textControlElement(), textBlockStyle); |
| 83 } | 83 } |
| 84 | 84 |
| 85 int LayoutTextControl::textBlockLogicalHeight() const { | 85 int LayoutTextControl::textBlockLogicalHeight() const { |
| 86 return (logicalHeight() - borderAndPaddingLogicalHeight()).toInt(); | 86 return (logicalHeight() - borderAndPaddingLogicalHeight()).toInt(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 int LayoutTextControl::textBlockLogicalWidth() const { | 89 int LayoutTextControl::textBlockLogicalWidth() const { |
| 90 Element* innerEditor = innerEditorElement(); | 90 Element* innerEditor = innerEditorElement(); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); | 353 LayoutUnit baseline(fontData->getFontMetrics().ascent(AlphabeticBaseline)); |
| 354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; | 354 for (LayoutObject* box = innerEditorLayoutObject; box && box != this; |
| 355 box = box->parent()) { | 355 box = box->parent()) { |
| 356 if (box->isBox()) | 356 if (box->isBox()) |
| 357 baseline += toLayoutBox(box)->logicalTop(); | 357 baseline += toLayoutBox(box)->logicalTop(); |
| 358 } | 358 } |
| 359 return baseline.toInt(); | 359 return baseline.toInt(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace blink | 362 } // namespace blink |
| OLD | NEW |