Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–10 unchanged (10 lines)
11import mozilla.components.browser.state.state.CustomTabSessionState
12import mozilla.components.browser.state.store.BrowserStore
13import mozilla.components.concept.engine.manifest.WebAppManifest
14import mozilla.components.feature.pwa.feature.SiteControlsBuilder
15import mozilla.components.feature.session.SessionUseCases
16import org.mozilla.fenix.R
17
18class WebAppSiteControlsBuilder(
19 private val store: BrowserStore,
20 reloadUrlUseCase: SessionUseCases.ReloadUrlUseCase,
21 private val sessionId: String,
22 private val manifest: WebAppManifest,
23) : SiteControlsBuilder {
…lines 24–27 unchanged (4 lines)
28 inner.buildNotification(context, builder)
29
30 if (store.state.findCustomTab(sessionId)?.content?.private != true) {
31 return
32 }
33
34 builder.setSmallIcon(R.drawable.ic_private_browsing)
35 builder.setContentTitle(context.getString(R.string.pwa_site_controls_title_private, manifest.name))
36 }
37
38 override fun getFilter() = inner.getFilter()
39
40 override fun onReceiveBroadcast(context: Context, tab: CustomTabSessionState, intent: Intent) {
…lines 41–44 unchanged (4 lines)

After

…lines 1–10 unchanged (10 lines)
11import mozilla.components.browser.state.state.CustomTabSessionState
12import mozilla.components.browser.state.store.BrowserStore
13import mozilla.components.concept.engine.manifest.WebAppManifest
14import mozilla.components.feature.pwa.feature.SiteControlsBuilder
15import mozilla.components.feature.session.SessionUseCases
16import org.mozilla.fenix.R
17import mozilla.components.ui.icons.R as iconsR
18
19class WebAppSiteControlsBuilder(
20 private val store: BrowserStore,
21 reloadUrlUseCase: SessionUseCases.ReloadUrlUseCase,
22 private val sessionId: String,
23 private val manifest: WebAppManifest,
…lines 24–28 unchanged (5 lines)
29 inner.buildNotification(context, builder)
30
31 if (store.state.findCustomTab(sessionId)?.content?.private != true) {
32 return
33 }
34
35 builder.setSmallIcon(iconsR.drawable.mozac_ic_private_mode_24)
36 builder.setContentTitle(context.getString(R.string.pwa_site_controls_title_private, manifest.name))
37 }
38
39 override fun getFilter() = inner.getFilter()
40
41 override fun onReceiveBroadcast(context: Context, tab: CustomTabSessionState, intent: Intent) {
…lines 42–45 unchanged (4 lines)

Before

source_file
block_comment "/* This Source Code Form is subject to the terms of the Mozi"...
package_header
package "package"
qualified_identifier
identifier "org"
. "."
identifier "mozilla"
. "."
identifier "fenix"
. "."
identifier "customtabs"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "app"
. "."
identifier "Notification"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "content"
. "."
identifier "Context"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "content"
. "."
identifier "Intent"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "selector"
. "."
identifier "findCustomTab"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "state"
. "."
identifier "CustomTabSessionState"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "store"
. "."
identifier "BrowserStore"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "concept"
. "."
identifier "engine"
. "."
identifier "manifest"
. "."
identifier "WebAppManifest"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "feature"
. "."
identifier "pwa"
. "."
identifier "feature"
. "."
identifier "SiteControlsBuilder"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "feature"
. "."
identifier "session"
. "."
identifier "SessionUseCases"
import
import "import"
qualified_identifier
identifier "org"
. "."
identifier "mozilla"
. "."
identifier "fenix"
. "."
identifier "R"
class_declaration
class "class"
identifier "WebAppSiteControlsBuilder"
primary_constructor (+42 nodes collapsed)
: ":"
delegation_specifiers
delegation_specifier
user_type
identifier "SiteControlsBuilder"
class_body
{ "{"
property_declaration
modifiers
visibility_modifier
private "private"
val "val"
variable_declaration
identifier "inner"
= "="
call_expression
navigation_expression
identifier "SiteControlsBuilder"
. "."
identifier "CopyAndRefresh"
value_arguments
( "("
value_argument
identifier "reloadUrlUseCase"
) ")"
function_declaration
modifiers
member_modifier
override "override"
fun "fun"
identifier "buildNotification"
function_value_parameters
( "("
parameter
identifier "context"
: ":"
user_type
identifier "Context"
, ","
parameter
identifier "builder"
: ":"
user_type
identifier "Notification"
. "."
identifier "Builder"
) ")"
function_body
block
{ "{"
call_expression
navigation_expression
identifier "inner"
. "."
identifier "buildNotification"
value_arguments
( "("
value_argument
identifier "context"
, ","
value_argument
identifier "builder"
) ")"
if_expression (+31 nodes collapsed)
call_expression
navigation_expression
identifier "builder"
. "."
identifier "setSmallIcon"
value_arguments
( "("
value_argument
navigation_expression
navigation_expression
identifier "R"
. "."
identifier "drawable"
. "."
identifier "ic_private_browsing"
) ")"
call_expression (+31 nodes collapsed)
} "}"
function_declaration
modifiers
member_modifier
override "override"
fun "fun"
identifier "getFilter"
function_value_parameters
( "("
) ")"
function_body
= "="
call_expression
navigation_expression
identifier "inner"
. "."
identifier "getFilter"
value_arguments
( "("
) ")"
function_declaration (+46 nodes collapsed)
} "}"

After

source_file
block_comment "/* This Source Code Form is subject to the terms of the Mozi"...
package_header
package "package"
qualified_identifier
identifier "org"
. "."
identifier "mozilla"
. "."
identifier "fenix"
. "."
identifier "customtabs"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "app"
. "."
identifier "Notification"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "content"
. "."
identifier "Context"
import
import "import"
qualified_identifier
identifier "android"
. "."
identifier "content"
. "."
identifier "Intent"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "selector"
. "."
identifier "findCustomTab"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "state"
. "."
identifier "CustomTabSessionState"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "browser"
. "."
identifier "state"
. "."
identifier "store"
. "."
identifier "BrowserStore"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "concept"
. "."
identifier "engine"
. "."
identifier "manifest"
. "."
identifier "WebAppManifest"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "feature"
. "."
identifier "pwa"
. "."
identifier "feature"
. "."
identifier "SiteControlsBuilder"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "feature"
. "."
identifier "session"
. "."
identifier "SessionUseCases"
import
import "import"
qualified_identifier
identifier "org"
. "."
identifier "mozilla"
. "."
identifier "fenix"
. "."
identifier "R"
import
import "import"
qualified_identifier
identifier "mozilla"
. "."
identifier "components"
. "."
identifier "ui"
. "."
identifier "icons"
. "."
identifier "R"
as "as"
identifier "iconsR"
class_declaration
class "class"
identifier "WebAppSiteControlsBuilder"
primary_constructor (+42 nodes collapsed)
: ":"
delegation_specifiers
delegation_specifier
user_type
identifier "SiteControlsBuilder"
class_body
{ "{"
property_declaration
modifiers
visibility_modifier
private "private"
val "val"
variable_declaration
identifier "inner"
= "="
call_expression
navigation_expression
identifier "SiteControlsBuilder"
. "."
identifier "CopyAndRefresh"
value_arguments
( "("
value_argument
identifier "reloadUrlUseCase"
) ")"
function_declaration
modifiers
member_modifier
override "override"
fun "fun"
identifier "buildNotification"
function_value_parameters
( "("
parameter
identifier "context"
: ":"
user_type
identifier "Context"
, ","
parameter
identifier "builder"
: ":"
user_type
identifier "Notification"
. "."
identifier "Builder"
) ")"
function_body
block
{ "{"
call_expression
navigation_expression
identifier "inner"
. "."
identifier "buildNotification"
value_arguments
( "("
value_argument
identifier "context"
, ","
value_argument
identifier "builder"
) ")"
if_expression (+31 nodes collapsed)
call_expression
navigation_expression
identifier "builder"
. "."
identifier "setSmallIcon"
value_arguments
( "("
value_argument
navigation_expression
navigation_expression
identifier "iconsR"
. "."
identifier "drawable"
. "."
identifier "mozac_ic_private_mode_24"
) ")"
call_expression (+31 nodes collapsed)
} "}"
function_declaration
modifiers
member_modifier
override "override"
fun "fun"
identifier "getFilter"
function_value_parameters
( "("
) ")"
function_body
= "="
call_expression
navigation_expression
identifier "inner"
. "."
identifier "getFilter"
value_arguments
( "("
) ")"
function_declaration (+46 nodes collapsed)
} "}"