зеркало из https://github.com/mozilla/pjs.git
Bug 676387 - XUL elements with -moz-appearance should ignore clicks in their overflow. r=roc
This commit is contained in:
Родитель
9059d8ade3
Коммит
af84afa5c3
|
@ -1023,12 +1023,15 @@ nsDisplayBackground::HitTest(nsDisplayListBuilder* aBuilder,
|
|||
HitTestState* aState,
|
||||
nsTArray<nsIFrame*> *aOutFrames)
|
||||
{
|
||||
// For theme backgrounds, assume that any point in our bounds is a hit.
|
||||
// We don't know the true hit region of the theme background.
|
||||
if (!mIsThemed &&
|
||||
!RoundedBorderIntersectsRect(mFrame, ToReferenceFrame(), aRect)) {
|
||||
// aRect doesn't intersect our border-radius curve.
|
||||
return;
|
||||
if (mIsThemed) {
|
||||
// For theme backgrounds, assume that any point in our border rect is a hit.
|
||||
if (!nsRect(ToReferenceFrame(), mFrame->GetSize()).Intersects(aRect))
|
||||
return;
|
||||
} else {
|
||||
if (!RoundedBorderIntersectsRect(mFrame, ToReferenceFrame(), aRect)) {
|
||||
// aRect doesn't intersect our border-radius curve.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
aOutFrames->AppendElement(mFrame);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<window id="window676387-1-ref"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<hbox><button id="button" label="SUCCESS"/></hbox>
|
||||
</window>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<window id="window676387-1"
|
||||
class="reftest-wait"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="var button = document.getElementById('button');
|
||||
var r = button.getBoundingClientRect();
|
||||
if (document.elementFromPoint(r.right, r.top) == button.parentNode)
|
||||
button.label = 'SUCCESS';
|
||||
document.documentElement.className = '';">
|
||||
<hbox><button id="button" label="FAIL"/></hbox>
|
||||
</window>
|
|
@ -78,3 +78,5 @@ skip-if(!winWidget) == scroll-thumb-minimum-size-notheme.html scroll-thumb-minim
|
|||
# animated progress bars.
|
||||
skip-if(cocoaWidget) skip-if(winWidget) == progress-overflow.html progress-overflow-ref.html
|
||||
skip-if(cocoaWidget) skip-if(winWidget) != progress-overflow-small.html progress-nobar.html
|
||||
|
||||
== 676387-1.xul 676387-1-ref.xul
|
||||
|
|
Загрузка…
Ссылка в новой задаче