| Differences between
and this patch
- a/LayoutTests/ChangeLog +14 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add a test to check a visible validation message.
9
        The message should be available only when the control has focus.
10
11
        * fast/forms/script-tests/visible-validation-message.js: Added.
12
        * fast/forms/visible-validation-message-expected.txt: Added.
13
        * fast/forms/visible-validation-message.html: Added.
14
1
2010-06-08  Dirk Schulze  <krit@webkit.org>
15
2010-06-08  Dirk Schulze  <krit@webkit.org>
2
16
3
        Reviewed by Nikolas Zimmermann.
17
        Reviewed by Nikolas Zimmermann.
- a/LayoutTests/fast/forms/script-tests/visible-validation-message.js +38 lines
Line 0 a/LayoutTests/fast/forms/script-tests/visible-validation-message.js_sec1
1
description('Test for validation message requests from an HTMLFormControlElement.');
2
3
var parent = document.createElement('div');
4
document.body.appendChild(parent);
5
parent.innerHTML= '<form>'
6
    + '<input id=i1 name=i1 required>'
7
    + '</form>';
8
9
var input = document.getElementById('i1');
10
debug('Invalid and no focus');
11
shouldBeFalse('input.validity.valid');
12
shouldBeTrue('input.validationMessage.length > 0');
13
shouldBe('layoutTestController.visibleValidationMessageForElementById("i1")', '""');
14
15
debug('Invalid and focused');
16
input.focus();
17
shouldBe('layoutTestController.visibleValidationMessageForElementById("i1")', 'input.validationMessage');
18
19
debug('Invalid, focused, and whitespace-only custom message');
20
input.setCustomValidity("   ");
21
input.blur();
22
input.focus();
23
shouldBe('layoutTestController.visibleValidationMessageForElementById("i1")', '""');
24
25
debug('Invalid, focused, and title attribute');
26
input.setCustomValidity("");
27
input.title = 'You need to specify a value.';
28
input.blur();
29
input.focus();
30
shouldBe('layoutTestController.visibleValidationMessageForElementById("i1")', 'input.validationMessage + "\\n" + input.title');
31
32
debug('Invalid, focused, title attribute, and whitespace-only custom message');
33
input.setCustomValidity("   ");
34
input.blur();
35
input.focus();
36
shouldBe('layoutTestController.visibleValidationMessageForElementById("i1")', '""');
37
38
var successfullyParsed = true;
- a/LayoutTests/fast/forms/visible-validation-message-expected.txt +21 lines
Line 0 a/LayoutTests/fast/forms/visible-validation-message-expected.txt_sec1
1
Test for validation message requests from an HTMLFormControlElement.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
Invalid and no focus
7
PASS input.validity.valid is false
8
PASS input.validationMessage.length > 0 is true
9
PASS layoutTestController.visibleValidationMessageForElementById("i1") is ""
10
Invalid and focused
11
PASS layoutTestController.visibleValidationMessageForElementById("i1") is input.validationMessage
12
Invalid, focused, and whitespace-only custom message
13
PASS layoutTestController.visibleValidationMessageForElementById("i1") is ""
14
Invalid, focused, and title attribute
15
PASS layoutTestController.visibleValidationMessageForElementById("i1") is input.validationMessage + "\n" + input.title
16
Invalid, focused, title attribute, and whitespace-only custom message
17
PASS layoutTestController.visibleValidationMessageForElementById("i1") is ""
18
PASS successfullyParsed is true
19
20
TEST COMPLETE
21
- a/LayoutTests/fast/forms/visible-validation-message.html +13 lines
Line 0 a/LayoutTests/fast/forms/visible-validation-message.html_sec1
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2
<html>
3
<head>
4
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
5
<script src="../../fast/js/resources/js-test-pre.js"></script>
6
</head>
7
<body>
8
<p id="description"></p>
9
<div id="console"></div>
10
<script src="script-tests/visible-validation-message.js"></script>
11
<script src="../../fast/js/resources/js-test-post.js"></script>
12
</body>
13
</html>
- a/WebCore/ChangeLog +50 lines
Lines 1-3 a/WebCore/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        An HTMLFormControlElement calls Chrome::updateFormValidationMessage()
9
        when it gets focus and looses focus. Chrome::updateFormValidationMessage()
10
        manages requests from multiple HTMLFormControlElement instances:
11
        - Periodically calls ChromeClient::updateFormValidationMessage()
12
          to follow element position change.
13
        - If a message is shown for a control and the focus is changed to
14
          another invalid control, hide the current message, wait a little,
15
          then show a message for another control.
16
        - If a message for a control is shown and another message for the
17
          control is requested, hide the current message, wait a little,
18
          then show the new message.
19
20
        Test: fast/forms/visible-validation-message.html
21
22
        * html/HTMLFormControlElement.cpp:
23
        (WebCore::HTMLFormControlElement::detach):
24
          Add a call to updateVisibleValidationMessage().
25
        (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): ditto.
26
        (WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
27
          Added. Calls Chrome::updateFormValidationMessage() if the status
28
          is changed.
29
        (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
30
          Add a call to updateVisibleValidationMessage().
31
        (WebCore::HTMLFormControlElement::dispatchFocusEvent): ditto.
32
        (WebCore::HTMLFormControlElement::dispatchBlurEvent): ditto.
33
        * html/HTMLFormControlElement.h:
34
        (WebCore::HTMLFormControlElement::visibleValidationMessage):
35
          Added the declaration.
36
        * loader/EmptyClients.h:
37
        (WebCore::EmptyChromeClient::updateFormValidationMessage):
38
        (WebCore::EmptyChromeClient::validationMessageUpdateIntervalSecond):
39
        (WebCore::EmptyChromeClient::validationMessageUpdateCount):
40
        (WebCore::EmptyChromeClient::validationMessageBlackoutSecond):
41
          Added as mocks.
42
        * page/Chrome.cpp:
43
        (WebCore::Chrome::updateFormValidationMessage): See above.
44
        (WebCore::Chrome::startValidationMessageBlackout):
45
          A helper for updateFormValidationMessage().
46
        (WebCore::Chrome::validationMessageTimerFired):
47
          A helper for updateFormValidationMessage().
48
        * page/Chrome.h:
49
        * page/ChromeClient.h:
50
1
2010-06-09  Csaba Osztrogonác  <ossy@webkit.org>
51
2010-06-09  Csaba Osztrogonác  <ossy@webkit.org>
2
52
3
        Reviewed by Dirk Schulze.
53
        Reviewed by Dirk Schulze.
- a/WebCore/html/HTMLFormControlElement.cpp -2 / +34 lines
Lines 76-81 HTMLFormControlElement::~HTMLFormControlElement() a/WebCore/html/HTMLFormControlElement.cpp_sec1
76
        m_form->removeFormElement(this);
76
        m_form->removeFormElement(this);
77
}
77
}
78
78
79
void HTMLFormControlElement::detach()
80
{
81
    HTMLElement::detach();
82
    updateVisibleValidationMessage();
83
}
84
79
bool HTMLFormControlElement::formNoValidate() const
85
bool HTMLFormControlElement::formNoValidate() const
80
{
86
{
81
    return !getAttribute(formnovalidateAttr).isNull();
87
    return !getAttribute(formnovalidateAttr).isNull();
Lines 325-331 void HTMLFormControlElement::setNeedsWillValidateCheck() a/WebCore/html/HTMLFormControlElement.cpp_sec2
325
    m_willValidateInitialized = true;
331
    m_willValidateInitialized = true;
326
    m_willValidate = newWillValidate;
332
    m_willValidate = newWillValidate;
327
    setNeedsStyleRecalc();
333
    setNeedsStyleRecalc();
328
    // FIXME: Show/hide a validation message.
334
    updateVisibleValidationMessage();
329
}
335
}
330
336
331
String HTMLFormControlElement::validationMessage()
337
String HTMLFormControlElement::validationMessage()
Lines 333-338 String HTMLFormControlElement::validationMessage() a/WebCore/html/HTMLFormControlElement.cpp_sec3
333
    return validity()->validationMessage();
