| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 static const LayoutObject* parentElementRenderer(const LayoutObject* renderer) | 118 static const LayoutObject* parentElementRenderer(const LayoutObject* renderer) |
| 119 { | 119 { |
| 120 // At style recalc, the renderer's parent may not be attached, | 120 // At style recalc, the renderer's parent may not be attached, |
| 121 // so we need to obtain this from the DOM tree. | 121 // so we need to obtain this from the DOM tree. |
| 122 const Node* node = renderer->node(); | 122 const Node* node = renderer->node(); |
| 123 if (!node) | 123 if (!node) |
| 124 return 0; | 124 return 0; |
| 125 | 125 |
| 126 // FIXME: This should be using NodeRenderingTraversal::parent(). | 126 // FIXME: This should be using NodeRenderingTraversal::parent(). |
| 127 if (Element* parent = node->parentElement()) | 127 if (Element* parent = node->parentElement()) |
| 128 return parent->renderer(); | 128 return parent->layoutObject(); |
| 129 return 0; | 129 return 0; |
| 130 } | 130 } |
| 131 | 131 |
| 132 static bool isNonTextAreaFormControl(const LayoutObject* renderer) | 132 static bool isNonTextAreaFormControl(const LayoutObject* renderer) |
| 133 { | 133 { |
| 134 const Node* node = renderer ? renderer->node() : 0; | 134 const Node* node = renderer ? renderer->node() : 0; |
| 135 if (!node || !node->isElementNode()) | 135 if (!node || !node->isElementNode()) |
| 136 return false; | 136 return false; |
| 137 const Element* element = toElement(node); | 137 const Element* element = toElement(node); |
| 138 | 138 |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 } | 1174 } |
| 1175 return computedSize; | 1175 return computedSize; |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 DEFINE_TRACE(TextAutosizer) | 1178 DEFINE_TRACE(TextAutosizer) |
| 1179 { | 1179 { |
| 1180 visitor->trace(m_document); | 1180 visitor->trace(m_document); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 } // namespace blink | 1183 } // namespace blink |
| OLD | NEW |