WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57290
Make validation message bubble testable
https://bugs.webkit.org/show_bug.cgi?id=57290
Summary
Make validation message bubble testable
Kent Tamura
Reported
2011-03-28 18:07:36 PDT
Validation message bubble is not testable for now because it disappears automatically in some seconds. We need to have a way to test it. a) Disable the timer if DumpRenderTree is running Does every port have a flag like Chromium's WebKit::layoutTestMode() ? b) Add a LayoutTestController method, like layoutTestController.setValidationMessagePresentingDuration(int minusValueMeansInfinity) ...
Attachments
Patch
(40.41 KB, patch)
2011-03-29 19:09 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2011-03-29 19:09:07 PDT
Created
attachment 87451
[details]
Patch
Dimitri Glazkov (Google)
Comment 2
2011-03-29 19:12:40 PDT
Comment on
attachment 87451
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87451&action=review
> Source/WebCore/html/ValidationMessage.cpp:103 > + int magnification = doc->page() ? doc->page()->settings()->validationMessageTimerMaginification() : -1; > + if (magnification <= 0) > + m_timer.clear(); > + else { > + m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree)); > + m_timer->startOneShot(max(5.0, static_cast<double>(m_message.length()) * magnification / 1000)); > + }
Why do we need the concept of magnification? Can it just be N seconds or indefinite switch?
Kent Tamura
Comment 3
2011-03-29 19:28:21 PDT
Comment on
attachment 87451
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=87451&action=review
>> Source/WebCore/html/ValidationMessage.cpp:103 >> + } > > Why do we need the concept of magnification? Can it just be N seconds or indefinite switch?
"Just N seconds" won't work well because a page author can specify very long validation messages and a user might be unable to read it in N seconds. I was not confident that length() / 20.0 in the original code was always reasonable in any language and I'd like to provide a way to configure the magnification. But the indefinite switch may be enough.
Dimitri Glazkov (Google)
Comment 4
2011-03-29 19:30:49 PDT
Comment on
attachment 87451
[details]
Patch ok.
Kent Tamura
Comment 5
2011-03-29 21:14:59 PDT
Comment on
attachment 87451
[details]
Patch Clearing flags on attachment: 87451 Committed
r82386
: <
http://trac.webkit.org/changeset/82386
>
Kent Tamura
Comment 6
2011-03-29 21:15:05 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