339
    return validity()->validationMessage();
334
}
340
}
335
341
342
void HTMLFormControlElement::updateVisibleValidationMessage()
343
{
344
    Page* page = document()->page();
345
    String message;
346
    // We can't use focused(). The focused() state is updated after dispatchFocusEvent().
347
    if (page && document()->focusedNode() == this && renderer() && willValidate()) {
348
        message = validationMessage().stripWhiteSpace();
349
        // HTML5 specification doesn't ask UA to show the title attribute value
350
        // with the validationMessage.  However, this behavior is same as Opera
351
        // and the specification describes such behavior as an example.
352
        const AtomicString& title = getAttribute(titleAttr);
353
        if (!message.isEmpty() && !title.isEmpty()) {
354
            message.append('\n');
355
            message.append(title);
356
        }
357
    }
358
    if (m_visibleValidationMessage == message)
359
        return;
360
    page->chrome()->updateFormValidationMessage(this, message);
361
    m_visibleValidationMessage = message;
362
}
363
336
bool HTMLFormControlElement::checkValidity(Vector<RefPtr<HTMLFormControlElement> >* unhandledInvalidControls)
364
bool HTMLFormControlElement::checkValidity(Vector<RefPtr<HTMLFormControlElement> >* unhandledInvalidControls)
337
{
365
{
338
    if (!willValidate() || isValidFormControlElement())
366
    if (!willValidate() || isValidFormControlElement())
Lines 362-368 void HTMLFormControlElement::setNeedsValidityCheck() a/WebCore/html/HTMLFormControlElement.cpp_sec4
362
        setNeedsStyleRecalc();
390
        setNeedsStyleRecalc();
363
    }
391
    }
364
    m_isValid = newIsValid;
392
    m_isValid = newIsValid;
365
    // FIXME: show/hide a validation message.
393
    // Calls it even if m_isValid is not changed
394
    // because a validation message can be chagned.
395
    updateVisibleValidationMessage();
366
}
396
}
367
397
368
void HTMLFormControlElement::setCustomValidity(const String& error)
398
void HTMLFormControlElement::setCustomValidity(const String& error)
Lines 376-381 void HTMLFormControlElement::dispatchFocusEvent() a/WebCore/html/HTMLFormControlElement.cpp_sec5
376
        document()->page()->chrome()->client()->formDidFocus(this);
406
        document()->page()->chrome()->client()->formDidFocus(this);
377
407
378
    HTMLElement::dispatchFocusEvent();
408
    HTMLElement::dispatchFocusEvent();
409
    updateVisibleValidationMessage();
379
}
410
}
380
411
381
void HTMLFormControlElement::dispatchBlurEvent()
412
void HTMLFormControlElement::dispatchBlurEvent()
Lines 384-389 void HTMLFormControlElement::dispatchBlurEvent() a/WebCore/html/HTMLFormControlElement.cpp_sec6
384
        document()->page()->chrome()->client()->formDidBlur(this);
415
        document()->page()->chrome()->client()->formDidBlur(this);
385
416
386
    HTMLElement::dispatchBlurEvent();
417
    HTMLElement::dispatchBlurEvent();
418
    updateVisibleValidationMessage();
387
}
419
}
388
420
389
HTMLFormElement* HTMLFormControlElement::virtualForm() const
421
HTMLFormElement* HTMLFormControlElement::virtualForm() const
- a/WebCore/html/HTMLFormControlElement.h +5 lines
Lines 88-93 public: a/WebCore/html/HTMLFormControlElement.h_sec1
88
88
89
    virtual bool willValidate() const;
89
    virtual bool willValidate() const;
90
    String validationMessage();
90
    String validationMessage();
91
    // For testing.
92
    String visibleValidationMessage() { return m_visibleValidationMessage; }
91
    bool checkValidity(Vector<RefPtr<HTMLFormControlElement> >* unhandledInvalidControls = 0);
93
    bool checkValidity(Vector<RefPtr<HTMLFormControlElement> >* unhandledInvalidControls = 0);
92
    // This must be called when a validation constraint or control value is changed.
94
    // This must be called when a validation constraint or control value is changed.
93
    void setNeedsValidityCheck();
95
    void setNeedsValidityCheck();
Lines 118-123 protected: a/WebCore/html/HTMLFormControlElement.h_sec2
118
120
119
    virtual void dispatchFocusEvent();
121
    virtual void dispatchFocusEvent();
120
    virtual void dispatchBlurEvent();
122
    virtual void dispatchBlurEvent();
123
    virtual void detach();
121
124
122
    void removeFromForm();
125
    void removeFromForm();
123
    // This must be called any time the result of willValidate() has changed.
126
    // This must be called any time the result of willValidate() has changed.
Lines 140-148 private: a/WebCore/html/HTMLFormControlElement.h_sec3
140
    virtual HTMLFormElement* virtualForm() const;
143
    virtual HTMLFormElement* virtualForm() const;
141
    virtual bool isDefaultButtonForForm() const;
144
    virtual bool isDefaultButtonForForm() const;
142
    virtual bool isValidFormControlElement();
145
    virtual bool isValidFormControlElement();
146
    void updateVisibleValidationMessage();
143
147
144
    HTMLFormElement* m_form;
148
    HTMLFormElement* m_form;
145
    OwnPtr<ValidityState> m_validityState;
149
    OwnPtr<ValidityState> m_validityState;
150
    String m_visibleValidationMessage;
146
    bool m_disabled : 1;
151
    bool m_disabled : 1;
147
    bool m_readOnly : 1;
152
    bool m_readOnly : 1;
148
    bool m_required : 1;
153
    bool m_required : 1;
- a/WebCore/loader/EmptyClients.h +4 lines
Lines 150-155 public: a/WebCore/loader/EmptyClients.h_sec1
150
150
151
    virtual void formDidFocus(const Node*) { }
151
    virtual void formDidFocus(const Node*) { }
152
    virtual void formDidBlur(const Node*) { }
