WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
93556
Page popups can show up at wrong locations
https://bugs.webkit.org/show_bug.cgi?id=93556
Summary
Page popups can show up at wrong locations
Keishi Hattori
Reported
2012-08-08 17:07:28 PDT
ColorChooserUIController::contentSize is returning a size that is too big.
Attachments
Patch
(7.75 KB, patch)
2012-08-08 18:34 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Screenshot
(67.51 KB, image/png)
2012-08-09 00:19 PDT
,
Keishi Hattori
no flags
Details
Patch
(8.33 KB, patch)
2012-08-09 01:01 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(7.31 KB, patch)
2012-08-09 01:25 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(7.53 KB, patch)
2012-08-09 01:43 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2012-08-08 18:34:23 PDT
Created
attachment 157360
[details]
Patch
Kent Tamura
Comment 2
2012-08-09 00:15:18 PDT
I'm not sure why this problem happens. We have a code to adjust position on resizing in PagePopupChromeClient::setWindowRect().
Keishi Hattori
Comment 3
2012-08-09 00:19:57 PDT
Created
attachment 157405
[details]
Screenshot It seems to be because there isn't enough room above the element.
Kent Tamura
Comment 4
2012-08-09 00:29:30 PDT
(In reply to
comment #3
)
> Created an attachment (id=157405) [details] > Screenshot > > It seems to be because there isn't enough room above the element.
ok, I understand. We have no enough room both below the element and above the element, and the current algorithm in setWindowRect() can't correct the bottom position. IMO, reposition() should be called in PagePopupChromeClient::setWindowRect(), not in WebPagePopupImpl::resize(), and we can remove the current code of PagePopupChromeClient::setWindowRect().
Kent Tamura
Comment 5
2012-08-09 00:31:38 PDT
Comment on
attachment 157360
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157360&action=review
> Source/WebCore/Resources/colorSuggestionPicker.js:94 > var errorString = validateArguments(args); > - if (errorString) > + if (errorString) { > main.textContent = "Internal error: " + errorString; > - else > + updateWindowSize(); > + } else { > new ColorPicker(main, args); > + } > }
It seems this change is not related to this bug. Do you need to change WebCore to fix this bug?
Keishi Hattori
Comment 6
2012-08-09 00:59:20 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > Created an attachment (id=157405) [details] [details] > > Screenshot > > > > It seems to be because there isn't enough room above the element. > > ok, I understand. We have no enough room both below the element and above the element, and the current algorithm in setWindowRect() can't correct the bottom position. > > IMO, reposition() should be called in PagePopupChromeClient::setWindowRect(), not in WebPagePopupImpl::resize(), and we can remove the current code of PagePopupChromeClient::setWindowRect().
It would be too late to call reposition in setWindowRect, because setWindowRect takes the screen rect and we can only know the screen rect by calling reposition.
Keishi Hattori
Comment 7
2012-08-09 01:00:17 PDT
(In reply to
comment #5
)
> (From update of
attachment 157360
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=157360&action=review
> > > Source/WebCore/Resources/colorSuggestionPicker.js:94 > > var errorString = validateArguments(args); > > - if (errorString) > > + if (errorString) { > > main.textContent = "Internal error: " + errorString; > > - else > > + updateWindowSize(); > > + } else { > > new ColorPicker(main, args); > > + } > > } > > It seems this change is not related to this bug. Do you need to change WebCore to fix this bug?
If we return 0x0 for contentSize we won't be able to see the error message.
Keishi Hattori
Comment 8
2012-08-09 01:01:56 PDT
Created
attachment 157411
[details]
Patch
Kent Tamura
Comment 9
2012-08-09 01:04:06 PDT
(In reply to
comment #7
)
> (In reply to
comment #5
) > > (From update of
attachment 157360
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=157360&action=review
> > > > > Source/WebCore/Resources/colorSuggestionPicker.js:94 > > > var errorString = validateArguments(args); > > > - if (errorString) > > > + if (errorString) { > > > main.textContent = "Internal error: " + errorString; > > > - else > > > + updateWindowSize(); > > > + } else { > > > new ColorPicker(main, args); > > > + } > > > } > > > > It seems this change is not related to this bug. Do you need to change WebCore to fix this bug? > > If we return 0x0 for contentSize we won't be able to see the error message.
We never show the error message to end users as far as we know, right? This change should be done in a separated patch.
Kent Tamura
Comment 10
2012-08-09 01:07:20 PDT
Comment on
attachment 157411
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157411&action=review
> Source/WebKit/chromium/src/ColorChooserUIController.cpp:95 > - return WebCore::IntSize(300, 300); > + return WebCore::IntSize(0, 0);
Would you update CalendarPickerElement::contentSize too please?
> Source/WebKit/chromium/src/WebPagePopupImpl.cpp:241 > + m_isPutAboveOrigin = true;
We can remove WebPagePopupImpl::m_isPutAboveOrigin.
Keishi Hattori
Comment 11
2012-08-09 01:25:28 PDT
Created
attachment 157420
[details]
Patch
Keishi Hattori
Comment 12
2012-08-09 01:25:37 PDT
> We never show the error message to end users as far as we know, right? This change should be done in a separated patch.
Done. (In reply to
comment #10
)
> (From update of
attachment 157411
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=157411&action=review
> > > Source/WebKit/chromium/src/ColorChooserUIController.cpp:95 > > - return WebCore::IntSize(300, 300); > > + return WebCore::IntSize(0, 0); > > Would you update CalendarPickerElement::contentSize too please?
Done.
> > Source/WebKit/chromium/src/WebPagePopupImpl.cpp:241 > > + m_isPutAboveOrigin = true; > > We can remove WebPagePopupImpl::m_isPutAboveOrigin.
Done.
Kent Tamura
Comment 13
2012-08-09 01:28:07 PDT
Comment on
attachment 157420
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=157420&action=review
> Source/WebKit/chromium/ChangeLog:3 > + Color suggestion popup shows up in wrong locations
Should be updated.
> Source/WebKit/chromium/ChangeLog:8 > + We need to reposition the page popup every time we resize it.
We had better explain what was wrong.
Keishi Hattori
Comment 14
2012-08-09 01:43:18 PDT
Created
attachment 157425
[details]
Patch
WebKit Review Bot
Comment 15
2012-08-09 05:43:38 PDT
Comment on
attachment 157425
[details]
Patch Clearing flags on attachment: 157425 Committed
r125169
: <
http://trac.webkit.org/changeset/125169
>
WebKit Review Bot
Comment 16
2012-08-09 05:43:41 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug