Changeset 82386 in webkit
- Timestamp:
- Mar 29, 2011 9:14:46 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r82384 r82386 1 2011-03-29 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Make validation message bubble testable 6 https://bugs.webkit.org/show_bug.cgi?id=57290 7 8 Add a new test for validation message bubble, and skip it on non-Mac platforms. 9 10 * fast/forms/validation-message-appearance.html: Added. 11 * platform/chromium/test_expectations.txt: 12 * platform/gtk/Skipped: 13 * platform/mac/fast/forms/validation-message-appearance-expected.checksum: Added. 14 * platform/mac/fast/forms/validation-message-appearance-expected.png: Added. 15 * platform/mac/fast/forms/validation-message-appearance-expected.txt: Added. 16 * platform/qt/Skipped: 17 * platform/win/Skipped: 18 1 19 2011-03-29 Adam Barth <abarth@webkit.org> 2 20 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r82384 r82386 778 778 // The feature was disabled due to a compatibility issue. 779 779 BUGWK40520 : fast/forms/interactive-validation-lost-focusable.html = TEXT 780 // Needs to call Settings::setValidationMessageTimerMagnification(-1). 781 BUGWK57290 : fast/forms/validation-message-appearance.html = PASS FAIL 780 782 781 783 // These tests need to be changed to be platform independent. -
trunk/LayoutTests/platform/gtk/Skipped
r82342 r82386 1128 1128 fast/forms/interactive-validation-select-crash.html 1129 1129 fast/forms/interactive-validation-crash-by-style-override.html 1130 fast/forms/validation-message-appearance.html 1130 1131 1131 1132 # Tests that seem to be Mac only, assume that smart drag-and-drop -
trunk/LayoutTests/platform/qt/Skipped
r82346 r82386 3027 3027 fast/forms/interactive-validation-select-crash.html 3028 3028 fast/forms/interactive-validation-crash-by-style-override.html 3029 fast/forms/validation-message-appearance.html 3029 3030 3030 3031 # [Qt] REGRESSION(63862): animations/play-state.html fails intermittently -
trunk/LayoutTests/platform/win/Skipped
r82342 r82386 1071 1071 fast/forms/interactive-validation-select-crash.html 1072 1072 fast/forms/interactive-validation-crash-by-style-override.html 1073 fast/forms/validation-message-appearance.html 1073 1074 1074 1075 # Web Timing is not enabled. -
trunk/Source/WebCore/ChangeLog
r82385 r82386 1 2011-03-29 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Make validation message bubble testable 6 https://bugs.webkit.org/show_bug.cgi?id=57290 7 8 Introduce a setting for validation message timer so that we can configure 9 how long we show a validation message bubble. 10 11 Test: fast/forms/validation-message-appearance.html 12 13 * html/ValidationMessage.cpp: 14 (WebCore::ValidationMessage::setMessageDOMAndStartTimer): 15 Don't set a timer if the timer magnification value is 0 or negative. 16 Otherwise, hides the bubble length * magnification / 1000 seconds. 17 * page/Settings.cpp: 18 (WebCore::Settings::Settings): Initialize the timer magnification value. 19 * page/Settings.h: 20 (WebCore::Settings::setValidationMessageTimerMagnification): Added. 21 (WebCore::Settings::validationMessageTimerMaginification): Added. 22 1 23 2011-03-29 Dimitri Glazkov <dglazkov@chromium.org> 2 24 -
trunk/Source/WebCore/html/ValidationMessage.cpp
r82180 r82386 38 38 #include "HTMLBRElement.h" 39 39 #include "HTMLNames.h" 40 #include "Page.h" 40 41 #include "RenderObject.h" 42 #include "Settings.h" 41 43 #include "Text.h" 42 44 #include <wtf/PassOwnPtr.h> … … 93 95 } 94 96 95 m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree)); 96 m_timer->startOneShot(max(5.0, m_message.length() / 20.0)); 97 int magnification = doc->page() ? doc->page()->settings()->validationMessageTimerMaginification() : -1; 98 if (magnification <= 0) 99 m_timer.clear(); 100 else { 101 m_timer.set(new Timer<ValidationMessage>(this, &ValidationMessage::deleteBubbleTree)); 102 m_timer->startOneShot(max(5.0, static_cast<double>(m_message.length()) * magnification / 1000)); 103 } 97 104 } 98 105 -
trunk/Source/WebCore/page/Settings.cpp
r82171 r82386 89 89 , m_defaultFontSize(0) 90 90 , m_defaultFixedFontSize(0) 91 , m_validationMessageTimerMagnification(50) 91 92 , m_maximumDecodedImageSize(numeric_limits<size_t>::max()) 92 93 #if ENABLE(DOM_STORAGE) -
trunk/Source/WebCore/page/Settings.h
r81635 r82386 363 363 void setInteractiveFormValidationEnabled(bool flag) { m_interactiveFormValidation = flag; } 364 364 bool interactiveFormValidationEnabled() const { return m_interactiveFormValidation; } 365 366 // Sets the maginication value for validation message timer. 367 // If the maginication value is N, a validation message disappears 368 // automatically after <message length> * N / 1000 seconds. If N is 369 // equal to or less than 0, a validation message doesn't disappears 370 // automaticaly. The default value is 50. 371 void setValidationMessageTimerMagnification(int newValue) { m_validationMessageTimerMagnification = newValue; } 372 int validationMessageTimerMaginification() const { return m_validationMessageTimerMagnification; } 365 373 366 374 void setUsePreHTML5ParserQuirks(bool flag) { m_usePreHTML5ParserQuirks = flag; } … … 398 406 int m_defaultFontSize; 399 407 int m_defaultFixedFontSize; 408 int m_validationMessageTimerMagnification; 400 409 size_t m_maximumDecodedImageSize; 401 410 #if ENABLE(DOM_STORAGE) -
trunk/Source/WebKit/mac/ChangeLog
r82377 r82386 1 2011-03-29 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Make validation message bubble testable 6 https://bugs.webkit.org/show_bug.cgi?id=57290 7 8 * WebView/WebView.mm: 9 (-[WebView _preferencesChangedNotification:]): Copy the private value of 10 the timer magnification to WebCore::Settings. 11 (-[WebView validationMessageTimerMagnification]): Added. 12 (-[WebView setValidationMessageTimerMagnification:]): Added. 13 * WebView/WebViewData.h: Declare a member for the timer magnification. 14 * WebView/WebViewData.mm: 15 (-[WebViewPrivate init]): Initialize the timer magnification. 16 * WebView/WebViewPrivate.h: 17 Declare a setter and a getter for the timer magnification. 18 1 19 2011-03-29 Kent Tamura <tkent@chromium.org> 2 20 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r82377 r82386 1522 1522 settings->setCrossOriginCheckInGetMatchedCSSRulesDisabled([self _needsUnrestrictedGetMatchedCSSRules]); 1523 1523 settings->setInteractiveFormValidationEnabled([self interactiveFormValidationEnabled]); 1524 settings->setValidationMessageTimerMagnification([self validationMessageTimerMagnification]); 1524 1525 1525 1526 // Application Cache Preferences are stored on the global cache storage manager, not in Settings. … … 2414 2415 { 2415 2416 _private->interactiveFormValidationEnabled = enabled; 2417 } 2418 2419 - (int)validationMessageTimerMagnification 2420 { 2421 return _private->validationMessageTimerMagnification; 2422 } 2423 2424 - (void)setValidationMessageTimerMagnification:(int)newValue 2425 { 2426 _private->validationMessageTimerMagnification = newValue; 2416 2427 } 2417 2428 -
trunk/Source/WebKit/mac/WebView/WebViewData.h
r82377 r82386 189 189 190 190 BOOL interactiveFormValidationEnabled; 191 int validationMessageTimerMagnification; 191 192 } 192 193 @end -
trunk/Source/WebKit/mac/WebView/WebViewData.mm
r82377 r82386 67 67 68 68 interactiveFormValidationEnabled = NO; 69 // The default value should be synchronized with WebCore/page/Settings.cpp. 70 validationMessageTimerMagnification = 50; 69 71 70 72 #if ENABLE(DASHBOARD_SUPPORT) -
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
r82377 r82386 491 491 - (BOOL)interactiveFormValidationEnabled; 492 492 - (void)setInteractiveFormValidationEnabled:(BOOL)enabled; 493 - (int)validationMessageTimerMagnification; 494 - (void)setValidationMessageTimerMagnification:(int)newValue; 493 495 494 496 // Returns YES if NSView -displayRectIgnoringOpacity:inContext: will produce a faithful representation of the content. -
trunk/Tools/ChangeLog
r82383 r82386 1 2011-03-29 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 Make validation message bubble testable 6 https://bugs.webkit.org/show_bug.cgi?id=57290 7 8 * DumpRenderTree/mac/DumpRenderTree.mm: 9 (createWebViewAndOffscreenWindow): Change a setting so that validation 10 bubbles isn't hidden automatically. 11 1 12 2011-03-29 Dirk Pranke <dpranke@chromium.org> 2 13 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r82377 r82386 309 309 [webView setGrammarCheckingEnabled:YES]; 310 310 [webView setInteractiveFormValidationEnabled:YES]; 311 [webView setValidationMessageTimerMagnification:-1]; 311 312 312 313 // To make things like certain NSViews, dragging, and plug-ins work, put the WebView a window, but put it off-screen so you don't see it.
Note: See TracChangeset
for help on using the changeset viewer.