152
    virtual void formDidBlur(const Node*) { }
153
    virtual void updateFormValidationMessage(HTMLFormControlElement*, const String&) {}
154
    virtual double validationMessageUpdateIntervalSecond() { return 1; }
155
    virtual int validationMessageUpdateCount(const String&) { return 1; }
156
    virtual double validationMessageBlackoutSecond() { return 1; }
153
157
154
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
158
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
155
159
- a/WebCore/page/Chrome.cpp +73 lines
Lines 411-416 void Chrome::setToolTip(const HitTestResult& result) a/WebCore/page/Chrome.cpp_sec1
411
    m_client->setToolTip(toolTip, toolTipDirection);
411
    m_client->setToolTip(toolTip, toolTipDirection);
412
}
412
}
413
413
414
void Chrome::updateFormValidationMessage(HTMLFormControlElement* control, const String& message)
415
{
416
    ASSERT(control);
417
    control->getTransformedCorners();
418
    if (!m_validationMessageTimer)
419
        m_validationMessageTimer.set(new Timer<Chrome>(this, &Chrome::validationMessageTimerFired));
420
421
    if (message.isEmpty()) {
422
        if (m_validationMessageTarget != control)
423
            return;
424
        m_validationMessageTimer->stop();
425
        m_client->updateFormValidationMessage(control, message);
426
        m_validationMessage = message;
427
        m_validationMessageTarget.clear();
428
        // Start the timer to make a blackout period. Do not use startOneShort()
429
        // in order to reuse this for the next message.
430
        startValidationMessageBlackout();
431
        return;
432
    }
433
434
    bool wasVisible = !m_validationMessage.isEmpty();
435
    RefPtr<HTMLFormControlElement> lastTarget(m_validationMessageTarget);
436
    bool resetTimer = !wasVisible || m_validationMessageTarget != control || m_validationMessage != message;
437
    m_validationMessage = message;
438
    m_validationMessageTarget = control;
439
    if (!resetTimer) {
440
        m_client->updateFormValidationMessage(m_validationMessageTarget.get(), m_validationMessage);
441
        return;
442
    }
443
    if (wasVisible) {
444
        // Clear the visible old message.
445
        m_validationMessageTimer->stop();
446
        m_client->updateFormValidationMessage(lastTarget.get(), String());
447
        // Will show the new message after validationMessageBlackoutSec.
448
        startValidationMessageBlackout();
449
    } else {
450
        if (m_validationMessageTimer->isActive()) {
451
            // Nothing to do if it is in a blackout period. When the timer is
452
            // fired next time, validationMessageTimerFired() shows the message
453
            // because m_validationMessage is not empty.
454
        } else {
455
            // It's not in a blackout period. Show the message immediately.
456
            m_client->updateFormValidationMessage(m_validationMessageTarget.get(), m_validationMessage);
457
            m_validationMessageTimerCounter = 0;
458
            m_validationMessageTimer->startRepeating(m_client->validationMessageUpdateIntervalSecond());
459
        }
460
    }
461
}
462
463
void Chrome::startValidationMessageBlackout()
464
{
465
    m_validationMessageTimerCounter = -1;
466
    m_validationMessageTimer->start(m_client->validationMessageBlackoutSecond(), m_client->validationMessageUpdateIntervalSecond());
467
}
468
469
void Chrome::validationMessageTimerFired(Timer<Chrome>* timer)
470
{
471
    if (m_validationMessage.isEmpty()) {
472
        ASSERT(m_validationMessageTimerCounter < 0);
473
        timer->stop();
474
        return;
475
    }
476
    m_client->updateFormValidationMessage(m_validationMessageTarget.get(), m_validationMessage);
477
    if (++m_validationMessageTimerCounter < m_client->validationMessageUpdateCount(m_validationMessage))
478
        return;
479
    timer->stop();
480
    m_client->updateFormValidationMessage(m_validationMessageTarget.get(), String());
481
    m_validationMessage = String();
482
    m_validationMessageTarget.clear();
483
484
    startValidationMessageBlackout();
485
}
486
414
void Chrome::print(Frame* frame)
487
void Chrome::print(Frame* frame)
415
{
488
{
416
    m_client->print(frame);
489
    m_client->print(frame);
- a/WebCore/page/Chrome.h +11 lines
Lines 24-30 a/WebCore/page/Chrome.h_sec1
24
#include "FileChooser.h"
24
#include "FileChooser.h"
25
#include "FocusDirection.h"
25
#include "FocusDirection.h"
26
#include "HostWindow.h"
26
#include "HostWindow.h"
27
#include "Timer.h"
27
#include <wtf/Forward.h>
28
#include <wtf/Forward.h>
29
#include <wtf/OwnPtr.h>
28
#include <wtf/RefPtr.h>
30
#include <wtf/RefPtr.h>
29
31
30
#if PLATFORM(MAC)
32
#if PLATFORM(MAC)
Lines 40-45 namespace WebCore { a/WebCore/page/Chrome.h_sec2
40
    class FloatRect;
42
    class FloatRect;
41
    class Frame;
43
    class Frame;
42
    class Geolocation;
44
    class Geolocation;
45
    class HTMLFormControlElement;
43
    class HitTestResult;
46
    class HitTestResult;
44
    class IntRect;
47
    class IntRect;
45
    class Node;
48
    class Node;
Lines 129-134 namespace WebCore { a/WebCore/page/Chrome.h_sec3
129
        void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
132
        void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
130
133
131
        void setToolTip(const HitTestResult&);
134
        void setToolTip(const HitTestResult&);
135
        void updateFormValidationMessage(HTMLFormControlElement*, const String&);
132
136
133
        void print(Frame*);
137
        void print(Frame*);
134
138
Lines 149-156 namespace WebCore { a/WebCore/page/Chrome.h_sec4
149
#endif
153
#endif
150
154
151
    private:
155
    private:
156
        void validationMessageTimerFired(Timer<Chrome>*);
157
        void startValidationMessageBlackout();
158
152
        Page* m_page;
159
        Page* m_page;
153
        ChromeClient* m_client;
160
        ChromeClient* m_client;
161
        OwnPtr<Timer<Chrome>*> m_validationMessageTimer;
162
        int m_validationMessageTimerCounter;
163
        String m_validationMessage;
164
        RefPtr<HTMLFormControlElement> m_validationMessageTarget;
154
    };
165
    };
155
}
166
}
156
167
- a/WebCore/page/ChromeClient.h +24 lines
Lines 47-52 namespace WebCore { a/WebCore/page/ChromeClient.h_sec1
47
    class FloatRect;
47
    class FloatRect;
48
    class Frame;
48
    class Frame;
49
    class Geolocation;
49
    class Geolocation;
50
    class HTMLFormControlElement;
50
    class HTMLParserQuirks;
51
    class HTMLParserQuirks;
51
    class HitTestResult;
52
    class HitTestResult;
52
    class IntRect;
53
    class IntRect;
Lines 202-207 namespace WebCore { a/WebCore/page/ChromeClient.h_sec2
202
        
203
        
203
        virtual void formDidFocus(const Node*) { };
204
        virtual void formDidFocus(const Node*) { };
204
        virtual void formDidBlur(const Node*) { };
205
        virtual void formDidBlur(const Node*) { };
206
        // Show the specified message for the form control. Hide the message
207
        // if the string is empty. If updateFormValidationMessage() with
208
        // non-empty message is called, the subsequent calls of
209
        // updateFormValidationMessage() must be for the same element and the
210
        // same message.  Then, updateFormValidationMessage() is called with
211
        // the same element and the empty message.
212
        //  updateFormValidationMesage(control1, "message1") ->
213
        //  updateFormValidationMesage(control1, "message1") ->
214
        //  updateFormValidationMesage(control1, "message1") ... (multiple times)
215
        //  updateFormValidationMesage(control1, "")
216
        // In this sequence, calls with other controls or other messages
217
        // never happen.
218
        virtual void updateFormValidationMessage(HTMLFormControlElement*, const String&) = 0;
219
        // After the first call of updateFormValidationMessage(e, "message1"),
220
        // it is called repeatedly every validationMessageUpdateIntervalSecond()
221
        // validationMessageUpdateCount()-1 times,
222
        // then updateFormValidationMessage(e, "") is called after
223
        // validationMessageUpdateIntervalSecond().
224
        // After that, updateFormValidationMessage() is never called for
225
        // validationMessageBlackoutSecond().
226
        virtual double validationMessageUpdateIntervalSecond() = 0;
227
        virtual int validationMessageUpdateCount(const String&) = 0;
228
        virtual double validationMessageBlackoutSecond() = 0;
205
229
206
        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() = 0;
230
        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() = 0;
207
231
- a/WebKit/ChangeLog +19 lines
Lines 1-3 a/WebKit/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * efl/WebCoreSupport/ChromeClientEfl.cpp:
14
        (WebCore::ChromeClientEfl::updateFormValidationMessage):
15
        * efl/WebCoreSupport/ChromeClientEfl.h:
16
        (WebCore::ChromeClientEfl::validationMessageUpdateIntervalSecond):
17
        (WebCore::ChromeClientEfl::validationMessageUpdateCount):
18
        (WebCore::ChromeClientEfl::validationMessageBlackoutSecond):
19
1
2010-06-01  Alexey Proskuryakov  <ap@apple.com>
20
2010-06-01  Alexey Proskuryakov  <ap@apple.com>
2
21
3
        Reviewed by Sam Weinig.
22
        Reviewed by Sam Weinig.
- a/WebKit/chromium/ChangeLog +19 lines
Lines 1-3 a/WebKit/chromium/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * src/ChromeClientImpl.cpp:
14
        (WebKit::ChromeClientImpl::updateFormValidationMessage):
15
        * src/ChromeClientImpl.h:
16
        (WebKit::ChromeClientImpl::validationMessageUpdateIntervalSecond):
17
        (WebKit::ChromeClientImpl::validationMessageUpdateCount):
18
        (WebKit::ChromeClientImpl::validationMessageBlackoutSecond):
19
1
2010-06-09  Yury Semikhatsky  <yurys@chromium.org>
20
2010-06-09  Yury Semikhatsky  <yurys@chromium.org>
2
21
3
        Reviewed by Pavel Feldman.
22
        Reviewed by Pavel Feldman.
- a/WebKit/chromium/src/ChromeClientImpl.cpp +5 lines
Lines 654-659 void ChromeClientImpl::formStateDidChange(const Node* node) a/WebKit/chromium/src/ChromeClientImpl.cpp_sec1
654
        webframe->client()->didUpdateCurrentHistoryItem(webframe);
654
        webframe->client()->didUpdateCurrentHistoryItem(webframe);
655
}
655
}
656
656
657
void ChromeClientImpl::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
658
{
659
    notImplemented();
660
}
661
657
void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer,
662
void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer,
658
                                        WebPopupMenuInfo* info)
