这篇教程C++ updatePlaceholderVisibility函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updatePlaceholderVisibility函数的典型用法代码示例。如果您正苦于以下问题:C++ updatePlaceholderVisibility函数的具体用法?C++ updatePlaceholderVisibility怎么用?C++ updatePlaceholderVisibility使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updatePlaceholderVisibility函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updatePlaceholderVisibilityvoid HTMLTextFormControlElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type){ if (supportsPlaceholder()) updatePlaceholderVisibility(false); handleBlurEvent(); HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedElement, type);}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:7,
示例2: setInnerTextValuevoid HTMLTextAreaElement::setValueCommon(const String& newValue){ m_wasModifiedByUser = false; // Code elsewhere normalizes line endings added by the user via the keyboard or pasting. // We normalize line endings coming from JavaScript here. String normalizedValue = newValue.isNull() ? "" : newValue; normalizedValue.replace("/r/n", "/n"); normalizedValue.replace('/r', '/n'); // Return early because we don't want to move the caret or trigger other side effects // when the value isn't changing. This matches Firefox behavior, at least. if (normalizedValue == value()) return; m_value = normalizedValue; setInnerTextValue(m_value); setLastChangeWasNotUserEdit(); updatePlaceholderVisibility(false); setNeedsStyleRecalc(); setFormControlValueMatchesRenderer(true); // Set the caret to the end of the text value. if (document()->focusedNode() == this) { unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString); } notifyFormStateChanged(); setTextAsOfLastFormControlChangeEvent(normalizedValue);}
开发者ID:Spencerx,项目名称:webkit,代码行数:30,
示例3: setNeedsValidityCheckvoid HTMLTextAreaElement::setValueCommon(const String& newValue, TextFieldEventBehavior eventBehavior, SetValueCommonOption setValueOption) { // Code elsewhere normalizes line endings added by the user via the keyboard // or pasting. We normalize line endings coming from JavaScript here. String normalizedValue = newValue.isNull() ? "" : newValue; normalizedValue.replace("/r/n", "/n"); normalizedValue.replace('/r', '/n'); // Return early because we don't want to trigger other side effects // when the value isn't changing. // FIXME: Simple early return doesn't match the Firefox ever. // Remove these lines. if (normalizedValue == value()) { if (setValueOption == SetSeletion) { setNeedsValidityCheck(); if (isFinishedParsingChildren()) { // Set the caret to the end of the text value except for initialize. unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString); } } return; } m_value = normalizedValue; setInnerEditorValue(m_value); if (eventBehavior == DispatchNoEvent) setLastChangeWasNotUserEdit(); updatePlaceholderVisibility(); setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::ControlValue)); m_suggestedValue = String(); setNeedsValidityCheck(); if (isFinishedParsingChildren()) { // Set the caret to the end of the text value except for initialize. unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString); } notifyFormStateChanged(); switch (eventBehavior) { case DispatchChangeEvent: dispatchFormControlChangeEvent(); break; case DispatchInputAndChangeEvent: dispatchFormControlInputEvent(); dispatchFormControlChangeEvent(); break; case DispatchNoEvent: // We need to update textAsOfLastFormControlChangeEvent for |value| IDL // setter without focus because input-assist features use setValue("...", // DispatchChangeEvent) without setting focus. if (!isFocused()) setTextAsOfLastFormControlChangeEvent(normalizedValue); break; }}
开发者ID:mirror,项目名称:chromium,代码行数:60,
示例4: updatePlaceholderVisibilityvoid HTMLTextFormControlElement::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode){ if (supportsPlaceholder()) updatePlaceholderVisibility(false); handleBlurEvent(); HTMLFormControlElementWithState::dispatchBlurEvent(newFocusedNode);}
开发者ID:awong-chromium,项目名称:webkit,代码行数:7,
示例5: DCHECK_IS_ONvoid HTMLTextAreaElement::subtreeHasChanged() {#if DCHECK_IS_ON() // The innerEditor should have either Text nodes or a placeholder break // element. If we see other nodes, it's a bug in editing code and we should // fix it. Element* innerEditor = innerEditorElement(); for (Node& node : NodeTraversal::descendantsOf(*innerEditor)) { if (node.isTextNode()) continue; DCHECK(isHTMLBRElement(node)); DCHECK_EQ(&node, innerEditor->lastChild()); }#endif addPlaceholderBreakElementIfNecessary(); setChangedSinceLastFormControlChangeEvent(true); m_valueIsUpToDate = false; setNeedsValidityCheck(); setAutofilled(false); updatePlaceholderVisibility(); if (!isFocused()) return; // When typing in a textarea, childrenChanged is not called, so we need to // force the directionality check. calculateAndAdjustDirectionality(); DCHECK(document().isActive()); document().frameHost()->chromeClient().didChangeValueInTextField(*this);}
开发者ID:mirror,项目名称:chromium,代码行数:30,
示例6: updatePlaceholderVisibilityvoid HTMLTextFormControlElement::dispatchBlurEvent(RefPtr<Element>&& newFocusedElement){ if (supportsPlaceholder()) updatePlaceholderVisibility(); handleBlurEvent(); HTMLFormControlElementWithState::dispatchBlurEvent(WTF::move(newFocusedElement));}
开发者ID:clbr,项目名称:webkitfltk,代码行数:7,
示例7: updatePlaceholderVisibilityvoid HTMLTextFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type){ if (supportsPlaceholder()) updatePlaceholderVisibility(false); handleFocusEvent(oldFocusedElement, type); HTMLFormControlElementWithState::dispatchFocusEvent(oldFocusedElement, type);}
开发者ID:Tkkg1994,项目名称:Platfrom-kccat6,代码行数:7,
示例8: setFormControlValueMatchesRenderervoid HTMLTextAreaElement::setValue(const String& value){ // Code elsewhere normalizes line endings added by the user via the keyboard or pasting. // We normalize line endings coming from JavaScript here. String normalizedValue = value.isNull() ? "" : value; normalizedValue.replace("/r/n", "/n"); normalizedValue.replace('/r', '/n'); // Return early because we don't want to move the caret or trigger other side effects // when the value isn't changing. This matches Firefox behavior, at least. if (normalizedValue == this->value()) return; m_value = normalizedValue; setFormControlValueMatchesRenderer(true); updatePlaceholderVisibility(false); if (inDocument()) document()->updateStyleIfNeeded(); if (renderer()) renderer()->updateFromElement(); // Set the caret to the end of the text value. if (document()->focusedNode() == this) { unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString); } setNeedsStyleRecalc(); notifyFormStateChanged(this); updateValidity();}
开发者ID:flying-dutchmen,项目名称:3DS_w3Browser,代码行数:31,
示例9: setFormControlValueMatchesRenderervoid HTMLTextAreaElement::setNonDirtyValue(const String& value){ // Code elsewhere normalizes line endings added by the user via the keyboard or pasting. // We normalize line endings coming from JavaScript here. String normalizedValue = value.isNull() ? "" : value; normalizedValue.replace("/r/n", "/n"); normalizedValue.replace('/r', '/n'); // Return early because we don't want to move the caret or trigger other side effects // when the value isn't changing. This matches Firefox behavior, at least. if (normalizedValue == this->value()) return; m_value = normalizedValue; m_isDirty = false; setFormControlValueMatchesRenderer(true); updatePlaceholderVisibility(false); if (inDocument()) document()->updateStyleIfNeeded(); if (renderer()) renderer()->updateFromElement(); // Set the caret to the end of the text value. if (document()->focusedNode() == this) {#ifdef ANDROID_ACCEPT_CHANGES_TO_FOCUSED_TEXTFIELDS // Make sure our UI side textfield changes to match the RenderTextControl android::WebViewCore::getWebViewCore(document()->view())->updateTextfield(this, false, value);#endif unsigned endOfString = m_value.length(); setSelectionRange(endOfString, endOfString); } setNeedsValidityCheck(); notifyFormStateChanged(this);}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:35,
示例10: updatePlaceholderTextvoid HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value){ if (name == placeholderAttr) { updatePlaceholderText(); updatePlaceholderVisibility(); } else HTMLFormControlElementWithState::parseAttribute(name, value);}
开发者ID:clbr,项目名称:webkitfltk,代码行数:8,
示例11: setInnerEditorValuevoid HTMLTextAreaElement::setSuggestedValue(const String& value) { m_suggestedValue = value; if (!value.isNull()) setInnerEditorValue(m_suggestedValue); else setInnerEditorValue(m_value); updatePlaceholderVisibility(); setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::ControlValue));}
开发者ID:mirror,项目名称:chromium,代码行数:11,
示例12: setChangedSinceLastFormControlChangeEventvoid HTMLTextAreaElement::subtreeHasChanged(){ setChangedSinceLastFormControlChangeEvent(true); m_valueIsUpToDate = false; setNeedsValidityCheck(); setAutofilled(false); updatePlaceholderVisibility(); if (!focused()) return; // When typing in a textarea, childrenChanged is not called, so we need to force the directionality check. calculateAndAdjustDirectionality(); ASSERT(document().isActive()); document().frameHost()->chromeClient().didChangeValueInTextField(*this);}
开发者ID:JulienIsorce,项目名称:ChromiumGStreamerBackend,代码行数:17,
示例13: updatePlaceholderVisibilityvoid HTMLTextFormControlElement::showPlaceholderIfNecessary(){ updatePlaceholderVisibility(false);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:4,
注:本文中的updatePlaceholderVisibility函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updatePlot函数代码示例 C++ updatePixmap函数代码示例 |