Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Source/WebCore: Web Inspector: Move formatting support from JavaScrip…
…tSource to UISourceCode.

https://bugs.webkit.org/show_bug.cgi?id=92373

Reviewed by Pavel Feldman.

Moved formatting support from JavaScriptSource to UISourceCode.
Extracted Formatter interface from ScriptFormatter and created IdentityFormatter
implememntation and Formatter.createFormatter(contentType) formatter factory.
Introduced virtual formattedChanged() method on UISourceCode.

* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource):
(WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
(WebInspector.JavaScriptSource.prototype.breakpointStorageId):
(WebInspector.JavaScriptSource.prototype.searchInContent):
(WebInspector.JavaScriptSource.prototype.formattedChanged):
* inspector/front-end/ScriptFormatter.js:
(WebInspector.Formatter):
(WebInspector.Formatter.createFormatter):
(WebInspector.Formatter.locationToPosition):
(WebInspector.Formatter.positionToLocation):
(WebInspector.Formatter.prototype.formatContent):
(WebInspector.ScriptFormatter):
(WebInspector.IdentityFormatter):
(WebInspector.IdentityFormatter.prototype.formatContent):
(WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
(WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.requestContent):
(WebInspector.UISourceCode.prototype._fireContentAvailable):
(WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
(WebInspector.UISourceCode.prototype.overrideLocation):
(WebInspector.UISourceCode.prototype.togglingFormatter):
(WebInspector.UISourceCode.prototype.formatted):
(WebInspector.UISourceCode.prototype.setFormatted.if):
(WebInspector.UISourceCode.prototype.setFormatted.didGetContent.formattedChanged):
(WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
(WebInspector.UISourceCode.prototype.setFormatted):
(WebInspector.UISourceCode.prototype.createFormatter):
(WebInspector.UISourceCode.prototype.formattedChanged):

Source/WebKit2: [EFL][WK2] Add unit tests for Ewk_View form client
https://bugs.webkit.org/show_bug.cgi?id=92468

Reviewed by Simon Hausmann.

Add unit test for form client functionality in
Ewk_View.

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(onFormAboutToBeSubmitted):
(TEST_F):

LayoutTests: Web Inspector: Move formatting support from JavaScriptSource to UISourceCode.
https://bugs.webkit.org/show_bug.cgi?id=92373

Reviewed by Pavel Feldman.

* inspector/debugger/script-formatter.html:


Canonical link: https://commits.webkit.org/110288@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Vsevolod Vlasov committed Jul 27, 2012
1 parent 1af2515 commit d7dad45
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
11 changes: 11 additions & 0 deletions LayoutTests/ChangeLog
Expand Up @@ -18,6 +18,17 @@
* platform/qt/css3/filters/effect-brightness-clamping-hw-expected.png: Added.
* platform/qt/css3/filters/effect-brightness-clamping-hw-expected.txt: Added.

2012-07-27 János Badics <jbadics@inf.u-szeged.hu>

[Qt] Unreviewed, rebaseline for tests introduced in r123790

Rubber stamped by Zoltan Herczeg.

* platform/qt/css3/filters/effect-brightness-clamping-expected.png: Added.
* platform/qt/css3/filters/effect-brightness-clamping-expected.txt: Added.
* platform/qt/css3/filters/effect-brightness-clamping-hw-expected.png: Added.
* platform/qt/css3/filters/effect-brightness-clamping-hw-expected.txt: Added.

2012-07-27 Alec Flett <alecflett@chromium.org>

IndexedDB: inject index keys on cursor/objectstore/index get success handlers
Expand Down
43 changes: 43 additions & 0 deletions Source/WebCore/ChangeLog
Expand Up @@ -99,6 +99,49 @@
* loader/cache/CachedScript.h:
(CachedScript):

2012-07-27 Huang Dongsung <luxtella@company100.net>

Gather the duplicated timer code into CachedResource.
https://bugs.webkit.org/show_bug.cgi?id=92332

Reviewed by Nate Chapin.

Internal review by Jae Hyun Park.

When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
start the timer to destroy decoded data. Those three classes have their own
timer.
Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
stop the timer. This change does not have any side effect because
CachedResource::didAddClient only stops the timer in this case.

No new tests - no new testable functionality.

* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
(WebCore::CachedCSSStyleSheet::didAddClient):
* loader/cache/CachedCSSStyleSheet.h:
(CachedCSSStyleSheet):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
(WebCore::CachedImage::didAddClient):
(WebCore::CachedImage::allClientsRemoved):
* loader/cache/CachedImage.h:
(CachedImage):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::didAddClient):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore):
(WebCore::CachedResource::decodedDataDeletionTimerFired):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
(CachedScript):

2012-07-27 Dana Jansens <danakj@chromium.org>

[chromium] Don't add a HUD layer when there is no rootLayer
Expand Down
14 changes: 14 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
2012-07-27 Christophe Dumez <christophe.dumez@intel.com>

[EFL][WK2] Add unit tests for Ewk_View form client
https://bugs.webkit.org/show_bug.cgi?id=92468

Reviewed by Simon Hausmann.

Add unit test for form client functionality in
Ewk_View.

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(onFormAboutToBeSubmitted):
(TEST_F):

2012-07-26 Zeno Albisser <zeno@webkit.org>

Unreviewed Qt buildfix after r123786.
Expand Down
51 changes: 51 additions & 0 deletions Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp
Expand Up @@ -60,3 +60,54 @@ TEST_F(EWK2UnitTestBase, ewk_view_setting_encoding_custom)
ASSERT_TRUE(ewk_view_setting_encoding_custom_set(webView(), 0));
ASSERT_FALSE(ewk_view_setting_encoding_custom_get(webView()));
}

static void onFormAboutToBeSubmitted(void* userData, Evas_Object*, void* eventInfo)
{
Ewk_Form_Submission_Request* request = static_cast<Ewk_Form_Submission_Request*>(eventInfo);
bool* handled = static_cast<bool*>(userData);

ASSERT_TRUE(request);

Eina_List* fieldNames = ewk_form_submission_request_field_names_get(request);
ASSERT_TRUE(fieldNames);
ASSERT_EQ(eina_list_count(fieldNames), 3);
void* data;
EINA_LIST_FREE(fieldNames, data)
eina_stringshare_del(static_cast<char*>(data));

const char* value1 = ewk_form_submission_request_field_value_get(request, "text1");
ASSERT_STREQ(value1, "value1");
eina_stringshare_del(value1);
const char* value2 = ewk_form_submission_request_field_value_get(request, "text2");
ASSERT_STREQ(value2, "value2");
eina_stringshare_del(value2);
const char* password = ewk_form_submission_request_field_value_get(request, "password");
ASSERT_STREQ(password, "secret");
eina_stringshare_del(password);

*handled = true;
}

TEST_F(EWK2UnitTestBase, ewk_view_form_submission_request)
{
const char* formHTML =
"<html><head><script type='text/javascript'>function submitForm() { document.getElementById('myform').submit(); }</script></head>"
"<body onload='submitForm()'>"
" <form id='myform' action='#'>"
" <input type='text' name='text1' value='value1'>"
" <input type='text' name='text2' value='value2'>"
" <input type='password' name='password' value='secret'>"
" <textarea cols='5' rows='5' name='textarea'>Text</textarea>"
" <input type='hidden' name='hidden1' value='hidden1'>"
" <input type='submit' value='Submit'>"
" </form>"
"</body></html>";

ewk_view_html_string_load(webView(), formHTML, "file:///", 0);
bool handled = false;
evas_object_smart_callback_add(webView(), "form,submission,request", onFormAboutToBeSubmitted, &handled);
while (!handled)
ecore_main_loop_iterate();
ASSERT_TRUE(handled);
evas_object_smart_callback_del(webView(), "form,submission,request", onFormAboutToBeSubmitted);
}

0 comments on commit d7dad45

Please sign in to comment.