Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2850173003: Move LengthSizes border-*-radius out of BorderData (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 8440e967d80a6c07f217756695667f63a1db1455..f2649cfb05b1b5b9e926f7f8d338710c9c48de70 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -895,7 +895,7 @@ bool ComputedStyle::DiffNeedsPaintInvalidationObject(
if (Visibility() != other.Visibility() ||
PrintColorAdjust() != other.PrintColorAdjust() ||
InsideLink() != other.InsideLink() ||
- !Border().VisuallyEqual(other.Border()) ||
+ !Border().VisuallyEqual(other.Border()) || !RadiiEqual(other) ||
*background_data_ != *other.background_data_)
return true;
@@ -1396,24 +1396,24 @@ void ComputedStyle::SetBoxShadow(PassRefPtr<ShadowList> s) {
}
static FloatRoundedRect::Radii CalcRadiiFor(const BorderData& border,
+ const LengthSize& top_left,
+ const LengthSize& top_right,
+ const LengthSize& bottom_left,
+ const LengthSize& bottom_right,
LayoutSize size) {
return FloatRoundedRect::Radii(
FloatSize(
- FloatValueForLength(border.TopLeft().Width(), size.Width().ToFloat()),
- FloatValueForLength(border.TopLeft().Height(),
- size.Height().ToFloat())),
- FloatSize(FloatValueForLength(border.TopRight().Width(),
- size.Width().ToFloat()),
- FloatValueForLength(border.TopRight().Height(),
- size.Height().ToFloat())),
- FloatSize(FloatValueForLength(border.BottomLeft().Width(),
- size.Width().ToFloat()),
- FloatValueForLength(border.BottomLeft().Height(),
- size.Height().ToFloat())),
- FloatSize(FloatValueForLength(border.BottomRight().Width(),
- size.Width().ToFloat()),
- FloatValueForLength(border.BottomRight().Height(),
- size.Height().ToFloat())));
+ FloatValueForLength(top_left.Width(), size.Width().ToFloat()),
+ FloatValueForLength(top_left.Height(), size.Height().ToFloat())),
+ FloatSize(
+ FloatValueForLength(top_right.Width(), size.Width().ToFloat()),
+ FloatValueForLength(top_right.Height(), size.Height().ToFloat())),
+ FloatSize(
+ FloatValueForLength(bottom_left.Width(), size.Width().ToFloat()),
+ FloatValueForLength(bottom_left.Height(), size.Height().ToFloat())),
+ FloatSize(
+ FloatValueForLength(bottom_right.Width(), size.Width().ToFloat()),
+ FloatValueForLength(bottom_right.Height(), size.Height().ToFloat())));
}
StyleImage* ComputedStyle::ListStyleImage() const {
@@ -1456,7 +1456,10 @@ FloatRoundedRect ComputedStyle::GetRoundedBorderFor(
bool include_logical_right_edge) const {
FloatRoundedRect rounded_rect(PixelSnappedIntRect(border_rect));
if (HasBorderRadius()) {
- FloatRoundedRect::Radii radii = CalcRadiiFor(Border(), border_rect.Size());
+ FloatRoundedRect::Radii radii =
+ CalcRadiiFor(Border(), BorderTopLeftRadius(), BorderTopRightRadius(),
+ BorderBottomLeftRadius(), BorderBottomRightRadius(),
+ border_rect.Size());
rounded_rect.IncludeLogicalEdges(radii, IsHorizontalWritingMode(),
include_logical_left_edge,
include_logical_right_edge);
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698