Bug 228593 - [Cocoa|WK1] -[NSAttributeString loadFromHTML...] methods will disable bluetooth route switching
Summary: [Cocoa|WK1] -[NSAttributeString loadFromHTML...] methods will disable bluetoo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-29 10:54 PDT by Jer Noble
Modified: 2021-07-29 18:51 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2021-07-29 11:03 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (5.92 KB, patch)
2021-07-29 11:51 PDT, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (5.92 KB, patch)
2021-07-29 11:57 PDT, Jer Noble
eric.carlson: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (5.98 KB, patch)
2021-07-29 12:10 PDT, Jer Noble
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (5.99 KB, patch)
2021-07-29 12:39 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2021-07-29 10:54:16 PDT
[Cocoa|WK1] -[NSAttributeString loadFromHTML...] methods will disable bluetooth route switching
Comment 1 Jer Noble 2021-07-29 10:54:33 PDT
<rdar://81160969>
Comment 2 Jer Noble 2021-07-29 11:03:06 PDT
Created attachment 434538 [details]
Patch
Comment 3 Sam Weinig 2021-07-29 11:05:26 PDT
Comment on attachment 434538 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434538&action=review

> Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:31
> +#import "DeprecatedGlobalSettings.h"

Using DeprecatedGlobalSettings.h from platform/ is a layering violation (DeprecatedGlobalSettings.h is not part of platform/). The pattern to use here is usually to pass the data down from the WebCore layer or via delegation.
Comment 4 Jer Noble 2021-07-29 11:11:37 PDT
(In reply to Sam Weinig from comment #3)
> Comment on attachment 434538 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=434538&action=review
> 
> > Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:31
> > +#import "DeprecatedGlobalSettings.h"
> 
> Using DeprecatedGlobalSettings.h from platform/ is a layering violation
> (DeprecatedGlobalSettings.h is not part of platform/). The pattern to use
> here is usually to pass the data down from the WebCore layer or via
> delegation.

DeprecatedGlobalSettings is used everywhere in platform/. It should probably be moved in there rather than have every use require some kind of delegate push.
Comment 5 Jer Noble 2021-07-29 11:13:13 PDT
(In reply to Jer Noble from comment #4)
> (In reply to Sam Weinig from comment #3)
> > Comment on attachment 434538 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=434538&action=review
> > 
> > > Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:31
> > > +#import "DeprecatedGlobalSettings.h"
> > 
> > Using DeprecatedGlobalSettings.h from platform/ is a layering violation
> > (DeprecatedGlobalSettings.h is not part of platform/). The pattern to use
> > here is usually to pass the data down from the WebCore layer or via
> > delegation.
> 
> DeprecatedGlobalSettings is used everywhere in platform/. It should probably
> be moved in there rather than have every use require some kind of delegate
> push.

In fact, there are 4 uses outside of platform/, and 18 inside platform/.
Comment 6 Jer Noble 2021-07-29 11:23:01 PDT
Filed bug #228594 to track fixing the layering violation (for this code and all other uses).
Comment 7 Jer Noble 2021-07-29 11:51:06 PDT
Created attachment 434550 [details]
Patch
Comment 8 Eric Carlson 2021-07-29 11:57:34 PDT
Comment on attachment 434550 [details]
Patch

r=me once the bots are happy
Comment 9 Jer Noble 2021-07-29 11:57:44 PDT
Created attachment 434551 [details]
Patch
Comment 10 Jer Noble 2021-07-29 12:10:09 PDT
Created attachment 434555 [details]
Patch for landing
Comment 11 Jer Noble 2021-07-29 12:39:52 PDT
Created attachment 434558 [details]
Patch for landing
Comment 12 EWS 2021-07-29 18:51:25 PDT
Committed r280462 (240097@main): <https://commits.webkit.org/240097@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434558 [details].