Loading core/java/android/webkit/WebTextView.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1092,4 +1092,11 @@ import junit.framework.Assert; return url != null ? url.getProtocol() + "://" + url.getHost() + url.getPath() : null; return url != null ? url.getProtocol() + "://" + url.getHost() + url.getPath() : null; } } public void setGravityForRtl(boolean rtl) { int gravity = rtl ? Gravity.RIGHT : Gravity.LEFT; gravity |= mSingle ? Gravity.CENTER_VERTICAL : Gravity.TOP; setGravity(gravity); } } } core/java/android/webkit/WebView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -4760,12 +4760,12 @@ public class WebView extends AbsoluteLayout } } String text = nativeFocusCandidateText(); String text = nativeFocusCandidateText(); int nodePointer = nativeFocusCandidatePointer(); int nodePointer = nativeFocusCandidatePointer(); mWebTextView.setGravity(nativeFocusCandidateIsRtlText() ? Gravity.RIGHT : Gravity.NO_GRAVITY); // This needs to be called before setType, which may call // This needs to be called before setType, which may call // requestFormData, and it needs to have the correct nodePointer. // requestFormData, and it needs to have the correct nodePointer. mWebTextView.setNodePointer(nodePointer); mWebTextView.setNodePointer(nodePointer); mWebTextView.setType(nativeFocusCandidateType()); mWebTextView.setType(nativeFocusCandidateType()); // Gravity needs to be set after setType mWebTextView.setGravityForRtl(nativeFocusCandidateIsRtlText()); updateWebTextViewPadding(); updateWebTextViewPadding(); if (null == text) { if (null == text) { if (DebugFlags.WEB_VIEW) { if (DebugFlags.WEB_VIEW) { Loading Loading
core/java/android/webkit/WebTextView.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1092,4 +1092,11 @@ import junit.framework.Assert; return url != null ? url.getProtocol() + "://" + url.getHost() + url.getPath() : null; return url != null ? url.getProtocol() + "://" + url.getHost() + url.getPath() : null; } } public void setGravityForRtl(boolean rtl) { int gravity = rtl ? Gravity.RIGHT : Gravity.LEFT; gravity |= mSingle ? Gravity.CENTER_VERTICAL : Gravity.TOP; setGravity(gravity); } } }
core/java/android/webkit/WebView.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -4760,12 +4760,12 @@ public class WebView extends AbsoluteLayout } } String text = nativeFocusCandidateText(); String text = nativeFocusCandidateText(); int nodePointer = nativeFocusCandidatePointer(); int nodePointer = nativeFocusCandidatePointer(); mWebTextView.setGravity(nativeFocusCandidateIsRtlText() ? Gravity.RIGHT : Gravity.NO_GRAVITY); // This needs to be called before setType, which may call // This needs to be called before setType, which may call // requestFormData, and it needs to have the correct nodePointer. // requestFormData, and it needs to have the correct nodePointer. mWebTextView.setNodePointer(nodePointer); mWebTextView.setNodePointer(nodePointer); mWebTextView.setType(nativeFocusCandidateType()); mWebTextView.setType(nativeFocusCandidateType()); // Gravity needs to be set after setType mWebTextView.setGravityForRtl(nativeFocusCandidateIsRtlText()); updateWebTextViewPadding(); updateWebTextViewPadding(); if (null == text) { if (null == text) { if (DebugFlags.WEB_VIEW) { if (DebugFlags.WEB_VIEW) { Loading