Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50b14a78 authored by Mats Mattsson's avatar Mats Mattsson Committed by Steve Kondik
Browse files

Remove size height feedback from view system to webkit if the view height is...

Remove size height feedback from view system to webkit if the view height is set by height of content

Remove size height feedback from view system to webkit if the view height is set by height of content
in order to fix a bug which causes the WebView to grow endlessly.

To reproduce try the following in a WebView with layout_height="wrap_content" in a ScrollView:

<html>

<head></head>

<body>

<table height="100%"><tr><td>a</td></tr></table><img src="" width="1" height="1" border="0" />

</body>

</html>
parent 1cf95321
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (C) 2006 The Android Open Source Project
 * Copyright (C) 2010 Sony Ericsson Mobile Communications AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -2100,7 +2101,7 @@ public class WebView extends AbsoluteLayout

        int viewWidth = getViewWidth();
        int newWidth = Math.round(viewWidth * mInvActualScale);
        int newHeight = Math.round(getViewHeight() * mInvActualScale);
        int newHeight = mHeightCanMeasure ? 0 : Math.round(getViewHeight() * mInvActualScale);
        /*
         * Because the native side may have already done a layout before the
         * View system was able to measure us, we have to send a height of 0 to