663
                                        WebPopupMenuInfo* info)
659
{
664
{
- a/WebKit/chromium/src/ChromeClientImpl.h +4 lines
Lines 128-133 public: a/WebKit/chromium/src/ChromeClientImpl.h_sec1
128
    virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
128
    virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
129
    virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
129
    virtual bool setCursor(WebCore::PlatformCursorHandle) { return false; }
130
    virtual void formStateDidChange(const WebCore::Node*);
130
    virtual void formStateDidChange(const WebCore::Node*);
131
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
132
    virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
133
    virtual int validationMessageUpdateCount(const String&) { return 20; /* FIXME */ }
134
    virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
131
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
135
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
132
#if ENABLE(TOUCH_EVENTS)
136
#if ENABLE(TOUCH_EVENTS)
133
    // FIXME: All touch events are forwarded regardless of whether or not they are needed.
137
    // FIXME: All touch events are forwarded regardless of whether or not they are needed.
- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp +5 lines
Lines 384-389 void ChromeClientEfl::formStateDidChange(const Node*) a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp_sec1
384
    notImplemented();
384
    notImplemented();
385
}
385
}
386
386
387
void ChromeClientEfl::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
388
{
389
    notImplemented();
390
}
391
387
bool ChromeClientEfl::setCursor(PlatformCursorHandle)
392
bool ChromeClientEfl::setCursor(PlatformCursorHandle)
388
{
393
{
389
    notImplemented();
394
    notImplemented();
- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h +4 lines
Lines 115-120 public: a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h_sec1
115
    virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
115
    virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
116
    virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
116
    virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
117
    virtual void formStateDidChange(const Node*);
117
    virtual void formStateDidChange(const Node*);
118
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement, const WebCore::String&);
119
    virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
120
    virtual int validationMessageUpdateCount(const String&) { return 20; /* FIXME */ }
121
    virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
118
122
119
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
123
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
120
124
- a/WebKit/gtk/ChangeLog +19 lines
Lines 1-3 a/WebKit/gtk/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * WebCoreSupport/ChromeClientGtk.cpp:
14
        (WebKit::ChromeClient::updateFormValidationMessage):
15
        * WebCoreSupport/ChromeClientGtk.h:
16
        (WebKit::ChromeClient::validationMessageUpdateIntervalSecond):
17
        (WebKit::ChromeClient::validationMessageUpdateCount):
18
        (WebKit::ChromeClient::validationMessageBlackoutSecond):
19
1
2010-06-08  Xan Lopez  <xlopez@igalia.com>
20
2010-06-08  Xan Lopez  <xlopez@igalia.com>
2
21
3
        Reviewed by Gustavo Noronha.
22
        Reviewed by Gustavo Noronha.
- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +5 lines
Lines 564-569 void ChromeClient::chooseIconForFiles(const Vector<WebCore::String>& filenames, a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp_sec1
564
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
564
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
565
}
565
}
566
566
567
void ChromeClient::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
568
{
569
    notImplemented();
570
}
571
567
bool ChromeClient::setCursor(PlatformCursorHandle)
572
bool ChromeClient::setCursor(PlatformCursorHandle)
568
{
573
{
569
    notImplemented();
574
    notImplemented();
- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h +4 lines
Lines 113-118 namespace WebKit { a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h_sec1
113
        virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
113
        virtual void chooseIconForFiles(const Vector<WebCore::String>&, WebCore::FileChooser*);
114
114
115
        virtual void formStateDidChange(const WebCore::Node*) { }
115
        virtual void formStateDidChange(const WebCore::Node*) { }
116
        virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
117
        virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
118
        virtual int validationMessageUpdateCount(const String&) { return 20; /* FIXME */ }
119
        virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
116
120
117
        virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
121
        virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
118
122
- a/WebKit/haiku/ChangeLog +19 lines
Lines 1-3 a/WebKit/haiku/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * WebCoreSupport/ChromeClientHaiku.cpp:
14
        (WebCore::ChromeClientHaiku::updateFormValidationMessage):
15
        * WebCoreSupport/ChromeClientHaiku.h:
16
        (WebCore::ChromeClientHaiku::validationMessageUpdateIntervalSecond):
17
        (WebCore::ChromeClientHaiku::validationMessageUpdateCount):
18
        (WebCore::ChromeClientHaiku::validationMessageBlackoutSecond):
19
1
2010-05-31  Lyon Chen  <liachen@rim.com>
20
2010-05-31  Lyon Chen  <liachen@rim.com>
2
21
3
        Reviewed by Kent Tamura.
22
        Reviewed by Kent Tamura.
- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp +5 lines
Lines 375-380 void ChromeClientHaiku::formStateDidChange(const Node*) a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp_sec1
375
    notImplemented();
375
    notImplemented();
376
}
376
}
377
377
378
void ChromeClientHaiku::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
379
{
380
    notImplemented();
381
}
382
378
PassOwnPtr<HTMLParserQuirks> ChromeClientHaiku::createHTMLParserQuirks()
383
PassOwnPtr<HTMLParserQuirks> ChromeClientHaiku::createHTMLParserQuirks()
379
{
384
{
380
    notImplemented();
385
    notImplemented();
- a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h +4 lines
Lines 145-150 namespace WebCore { a/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h_sec1
145
        // Notification that the given form element has changed. This function
145
        // Notification that the given form element has changed. This function
146
        // will be called frequently, so handling should be very fast.
146
        // will be called frequently, so handling should be very fast.
147
        void formStateDidChange(const Node*);
147
        void formStateDidChange(const Node*);
148
        virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
149
        virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
150
        virtual int validationMessageUpdateCount(const String&) { return 20; /* FIXME */ }
151
        virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
148
152
149
        PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks();
153
        PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks();
150
    };
154
    };
- a/WebKit/mac/ChangeLog +23 lines
Lines 1-3 a/WebKit/mac/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), validationMessageBlackoutSecond(), and
11
        a helper for LayoutTestController::visibleValidationMessageForElementById().
12
13
        * Misc/WebCoreStatistics.h:
14
        * Misc/WebCoreStatistics.mm:
15
        (-[WebFrame visibleValidationMessageForElementById:]):
16
        * WebCoreSupport/WebChromeClient.h:
17
        (WebChromeClient::validationMessageUpdateIntervalSecond):
18
        (WebChromeClient::validationMessageUpdateCount):
19
        (WebChromeClient::validationMessageBlackoutSecond):
20
        * WebCoreSupport/WebChromeClient.mm:
21
        (WebChromeClient::updateFormValidationMessage):
22
23
1
2010-06-08  Mark Rowe  <mrowe@apple.com>
24
2010-06-08  Mark Rowe  <mrowe@apple.com>
2
25
3
        Reviewed by Adele Peterson.
26
        Reviewed by Adele Peterson.
- a/WebKit/mac/Misc/WebCoreStatistics.h +1 lines
Lines 87-90 a/WebKit/mac/Misc/WebCoreStatistics.h_sec1
87
- (NSString *)counterValueForElement:(DOMElement*)element;
87
- (NSString *)counterValueForElement:(DOMElement*)element;
88
- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
88
- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
89
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
89
- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
90
- (NSString *)visibleValidationMessageForElementById:(NSString *)elementId;
90
@end
91
@end
- a/WebKit/mac/Misc/WebCoreStatistics.mm +13 lines
Lines 28-33 a/WebKit/mac/Misc/WebCoreStatistics.mm_sec1
28
28
29
#import "WebCoreStatistics.h"
29
#import "WebCoreStatistics.h"
30
30
31
#import "DOMDocumentInternal.h"
31
#import "DOMElementInternal.h"
32
#import "DOMElementInternal.h"
32
#import "WebCache.h"
33
#import "WebCache.h"
33
#import "WebFrameInternal.h"
34
#import "WebFrameInternal.h"
Lines 37-42 a/WebKit/mac/Misc/WebCoreStatistics.mm_sec2
37
#import <WebCore/Frame.h>
38
#import <WebCore/Frame.h>
38
#import <WebCore/GCController.h>
39
#import <WebCore/GCController.h>
39
#import <WebCore/GlyphPageTreeNode.h>
40
#import <WebCore/GlyphPageTreeNode.h>
41
#import <WebCore/HTMLFormControlElement.h>
40
#import <WebCore/IconDatabase.h>
42
#import <WebCore/IconDatabase.h>
41
#import <WebCore/JSDOMWindow.h>
43
#import <WebCore/JSDOMWindow.h>
42
#import <WebCore/PageCache.h>
44
#import <WebCore/PageCache.h>
Lines 275-278 using namespace WebCore; a/WebKit/mac/Misc/WebCoreStatistics.mm_sec3
275
    return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
277
    return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
276
}
278
}
277
279
280
- (NSString *)visibleValidationMessageForElementById:(NSString *)elementId
281
{
282
    DOMElement* element = [[self DOMDocument] getElementById:elementId];
283
    if (!element)
284
        return nil;
285
    Element* coreElement = core(element);
286
    if (!coreElement->isFormControlElement())
287
        return nil;
288
    HTMLFormControlElement* formControl = static_cast<HTMLFormControlElement*>(coreElement);
289
    return (NSString*)formControl->visibleValidationMessage();
290
}
278
@end
291
@end
- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +4 lines
Lines 147-152 public: a/WebKit/mac/WebCoreSupport/WebChromeClient.h_sec1
147
147
148
    virtual void formDidFocus(const WebCore::Node*);
148
    virtual void formDidFocus(const WebCore::Node*);
149
    virtual void formDidBlur(const WebCore::Node*);
149
    virtual void formDidBlur(const WebCore::Node*);
150
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
151
    virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
152
    virtual int validationMessageUpdateCount(const WebCore::String&) { return 20; /* FIXME */ }
153
    virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
150
154
151
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
155
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
152
156
- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +5 lines
Lines 705-710 void WebChromeClient::formDidBlur(const WebCore::Node* node) a/WebKit/mac/WebCoreSupport/WebChromeClient.mm_sec1
705
    CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(const_cast<WebCore::Node*>(node)));
705
    CallUIDelegate(m_webView, @selector(webView:formDidBlurNode:), kit(const_cast<WebCore::Node*>(node)));
706
}
706
}
707
707
708
void WebChromeClient::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
709
{
710
    // FIXME: Implement this.
711
}
712
708
#if USE(ACCELERATED_COMPOSITING)
713
#if USE(ACCELERATED_COMPOSITING)
709
714
710
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
715
void WebChromeClient::attachRootGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
- a/WebKit/qt/ChangeLog +19 lines
Lines 1-3 a/WebKit/qt/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * WebCoreSupport/ChromeClientQt.cpp:
14
        (WebCore::ChromeClientQt::updateFormValidationMessage):
15
        * WebCoreSupport/ChromeClientQt.h:
16
        (WebCore::ChromeClientQt::validationMessageUpdateIntervalSecond):
17
        (WebCore::ChromeClientQt::validationMessageUpdateCount):
18
        (WebCore::ChromeClientQt::validationMessageBlackoutSecond):
19
1
2010-06-08  Antonio Gomes  <tonikitoo@webkit.org>
20
2010-06-08  Antonio Gomes  <tonikitoo@webkit.org>
2
21
3
        Reviewed by Ojan Vafai and Darin Adler.
22
        Reviewed by Ojan Vafai and Darin Adler.
- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +5 lines
Lines 528-533 void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, FileCho a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp_sec1
528
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
528
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
529
}
529
}
530
530
531
void ChromeClientQt::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
532
{
533
    notImplemented();
534
}
535
531
bool ChromeClientQt::setCursor(PlatformCursorHandle)
536
bool ChromeClientQt::setCursor(PlatformCursorHandle)
532
{
537
{
533
    notImplemented();
538
    notImplemented();
- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h +4 lines
Lines 157-162 namespace WebCore { a/WebKit/qt/WebCoreSupport/ChromeClientQt.h_sec1
157
        virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
157
        virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
158
158
159
        virtual void formStateDidChange(const Node*) { }
159
        virtual void formStateDidChange(const Node*) { }
160
        virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
161
        virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
162
        virtual int validationMessageUpdateCount(const WebCore::String&) { return 20; /* FIXME */ }
163
        virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
160
164
161
        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
165
        virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
162
166
- a/WebKit/win/ChangeLog +24 lines
Lines 1-3 a/WebKit/win/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        - Add stub functions for updateFormValidationMessage(),
9
          validationMessageUpdateIntervalSecond(),
10
          validationMessageUpdateCount(), and validationMessageBlackoutSecond().
11
        - Add visibleValidationMessageForElementById() for LayoutTestController.
12
13
        * Interfaces/IWebFramePrivate.idl:
14
        * Interfaces/WebKit.idl: Just touch.
15
        * WebCoreSupport/WebChromeClient.cpp:
16
        (WebChromeClient::updateFormValidationMessage):
17
        * WebCoreSupport/WebChromeClient.h:
18
        (WebChromeClient::validationMessageUpdateCount):
19
        (WebChromeClient::validationMessageUpdateIntervalSecond):
20
        (WebChromeClient::validationMessageBlackoutSecond):
21
        * WebFrame.cpp:
22
        (WebFrame::visibleValidationMessageForElementById):
23
        * WebFrame.h:
24
1
2010-06-08  Antonio Gomes  <tonikitoo@webkit.org>
25
2010-06-08  Antonio Gomes  <tonikitoo@webkit.org>
2
26
3
        Reviewed by Ojan Vafai and Darin Adler.
27
        Reviewed by Ojan Vafai and Darin Adler.
- a/WebKit/win/Interfaces/IWebFramePrivate.idl -1 / +1 lines
Lines 110-115 interface IWebFramePrivate : IUnknown a/WebKit/win/Interfaces/IWebFramePrivate.idl_sec1
110
    HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
110
    HRESULT numberOfPages([in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
111
111
112
    HRESULT layerTreeAsText([out, retval] BSTR* result);
112
    HRESULT layerTreeAsText([out, retval] BSTR* result);
113
113
    HRESULT visibleValidationMessageForElementById([in] BSTR id, [out, retval] BSTR* result);
114
    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
114
    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
115
}
115
}
- a/WebKit/win/Interfaces/WebKit.idl +1 lines
Lines 300-302 library WebKit a/WebKit/win/Interfaces/WebKit.idl_sec1
300
        [default] interface IWebUserContentURLPattern;
300
        [default] interface IWebUserContentURLPattern;
301
    }
301
    }
302
}
302
}
303
 
- a/WebKit/win/WebCoreSupport/WebChromeClient.cpp +6 lines
Lines 49-54 a/WebKit/win/WebCoreSupport/WebChromeClient.cpp_sec1
49
#if USE(ACCELERATED_COMPOSITING)
49
#if USE(ACCELERATED_COMPOSITING)
50
#include <WebCore/GraphicsLayer.h>
50
#include <WebCore/GraphicsLayer.h>
51
#endif
51
#endif
52
#include <WebCore/HTMLFormControlElement.h>
52
#include <WebCore/HTMLNames.h>
53
#include <WebCore/HTMLNames.h>
53
#include <WebCore/Icon.h>
54
#include <WebCore/Icon.h>
54
#include <WebCore/LocalizedStrings.h>
55
#include <WebCore/LocalizedStrings.h>
Lines 772-777 bool WebChromeClient::setCursor(PlatformCursorHandle cursor) a/WebKit/win/WebCoreSupport/WebChromeClient.cpp_sec2
772
    return true;
773
    return true;
773
}
774
}
774
775
776
void WebChromeClient::updateFormValidationMessage(HTMLFormControlElement* control, const String& message)
777
{
778
    notImplemented();
779
}
780
775
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
781
void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
776
{
782
{
777
    COMPtr<IWebUIDelegate> uiDelegate;
783
    COMPtr<IWebUIDelegate> uiDelegate;
- a/WebKit/win/WebCoreSupport/WebChromeClient.h +8 lines
Lines 34-39 a/WebKit/win/WebCoreSupport/WebChromeClient.h_sec1
34
class WebView;
34
class WebView;
35
class WebDesktopNotificationsDelegate;
35
class WebDesktopNotificationsDelegate;
36
36
37
namespace WebCore {
38
class HTMLFormControlElement;
39
}
40
37
interface IWebUIDelegate;
41
interface IWebUIDelegate;
38
42
39
class WebChromeClient : public WebCore::ChromeClient {
43
class WebChromeClient : public WebCore::ChromeClient {
Lines 133-138 public: a/WebKit/win/WebCoreSupport/WebChromeClient.h_sec2
133
    WebView* webView() const { return m_webView; }
137
    WebView* webView() const { return m_webView; }
134
138
135
    virtual void formStateDidChange(const WebCore::Node*) { }
139
    virtual void formStateDidChange(const WebCore::Node*) { }
140
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
141
    virtual unsigned validationMessageUpdateCount(const WebCore::String&) { return 10; }
142
    virtual double validationMessageUpdateIntervalSecond() { return 0.5; }
143
    virtual double validationMessageBlackoutSecond() { return 0.6; }
136
144
137
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
145
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
138
146
- a/WebKit/win/WebFrame.cpp +15 lines
Lines 1027-1032 HRESULT STDMETHODCALLTYPE WebFrame::fetchApplicationIcon( a/WebKit/win/WebFrame.cpp_sec1
1027
    return S_OK;
1027
    return S_OK;
1028
}
1028
}
1029
1029
1030
HRESULT STDMETHODCALLTYPE WebFrame::visibleValidationMessageForElementById(BSTR id, BSTR* result)
1031
{
1032
    if (!result)
1033
        return E_POINTER;
1034
    Frame* coreFrame = core(this);
1035
    if (!coreFrame)
1036
        return E_FAIL;
1037
    Element* element = coreFrame->document()->getElementById(String(id, SysStringLen(id)));
1038
    if (!element || !element->isFormControlElement())
1039
        return E_FAIL;
1040
    HTMLFormControlElement* formControl = static_cast<HTMLFormControlElement*>(element);
1041
    *result = BString(formControl->visibleValidationMessage()).release();
1042
    return S_OK;
1043
}
1044
1030
// IWebDocumentText -----------------------------------------------------------
1045
// IWebDocumentText -----------------------------------------------------------
1031
1046
1032
HRESULT STDMETHODCALLTYPE WebFrame::supportsTextEncoding( 
1047
HRESULT STDMETHODCALLTYPE WebFrame::supportsTextEncoding( 
- a/WebKit/win/WebFrame.h +1 lines
Lines 269-274 public: a/WebKit/win/WebFrame.h_sec1
269
    virtual JSGlobalContextRef STDMETHODCALLTYPE globalContextForScriptWorld(IWebScriptWorld*);
269
    virtual JSGlobalContextRef STDMETHODCALLTYPE globalContextForScriptWorld(IWebScriptWorld*);
270
270
271
    virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*);
271
    virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*);
272
    virtual HRESULT STDMETHODCALLTYPE visibleValidationMessageForElementById(BSTR id, BSTR* result);
272
273
273
    virtual HRESULT STDMETHODCALLTYPE layerTreeAsText(BSTR*);
274
    virtual HRESULT STDMETHODCALLTYPE layerTreeAsText(BSTR*);
274
275
- a/WebKit/wx/ChangeLog +19 lines
Lines 1-3 a/WebKit/wx/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * WebKitSupport/ChromeClientWx.cpp:
14
        (WebCore::ChromeClientWx::updateFormValidationMessage):
15
        * WebKitSupport/ChromeClientWx.h:
16
        (WebCore::ChromeClientWx::validationMessageUpdateIntervalSecond):
17
        (WebCore::ChromeClientWx::validationMessageUpdateCount):
18
        (WebCore::ChromeClientWx::validationMessageBlackoutSecond):
19
1
2010-05-27  Kevin Ollivier  <kevino@theolliviers.com>
20
2010-05-27  Kevin Ollivier  <kevino@theolliviers.com>
2
21
3
        [wx] Build fixes for Windows after recent changes.
22
        [wx] Build fixes for Windows after recent changes.
- a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp +5 lines
Lines 447-452 void ChromeClientWx::chooseIconForFiles(const Vector<String>& filenames, FileCho a/WebKit/wx/WebKitSupport/ChromeClientWx.cpp_sec1
447
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
447
    chooser->iconLoaded(Icon::createIconForFiles(filenames));
448
}
448
}
449
449
450
void ChromeClientWx::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
451
{
452
    notImplemented();
453
}
454
450
bool ChromeClientWx::setCursor(PlatformCursorHandle)
455
bool ChromeClientWx::setCursor(PlatformCursorHandle)
451
{
456
{
452
    notImplemented();
457
    notImplemented();
- a/WebKit/wx/WebKitSupport/ChromeClientWx.h +4 lines
Lines 131-136 public: a/WebKit/wx/WebKitSupport/ChromeClientWx.h_sec1
131
    virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
131
    virtual void chooseIconForFiles(const Vector<String>&, FileChooser*);
132
132
133
    virtual void formStateDidChange(const Node*) { }
133
    virtual void formStateDidChange(const Node*) { }
134
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
135
    virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
136
    virtual int validationMessageUpdateCount(const WebCore::String&) { return 20; /* FIXME */ }
137
    virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
134
138
135
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
139
    virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; }
136
140
- a/WebKit2/ChangeLog +19 lines
Lines 1-3 a/WebKit2/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add stub functions for updateFormValidationMessage(),
9
        validationMessageUpdateIntervalSecond(),
10
        validationMessageUpdateCount(), and
11
        validationMessageBlackoutSecond().
12
13
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
14
        (WebKit::WebChromeClient::updateFormValidationMessage):
15
        * WebProcess/WebCoreSupport/WebChromeClient.h:
16
        (WebKit::WebChromeClient::validationMessageUpdateIntervalSecond):
17
        (WebKit::WebChromeClient::validationMessageUpdateCount):
18
        (WebKit::WebChromeClient::validationMessageBlackoutSecond):
19
1
2010-06-08  Anders Carlsson  <andersca@apple.com>
20
2010-06-08  Anders Carlsson  <andersca@apple.com>
2
21
3
        Reviewed by John Sullivan.
22
        Reviewed by John Sullivan.
- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp +5 lines
Lines 432-437 void WebChromeClient::formDidBlur(const Node*) a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp_sec1
432
    notImplemented();
432
    notImplemented();
433
}
433
}
434
434
435
void WebChromeClient::updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&)
436
{
437
    notImplemented();
438
}
439
435
PassOwnPtr<HTMLParserQuirks> WebChromeClient::createHTMLParserQuirks()
440
PassOwnPtr<HTMLParserQuirks> WebChromeClient::createHTMLParserQuirks()
436
{
441
{
437
    notImplemented();
442
    notImplemented();
- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h +4 lines
Lines 159-164 private: a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h_sec1
159
    
159
    
160
    virtual void formDidFocus(const WebCore::Node*);
160
    virtual void formDidFocus(const WebCore::Node*);
161
    virtual void formDidBlur(const WebCore::Node*);
161
    virtual void formDidBlur(const WebCore::Node*);
162
    virtual void updateFormValidationMessage(WebCore::HTMLFormControlElement*, const WebCore::String&);
163
    virtual double validationMessageUpdateIntervalSecond() { return 0.3; /* FIXME */ }
164
    virtual int validationMessageUpdateCount(const WebCore::String&) { return 20; /* FIXME */ }
165
    virtual double validationMessageBlackoutSecond() { return 0.6; /* FIXME */ }
162
    
166
    
163
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks();
167
    virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks();
164
168
- a/WebKitTools/ChangeLog +25 lines
Lines 1-3 a/WebKitTools/ChangeLog_sec1
1
2010-04-01  Kent Tamura  <tkent@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Framework to show form validation message for invalid controls
6
        https://bugs.webkit.org/show_bug.cgi?id=31718
7
8
        Add LayoutTestController::visibleValidationMessageForElementById().
9
        Windows and Mac have workable implementations.
10
11
        * DumpRenderTree/LayoutTestController.cpp:
12
        (visibleValidationMessageForElementByIdCallback):
13
        (LayoutTestController::staticFunctions):
14
        * DumpRenderTree/LayoutTestController.h:
15
        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
16
        (LayoutTestController::visibleValidationMessageForElementById):
17
        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
18
        (LayoutTestController::visibleValidationMessageForElementById):
19
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
20
        (LayoutTestController::visibleValidationMessageForElementById):
21
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
22
        (LayoutTestController::visibleValidationMessageForElementById):
23
        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
24
        (LayoutTestController::visibleValidationMessageForElementById):
25
1
2010-06-08  Tony Chang  <tony@chromium.org>
26
2010-06-08  Tony Chang  <tony@chromium.org>
2
27
3
        Reviewed by David Levin.
28
        Reviewed by David Levin.
- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp +15 lines
Lines 993-998 static JSValueRef setFrameFlatteningEnabledCallback(JSContextRef context, JSObje a/WebKitTools/DumpRenderTree/LayoutTestController.cpp_sec1
993
    return JSValueMakeUndefined(context);
993
    return JSValueMakeUndefined(context);
994
}
994
}
995
995
996
static JSValueRef visibleValidationMessageForElementByIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
997
{
998
    if (argumentCount < 1)
999
        return JSValueMakeUndefined(context);
1000
    JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
1001
    ASSERT(!*exception);
1002
1003
    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
1004
    JSRetainPtr<JSStringRef> message(controller->visibleValidationMessageForElementById(elementId.get()));
1005
    if (!message.get())
1006
        return JSValueMakeUndefined(context);
1007
    return JSValueMakeString(context, message.get());
1008
}
1009
996
static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
1010
static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
997
{
1011
{
998
    // Has mac & windows implementation
1012
    // Has mac & windows implementation
Lines 1665-1670 JSStaticFunction* LayoutTestController::staticFunctions() a/WebKitTools/DumpRenderTree/LayoutTestController.cpp_sec2
1665
        { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1679
        { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1666
        { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1680
        { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1667
        { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1681
        { "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1682
        { "visibleValidationMessageForElementById", visibleValidationMessageForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1668
        { "waitForPolicyDelegate", waitForPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1683
        { "waitForPolicyDelegate", waitForPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1669
        { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1684
        { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1670
        { "windowCount", windowCountCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
1685
        { "windowCount", windowCountCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- a/WebKitTools/DumpRenderTree/LayoutTestController.h -1 / +1 lines
Lines 100-106 public: a/WebKitTools/DumpRenderTree/LayoutTestController.h_sec1
100
    void setSpatialNavigationEnabled(bool enable);
100
    void setSpatialNavigationEnabled(bool enable);
101
    void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
101
    void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
102
    void setEditingBehavior(const char* editingBehavior);
102
    void setEditingBehavior(const char* editingBehavior);
103
103
    JSStringRef visibleValidationMessageForElementById(JSStringRef id);
104
    void waitForPolicyDelegate();
104
    void waitForPolicyDelegate();
105
    size_t webHistoryItemCount();
105
    size_t webHistoryItemCount();
106
    unsigned workerThreadCount() const;
106
    unsigned workerThreadCount() const;
- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp +6 lines
Lines 676-681 void LayoutTestController::apiTestGoToCurrentBackForwardItem() a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp_sec1
676
676
677
}
677
}
678
678
679
JSStringRef LayoutTestController::visibleValidationMessageForElementById(JSStringRef id)
680
{
681
    // FIXME: Implement this.
682
    return 0;
683
}
684
679
void LayoutTestController::setWebViewEditable(bool)
685
void LayoutTestController::setWebViewEditable(bool)
680
{
686
{
681
}
687
}
- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm +6 lines
Lines 754-759 void LayoutTestController::apiTestGoToCurrentBackForwardItem() a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm_sec1
754
    [view goToBackForwardItem:[[view backForwardList] currentItem]];
754
    [view goToBackForwardItem:[[view backForwardList] currentItem]];
755
}
755
}
756
756
757
JSStringRef LayoutTestController::visibleValidationMessageForElementById(JSStringRef id)
758
{
759
    RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, id));
760
    return JSStringCreateWithCFString((CFStringRef)[mainFrame visibleValidationMessageForElementById:(NSString*)idCF.get()]);
761
}
762
757
void LayoutTestController::setWebViewEditable(bool editable)
763
void LayoutTestController::setWebViewEditable(bool editable)
758
{
764
{
759
    WebView *view = [mainFrame webView];
765
    WebView *view = [mainFrame webView];
- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp +6 lines
Lines 568-573 bool LayoutTestController::callShouldCloseOnWebView() a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp_sec1
568
    return false;
568
    return false;
569
}
569
}
570
570
571
JSStringRef LayoutTestController::visibleValidationMessageForElementById(JSStringRef id)
572
{
573
    // FIXME: Implement this.
574
    return 0;
575
}
576
571
void LayoutTestController::setScrollbarPolicy(const QString& orientation, const QString& policy)
577
void LayoutTestController::setScrollbarPolicy(const QString& orientation, const QString& policy)
572
{
578
{
573
    Qt::Orientation o;
579
    Qt::Orientation o;
- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp +13 lines
Lines 1260-1265 void LayoutTestController::apiTestGoToCurrentBackForwardItem() a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp_sec1
1260
    webView->goToBackForwardItem(item.get(), &success);
1260
    webView->goToBackForwardItem(item.get(), &success);
1261
}
1261
}
1262
1262
1263
JSStringRef LayoutTestController::visibleValidationMessageForElementById(JSStringRef id)
1264
{
1265
    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
1266
    if (!framePrivate)
1267
        return 0;
1268
    BSTR messageBSTR;
1269
    if (FAILED(framePrivate->visibleValidationMessageForElementById(bstrT(id).GetBSTR(), &messageBSTR)))
1270
        return 0;
1271
    JSStringRef messageJS = JSStringCreateWithBSTR(messageBSTR);
1272
    SysFreeString(messageBSTR);
1273
    return messageJS;
1274
}
1275
1263
void LayoutTestController::setWebViewEditable(bool)
1276
void LayoutTestController::setWebViewEditable(bool)
1264
{
1277
{
1265
}
1278
}
- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp +6 lines
Lines 419-424 void LayoutTestController::setSpatialNavigationEnabled(bool) a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp_sec1
419
419
420
}
420
}
421
421
422
JSStringRef LayoutTestController::visibleValidationMessageForElementById(JSStringRef id)
423
{
424
    // FIXME: Implement this.
425
    return 0;
426
}
427
422
void LayoutTestController::setWebViewEditable(bool)
428
void LayoutTestController::setWebViewEditable(bool)
423
{
429
{
424
}
430
}

Return to Bug 31718