eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 1 | /** |
| 2 | * This file is part of the DOM implementation for KDE. |
| 3 | * |
| 4 | * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 5 | * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 6 | * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. |
| 7 | * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 8 | * |
| 9 | * This library is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU Library General Public |
| 11 | * License as published by the Free Software Foundation; either |
| 12 | * version 2 of the License, or (at your option) any later version. |
| 13 | * |
| 14 | * This library is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 | * Library General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Library General Public License |
| 20 | * along with this library; see the file COPYING.LIB. If not, write to |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 | * Boston, MA 02110-1301, USA. |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 23 | * |
| 24 | */ |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 25 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 26 | #include "config.h" |
| 27 | #include "RenderListItem.h" |
| 28 | |
| 29 | #include "CachedImage.h" |
| 30 | #include "HTMLNames.h" |
| 31 | #include "HTMLOListElement.h" |
| 32 | #include "RenderListMarker.h" |
weinig | fef1363 | 2007-04-29 20:09:08 +0000 | [diff] [blame] | 33 | #include "RenderView.h" |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 34 | |
| 35 | using namespace std; |
| 36 | |
| 37 | namespace WebCore { |
| 38 | |
| 39 | using namespace HTMLNames; |
| 40 | |
| 41 | RenderListItem::RenderListItem(Node* node) |
| 42 | : RenderBlock(node) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 43 | , m_marker(0) |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 44 | , m_hasExplicitValue(false) |
| 45 | , m_isValueUpToDate(false) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 46 | , m_notInList(false) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 47 | { |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 48 | setInline(false); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 49 | } |
| 50 | |
simon.fraser@apple.com | a89b8cd | 2008-10-10 03:15:31 +0000 | [diff] [blame] | 51 | void RenderListItem::styleDidChange(RenderStyle::Diff diff, const RenderStyle* oldStyle) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 52 | { |
simon.fraser@apple.com | a89b8cd | 2008-10-10 03:15:31 +0000 | [diff] [blame] | 53 | RenderBlock::styleDidChange(diff, oldStyle); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 54 | |
| 55 | if (style()->listStyleType() != LNONE || |
kmccullo | adfd67d | 2007-03-03 02:18:43 +0000 | [diff] [blame] | 56 | (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) { |
hyatt@apple.com | dec0cbf2 | 2008-10-17 00:25:33 +0000 | [diff] [blame^] | 57 | RefPtr<RenderStyle> newStyle = RenderStyle::create(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 58 | // The marker always inherits from the list item, regardless of where it might end |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 59 | // up (e.g., in some deeply nested line box). See CSS3 spec. |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 60 | newStyle->inheritFrom(style()); |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 61 | if (!m_marker) |
| 62 | m_marker = new (renderArena()) RenderListMarker(this); |
hyatt@apple.com | dec0cbf2 | 2008-10-17 00:25:33 +0000 | [diff] [blame^] | 63 | m_marker->setStyle(newStyle.release()); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 64 | } else if (m_marker) { |
| 65 | m_marker->destroy(); |
| 66 | m_marker = 0; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | void RenderListItem::destroy() |
| 71 | { |
| 72 | if (m_marker) { |
| 73 | m_marker->destroy(); |
| 74 | m_marker = 0; |
| 75 | } |
| 76 | RenderBlock::destroy(); |
| 77 | } |
| 78 | |
| 79 | static Node* enclosingList(Node* node) |
| 80 | { |
darin | 76d3b83 | 2006-07-29 15:06:04 +0000 | [diff] [blame] | 81 | Node* parent = node->parentNode(); |
| 82 | for (Node* n = parent; n; n = n->parentNode()) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 83 | if (n->hasTagName(ulTag) || n->hasTagName(olTag)) |
| 84 | return n; |
darin | 76d3b83 | 2006-07-29 15:06:04 +0000 | [diff] [blame] | 85 | // If there's no actual <ul> or <ol> list element, then our parent acts as |
| 86 | // our list for purposes of determining what other list items should be |
| 87 | // numbered as part of the same list. |
| 88 | return parent; |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 89 | } |
| 90 | |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 91 | static RenderListItem* previousListItem(Node* list, const RenderListItem* item) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 92 | { |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 93 | for (Node* n = item->node()->traversePreviousNode(); n != list; n = n->traversePreviousNode()) { |
| 94 | RenderObject* o = n->renderer(); |
| 95 | if (o && o->isListItem()) { |
| 96 | Node* otherList = enclosingList(n); |
| 97 | // This item is part of our current list, so it's what we're looking for. |
| 98 | if (list == otherList) |
| 99 | return static_cast<RenderListItem*>(o); |
| 100 | // We found ourself inside another list; lets skip the rest of it. |
darin | 76d3b83 | 2006-07-29 15:06:04 +0000 | [diff] [blame] | 101 | // Use traverseNextNode() here because the other list itself may actually |
| 102 | // be a list item itself. We need to examine it, so we do this to counteract |
| 103 | // the traversePreviousNode() that will be done by the loop. |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 104 | if (otherList) |
darin | 76d3b83 | 2006-07-29 15:06:04 +0000 | [diff] [blame] | 105 | n = otherList->traverseNextNode(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 106 | } |
| 107 | } |
| 108 | return 0; |
| 109 | } |
| 110 | |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 111 | inline int RenderListItem::calcValue() const |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 112 | { |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 113 | if (m_hasExplicitValue) |
| 114 | return m_explicitValue; |
| 115 | Node* list = enclosingList(node()); |
| 116 | // FIXME: This recurses to a possible depth of the length of the list. |
| 117 | // That's not good -- we need to change this to an iterative algorithm. |
| 118 | if (RenderListItem* previousItem = previousListItem(list, this)) |
| 119 | return previousItem->value() + 1; |
| 120 | if (list && list->hasTagName(olTag)) |
| 121 | return static_cast<HTMLOListElement*>(list)->start(); |
| 122 | return 1; |
| 123 | } |
| 124 | |
| 125 | void RenderListItem::updateValueNow() const |
| 126 | { |
| 127 | m_value = calcValue(); |
| 128 | m_isValueUpToDate = true; |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | bool RenderListItem::isEmpty() const |
| 132 | { |
| 133 | return lastChild() == m_marker; |
| 134 | } |
| 135 | |
bdash | ccffb43 | 2007-07-13 11:51:40 +0000 | [diff] [blame] | 136 | static RenderObject* getParentOfFirstLineBox(RenderBlock* curr, RenderObject* marker) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 137 | { |
| 138 | RenderObject* firstChild = curr->firstChild(); |
| 139 | if (!firstChild) |
| 140 | return 0; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 141 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 142 | for (RenderObject* currChild = firstChild; currChild; currChild = currChild->nextSibling()) { |
| 143 | if (currChild == marker) |
| 144 | continue; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 145 | |
bdash | ccffb43 | 2007-07-13 11:51:40 +0000 | [diff] [blame] | 146 | if (currChild->isInline() && (!currChild->isInlineFlow() || curr->generatesLineBoxesForInlineChild(currChild))) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 147 | return curr; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 148 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 149 | if (currChild->isFloating() || currChild->isPositioned()) |
| 150 | continue; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 151 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 152 | if (currChild->isTable() || !currChild->isRenderBlock()) |
| 153 | break; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 154 | |
bdash | ccffb43 | 2007-07-13 11:51:40 +0000 | [diff] [blame] | 155 | if (curr->isListItem() && currChild->style()->htmlHacks() && currChild->element() && |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 156 | (currChild->element()->hasTagName(ulTag)|| currChild->element()->hasTagName(olTag))) |
| 157 | break; |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 158 | |
bdash | ccffb43 | 2007-07-13 11:51:40 +0000 | [diff] [blame] | 159 | RenderObject* lineBox = getParentOfFirstLineBox(static_cast<RenderBlock*>(currChild), marker); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 160 | if (lineBox) |
| 161 | return lineBox; |
| 162 | } |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 163 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 164 | return 0; |
| 165 | } |
| 166 | |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 167 | void RenderListItem::updateValue() |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 168 | { |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 169 | if (!m_hasExplicitValue) { |
| 170 | m_isValueUpToDate = false; |
| 171 | if (m_marker) |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 172 | m_marker->setNeedsLayoutAndPrefWidthsRecalc(); |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 173 | } |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 174 | } |
| 175 | |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 176 | static RenderObject* firstNonMarkerChild(RenderObject* parent) |
| 177 | { |
| 178 | RenderObject* result = parent->firstChild(); |
| 179 | while (result && result->isListMarker()) |
| 180 | result = result->nextSibling(); |
| 181 | return result; |
| 182 | } |
| 183 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 184 | void RenderListItem::updateMarkerLocation() |
| 185 | { |
| 186 | // Sanity check the location of our marker. |
| 187 | if (m_marker) { |
| 188 | RenderObject* markerPar = m_marker->parent(); |
| 189 | RenderObject* lineBoxParent = getParentOfFirstLineBox(this, m_marker); |
| 190 | if (!lineBoxParent) { |
| 191 | // If the marker is currently contained inside an anonymous box, |
| 192 | // then we are the only item in that anonymous box (since no line box |
| 193 | // parent was found). It's ok to just leave the marker where it is |
| 194 | // in this case. |
| 195 | if (markerPar && markerPar->isAnonymousBlock()) |
| 196 | lineBoxParent = markerPar; |
| 197 | else |
| 198 | lineBoxParent = this; |
| 199 | } |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 200 | |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 201 | if (markerPar != lineBoxParent || m_marker->prefWidthsDirty()) { |
weinig | fef1363 | 2007-04-29 20:09:08 +0000 | [diff] [blame] | 202 | // Removing and adding the marker can trigger repainting in |
| 203 | // containers other than ourselves, so we need to disable LayoutState. |
| 204 | view()->disableLayoutState(); |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 205 | updateFirstLetter(); |
hyatt | b866344 | 2006-08-04 21:04:11 +0000 | [diff] [blame] | 206 | m_marker->remove(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 207 | if (!lineBoxParent) |
| 208 | lineBoxParent = this; |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 209 | lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent)); |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 210 | if (m_marker->prefWidthsDirty()) |
| 211 | m_marker->calcPrefWidths(); |
weinig | fef1363 | 2007-04-29 20:09:08 +0000 | [diff] [blame] | 212 | view()->enableLayoutState(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 217 | void RenderListItem::calcPrefWidths() |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 218 | { |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 219 | ASSERT(prefWidthsDirty()); |
| 220 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 221 | updateMarkerLocation(); |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 222 | |
| 223 | RenderBlock::calcPrefWidths(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 224 | } |
| 225 | |
| 226 | void RenderListItem::layout() |
| 227 | { |
hyatt | 818bb12 | 2007-04-25 19:10:24 +0000 | [diff] [blame] | 228 | ASSERT(needsLayout()); |
| 229 | |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 230 | updateMarkerLocation(); |
| 231 | RenderBlock::layout(); |
| 232 | } |
| 233 | |
| 234 | void RenderListItem::positionListMarker() |
| 235 | { |
mitz@apple.com | b214133 | 2008-09-10 18:19:39 +0000 | [diff] [blame] | 236 | if (m_marker && !m_marker->isInside() && m_marker->inlineBoxWrapper()) { |
| 237 | int markerOldX = m_marker->xPos(); |
| 238 | int yOffset = 0; |
| 239 | int xOffset = 0; |
| 240 | for (RenderObject* o = m_marker->parent(); o != this; o = o->parent()) { |
| 241 | yOffset += o->yPos(); |
| 242 | xOffset += o->xPos(); |
weinig | f1db1db | 2007-02-28 00:04:39 +0000 | [diff] [blame] | 243 | } |
mitz@apple.com | 8de23dd | 2008-09-10 18:17:14 +0000 | [diff] [blame] | 244 | |
mitz@apple.com | b214133 | 2008-09-10 18:19:39 +0000 | [diff] [blame] | 245 | bool adjustOverflow = false; |
| 246 | int markerXPos; |
| 247 | RootInlineBox* root = m_marker->inlineBoxWrapper()->root(); |
| 248 | |
| 249 | if (style()->direction() == LTR) { |
| 250 | int leftLineOffset = leftRelOffset(yOffset, leftOffset(yOffset)); |
| 251 | markerXPos = leftLineOffset - xOffset - paddingLeft() - borderLeft() + m_marker->marginLeft(); |
| 252 | m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0); |
| 253 | if (markerXPos < root->leftOverflow()) { |
| 254 | root->setHorizontalOverflowPositions(markerXPos, root->rightOverflow()); |
| 255 | adjustOverflow = true; |
| 256 | } |
| 257 | } else { |
| 258 | int rightLineOffset = rightRelOffset(yOffset, rightOffset(yOffset)); |
| 259 | markerXPos = rightLineOffset - xOffset + paddingRight() + borderRight() + m_marker->marginLeft(); |
| 260 | m_marker->inlineBoxWrapper()->adjustPosition(markerXPos - markerOldX, 0); |
| 261 | if (markerXPos + m_marker->width() > root->rightOverflow()) { |
| 262 | root->setHorizontalOverflowPositions(root->leftOverflow(), markerXPos + m_marker->width()); |
| 263 | adjustOverflow = true; |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | if (adjustOverflow) { |
| 268 | IntRect markerRect(markerXPos + xOffset, yOffset, m_marker->width(), m_marker->height()); |
| 269 | RenderObject* o = m_marker; |
| 270 | do { |
| 271 | o = o->parent(); |
| 272 | if (o->isRenderBlock()) |
| 273 | static_cast<RenderBlock*>(o)->addVisualOverflow(markerRect); |
| 274 | markerRect.move(-o->xPos(), -o->yPos()); |
| 275 | } while (o != this); |
| 276 | } |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 277 | } |
| 278 | } |
| 279 | |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 280 | void RenderListItem::paint(PaintInfo& paintInfo, int tx, int ty) |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 281 | { |
| 282 | if (!m_height) |
| 283 | return; |
| 284 | |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 285 | RenderBlock::paint(paintInfo, tx, ty); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 286 | } |
| 287 | |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 288 | const String& RenderListItem::markerText() const |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 289 | { |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 290 | if (m_marker) |
| 291 | return m_marker->text(); |
| 292 | static String staticNullString; |
| 293 | return staticNullString; |
| 294 | } |
| 295 | |
| 296 | void RenderListItem::explicitValueChanged() |
| 297 | { |
| 298 | if (m_marker) |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 299 | m_marker->setNeedsLayoutAndPrefWidthsRecalc(); |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 300 | Node* listNode = enclosingList(node()); |
adele | 60f2836 | 2007-01-06 06:24:08 +0000 | [diff] [blame] | 301 | RenderObject* listRenderer = 0; |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 302 | if (listNode) |
| 303 | listRenderer = listNode->renderer(); |
| 304 | for (RenderObject* r = this; r; r = r->nextInPreOrder(listRenderer)) |
| 305 | if (r->isListItem()) { |
| 306 | RenderListItem* item = static_cast<RenderListItem*>(r); |
| 307 | if (!item->m_hasExplicitValue) { |
| 308 | item->m_isValueUpToDate = false; |
| 309 | if (RenderListMarker* marker = item->m_marker) |
darin | 7e7c8e4 | 2007-04-25 01:14:03 +0000 | [diff] [blame] | 310 | marker->setNeedsLayoutAndPrefWidthsRecalc(); |
darin | ec37548 | 2007-01-06 01:36:24 +0000 | [diff] [blame] | 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | void RenderListItem::setExplicitValue(int value) |
| 316 | { |
| 317 | if (m_hasExplicitValue && m_explicitValue == value) |
| 318 | return; |
| 319 | m_explicitValue = value; |
| 320 | m_value = value; |
| 321 | m_hasExplicitValue = true; |
| 322 | explicitValueChanged(); |
| 323 | } |
| 324 | |
| 325 | void RenderListItem::clearExplicitValue() |
| 326 | { |
| 327 | if (!m_hasExplicitValue) |
| 328 | return; |
| 329 | m_hasExplicitValue = false; |
| 330 | m_isValueUpToDate = false; |
| 331 | explicitValueChanged(); |
eseidel | e34973b | 2006-05-15 21:16:29 +0000 | [diff] [blame] | 332 | } |
| 333 | |
weinig | c24ab18 | 2006-10-30 22:41:29 +0000 | [diff] [blame] | 334 | } // namespace WebCore |