Skip to content

Commit

Permalink
Bug 1800077 - Make <input type=button> magic clip not magic. r=jwatt,…
Browse files Browse the repository at this point in the history
…zcorpan

This implements the proposal in: whatwg/html#9976

MANUAL PUSH: see bug 1871425

Differential Revision: https://phabricator.services.mozilla.com/D195419

UltraBlame original commit: 6a14f603289807a62753cc8ceaa35d9ba09cbf61
  • Loading branch information
marco-c committed Jan 1, 2024
1 parent 1780033 commit a0229aa
Show file tree
Hide file tree
Showing 9 changed files with 491 additions and 52 deletions.
11 changes: 0 additions & 11 deletions layout/forms/nsGfxButtonControlFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,6 @@ nsString
aLabel
)
;
virtual
bool
IsInput
(
)
override
{
return
true
;
}
private
:
RefPtr
Expand Down
23 changes: 2 additions & 21 deletions layout/forms/nsHTMLButtonControlFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ h
#
include
"
nsIFrameInlines
nsPresContext
.
h
"
#
include
"
nsPresContext
nsLayoutUtils
.
h
"
Expand All @@ -68,20 +68,6 @@ h
#
include
"
nsCSSAnonBoxes
.
h
"
#
include
"
nsNameSpaceManager
.
h
"
#
include
"
nsDisplayList
.
h
Expand Down Expand Up @@ -301,11 +287,6 @@ ShouldClipPaintingToBorderBox
)
{
return
IsInput
(
)
|
|
StyleDisplay
(
)
Expand Down
10 changes: 0 additions & 10 deletions layout/forms/nsHTMLButtonControlFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,6 @@ ClassID
aID
)
;
virtual
bool
IsInput
(
)
{
return
false
;
}
bool
ShouldClipPaintingToBorderBox
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@
os
.
oh
.
ov
{
width
:
Expand All @@ -264,6 +266,10 @@
m
.
oh
.
m
.
ov
{
width
:
Expand Down
68 changes: 58 additions & 10 deletions layout/style/res/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,16 @@ select
:
none
;
overflow
-
clip
-
box
:
padding
-
box
;
}
/
*
Expand Down Expand Up @@ -3185,16 +3195,6 @@ align
:
center
;
overflow
-
clip
-
box
:
padding
-
box
;
padding
-
inline
Expand Down Expand Up @@ -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
:
:
Expand Down
5 changes: 5 additions & 0 deletions layout/style/test/test_dynamic_change_causing_reflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@
"
inputElem
"
type
=
"
image
"
>
<
textarea
Expand Down
Loading

0 comments on commit a0229aa

Please sign in to comment.