| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2013 Adobe Systems Incorporated. |
| 3 * | 6 * |
| 4 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 7 * 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. |
| 8 * | 11 * |
| 9 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 13 * | 16 * |
| 14 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 18 * | 21 * |
| 19 */ | 22 */ |
| 20 | 23 |
| 21 #ifndef HTMLBDIElement_h | 24 #ifndef WordMeasurement_h |
| 22 #define HTMLBDIElement_h | 25 #define WordMeasurement_h |
| 23 | 26 |
| 24 #include "core/html/HTMLElement.h" | 27 #include "platform/fonts/SimpleFontData.h" |
| 28 #include "wtf/HashSet.h" |
| 25 | 29 |
| 26 namespace WebCore { | 30 namespace WebCore { |
| 27 | 31 |
| 28 class HTMLBDIElement FINAL : public HTMLElement { | 32 class RenderText; |
| 33 |
| 34 class WordMeasurement { |
| 29 public: | 35 public: |
| 30 DECLARE_NODE_FACTORY(HTMLBDIElement); | 36 WordMeasurement() |
| 37 : renderer(0) |
| 38 , width(0) |
| 39 , startOffset(0) |
| 40 , endOffset(0) |
| 41 { |
| 42 } |
| 31 | 43 |
| 32 private: | 44 RenderText* renderer; |
| 33 inline explicit HTMLBDIElement(Document& document) | 45 float width; |
| 34 : HTMLElement(HTMLNames::bdiTag, document) | 46 int startOffset; |
| 35 { | 47 int endOffset; |
| 36 // FIXME: Rename setSelfOrAncestorHasDirAutoAttribute to reflect the fac
t bdi also uses this flag. | 48 HashSet<const SimpleFontData*> fallbackFonts; |
| 37 setSelfOrAncestorHasDirAutoAttribute(true); | |
| 38 } | |
| 39 }; | 49 }; |
| 40 | 50 |
| 41 DEFINE_NODE_FACTORY(HTMLBDIElement) | |
| 42 | |
| 43 } // namespace WebCore | 51 } // namespace WebCore |
| 44 | 52 |
| 45 #endif | 53 #endif // WordMeasurement_h |
| OLD | NEW |