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

Will wait till that is settled to land this.

MANUAL PUSH: See bug 1871425

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

UltraBlame original commit: 1fb09caf9d62bdc3b7449621fa8a8deb132a1070
  • Loading branch information
marco-c committed Jan 1, 2024
1 parent ded9441 commit 5a8c28e
Show file tree
Hide file tree
Showing 9 changed files with 506 additions and 56 deletions.
11 changes: 0 additions & 11 deletions layout/forms/nsGfxButtonControlFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,6 @@ nsString
aLabel
)
;
virtual
bool
IsInput
(
)
override
{
return
true
;
}
private
:
RefPtr
Expand Down
42 changes: 17 additions & 25 deletions layout/forms/nsHTMLButtonControlFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ h
#
include
"
nsIFrameInlines
.
h
"
#
include
"
nsPresContext
.
h
Expand All @@ -184,20 +177,6 @@ h
#
include
"
nsCSSAnonBoxes
.
h
"
#
include
"
nsNameSpaceManager
.
h
"
#
include
"
nsDisplayList
.
h
Expand Down Expand Up @@ -451,12 +430,25 @@ ShouldClipPaintingToBorderBox
(
)
{
return
IsInput
/
/
FIXME
(
emilio
)
|
|
:
probably
should
account
for
per
-
axis
clipping
.
.
.
return
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 @@ -517,16 +517,6 @@ ClassID
aID
)
;
virtual
bool
IsInput
(
)
{
return
false
;
}
/
/
Indicates
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 5a8c28e

Please sign in to comment.