96 Commits

Author SHA1 Message Date
Todd Volkert
bc688cf0df
Make constraints a covariant argument in RenderBox.computeDryLayout() (#136432)
Some render box subclasses have a specific layout contract that is tightly coupled with other render box subclasses (e.g. two private classes in a local project file). In these cases, it is also possible that they use a constraints object that is a subclass of `BoxConstraints`. To allow for this, this change makes the `constraints` argument to `RenderBox.computeDryLayout()` a covariant argument.

For completeness' sake, this updates the other render objects in the rendering package to also use the covariant keyword for this argument.
2023-10-13 01:10:29 +00:00
Michael Goderbauer
b0a90aee17
Enable strict-inference (#135043)
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
2023-09-20 19:59:08 +00:00
Kate Lovett
f054f5aa09
Move mock canvas to flutter_test (#131631)
Fixes https://github.com/flutter/flutter/issues/59413

This relocates `mock_canvas.dart` and `recording_canvas.dart` from `flutter/test/rendering` to `flutter_test`. 

The testing functionality afforded by mock_canvas should be available to everyone, not just the framework. :)

mock_canvas.dart needed a bit of cleanup - things like formatting and super parameters.
2023-08-07 23:43:03 +00:00
Michael Goderbauer
5ab5d82a39
Remove AbstractNode from RenderObject and deprecate it (#128973)
It's time to say good bye to an old friend. 
It has outlived its usefulness.
Farewell, AbstractNode! 🫡
2023-06-16 16:16:36 +00:00
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
Greg Price
cd125e1f71
Add test for RenderProxyBoxMixin; clarify doc, resolve TODO (#117664)
* Add test for RenderProxyBoxMixin; clarify doc, resolve TODO

The TODO comment suggested this mixin would no longer be needed once
a Dart issue on inherited constructors was fixed:
  https://github.com/dart-lang/sdk/issues/31543
That issue is now long since fixed, so I went to go carry out the TODO.

But in doing so, I realized that the mixin's documentation was more
right than the TODO comment: even with that issue fixed, there is a
legitimate use case for this mixin, namely to reuse the implementation
of RenderProxyBox in a class that also inherits from some other base
class.  Moreover, searching GitHub I found an example of a library
that makes real use of that capability.

So I think the right resolution is to accept that this separation
is useful and delete the TODO.

Then, add a test with an extremely simplified sketch of that
real-world example.  In case someone in the future attempts to
simplify this mixin away, the test will point us at the use case
that would be broken by such a change.

Also remove the only in-tree use of the mixin, which was redundant;
and expand the mixin's documentation to advise about that case.

* Tweak formatting

Co-authored-by: Michael Goderbauer <goderbauer@google.com>

* Cut comments

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-08 01:17:23 +00:00
Jonah Williams
7e1e840999
[framework] revert removal of opacity (#111202) 2022-09-08 18:33:23 +00:00
Greg Spencer
ee8488e871
Remove warnings when UnconstrainedBox and ConstraintsTransformBox are clipped (#110393) 2022-08-29 17:21:04 +00:00
Tomasz Gucio
16c25caa44
Add RenderRepaintBoundary.toImageSync() method (#108280) 2022-07-27 05:17:04 +00:00
Jonah Williams
d36ecec5b9
[framework] partial removal of forced compositing from opacity (#106989) 2022-07-02 16:49:06 +00:00
Jonah Williams
c12b0de004
remove opacity layer at fully opaque (#106351) 2022-06-21 11:05:24 -07:00
Bruno Leroux
58007fc64c
Fix debugPaintSize throws 'Null Check error' (#106108) 2022-06-17 06:16:06 +00:00
Alexandre Ardhuin
56c4e3cdd8
add some exports of public API in foundation/serialization.dart (#104231) 2022-06-08 13:33:12 -07:00
Zachary Anderson
ac7e29a40f
Revert "remove forced compositing from opacity" (#105489) 2022-06-07 00:43:05 -07:00
Jonah Williams
febc6a14f5
remove forced compositing from opacity (#105334) 2022-06-06 12:13:07 -07:00
Casey Hillers
da105b2b24
Revert "[framework] inline AbstractNode into RenderObject" (#104257) 2022-05-20 11:43:11 -07:00
Jonah Williams
24bd28f696
[framework] inline AbstractNode into RenderObject (#103832) 2022-05-19 14:28:09 -07:00
Dan Field
fe87538b76
Implement paintsChild on RenderObjects that skip painting on their children (#103768) 2022-05-16 11:29:07 -07:00
Dan Field
4f96419612
Make _RenderCustomClip respect clipBehavior (#103748) 2022-05-13 17:14:07 -07:00
Phil Quitslund
bca071815f
rename local functions with _s (#102615) 2022-04-27 09:14:57 -07:00
Jonah Williams
fba9214d11
[framework] remove usage and deprecate physical model layer (#102274) 2022-04-26 16:14:04 -07:00
Jonah Williams
0cb5772e73
[framework] allow other RenderObjects to behave like repaint boundaries (#101952) 2022-04-26 10:19:09 -07:00
Michael Goderbauer
51bcdb9407
super parameters for framework (#100905) 2022-04-13 22:38:40 -07:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. (#89451) 2022-02-03 14:55:15 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be244244e14ff87fee9b6a721625f952cd.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Dan Field
528f77dc99
Opacity fix (#90017)
* Make sure Opacity widgets/layers do not drop the offset
2021-09-13 19:10:15 -07:00
Dan Field
9db9256b38
Revert "Make sure Opacity widgets/layers do not drop the offset (#89264)" (#89999)
This reverts commit 0d0f7a4fb065da5de8640f1d6757cd5b9bc5534b.
2021-09-13 13:15:19 -07:00
Dan Field
0d0f7a4fb0
Make sure Opacity widgets/layers do not drop the offset (#89264) 2021-09-12 21:17:23 -07:00
Darren Austin
225a43d941
Updated skipped tests for rendering directory. (#87700) 2021-08-05 11:32:48 -07:00
Ren You
9ecba20fbd
Revert "Always push layer for RenderAnimatedOpacityMixin (#83145)" (#84187)
This reverts commit 048baa75913ede225cf140b725dda87f9dc2bebd.
2021-06-08 08:46:25 -07:00
Michael Goderbauer
048baa7591
Always push layer for RenderAnimatedOpacityMixin (#83145) 2021-06-03 17:32:37 -07:00
Alexandre Ardhuin
59fc92168a
add missing trailing commas (#81065) 2021-04-23 22:47:40 +02:00
Ian Hickson
f3c25fa07a
Align more closely with package:test (#77118) (#78343) 2021-03-16 13:58:02 -07:00
Zachary Anderson
e7e1a04aa3
Revert "Align more closely with package:test (#77118)" (#78329)
This reverts commit 0cbe597540f6b51ab7157ab8747906e9923b79e4.
2021-03-16 09:26:34 -07:00
Ian Hickson
0cbe597540
Align more closely with package:test (#77118) 2021-03-15 16:28:02 -07:00
Alexandre Ardhuin
d546e1d311
fix for upcoming lint use_named_constants (#74788) 2021-01-27 20:20:44 +01:00
Alexandre Ardhuin
4acc790252
enable lint cast_nullable_to_non_nullable (#67629) 2020-10-08 21:05:43 +02:00
Kate Lovett
019e90f7df
[NNBD] Migrates some rendering tests (#67449) 2020-10-07 16:27:06 -07:00
Ian Hickson
8a6a76a334
migrate rendering to nullsafety (#64621) 2020-08-27 16:38:10 -07:00
Tong Mu
fb0b982324
Change MouseTracker's interface for clarity. Simplify MouseRegion's implementation. (#64119)
* Redesigns the interface between MouseTracker and RendererBinding&RenderView.
* Simplifies the structure of RenderMouseRegion.
* Extracts the common utility code between mouse_tracker_test and mouse_tracker_cursor_test.
2020-08-19 18:51:56 -07:00
Tong Mu
da8695d389
Mouse events report correct local positions (#61190) 2020-07-13 13:26:03 -07:00
Kate Lovett
ea777fea1b
Skip Audit - Rendering Library (#58640) 2020-07-09 13:36:03 -07:00
liyuqian
42e02d60d3
Reland non-breaking "Add clipBehavior to widgets with clipRect #55977" (#59364)
* Revert "Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)"

This reverts commit 1d395c5e187370f2838bb043d3b438029b484bfc.

* Add missed Overflow
2020-06-17 10:57:40 -07:00
Alexandre Ardhuin
4d7525f05c
Opt out nnbd in packages/flutter (#59186)
* add language version 2.8 in packages/flutter

* enable non-nullable analyzer flag
2020-06-11 14:11:30 +02:00
Mehmet Fidanboylu
1d395c5e18
Revert "Add clipBehavior to widgets with clipRect (#55977)" (#58344)
This reverts commit cd593dae1961ca2bc5c045a310f16e6cdffc8294.
2020-05-31 07:41:50 -07:00
liyuqian
cd593dae19
Add clipBehavior to widgets with clipRect (#55977)
* Add clipBehavior to RenderFlex

* Add clipBehavior to FittedBox

* Add clipBehavior to Flex and FittedBox

* Add clipBehavior to UnconstrainedBox

* Add clipBehavior to Stack and Wrap

* Add clipBehavior to TextEditable

* Add clipBehavior to ListWheelScrollView

* Add clipBehavior to SingleChildScrollView

* Add clipBehavior to RenderViewportBase's widgets

Those widgets are NestedScrollView and ShrinkWrappingViewport.

* Fix tests

* Remove enum Overflow and fix typo

* Remove clipToSize

* Analyze fix

* Remove Mixin and other small fixes

* Fix tests and respect Stack's default clipBehavior

* Add Overflow back to make it non-breaking

* Restore clipBehavior to make it non-breaking

* Small fixes

* Fix rebase
2020-05-29 15:38:50 -07:00
chunhtai
96a3b2ae0b
disable hit testing if the CompositedTransformFollower is hidden when… (#54981)
* disable hit testing if the CompositedTransformFollower is hidden when there is no leader layer

* update comment
2020-04-20 14:46:38 -07:00
Anthony
6a74be53b3
[a11y] Re-land Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#49708)
Re-land Make sure RenderFractionalTranslation updates its semantics after the translation field is set
2020-01-29 13:05:49 -05:00