OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 #endif | 306 #endif |
307 | 307 |
308 virtual bool isEditable() const; | 308 virtual bool isEditable() const; |
309 | 309 |
310 bool isAnonymous() const { return m_isAnonymous; } | 310 bool isAnonymous() const { return m_isAnonymous; } |
311 void setIsAnonymous(bool b) { m_isAnonymous = b; } | 311 void setIsAnonymous(bool b) { m_isAnonymous = b; } |
312 bool isAnonymousBlock() const | 312 bool isAnonymousBlock() const |
313 { | 313 { |
314 return m_isAnonymous && style()->display() == BLOCK && style()->styleTyp
e() == NOPSEUDO && !isListMarker(); | 314 return m_isAnonymous && style()->display() == BLOCK && style()->styleTyp
e() == NOPSEUDO && !isListMarker(); |
315 } | 315 } |
316 bool isInlineContinuation() const { return isInline() && isBox() && (element
() ? element()->renderer() != this : false); } | 316 bool isInlineContinuation() const { return (element() ? element()->renderer(
) != this : false) && isRenderInline(); } |
317 bool isFloating() const { return m_floating; } | 317 bool isFloating() const { return m_floating; } |
318 bool isPositioned() const { return m_positioned; } // absolute or fixed posi
tioning | 318 bool isPositioned() const { return m_positioned; } // absolute or fixed posi
tioning |
319 bool isRelPositioned() const { return m_relPositioned; } // relative positio
ning | 319 bool isRelPositioned() const { return m_relPositioned; } // relative positio
ning |
320 bool isText() const { return m_isText; } | 320 bool isText() const { return m_isText; } |
321 bool isBox() const { return m_isBox; } | 321 bool isBox() const { return m_isBox; } |
322 bool isInline() const { return m_inline; } // inline object | 322 bool isInline() const { return m_inline; } // inline object |
323 bool isRunIn() const { return style()->display() == RUN_IN; } // run-in obje
ct | 323 bool isRunIn() const { return style()->display() == RUN_IN; } // run-in obje
ct |
324 bool isDragging() const { return m_isDragging; } | 324 bool isDragging() const { return m_isDragging; } |
325 bool isReplaced() const { return m_replaced; } // a "replaced" element (see
CSS) | 325 bool isReplaced() const { return m_replaced; } // a "replaced" element (see
CSS) |
326 | 326 |
(...skipping 23 matching lines...) Expand all Loading... |
350 public: | 350 public: |
351 // The pseudo element style can be cached or uncached. Use the cached metho
d if the pseudo element doesn't respect | 351 // The pseudo element style can be cached or uncached. Use the cached metho
d if the pseudo element doesn't respect |
352 // any pseudo classes (and therefore has no concept of changing state). | 352 // any pseudo classes (and therefore has no concept of changing state). |
353 RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) co
nst; | 353 RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = 0) co
nst; |
354 PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parent
Style = 0) const; | 354 PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parent
Style = 0) const; |
355 | 355 |
356 virtual void updateDragState(bool dragOn); | 356 virtual void updateDragState(bool dragOn); |
357 | 357 |
358 RenderView* view() const; | 358 RenderView* view() const; |
359 | 359 |
| 360 // Returns true if this renderer is rooted, and optionally returns the hosti
ng view (the root of the hierarchy). |
| 361 bool isRooted(RenderView** = 0); |
| 362 |
360 // don't even think about making this method virtual! | 363 // don't even think about making this method virtual! |
361 Node* element() const { return m_isAnonymous ? 0 : m_node; } | 364 Node* element() const { return m_isAnonymous ? 0 : m_node; } |
362 Document* document() const { return m_node->document(); } | 365 Document* document() const { return m_node->document(); } |
363 void setNode(Node* node) { m_node = node; } | 366 void setNode(Node* node) { m_node = node; } |
364 Node* node() const { return m_node; } | 367 Node* node() const { return m_node; } |
365 | 368 |
366 bool hasOutlineAnnotation() const; | 369 bool hasOutlineAnnotation() const; |
367 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati
on(); } | 370 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati
on(); } |
368 | 371 |
369 /** | 372 /** |
370 * returns the object containing this one. can be different from parent for | 373 * returns the object containing this one. can be different from parent for |
371 * positioned elements | 374 * positioned elements |
372 */ | 375 */ |
373 RenderObject* container() const; | 376 RenderObject* container() const; |
374 virtual RenderObject* hoverAncestor() const { return parent(); } | 377 virtual RenderObject* hoverAncestor() const { return parent(); } |
375 | 378 |
| 379 // IE Extension that can be called on any RenderObject. See the implementat
ion for the details. |
| 380 RenderBoxModelObject* offsetParent() const; |
| 381 |
376 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0); | 382 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0); |
377 void setNeedsLayout(bool b, bool markParents = true); | 383 void setNeedsLayout(bool b, bool markParents = true); |
378 void setChildNeedsLayout(bool b, bool markParents = true); | 384 void setChildNeedsLayout(bool b, bool markParents = true); |
379 void setNeedsPositionedMovementLayout(); | 385 void setNeedsPositionedMovementLayout(); |
380 void setPrefWidthsDirty(bool, bool markParents = true); | 386 void setPrefWidthsDirty(bool, bool markParents = true); |
381 void invalidateContainerPrefWidths(); | 387 void invalidateContainerPrefWidths(); |
382 | 388 |
383 void setNeedsLayoutAndPrefWidthsRecalc() | 389 void setNeedsLayoutAndPrefWidthsRecalc() |
384 { | 390 { |
385 setNeedsLayout(true); | 391 setNeedsLayout(true); |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 } | 983 } |
978 | 984 |
979 } // namespace WebCore | 985 } // namespace WebCore |
980 | 986 |
981 #ifndef NDEBUG | 987 #ifndef NDEBUG |
982 // Outside the WebCore namespace for ease of invocation from gdb. | 988 // Outside the WebCore namespace for ease of invocation from gdb. |
983 void showTree(const WebCore::RenderObject*); | 989 void showTree(const WebCore::RenderObject*); |
984 #endif | 990 #endif |
985 | 991 |
986 #endif // RenderObject_h | 992 #endif // RenderObject_h |
OLD | NEW |