Commit 3b1a0afb authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Use display item visual rects for scrollbars

Bug: 1104064
Change-Id: Ieeaa46b1167dd029e07dc003f616fdafebe5b52f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304951
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789764}
parent 88c5618b
...@@ -417,10 +417,4 @@ void CustomScrollbar::ClearPaintFlags() { ...@@ -417,10 +417,4 @@ void CustomScrollbar::ClearPaintFlags() {
part.value->ClearPaintFlags(); part.value->ClearPaintFlags();
} }
void CustomScrollbar::SetVisualRect(const IntRect& rect) {
Scrollbar::SetVisualRect(rect);
for (auto& part : parts_)
part.value->GetMutableForPainting().FirstFragment().SetVisualRect(rect);
}
} // namespace blink } // namespace blink
...@@ -73,7 +73,6 @@ class CORE_EXPORT CustomScrollbar final : public Scrollbar { ...@@ -73,7 +73,6 @@ class CORE_EXPORT CustomScrollbar final : public Scrollbar {
void InvalidateDisplayItemClientsOfScrollbarParts(); void InvalidateDisplayItemClientsOfScrollbarParts();
void ClearPaintFlags(); void ClearPaintFlags();
void SetVisualRect(const IntRect&) final;
void Trace(Visitor*) const override; void Trace(Visitor*) const override;
......
...@@ -1794,7 +1794,7 @@ TEST_F(CompositedLayerMappingTest, ...@@ -1794,7 +1794,7 @@ TEST_F(CompositedLayerMappingTest,
ASSERT_TRUE(scrollable_area->VerticalScrollbar()->IsOverlayScrollbar()); ASSERT_TRUE(scrollable_area->VerticalScrollbar()->IsOverlayScrollbar());
ASSERT_FALSE(scrollable_area->NeedsCompositedScrolling()); ASSERT_FALSE(scrollable_area->NeedsCompositedScrolling());
EXPECT_FALSE(scrollable_area->VerticalScrollbar()->VisualRect().IsEmpty()); EXPECT_FALSE(scrollable_area->VerticalScrollbar()->FrameRect().IsEmpty());
GraphicsLayer* vertical_scrollbar_layer = GraphicsLayer* vertical_scrollbar_layer =
scrollable_area->GraphicsLayerForVerticalScrollbar(); scrollable_area->GraphicsLayerForVerticalScrollbar();
......
...@@ -141,7 +141,7 @@ void CustomScrollbarTheme::PaintScrollCorner( ...@@ -141,7 +141,7 @@ void CustomScrollbarTheme::PaintScrollCorner(
return; return;
DrawingRecorder recorder(context, display_item_client, DrawingRecorder recorder(context, display_item_client,
DisplayItem::kScrollCorner); DisplayItem::kScrollCorner, corner_rect);
// FIXME: Implement. // FIXME: Implement.
context.FillRect(corner_rect, Color::kWhite); context.FillRect(corner_rect, Color::kWhite);
} }
......
...@@ -3028,29 +3028,31 @@ void PaintLayerScrollableArea::InvalidatePaintOfScrollControlsIfNeeded( ...@@ -3028,29 +3028,31 @@ void PaintLayerScrollableArea::InvalidatePaintOfScrollControlsIfNeeded(
const PaintInvalidatorContext& context) { const PaintInvalidatorContext& context) {
LayoutBox& box = *GetLayoutBox(); LayoutBox& box = *GetLayoutBox();
bool box_geometry_has_been_invalidated = false; bool box_geometry_has_been_invalidated = false;
SetHorizontalScrollbarVisualRect(InvalidatePaintOfScrollbarIfNeeded( horizontal_scrollbar_visual_rect_ = InvalidatePaintOfScrollbarIfNeeded(
HorizontalScrollbar(), GraphicsLayerForHorizontalScrollbar(), HorizontalScrollbar(), GraphicsLayerForHorizontalScrollbar(),
horizontal_scrollbar_previously_was_overlay_, horizontal_scrollbar_previously_was_overlay_,
horizontal_scrollbar_visual_rect_, horizontal_scrollbar_visual_rect_,
HorizontalScrollbarNeedsPaintInvalidation(), box, HorizontalScrollbarNeedsPaintInvalidation(), box,
box_geometry_has_been_invalidated, context)); box_geometry_has_been_invalidated, context);
SetVerticalScrollbarVisualRect(InvalidatePaintOfScrollbarIfNeeded( vertical_scrollbar_visual_rect_ = InvalidatePaintOfScrollbarIfNeeded(
VerticalScrollbar(), GraphicsLayerForVerticalScrollbar(), VerticalScrollbar(), GraphicsLayerForVerticalScrollbar(),
vertical_scrollbar_previously_was_overlay_, vertical_scrollbar_previously_was_overlay_,
vertical_scrollbar_visual_rect_, vertical_scrollbar_visual_rect_,
VerticalScrollbarNeedsPaintInvalidation(), box, VerticalScrollbarNeedsPaintInvalidation(), box,
box_geometry_has_been_invalidated, context)); box_geometry_has_been_invalidated, context);
IntRect scroll_corner_and_resizer_visual_rect = ScrollCornerAndResizerRect(); IntRect new_scroll_corner_and_resizer_visual_rect =
ScrollCornerAndResizerRect();
// TODO(crbug.com/1020913): We should not round paint_offset but should // TODO(crbug.com/1020913): We should not round paint_offset but should
// consider subpixel accumulation when painting scrollbars. // consider subpixel accumulation when painting scrollbars.
scroll_corner_and_resizer_visual_rect.MoveBy( new_scroll_corner_and_resizer_visual_rect.MoveBy(
RoundedIntPoint(context.fragment_data->PaintOffset())); RoundedIntPoint(context.fragment_data->PaintOffset()));
if (ScrollControlNeedsPaintInvalidation( if (ScrollControlNeedsPaintInvalidation(
scroll_corner_and_resizer_visual_rect, new_scroll_corner_and_resizer_visual_rect,
scroll_corner_and_resizer_visual_rect_, scroll_corner_and_resizer_visual_rect_,
ScrollCornerNeedsPaintInvalidation())) { ScrollCornerNeedsPaintInvalidation())) {
SetScrollCornerAndResizerVisualRect(scroll_corner_and_resizer_visual_rect); scroll_corner_and_resizer_visual_rect_ =
new_scroll_corner_and_resizer_visual_rect;
if (LayoutCustomScrollbarPart* scroll_corner = ScrollCorner()) { if (LayoutCustomScrollbarPart* scroll_corner = ScrollCorner()) {
ObjectPaintInvalidator(*scroll_corner) ObjectPaintInvalidator(*scroll_corner)
.SlowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient( .SlowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(
...@@ -3072,29 +3074,6 @@ void PaintLayerScrollableArea::InvalidatePaintOfScrollControlsIfNeeded( ...@@ -3072,29 +3074,6 @@ void PaintLayerScrollableArea::InvalidatePaintOfScrollControlsIfNeeded(
ClearNeedsPaintInvalidationForScrollControls(); ClearNeedsPaintInvalidationForScrollControls();
} }
void PaintLayerScrollableArea::SetHorizontalScrollbarVisualRect(
const IntRect& rect) {
horizontal_scrollbar_visual_rect_ = rect;
if (Scrollbar* scrollbar = HorizontalScrollbar())
scrollbar->SetVisualRect(rect);
}
void PaintLayerScrollableArea::SetVerticalScrollbarVisualRect(
const IntRect& rect) {
vertical_scrollbar_visual_rect_ = rect;
if (Scrollbar* scrollbar = VerticalScrollbar())
scrollbar->SetVisualRect(rect);
}
void PaintLayerScrollableArea::SetScrollCornerAndResizerVisualRect(
const IntRect& rect) {
scroll_corner_and_resizer_visual_rect_ = rect;
if (LayoutCustomScrollbarPart* scroll_corner = ScrollCorner())
scroll_corner->GetMutableForPainting().FirstFragment().SetVisualRect(rect);
if (LayoutCustomScrollbarPart* resizer = Resizer())
resizer->GetMutableForPainting().FirstFragment().SetVisualRect(rect);
}
void PaintLayerScrollableArea::ScrollControlWasSetNeedsPaintInvalidation() { void PaintLayerScrollableArea::ScrollControlWasSetNeedsPaintInvalidation() {
GetLayoutBox()->SetShouldCheckForPaintInvalidation(); GetLayoutBox()->SetShouldCheckForPaintInvalidation();
} }
...@@ -3228,11 +3207,6 @@ PaintLayerScrollableArea::ScrollingBackgroundDisplayItemClient::OwnerNodeId() ...@@ -3228,11 +3207,6 @@ PaintLayerScrollableArea::ScrollingBackgroundDisplayItemClient::OwnerNodeId()
->OwnerNodeId(); ->OwnerNodeId();
} }
IntRect PaintLayerScrollableArea::ScrollCornerDisplayItemClient::VisualRect()
const {
return scrollable_area_->scroll_corner_and_resizer_visual_rect_;
}
String PaintLayerScrollableArea::ScrollCornerDisplayItemClient::DebugName() String PaintLayerScrollableArea::ScrollCornerDisplayItemClient::DebugName()
const { const {
return "Scroll corner of " + scrollable_area_->GetLayoutBox()->DebugName(); return "Scroll corner of " + scrollable_area_->GetLayoutBox()->DebugName();
......
...@@ -675,10 +675,6 @@ class CORE_EXPORT PaintLayerScrollableArea final ...@@ -675,10 +675,6 @@ class CORE_EXPORT PaintLayerScrollableArea final
void ScrollControlWasSetNeedsPaintInvalidation() override; void ScrollControlWasSetNeedsPaintInvalidation() override;
void SetHorizontalScrollbarVisualRect(const IntRect&);
void SetVerticalScrollbarVisualRect(const IntRect&);
void SetScrollCornerAndResizerVisualRect(const IntRect&);
bool HasNonCompositedStickyDescendants() const; bool HasNonCompositedStickyDescendants() const;
IntSize PixelSnappedBorderBoxSize() const; IntSize PixelSnappedBorderBoxSize() const;
...@@ -799,7 +795,6 @@ class CORE_EXPORT PaintLayerScrollableArea final ...@@ -799,7 +795,6 @@ class CORE_EXPORT PaintLayerScrollableArea final
void Trace(Visitor* visitor) const { visitor->Trace(scrollable_area_); } void Trace(Visitor* visitor) const { visitor->Trace(scrollable_area_); }
private: private:
IntRect VisualRect() const final;
String DebugName() const final; String DebugName() const final;
DOMNodeId OwnerNodeId() const final; DOMNodeId OwnerNodeId() const final;
......
...@@ -29,17 +29,18 @@ void ScrollableAreaPainter::PaintResizer(GraphicsContext& context, ...@@ -29,17 +29,18 @@ void ScrollableAreaPainter::PaintResizer(GraphicsContext& context,
if (!GetScrollableArea().GetLayoutBox()->StyleRef().HasResize()) if (!GetScrollableArea().GetLayoutBox()->StyleRef().HasResize())
return; return;
IntRect abs_rect = GetScrollableArea().ResizerCornerRect(kResizerForPointer); IntRect visual_rect =
if (abs_rect.IsEmpty()) GetScrollableArea().ResizerCornerRect(kResizerForPointer);
if (visual_rect.IsEmpty())
return; return;
abs_rect.MoveBy(paint_offset); visual_rect.MoveBy(paint_offset);
const auto& client = DisplayItemClientForCorner(); const auto& client = DisplayItemClientForCorner();
if (const auto* resizer = GetScrollableArea().Resizer()) { if (const auto* resizer = GetScrollableArea().Resizer()) {
if (!cull_rect.Intersects(abs_rect)) if (!cull_rect.Intersects(visual_rect))
return; return;
CustomScrollbarTheme::PaintIntoRect(*resizer, context, CustomScrollbarTheme::PaintIntoRect(*resizer, context,
PhysicalRect(abs_rect)); PhysicalRect(visual_rect));
return; return;
} }
...@@ -47,16 +48,16 @@ void ScrollableAreaPainter::PaintResizer(GraphicsContext& context, ...@@ -47,16 +48,16 @@ void ScrollableAreaPainter::PaintResizer(GraphicsContext& context,
DisplayItem::kResizer)) DisplayItem::kResizer))
return; return;
DrawingRecorder recorder(context, client, DisplayItem::kResizer); DrawingRecorder recorder(context, client, DisplayItem::kResizer, visual_rect);
DrawPlatformResizerImage(context, abs_rect); DrawPlatformResizerImage(context, visual_rect);
// Draw a frame around the resizer (1px grey line) if there are any scrollbars // Draw a frame around the resizer (1px grey line) if there are any scrollbars
// present. Clipping will exclude the right and bottom edges of this frame. // present. Clipping will exclude the right and bottom edges of this frame.
if (GetScrollableArea().HasNonOverlayOverflowControls()) { if (GetScrollableArea().HasNonOverlayOverflowControls()) {
GraphicsContextStateSaver state_saver(context); GraphicsContextStateSaver state_saver(context);
context.Clip(abs_rect); context.Clip(visual_rect);
IntRect larger_corner = abs_rect; IntRect larger_corner = visual_rect;
larger_corner.SetSize( larger_corner.SetSize(
IntSize(larger_corner.Width() + 1, larger_corner.Height() + 1)); IntSize(larger_corner.Width() + 1, larger_corner.Height() + 1));
context.SetStrokeColor(Color(217, 217, 217)); context.SetStrokeColor(Color(217, 217, 217));
...@@ -195,9 +196,9 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context, ...@@ -195,9 +196,9 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context,
const CullRect& cull_rect) { const CullRect& cull_rect) {
// TODO(crbug.com/1020913): We should not round paint_offset but should // TODO(crbug.com/1020913): We should not round paint_offset but should
// consider subpixel accumulation when painting scrollbars. // consider subpixel accumulation when painting scrollbars.
IntRect rect = scrollbar.FrameRect(); IntRect visual_rect = scrollbar.FrameRect();
rect.MoveBy(paint_offset); visual_rect.MoveBy(paint_offset);
if (!cull_rect.Intersects(rect)) if (!cull_rect.Intersects(visual_rect))
return; return;
if (scrollbar.IsCustomScrollbar()) { if (scrollbar.IsCustomScrollbar()) {
...@@ -206,7 +207,7 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context, ...@@ -206,7 +207,7 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context,
// Prevent composited scroll hit test on the custom scrollbar which always // Prevent composited scroll hit test on the custom scrollbar which always
// need main thread scrolling. // need main thread scrolling.
context.GetPaintController().RecordScrollHitTestData( context.GetPaintController().RecordScrollHitTestData(
scrollbar, DisplayItem::kCustomScrollbarHitTest, nullptr, rect); scrollbar, DisplayItem::kCustomScrollbarHitTest, nullptr, visual_rect);
return; return;
} }
...@@ -232,23 +233,23 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context, ...@@ -232,23 +233,23 @@ void ScrollableAreaPainter::PaintScrollbar(GraphicsContext& context,
} }
auto delegate = base::MakeRefCounted<ScrollbarLayerDelegate>( auto delegate = base::MakeRefCounted<ScrollbarLayerDelegate>(
scrollbar, context.DeviceScaleFactor()); scrollbar, context.DeviceScaleFactor());
ScrollbarDisplayItem::Record(context, scrollbar, type, delegate, rect, ScrollbarDisplayItem::Record(context, scrollbar, type, delegate, visual_rect,
scroll_translation, scrollbar.GetElementId()); scroll_translation, scrollbar.GetElementId());
} }
void ScrollableAreaPainter::PaintScrollCorner(GraphicsContext& context, void ScrollableAreaPainter::PaintScrollCorner(GraphicsContext& context,
const IntPoint& paint_offset, const IntPoint& paint_offset,
const CullRect& cull_rect) { const CullRect& cull_rect) {
IntRect abs_rect = GetScrollableArea().ScrollCornerRect(); IntRect visual_rect = GetScrollableArea().ScrollCornerRect();
if (abs_rect.IsEmpty()) if (visual_rect.IsEmpty())
return; return;
abs_rect.MoveBy(paint_offset); visual_rect.MoveBy(paint_offset);
if (const auto* scroll_corner = GetScrollableArea().ScrollCorner()) { if (const auto* scroll_corner = GetScrollableArea().ScrollCorner()) {
if (!cull_rect.Intersects(abs_rect)) if (!cull_rect.Intersects(visual_rect))
return; return;
CustomScrollbarTheme::PaintIntoRect(*scroll_corner, context, CustomScrollbarTheme::PaintIntoRect(*scroll_corner, context,
PhysicalRect(abs_rect)); PhysicalRect(visual_rect));
return; return;
} }
...@@ -269,7 +270,7 @@ void ScrollableAreaPainter::PaintScrollCorner(GraphicsContext& context, ...@@ -269,7 +270,7 @@ void ScrollableAreaPainter::PaintScrollCorner(GraphicsContext& context,
const auto& client = DisplayItemClientForCorner(); const auto& client = DisplayItemClientForCorner();
theme->PaintScrollCorner(context, GetScrollableArea().VerticalScrollbar(), theme->PaintScrollCorner(context, GetScrollableArea().VerticalScrollbar(),
client, abs_rect, client, visual_rect,
GetScrollableArea().UsedColorScheme()); GetScrollableArea().UsedColorScheme());
} }
......
...@@ -170,14 +170,11 @@ class CORE_EXPORT Scrollbar : public GarbageCollected<Scrollbar>, ...@@ -170,14 +170,11 @@ class CORE_EXPORT Scrollbar : public GarbageCollected<Scrollbar>,
bool ThumbNeedsRepaint() const { return thumb_needs_repaint_; } bool ThumbNeedsRepaint() const { return thumb_needs_repaint_; }
void ClearThumbNeedsRepaint() { thumb_needs_repaint_ = false; } void ClearThumbNeedsRepaint() { thumb_needs_repaint_ = false; }
// DisplayItemClient methods. // DisplayItemClient.
String DebugName() const final { String DebugName() const final {
return orientation_ == kHorizontalScrollbar ? "HorizontalScrollbar" return orientation_ == kHorizontalScrollbar ? "HorizontalScrollbar"
: "VerticalScrollbar"; : "VerticalScrollbar";
} }
IntRect VisualRect() const final { return visual_rect_; }
virtual void SetVisualRect(const IntRect& r) { visual_rect_ = r; }
// Marks the scrollbar as needing to be redrawn. // Marks the scrollbar as needing to be redrawn.
// //
...@@ -263,7 +260,6 @@ class CORE_EXPORT Scrollbar : public GarbageCollected<Scrollbar>, ...@@ -263,7 +260,6 @@ class CORE_EXPORT Scrollbar : public GarbageCollected<Scrollbar>,
// additional state is necessary. // additional state is necessary.
bool scrollbar_manipulation_in_progress_on_cc_thread_; bool scrollbar_manipulation_in_progress_on_cc_thread_;
IntRect visual_rect_;
IntRect frame_rect_; IntRect frame_rect_;
Member<Element> style_source_; Member<Element> style_source_;
}; };
......
...@@ -118,7 +118,7 @@ void ScrollbarTheme::PaintScrollCorner( ...@@ -118,7 +118,7 @@ void ScrollbarTheme::PaintScrollCorner(
return; return;
DrawingRecorder recorder(context, display_item_client, DrawingRecorder recorder(context, display_item_client,
DisplayItem::kScrollCorner); DisplayItem::kScrollCorner, corner_rect);
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
context.FillRect(corner_rect, Color::kWhite); context.FillRect(corner_rect, Color::kWhite);
#else #else
...@@ -148,8 +148,8 @@ void ScrollbarTheme::PaintTickmarks(GraphicsContext& context, ...@@ -148,8 +148,8 @@ void ScrollbarTheme::PaintTickmarks(GraphicsContext& context,
context, scrollbar, DisplayItem::kScrollbarTickmarks)) context, scrollbar, DisplayItem::kScrollbarTickmarks))
return; return;
DrawingRecorder recorder(context, scrollbar, DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarTickmarks,
DisplayItem::kScrollbarTickmarks); rect);
GraphicsContextStateSaver state_saver(context); GraphicsContextStateSaver state_saver(context);
context.SetShouldAntialias(false); context.SetShouldAntialias(false);
...@@ -308,8 +308,10 @@ void ScrollbarTheme::PaintTrackAndButtons(GraphicsContext& context, ...@@ -308,8 +308,10 @@ void ScrollbarTheme::PaintTrackAndButtons(GraphicsContext& context,
if (DrawingRecorder::UseCachedDrawingIfPossible( if (DrawingRecorder::UseCachedDrawingIfPossible(
context, scrollbar, DisplayItem::kScrollbarTrackAndButtons)) context, scrollbar, DisplayItem::kScrollbarTrackAndButtons))
return; return;
IntRect visual_rect = scrollbar.FrameRect();
visual_rect.MoveBy(offset);
DrawingRecorder recorder(context, scrollbar, DrawingRecorder recorder(context, scrollbar,
DisplayItem::kScrollbarTrackAndButtons); DisplayItem::kScrollbarTrackAndButtons, visual_rect);
if (HasButtons(scrollbar)) { if (HasButtons(scrollbar)) {
IntRect back_button_rect = BackButtonRect(scrollbar); IntRect back_button_rect = BackButtonRect(scrollbar);
......
...@@ -260,7 +260,7 @@ void ScrollbarThemeAura::PaintThumb(GraphicsContext& gc, ...@@ -260,7 +260,7 @@ void ScrollbarThemeAura::PaintThumb(GraphicsContext& gc,
DisplayItem::kScrollbarThumb)) DisplayItem::kScrollbarThumb))
return; return;
DrawingRecorder recorder(gc, scrollbar, DisplayItem::kScrollbarThumb); DrawingRecorder recorder(gc, scrollbar, DisplayItem::kScrollbarThumb, rect);
WebThemeEngine::State state; WebThemeEngine::State state;
cc::PaintCanvas* canvas = gc.Canvas(); cc::PaintCanvas* canvas = gc.Canvas();
......
...@@ -311,7 +311,7 @@ void ScrollbarThemeMac::PaintScrollCorner(GraphicsContext& context, ...@@ -311,7 +311,7 @@ void ScrollbarThemeMac::PaintScrollCorner(GraphicsContext& context,
DisplayItem::kScrollCorner)) { DisplayItem::kScrollCorner)) {
return; return;
} }
DrawingRecorder recorder(context, item, DisplayItem::kScrollCorner); DrawingRecorder recorder(context, item, DisplayItem::kScrollCorner, rect);
GraphicsContextStateSaver state_saver(context); GraphicsContextStateSaver state_saver(context);
context.Translate(rect.X(), rect.Y()); context.Translate(rect.X(), rect.Y());
...@@ -332,7 +332,8 @@ void ScrollbarThemeMac::PaintThumbInternal(GraphicsContext& context, ...@@ -332,7 +332,8 @@ void ScrollbarThemeMac::PaintThumbInternal(GraphicsContext& context,
context, scrollbar, DisplayItem::kScrollbarThumb)) { context, scrollbar, DisplayItem::kScrollbarThumb)) {
return; return;
} }
DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb); DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb,
rect);
GraphicsContextStateSaver state_saver(context); GraphicsContextStateSaver state_saver(context);
context.Translate(rect.X(), rect.Y()); context.Translate(rect.X(), rect.Y());
......
...@@ -149,7 +149,8 @@ void ScrollbarThemeOverlay::PaintThumb(GraphicsContext& context, ...@@ -149,7 +149,8 @@ void ScrollbarThemeOverlay::PaintThumb(GraphicsContext& context,
DisplayItem::kScrollbarThumb)) DisplayItem::kScrollbarThumb))
return; return;
DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb); DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb,
rect);
WebThemeEngine::State state = WebThemeEngine::kStateNormal; WebThemeEngine::State state = WebThemeEngine::kStateNormal;
......
...@@ -58,7 +58,8 @@ void ScrollbarThemeOverlayMobile::PaintThumb(GraphicsContext& context, ...@@ -58,7 +58,8 @@ void ScrollbarThemeOverlayMobile::PaintThumb(GraphicsContext& context,
DisplayItem::kScrollbarThumb)) DisplayItem::kScrollbarThumb))
return; return;
DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb); DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb,
rect);
context.FillRect(rect, color_); context.FillRect(rect, color_);
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"contentsOpaque": true, "contentsOpaque": true,
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"invalidations": [ "invalidations": [
[193, 100, 7, 200] [193, 104, 3, 96]
] ]
} }
] ]
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"contentsOpaque": true, "contentsOpaque": true,
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"invalidations": [ "invalidations": [
[193, 100, 7, 200] [193, 104, 3, 96]
] ]
} }
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment