bool EditorClientImpl::showFormAutofillForNode(Node* node) { HTMLInputElement* inputElement = toHTMLInputElement(node); if (inputElement) return autofill(inputElement, true, true, false); return false; }
void EditorClientImpl::textDidChangeInTextField(Element* element) { ASSERT(element->hasLocalName(HTMLNames::inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element); if (m_webView->autoFillClient()) m_webView->autoFillClient()->textFieldDidChange(WebInputElement(inputElement)); // Note that we only show the autofill popup in this case if the caret is at // the end. This matches FireFox and Safari but not IE. autofill(inputElement, false, false, true); }
void APIController::httpFinished() { QXmlStreamReader reader; file->close(); file->open(QIODevice::ReadOnly); reader.setDevice(file); qDebug()<<file->isReadable(); Film f; while (!reader.atEnd()) { reader.readNext(); foreach(const QXmlStreamAttribute &attr, reader.attributes()) { if(attr.value().toString()=="Genres") { reader.readNext(); f.genre+=reader.text(); f.genre+=" "; } if(attr.value().toString()=="Plot Summary") { reader.readNext(); f.description+=reader.text(); } if(attr.value().toString()=="Vintage") { reader.readNext(); f.date+=reader.text(); f.date+=" "; } } if(reader.name()=="role"&&reader.isEndElement()) { reader.readNext(); reader.readNext(); f.actors+=reader.text(); f.actors+=" "; } if(reader.text()=="Director") { reader.readNext(); reader.readNext(); reader.readNext(); f.director+=reader.text(); f.director+=" "; } } emit autofill(f); }
void CSSSelector::extractPseudoType() const { if (m_match != PseudoClass && m_match != PseudoElement) return; AtomicString active("active"); AtomicString after("after"); AtomicString anyLink("-webkit-any-link"); AtomicString autofill("-webkit-autofill"); AtomicString before("before"); AtomicString checked("checked"); AtomicString fileUploadButton("-webkit-file-upload-button"); AtomicString disabled("disabled"); AtomicString drag("-webkit-drag"); AtomicString dragAlias("-khtml-drag"); // was documented with this name in Apple documentation, so keep an alias AtomicString empty("empty"); AtomicString enabled("enabled"); AtomicString firstChild("first-child"); AtomicString firstLetter("first-letter"); AtomicString firstLine("first-line"); AtomicString firstOfType("first-of-type"); AtomicString nthChild("nth-child("); AtomicString nthOfType("nth-of-type("); AtomicString nthLastChild("nth-last-child("); AtomicString nthLastOfType("nth-last-of-type("); AtomicString focus("focus"); AtomicString hover("hover"); AtomicString indeterminate("indeterminate"); AtomicString lastChild("last-child"); AtomicString lastOfType("last-of-type"); AtomicString link("link"); AtomicString lang("lang("); AtomicString mediaControlsPanel("-webkit-media-controls-panel"); AtomicString mediaControlsMuteButton("-webkit-media-controls-mute-button"); AtomicString mediaControlsPlayButton("-webkit-media-controls-play-button"); AtomicString mediaControlsTimeDisplay("-webkit-media-controls-time-display"); AtomicString mediaControlsTimeline("-webkit-media-controls-timeline"); AtomicString mediaControlsSeekBackButton("-webkit-media-controls-seek-back-button"); AtomicString mediaControlsSeekForwardButton("-webkit-media-controls-seek-forward-button"); AtomicString mediaControlsFullscreenButton("-webkit-media-controls-fullscreen-button"); AtomicString notStr("not("); AtomicString onlyChild("only-child"); AtomicString onlyOfType("only-of-type"); AtomicString root("root"); AtomicString searchCancelButton("-webkit-search-cancel-button"); AtomicString searchDecoration("-webkit-search-decoration"); AtomicString searchResultsDecoration("-webkit-search-results-decoration"); AtomicString searchResultsButton("-webkit-search-results-button"); AtomicString selection("selection"); AtomicString sliderThumb("-webkit-slider-thumb"); AtomicString target("target"); AtomicString visited("visited"); bool element = false; // pseudo-element bool compat = false; // single colon compatbility mode m_pseudoType = PseudoUnknown; if (m_value == active) m_pseudoType = PseudoActive; else if (m_value == after) { m_pseudoType = PseudoAfter; element = true; compat = true; } else if (m_value == anyLink) m_pseudoType = PseudoAnyLink; else if (m_value == autofill) m_pseudoType = PseudoAutofill; else if (m_value == before) { m_pseudoType = PseudoBefore; element = true; compat = true; } else if (m_value == checked) m_pseudoType = PseudoChecked; else if (m_value == fileUploadButton) { m_pseudoType = PseudoFileUploadButton; element = true; } else if (m_value == disabled) m_pseudoType = PseudoDisabled; else if (m_value == drag || m_value == dragAlias) m_pseudoType = PseudoDrag; else if (m_value == enabled) m_pseudoType = PseudoEnabled; else if (m_value == empty) m_pseudoType = PseudoEmpty; else if (m_value == firstChild) m_pseudoType = PseudoFirstChild; else if (m_value == lastChild) m_pseudoType = PseudoLastChild; else if (m_value == lastOfType) m_pseudoType = PseudoLastOfType; else if (m_value == onlyChild) m_pseudoType = PseudoOnlyChild; else if (m_value == onlyOfType) m_pseudoType = PseudoOnlyOfType; else if (m_value == firstLetter) { m_pseudoType = PseudoFirstLetter; element = true; compat = true; } else if (m_value == firstLine) { m_pseudoType = PseudoFirstLine; element = true; compat = true; } else if (m_value == firstOfType) m_pseudoType = PseudoFirstOfType; else if (m_value == focus) m_pseudoType = PseudoFocus; else if (m_value == hover) m_pseudoType = PseudoHover; else if (m_value == indeterminate) m_pseudoType = PseudoIndeterminate; else if (m_value == link) m_pseudoType = PseudoLink; else if (m_value == lang) m_pseudoType = PseudoLang; else if (m_value == mediaControlsPanel) { m_pseudoType = PseudoMediaControlsPanel; element = true; } else if (m_value == mediaControlsMuteButton) { m_pseudoType = PseudoMediaControlsMuteButton; element = true; } else if (m_value == mediaControlsPlayButton) { m_pseudoType = PseudoMediaControlsPlayButton; element = true; } else if (m_value == mediaControlsTimeDisplay) { m_pseudoType = PseudoMediaControlsTimeDisplay; element = true; } else if (m_value == mediaControlsTimeline) { m_pseudoType = PseudoMediaControlsTimeline; element = true; } else if (m_value == mediaControlsSeekBackButton) { m_pseudoType = PseudoMediaControlsSeekBackButton; element = true; } else if (m_value == mediaControlsSeekForwardButton) { m_pseudoType = PseudoMediaControlsSeekForwardButton; element = true; } else if (m_value == mediaControlsFullscreenButton) { m_pseudoType = PseudoMediaControlsFullscreenButton; element = true; } else if (m_value == notStr) m_pseudoType = PseudoNot; else if (m_value == nthChild) m_pseudoType = PseudoNthChild; else if (m_value == nthOfType) m_pseudoType = PseudoNthOfType; else if (m_value == nthLastChild) m_pseudoType = PseudoNthLastChild; else if (m_value == nthLastOfType) m_pseudoType = PseudoNthLastOfType; else if (m_value == root) m_pseudoType = PseudoRoot; else if (m_value == searchCancelButton) { m_pseudoType = PseudoSearchCancelButton; element = true; } else if (m_value == searchDecoration) { m_pseudoType = PseudoSearchDecoration; element = true; } else if (m_value == searchResultsDecoration) { m_pseudoType = PseudoSearchResultsDecoration; element = true; } else if (m_value == searchResultsButton) { m_pseudoType = PseudoSearchResultsButton; element = true; } else if (m_value == selection) { m_pseudoType = PseudoSelection; element = true; } else if (m_value == sliderThumb) { m_pseudoType = PseudoSliderThumb; element = true; } else if (m_value == target) m_pseudoType = PseudoTarget; else if (m_value == visited) m_pseudoType = PseudoVisited; if (m_match == PseudoClass && element) { if (!compat) m_pseudoType = PseudoUnknown; else m_match = PseudoElement; } else if (m_match == PseudoElement && !element) m_pseudoType = PseudoUnknown; }