File indexing completed on 2024-12-01 12:34:18
0001 /* 0002 * This file is part of the WebKit project. 0003 * 0004 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 0005 * (C) 2006 Apple Computer Inc. 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Library General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2 of the License, or (at your option) any later version. 0011 * 0012 * This library is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Library General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Library General Public License 0018 * along with this library; see the file COPYING.LIB. If not, write to 0019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 * Boston, MA 02110-1301, USA. 0021 * 0022 */ 0023 0024 #include "wtf/Platform.h" 0025 0026 #if ENABLE(SVG) 0027 #include "RenderSVGInline.h" 0028 0029 #include "SVGInlineFlowBox.h" 0030 #include "xml/Document.h" 0031 0032 namespace WebCore 0033 { 0034 0035 RenderSVGInline::RenderSVGInline(DOM::NodeImpl *n) 0036 : RenderInline(n) 0037 { 0038 } 0039 0040 InlineBox *RenderSVGInline::createInlineBox(bool makePlaceHolderBox, bool isRootLineBox, bool isOnlyRun) 0041 { 0042 Q_UNUSED(isOnlyRun); 0043 ASSERT(!(!isRootLineBox && (isReplaced() || makePlaceHolderBox))); 0044 Q_UNUSED(makePlaceHolderBox); 0045 Q_UNUSED(isRootLineBox); 0046 ASSERT(isInlineFlow()); 0047 0048 InlineFlowBox *flowBox = new(renderArena()) SVGInlineFlowBox(this); 0049 0050 if (!m_firstLineBox) { 0051 m_firstLineBox = m_lastLineBox = flowBox; 0052 } else { 0053 m_lastLineBox->setNextLineBox(flowBox); 0054 flowBox->setPreviousLineBox(m_lastLineBox); 0055 m_lastLineBox = flowBox; 0056 } 0057 0058 return flowBox; 0059 } 0060 0061 } 0062 0063 #endif // ENABLE(SVG)