WebKit Bugzilla
Attachment 370736 Details for
Bug 107380
: Specifying the width/height of an input element modifies its margin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
To check layout test result
bug-107380-20190528233413.patch (text/plain), 3.36 KB, created by
Joonghun Park
on 2019-05-28 07:34:14 PDT
(
hide
)
Description:
To check layout test result
Filename:
MIME Type:
Creator:
Joonghun Park
Created:
2019-05-28 07:34:14 PDT
Size:
3.36 KB
patch
obsolete
>Subversion Revision: 245769 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6234cd5c2f62facd195452dee2cf55c41399d57a..17e2814ace889483ecb1cfa71a069012a4b8093b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-28 Joonghun Park <jh718.park@samsung.com> >+ >+ Remove |addIntrinsicMargins| for Form Control Elements. >+ https://bugs.webkit.org/show_bug.cgi?id=107380 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Currently, all form control elements except image button >+ get changed margin if width/height is specified by css. >+ For interoperability with other browsers, >+ remove this behavior. >+ >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::adjustRenderStyle): >+ (WebCore::addIntrinsicMargins): Deleted. >+ > 2019-05-24 Joonghun Park <jh718.park@samsung.com> > > Make computed width of non-replaced inline return computed style. >diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp >index 4e8113f5cdc195e9c897edb2221baa94077ef6ed..9f52c400534ba2f20e586dda492c1d548d3a8e15 100644 >--- a/Source/WebCore/css/StyleResolver.cpp >+++ b/Source/WebCore/css/StyleResolver.cpp >@@ -665,28 +665,6 @@ std::unique_ptr<RenderStyle> StyleResolver::defaultStyleForElement() > return m_state.takeStyle(); > } > >-static void addIntrinsicMargins(RenderStyle& style) >-{ >- // Intrinsic margin value. >- const int intrinsicMargin = clampToInteger(2 * style.effectiveZoom()); >- >- // FIXME: Using width/height alone and not also dealing with min-width/max-width is flawed. >- // FIXME: Using "hasQuirk" to decide the margin wasn't set is kind of lame. >- if (style.width().isIntrinsicOrAuto()) { >- if (style.marginLeft().hasQuirk()) >- style.setMarginLeft(Length(intrinsicMargin, Fixed)); >- if (style.marginRight().hasQuirk()) >- style.setMarginRight(Length(intrinsicMargin, Fixed)); >- } >- >- if (style.height().isAuto()) { >- if (style.marginTop().hasQuirk()) >- style.setMarginTop(Length(intrinsicMargin, Fixed)); >- if (style.marginBottom().hasQuirk()) >- style.setMarginBottom(Length(intrinsicMargin, Fixed)); >- } >-} >- > static DisplayType equivalentBlockDisplay(const RenderStyle& style, const Document& document) > { > switch (auto display = style.display()) { >@@ -1083,15 +1061,6 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par > style.adjustAnimations(); > style.adjustTransitions(); > >- // Important: Intrinsic margins get added to controls before the theme has adjusted the style, since the theme will >- // alter fonts and heights/widths. >- if (is<HTMLFormControlElement>(element) && style.computedFontPixelSize() >= 11) { >- // Don't apply intrinsic margins to image buttons. The designer knows how big the images are, >- // so we have to treat all image buttons as though they were explicitly sized. >- if (!is<HTMLInputElement>(*element) || !downcast<HTMLInputElement>(*element).isImageButton()) >- addIntrinsicMargins(style); >- } >- > // Let the theme also have a crack at adjusting the style. > if (style.hasAppearance()) > RenderTheme::singleton().adjustStyle(*this, style, element, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 107380
:
370736
|
370741
|
370742
|
370743
|
370744
|
370748
|
370841
|
370843
|
370844
|
370845
|
370846
|
370848
|
370896
|
392948
|
392949
|
392951
|
392960
|
393109
|
393380
|
393573
|
393598
|
393603
|
393979
|
393982
|
395043
|
395119
|
395177
|
395272
|
395375
|
395376
|
395426
|
395429
|
395433