summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderScrollbarPart.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/rendering/RenderScrollbarPart.cpp
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/rendering/RenderScrollbarPart.cpp')
-rw-r--r--Source/WebCore/rendering/RenderScrollbarPart.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/WebCore/rendering/RenderScrollbarPart.cpp b/Source/WebCore/rendering/RenderScrollbarPart.cpp
index 3eeb1d89f..af8ac3c12 100644
--- a/Source/WebCore/rendering/RenderScrollbarPart.cpp
+++ b/Source/WebCore/rendering/RenderScrollbarPart.cpp
@@ -30,13 +30,14 @@
#include "RenderScrollbar.h"
#include "RenderScrollbarTheme.h"
#include "RenderView.h"
+#include <wtf/StackStats.h>
using namespace std;
namespace WebCore {
-RenderScrollbarPart::RenderScrollbarPart(Node* node, RenderScrollbar* scrollbar, ScrollbarPart part)
- : RenderBlock(node)
+RenderScrollbarPart::RenderScrollbarPart(RenderScrollbar* scrollbar, ScrollbarPart part)
+ : RenderBlock(0)
, m_scrollbar(scrollbar)
, m_part(part)
{
@@ -46,6 +47,13 @@ RenderScrollbarPart::~RenderScrollbarPart()
{
}
+RenderScrollbarPart* RenderScrollbarPart::createAnonymous(Document* document, RenderScrollbar* scrollbar, ScrollbarPart part)
+{
+ RenderScrollbarPart* renderer = new (document->renderArena()) RenderScrollbarPart(scrollbar, part);
+ renderer->setDocumentForAnonymous(document);
+ return renderer;
+}
+
void RenderScrollbarPart::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
@@ -143,7 +151,7 @@ void RenderScrollbarPart::styleDidChange(StyleDifference diff, const RenderStyle
{
RenderBlock::styleDidChange(diff, oldStyle);
setInline(false);
- setPositioned(false);
+ clearPositionedState();
setFloating(false);
setHasOverflowClip(false);
if (oldStyle && m_scrollbar && m_part != NoPart && diff >= StyleDifferenceRepaint)
@@ -177,7 +185,7 @@ void RenderScrollbarPart::paintIntoRect(GraphicsContext* graphicsContext, const
return;
// Now do the paint.
- PaintInfo paintInfo(graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBlockBackground, false, 0, 0, 0);
+ PaintInfo paintInfo(graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBlockBackground, PaintBehaviorNormal);
paint(paintInfo, paintOffset);
paintInfo.phase = PaintPhaseChildBlockBackgrounds;
paint(paintInfo, paintOffset);