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
25a2dfb3
Unverified
Commit
25a2dfb3
authored
Apr 04, 2023
by
Michael Goderbauer
Committed by
GitHub
Apr 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename RenderView.window to RenderView.view (#124060)
parent
f9857df6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
24 deletions
+23
-24
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+1
-1
view.dart
packages/flutter/lib/src/rendering/view.dart
+10
-10
service_extensions_test.dart
...ages/flutter/test/foundation/service_extensions_test.dart
+1
-1
independent_layout_test.dart
packages/flutter/test/rendering/independent_layout_test.dart
+2
-2
layers_test.dart
packages/flutter/test/rendering/layers_test.dart
+2
-2
view_test.dart
packages/flutter/test/rendering/view_test.dart
+2
-2
independent_widget_layout_test.dart
.../flutter/test/widgets/independent_widget_layout_test.dart
+1
-2
keep_alive_test.dart
packages/flutter/test/widgets/keep_alive_test.dart
+2
-2
binding.dart
packages/flutter_test/lib/src/binding.dart
+2
-2
No files found.
packages/flutter/lib/src/rendering/binding.dart
View file @
25a2dfb3
...
@@ -212,7 +212,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
...
@@ -212,7 +212,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
_debugIsRenderViewInitialized
=
true
;
_debugIsRenderViewInitialized
=
true
;
return
true
;
return
true
;
}());
}());
renderView
=
RenderView
(
configuration:
createViewConfiguration
(),
windo
w:
platformDispatcher
.
implicitView
!);
renderView
=
RenderView
(
configuration:
createViewConfiguration
(),
vie
w:
platformDispatcher
.
implicitView
!);
renderView
.
prepareInitialFrame
();
renderView
.
prepareInitialFrame
();
}
}
bool
_debugIsRenderViewInitialized
=
false
;
bool
_debugIsRenderViewInitialized
=
false
;
...
...
packages/flutter/lib/src/rendering/view.dart
View file @
25a2dfb3
...
@@ -68,9 +68,9 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -68,9 +68,9 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
RenderView
({
RenderView
({
RenderBox
?
child
,
RenderBox
?
child
,
required
ViewConfiguration
configuration
,
required
ViewConfiguration
configuration
,
required
ui
.
FlutterView
windo
w
,
required
ui
.
FlutterView
vie
w
,
})
:
_configuration
=
configuration
,
})
:
_configuration
=
configuration
,
_
window
=
windo
w
{
_
view
=
vie
w
{
this
.
child
=
child
;
this
.
child
=
child
;
}
}
...
@@ -99,7 +99,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -99,7 +99,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
markNeedsLayout
();
markNeedsLayout
();
}
}
final
ui
.
FlutterView
_
windo
w
;
final
ui
.
FlutterView
_
vie
w
;
/// Whether Flutter should automatically compute the desired system UI.
/// Whether Flutter should automatically compute the desired system UI.
///
///
...
@@ -234,7 +234,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -234,7 +234,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
if
(
automaticSystemUiAdjustment
)
{
if
(
automaticSystemUiAdjustment
)
{
_updateSystemChrome
();
_updateSystemChrome
();
}
}
_
windo
w
.
render
(
scene
);
_
vie
w
.
render
(
scene
);
scene
.
dispose
();
scene
.
dispose
();
assert
(()
{
assert
(()
{
if
(
debugRepaintRainbowEnabled
||
debugRepaintTextRainbowEnabled
)
{
if
(
debugRepaintRainbowEnabled
||
debugRepaintTextRainbowEnabled
)
{
...
@@ -255,7 +255,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -255,7 +255,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
/// A [SemanticsUpdate] is produced by a [SemanticsOwner] during the
/// A [SemanticsUpdate] is produced by a [SemanticsOwner] during the
/// [EnginePhase.flushSemantics] phase.
/// [EnginePhase.flushSemantics] phase.
void
updateSemantics
(
ui
.
SemanticsUpdate
update
)
{
void
updateSemantics
(
ui
.
SemanticsUpdate
update
)
{
_
windo
w
.
updateSemantics
(
update
);
_
vie
w
.
updateSemantics
(
update
);
}
}
void
_updateSystemChrome
()
{
void
_updateSystemChrome
()
{
...
@@ -287,7 +287,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -287,7 +287,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
bounds
.
center
.
dx
,
bounds
.
center
.
dx
,
// The vertical center of the system status bar. The system status bar
// The vertical center of the system status bar. The system status bar
// height is kept as top window padding.
// height is kept as top window padding.
_
windo
w
.
padding
.
top
/
2.0
,
_
vie
w
.
padding
.
top
/
2.0
,
);
);
// Center of the navigation bar
// Center of the navigation bar
final
Offset
bottom
=
Offset
(
final
Offset
bottom
=
Offset
(
...
@@ -298,7 +298,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -298,7 +298,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
// from the bottom because available pixels are in (0..bottom) range.
// from the bottom because available pixels are in (0..bottom) range.
// I.e. for a device with 1920 height, bound.bottom is 1920, but the most
// I.e. for a device with 1920 height, bound.bottom is 1920, but the most
// bottom drawn pixel is at 1919 position.
// bottom drawn pixel is at 1919 position.
bounds
.
bottom
-
1.0
-
_
windo
w
.
padding
.
bottom
/
2.0
,
bounds
.
bottom
-
1.0
-
_
vie
w
.
padding
.
bottom
/
2.0
,
);
);
final
SystemUiOverlayStyle
?
upperOverlayStyle
=
layer
!.
find
<
SystemUiOverlayStyle
>(
top
);
final
SystemUiOverlayStyle
?
upperOverlayStyle
=
layer
!.
find
<
SystemUiOverlayStyle
>(
top
);
// Only android has a customizable system navigation bar.
// Only android has a customizable system navigation bar.
...
@@ -374,10 +374,10 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -374,10 +374,10 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
properties
.
add
(
DiagnosticsNode
.
message
(
'debug mode enabled -
${kIsWeb ? 'Web' : Platform.operatingSystem}
'
));
properties
.
add
(
DiagnosticsNode
.
message
(
'debug mode enabled -
${kIsWeb ? 'Web' : Platform.operatingSystem}
'
));
return
true
;
return
true
;
}());
}());
properties
.
add
(
DiagnosticsProperty
<
Size
>(
'
window size'
,
_windo
w
.
physicalSize
,
tooltip:
'in physical pixels'
));
properties
.
add
(
DiagnosticsProperty
<
Size
>(
'
view size'
,
_vie
w
.
physicalSize
,
tooltip:
'in physical pixels'
));
properties
.
add
(
DoubleProperty
(
'device pixel ratio'
,
_
windo
w
.
devicePixelRatio
,
tooltip:
'physical pixels per logical pixel'
));
properties
.
add
(
DoubleProperty
(
'device pixel ratio'
,
_
vie
w
.
devicePixelRatio
,
tooltip:
'physical pixels per logical pixel'
));
properties
.
add
(
DiagnosticsProperty
<
ViewConfiguration
>(
'configuration'
,
configuration
,
tooltip:
'in logical pixels'
));
properties
.
add
(
DiagnosticsProperty
<
ViewConfiguration
>(
'configuration'
,
configuration
,
tooltip:
'in logical pixels'
));
if
(
_
windo
w
.
platformDispatcher
.
semanticsEnabled
)
{
if
(
_
vie
w
.
platformDispatcher
.
semanticsEnabled
)
{
properties
.
add
(
DiagnosticsNode
.
message
(
'semantics enabled'
));
properties
.
add
(
DiagnosticsNode
.
message
(
'semantics enabled'
));
}
}
}
}
...
...
packages/flutter/test/foundation/service_extensions_test.dart
View file @
25a2dfb3
...
@@ -233,7 +233,7 @@ void main() {
...
@@ -233,7 +233,7 @@ void main() {
r'^'
r'^'
r'RenderView#[0-9a-f]{5}\n'
r'RenderView#[0-9a-f]{5}\n'
r' debug mode enabled - [a-zA-Z]+\n'
r' debug mode enabled - [a-zA-Z]+\n'
r'
windo
w size: Size\(2400\.0, 1800\.0\) \(in physical pixels\)\n'
r'
vie
w size: Size\(2400\.0, 1800\.0\) \(in physical pixels\)\n'
r' device pixel ratio: 3\.0 \(physical pixels per logical pixel\)\n'
r' device pixel ratio: 3\.0 \(physical pixels per logical pixel\)\n'
r' configuration: Size\(800\.0, 600\.0\) at 3\.0x \(in logical pixels\)\n'
r' configuration: Size\(800\.0, 600\.0\) at 3\.0x \(in logical pixels\)\n'
r'$'
,
r'$'
,
...
...
packages/flutter/test/rendering/independent_layout_test.dart
View file @
25a2dfb3
...
@@ -44,7 +44,7 @@ void main() {
...
@@ -44,7 +44,7 @@ void main() {
expect
(
offscreen
.
child
.
hasSize
,
isFalse
);
expect
(
offscreen
.
child
.
hasSize
,
isFalse
);
expect
(
offscreen
.
painted
,
isFalse
);
expect
(
offscreen
.
painted
,
isFalse
);
// Attach the offscreen to a custom render view and owner
// Attach the offscreen to a custom render view and owner
final
RenderView
renderView
=
RenderView
(
configuration:
testConfiguration
,
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
RenderView
renderView
=
RenderView
(
configuration:
testConfiguration
,
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
PipelineOwner
pipelineOwner
=
PipelineOwner
();
final
PipelineOwner
pipelineOwner
=
PipelineOwner
();
renderView
.
attach
(
pipelineOwner
);
renderView
.
attach
(
pipelineOwner
);
renderView
.
child
=
offscreen
.
root
;
renderView
.
child
=
offscreen
.
root
;
...
@@ -75,7 +75,7 @@ void main() {
...
@@ -75,7 +75,7 @@ void main() {
expect
(
offscreen
.
child
.
hasSize
,
isFalse
);
expect
(
offscreen
.
child
.
hasSize
,
isFalse
);
expect
(
offscreen
.
painted
,
isFalse
);
expect
(
offscreen
.
painted
,
isFalse
);
// Attach the offscreen to a custom render view and owner
// Attach the offscreen to a custom render view and owner
final
RenderView
renderView
=
RenderView
(
configuration:
testConfiguration
,
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
RenderView
renderView
=
RenderView
(
configuration:
testConfiguration
,
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
PipelineOwner
pipelineOwner
=
PipelineOwner
();
final
PipelineOwner
pipelineOwner
=
PipelineOwner
();
renderView
.
attach
(
pipelineOwner
);
renderView
.
attach
(
pipelineOwner
);
renderView
.
child
=
offscreen
.
root
;
renderView
.
child
=
offscreen
.
root
;
...
...
packages/flutter/test/rendering/layers_test.dart
View file @
25a2dfb3
...
@@ -169,7 +169,7 @@ void main() {
...
@@ -169,7 +169,7 @@ void main() {
test
(
'switching layer link of an attached leader layer should not crash'
,
()
{
test
(
'switching layer link of an attached leader layer should not crash'
,
()
{
final
LayerLink
link
=
LayerLink
();
final
LayerLink
link
=
LayerLink
();
final
LeaderLayer
leaderLayer
=
LeaderLayer
(
link:
link
);
final
LeaderLayer
leaderLayer
=
LeaderLayer
(
link:
link
);
final
RenderView
view
=
RenderView
(
configuration:
const
ViewConfiguration
(),
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
RenderView
view
=
RenderView
(
configuration:
const
ViewConfiguration
(),
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
leaderLayer
.
attach
(
view
);
leaderLayer
.
attach
(
view
);
final
LayerLink
link2
=
LayerLink
();
final
LayerLink
link2
=
LayerLink
();
leaderLayer
.
link
=
link2
;
leaderLayer
.
link
=
link2
;
...
@@ -182,7 +182,7 @@ void main() {
...
@@ -182,7 +182,7 @@ void main() {
final
LayerLink
link
=
LayerLink
();
final
LayerLink
link
=
LayerLink
();
final
LeaderLayer
leaderLayer1
=
LeaderLayer
(
link:
link
);
final
LeaderLayer
leaderLayer1
=
LeaderLayer
(
link:
link
);
final
LeaderLayer
leaderLayer2
=
LeaderLayer
(
link:
link
);
final
LeaderLayer
leaderLayer2
=
LeaderLayer
(
link:
link
);
final
RenderView
view
=
RenderView
(
configuration:
const
ViewConfiguration
(),
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
final
RenderView
view
=
RenderView
(
configuration:
const
ViewConfiguration
(),
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
);
leaderLayer1
.
attach
(
view
);
leaderLayer1
.
attach
(
view
);
leaderLayer2
.
attach
(
view
);
leaderLayer2
.
attach
(
view
);
leaderLayer2
.
detach
();
leaderLayer2
.
detach
();
...
...
packages/flutter/test/rendering/view_test.dart
View file @
25a2dfb3
...
@@ -32,7 +32,7 @@ void main() {
...
@@ -32,7 +32,7 @@ void main() {
test
(
'does not replace the root layer unnecessarily'
,
()
{
test
(
'does not replace the root layer unnecessarily'
,
()
{
final
RenderView
view
=
RenderView
(
final
RenderView
view
=
RenderView
(
configuration:
createViewConfiguration
(),
configuration:
createViewConfiguration
(),
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
,
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
,
);
);
final
PipelineOwner
owner
=
PipelineOwner
();
final
PipelineOwner
owner
=
PipelineOwner
();
view
.
attach
(
owner
);
view
.
attach
(
owner
);
...
@@ -48,7 +48,7 @@ void main() {
...
@@ -48,7 +48,7 @@ void main() {
test
(
'does not replace the root layer unnecessarily when view resizes'
,
()
{
test
(
'does not replace the root layer unnecessarily when view resizes'
,
()
{
final
RenderView
view
=
RenderView
(
final
RenderView
view
=
RenderView
(
configuration:
createViewConfiguration
(
size:
const
Size
(
100.0
,
100.0
)),
configuration:
createViewConfiguration
(
size:
const
Size
(
100.0
,
100.0
)),
windo
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
,
vie
w:
RendererBinding
.
instance
.
platformDispatcher
.
views
.
single
,
);
);
final
PipelineOwner
owner
=
PipelineOwner
();
final
PipelineOwner
owner
=
PipelineOwner
();
view
.
attach
(
owner
);
view
.
attach
(
owner
);
...
...
packages/flutter/test/widgets/independent_widget_layout_test.dart
View file @
25a2dfb3
...
@@ -35,9 +35,8 @@ class ScheduledFrameTrackingBindings extends AutomatedTestWidgetsFlutterBinding
...
@@ -35,9 +35,8 @@ class ScheduledFrameTrackingBindings extends AutomatedTestWidgetsFlutterBinding
}
}
class
OffscreenRenderView
extends
RenderView
{
class
OffscreenRenderView
extends
RenderView
{
OffscreenRenderView
({
required
FlutterView
view
})
:
super
(
OffscreenRenderView
({
required
super
.
view
})
:
super
(
configuration:
const
ViewConfiguration
(
size:
_kTestViewSize
),
configuration:
const
ViewConfiguration
(
size:
_kTestViewSize
),
window:
view
,
);
);
@override
@override
...
...
packages/flutter/test/widgets/keep_alive_test.dart
View file @
25a2dfb3
...
@@ -207,7 +207,7 @@ void main() {
...
@@ -207,7 +207,7 @@ void main() {
expect
(
tester
.
binding
.
renderView
.
toStringDeep
(
minLevel:
DiagnosticLevel
.
info
),
equalsIgnoringHashCodes
(
expect
(
tester
.
binding
.
renderView
.
toStringDeep
(
minLevel:
DiagnosticLevel
.
info
),
equalsIgnoringHashCodes
(
'RenderView#00000
\n
'
'RenderView#00000
\n
'
' │ debug mode enabled -
${Platform.operatingSystem}
\n
'
' │ debug mode enabled -
${Platform.operatingSystem}
\n
'
' │
windo
w size: Size(2400.0, 1800.0) (in physical pixels)
\n
'
' │
vie
w size: Size(2400.0, 1800.0) (in physical pixels)
\n
'
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)
\n
'
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)
\n
'
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)
\n
'
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)
\n
'
' │
\n
'
' │
\n
'
...
@@ -381,7 +381,7 @@ void main() {
...
@@ -381,7 +381,7 @@ void main() {
expect
(
tester
.
binding
.
renderView
.
toStringDeep
(
minLevel:
DiagnosticLevel
.
info
),
equalsIgnoringHashCodes
(
expect
(
tester
.
binding
.
renderView
.
toStringDeep
(
minLevel:
DiagnosticLevel
.
info
),
equalsIgnoringHashCodes
(
'RenderView#00000
\n
'
'RenderView#00000
\n
'
' │ debug mode enabled -
${Platform.operatingSystem}
\n
'
' │ debug mode enabled -
${Platform.operatingSystem}
\n
'
' │
windo
w size: Size(2400.0, 1800.0) (in physical pixels)
\n
'
' │
vie
w size: Size(2400.0, 1800.0) (in physical pixels)
\n
'
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)
\n
'
' │ device pixel ratio: 3.0 (physical pixels per logical pixel)
\n
'
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)
\n
'
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)
\n
'
' │
\n
'
' │
\n
'
...
...
packages/flutter_test/lib/src/binding.dart
View file @
25a2dfb3
...
@@ -1764,7 +1764,7 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
...
@@ -1764,7 +1764,7 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
renderView
=
_LiveTestRenderView
(
renderView
=
_LiveTestRenderView
(
configuration:
createViewConfiguration
(),
configuration:
createViewConfiguration
(),
onNeedPaint:
_handleViewNeedsPaint
,
onNeedPaint:
_handleViewNeedsPaint
,
windo
w:
platformDispatcher
.
implicitView
!,
vie
w:
platformDispatcher
.
implicitView
!,
);
);
renderView
.
prepareInitialFrame
();
renderView
.
prepareInitialFrame
();
}
}
...
@@ -2063,7 +2063,7 @@ class _LiveTestRenderView extends RenderView {
...
@@ -2063,7 +2063,7 @@ class _LiveTestRenderView extends RenderView {
_LiveTestRenderView
({
_LiveTestRenderView
({
required
super
.
configuration
,
required
super
.
configuration
,
required
this
.
onNeedPaint
,
required
this
.
onNeedPaint
,
required
super
.
windo
w
,
required
super
.
vie
w
,
});
});
@override
@override
...
...
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