fix logic
[personal-kdelibs.git] / khtml / rendering / RenderSVGInlineText.h
blobbc61a05a33f8b0c11184d2cc24ea09131ed019ad
1 /*
2 * This file is part of the WebKit project.
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 #ifndef RenderSVGInlineText_h
25 #define RenderSVGInlineText_h
27 #if ENABLE(SVG)
29 //#include "RenderText.h"
30 #include "render_text.h"
32 namespace WebCore {
33 using namespace khtml;
34 class RenderSVGInlineText : public RenderText {
35 public:
36 RenderSVGInlineText(Node*, DOMStringImpl*);
37 virtual const char* renderName() const { return "RenderSVGInlineText"; }
38 virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool topLevel = true);
39 virtual bool requiresLayer() { return false; }
40 virtual IntRect selectionRect(bool clipToVisibleContent = true);
41 virtual bool isSVGText() const { return true; }
42 virtual InlineTextBox* createInlineTextBox();
43 virtual InlineBox* createInlineBox(bool,bool) { return createInlineTextBox(); }
45 /*virtual IntRect caretRect(int offset, EAffinity, int* extraWidthToEndOfLine = 0);
46 virtual VisiblePosition positionForCoordinates(int x, int y);*/
48 private:
49 IntRect computeAbsoluteRectForRange(int startPos, int endPos);
54 #endif // ENABLE(SVG)
56 #endif // !RenderSVGInlineText_h