18a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block/**
28a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
38a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block *           (C) 1999 Antti Koivisto (koivisto@kde.org)
48a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
58a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
68a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block *
78a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * This library is free software; you can redistribute it and/or
88a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * modify it under the terms of the GNU Library General Public
98a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * License as published by the Free Software Foundation; either
108a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * version 2 of the License, or (at your option) any later version.
118a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block *
128a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * This library is distributed in the hope that it will be useful,
138a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * but WITHOUT ANY WARRANTY; without even the implied warranty of
148a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
158a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * Library General Public License for more details.
168a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block *
178a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * You should have received a copy of the GNU Library General Public License
188a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * along with this library; see the file COPYING.LIB.  If not, write to
198a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
208a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block * Boston, MA 02110-1301, USA.
218a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block *
228a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block */
238a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
248a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#ifndef BidiRun_h
258a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#define BidiRun_h
268a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
278a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#include <wtf/StdLibExtras.h>
288a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#include "BidiResolver.h"
298a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#include "RenderText.h"
308a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
318a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blocknamespace WebCore {
328a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
338a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blockclass BidiContext;
348a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blockclass InlineBox;
358a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
368a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blockstruct BidiRun : BidiCharacterRun {
378a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    BidiRun(int start, int stop, RenderObject* object, BidiContext* context, WTF::Unicode::Direction dir)
388a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block        : BidiCharacterRun(start, stop, context, dir)
398a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block        , m_object(object)
408a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block        , m_box(0)
4106ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen        , m_hasHyphen(false)
428a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    {
438a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    }
448a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
458a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    void destroy();
468a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
478a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    // Overloaded new operator.
488a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    void* operator new(size_t, RenderArena*) throw();
498a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
508a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    // Overridden to prevent the normal delete from being called.
518a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    void operator delete(void*, size_t);
528a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
538a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    BidiRun* next() { return static_cast<BidiRun*>(m_next); }
548a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
558a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blockprivate:
568a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    // The normal operator new is disallowed.
578a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    void* operator new(size_t) throw();
588a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
598a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Blockpublic:
608a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    RenderObject* m_object;
618a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block    InlineBox* m_box;
6206ea8e899e48f1f2f396b70e63fae369f2f23232Kristian Monsen    bool m_hasHyphen;
638a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block};
648a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
658a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block}
668a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block
678a0914b749bbe7da7768e07a7db5c6d4bb09472bSteve Block#endif // BidiRun_h
68