当前位置: 首页>>代码示例>>C++>>正文


C++ FormDataList::appendData方法代码示例

本文整理汇总了C++中FormDataList::appendData方法的典型用法代码示例。如果您正苦于以下问题:C++ FormDataList::appendData方法的具体用法?C++ FormDataList::appendData怎么用?C++ FormDataList::appendData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormDataList的用法示例。


在下文中一共展示了FormDataList::appendData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: appendFormData

bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
{
    if (name().isEmpty())
        return false;

    document().updateLayout();

    const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : value();
    encoding.appendData(name(), text);

    const AtomicString& dirnameAttrValue = fastGetAttribute(dirnameAttr);
    if (!dirnameAttrValue.isNull())
        encoding.appendData(dirnameAttrValue, directionForFormData());
    return true;    
}
开发者ID:ewmailing,项目名称:webkit,代码行数:15,代码来源:HTMLTextAreaElement.cpp

示例2: appendFormData

bool FileInputType::appendFormData(FormDataList& encoding, bool multipart) const
{
    FileList* fileList = element()->files();
    unsigned numFiles = fileList->length();
    if (!multipart) {
        // Send only the basenames.
        // 4.10.16.4 and 4.10.16.6 sections in HTML5.

        // Unlike the multipart case, we have no special handling for the empty
        // fileList because Netscape doesn't support for non-multipart
        // submission of file inputs, and Firefox doesn't add "name=" query
        // parameter.
        for (unsigned i = 0; i < numFiles; ++i)
            encoding.appendData(element()->name(), fileList->item(i)->fileName());
        return true;
    }

    // If no filename at all is entered, return successful but empty.
    // Null would be more logical, but Netscape posts an empty file. Argh.
    if (!numFiles) {
        encoding.appendBlob(element()->name(), File::create(""));
        return true;
    }

    for (unsigned i = 0; i < numFiles; ++i)
        encoding.appendBlob(element()->name(), fileList->item(i));
    return true;
}
开发者ID:1833183060,项目名称:wke,代码行数:28,代码来源:FileInputType.cpp

示例3: appendFormData

bool HTMLButtonElement::appendFormData(FormDataList& formData, bool)
{
    if (m_type != SUBMIT || name().isEmpty() || !m_isActivatedSubmit)
        return false;
    formData.appendData(name(), value());
    return true;
}
开发者ID:chenonly,项目名称:webkit,代码行数:7,代码来源:HTMLButtonElement.cpp

示例4: appendFormData

