Skip to content

Commit 6f50c35

Browse files
committed
LibWeb: Misc. cleanup of code
Some things I came across while working on a bugfix. No functional changes.
1 parent e4de6c0 commit 6f50c35

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

Libraries/LibWeb/Painting/ScrollState.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#pragma once
88

9-
#include <AK/NonnullOwnPtr.h>
109
#include <LibWeb/Painting/ScrollFrame.h>
1110

1211
namespace Web::Painting {

Libraries/LibWeb/SVG/SVGDecodedImageData.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ RefPtr<Gfx::Bitmap> SVGDecodedImageData::render(Gfx::IntSize size) const
105105
if (!display_list)
106106
return {};
107107

108-
auto painting_command_executor_type = m_page_client->display_list_player_type();
109-
switch (painting_command_executor_type) {
108+
switch (m_page_client->display_list_player_type()) {
110109
case DisplayListPlayerType::SkiaGPUIfAvailable:
111110
case DisplayListPlayerType::SkiaCPU: {
112111
auto painting_surface = Gfx::PaintingSurface::wrap_bitmap(*bitmap);

Libraries/LibWeb/SVG/SVGGradientElement.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#pragma once
88

99
#include <AK/IterationDecision.h>
10-
#include <LibGfx/PaintStyle.h>
1110
#include <LibWeb/Painting/PaintStyle.h>
1211
#include <LibWeb/SVG/AttributeParser.h>
1312
#include <LibWeb/SVG/SVGElement.h>

Libraries/LibWeb/SVG/SVGLinearGradientElement.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,12 @@ NumberPercentage SVGLinearGradientElement::end_y_impl(HashTable<SVGGradientEleme
114114

115115
Optional<Painting::PaintStyle> SVGLinearGradientElement::to_gfx_paint_style(SVGPaintContext const& paint_context) const
116116
{
117-
auto units = gradient_units();
118117
// FIXME: Resolve percentages properly
119118
Gfx::FloatPoint start_point {};
120119
Gfx::FloatPoint end_point {};
121120

122121
// https://svgwg.org/svg2-draft/pservers.html#LinearGradientElementGradientUnitsAttribute
123-
if (units == GradientUnits::ObjectBoundingBox) {
122+
if (gradient_units() == GradientUnits::ObjectBoundingBox) {
124123
// If gradientUnits="objectBoundingBox", the user coordinate system for attributes ‘x1’, ‘y1’, ‘x2’ and ‘y2’
125124
// is established using the bounding box of the element to which the gradient is applied (see Object bounding
126125
// box units) and then applying the transform specified by attribute ‘gradientTransform’. Percentages represent

0 commit comments

Comments
 (0)