diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp b/chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp index a3aaeacba69..4ea0ba701ef 100644 --- a/chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp +++ b/chromium/third_party/WebKit/Source/core/rendering/RenderScrollbar.cpp @@ -27,20 +27,21 @@ #include "core/rendering/RenderScrollbar.h" #include "core/css/PseudoStyleRequest.h" -#include "core/frame/Frame.h" #include "core/frame/FrameView.h" +#include "core/frame/LocalFrame.h" #include "core/rendering/RenderPart.h" #include "core/rendering/RenderScrollbarPart.h" #include "core/rendering/RenderScrollbarTheme.h" +#include "platform/graphics/GraphicsContext.h" namespace WebCore { -PassRefPtr<Scrollbar> RenderScrollbar::createCustomScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, Frame* owningFrame) +PassRefPtr<Scrollbar> RenderScrollbar::createCustomScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, LocalFrame* owningFrame) { return adoptRef(new RenderScrollbar(scrollableArea, orientation, ownerNode, owningFrame)); } -RenderScrollbar::RenderScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, Frame* owningFrame) +RenderScrollbar::RenderScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, LocalFrame* owningFrame) : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme()) , m_owner(ownerNode) , m_owningFrame(owningFrame) @@ -148,7 +149,7 @@ void RenderScrollbar::setPressedPart(ScrollbarPart part) PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart partType, PseudoId pseudoId) { if (!owningRenderer()) - return 0; + return nullptr; RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(PseudoStyleRequest(pseudoId, this, partType), owningRenderer()->style()); // Scrollbars for root frames should always have background color @@ -156,7 +157,7 @@ PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p // This is because WebKit assumes scrollbar to be always painted and missing background // causes visual artifact like non-repainted dirty region. if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view()->isTransparent() && !result->hasBackground()) - result->setBackgroundColor(Color::white); + result->setBackgroundColor(StyleColor(Color::white)); return result; } @@ -223,9 +224,9 @@ void RenderScrollbar::updateScrollbarPart(ScrollbarPart partType, bool destroy) if (partType == NoPart) return; - RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(0); + RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(nullptr); - bool needRenderer = !destroy && partStyle && partStyle->display() != NONE && partStyle->visibility() == VISIBLE; + bool needRenderer = !destroy && partStyle && partStyle->display() != NONE; if (needRenderer && partStyle->display() != BLOCK) { // See if we are a button that should not be visible according to OS settings. |