Commit afb269d4 authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Clean up BoxPainterBase

Refactor and clean up BoxPainterBase to improve legibility and to reduce
code duplication.

Bug: 714962
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib738b19e62117046391a9c7b45dcddd1c2ecbb23
Reviewed-on: https://chromium-review.googlesource.com/1060568Reviewed-by: default avatarStefan Zager <szager@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558910}
parent 5ab0c625
......@@ -143,31 +143,7 @@ class BoxPainterBase {
};
protected:
FloatRoundedRect BackgroundRoundedRectAdjustedForBleedAvoidance(
const LayoutRect& border_rect,
bool flow_box_has_multiple_fragments,
const LayoutSize& flow_box_size,
bool include_logical_left_edge,
bool include_logical_right_edge,
FloatRoundedRect background_rounded_rect) const;
FloatRoundedRect RoundedBorderRectForClip(
const FillLayerInfo&,
const FillLayer&,
const LayoutRect&,
bool flow_box_has_multiple_fragments,
const LayoutSize& flow_box_size,
BackgroundBleedAvoidance,
LayoutRectOutsets border_padding_insets) const;
void PaintFillLayerBackground(GraphicsContext&,
const FillLayerInfo&,
Image*,
SkBlendMode,
const BackgroundImageGeometry&,
LayoutRect scrolled_paint_rect);
LayoutRectOutsets BorderOutsets(const FillLayerInfo&) const;
LayoutRectOutsets PaddingOutsets(const FillLayerInfo&) const;
void PaintFillLayerTextFillBox(GraphicsContext&,
const FillLayerInfo&,
Image*,
......@@ -186,13 +162,6 @@ class BoxPainterBase {
virtual FillLayerInfo GetFillLayerInfo(const Color&,
const FillLayer&,
BackgroundBleedAvoidance) const = 0;
FloatRoundedRect GetBackgroundRoundedRect(
const LayoutRect& border_rect,
bool flow_box_has_multiple_fragments,
const LayoutSize& flow_box_size,
bool include_logical_left_edge,
bool include_logical_right_edge) const;
static void PaintInsetBoxShadow(const PaintInfo&,
const FloatRoundedRect&,
const ComputedStyle&,
......@@ -204,8 +173,8 @@ class BoxPainterBase {
Member<const Document> document_;
const ComputedStyle& style_;
Member<Node> node_;
LayoutRectOutsets border_;
LayoutRectOutsets padding_;
const LayoutRectOutsets border_;
const LayoutRectOutsets padding_;
const PaintLayer* paint_layer_;
};
......
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