diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
| commit | 6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch) | |
| tree | d9c68d1cca0b3e352f1e438561f3e504e641a08f /Tools | |
| parent | d0424a769059c84ae20beb3c217812792ea6726b (diff) | |
| download | qtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz | |
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Tools')
47 files changed, 698 insertions, 237 deletions
diff --git a/Tools/ChangeLog b/Tools/ChangeLog index c801c51c2..1e5b3a11d 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,471 @@ +2012-09-18 Simon Hausmann <simon.hausmann@digia.com> + + [Qt] Fix build with some versions of the gold linker + + Reviewed by Tor Arne Vestbø. + + Don't unconditionally pass --no-keep-memory to the linker, some versions might not support it. + Instead run a compile/link test first to see if it works. + + * qmake/config.tests/gnuld/gnuld.pro: Added. + * qmake/config.tests/gnuld/main.cpp: Added. + (main): + * qmake/mkspecs/features/unix/default_post.prf: + +2012-09-18 Simon Hausmann <simon.hausmann@digia.com> + + [Qt] Remove forced use of gold. + + Reviewed by Tor Arne Vestbø. + + The choice of what linker to use with WebKit should be taken by Qt's build system and ideally the same for all + modules of Qt. Then in turn it is usually up to the administrator of the machine. Recent Debian based systems + often offer the automatic use of gold through a symlink and a dpkg-diversion when installing the gold package. + + * qmake/mkspecs/features/unix/default_post.prf: + +2012-09-18 Simon Hausmann <simon.hausmann@digia.com> + + [Qt] Prospective Qt/Windows cross-compiling fix + + Reviewed by Tor Arne Vestbø. + + The win32 scope is not set when cross-compiling from Linux to Windows. + + * qmake/mkspecs/features/functions.prf: + +2012-09-18 Seokju Kwon <seokju.kwon@samsung.com> + + [EFL] Remove background view on EWebLauncher and MiniBrowser + https://bugs.webkit.org/show_bug.cgi?id=96905 + + Reviewed by Gyuyoung Kim. + + The size of webview was changed after adding url bar. + And the background view is not necessary anymore, since it was used for debugging back in the day. + + * EWebLauncher/main.c: + (_ELauncher): + (on_ecore_evas_resize): + (browserCreate): + * MiniBrowser/efl/main.c: + (_MiniBrowser): + (on_ecore_evas_resize): + (browserCreate): + +2012-09-18 Sergio Villar Senin <svillar@igalia.com> + + [GTK] run-webkit-tests unable to find TestExpectations for WK2 + https://bugs.webkit.org/show_bug.cgi?id=96998 + + Reviewed by Philippe Normand. + + We should look for TestExpectations files in all the locations where + we currently look for Skipped files. This will allow + run-webkit-tests to look for TestExpectations files in + platform/gtk-wk2 and platform/wk2 if the "-2" flag is used. + + * Scripts/webkitpy/layout_tests/port/gtk.py: + (GtkPort.expectations_files): + +2012-09-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Fix build without the QtQuick module + + Reviewed by Simon Hausmann. + + * qmake/mkspecs/features/features.prf: + +2012-09-18 Stephanie Lewis <slewis@apple.com> + + Build fix after http://trac.webkit.org/projects/webkit/changeset/128852. + + Unreviewed. + + * DumpRenderTree/mac/DumpRenderTree.mm: + (poseAsClass): + +2012-09-18 Allan Sandfeld Jensen <allan.jensen@nokia.com> + + Unreviewed update of email addresses for Berlin QtWebKit office. + + * Scripts/webkitpy/common/config/committers.py: + +2012-09-17 Zan Dobersek <zandobersek@gmail.com> + + [GTK] fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html failing after r128645 + https://bugs.webkit.org/show_bug.cgi?id=96899 + + Reviewed by Martin Robinson. + + When overriding the 'WebKitDisplayImageKey' preference, use the + 'auto-load-images' property of WebKitWebSettings as the property which + should be updated with the corresponding preference value. + + * DumpRenderTree/gtk/DumpRenderTree.cpp: + (resetDefaultsToConsistentValues): + * DumpRenderTree/gtk/TestRunnerGtk.cpp: + (TestRunner::overridePreference): + +2012-09-17 Pratik Solanki <psolanki@apple.com> + + DumpRenderTree and WebKitTestRunner should compile with -Wundef on Mac + https://bugs.webkit.org/show_bug.cgi?id=96973 + + Reviewed by Dan Bernstein. + + * DumpRenderTree/mac/Configurations/Base.xcconfig: + * WebKitTestRunner/Configurations/Base.xcconfig: + * WebKitTestRunner/PlatformWebView.h: Use #ifdef __OBJC__ and not #if. + +2012-09-17 Dirk Pranke <dpranke@chromium.org> + + nrwt: remove "unexpected EOF" warnings + https://bugs.webkit.org/show_bug.cgi?id=96970 + + Reviewed by Ojan Vafai. + + After debugging this a bit, it looks like there aren't any cases + that I can reproduce where a read() of zero indicates something + actually wrong; either it is a prelude to a crash, or a false + negative. So, I'm removing these warnings and adding a comment. + + * Scripts/webkitpy/layout_tests/port/server_process.py: + (ServerProcess._wait_for_data_and_update_buffers_using_select): + +2012-09-17 Dirk Pranke <dpranke@chromium.org> + + [chromium] ASAN bot is crashing at the end of the run + https://bugs.webkit.org/show_bug.cgi?id=96967 + + Reviewed by Abhishek Arya. + + The ASAN bot is crashing attempting to decode some output into + UTF-8; there's no reason to do this, so let's not do this and + see if something else is going on as well. + + * Scripts/webkitpy/layout_tests/port/chromium.py: + (ChromiumPort._get_crash_log): + +2012-09-17 Dirk Pranke <dpranke@chromium.org> + + nrwt: --results-directory isn't getting printed properly + https://bugs.webkit.org/show_bug.cgi?id=96965 + + Reviewed by Ojan Vafai. + + options.results_directory isn't actually initialized with the + default values until after we call print_config(), so this + changes things to print the value directly. + + * Scripts/webkitpy/layout_tests/run_webkit_tests.py: + (run): + * Scripts/webkitpy/layout_tests/views/printing.py: + (Printer.print_config): + * Scripts/webkitpy/layout_tests/views/printing_unittest.py: + (Testprinter.test_print_config): + +2012-09-17 Rob Buis <rbuis@rim.com> + + [BlackBerry] Enable VIDEO_TRACK + https://bugs.webkit.org/show_bug.cgi?id=96949 + + Reviewed by Antonio Gomes. + + * Scripts/webkitperl/FeatureList.pm: + +2012-09-17 Rick Byers <rbyers@chromium.org> + + Add handling of new GestureTapCancel in DRT + + https://bugs.webkit.org/show_bug.cgi?id=96183 + + Reviewed by Antonio Gomes. + + * DumpRenderTree/chromium/TestWebPlugin.cpp: + (TestWebPlugin::handleInputEvent): + * DumpRenderTree/chromium/EventSender.cpp: + (EventSender::gestureTapCancel): + +2012-09-17 Philip Rogers <pdr@google.com> + + Teach style checker about preprocessor directive indentation rules + https://bugs.webkit.org/show_bug.cgi?id=96874 + + Reviewed by Adam Barth. + + Preprocessor directives (#ifdef, #include, #define, etc.) should not be indented. + This is not explicit in our style guide but is generally followed in our code. + Searching for violations in our codebase shows these are rarely indented: + #include - indented in 6 files + #ifdef - indented in 0 files + #ifndef - indented in 1 file + #define - indented in 11 files + #if - indented in 7 files + + * Scripts/webkitpy/style/checkers/cpp.py: + (check_directive_indentation): + + This is the simple test where we look for spaces followed by a #. + + (check_style): + * Scripts/webkitpy/style/checkers/cpp_unittest.py: + + A few tests needed to be modified because they had unintentionally indented + preprocessor directives. + + (CppStyleTest.test_build_class.Foo): + (CppStyleTest.test_build_class): + (CppStyleTest.test_build_class.DERIVE_FROM_GOO): + (WebKitStyleTest.test_line_breaking): + (WebKitStyleTest.test_directive_indentation): + +2012-09-17 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Auto-generate the module pri file for QtWebKit + + Reviewed by Simon Hausmann. + + * qmake/qt_webkit.pri: Removed. + +2012-09-14 Dirk Pranke <dpranke@chromium.org> + + nrwt: --additional-platform-dir is broken on chromium ports + https://bugs.webkit.org/show_bug.cgi?id=96840 + + Reviewed by Ojan Vafai. + + Looks like I broke this when cleaning things up as part of + adding ML support. Fixing and adding a test. + + * Scripts/webkitpy/layout_tests/port/chromium.py: + (ChromiumPort.default_baseline_search_path): + * Scripts/webkitpy/layout_tests/port/chromium_android.py: + (ChromiumAndroidPort.default_baseline_search_path): + * Scripts/webkitpy/layout_tests/port/chromium_linux.py: + (ChromiumLinuxPort.default_baseline_search_path): + * Scripts/webkitpy/layout_tests/port/chromium_mac.py: + (ChromiumMacPort.__init__): + * Scripts/webkitpy/layout_tests/port/chromium_win.py: + (ChromiumWinPort.setup_environ_for_server): + * Scripts/webkitpy/layout_tests/port/port_testcase.py: + (test_check_build): + (test_additional_platform_directory): + +2012-09-13 Stephanie Lewis <slewis@apple.com> + + mac-future ignores previous platform TestExpectations. + https://bugs.webkit.org/show_bug.cgi?id=96718. + + Reviewed by Dirk Pranke. + + TestExpectations match an expectation's configuraton against a list of configurations that are + valid for that port. That list does not contain mac-future so none of the expectations can be + applied. + + * Scripts/webkitpy/layout_tests/port/apple.py: + (ApplePort._generate_all_test_configurations): + +2012-09-14 Adam Barth <abarth@webkit.org> + + Remove webkitPostMessage + https://bugs.webkit.org/show_bug.cgi?id=96577 + + Reviewed by Ojan Vafai. + + Add ENABLE_LEGACY_VENDOR_PREFIXES flag. + + * Scripts/webkitperl/FeatureList.pm: + * qmake/mkspecs/features/features.pri: + +2012-09-14 Alexey Proskuryakov <ap@apple.com> + + [WK2] webarchive/loading/javascript-url-iframe-crash.html fails + https://bugs.webkit.org/show_bug.cgi?id=96817 + + Reviewed by Kenneth Rohde Christiansen. + + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame): This callback + got overlooked when adding logging elsewhere. + +2012-09-14 Peter Beverloo <peter@chromium.org> + + [Chromium] Build fix for DumpRenderTree following r128628 + https://bugs.webkit.org/show_bug.cgi?id=96808 + + Reviewed by Tony Chang. + + When building DumpRenderTree from the Chromium project, a compile error + shows up because including the header ForwardIOStreamsAndroid.h cannot + be located. TestWebKitAPI does this correctly. + + * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp: + +2012-09-14 Dana Jansens <danakj@chromium.org> + + Change cc-bugs@google.com watchlist to cc-bugs@chromium.org + https://bugs.webkit.org/show_bug.cgi?id=96805 + + Reviewed by Dirk Pranke. + + * Scripts/webkitpy/common/config/committers.py: + * Scripts/webkitpy/common/config/watchlist: + +2012-09-14 Peter Beverloo <peter@chromium.org> + + [Chromium] Support the --{in,out,err}-fifo arguments on TestWebKitAPI and webkit_unit_tests + https://bugs.webkit.org/show_bug.cgi?id=96687 + + Reviewed by Tony Chang. + + Android's DumpRenderTree currently supports these arguments, implemented + as part of TestShellAndroid: + http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp?rev=128496 + + They're used by the layout test runner to get the STDOUT and STDERR while + a layout test run is in process, which is a safer alternative to parsing + all the logcat output manually. The implementation can be seen here: + http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py?rev=128496#L590 + + This patch generalizes parsing of and applying the effects of these arguments + so that they can be used for TestWebKitAPI and webkit_unit_tests as well. + After this patch, this will make it possible to pull out the output-reading + code from Android's layout test port and generalize it so it can be re-used + in the new test-runner for the other two test suites. + + This has no effect when compiling and running these tests as part of Chromium + code, which has a much more advanced test-runner that does parse complete log + output, but also directly depends on code licensed under Apache 2. + + * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp: + * DumpRenderTree/chromium/TestShellAndroid.cpp: + (platformInit): + * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp: + +2012-09-14 Zoltan Horvath <zoltan@webkit.org> + + check-webkit-style should not warn in case of NONCOPYABLE and FAST_ALLOCATED macros + https://bugs.webkit.org/show_bug.cgi?id=96656 + + Reviewed by Adam Barth. + + We should allow to use WTF_MAKE_NONCOPYABLE(ClassName) and WTF_MAKE_FAST_ALLOCATED + macros in 1 line. + + * Scripts/webkitpy/style/checkers/cpp.py: + (check_style.definitions): + (check_style): Add rule. + * Scripts/webkitpy/style/checkers/cpp_unittest.py: + (WebKitStyleTest.test_line_breaking): Add unittest. + +2012-09-14 Christophe Dumez <christophe.dumez@intel.com> + + WebKitTestRunner needs layoutTestController.dumpDatabaseCallbacks + https://bugs.webkit.org/show_bug.cgi?id=57570 + + Reviewed by Kenneth Rohde Christiansen. + + Implement testRunner.dumpDatabaseCallbacks in WebKitTestRunner + and dump the information expected by the test cases. + + * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: + * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: + (WTR::InjectedBundle::beginTesting): Explicitly set the default + database quota. + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::securityOriginToStr): New convenience function to convert + a security origin to the string expected in test results. + (WTR): + (WTR::InjectedBundlePage::InjectedBundlePage): + (WTR::InjectedBundlePage::didExceedDatabaseQuota): + (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Minor + refactoring to share code with didExceedDatabaseQuota. + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: + (InjectedBundlePage): + * WebKitTestRunner/InjectedBundle/TestRunner.cpp: + (WTR::TestRunner::TestRunner): + * WebKitTestRunner/InjectedBundle/TestRunner.h: + (WTR::TestRunner::dumpDatabaseCallbacks): + (WTR::TestRunner::shouldDumpDatabaseCallbacks): + (TestRunner): + +2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Set force_static_libs_as_shared early enough to be caught by configure + + Rubber-stamped by Simon Hausmann. + + * qmake/mkspecs/features/default_post.prf: + +2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Remove old cruft from the qmake build system + + Rubber-stamped by Simon Hausmann. + + * DumpRenderTree/qt/DumpRenderTree.pro: + * qmake/mkspecs/features/default_post.prf: + +2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Enable force_static_libs_as_shared for development + + Not enabled for buildbots or production-builds (part of Qt5) + + Reviewed by Simon Hausmann. + + * qmake/mkspecs/features/default_post.prf: + +2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Make force_static_libs_as_shared work on Mac OS + + We had to move a few LIBS += around that were in the wrong place, + and not caught when everything was just linked into the final + QtWebKit library. + + Reviewed by Simon Hausmann. + + * qmake/mkspecs/features/default_post.prf: + * qmake/mkspecs/features/force_static_libs_as_shared.prf: + +2012-09-14 Simon Hausmann <simon.hausmann@nokia.com> + + [Qt] Fix build of WTR on Windows + + Reviewed by Tor Arne Vestbø. + + WTR/qt/main.cpp includes TestController.h, which lives in just WTR/ + With qmake's unix makefile generator as well as with the MingW generator, + the directory where the pro file lives (WTR/) is automatically added to + the include search path, but not so with MSVC. Instead of relying on qmake's + implicit feature here, add WTR/ explicitly to the include search path. + + * WebKitTestRunner/Target.pri: + +2012-09-14 Christophe Dumez <christophe.dumez@intel.com> + + WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads + https://bugs.webkit.org/show_bug.cgi?id=42691 + + Reviewed by Kenneth Rohde Christiansen. + + Add implementation for testrunner.setStopProvisionalFrameLoads() + in WebKitTestRunner. + + Original patch by Alexey Proskuryakov. + + * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: + (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): + * WebKitTestRunner/InjectedBundle/TestRunner.cpp: + (WTR::TestRunner::TestRunner): + * WebKitTestRunner/InjectedBundle/TestRunner.h: + (TestRunner): + (WTR::TestRunner::setStopProvisionalFrameLoads): + (WTR::TestRunner::shouldStopProvisionalFrameLoads): + 2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Fix handling of debug/release/debug_and_release/build_all diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp index 8e3347ca8..131d40f02 100644 --- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp +++ b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp @@ -285,12 +285,21 @@ '<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code', '<(chromium_src_dir)/tools/android/forwarder/forwarder.gyp:forwarder', '<(chromium_src_dir)/tools/android/md5sum/md5sum.gyp:md5sum', + '<(source_dir)/WebKit/chromium/WebKitUnitTests.gyp:io_stream_forwarder_android', ], 'dependencies!': [ 'ImageDiff', 'copy_TestNetscapePlugIn', '<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa', ], + # FIXME: Remove when the io_stream_forwarder_android target is deprecated. + 'conditions': [ + ['inside_chromium_build==1', { + 'include_dirs': [ + '<(source_dir)/WebKit/chromium/', + ], + }], + ], 'copies': [{ 'destination': '<(PRODUCT_DIR)', 'files': [ diff --git a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp index d5eaac4ad..236012865 100644 --- a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp +++ b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp @@ -287,6 +287,7 @@ EventSender::EventSender() bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate); bindMethod("gestureTap", &EventSender::gestureTap); bindMethod("gestureTapDown", &EventSender::gestureTapDown); + bindMethod("gestureTapCancel", &EventSender::gestureTapCancel); bindMethod("gestureLongPress", &EventSender::gestureLongPress); bindMethod("gestureTwoFingerTap", &EventSender::gestureTwoFingerTap); bindMethod("zoomPageIn", &EventSender::zoomPageIn); @@ -1119,6 +1120,12 @@ void EventSender::gestureTapDown(const CppArgumentList& arguments, CppVariant* r gestureEvent(WebInputEvent::GestureTapDown, arguments); } +void EventSender::gestureTapCancel(const CppArgumentList& arguments, CppVariant* result) +{ + result->setNull(); + gestureEvent(WebInputEvent::GestureTapCancel, arguments); +} + void EventSender::gestureLongPress(const CppArgumentList& arguments, CppVariant* result) { result->setNull(); @@ -1182,6 +1189,10 @@ void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList& event.x = point.x; event.y = point.y; break; + case WebInputEvent::GestureTapCancel: + event.x = point.x; + event.y = point.y; + break; case WebInputEvent::GestureLongPress: event.x = point.x; event.y = point.y; diff --git a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h index 828e7c842..e6794a077 100644 --- a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h +++ b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h @@ -106,6 +106,7 @@ public: void gestureScrollUpdate(const CppArgumentList&, CppVariant*); void gestureTap(const CppArgumentList&, CppVariant*); void gestureTapDown(const CppArgumentList&, CppVariant*); + void gestureTapCancel(const CppArgumentList&, CppVariant*); void gestureLongPress(const CppArgumentList&, CppVariant*); void gestureTwoFingerTap(const CppArgumentList&, CppVariant*); void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&); diff --git a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp index 188158440..8f8eedc3d 100644 --- a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp +++ b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp @@ -32,15 +32,8 @@ #include "TestShell.h" #include "linux/WebFontRendering.h" +#include "tests/ForwardIOStreamsAndroid.h" #include "third_party/skia/include/ports/SkTypeface_android.h" -#include <android/log.h> -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> -#include <wtf/Assertions.h> namespace { @@ -51,46 +44,6 @@ const char fontMainConfigFile[] = DEVICE_DRT_DIR "android_main_fonts.xml"; const char fontFallbackConfigFile[] = DEVICE_DRT_DIR "android_fallback_fonts.xml"; const char fontsDir[] = DEVICE_DRT_DIR "fonts/"; -const char optionInFIFO[] = "--in-fifo="; -const char optionOutFIFO[] = "--out-fifo="; -const char optionErrFIFO[] = "--err-fifo="; - -void androidLogError(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2); - -void androidLogError(const char* format, ...) -{ - va_list args; - va_start(args, format); - __android_log_vprint(ANDROID_LOG_ERROR, "DumpRenderTree", format, args); - va_end(args); -} - -void removeArg(int index, int* argc, char*** argv) -{ - for (int i = index; i < *argc; ++i) - (*argv)[i] = (*argv)[i + 1]; - --*argc; -} - -void createFIFO(const char* fifoPath) -{ - unlink(fifoPath); - // 0666 is rw-rw-rw-, to allow adb shell to read/write the fifo. - // Explicitly call chmod to ensure the mode is set despite umask. - if (mkfifo(fifoPath, 0666) || chmod(fifoPath, 0666)) { - androidLogError("Failed to create fifo %s: %s\n", fifoPath, strerror(errno)); - exit(EXIT_FAILURE); - } -} - -void redirect(FILE* stream, const char* path, const char* mode) -{ - if (!freopen(path, mode, stream)) { - androidLogError("Failed to redirect stream to file: %s: %s\n", path, strerror(errno)); - exit(EXIT_FAILURE); - } -} - } // namespace void platformInit(int* argc, char*** argv) @@ -98,38 +51,8 @@ void platformInit(int* argc, char*** argv) // Initialize skia with customized font config files. SkUseTestFontConfigFile(fontMainConfigFile, fontFallbackConfigFile, fontsDir); - const char* inFIFO = 0; - const char* outFIFO = 0; - const char* errFIFO = 0; - for (int i = 1; i < *argc; ) { - const char* argument = (*argv)[i]; - if (strstr(argument, optionInFIFO) == argument) { - inFIFO = argument + WTF_ARRAY_LENGTH(optionInFIFO) - 1; - createFIFO(inFIFO); - removeArg(i, argc, argv); - } else if (strstr(argument, optionOutFIFO) == argument) { - outFIFO = argument + WTF_ARRAY_LENGTH(optionOutFIFO) - 1; - createFIFO(outFIFO); - removeArg(i, argc, argv); - } else if (strstr(argument, optionErrFIFO) == argument) { - errFIFO = argument + WTF_ARRAY_LENGTH(optionErrFIFO) - 1; - createFIFO(errFIFO); - removeArg(i, argc, argv); - } else - ++i; - } - - // The order of createFIFO() and redirectToFIFO() is important to avoid deadlock. - if (outFIFO) - redirect(stdout, outFIFO, "w"); - if (inFIFO) - redirect(stdin, inFIFO, "r"); - if (errFIFO) - redirect(stderr, errFIFO, "w"); - else { - // Redirect stderr to stdout. - dup2(1, 2); - } + // Set up IO stream forwarding if necessary. + WebKit::maybeInitIOStreamForwardingForAndroid(argc, argv); // Disable auto hint and use normal hinting in layout test mode to produce the same font metrics as chromium-linux. WebKit::WebFontRendering::setAutoHint(false); diff --git a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp index 34d2cc8c0..0929cadf6 100644 --- a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp +++ b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp @@ -776,6 +776,8 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value) propertyName = "enable-webgl"; else if (g_str_equal(originalName.get(), "WebKitWebAudioEnabled")) propertyName = "enable-webaudio"; + else if (g_str_equal(originalName.get(), "WebKitDisplayImagesKey")) + propertyName = "auto-load-images"; else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) { DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(booleanFromValue(valueAsString.get())); return; diff --git a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig index b6fe75a3f..140714eac 100644 --- a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig +++ b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig @@ -37,7 +37,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO GCC_WARN_UNUSED_FUNCTION = YES GCC_WARN_UNUSED_VARIABLE = YES -WARNING_CFLAGS = -Wall -W -Wno-unused-parameter +WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef LINKER_DISPLAYS_MANGLED_NAMES = YES; CLANG_CXX_LIBRARY = $(CLANG_CXX_LIBRARY_$(TARGET_MAC_OS_X_VERSION_MAJOR)); diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm index baa54ed18..ee82454b5 100644 --- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm +++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm @@ -153,7 +153,7 @@ static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test -#if __OBJC2__ +#ifdef __OBJC2__ static void swizzleAllMethods(Class imposter, Class original) { unsigned int imposterMethodCount; @@ -192,7 +192,7 @@ static void poseAsClass(const char* imposter, const char* original) Class imposterClass = objc_getClass(imposter); Class originalClass = objc_getClass(original); -#if !__OBJC2__ +#ifndef __OBJC2__ class_poseAs(imposterClass, originalClass); #else diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro index dd3a22275..baf025aed 100644 --- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro +++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro @@ -9,8 +9,7 @@ TEMPLATE = app TARGET = DumpRenderTree DESTDIR = $$ROOT_BUILD_DIR/bin -WEBKIT += wtf webcore -!v8: WEBKIT += javascriptcore +WEBKIT += wtf javascriptcore webcore INCLUDEPATH += \ $$PWD/ \ diff --git a/Tools/EWebLauncher/main.c b/Tools/EWebLauncher/main.c index 8e6ae0027..dd392e4e1 100644 --- a/Tools/EWebLauncher/main.c +++ b/Tools/EWebLauncher/main.c @@ -155,7 +155,6 @@ typedef struct _User_Arguments { typedef struct _ELauncher { Ecore_Evas *ee; Evas *evas; - Evas_Object *bg; Evas_Object *browser; Url_Bar *url_bar; User_Arguments *userArgs; @@ -242,7 +241,6 @@ on_ecore_evas_resize(Ecore_Evas *ee) { ELauncher *app; Evas_Object *webview; - Evas_Object *bg; int w, h; ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); @@ -251,10 +249,6 @@ on_ecore_evas_resize(Ecore_Evas *ee) app = find_app_from_ee(ee); url_bar_width_set(app->url_bar, w); - bg = evas_object_name_find(ecore_evas_get(ee), "bg"); - evas_object_move(bg, 0, 0); - evas_object_resize(bg, w, h); - webview = evas_object_name_find(ecore_evas_get(ee), "browser"); evas_object_move(webview, 0, URL_BAR_HEIGHT); evas_object_resize(webview, w, h - URL_BAR_HEIGHT); @@ -691,14 +685,6 @@ browserCreate(const char *url, User_Arguments *userArgs) if (!app->evas) return quit(EINA_FALSE, "ERROR: could not get evas from evas-ecore\n"); - app->bg = evas_object_rectangle_add(app->evas); - evas_object_name_set(app->bg, "bg"); - evas_object_color_set(app->bg, 255, 0, 255, 255); - evas_object_move(app->bg, 0, 0); - evas_object_resize(app->bg, geometry.w, geometry.h); - evas_object_layer_set(app->bg, EVAS_LAYER_MIN); - evas_object_show(app->bg); - if (userArgs->backingStore && !strcasecmp(userArgs->backingStore, "tiled")) { app->browser = ewk_view_tiled_add(app->evas); info("backing store: tiled\n"); diff --git a/Tools/MiniBrowser/efl/main.c b/Tools/MiniBrowser/efl/main.c index e3c1929d5..b44e514a1 100644 --- a/Tools/MiniBrowser/efl/main.c +++ b/Tools/MiniBrowser/efl/main.c @@ -41,7 +41,6 @@ static int verbose = 0; typedef struct _MiniBrowser { Ecore_Evas *ee; Evas *evas; - Evas_Object *bg; Evas_Object *browser; Url_Bar *url_bar; } MiniBrowser; @@ -85,7 +84,6 @@ static void closeWindow(Ecore_Evas *ee) static void on_ecore_evas_resize(Ecore_Evas *ee) { Evas_Object *webview; - Evas_Object *bg; int w, h; ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); @@ -93,10 +91,6 @@ static void on_ecore_evas_resize(Ecore_Evas *ee) /* Resize URL bar */ url_bar_width_set(browser->url_bar, w); - bg = evas_object_name_find(ecore_evas_get(ee), "bg"); - evas_object_move(bg, 0, 0); - evas_object_resize(bg, w, h); - webview = evas_object_name_find(ecore_evas_get(ee), "browser"); evas_object_move(webview, 0, URL_BAR_HEIGHT); evas_object_resize(webview, w, h - URL_BAR_HEIGHT); @@ -233,15 +227,6 @@ static MiniBrowser *browserCreate(const char *url, const char *engine) app->evas = ecore_evas_get(app->ee); - app->bg = evas_object_rectangle_add(app->evas); - evas_object_name_set(app->bg, "bg"); - evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - evas_object_move(app->bg, 0, 0); - evas_object_resize(app->bg, DEFAULT_WIDTH, DEFAULT_HEIGHT); - evas_object_color_set(app->bg, 255, 150, 150, 255); - evas_object_show(app->bg); - /* Create webview */ app->browser = ewk_view_add(app->evas); ewk_view_theme_set(app->browser, THEME_DIR"/default.edj"); diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm index ad2304679..102b91ffe 100644 --- a/Tools/Scripts/webkitperl/FeatureList.pm +++ b/Tools/Scripts/webkitperl/FeatureList.pm @@ -90,6 +90,7 @@ my ( $inspectorSupport, $javascriptDebuggerSupport, $legacyNotificationsSupport, + $legacyVendorPrefixSupport, $legacyWebKitBlobBuilderSupport, $linkPrefetchSupport, $linkPrerenderSupport, @@ -281,6 +282,9 @@ my @features = ( { option => "legacy-notifications", desc => "Toggle Legacy Notifications support", define => "ENABLE_LEGACY_NOTIFICATIONS", default => isBlackBerry(), value => \$legacyNotificationsSupport }, + { option => "legacy-vendor-prefixes", desc => "Toggle Legacy Vendor Prefix support", + define => "ENABLE_LEGACY_VENDOR_PREFIXES", default => !isChromium(), value => \$legacyVendorPrefixSupport }, + { option => "legacy-webkit-blob-builder", desc => "Toggle Legacy WebKit Blob Builder support", define => "ENABLE_LEGACY_WEBKIT_BLOB_BUILDER", default => (isGtk() || isChromium() || isBlackBerry() || isEfl()), value => \$legacyWebKitBlobBuilderSupport }, @@ -393,7 +397,7 @@ my @features = ( define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$videoSupport }, { option => "video-track", desc => "Toggle Video Track support", - define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isEfl()), value => \$videoTrackSupport }, + define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$videoTrackSupport }, { option => "webgl", desc => "Toggle WebGL support", define => "ENABLE_WEBGL", default => (isAppleMacWebKit() || isGtk()), value => \$webglSupport }, diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py index bda102e11..1030de694 100644 --- a/Tools/Scripts/webkitpy/common/config/committers.py +++ b/Tools/Scripts/webkitpy/common/config/committers.py @@ -93,7 +93,7 @@ class Reviewer(Committer): watchers_who_are_not_contributors = [ - Account("Chromium Compositor Bugs", ["cc-bugs@google.com"], ""), + Account("Chromium Compositor Bugs", ["cc-bugs@chromium.org"], ""), Account("Chromium Media Reviews", ["feature-media-reviews@chromium.org"], ""), Account("David Levin", ["levin+threading@chromium.org"], ""), Account("David Levin", ["levin+watchlist@chromium.org"], ""), @@ -189,7 +189,7 @@ committers_unable_to_review = [ Committer("Alexandre Elias", ["aelias@chromium.org", "aelias@google.com"], "aelias"), Committer("Alexandru Chiculita", "achicu@adobe.com", "achicu"), Committer("Alice Boxhall", "aboxhall@chromium.org", "aboxhall"), - Committer("Allan Sandfeld Jensen", ["allan.jensen@nokia.com", "kde@carewolf.com", "sandfeld@kde.org"], "carewolf"), + Committer("Allan Sandfeld Jensen", ["allan.jensen@digia.com", "kde@carewolf.com", "sandfeld@kde.org", "allan.jensen@nokia.com"], "carewolf"), Committer("Alok Priyadarshi", "alokp@chromium.org", "alokp"), Committer("Ami Fischman", ["fischman@chromium.org", "fischman@google.com"], "fischman"), Committer("Amruth Raj", "amruthraj@motorola.com", "amruthraj"), @@ -330,7 +330,7 @@ committers_unable_to_review = [ Committer("Matt Perry", "mpcomplete@chromium.org"), Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]), Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"], "maxime.simon"), - Committer(u"Michael Br\u00fcning", ["michaelbruening@gmail.com", "michael.bruning@nokia.com"], "mibrunin"), + Committer(u"Michael Br\u00fcning", ["michaelbruening@gmail.com", "michael.bruning@digia.com", "michael.bruning@nokia.com"], "mibrunin"), Committer("Michael Nordman", "michaeln@google.com", "michaeln"), Committer("Michelangelo De Simone", "michelangelo@webkit.org", "michelangelo"), Committer("Mihnea Ovidenie", "mihnea@adobe.com", "mihnea"), @@ -479,7 +479,7 @@ reviewers_list = [ Reviewer("Jeremy Orlow", ["jorlow@webkit.org", "jorlow@chromium.org"], "jorlow"), Reviewer("Jessie Berlin", ["jberlin@webkit.org", "jberlin@apple.com"], "jessieberlin"), Reviewer("Jian Li", "jianli@chromium.org", "jianli"), - Reviewer("Jocelyn Turcotte", "jocelyn.turcotte@nokia.com", "jturcotte"), + Reviewer("Jocelyn Turcotte", ["jocelyn.turcotte@digia.com", "jocelyn.turcotte@nokia.com"], "jturcotte"), Reviewer("Jochen Eisinger", "jochen@chromium.org", "jochen__"), Reviewer("John Sullivan", "sullivan@apple.com", "sullivan"), Reviewer("Jon Honeycutt", "jhoneycutt@apple.com", "jhoneycutt"), diff --git a/Tools/Scripts/webkitpy/common/config/watchlist b/Tools/Scripts/webkitpy/common/config/watchlist index 4029fe8d5..2ab16b0c2 100755 --- a/Tools/Scripts/webkitpy/common/config/watchlist +++ b/Tools/Scripts/webkitpy/common/config/watchlist @@ -246,7 +246,7 @@ "BlackBerry": [ "mifenton@rim.com", "rwlbuis@gmail.com" ], "CMake": [ "rakuco@webkit.org", "gyuyoung.kim@samsung.com" ], "CSS": [ "alexis@webkit.org", "macpherson@chromium.org", "cmarcelo@webkit.org" ], - "ChromiumGraphics": [ "jamesr@chromium.org", "cc-bugs@google.com" ], + "ChromiumGraphics": [ "jamesr@chromium.org", "cc-bugs@chromium.org" ], "ChromiumPublicApi": [ "abarth@webkit.org", "dglazkov@chromium.org", "fishd@chromium.org", "jamesr@chromium.org", "tkent+wkapi@chromium.org" ], "DOMAttributes": [ "cmarcelo@webkit.org", ], "EFL": [ "rakuco@webkit.org", "gyuyoung.kim@samsung.com" ], diff --git a/Tools/Scripts/webkitpy/layout_tests/port/apple.py b/Tools/Scripts/webkitpy/layout_tests/port/apple.py index d8e16494b..055419a14 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/apple.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/apple.py @@ -92,7 +92,8 @@ class ApplePort(Port): def _generate_all_test_configurations(self): configurations = [] - for port_name in self.VERSION_FALLBACK_ORDER: + allowed_port_names = self.VERSION_FALLBACK_ORDER + [self.operating_system() + "-future"] + for port_name in allowed_port_names: for build_type in self.ALL_BUILD_TYPES: for architecture in self.ARCHITECTURES: configurations.append(TestConfiguration(version=self._strip_port_name_prefix(port_name), architecture=architecture, build_type=build_type)) diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py index feecfbdff..44c98a383 100755 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py @@ -114,6 +114,9 @@ class ChromiumPort(Port): def default_pixel_tests(self): return True + def default_baseline_search_path(self): + return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version()]) + def default_timeout_ms(self): if self.get_option('configuration') == 'Debug': return 12 * 1000 @@ -351,8 +354,8 @@ class ChromiumPort(Port): if stderr and 'AddressSanitizer' in stderr: asan_filter_path = self.path_from_chromium_base('tools', 'valgrind', 'asan', 'asan_symbolize.py') if self._filesystem.exists(asan_filter_path): - output = self._executive.run_command([asan_filter_path], input=stderr) - stderr = self._executive.run_command(['c++filt'], input=output) + output = self._executive.run_command([asan_filter_path], input=stderr, decode_output=False) + stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False) return super(ChromiumPort, self)._get_crash_log(name, pid, stdout, stderr, newer_than) diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py index 4ce18efdd..fcccec15a 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py @@ -187,7 +187,7 @@ class ChromiumAndroidPort(chromium.ChromiumPort): def default_child_processes(self): return len(self._get_devices()) - def baseline_search_path(self): + def default_baseline_search_path(self): return map(self._webkit_baseline_path, self.FALLBACK_PATHS) def check_wdiff(self, logging=True): diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py index d5c2235bf..fa8c274ea 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py @@ -106,7 +106,7 @@ class ChromiumLinuxPort(chromium.ChromiumPort): self._version = 'lucid' # We only support lucid right now. self._architecture = arch - def baseline_search_path(self): + def default_baseline_search_path(self): port_names = self.FALLBACK_PATHS[self._architecture] return map(self._webkit_baseline_path, port_names) diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py index 554feca23..db82d5c79 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py @@ -79,10 +79,6 @@ class ChromiumMacPort(chromium.ChromiumPort): self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):] assert self._version in self.SUPPORTED_OS_VERSIONS - def baseline_search_path(self): - fallback_paths = self.FALLBACK_PATHS - return map(self._webkit_baseline_path, fallback_paths[self._version]) - def _modules_to_search_for_symbols(self): return [self._build_path('ffmpegsumo.so')] diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py index 7d0337acc..1168e407c 100755 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py @@ -99,10 +99,6 @@ class ChromiumWinPort(chromium.ChromiumPort): self._executive.run_command([setup_mount]) # Paths are all absolute, so this does not require a cwd. return env - def baseline_search_path(self): - port_names = self.FALLBACK_PATHS[self.version()] - return map(self._webkit_baseline_path, port_names) - def _modules_to_search_for_symbols(self): # FIXME: we should return the path to the ffmpeg equivalents to detect if we have the mp3 and aac codecs installed. # See https://bugs.webkit.org/show_bug.cgi?id=89706. diff --git a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py index 3cc0ea566..f02d14819 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/gtk.py @@ -38,6 +38,9 @@ from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver class GtkPort(Port, PulseAudioSanitizer): port_name = "gtk" + def expectations_files(self): + return [self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in self._skipped_file_search_paths()] + def _port_flag_for_scripts(self): return "--gtk" diff --git a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py index e12b68773..1f75c799a 100755 --- a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py @@ -609,3 +609,7 @@ class PortTestCase(unittest.TestCase): port._build_driver = build_driver_called port.check_build(False) self.assertFalse(self.build_called, None) + + def test_additional_platform_directory(self): + port = self.make_port(options=MockOptions(additional_platform_directory=['/tmp/foo'])) + self.assertEquals(port.baseline_search_path()[0], '/tmp/foo') diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py b/Tools/Scripts/webkitpy/layout_tests/port/server_process.py index 1cf173975..bfa6aab80 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/server_process.py @@ -228,24 +228,21 @@ class ServerProcess(object): raise try: + # Note that we may get no data during read() even though + # select says we got something; see the select() man page + # on linux. I don't know if this happens on Mac OS and + # other Unixen as well, but we don't bother special-casing + # Linux because it's relatively harmless either way. if out_fd in read_fds: data = self._proc.stdout.read() - if not data and not stopping: - if self._treat_no_data_as_crash or self._proc.poll() is not None: - _log.warning('unexpected EOF of stdout, %s crashed' % self._name) - self._crashed = True - else: - _log.warning('unexpected EOF of stdout, %s is still alive' % self._name) + if not data and not stopping and (self._treat_no_data_as_crash or self._proc.poll()): + self._crashed = True self._output += data if err_fd in read_fds: data = self._proc.stderr.read() - if not data and not stopping: - if self._treat_no_data_as_crash or self._proc.poll() is not None: - _log.warning('unexpected EOF on stderr, %s crashed' % self._name) - self._crashed = True - else: - _log.warning('unexpected EOF on stderr, %s is still alive' % self._name) + if not data and not stopping and (self._treat_no_data_as_crash or self._proc.poll()): + self._crashed = True self._error += data except IOError, e: # We can ignore the IOErrors because we will detect if the subporcess crashed diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py index ddb0105c2..a79ab3ce3 100755 --- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py +++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py @@ -105,7 +105,7 @@ def run(port, options, args, regular_output=sys.stderr, buildbot_output=sys.stdo unexpected_result_count = -1 manager = Manager(port, options, printer) - printer.print_config() + printer.print_config(port.results_directory()) unexpected_result_count = manager.run(args) _log.debug("Testing completed, Exit status: %d" % unexpected_result_count) diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing.py b/Tools/Scripts/webkitpy/layout_tests/views/printing.py index bf0b79ee0..22a55ed2f 100644 --- a/Tools/Scripts/webkitpy/layout_tests/views/printing.py +++ b/Tools/Scripts/webkitpy/layout_tests/views/printing.py @@ -83,10 +83,10 @@ class Printer(object): def __del__(self): self.cleanup() - def print_config(self): + def print_config(self, results_directory): self._print_default("Using port '%s'" % self._port.name()) self._print_default("Test configuration: %s" % self._port.test_configuration()) - self._print_default("Placing test results in %s" % self._options.results_directory) + self._print_default("Placing test results in %s" % results_directory) # FIXME: should these options be in printing_options? if self._options.new_baseline: diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py index fa2af46c3..bc30092f4 100644 --- a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py +++ b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py @@ -114,17 +114,23 @@ class Testprinter(unittest.TestCase): def test_print_config(self): printer, err, out = self.get_printer() # FIXME: it's lame that i have to set these options directly. - printer._options.results_directory = '/tmp' printer._options.pixel_tests = True printer._options.new_baseline = True printer._options.time_out_ms = 6000 printer._options.slow_time_out_ms = 12000 - printer.print_config() + printer.print_config('/tmp') + self.assertTrue("Using port 'test-mac-leopard'" in err.getvalue()) + self.assertTrue('Test configuration: <leopard, x86, release>' in err.getvalue()) + self.assertTrue('Placing test results in /tmp' in err.getvalue()) self.assertTrue('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue()) + self.assertTrue('Using Release build' in err.getvalue()) + self.assertTrue('Pixel tests enabled' in err.getvalue()) + self.assertTrue('Command line:' in err.getvalue()) + self.assertTrue('Regular timeout: ' in err.getvalue()) self.reset(err) printer._options.quiet = True - printer.print_config() + printer.print_config('/tmp') self.assertFalse('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue()) def test_print_one_line_summary(self): diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py index c573482c0..a0051c979 100644 --- a/Tools/Scripts/webkitpy/style/checkers/cpp.py +++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py @@ -2040,6 +2040,26 @@ def check_namespace_indentation(clean_lines, line_number, file_extension, file_s break; +def check_directive_indentation(clean_lines, line_number, file_state, error): + """Looks for indentation of preprocessor directives. + + Args: + clean_lines: A CleansedLines instance containing the file. + line_number: The number of the line to check. + file_state: A _FileState instance which maintains information about + the state of things in the file. + error: The function to call with any errors found. + """ + + line = clean_lines.elided[line_number] # Get rid of comments and strings. + + indented_preprocessor_directives = match(r'\s+#', line) + if not indented_preprocessor_directives: + return + + error(line_number, 'whitespace/indent', 4, 'preprocessor directives (e.g., #ifdef, #define, #import) should never be indented.') + + def check_using_std(clean_lines, line_number, file_state, error): """Looks for 'using std::foo;' statements which should be replaced with 'using namespace std;'. @@ -2567,7 +2587,10 @@ def check_style(clean_lines, line_number, file_extension, class_state, file_stat and not (match(r'.*\(.*\).*{.*.}', line) and class_state.classinfo_stack and line.count('{') == line.count('}')) - and not cleansed_line.startswith('#define ')): + and not cleansed_line.startswith('#define ') + # It's ok to use use WTF_MAKE_NONCOPYABLE and WTF_MAKE_FAST_ALLOCATED macros in 1 line + and not (cleansed_line.find("WTF_MAKE_NONCOPYABLE") != -1 + and cleansed_line.find("WTF_MAKE_FAST_ALLOCATED") != -1)): error(line_number, 'whitespace/newline', 4, 'More than one command on the same line') @@ -2578,6 +2601,7 @@ def check_style(clean_lines, line_number, file_extension, class_state, file_stat # Some more style checks check_namespace_indentation(clean_lines, line_number, file_extension, file_state, error) + check_directive_indentation(clean_lines, line_number, file_state, error) check_using_std(clean_lines, line_number, file_state, error) check_max_min_macros(clean_lines, line_number, file_state, error) check_ctype_functions(clean_lines, line_number, file_state, error) diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py index adc5c078b..a1b91f292 100644 --- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py +++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py @@ -2086,13 +2086,13 @@ class CppStyleTest(CppStyleTestBase): # Here is an example where the linter gets confused, even though # the code doesn't violate the style guide. self.assert_multi_line_lint( - '''class Foo - #ifdef DERIVE_FROM_GOO - : public Goo { - #else - : public Hoo { - #endif - };''', + 'class Foo\n' + '#ifdef DERIVE_FROM_GOO\n' + ' : public Goo {\n' + '#else\n' + ' : public Hoo {\n' + '#endif\n' + '};', 'Failed to find complete declaration of class Foo' ' [build/class] [5]') @@ -3821,7 +3821,7 @@ class WebKitStyleTest(CppStyleTestBase): 'More than one command on the same line [whitespace/newline] [4]') # Ignore preprocessor if's. self.assert_multi_line_lint( - ' #if (condition) || (condition2)\n', + '#if (condition) || (condition2)\n', '') # 2. An else statement should go on the same line as a preceding @@ -3861,6 +3861,9 @@ class WebKitStyleTest(CppStyleTestBase): # '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0 )\n', # 'Mismatching spaces inside () in if [whitespace/parens] [5]') self.assert_multi_line_lint( + 'WTF_MAKE_NONCOPYABLE(ClassName); WTF_MAKE_FAST_ALLOCATED;\n', + '') + self.assert_multi_line_lint( 'if (condition) {\n' ' doSomething();\n' ' doSomethingAgain();\n' @@ -4388,6 +4391,12 @@ class WebKitStyleTest(CppStyleTestBase): 'if (UNLIKELY(foo == NULL))', 'Use 0 instead of NULL. [readability/null] [5]') + def test_directive_indentation(self): + self.assert_lint( + " #if FOO", + "preprocessor directives (e.g., #ifdef, #define, #import) should never be indented." + " [whitespace/indent] [4]", + "foo.cpp") def test_using_std(self): self.assert_lint( diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp b/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp index 28e82ac07..36e30eaa4 100644 --- a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp +++ b/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp @@ -87,6 +87,7 @@ 'type': 'shared_library', 'dependencies': [ '<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code', + '<(source_dir)/WebKit/chromium/WebKitUnitTests.gyp:io_stream_forwarder_android', ], }], ], diff --git a/Tools/WebKitTestRunner/Configurations/Base.xcconfig b/Tools/WebKitTestRunner/Configurations/Base.xcconfig index 9f5405967..8bdeee2c5 100644 --- a/Tools/WebKitTestRunner/Configurations/Base.xcconfig +++ b/Tools/WebKitTestRunner/Configurations/Base.xcconfig @@ -37,7 +37,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO GCC_WARN_UNUSED_FUNCTION = YES GCC_WARN_UNUSED_VARIABLE = YES -WARNING_CFLAGS = -Wall -W -Wno-unused-parameter +WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef LINKER_DISPLAYS_MANGLED_NAMES = YES; VALID_ARCHS = i386 x86_64; GCC_PREFIX_HEADER = WebKitTestRunnerPrefix.h diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl index e0079b7f8..a0e3eeda8 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl +++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl @@ -48,6 +48,7 @@ module WTR { void dumpResourceResponseMIMETypes(); void dumpWillCacheResponse(); void dumpApplicationCacheDelegateCallbacks(); + void dumpDatabaseCallbacks(); // Special options. void keepWebHistory(); @@ -142,6 +143,7 @@ module WTR { void setShouldStayOnPageAfterHandlingBeforeUnload(in boolean flag); void setDefersLoading(in boolean flag); + void setStopProvisionalFrameLoads(); // Web intents testing. void sendWebIntentResponse(in DOMString reply); diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp index 99f95d65d..4e3be91a0 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp @@ -260,6 +260,7 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings) WKBundleClearAllDatabases(m_bundle); WKBundleClearApplicationCache(m_bundle); WKBundleResetOriginAccessWhitelists(m_bundle); + WKBundleSetDatabaseQuota(m_bundle, 5 * 1024 * 1024); } void InjectedBundle::done() diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp index cb05a6582..c19d11a5e 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp @@ -194,6 +194,20 @@ static WTF::String styleDecToStr(WKBundleCSSStyleDeclarationRef style) return stringBuilder.toString(); } +static WTF::String securityOriginToStr(WKSecurityOriginRef origin) +{ + WTF::StringBuilder stringBuilder; + stringBuilder.append('{'); + stringBuilder.append(toWTFString(adoptWK(WKSecurityOriginCopyProtocol(origin)))); + stringBuilder.appendLiteral(", "); + stringBuilder.append(toWTFString(adoptWK(WKSecurityOriginCopyHost(origin)))); + stringBuilder.appendLiteral(", "); + stringBuilder.appendNumber(WKSecurityOriginGetPort(origin)); + stringBuilder.append('}'); + + return stringBuilder.toString(); +} + static WTF::String frameToStr(WKBundleFrameRef frame) { WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame)); @@ -360,6 +374,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page) 0, /*menuBarIsVisible*/ 0, /*toolbarsAreVisible*/ didReachApplicationCacheOriginQuota, + didExceedDatabaseQuota, }; WKBundlePageSetUIClient(m_page, &uiClient); @@ -732,9 +747,14 @@ void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame) InjectedBundle::shared().stringBuilder()->appendLiteral(" - didStartProvisionalLoadForFrame\n"); } - if (InjectedBundle::shared().topLoadingFrame()) - return; - InjectedBundle::shared().setTopLoadingFrame(frame); + if (!InjectedBundle::shared().topLoadingFrame()) + InjectedBundle::shared().setTopLoadingFrame(frame); + + if (InjectedBundle::shared().testRunner()->shouldStopProvisionalFrameLoads()) { + dumpFrameDescriptionSuitableForTestResult(frame); + InjectedBundle::shared().stringBuilder()->appendLiteral(" - stopping load in didStartProvisionalLoadForFrame callback\n"); + WKBundleFrameStopLoading(frame); + } } void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame) @@ -754,6 +774,11 @@ void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRe if (!InjectedBundle::shared().isTestRunning()) return; + if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) { + dumpFrameDescriptionSuitableForTestResult(frame); + InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFailProvisionalLoadWithError\n"); + } + if (frame != InjectedBundle::shared().topLoadingFrame()) return; InjectedBundle::shared().setTopLoadingFrame(0); @@ -1330,6 +1355,11 @@ void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKBundlePageRef pag static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReachApplicationCacheOriginQuota(origin, totalBytesNeeded); } +uint64_t InjectedBundlePage::didExceedDatabaseQuota(WKBundlePageRef page, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes, const void* clientInfo) +{ + return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didExceedDatabaseQuota(origin, databaseName, databaseDisplayName, currentQuotaBytes, currentOriginUsageBytes, currentDatabaseUsageBytes, expectedUsageBytes); +} + static WTF::String lastFileURLPathComponent(const WTF::String& path) { size_t pos = path.find("file://"); @@ -1416,24 +1446,19 @@ void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRe void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKSecurityOriginRef origin, int64_t totalBytesNeeded) { - if (!InjectedBundle::shared().testRunner()->shouldDumpApplicationCacheDelegateCallbacks()) - return; - - // For example, numbers from 30000 - 39999 will output as 30000. - // Rounding up or down does not really matter for these tests. It's - // sufficient to just get a range of 10000 to determine if we were - // above or below a threshold. - int64_t truncatedSpaceNeeded = (totalBytesNeeded / 10000) * 10000; - - InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{"); - InjectedBundle::shared().stringBuilder()->append(toWTFString(adoptWK(WKSecurityOriginCopyProtocol(origin)))); - InjectedBundle::shared().stringBuilder()->appendLiteral(", "); - InjectedBundle::shared().stringBuilder()->append(toWTFString(adoptWK(WKSecurityOriginCopyHost(origin)))); - InjectedBundle::shared().stringBuilder()->appendLiteral(", "); - InjectedBundle::shared().stringBuilder()->appendNumber(WKSecurityOriginGetPort(origin)); - InjectedBundle::shared().stringBuilder()->appendLiteral("} totalSpaceNeeded:~"); - InjectedBundle::shared().stringBuilder()->appendNumber(truncatedSpaceNeeded); - InjectedBundle::shared().stringBuilder()->append('\n'); + if (InjectedBundle::shared().testRunner()->shouldDumpApplicationCacheDelegateCallbacks()) { + // For example, numbers from 30000 - 39999 will output as 30000. + // Rounding up or down does not really matter for these tests. It's + // sufficient to just get a range of 10000 to determine if we were + // above or below a threshold. + int64_t truncatedSpaceNeeded = (totalBytesNeeded / 10000) * 10000; + + InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:"); + InjectedBundle::shared().stringBuilder()->append(securityOriginToStr(origin)); + InjectedBundle::shared().stringBuilder()->appendLiteral(" totalSpaceNeeded:~"); + InjectedBundle::shared().stringBuilder()->appendNumber(truncatedSpaceNeeded); + InjectedBundle::shared().stringBuilder()->append('\n'); + } if (InjectedBundle::shared().testRunner()->shouldDisallowIncreaseForApplicationCacheQuota()) return; @@ -1442,6 +1467,20 @@ void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKSecurityOriginRef WKBundleResetApplicationCacheOriginQuota(InjectedBundle::shared().bundle(), adoptWK(WKSecurityOriginCopyToString(origin)).get()); } +uint64_t InjectedBundlePage::didExceedDatabaseQuota(WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes) +{ + if (InjectedBundle::shared().testRunner()->shouldDumpDatabaseCallbacks()) { + InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:"); + InjectedBundle::shared().stringBuilder()->append(securityOriginToStr(origin)); + InjectedBundle::shared().stringBuilder()->appendLiteral(" database:"); + InjectedBundle::shared().stringBuilder()->append(toWTFString(databaseName)); + InjectedBundle::shared().stringBuilder()->append('\n'); + } + + static const uint64_t defaultQuota = 5 * 1024 * 1024; + return defaultQuota; +} + // Editor Client Callbacks bool InjectedBundlePage::shouldBeginEditing(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo) diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h index 370f427f9..894fb305b 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h +++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h @@ -125,12 +125,14 @@ private: static void willRunJavaScriptConfirm(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo); static void willRunJavaScriptPrompt(WKBundlePageRef, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo); static void didReachApplicationCacheOriginQuota(WKBundlePageRef, WKSecurityOriginRef, int64_t totalBytesNeeded, const void* clientInfo); + static uint64_t didExceedDatabaseQuota(WKBundlePageRef, WKSecurityOriginRef, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes, const void* clientInfo); void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber); void willSetStatusbarText(WKStringRef statusbarText); void willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef); void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef); void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef); void didReachApplicationCacheOriginQuota(WKSecurityOriginRef, int64_t totalBytesNeeded); + uint64_t didExceedDatabaseQuota(WKSecurityOriginRef, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes); #if ENABLE(FULLSCREEN_API) // Full Screen client diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp index fa2db1b47..892bc215d 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp @@ -81,11 +81,13 @@ TestRunner::TestRunner() , m_dumpResourceResponseMIMETypes(false) , m_dumpWillCacheResponse(false) , m_dumpApplicationCacheDelegateCallbacks(false) + , m_dumpDatabaseCallbacks(false) , m_disallowIncreaseForApplicationCacheQuota(false) , m_waitToDump(false) , m_testRepaint(false) , m_testRepaintSweepHorizontally(false) , m_willSendRequestReturnsNull(false) + , m_shouldStopProvisionalFrameLoads(false) , m_policyDelegateEnabled(false) , m_policyDelegatePermissive(false) , m_globalFlag(false) diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h index 674f19e1b..62ac05f3b 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h +++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h @@ -83,6 +83,7 @@ public: void dumpResourceResponseMIMETypes() { m_dumpResourceResponseMIMETypes = true; } void dumpWillCacheResponse() { m_dumpWillCacheResponse = true; } void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; } + void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; } void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; } void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; } @@ -177,6 +178,7 @@ public: bool shouldDumpResourceResponseMIMETypes() const { return m_dumpResourceResponseMIMETypes; } bool shouldDumpWillCacheResponse() const { return m_dumpWillCacheResponse; } bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; } + bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; } bool isPolicyDelegateEnabled() const { return m_policyDelegateEnabled; } bool isPolicyDelegatePermissive() const { return m_policyDelegatePermissive; } @@ -206,6 +208,9 @@ public: void setShouldStayOnPageAfterHandlingBeforeUnload(bool); void setDefersLoading(bool); + + void setStopProvisionalFrameLoads() { m_shouldStopProvisionalFrameLoads = true; } + bool shouldStopProvisionalFrameLoads() const { return m_shouldStopProvisionalFrameLoads; } bool globalFlag() const { return m_globalFlag; } void setGlobalFlag(bool value) { m_globalFlag = value; } @@ -276,12 +281,14 @@ private: bool m_dumpResourceResponseMIMETypes; bool m_dumpWillCacheResponse; bool m_dumpApplicationCacheDelegateCallbacks; + bool m_dumpDatabaseCallbacks; bool m_disallowIncreaseForApplicationCacheQuota; bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called. bool m_testRepaint; bool m_testRepaintSweepHorizontally; bool m_willSendRequestReturnsNull; + bool m_shouldStopProvisionalFrameLoads; bool m_policyDelegateEnabled; bool m_policyDelegatePermissive; diff --git a/Tools/WebKitTestRunner/PlatformWebView.h b/Tools/WebKitTestRunner/PlatformWebView.h index d3ad21a9e..43b79c33e 100644 --- a/Tools/WebKitTestRunner/PlatformWebView.h +++ b/Tools/WebKitTestRunner/PlatformWebView.h @@ -37,7 +37,7 @@ class QQuickWebView; typedef QQuickWebView* PlatformWKView; typedef QQuickView* PlatformWindow; #elif defined(__APPLE__) && __APPLE__ -#if __OBJC__ +#ifdef __OBJC__ @class WKView; @class WebKitTestRunnerWindow; #else diff --git a/Tools/WebKitTestRunner/Target.pri b/Tools/WebKitTestRunner/Target.pri index 7165c1b66..93b68f33a 100644 --- a/Tools/WebKitTestRunner/Target.pri +++ b/Tools/WebKitTestRunner/Target.pri @@ -38,6 +38,7 @@ DEFINES += USE_SYSTEM_MALLOC=1 have?(FONTCONFIG): PKGCONFIG += fontconfig INCLUDEPATH += \ + $$PWD \ $${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt PREFIX_HEADER = WebKitTestRunnerPrefix.h diff --git a/Tools/qmake/config.tests/gnuld/gnuld.pro b/Tools/qmake/config.tests/gnuld/gnuld.pro new file mode 100644 index 000000000..c239f13e1 --- /dev/null +++ b/Tools/qmake/config.tests/gnuld/gnuld.pro @@ -0,0 +1,4 @@ +TEMPLATE = app +TARGET = gnuld +SOURCES = main.cpp +QMAKE_LFLAGS += -Wl,--no-keep-memory diff --git a/Tools/qmake/config.tests/gnuld/main.cpp b/Tools/qmake/config.tests/gnuld/main.cpp new file mode 100644 index 000000000..31a133726 --- /dev/null +++ b/Tools/qmake/config.tests/gnuld/main.cpp @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf index cbb252328..cdb73a7c0 100644 --- a/Tools/qmake/mkspecs/features/default_post.prf +++ b/Tools/qmake/mkspecs/features/default_post.prf @@ -10,6 +10,9 @@ # or include() and a CONFIG += feature. CONFIG += config_step +# Enable dynamic instead of static libraries for development +!production_build:!buildbot:!win*: CONFIG += force_static_libs_as_shared + root_project_file: finalizeConfigure() # Sanitize build config for single-configuration builds @@ -65,12 +68,6 @@ CONFIG -= warn_on -Winit-self \ $$QMAKE_CXXFLAGS -v8: DEFINES += WTF_USE_V8=1 -else { - contains(JAVASCRIPTCORE_JIT, yes): DEFINES+=ENABLE_JIT=1 - contains(JAVASCRIPTCORE_JIT, no): DEFINES+=ENABLE_JIT=0 -} - # Template configurations contains(TEMPLATE, derived) { # A (mostly) no-op template @@ -187,10 +184,12 @@ contains(QT, webkit) { # In addition to the main shared QtWebKit library we also # need to link to any intermediate shared libraries. force_static_libs_as_shared { - WEBKIT += wtf webcore - !v8: WEBKIT += javascriptcore + WEBKIT += wtf javascriptcore webcore + build?(webkit1): WEBKIT += webkit1 build?(webkit2): WEBKIT += webkit2 } + + # FIXME: Replace this with putting the intermediate libraries in the prl file } contains(TARGET, $$resolveFinalLibraryName($${QT.webkit.name})): CONFIG += creating_module diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf index 2df33e1e4..1d2f88ec3 100644 --- a/Tools/qmake/mkspecs/features/features.prf +++ b/Tools/qmake/mkspecs/features/features.prf @@ -34,6 +34,8 @@ defineTest(detectFeatures) { # haveQtModule(quick): WEBKIT_CONFIG += have_qtquick + else: CONFIGURE_WARNINGS += "QtQuick module not found, QML APIs will not be built" + haveQtModule(printsupport): WEBKIT_CONFIG += have_qtprintsupport haveQtModule(widgets): WEBKIT_CONFIG += have_qstyle haveQtModule(testlib): WEBKIT_CONFIG += have_qttestlib diff --git a/Tools/qmake/mkspecs/features/features.pri b/Tools/qmake/mkspecs/features/features.pri index 9526bf6c1..a36fb2c8e 100644 --- a/Tools/qmake/mkspecs/features/features.pri +++ b/Tools/qmake/mkspecs/features/features.pri @@ -67,6 +67,7 @@ FEATURE_DEFAULTS = \ ENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 \ ENABLE_LEGACY_NOTIFICATIONS=1 \ ENABLE_LEGACY_VIEWPORT_ADAPTION=1 \ + ENABLE_LEGACY_VENDOR_PREFIXES=1 \ ENABLE_LEGACY_WEBKIT_BLOB_BUILDER=1 \ ENABLE_LINK_PREFETCH=0 \ ENABLE_LINK_PRERENDER=0 \ diff --git a/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf index e8a9978be..c337cda6f 100644 --- a/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf +++ b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf @@ -7,13 +7,16 @@ contains(TEMPLATE, lib) { contains(CONFIG, staticlib) { - CONFIG -= hide_symbols - CONFIG -= staticlib - CONFIG += rpath - QMAKE_CXXFLAGS -= $$QMAKE_CXXFLAGS_HIDESYMS - QMAKE_CFLAGS -= $$QMAKE_CFLAGS_HIDESYMS - QMAKE_LFLAGS -= $$QMAKE_LFLAGS_HIDESYMS - QMAKE_OBJECTIVE_CFLAGS -= $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS - DESTDIR = $${ROOT_BUILD_DIR}/lib + CONFIG -= hide_symbols + CONFIG -= staticlib + CONFIG += rpath + QMAKE_CXXFLAGS -= $$QMAKE_CXXFLAGS_HIDESYMS + QMAKE_CFLAGS -= $$QMAKE_CFLAGS_HIDESYMS + QMAKE_LFLAGS -= $$QMAKE_LFLAGS_HIDESYMS + QMAKE_OBJECTIVE_CFLAGS -= $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS + DESTDIR = $${ROOT_BUILD_DIR}/lib + + # Ensure the install-name of the libraries are correct on Mac OS + macx: QMAKE_LFLAGS_SONAME = $$QMAKE_LFLAGS_SONAME$${DESTDIR}/ } } diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf index 588cd42c8..c54a262be 100644 --- a/Tools/qmake/mkspecs/features/functions.prf +++ b/Tools/qmake/mkspecs/features/functions.prf @@ -369,7 +369,7 @@ defineReplace(javascriptFeatureDefines) { defineReplace(setEnvironmentVariable) { variable = $$1 value = $$2 - win32 { + win_cmd_shell { return((set \"$$variable=$$value\")) } return(export \"$$variable=$$value\") diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf index 82e254eee..585578420 100644 --- a/Tools/qmake/mkspecs/features/unix/default_post.prf +++ b/Tools/qmake/mkspecs/features/unix/default_post.prf @@ -33,15 +33,8 @@ linux-g++*:isEqual(QT_ARCH,i386) { contains(TEMPLATE, app): CONFIG += rpath isEqual(QT_ARCH,i386):CONFIG(debug, debug|release) { - # Make ld don't cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase. - # We have to use ld, because --no-keep-memory isn't supported by ld.gold. - QMAKE_LFLAGS += -Wl,--no-keep-memory -} else { - # Use gold if available - !scratchbox:!mac:exists(/usr/bin/ld.gold) { - # Upstream gcc 4.7 does not support the -fuse-ld=gold option ( see: http://sourceware.org/ml/binutils/2011-01/msg00178.html ) - isEqual(QT_GCC_MAJOR_VERSION, 4):lessThan(QT_GCC_MINOR_VERSION, 7):QMAKE_LFLAGS += -fuse-ld=gold - } + # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase. + config_gnuld: QMAKE_LFLAGS += -Wl,--no-keep-memory } load(default_post) diff --git a/Tools/qmake/qt_webkit.pri b/Tools/qmake/qt_webkit.pri deleted file mode 100644 index e221bd26d..000000000 --- a/Tools/qmake/qt_webkit.pri +++ /dev/null @@ -1,28 +0,0 @@ -# These variables define the library version, which is based on the original -# Qt library version. It is not related to the release-version of QtWebKit. -QT.webkit.MAJOR_VERSION = 5 -QT.webkit.MINOR_VERSION = 0 -QT.webkit.PATCH_VERSION = 0 -QT.webkit.VERSION = 5.0.0 - -QT.webkit.name = QtWebKit -QT.webkit.bins = $$QT_MODULE_BIN_BASE -QT.webkit.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtWebKit -QT.webkit.imports = $$QT_MODULE_IMPORT_BASE -QT.webkit.private_includes = $$QT_MODULE_INCLUDE_BASE/$$QT.webkit.name/$$QT.webkit.VERSION $$QT_MODULE_INCLUDE_BASE/$$QT.webkit.name/$$QT.webkit.VERSION/$$QT.webkit.name -QT.webkit.sources = $$QT_MODULE_BASE -QT.webkit.libs = $$QT_MODULE_LIB_BASE -QT.webkit.depends = core gui opengl network - -!contains(QT_CONFIG, modular)|contains(QT_ELIGIBLE_MODULES, webkit) { - QT_CONFIG += webkit -} else { - warning("Attempted to include $$QT.webkit.name in the build, but it was not enabled in configure.") -} - -# This is the old syntax for the WebKit version defines. -# We keep them around in case someone was using them. -QT_WEBKIT_VERSION = $$QT.webkit.VERSION -QT_WEBKIT_MAJOR_VERSION = $$QT.webkit.MAJOR_VERSION -QT_WEBKIT_MINOR_VERSION = $$QT.webkit.MINOR_VERSION -QT_WEBKIT_PATCH_VERSION = $$QT.webkit.PATCH_VERSION |
