for VC
1.WebKitLibraries\win\tools\vsprops FeatureDefines.vsprops
<UserMacro
Name="ENABLE_WML"
Value="ENABLE_WML"
PerformEnvironmentSet="true"
/>
2.WebCore
DerivedSource.cpp
remove
#include "WMLElementFactory.cpp"
#include "WMLNames.cpp"
3.
WebCore/DerivedSources
change WebCore/wml/WMLElementFactory.cpp
change WebCore/wml/WMLNames.cpp
to be included in the project.
for linux
1.ENABLE_WML
export "ENABLE_WML=true" or change it in "Platform.h"
2.LOCAL_C_INCLUDES
3.LOCAL_SRC_FILES //cant compile ok
4.webkit\Source\WebCore\Android.derived.mk
wml css
need delete "obj\STATIC_LIBRARIES\libwebcore_intermediates\WebCore\"
5.FrameloaderClientAndroid.canShowMIMEType, so we change DOMImplementation::isTextMIMEType
6.autofill
"autoFill->formFieldFocused(static_cast<HTMLFormControlElement*>(focusNode));"
to
"
if (!focusNode->isWMLElement()){
LOGY("lyftest handleMouseClick autofill html");
autoFill->formFieldFocused(static_cast<HTMLFormControlElement*>(focusNode));
}else{
LOGY("lyftest handleMouseClick autofill wml");
;//autoFill->formFieldFocused(static_cast<WMLInputElement*>(focusNode));
}
"
7.input focus
a.WMLInputElement.cpp
"
void WMLInputElement::updateFocusAppearance(bool restorePreviousSelection)
{
//InputElement::updateFocusAppearance(m_data, this, this, restorePreviousSelection);//comment this
}
"
8. password
a.WMLAElement.cpp
"
if (isLinkClick(event)) {
String aa = stripLeadingAndTrailingHTMLSpaces(getAttribute(HTMLNames::hrefAttr));
String bb = substituteVariableReferences(aa, document(), WMLVariableEscapingEscape);
handleLinkClick(event, document(), bb , target(), event);
return;
}
"
b.WMLElement.h
"
namespace WebCore {
class Event;// add new
class WMLElement : public StyledElement {
"
"
virtual void defaultEventHandler(Event* event);//add new
"
c.WMLElement.cpp
"
#include "Event.h"
#include "RenderTextControl.h"
"
"
void WMLElement::defaultEventHandler(Event* event)
{
if (event->type() == eventNames().webkitEditableContentChangedEvent
&& renderer() && renderer()->isTextControl())
{
toRenderTextControl(renderer())->subtreeHasChanged();
return;
}
StyledElement::defaultEventHandler(event);
}
"
10. WMLDoElement WMLEventHandlingElement
and
insertedIntoDocument