summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/FlowThreadController.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-23 17:03:15 +0200
commita73d1c176f2f3e0458861de8590dc20321a501ae (patch)
treed897fc5974797c3cb300d7f5916f258df765401f /Source/WebCore/rendering/FlowThreadController.cpp
parentc311cf639cc1d6570d67b0a80a8ba04dc992a658 (diff)
downloadqtwebkit-a73d1c176f2f3e0458861de8590dc20321a501ae.tar.gz
Imported WebKit commit a5ae8a56a48e44ebfb9b81aaa5488affaffdb175 (http://svn.webkit.org/repository/webkit/trunk@126420)
New snapshot with OS X 10.6 build fix
Diffstat (limited to 'Source/WebCore/rendering/FlowThreadController.cpp')
-rw-r--r--Source/WebCore/rendering/FlowThreadController.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/FlowThreadController.cpp b/Source/WebCore/rendering/FlowThreadController.cpp
index dc9432c76..476c924b8 100644
--- a/Source/WebCore/rendering/FlowThreadController.cpp
+++ b/Source/WebCore/rendering/FlowThreadController.cpp
@@ -32,7 +32,9 @@
#include "FlowThreadController.h"
#include "RenderFlowThread.h"
+#include "RenderFlowThreadContainer.h"
#include "RenderNamedFlowThread.h"
+#include "StyleInheritedData.h"
#include "WebKitNamedFlow.h"
#include "WebKitNamedFlowCollection.h"
#include <wtf/text/AtomicString.h>
@@ -47,6 +49,7 @@ PassOwnPtr<FlowThreadController> FlowThreadController::create(RenderView* view)
FlowThreadController::FlowThreadController(RenderView* view)
: m_view(view)
, m_currentRenderFlowThread(0)
+ , m_flowThreadContainer(0)
, m_isRenderNamedFlowThreadOrderDirty(false)
{
}
@@ -57,6 +60,11 @@ FlowThreadController::~FlowThreadController()
RenderNamedFlowThread* FlowThreadController::ensureRenderFlowThreadWithName(const AtomicString& name)
{
+ if (!m_flowThreadContainer) {
+ m_flowThreadContainer = new (m_view->renderArena()) RenderFlowThreadContainer(m_view->document());
+ m_flowThreadContainer->setStyle(RenderFlowThread::createFlowThreadStyle(m_view->style()));
+ m_view->addChild(m_flowThreadContainer);
+ }
if (!m_renderNamedFlowThreadList)
m_renderNamedFlowThreadList = adoptPtr(new RenderNamedFlowThreadList());
else {
@@ -76,14 +84,23 @@ RenderNamedFlowThread* FlowThreadController::ensureRenderFlowThreadWithName(cons
flowRenderer->setStyle(RenderFlowThread::createFlowThreadStyle(m_view->style()));
m_renderNamedFlowThreadList->add(flowRenderer);
- // Keep the flow renderer as a child of RenderView.
- m_view->addChild(flowRenderer);
+ // Keep the flow renderer as a child of RenderFlowThreadContainer.
+ m_flowThreadContainer->addChild(flowRenderer);
setIsRenderNamedFlowThreadOrderDirty(true);
return flowRenderer;
}
+void FlowThreadController::styleDidChange()
+{
+ RenderStyle* viewStyle = m_view->style();
+ for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) {
+ RenderNamedFlowThread* flowRenderer = *iter;
+ flowRenderer->setStyle(RenderFlowThread::createFlowThreadStyle(viewStyle));
+ }
+}
+
void FlowThreadController::layoutRenderNamedFlowThreads()
{
ASSERT(m_renderNamedFlowThreadList);