diff --git a/layout/forms/nsGfxButtonControlFrame.h b/layout/forms/nsGfxButtonControlFrame.h index efb56a776b748..9f7700e7215d8 100644 --- a/layout/forms/nsGfxButtonControlFrame.h +++ b/layout/forms/nsGfxButtonControlFrame.h @@ -343,17 +343,6 @@ nsString aLabel ) ; -virtual -bool -IsInput -( -) -override -{ -return -true -; -} private : RefPtr diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index 6cfd3b9ec0f62..ab29dd79a2063 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -156,13 +156,6 @@ h # include " -nsIFrameInlines -. -h -" -# -include -" nsPresContext . h @@ -184,20 +177,6 @@ h # include " -nsCSSAnonBoxes -. -h -" -# -include -" -nsNameSpaceManager -. -h -" -# -include -" nsDisplayList . h @@ -451,12 +430,25 @@ ShouldClipPaintingToBorderBox ( ) { -return -IsInput +/ +/ +FIXME ( +emilio ) -| -| +: +probably +should +account +for +per +- +axis +clipping +. +. +. +return StyleDisplay ( ) diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 0200fda915acc..8df3b4417ecfa 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -517,16 +517,6 @@ ClassID aID ) ; -virtual -bool -IsInput -( -) -{ -return -false -; -} / / Indicates diff --git a/layout/reftests/css-grid/grid-item-overflow-stretch-005-ref.html b/layout/reftests/css-grid/grid-item-overflow-stretch-005-ref.html index bef040975cc02..981f5f224ec9a 100644 --- a/layout/reftests/css-grid/grid-item-overflow-stretch-005-ref.html +++ b/layout/reftests/css-grid/grid-item-overflow-stretch-005-ref.html @@ -242,6 +242,8 @@ os . oh +. +ov { width : @@ -264,6 +266,10 @@ m . oh +. +m +. +ov { width : diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 2d71011e24eb9..a19347c55927c 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -3109,6 +3109,16 @@ select : none ; +overflow +- +clip +- +box +: +padding +- +box +; } / * @@ -3185,16 +3195,6 @@ align : center ; -overflow -- -clip -- -box -: -padding -- -box -; padding - inline @@ -3226,6 +3226,54 @@ padding 4px ; } +/ +* +https +: +/ +/ +github +. +com +/ +whatwg +/ +html +/ +issues +/ +9976 +* +/ +input +: +not +( +[ +type += +image +i +] +) +{ +overflow +: +clip +! +important +; +overflow +- +clip +- +margin +: +0px +! +important +; +} button : : diff --git a/layout/style/test/test_dynamic_change_causing_reflow.html b/layout/style/test/test_dynamic_change_causing_reflow.html index a39f214ae6093..487643f4fbf4f 100644 --- a/layout/style/test/test_dynamic_change_causing_reflow.html +++ b/layout/style/test/test_dynamic_change_causing_reflow.html @@ -438,6 +438,11 @@ " inputElem " +type += +" +image +" > < textarea diff --git a/testing/web-platform/tests/html/rendering/widgets/button-layout/computed-style.html b/testing/web-platform/tests/html/rendering/widgets/button-layout/computed-style.html index bece8a22c51a1..58dfd51e020d8 100644 --- a/testing/web-platform/tests/html/rendering/widgets/button-layout/computed-style.html +++ b/testing/web-platform/tests/html/rendering/widgets/button-layout/computed-style.html @@ -89,6 +89,14 @@ " > < +input +type += +" +image +" +> +< button > < @@ -486,6 +494,185 @@ ) ; } +for +( +let +input +of +document +. +querySelectorAll +( +" +input +" +) +) +{ +test +( +( +) += +> +{ +if +( +input +. +type += += +" +image +" +) +{ +assert_equals +( +getComputedStyle +( +input +) +. +overflow +" +visible +" +" +Should +not +be +clip +by +default +" +) +; +return +; +} +assert_equals +( +getComputedStyle +( +input +) +. +overflow +" +clip +" +" +Should +be +clip +by +default +" +) +; +assert_equals +( +getComputedStyle +( +input +) +. +overflowClipMargin +" +0px +" +" +Should +use +0 +margin +" +) +; +input +. +style +. +overflow += +" +visible +" +; +input +. +style +. +overflowClipMargin += +" +10px +" +; +assert_equals +( +getComputedStyle +( +input +) +. +overflow +" +clip +" +" +Clip +be +! +important +" +) +; +assert_equals +( +getComputedStyle +( +input +) +. +overflowClipMargin +" +0px +" +" +Clip +margin +should +be +! +important +too +" +) +; +} +< +input +type += +{ +input +. +type +} +> +overflow +/ +overflow +- +clip +- +margin +) +; +} < / script diff --git a/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html b/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html new file mode 100644 index 0000000000000..0fd796cb0f61d --- /dev/null +++ b/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html @@ -0,0 +1,37 @@ +< +! +doctype +html +> +< +style +> +button +{ +width +: +10ch +; +overflow +: +clip +; +text +- +overflow +: +ellipsis +; +} +< +/ +style +> +< +button +> +aaaaaaaaaaaaaaaaaaaaaa +< +/ +button +> diff --git a/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip.html b/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip.html new file mode 100644 index 0000000000000..68d605aaad223 --- /dev/null +++ b/testing/web-platform/tests/html/rendering/widgets/button-layout/input-type-button-clip.html @@ -0,0 +1,196 @@ +< +! +doctype +html +> +< +meta +charset += +" +utf +- +8 +" +> +< +title +> +button +input +is +clipped +by +default +and +text +- +overflow +: +ellipsis +works +< +/ +title +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +github +. +com +/ +whatwg +/ +html +/ +issues +/ +9976 +" +> +< +link +rel += +" +help +" +href += +" +https +: +/ +/ +bugzilla +. +mozilla +. +org +/ +show_bug +. +cgi +? +id += +1800077 +" +> +< +link +rel += +" +author +" +title += +" +Emilio +Cobos +lvarez +" +href += +" +mailto +: +emilio +crisal +. +io +" +> +< +link +rel += +" +author +" +title += +" +Mozilla +" +href += +" +https +: +/ +/ +mozilla +. +org +" +> +< +link +rel += +" +match +" +href += +" +input +- +type +- +button +- +clip +- +ref +. +html +" +> +< +style +> +input +{ +width +: +10ch +; +text +- +overflow +: +ellipsis +; +} +< +/ +style +> +< +input +type += +" +button +" +value += +" +aaaaaaaaaaaaaaaaaaaaaa +" +>