bool SubmitInputType::appendFormData(FormDataList& encoding, bool) const
{
    if (!element()->isActivatedSubmit())
        return false;
    encoding.appendData(element()->name(), element()->valueWithDefault());
    return true;
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:7,代码来源:SubmitInputType.cpp

示例5: appendFormData

bool HTMLButtonElement::appendFormData(FormDataList& encoding, bool /*multipart*/)
{
    if (m_type != SUBMIT || name().isEmpty() || !m_activeSubmit)
        return false;
    encoding.appendData(name(), m_currValue);
    return true;
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:7,代码来源:HTMLButtonElement.cpp

示例6: appendFormData

bool BaseCheckableInputType::appendFormData(FormDataList& encoding, bool) const
{
    if (!element()->checked())
        return false;
    encoding.appendData(element()->name(), element()->value());
    return true;
}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:7,代码来源:BaseCheckableInputType.cpp

示例7: appendFormData

bool HiddenInputType::appendFormData(FormDataList& encoding, bool isMultipartForm) const
{
    if (equalIgnoringCase(element().name(), "_charset_")) {
        encoding.appendData(element().name(), String(encoding.encoding().name()));
        return true;
    }
    return InputType::appendFormData(encoding, isMultipartForm);
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:8,代码来源:HiddenInputType.cpp

示例8: appendFormData

bool TextFieldInputType::appendFormData(FormDataList& list, bool multipart) const
{
    InputType::appendFormData(list, multipart);
    const AtomicString& dirnameAttrValue = element().fastGetAttribute(dirnameAttr);
    if (!dirnameAttrValue.isNull())
        list.appendData(dirnameAttrValue, element().directionForFormData());
    return true;
}
开发者ID:smishenk,项目名称:chromium-crosswalk,代码行数:8,代码来源:TextFieldInputType.cpp

示例9: appendFormData

bool WMLInputElement::appendFormData(FormDataList& encoding, bool)
{
    if (formControlName().isEmpty())
        return false;

    encoding.appendData(formControlName(), value());
    return true;
}
开发者ID:AwaisKing,项目名称:mt6577_aosp_source,代码行数:8,代码来源:WMLInputElement.cpp

示例10: appendFormData

bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
{
    if (name().isEmpty())
        return false;
        
    bool hardWrap = renderer() && wrap() == ta_Physical;
    String v = hardWrap ? static_cast<RenderTextControl*>(renderer())->textWithHardLineBreaks() : value();
    encoding.appendData(name(), v);
    return true;
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:10,代码来源:HTMLTextAreaElement.cpp

示例11: appendFormData

bool HTMLKeygenElement::appendFormData(FormDataList& encoded_values, bool)
{
    // Only RSA is supported at this time.
    if (!m_keyType.isNull() && !equalIgnoringCase(m_keyType, "rsa"))
        return false;
    String value = signedPublicKeyAndChallengeString(shadowSelect()->selectedIndex(), m_challenge, document()->baseURL());
    if (value.isNull())
        return false;
    encoded_values.appendData(name(), value.utf8());
    return true;
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:11,代码来源:HTMLKeygenElement.cpp

示例12: appendFormData

bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
{
    if (name().isEmpty())
        return false;

    document()->updateLayout();

    const String& text = (m_wrap == HardWrap) ? valueWithHardLineBreaks() : value();
    encoding.appendData(name(), text);
    return true;
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:11,代码来源:HTMLTextAreaElement.cpp

示例13: appendFormData

bool ImageInputType::appendFormData(FormDataList& encoding, bool) const
{
    if (!element()->isActivatedSubmit())
        return false;
    const AtomicString& name = element()->name();
    if (name.isEmpty()) {
        encoding.appendData("x", m_clickLocation.x());
        encoding.appendData("y", m_clickLocation.y());
        return true;
    }

    DEFINE_STATIC_LOCAL(String, dotXString, (ASCIILiteral(".x")));
    DEFINE_STATIC_LOCAL(String, dotYString, (ASCIILiteral(".y")));
    encoding.appendData(name + dotXString, m_clickLocation.x());
    encoding.appendData(name + dotYString, m_clickLocation.y());

    if (!element()->value().isEmpty())
        encoding.appendData(name, element()->value());
    return true;
}
开发者ID:dog-god,项目名称:iptv,代码行数:20,代码来源:ImageInputType.cpp

示例14: appendFormData

bool HTMLKeygenElement::appendFormData(FormDataList& encoding, bool)
{
    // Only RSA is supported at this time.
    const AtomicString& keyType = fastGetAttribute(keytypeAttr);
    if (!keyType.isNull() && !equalIgnoringCase(keyType, "rsa"))
        return false;
    String value = signedPublicKeyAndChallengeString(shadowSelect()->selectedIndex(), fastGetAttribute(challengeAttr), document().baseURL());
    if (value.isNull())
        return false;
    encoding.appendData(name(), value.utf8());
    return true;
}
开发者ID:Igalia,项目名称:blink,代码行数:12,代码来源:HTMLKeygenElement.cpp

示例15: appendFormData

bool HTMLObjectElement::appendFormData(FormDataList& encoding, bool)
{
    if (name().isEmpty())
        return false;

    Widget* widget = pluginWidget();
    if (!is<PluginViewBase>(widget))
        return false;
    String value;
    if (!downcast<PluginViewBase>(*widget).getFormValue(value))
        return false;
    encoding.appendData(name(), value);
    return true;
}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:14,代码来源:HTMLObjectElement.cpp


注:本文中的FormDataList::appendData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。