Skip to content

Commit

Permalink
Bug 1266495 - Remove <isindex>. r=wchen
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: KM0sTMM1GaD

--HG--
extra : rebase_source : 013069be4191e2ad50b5af879b690a6760e8429a
  • Loading branch information
hsivonen committed Jul 5, 2017
1 parent 291faed commit 217ac88
Show file tree
Hide file tree
Showing 25 changed files with 325 additions and 683 deletions.
2 changes: 0 additions & 2 deletions dom/base/nsGkAtomList.h
Original file line number Diff line number Diff line change
Expand Up @@ -2645,8 +2645,6 @@ GK_ATOM(refx, "refx")
// ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
GK_ATOM(refy, "refy")
// ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
GK_ATOM(isindex, "isindex")
// ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
GK_ATOM(fefunca, "fefunca")
// ATOM GENERATED BY HTML PARSER TRANSLATOR (WILL BE AUTOMATICALLY OVERWRITTEN):
GK_ATOM(fefuncb, "fefuncb")
Expand Down
26 changes: 0 additions & 26 deletions dom/html/HTMLFormSubmission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ class FSURLEncoded : public EncodingFormSubmission
virtual nsresult
GetEncodedSubmission(nsIURI* aURI, nsIInputStream** aPostDataStream) override;

virtual bool SupportsIsindexSubmission() override
{
return true;
}

virtual nsresult AddIsindex(const nsAString& aValue) override;

protected:

/**
Expand Down Expand Up @@ -178,25 +171,6 @@ FSURLEncoded::AddNameValuePair(const nsAString& aName,
return NS_OK;
}

nsresult
FSURLEncoded::AddIsindex(const nsAString& aValue)
{
// Encode value
nsCString convValue;
nsresult rv = URLEncode(aValue, convValue);
NS_ENSURE_SUCCESS(rv, rv);

// Append data to string
if (mQueryString.IsEmpty()) {
Telemetry::Accumulate(Telemetry::FORM_ISINDEX_USED, true);
mQueryString.Assign(convValue);
} else {
mQueryString += NS_LITERAL_CSTRING("&isindex=") + convValue;
}

return NS_OK;
}

nsresult
FSURLEncoded::AddNameBlobOrNullPair(const nsAString& aName,
Blob* aBlob)
Expand Down
21 changes: 0 additions & 21 deletions dom/html/HTMLFormSubmission.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,6 @@ class HTMLFormSubmission
virtual nsresult AddNameDirectoryPair(const nsAString& aName,
Directory* aDirectory) = 0;

/**
* Reports whether the instance supports AddIsindex().
*
* @return true if supported.
*/
virtual bool SupportsIsindexSubmission()
{
return false;
}

/**
* Adds an isindex value to the submission.
*
* @param aValue the field value
*/
virtual nsresult AddIsindex(const nsAString& aValue)
{
NS_NOTREACHED("AddIsindex called when not supported");
return NS_ERROR_UNEXPECTED;
}

/**
* Given a URI and the current submission, create the final URI and data
* stream that will be submitted. Subclasses *must* implement this.
Expand Down
5 changes: 0 additions & 5 deletions dom/html/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6462,11 +6462,6 @@ HTMLInputElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission)
value = defaultValue;
}

if (IsSingleLineTextControl(true) &&
name.EqualsLiteral("isindex") &&
aFormSubmission->SupportsIsindexSubmission()) {
return aFormSubmission->AddIsindex(value);
}
return aFormSubmission->AddNameValuePair(name, value);
}

Expand Down
9 changes: 2 additions & 7 deletions dom/locales/en-US/chrome/layout/HtmlForm.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ Browse=Browse…
FileUpload=File Upload
DirectoryUpload=Select Folder to Upload
DirectoryPickerOkButtonLabel=Upload
# LOCALIZATION NOTE (IsIndexPromptWithSpace): The last character of the string
# should be a space (U+0020) in most locales. The prompt is followed by an
# input field. The space needs be escaped in the property file to avoid
# trimming.
IsIndexPromptWithSpace=This is a searchable index. Enter search keywords:\u0020
ForgotPostWarning=Form contains enctype=%S, but does not contain method=post. Submitting normally with method=GET and no enctype instead.
ForgotFileEnctypeWarning=Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form. The file will not be sent.
# LOCALIZATION NOTE (DefaultFormSubject): %S will be replaced with brandShortName
Expand All @@ -34,8 +29,8 @@ NoDirSelected=No directory selected.
# %S will be a number greater or equal to 2.
XFilesSelected=%S files selected.
ColorPicker=Choose a color
# LOCALIZATION NOTE (AndNMoreFiles): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# LOCALIZATION NOTE (AndNMoreFiles): Semi-colon list of plural forms.
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# This string is shown at the end of the tooltip text for <input type='file'
# multiple> when there are more than 21 files selected (when we will only list
# the first 20, plus an "and X more" line). #1 represents the number of files
Expand Down
5 changes: 2 additions & 3 deletions dom/locales/en-US/chrome/layout/htmlparser.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ EncBomlessUtf16=Detected UTF-16-encoded Basic Latin-only text without a byte ord
EncMetaUtf16=A meta tag was used to declare the character encoding as UTF-16. This was interpreted as an UTF-8 declaration instead.
EncMetaUserDefined=A meta tag was used to declare the character encoding as x-user-defined. This was interpreted as a windows-1252 declaration instead for compatibility with intentionally mis-encoded legacy fonts. This site should migrate to Unicode.

# The bulk of the messages below are derived from
# The bulk of the messages below are derived from
# https://hg.mozilla.org/projects/htmlparser/file/1f633cef7de7/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java
# which is available under the MIT license.

Expand Down Expand Up @@ -104,7 +104,6 @@ errStartSelectWhereEndSelectExpected=“select” start tag where end tag expect
errStartTagWithSelectOpen=“%1$S” start tag with “select” open.
errBadStartTagInHead2=Bad start tag “%1$S” in “head”.
errImage=Saw a start tag “image”.
errIsindex=“isindex” seen.
errFooSeenWhenFooOpen=An “%1$S” start tag seen but an element of the same type was already open.
errHeadingWhenHeadingOpen=Heading cannot be a child of another heading.
errFramesetStart=“frameset” start tag seen.
Expand All @@ -129,4 +128,4 @@ errSelfClosing=Self-closing syntax (“/>”) used on a non-void HTML element. I
errNoCheckUnclosedElementsOnStack=Unclosed elements on stack.
errEndTagDidNotMatchCurrentOpenElement=End tag “%1$S” did not match the name of the current open element (“%2$S”).
errEndTagViolatesNestingRules=End tag “%1$S” violates nesting rules.
errEndWithUnclosedElements=End tag for “%1$S” seen, but there were unclosed elements.
errEndWithUnclosedElements=End tag for “%1$S” seen, but there were unclosed elements.
Loading

0 comments on commit 217ac88

Please sign in to comment.