Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hspace and vspace attributes from input field #8083

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ PASS <input width> should not be mapped to style width in CSS1Compat mode
PASS <input width> should not be mapped to style width in BackCompat mode
PASS <input height> should not be mapped to style height in CSS1Compat mode
PASS <input height> should not be mapped to style height in BackCompat mode
FAIL <input hspace> should not be mapped to style marginLeft in CSS1Compat mode assert_equals: expected "0px" but got "200px"
FAIL <input hspace> should not be mapped to style marginLeft in BackCompat mode assert_equals: expected "0px" but got "200px"
FAIL <input hspace> should not be mapped to style marginRight in CSS1Compat mode assert_equals: expected "0px" but got "200px"
FAIL <input hspace> should not be mapped to style marginRight in BackCompat mode assert_equals: expected "0px" but got "200px"
FAIL <input vspace> should not be mapped to style marginTop in CSS1Compat mode assert_equals: expected "0px" but got "200px"
FAIL <input vspace> should not be mapped to style marginTop in BackCompat mode assert_equals: expected "0px" but got "200px"
FAIL <input vspace> should not be mapped to style marginBottom in CSS1Compat mode assert_equals: expected "0px" but got "200px"
FAIL <input vspace> should not be mapped to style marginBottom in BackCompat mode assert_equals: expected "0px" but got "200px"
PASS <input hspace> should not be mapped to style marginLeft in CSS1Compat mode
PASS <input hspace> should not be mapped to style marginLeft in BackCompat mode
PASS <input hspace> should not be mapped to style marginRight in CSS1Compat mode
PASS <input hspace> should not be mapped to style marginRight in BackCompat mode
PASS <input vspace> should not be mapped to style marginTop in CSS1Compat mode
PASS <input vspace> should not be mapped to style marginTop in BackCompat mode
PASS <input vspace> should not be mapped to style marginBottom in CSS1Compat mode
PASS <input vspace> should not be mapped to style marginBottom in BackCompat mode

8 changes: 6 additions & 2 deletions Source/WebCore/html/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,15 @@ bool HTMLInputElement::hasPresentationalHintsForAttribute(const QualifiedName& n
void HTMLInputElement::collectPresentationalHintsForAttribute(const QualifiedName& name, const AtomString& value, MutableStyleProperties& style)
{
if (name == vspaceAttr) {
addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
if (isImageButton()) {
addHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
addHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
}
} else if (name == hspaceAttr) {
if (isImageButton()) {
addHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
addHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
}
Comment on lines 684 to +688
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the indentation be fixed up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooopsie. @nt1m what's the best way to do that usually. Open a new webkit bug with a fix?

} else if (name == alignAttr) {
if (m_inputType->shouldRespectAlignAttribute())
applyAlignmentAttributeToStyle(value, style);
Expand Down