summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RootInlineBox.h
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/rendering/RootInlineBox.h
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/rendering/RootInlineBox.h')
-rw-r--r--WebCore/rendering/RootInlineBox.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/WebCore/rendering/RootInlineBox.h b/WebCore/rendering/RootInlineBox.h
index b682a52..4724110 100644
--- a/WebCore/rendering/RootInlineBox.h
+++ b/WebCore/rendering/RootInlineBox.h
@@ -1,7 +1,7 @@
/*
* This file is part of the line box implementation for KDE.
*
- * Copyright (C) 2003, 2006 Apple Computer, Inc.
+ * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -119,6 +119,16 @@ public:
InlineBox* closestLeafChildForXPos(int x, bool onlyEditableLeaves = false);
+ Vector<RenderObject*>& floats()
+ {
+ ASSERT(!isDirty());
+ if (!m_overflow)
+ m_overflow = new (m_object->renderArena()) Overflow(this);
+ return m_overflow->floats;
+ }
+
+ Vector<RenderObject*>* floatsPtr() { ASSERT(!isDirty()); return m_overflow ? &m_overflow->floats : 0; }
+
protected:
// Normally we are only as tall as the style on our block dictates, but we might have content
// that spills out above the height of our font (e.g, a tall image), or something that extends further
@@ -133,8 +143,9 @@ protected:
, m_rightOverflow(box->m_x + box->m_width)
, m_selectionTop(box->m_y)
, m_selectionBottom(box->m_y + box->m_height)
- {
- }
+ {
+ }
+
void destroy(RenderArena*);
void* operator new(size_t, RenderArena*) throw();
void operator delete(void*, size_t);
@@ -145,6 +156,9 @@ protected:
int m_rightOverflow;
int m_selectionTop;
int m_selectionBottom;
+ // Floats hanging off the line are pushed into this vector during layout. It is only
+ // good for as long as the line has not been marked dirty.
+ Vector<RenderObject*> floats;
private:
void* operator new(size_t) throw();
};
@@ -152,7 +166,7 @@ protected:
Overflow* m_overflow;
// Where this line ended. The exact object and the position within that object are stored so that
- // we can create a BidiIterator beginning just after the end of this line.
+ // we can create an InlineIterator beginning just after the end of this line.
RenderObject* m_lineBreakObj;
unsigned m_lineBreakPos;
RefPtr<BidiContext> m_lineBreakContext;