Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8de0e15e
Unverified
Commit
8de0e15e
authored
Aug 15, 2018
by
Jonah Williams
Committed by
GitHub
Aug 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert to defaultClipBehavior (#20578)
parent
f8a5c861
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
23 deletions
+32
-23
button.dart
packages/flutter/lib/src/material/button.dart
+3
-2
material.dart
packages/flutter/lib/src/material/material.dart
+4
-2
outline_button.dart
packages/flutter/lib/src/material/outline_button.dart
+4
-2
raised_button.dart
packages/flutter/lib/src/material/raised_button.dart
+4
-2
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+2
-2
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+4
-4
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+3
-3
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+3
-1
buttons_test.dart
packages/flutter/test/material/buttons_test.dart
+1
-1
material_test.dart
packages/flutter/test/material/material_test.dart
+1
-1
outline_button_test.dart
packages/flutter/test/material/outline_button_test.dart
+1
-1
clip_test.dart
packages/flutter/test/widgets/clip_test.dart
+2
-2
No files found.
packages/flutter/lib/src/material/button.dart
View file @
8de0e15e
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:math'
as
math
;
import
'dart:math'
as
math
;
import
'dart:ui'
as
ui
show
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -46,7 +47,7 @@ class RawMaterialButton extends StatefulWidget {
...
@@ -46,7 +47,7 @@ class RawMaterialButton extends StatefulWidget {
this
.
constraints
=
const
BoxConstraints
(
minWidth:
88.0
,
minHeight:
36.0
),
this
.
constraints
=
const
BoxConstraints
(
minWidth:
88.0
,
minHeight:
36.0
),
this
.
shape
=
const
RoundedRectangleBorder
(),
this
.
shape
=
const
RoundedRectangleBorder
(),
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
MaterialTapTargetSize
materialTapTargetSize
,
MaterialTapTargetSize
materialTapTargetSize
,
this
.
child
,
this
.
child
,
})
:
this
.
materialTapTargetSize
=
materialTapTargetSize
??
MaterialTapTargetSize
.
padded
,
})
:
this
.
materialTapTargetSize
=
materialTapTargetSize
??
MaterialTapTargetSize
.
padded
,
...
@@ -267,7 +268,7 @@ class MaterialButton extends StatelessWidget {
...
@@ -267,7 +268,7 @@ class MaterialButton extends StatelessWidget {
this
.
height
,
this
.
height
,
this
.
padding
,
this
.
padding
,
this
.
materialTapTargetSize
,
this
.
materialTapTargetSize
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
@required
this
.
onPressed
,
@required
this
.
onPressed
,
this
.
child
this
.
child
})
:
assert
(
clipBehavior
!=
null
),
super
(
key:
key
);
})
:
assert
(
clipBehavior
!=
null
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/material/material.dart
View file @
8de0e15e
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:ui'
as
ui
show
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -172,7 +174,7 @@ class Material extends StatefulWidget {
...
@@ -172,7 +174,7 @@ class Material extends StatefulWidget {
this
.
textStyle
,
this
.
textStyle
,
this
.
borderRadius
,
this
.
borderRadius
,
this
.
shape
,
this
.
shape
,
this
.
clipBehavior
=
Clip
.
none
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_use
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
child
,
this
.
child
,
})
:
assert
(
type
!=
null
),
})
:
assert
(
type
!=
null
),
...
@@ -598,7 +600,7 @@ class _MaterialInterior extends ImplicitlyAnimatedWidget {
...
@@ -598,7 +600,7 @@ class _MaterialInterior extends ImplicitlyAnimatedWidget {
Key
key
,
Key
key
,
@required
this
.
child
,
@required
this
.
child
,
@required
this
.
shape
,
@required
this
.
shape
,
this
.
clipBehavior
=
Clip
.
none
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_use
@required
this
.
elevation
,
@required
this
.
elevation
,
@required
this
.
color
,
@required
this
.
color
,
@required
this
.
shadowColor
,
@required
this
.
shadowColor
,
...
...
packages/flutter/lib/src/material/outline_button.dart
View file @
8de0e15e
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:ui'
as
ui
show
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -68,7 +70,7 @@ class OutlineButton extends StatefulWidget {
...
@@ -68,7 +70,7 @@ class OutlineButton extends StatefulWidget {
this
.
highlightedBorderColor
,
this
.
highlightedBorderColor
,
this
.
padding
,
this
.
padding
,
this
.
shape
,
this
.
shape
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
this
.
child
,
this
.
child
,
})
:
assert
(
highlightElevation
!=
null
&&
highlightElevation
>=
0.0
),
})
:
assert
(
highlightElevation
!=
null
&&
highlightElevation
>=
0.0
),
assert
(
clipBehavior
!=
null
),
assert
(
clipBehavior
!=
null
),
...
@@ -96,7 +98,7 @@ class OutlineButton extends StatefulWidget {
...
@@ -96,7 +98,7 @@ class OutlineButton extends StatefulWidget {
this
.
disabledBorderColor
,
this
.
disabledBorderColor
,
this
.
highlightedBorderColor
,
this
.
highlightedBorderColor
,
this
.
shape
,
this
.
shape
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
@required
Widget
icon
,
@required
Widget
icon
,
@required
Widget
label
,
@required
Widget
label
,
})
:
assert
(
highlightElevation
!=
null
&&
highlightElevation
>=
0.0
),
})
:
assert
(
highlightElevation
!=
null
&&
highlightElevation
>=
0.0
),
...
...
packages/flutter/lib/src/material/raised_button.dart
View file @
8de0e15e
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:ui'
as
ui
show
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/widgets.dart'
;
...
@@ -63,7 +65,7 @@ class RaisedButton extends StatelessWidget {
...
@@ -63,7 +65,7 @@ class RaisedButton extends StatelessWidget {
this
.
disabledElevation
=
0.0
,
this
.
disabledElevation
=
0.0
,
this
.
padding
,
this
.
padding
,
this
.
shape
,
this
.
shape
,
this
.
clipBehavior
=
Clip
.
none
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_use
this
.
materialTapTargetSize
,
this
.
materialTapTargetSize
,
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
child
,
this
.
child
,
...
@@ -98,7 +100,7 @@ class RaisedButton extends StatelessWidget {
...
@@ -98,7 +100,7 @@ class RaisedButton extends StatelessWidget {
this
.
highlightElevation
=
8.0
,
this
.
highlightElevation
=
8.0
,
this
.
disabledElevation
=
0.0
,
this
.
disabledElevation
=
0.0
,
this
.
shape
,
this
.
shape
,
this
.
clipBehavior
=
Clip
.
none
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_use
this
.
materialTapTargetSize
,
this
.
materialTapTargetSize
,
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
animationDuration
=
kThemeChangeDuration
,
@required
Widget
icon
,
@required
Widget
icon
,
...
...
packages/flutter/lib/src/rendering/layer.dart
View file @
8de0e15e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
import
'dart:async'
;
import
'dart:async'
;
import
'dart:collection'
;
import
'dart:collection'
;
import
'dart:ui'
as
ui
show
Image
,
ImageFilter
,
Picture
,
Scene
,
SceneBuilder
;
import
'dart:ui'
as
ui
show
Image
,
ImageFilter
,
Picture
,
Scene
,
SceneBuilder
,
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/painting.dart'
;
import
'package:flutter/painting.dart'
;
...
@@ -970,7 +970,7 @@ class PhysicalModelLayer extends ContainerLayer {
...
@@ -970,7 +970,7 @@ class PhysicalModelLayer extends ContainerLayer {
/// The [clipPath], [elevation], and [color] arguments must not be null.
/// The [clipPath], [elevation], and [color] arguments must not be null.
PhysicalModelLayer
({
PhysicalModelLayer
({
@required
this
.
clipPath
,
@required
this
.
clipPath
,
this
.
clipBehavior
=
Clip
.
none
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_use
@required
this
.
elevation
,
@required
this
.
elevation
,
@required
this
.
color
,
@required
this
.
color
,
@required
this
.
shadowColor
,
@required
this
.
shadowColor
,
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
8de0e15e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
import
'dart:async'
;
import
'dart:async'
;
import
'dart:ui'
as
ui
show
ImageFilter
,
Gradient
,
Image
;
import
'dart:ui'
as
ui
show
ImageFilter
,
Gradient
,
Image
,
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/animation.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
...
@@ -1501,7 +1501,7 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> {
...
@@ -1501,7 +1501,7 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> {
@required
double
elevation
,
@required
double
elevation
,
@required
Color
color
,
@required
Color
color
,
@required
Color
shadowColor
,
@required
Color
shadowColor
,
Clip
clipBehavior
=
Clip
.
non
e
,
Clip
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
CustomClipper
<
T
>
clipper
,
CustomClipper
<
T
>
clipper
,
})
:
assert
(
elevation
!=
null
),
})
:
assert
(
elevation
!=
null
),
assert
(
color
!=
null
),
assert
(
color
!=
null
),
...
@@ -1580,7 +1580,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
...
@@ -1580,7 +1580,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
RenderPhysicalModel
({
RenderPhysicalModel
({
RenderBox
child
,
RenderBox
child
,
BoxShape
shape
=
BoxShape
.
rectangle
,
BoxShape
shape
=
BoxShape
.
rectangle
,
Clip
clipBehavior
=
Clip
.
non
e
,
Clip
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
BorderRadius
borderRadius
,
BorderRadius
borderRadius
,
double
elevation
=
0.0
,
double
elevation
=
0.0
,
@required
Color
color
,
@required
Color
color
,
...
@@ -1739,7 +1739,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
...
@@ -1739,7 +1739,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
RenderPhysicalShape
({
RenderPhysicalShape
({
RenderBox
child
,
RenderBox
child
,
@required
CustomClipper
<
Path
>
clipper
,
@required
CustomClipper
<
Path
>
clipper
,
Clip
clipBehavior
=
Clip
.
non
e
,
Clip
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
double
elevation
=
0.0
,
double
elevation
=
0.0
,
@required
Color
color
,
@required
Color
color
,
Color
shadowColor
=
const
Color
(
0xFF000000
),
Color
shadowColor
=
const
Color
(
0xFF000000
),
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
8de0e15e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:ui'
as
ui
show
Image
,
ImageFilter
;
import
'dart:ui'
as
ui
show
Image
,
ImageFilter
,
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -711,7 +711,7 @@ class PhysicalModel extends SingleChildRenderObjectWidget {
...
@@ -711,7 +711,7 @@ class PhysicalModel extends SingleChildRenderObjectWidget {
const
PhysicalModel
({
const
PhysicalModel
({
Key
key
,
Key
key
,
this
.
shape
=
BoxShape
.
rectangle
,
this
.
shape
=
BoxShape
.
rectangle
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
this
.
borderRadius
,
this
.
borderRadius
,
this
.
elevation
=
0.0
,
this
.
elevation
=
0.0
,
@required
this
.
color
,
@required
this
.
color
,
...
@@ -799,7 +799,7 @@ class PhysicalShape extends SingleChildRenderObjectWidget {
...
@@ -799,7 +799,7 @@ class PhysicalShape extends SingleChildRenderObjectWidget {
const
PhysicalShape
({
const
PhysicalShape
({
Key
key
,
Key
key
,
@required
this
.
clipper
,
@required
this
.
clipper
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
this
.
elevation
=
0.0
,
this
.
elevation
=
0.0
,
@required
this
.
color
,
@required
this
.
color
,
this
.
shadowColor
=
const
Color
(
0xFF000000
),
this
.
shadowColor
=
const
Color
(
0xFF000000
),
...
...
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
8de0e15e
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:ui'
as
ui
show
defaultClipBehavior
;
// ignore: deprecated_member_use
import
'package:flutter/animation.dart'
;
import
'package:flutter/animation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/rendering.dart'
;
...
@@ -1181,7 +1183,7 @@ class AnimatedPhysicalModel extends ImplicitlyAnimatedWidget {
...
@@ -1181,7 +1183,7 @@ class AnimatedPhysicalModel extends ImplicitlyAnimatedWidget {
Key
key
,
Key
key
,
@required
this
.
child
,
@required
this
.
child
,
@required
this
.
shape
,
@required
this
.
shape
,
this
.
clipBehavior
=
Clip
.
non
e
,
this
.
clipBehavior
=
ui
.
defaultClipBehavior
,
// ignore: deprecated_member_us
e,
this
.
borderRadius
=
BorderRadius
.
zero
,
this
.
borderRadius
=
BorderRadius
.
zero
,
@required
this
.
elevation
,
@required
this
.
elevation
,
@required
this
.
color
,
@required
this
.
color
,
...
...
packages/flutter/test/material/buttons_test.dart
View file @
8de0e15e
...
@@ -309,7 +309,7 @@ void main() {
...
@@ -309,7 +309,7 @@ void main() {
tester
.
renderObject
(
find
.
byKey
(
buttonKey
)),
tester
.
renderObject
(
find
.
byKey
(
buttonKey
)),
paintsExactlyCountTimes
(
#clipPath
,
0
)
paintsExactlyCountTimes
(
#clipPath
,
0
)
);
);
});
}
,
skip:
true
);
testWidgets
(
'Disabled MaterialButton has same semantic size as enabled and exposes disabled semantics'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Disabled MaterialButton has same semantic size as enabled and exposes disabled semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
new
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
new
SemanticsTester
(
tester
);
...
...
packages/flutter/test/material/material_test.dart
View file @
8de0e15e
...
@@ -182,7 +182,7 @@ void main() {
...
@@ -182,7 +182,7 @@ void main() {
);
);
expect
(
find
.
byKey
(
materialKey
),
hasNoImmediateClip
);
expect
(
find
.
byKey
(
materialKey
),
hasNoImmediateClip
);
});
}
,
skip:
true
);
testWidgets
(
'clips to bounding rect by default given Clip.antiAlias'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'clips to bounding rect by default given Clip.antiAlias'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
materialKey
=
new
GlobalKey
();
final
GlobalKey
materialKey
=
new
GlobalKey
();
...
...
packages/flutter/test/material/outline_button_test.dart
View file @
8de0e15e
...
@@ -157,7 +157,7 @@ void main() {
...
@@ -157,7 +157,7 @@ void main() {
tester
.
renderObject
(
find
.
byKey
(
buttonKey
)),
tester
.
renderObject
(
find
.
byKey
(
buttonKey
)),
paintsExactlyCountTimes
(
#clipPath
,
0
)
paintsExactlyCountTimes
(
#clipPath
,
0
)
);
);
});
}
,
skip:
true
);
testWidgets
(
'OutlineButton contributes semantics'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'OutlineButton contributes semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
new
SemanticsTester
(
tester
);
final
SemanticsTester
semantics
=
new
SemanticsTester
(
tester
);
...
...
packages/flutter/test/widgets/clip_test.dart
View file @
8de0e15e
...
@@ -534,7 +534,7 @@ void main() {
...
@@ -534,7 +534,7 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalModel.default.png'
),
matchesGoldenFile
(
'clip.PhysicalModel.default.png'
),
);
);
});
}
,
skip:
true
);
Center
genPhysicalShape
(
Clip
clipBehavior
)
{
Center
genPhysicalShape
(
Clip
clipBehavior
)
{
return
new
Center
(
return
new
Center
(
...
@@ -645,5 +645,5 @@ void main() {
...
@@ -645,5 +645,5 @@ void main() {
find
.
byType
(
RepaintBoundary
).
first
,
find
.
byType
(
RepaintBoundary
).
first
,
matchesGoldenFile
(
'clip.PhysicalShape.default.png'
),
matchesGoldenFile
(
'clip.PhysicalShape.default.png'
),
);
);
});
}
,
skip:
true
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment