Commit 73688cf4 authored by rniwa@webkit.org's avatar rniwa@webkit.org
Browse files

REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium

https://bugs.webkit.org/show_bug.cgi?id=67453

Reviewed by Kent Tamura.

.: 

Add symbols for internals.

* Source/autotools/symbols.filter:

Source/WebCore: 

Fixed the bug by updating inner text value in setSuggestedValue.

Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes.

Test: fast/forms/suggested-value.html

* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::suggestedValue):
(WebCore::Internals::setSuggestedValue):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/chromium: 

Chromium code incorrectly calls Node::isFocusable without updating layout, and was hitting assertions.
Fix the assertion failure (and a potential crash) by updating layout in WebCore::isFocusable.

* src/WebNode.cpp:
(WebKit::WebNode::isFocusable):

Source/WebKit2: 

Add symbols for internals.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests: 

Added a regression test to ensure HTMLInputElement updates its inner text value when the suggested value is set.

* fast/forms/suggested-value-expected.txt: Added.
* fast/forms/suggested-value.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c3b45ae6
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Add symbols for internals.
* Source/autotools/symbols.filter:
2011-09-04 Robin Dunn <robin@alldunn.com>
 
[wx] Enable wxWebKit to run using the wxGC Cairo backend on platforms other than GTK.
......
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Added a regression test to ensure HTMLInputElement updates its inner text value when the suggested value is set.
* fast/forms/suggested-value-expected.txt: Added.
* fast/forms/suggested-value.html: Added.
2011-09-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
 
Web Inspector: [Extensions API] rename webInspector.resources to webInspector.network
This test setting a suggested value on an input element.
The dump below should have the "suggested value" instead of "initial value".
| <input>
| id="test"
| type="text"
| value="initial value"
| this.value="initial value"
| <shadow:root>
| <div>
| "suggested value"
| "input.value: initial value"
| "internals.suggestedValue(input): suggested value"
| "input.selectionStart: 0"
| "input.selectionEnd: 0"
<!DOCTYPE html>
<html>
<body>
<p id="description">This test setting a suggested value on an input element.
The dump below should have the "suggested value" instead of "initial value".</p>
<pre><input id="test" type="text" value="initial value"></pre>
<script src="../../resources/dump-as-markup.js"></script>
<script>
var input = document.getElementById('test');
var result = document.getElementById('result');
if (!window.internals)
testFailed('This test requires internals object');
else {
input.focus();
input.selectionStart = input.selectionEnd = 0;
internals.setSuggestedValue(input, 'suggested value');
Markup.description(document.getElementById('description').textContent)
function addTextResult(value) { input.parentNode.appendChild(document.createTextNode(value + ': ' + eval(value))); }
addTextResult('input.value');
addTextResult('internals.suggestedValue(input)');
addTextResult('input.selectionStart');
addTextResult('input.selectionEnd');
Markup.dump(input.parentNode);
}
</script>
</body>
</html>
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Fixed the bug by updating inner text value in setSuggestedValue.
Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes.
Test: fast/forms/suggested-value.html
* WebCore.exp.in:
* testing/Internals.cpp:
(WebCore::Internals::suggestedValue):
(WebCore::Internals::setSuggestedValue):
* testing/Internals.h:
* testing/Internals.idl:
2011-09-06 Eric Carlson <eric.carlson@apple.com>
 
load() does not reset the resource selection algorithm
......@@ -452,6 +452,7 @@ __ZN7WebCore16FontPlatformDataC1EP6NSFontfbbNS_15FontOrientationENS_15TextOrient
__ZN7WebCore16FontPlatformDataD1Ev
__ZN7WebCore16HTMLInputElement13setAutofilledEb
__ZN7WebCore16HTMLInputElement15setValueForUserERKN3WTF6StringE
__ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE
__ZN7WebCore16IconDatabaseBase28synchronousIconURLForPageURLERKN3WTF6StringE
__ZN7WebCore16IconDatabaseBase4openERKN3WTF6StringES4_
__ZN7WebCore16LegacyWebArchive19createFromSelectionEPNS_5FrameE
......@@ -1182,6 +1183,7 @@ __ZNK7WebCore15VisiblePosition4nextENS_27EditingBoundaryCrossingRuleE
__ZNK7WebCore15VisiblePosition8previousENS_27EditingBoundaryCrossingRuleE
__ZNK7WebCore16FontFallbackList10fontDataAtEPKNS_4FontEj
__ZNK7WebCore16HTMLInputElement11isTextFieldEv
__ZNK7WebCore16HTMLInputElement14suggestedValueEv
__ZNK7WebCore16HTMLInputElement15isPasswordFieldEv
__ZNK7WebCore16HTMLInputElement18shouldAutocompleteEv
__ZNK7WebCore16IconDatabaseBase12databasePathEv
......
......@@ -1073,9 +1073,8 @@ void HTMLInputElement::setSuggestedValue(const String& value)
setFormControlValueMatchesRenderer(false);
m_suggestedValue = sanitizeValue(value);
updatePlaceholderVisibility(false);
if (renderer())
renderer()->updateFromElement();
setNeedsStyleRecalc();
updateInnerTextValue();
}
void HTMLInputElement::setValue(const String& value, bool sendChangeEvent)
......
......@@ -303,4 +303,34 @@ bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode& ec)
return false;
}
String Internals::suggestedValue(Element* inputElement, ExceptionCode& ec)
{
if (!inputElement) {
ec = INVALID_ACCESS_ERR;
return String();
}
if (!inputElement->hasTagName(HTMLNames::inputTag)) {
ec = INVALID_NODE_TYPE_ERR;
return String();
}
return static_cast<HTMLInputElement*>(inputElement)->suggestedValue();
}
void Internals::setSuggestedValue(Element* inputElement, const String& value, ExceptionCode& ec)
{
if (!inputElement) {
ec = INVALID_ACCESS_ERR;
return;
}
if (!inputElement->hasTagName(HTMLNames::inputTag)) {
ec = INVALID_NODE_TYPE_ERR;
return;
}
static_cast<HTMLInputElement*>(inputElement)->setSuggestedValue(value);
}
}
......@@ -82,6 +82,8 @@ public:
void setPasswordEchoDurationInSeconds(Document*, double durationInSeconds, ExceptionCode&);
bool wasLastChangeUserEdit(Element* textField, ExceptionCode&);
String suggestedValue(Element* inputElement, ExceptionCode&);
void setSuggestedValue(Element* inputElement, const String&, ExceptionCode&);
static const char* internalsId;
......
......@@ -56,6 +56,8 @@ module window {
void setPasswordEchoDurationInSeconds(in Document document, in double durationInSeconds) raises(DOMException);
boolean wasLastChangeUserEdit(in Element textField) raises (DOMException);
DOMString suggestedValue(in Element inputElement) raises (DOMException);
void setSuggestedValue(in Element inputElement, in DOMString value) raises (DOMException);
};
}
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Chromium code incorrectly calls Node::isFocusable without updating layout, and was hitting assertions.
Fix the assertion failure (and a potential crash) by updating layout in WebCore::isFocusable.
* src/WebNode.cpp:
(WebKit::WebNode::isFocusable):
2011-09-04 Adam Barth <abarth@webkit.org>
[Chromium] Add mutliple to WebPopupMenuInfo for Android
......
......@@ -147,6 +147,7 @@ bool WebNode::isTextNode() const
bool WebNode::isFocusable() const
{
m_private->document()->updateLayout();
return m_private->isFocusable();
}
......
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
https://bugs.webkit.org/show_bug.cgi?id=67453
Reviewed by Kent Tamura.
Add symbols for internals.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-06 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
[GTK] Use soup_session_add_feature_by_type uniformly in WebKit2.
......
......@@ -165,8 +165,10 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
?textareaTag@HTMLNames@WebCore@@3VQualifiedName@2@B
?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
......
......@@ -159,8 +159,10 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
?textareaTag@HTMLNames@WebCore@@3VQualifiedName@2@B
?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z
?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z
......
......@@ -46,6 +46,7 @@ _ZN7WebCore12JSDOMWrapper34virtualFunctionToPreventWeakVtableEv;
_ZN7WebCore12RenderObject23absoluteBoundingBoxRectEb;
_ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE;
_ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi;
_ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE;
_ZN7WebCore16jsStringSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_10StringHashENS3_10HashTraitsIS6_EENSB_IS9_EEEES6_;
_ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE;
_ZN7WebCore19InspectorController39setResourcesDataSizeLimitsFromInternalsEii;
......@@ -64,6 +65,7 @@ _ZN7WebCore7Element16removeShadowRootEv;
_ZN7WebCore9JSElement3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE;
_ZN7WebCore9JSElement6s_infoE;
_ZN7WebCore9toElementEN3JSC7JSValueE;
_ZNK7WebCore16HTMLInputElement14suggestedValueEv;
_ZNK7WebCore20CachedResourceLoader11isPreloadedERKN3WTF6StringE;
_ZNK7WebCore26HTMLTextFormControlElement21lastChangeWasUserEditEv;
_ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment