Copyright Notice
Copyright (C) 2019 FMSoft Technologies
All Rights Reserved.
Introduction
hiWebKit
, a WebKit derivative, provides support for
HybridOS View Markup Language, as well as the popular Web standards
and specifications such as HTML 5.x and CSS 3. so we must modify the WebKit project and add some new HVML tag as same as the Html tag.
Main Modify Steps
-
Modify the [~WebCore/html/HTMLTagNames.in] file, find the corresponding line in alphabetical order, add a line, such as adding the view tag, should be placed immediately after video tag;
-
Add three new files in [~WebCore/html/]: HTMLXXXXElement.cpp, HTMLXXXXElement.h, HTMLXXXXElement.idl. These objects generally inherit HTMLElement classes; add corresponding processing functions;
-
Modify the [~Source/WebCore/Sources.txt] file and add HTMLXXXXElement.cpp in it. Only in this way can HTMLXXXXElement.cpp be compiled into the project;
-
Modify the [~Source/WebCore/Headers.cmake] file and add HTMLXXXXElement.h
-
Modify [~Source/WebCore/DerivedSources.make] and add HTMLXXXXElement.idl in JS_BINDING_IDLS.
-
Modify [~Source/WebCore/CMakeLists.txt] file and add HTMLXXXXElement.idl file to it.
-
Modify the default style of the corresponding tag in the default CSS style sheet(the file [Source/WebCore/CSS/html.css]);
-
Run: [Tools/Scripts/build-webkit -- gtk --debug/--release --clean] to clear the original intermediate file;
-
Recompile: [Tools/Scripts/build-webkit -- gtk --debug/--release]