WebViewObject - SetMargins
Nobody has claimed this yet.
- Dominant language
- Objective-C++
- Stars
- 2.7k
- Forks
- 734
- Avg merge
- 11h 39m
- Merged PRs (30d)
- 1
Description
Hi,
I have encountered an issue that happens when setting margins for full screen.
How to reproduces:
Init a webView and setMargins for full screen (i.e 0 for top, bottom, left, right).
This should be the first call to setMargins with the given values!
function will be returned at the following block:
if (ml == mMarginLeftComputed
&& mt == mMarginTopComputed
&& mr == mMarginRightComputed
&& mb == mMarginBottomComputed
&& r == mMarginRelativeComputed)
{
return;
}
Why this happens?
"mMarginTopComputed" is set to 0 by default, (and ml is 0).
in the Awake() function mMarginTopComputed is set to be -9999
but the Awake function is called only UNITY_ANDROID.
Moving the Awake() function outside the UNITY_ANDROID block should fix it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the WebViewObject setMargins implementation and the Awake() entry point mentioned in the report. Reproduce the first full-screen setMargins call with all values set to 0 outside the Android-only path, then verify that the call is not returned early and the margins are applied on all relevant platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- unity
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100