Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Make cookie handling consistent and non destructive #10571

Merged
merged 11 commits into from May 7, 2020
Merged

Make cookie handling consistent and non destructive #10571

merged 11 commits into from May 7, 2020

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented May 5, 2020

Description of Change

  • UWP wasn't deleting cookies at all or updating cookies on refresh
  • Android was just deleting all the cookies no matter what
  • iOS was only deleting when cookies > 0

Determining how to do handle Cookies on each platform was different. This PR brings all the platforms in line. If the user never sets the Cookies property than nothing ever happens.

This PR also removes the API ShouldManageCookies which isn't public yet. Because if the CookieContainer is null that will already act as if ShouldManageCookies is set false. Android was the only platform that was totally destructive even when Cookies was null

This PR keeps the Cookies property in sync with the webview cookies. After the first load of a url the Cookies container (if set) will fill with cookies. At this point if you add/remove cookies it'll try to add/remove those from the webview

I also added calls to sync cookies after the navigating call this way people can modify the cookies during navigating if they need to

Issues Resolved

Platforms Affected

  • iOS
  • Android
  • UWP

Testing Procedure

  • ui tests included

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@PureWeen PureWeen requested review from rmarinho and samhouts and removed request for StephaneDelcroix May 5, 2020 04:06
@PureWeen PureWeen added the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label May 5, 2020
@PureWeen PureWeen added blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. 4.6.0 regression on 4.6.0 and removed DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. labels May 6, 2020
@PureWeen
Copy link
Contributor Author

PureWeen commented May 6, 2020

This PR is fine to review. The API 19 LR test failed because one of the buttons is semi off the screen so the app runner couldn't click on it. Pushing up a button re-arrangement which should fix

@samhouts samhouts added this to Ready for Review (PRs) in Sprint 170 May 6, 2020
{
// cookiesToKeep.Add(jCookie.Name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete comment?

{
bool changeCookie = true;

// on iOS 10 we have to rewrite all the cookies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment might need more explanation

@rmarinho rmarinho merged commit c47ab7c into 4.6.0 May 7, 2020
Sprint 170 automation moved this from Ready for Review (PRs) to Done May 7, 2020
samhouts pushed a commit that referenced this pull request May 7, 2020
* Remove code that adjusts the frame when hiding/showing TabBar

* - enable for android

* Make cookie handling consistent and non destructive (#10571) fixes #10318

* Make cookie handling consistent and non destructive

* - fix ios

* - ios fixes

* - sync fixes

* - ios fixes

* - fix ui tests

* - fix uwp

* - move buttons around

* - update comments

* - ios10 adjustments

* - use host for key not full url

* Added repro sample (#10589) fixes #8958

* Fix TemplatedItemsList incorrect grouped collection range removal (#7891) fixes #7890

* fix

* test added

* uitest added

* ui test fix

Co-authored-by: melimion <Evlentev@molot.net>

* [Tizen] Update ShellRenderer for extend (#10587)

* iOS 10 fix for Top Tabs on Shell (#10500)

Co-authored-by: Rui Marinho <me@ruimarinho.net>

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
Co-authored-by: melimion <33512073+melimion@users.noreply.github.com>
Co-authored-by: melimion <Evlentev@molot.net>
Co-authored-by: Seungkeun Lee <sngn.lee@samsung.com>
Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: Samantha Houts <samhouts@users.noreply.github.com>

fixes #10134
@samhouts samhouts added this to the 4.6.0 milestone May 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.6.0 regression on 4.6.0 a/webview blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. i/regression t/bug 🐛
Projects
No open projects
Sprint 170
  
Done
v4.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants