$ pwd jfx8u/rt/modules/web/src/main/native $ diff -rq Source/ ~/work/trunk.merge/Source/ | grep -v 'Only in /' | awk '{print $3 $4}' | sed -e 's/:/\//' | sed -e 's/\/\//\//' | while read line; do if [ "$(ls -A $line)" ]; then echo $line; fi done // Prints extra files/dirs in webview ws, comparing to trunk. - - - - - - - - - - $ pwd jfx8u/rt/modules/web/src/main/native $ diff -rq Source/ ~/work/trunk.merge/Source/ | grep -v 'Only in' | awk '{print $2}' // Prints files which differ. - - - - - - - - - - I’m trying the following: 1. Updating trunk to the revision last merged: cd trunk/Source svn update -r 150795 2. Creating a new hg workspace with the sources from trunk: cd ~/work mkdir trunk.r150795.hg cp -R trunk/Source trunk.r150795.hg hg init trunk.r150795.hg cd trunk.r150795.hg hg add *; hg commit 3. Creating a new hg ws with the sources from webview: cd ~/work mkdir webview cp -R jfx/rt/modules/web/src/main/native/Source webview hg init webview cd webview hg add *; hg commit 4. Merging the two workspaces: cd trunk.r150795.hg hg pull ~/work/webview -f // force because the workspaces are unrelated hg heads // list the heads hg merge // using kdiff3, specified in ~/.hgrc 5. Creating the webrev: cd trunk.r150795.hg hg st webrev -p . 6. Problems. The files which were deleted in webview (during the original merge to r150795) are not deleted in trunk.r150795, because the repositories are unrelated. Remove evidently, this way: cd trunk.r150795.hg rm $(diff -rq Source/ ~/work/webview/Source/ | grep 'Only in’ | grep 'Only in Source' | awk '{print $3 $4}' | sed -e 's/:/\//' | sed -e 's/\/\//\//' | head -n 2000) // repeat until all the found files are deleted - - - - - - - - - - Made diff b/w webview & trunk.r150795. Then applied the patch to trunk.r158049 (4 months old). patch -N -p 1 < path_to_the_file.patch -N tells patch to auto skip when previously applied patch is detected. Some core trunk files are claimed to be already patched. This means those files were updated in webview according to some more recent (than r150795) trunk revision. Investigating every such file. Files copied from trunk r164277: - Source/JavaScriptCore/profiler/LegacyProfiler.cpp - Source/JavaScriptCore/profiler/LegacyProfiler.h - Source/JavaScriptCore/profiler/ProfileGenerator.cpp - Source/JavaScriptCore/profiler/ProfileNode.cpp - Source/JavaScriptCore/profiler/ProfileNode.h - Source/JavaScriptCore/profiler/ProfilerBytecodeSequence.cpp - Source/JavaScriptCore/profiler/ProfilerCompilation.cpp - Source/JavaScriptCore/profiler/ProfilerCompilation.h - Source/JavaScriptCore/profiler/ProfilerDatabase.cpp - Source/JavaScriptCore/runtime/Arguments.cpp - Source/JavaScriptCore/runtime/Arguments.h - Source/JavaScriptCore/runtime/BooleanPrototype.cpp - Source/JavaScriptCore/runtime/BooleanPrototype.h In Tools, the only relevant diffs made during the uta merge are in Tools/Scripts and new java related files. Applying the patch to trunk r164362: Tools/Scripts/old-run-webkit-tests seems to die. Instead, Tools/Scripts/new-run-webkit-* files are added. Not merging it so far. Tools/Scripts/webkitdirs.pm Look carefully at Hunk#3 and Hunk#6. - - - - - - - - - - Extra dirs in trunk.r164362: $ pwd jfx/rt/modules/web/src/main/native $ find ~/work/trunk.r164362.hg/Source -type d | sed -e "s/\/Users\/tav\/work\/trunk.r164362.hg\///" | while read file; do if [ ! -d $file ]; then echo $file; fi done > extra_dirs_in_trunk.r164362.txt Extra dirs in trunk.r150795: $ pwd jfx/rt/modules/web/src/main/native $ find ~/work/trunk.r150795.hg/Source -type d | sed -e "s/\/Users\/tav\/work\/trunk.r150795.hg\///" | while read file; do if [ ! -d $file ]; then echo $file; fi done > extra_dirs_in_trunk.r150795.txt Then, merge the output: $ kdiff3 extra_dirs_in_trunk.r150795 extra_dirs_in_trunk.r164362 -o extra_dirs_in_trunk_merge.txt Every conflict is investigated manually. A directory may be added in a new revision, or moved to another location, or it may contain files moved from other (previously existed) directory (look for file names to check that). Results of the merge: [ + ] dirs which should be included to the new webview, otherwise [ - ] + Source/JavaScriptCore/bindings // contains some files from Source/WebCore/bindings/jsbin + Source/JavaScriptCore/builtins // BuiltinNames.cpp stuff is used in Source/JavaScriptCode/runtime/* files - Source/JavaScriptCore/disassembler/ARM64 // Seems to be not used in java port - Source/JavaScriptCore/ftl // experimantal JIT, see trac.webkit.org/wiki/FTLJIT + Source/JavaScriptCore/inspector // contains some files from Source/WebCore/inspector + Source/JavaScriptCore/inspector/agents // contains some files from Source/WebCore/inspector + Source/JavaScriptCore/inspector/protocol // contains json files, keeping probably… [???] + Source/JavaScriptCore/inspector/remote // remote debugging, keeping porbably… [???] + Source/JavaScriptCore/inspector/scripts // contains scripts from Source/WebCore/inspector - Source/JavaScriptCore/llvm // relates to FTL JIT - Source/JavaScriptCore/replay // WEB_REPLAY, not supporting yet, used for debugging purposes - Source/JavaScriptCore/qt // it's empty - Source/JavaScriptCore/tests // not including JS tests - Source/ThirdParty // except for Makefile.shared - Source/WebCore/bindings/js/ios // not supporting ios - Source/WebCore/crypto // WebCrypto, not supportingyet, see http://www.w3.org/TR/WebCryptoAPI + Source/WebCore/cssjit // CSS_SELECTOR_JIT macro, looks harmless, see in WebCore/Changelog - Source/WebCore/dom/ios // not supporting ios - Source/WebCore/editing/atk // #if HAVE(ACCESSIBILITY), not supporting accessibility... [???] - Source/WebCore/editing/efl // not supporting efl, consider removing other efl dirs [!!!] - Source/WebCore/editing/ios // not supporting ios + Source/WebCore/ForwardingHeaders/bindings // contains headers for Source/JavaScriptCore/bindings + Source/WebCore/ForwardingHeaders/bytecode // headers, used everywhere + Source/WebCore/ForwardingHeaders/inspector // used in WebCore/page + Source/WebCore/ForwardingHeaders/inspector/agents // inclusing as well - Source/WebCore/ForwardingHeaders/replay // not supporting WEB_REPLAY yet + Source/WebCore/html/forms // contains headers from Source/WebCore/platform - Source/WebCore/inspector/protocol // json files, what are they used for [???] - Source/WebCore/loader/ios // ios - Source/WebCore/loader/soup // not supporting soup (a lib competing to curl) - Source/WebCore/Modules/airplay // ios streaming - Source/WebCore/Modules/encryptedmedia // W3C, key exchange b/w web apps using audio/video tags + Source/WebCore/Modules/indexeddb/leveldb // subfolder of existing folder - Source/WebCore/Modules/indieui // W3C, indie ui events - Source/WebCore/Modules/mediacontrols // [???] - Source/WebCore/Modules/plugins // contains some quicktime stuff - Source/WebCore/page/ios // not supporting - Source/WebCore/page/scrolling/ios // not supporting - Source/WebCore/pdf // only contains ios subfolder - Source/WebCore/pdf/ios // ios - Source/WebCore/platform/glib // battery status support - Source/WebCore/platform/graphics/ios // ios - Source/WebCore/platform/graphics/win/GL // graphcis/win is not used - Source/WebCore/platform/ios/wak // ios - Source/WebCore/platform/mediastream/mac // platform/mediastream is not used - Source/WebCore/platform/mock/mediasource // not supporting mediasource - Source/WebCore/platform/network/ios // ios - Source/WebCore/platform/soup // not supporting soup (but curl) - Source/WebCore/platform/text/icu // using java unicode - Source/WebCore/platform/text/ios // ios - Source/WebCore/plugins/x11 + Source/WebCore/rendering/line // used in WebCode/rendering - Source/WebCore/rendering/shapes // not used outside of shapes… - Source/WebCore/replay // not supporting WEB_REPLAY yet - Source/WebCore/Scripts + Source/WebCore/style // used in WebCore/rendering/svg - Source/WebInspectorUI // what is it... [???] - Source/WebKit/blackberry // blackberry - Source/WebKit/ios // ios - Source/WebKit/qt/tests/qwebsecurityorigin - Source/WebKit/win/Interfaces/Accessible2 - Source/WebKit2 // not used + Source/WTF/wtf/cf // contains files from WebCore/platform/cf - Source/WTF/wtf/ios // ios + Source/WTF/wtf/text/cf // contains files from WebCore/platform/text/cf - Source/WTF/wtf/text/mac - - - - - - - - - - The merged list of dirs: ~/work/merge_docs/extra_dirs_in_trunk.r150795_r164362_merged.txt In the list there are dirs which don’t exist in trunk.r164362. Let’s throw them away: $ pwd jfx/rt/modules/web/src/main/native // webview where sources are replaced with trunk.r164362.patched $ cat ~/work/merge_docs/extra_dirs_in_trunk.r150795_r164362_merged.txt | while read file; do if [ -d $file ]; then echo $file; fi; done | while read line; do echo $line >> ~/work/merge_docs/extra_dirs_in_trunk.r150795_r164362_merged_and_dirs_exist.txt; done $ cat extra_dirs_in_trunk.r150795_r164362_merged_and_dirs_exist.txt | wc -l 164 Then manually look through the list and remove all subfolders for which their prefixes are in the list. $ cat extra_dirs_in_trunk.r150795_r164362_merged_and_dirs_exist.txt | wc -l 114 - - - - - - - - - - Some statistics: $ hg st -u | wc -l // new files 7622 $ hg st -m | wc -l // modified 5218 $ hg st -d | wc -l // deleted 1187 $ hg st | wc -l // total 14027 $ find . -type d | wc -l // dirs 1037 $ find . -type f | wc -l // files 17001 Now remove extra dirs from : $ cat | while read file; do rm -rf $file; done Now, statistics: $ hg st -u | wc -l 2405 $ hg st -m | wc -l // where are 6 modified files?... 5212 $ hg st -d | wc -l 2362 $ hg st | wc -l 9979 So, ~7000 were deleted. - - - - - - - - - - Now we want to remove cpp files which no longer exist in the ws from *.pri config. 1. Extract the cpp files: $ pwd /Sources/WebCore $ cat TargetJava.pri | grep '\.cpp' | sed -e 's/^ *//' -e 's/^# *//' -e 's/\\//' > 2. Look for absent files: $ cat | while read file; do if [ ! -f $file ]; then echo $file >> ; fi done $ cat | wc -l 186 3. Write a help script which removes a line from file which contains provided substring: $ cat ~/work/bin/rmline file=$1 string=$2 tmp=~/tmp/rmline.tmp IFS='' # keep spaces in vars cat $file | while read -r line; do if [[ ! $line =~ .*$string.* ]]; then echo $line >> $tmp; fi done mv $tmp $file 4. Use the rmline script to remove cpp files from a *.pri config: $ cat | while read -r line; do rmline TargetJava.pri $line; done $ hg diff TargetJava.pri Inspect the diff and correct the file where needed (remove trailing backslashes from the end of some lines). Now repeat the steps for .h files, and then again for JavaScriptCore/TargetJava.pri and WTF/WTFJava.pri - - - - - - - - - - We want to remove paths which don’t exist in the ws from *.pri configs: 1. Extract them: $ pwd /Sources/WebCore $ cat TargetJava.pri | grep ' \\' | grep -v \.cpp | grep -v \.h | grep -v SOURCES | grep -v HEADERS | grep -v INCLUDEPATH | sed -e 's/^ *$$SOURCE_DIR\///' -e 's/^ *$$PWD\///' -e 's/ \\//' > Then manually correct the file (prepend WebCore/ where necessary). 2. Look for absent paths: $ cat ~/work/merge_docs/WC_TargetJava.pri_paths.txt | while read file; do if [ ! -d $file ]; then echo $file | sed -e 's/WebCore\///' >> ~/work/merge_docs/WC_TargetJava.pri_paths_absent.txt; fi done 3. Remove absent paths (see above how). - - - - - - - - - - 1. Refine the list of .cpp and .h files in WC/TargetJava.pri, JSC/TargetJava.pri, WTF/WTFJava.pri files according to the list of added dirs. This is done manually. 2. Refine the list of headers in the pch files. $ pwd /Sources/JavaScriptCore $ cat javascriptcorejava_pch.h | grep '\.h' | grep -v // | sed -e 's/#include //' > (Manually remove generic .h files from , like jni.h etc) Then make the list of absent files: $ cat ~/work/merge_docs/JSC_jscjava_pch_headers.txt | while read file; do if [ ! -f $file ]; then echo $file; fi done > Analyzing the list and exclude absent files. 3. Do the same for WebCore/webcorejava_pch.h Somehow I’ve lost lots of changes in Sources, related to java port modifications. Made a patch. It contains of 97 files. Copied to: Applying it to trunk.r164362_over_webview ws: - Source/JavaScriptCore/jit/ThunkGenerators.cpp | fix for RT-26306 is no longer applicable - Source/WTF/wtf/Platform.h | WTF_USE_ACCELERATED_COMPOSITING is no longer defined - Source/WebCore/bindings/js/JSNodeCustom.cpp | the patch is no longer applicable - Source/WebCore/bridge/jsc/BridgeJSC.h | needs attention [!!!] - Source/WebCore/dom/Clipboard.h | WTF_USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS no longer - Source/WebCore/loader/FrameLoader.h | icon() now returns a reference, not a pointer, m_icon is of unique_ptr<> - Source/WebCore/platform/Widget.h | m_data is removed - - - - - - - - - - 1. Install gcc 4.7 via MacPorts (because webkit switched to c++11, changeset #162126) (do also: http://samkhan13.wordpress.com/2012/06/15/make-macports-work-behind-proxy) $ port select --list gcc $ sudo port select --set gcc mp-gcc47 Compiling: - WebKitJava.pri | added __GXX_EXPERIMENTAL_CXX0X__ to DEFINES - JSC/TargetJava.pri | added QMAKE_CXXFLAGS += -std=c++11 - Addded builtins generator to JSC/DerivedSourcesJava.pri - Removed WebCore/Modules/filesystem | Bug 122137 - Remove support for DOMFileSystem - WebCore/inspector/Inspector.json was splitted | https://bugs.webkit.org/show_bug.cgi?id=124098 - No more getterExceptions/setterExceptions in IDLParser.pm | http://trac.webkit.org/changeset/151321 - WebCore/css/view-source.css removed | http://trac.webkit.org/changeset/164254 - KURL is renamed to URL | http://trac.webkit.org/changeset/156550 - WTF/wtf/HashMap classes changed their implementation, had to correct some methods. - WebCore/platform/graphics/java/FontCustomPlatformData::createFontCustomPlatformData changed return type. - WebCore/platform/network/ResourceHandle.h, not using “override” keyword - WebCore/page/java/ChromeClientJava.h, some functions have gone from the supertype - WebCore/page/java/DragControllerJava.cpp, pointer changed to ref in some methods - WebCore/platform/URL.h/cpp, applied patch from KURL.h/cpp - WebCore/platform/graphics/java/FontJava::drawComplexText | todo: refine the return value - WebCore/platform/java/ClipboardJava.cpp | removed Clipboard::create method impl - WebCore/platform/java/ClipboardJava.cpp | todo: Clipboard ctor changed - WebCore/platform/java/ClipboardJava.cpp | removed createDragImage, it’s now impl-ed by Clipboard - WebCore/platform/java/CursorJava.cpp | removed ctro Cursor(PlatfromCursor) - WebCore/platform/java/EditorClientJava.cpp | todo: EditorClient.h changed - WebCore/platform/java/FileChooserJava.cpp | FileChooser::basenameForWidth no longer exists - WebCore/platform/java/FrameLoaderClient.cpp | lots of changes - WebCore/platform/java/PasteboardJava.cpp | writeURL() -> write() , see http://trac.webkit.org/changeset/155709 - WebCore/platform/java/PasteboardJava.cpp | plainText method should be removed - WebCore/platform/java/TemporaryLinkStubs.cpp | todo: newGeneralClipboard is removed - WebCore/platform/java/WebPage.h | todo: OwnPtr should be replaced with std::unique_ptr - WebCore/WTF/wtf/Platform.h | todo: uncomment HAVE_DISPATCH_H when using clang. The prob is that g++ 4.7 can’t compile wtf/ParallelJobsLibdispatch.h which is an Objective-C file w/ block (^) construction, not supported by g++ 4.7. - E-mail about JIT & LLINT: http://marc.info/?l=webkit-dev&m=136319921619815 - excluded platform/text/TextCodecICU.cpp | USE_WTF_ICU_UNICODE no longer used by webkit - JSC/llint/LowLevelInterpreter.cpp | todo compilable w/ NDEBUG only - Quick qmake turn: $ QMAKESPEC=macx-g++ /Users/tav/work/dev/Qt/5.1.1/clang_64/bin/qmake /Users/tav/work/jfx8u.merge/rt/modules/web/src/main/native/Source/JavaScriptCore/JavaScriptCoreJava.pro CONFIG+=x86_64 CONFIG-=debug CONFIG+=release DEFINES+=IMAGEIO=1 -o Makefile.JavaScriptCoreJava $ make -f Makefile.JavaScriptCoreJava - WebKit removed ICU_UNICODE and hardcoded icu | https://bugs.webkit.org/show_bug.cgi?id=127623 - WebCore/platform/java/ImageBufferJava::fastCopyImageMode | todo: revise the impl - Changed idl files: WebCore/html/HTMLIFrameElement.idl, WebCore/html/HTMLElement.idl, WebCore/dom/ProcessingInstructionImpl.idl, WebCore/dom/Document.idl - JSC/disassembler/udis86/*.c files | todo: should be compiled w/ c compiler, not c++ - DragController::declareAndWriteDragImage | implemented (following to gtk’s impl) - WebCore/platform/java/CursorJava.cpp | todo revise impl of Cursor::ensurePlatformCursor() - WebCore/platform/java/TextBreakIteratorJava.cpp | todo see impl in TextBreakIterator via icu - removed a number of ASSERT due to their operands became ref, not a pointer - WebCore/platform/graphics/java/GraphicsContextJava.cpp | see unimplemented new methods (search todo) - Why JIT should be built w/ LLINT - https://bugs.webkit.org/show_bug.cgi?id=126502 - todo: implement ProgressTracker client. - - - - - - - - - - - - - - - - - - - - Building on Windows 7: - Requires: VS 2013 - changed jfx configs: rt/build.gradle, rt/buildSrc/win.gradle (contains todo) - changed qt configs: JSC/LLIntOffsetExtractor.pro, JSC/DerivedSourcesJava.pri, JSC/TargetJava.pri, WebKitJava.pri, WebCore/TargetJava.pri, WebCore/DerivedSourcesJava.pri, WTF/WTFJava.pri - changed scripts: WebCore/bindings/scripts/CodeGeneratorJava.pm | fixed a bug with “import .DOMException;” - changed sources: JavaScriptCore/runtime/Watchdog.h | fixed wrong #if PLATFORM(JAVA) scope JavaScriptCore/tools/CodeProfiling.cpp | added #if PLATFORM(JAVA) WebCore/binding/scripts/preprocessor.pm | worked around an error with open3() func WebCore/platform/graphics/GraphicsContext.h | todo: added #if !PLATFORM(JAVA) WebCore/platform/text/icu/UTextProvider.h | added #include WebCore/platform/java/PluginDataJava.cpp | swapped the order of include files WebCore/platform/java/WebPage.cpp | todo: something changed w/ OS(WINDOWS) WebCore/plugins/PluginDatabase.cpp | todo: undefined ENABLE_NETSCAPE_PLUGIN_API - included: ICU 4.6.1 headers to WebKitLibraries, zlib headers | todo: upload archives to hudson - https://trac.webkit.org/changeset/162577 | Switching Windows port to using the C Loop LLINT - Added NOMINMAX to defines, to disable min/max macro definition in Windows.h - /D _STATIC_CPPLIB is deprecated - ICU version is configured here: WebCore/icu/unicode/uvernum.h | current is 4.6.1 - todo: a bug in qmake. in WebCore/TargetJava.pri in INCLUDEPATH the line “../JavaScriptCore \” is expanded into ../../../../src/main/native/Source/JavaScriptCore but should be ../JavaScriptCore. - todo: in WebCore/generated/<..>/ProcessingInstructionImpl.java, wrong overriding of getImpl - - - - - - - - - - Issues with compilation of JFX by VS2013: - fonts: :graphics:linkWinFont libcpmt.lib(xthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in directwrite.obj The problem is that directwrite.obj is compile w/ options /MD and /D_STATIC_CPPLIB, which means that it should be linked to a dynamic c runtime lib (msvcrt.lib), but to a static cpp runtime lib (libcpmt.lib). Also, VS2013 (as I found in forum discussions) started to put the following to an object compiled with /MD: /FAILIFMISMATCH:"RuntimeLibrary=MD_DynamicRelease" At the same time, libcpmt.lib contains (dumpbin /RAW) the following in its header: /FAILIFMISMATCH:"RuntimeLibrary=MT_StaticRelease" So the error message. It’s still not clear, how the mix of /MD and /D_STATIC_CPPLIB is supposed to work. todo: Remove /D_STATIC_CPPLIB from ccFlags in win.gradle - glass: C:\cygwin64\home\Anton\jfx8u.merge\rt\modules\graphics\src\main\native-glass\win\GlassWindow.cpp(263) : error C2220: warning treated as error - no 'object' file generated C:\cygwin64\home\Anton\jfx8u.merge\rt\modules\graphics\src\main\native-glass\win\GlassWindow.cpp(263) : warning C4996: 'GetVersion': was declared deprecated todo: Removed /WX compiler option from ccFlags in win.gradle (WIN.glass.ccFlags = [ccFlags, "/WX"].flatten()) - - - - - - - - - - Issues with running WebLauncher (!!!) - todo: copied icuuc46.dll, icuin46.dll, icudt46.dll to c:\Windows\System32