]>
git.saurik.com Git - iphone-api.git/blob - WebCore/RenderBR.h
2 * This file is part of the DOM implementation for KDE.
4 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
26 #include "RenderText.h"
29 * The whole class here is a hack to get <br> working, as long as we don't have support for
30 * CSS2 :before and :after pseudo elements
36 class RenderBR
: public RenderText
{
41 virtual const char* renderName() const { return "RenderBR"; }
43 virtual IntRect
selectionRectForRepaint(RenderBox
* /*repaintContainer*/, bool /*clipToVisibleContent*/) { return IntRect(); }
45 virtual unsigned width(unsigned /*from*/, unsigned /*len*/, const Font
&, int /*xpos*/) const { return 0; }
46 virtual unsigned width(unsigned /*from*/, unsigned /*len*/, int /*xpos*/, bool /*firstLine = false*/) const { return 0; }
48 virtual int lineHeight(bool firstLine
, bool isRootLineBox
= false) const;
49 virtual int baselinePosition(bool firstLine
, bool isRootLineBox
= false) const;
52 virtual InlineBox
* createInlineBox(bool, bool, bool isOnlyRun
= false);
54 virtual bool isBR() const { return true; }
56 virtual int caretMinOffset() const;
57 virtual int caretMaxOffset() const;
58 virtual unsigned caretMaxRenderedOffset() const;
60 virtual VisiblePosition
positionForCoordinates(int x
, int y
);
63 virtual void styleDidChange(StyleDifference
, const RenderStyle
* oldStyle
);
66 mutable int m_lineHeight
;
69 } // namespace WebCore