⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kjs_html.cpp

📁 konqueror3 embedded版本, KDE环境下的当家浏览器的嵌入式版本源码包.
💻 CPP
📖 第 1 页 / 共 5 页
字号:
@end@begin HTMLAreaElementTable 15  accessKey	KJS::HTMLElement::AreaAccessKey		DontDelete  alt		KJS::HTMLElement::AreaAlt		DontDelete  coords	KJS::HTMLElement::AreaCoords		DontDelete  href		KJS::HTMLElement::AreaHref		DontDelete  hash		KJS::HTMLElement::AreaHash		DontDelete|ReadOnly  host		KJS::HTMLElement::AreaHost		DontDelete|ReadOnly  hostname	KJS::HTMLElement::AreaHostName		DontDelete|ReadOnly  pathname	KJS::HTMLElement::AreaPathName		DontDelete|ReadOnly  port		KJS::HTMLElement::AreaPort		DontDelete|ReadOnly  protocol	KJS::HTMLElement::AreaProtocol		DontDelete|ReadOnly  search	KJS::HTMLElement::AreaSearch		DontDelete|ReadOnly  noHref	KJS::HTMLElement::AreaNoHref		DontDelete  shape		KJS::HTMLElement::AreaShape		DontDelete  tabIndex	KJS::HTMLElement::AreaTabIndex		DontDelete  target	KJS::HTMLElement::AreaTarget		DontDelete@end@begin HTMLScriptElementTable 7  text		KJS::HTMLElement::ScriptText		DontDelete  htmlFor	KJS::HTMLElement::ScriptHtmlFor		DontDelete  event		KJS::HTMLElement::ScriptEvent		DontDelete  charset	KJS::HTMLElement::ScriptCharset		DontDelete  defer		KJS::HTMLElement::ScriptDefer		DontDelete  src		KJS::HTMLElement::ScriptSrc		DontDelete  type		KJS::HTMLElement::ScriptType		DontDelete@end@begin HTMLTableElementTable 23  caption	KJS::HTMLElement::TableCaption		DontDelete  tHead		KJS::HTMLElement::TableTHead		DontDelete  tFoot		KJS::HTMLElement::TableTFoot		DontDelete  rows		KJS::HTMLElement::TableRows		DontDelete|ReadOnly  tBodies	KJS::HTMLElement::TableTBodies		DontDelete|ReadOnly  align		KJS::HTMLElement::TableAlign		DontDelete  bgColor	KJS::HTMLElement::TableBgColor		DontDelete  border	KJS::HTMLElement::TableBorder		DontDelete  cellPadding	KJS::HTMLElement::TableCellPadding	DontDelete  cellSpacing	KJS::HTMLElement::TableCellSpacing	DontDelete  frame		KJS::HTMLElement::TableFrame		DontDelete  rules		KJS::HTMLElement::TableRules		DontDelete  summary	KJS::HTMLElement::TableSummary		DontDelete  width		KJS::HTMLElement::TableWidth		DontDelete  createTHead	KJS::HTMLElement::TableCreateTHead	DontDelete|Function 0  deleteTHead	KJS::HTMLElement::TableDeleteTHead	DontDelete|Function 0  createTFoot	KJS::HTMLElement::TableCreateTFoot	DontDelete|Function 0  deleteTFoot	KJS::HTMLElement::TableDeleteTFoot	DontDelete|Function 0  createCaption	KJS::HTMLElement::TableCreateCaption	DontDelete|Function 0  deleteCaption	KJS::HTMLElement::TableDeleteCaption	DontDelete|Function 0  insertRow	KJS::HTMLElement::TableInsertRow	DontDelete|Function 1  deleteRow	KJS::HTMLElement::TableDeleteRow	DontDelete|Function 1@end@begin HTMLTableCaptionElementTable 1  align		KJS::HTMLElement::TableCaptionAlign	DontDelete@end@begin HTMLTableColElementTable 7  align		KJS::HTMLElement::TableColAlign		DontDelete  ch		KJS::HTMLElement::TableColCh		DontDelete  chOff		KJS::HTMLElement::TableColChOff		DontDelete  span		KJS::HTMLElement::TableColSpan		DontDelete  vAlign	KJS::HTMLElement::TableColVAlign	DontDelete  width		KJS::HTMLElement::TableColWidth		DontDelete@end@begin HTMLTableSectionElementTable 7  align		KJS::HTMLElement::TableSectionAlign		DontDelete  ch		KJS::HTMLElement::TableSectionCh		DontDelete  chOff		KJS::HTMLElement::TableSectionChOff		DontDelete  vAlign	KJS::HTMLElement::TableSectionVAlign		DontDelete  rows		KJS::HTMLElement::TableSectionRows		DontDelete|ReadOnly  insertRow	KJS::HTMLElement::TableSectionInsertRow		DontDelete|Function 1  deleteRow	KJS::HTMLElement::TableSectionDeleteRow		DontDelete|Function 1@end@begin HTMLTableRowElementTable 11  rowIndex	KJS::HTMLElement::TableRowRowIndex		DontDelete|ReadOnly  sectionRowIndex KJS::HTMLElement::TableRowSectionRowIndex	DontDelete|ReadOnly  cells		KJS::HTMLElement::TableRowCells			DontDelete|ReadOnly  align		KJS::HTMLElement::TableRowAlign			DontDelete  bgColor	KJS::HTMLElement::TableRowBgColor		DontDelete  ch		KJS::HTMLElement::TableRowCh			DontDelete  chOff		KJS::HTMLElement::TableRowChOff			DontDelete  vAlign	KJS::HTMLElement::TableRowVAlign		DontDelete  insertCell	KJS::HTMLElement::TableRowInsertCell		DontDelete|Function 1  deleteCell	KJS::HTMLElement::TableRowDeleteCell		DontDelete|Function 1@end@begin HTMLTableCellElementTable 15  cellIndex	KJS::HTMLElement::TableCellCellIndex		DontDelete|ReadOnly  abbr		KJS::HTMLElement::TableCellAbbr			DontDelete  align		KJS::HTMLElement::TableCellAlign		DontDelete  axis		KJS::HTMLElement::TableCellAxis			DontDelete  bgColor	KJS::HTMLElement::TableCellBgColor		DontDelete  ch		KJS::HTMLElement::TableCellCh			DontDelete  chOff		KJS::HTMLElement::TableCellChOff		DontDelete  colSpan	KJS::HTMLElement::TableCellColSpan		DontDelete  headers	KJS::HTMLElement::TableCellHeaders		DontDelete  height	KJS::HTMLElement::TableCellHeight		DontDelete  noWrap	KJS::HTMLElement::TableCellNoWrap		DontDelete  rowSpan	KJS::HTMLElement::TableCellRowSpan		DontDelete  scope		KJS::HTMLElement::TableCellScope		DontDelete  vAlign	KJS::HTMLElement::TableCellVAlign		DontDelete  width		KJS::HTMLElement::TableCellWidth		DontDelete@end@begin HTMLFrameSetElementTable 2  cols		KJS::HTMLElement::FrameSetCols			DontDelete  rows		KJS::HTMLElement::FrameSetRows			DontDelete@end@begin HTMLLayerElementTable 6  top		  KJS::HTMLElement::LayerTop			DontDelete  left		  KJS::HTMLElement::LayerLeft			DontDelete  visibility	  KJS::HTMLElement::LayerVisibility		DontDelete  bgColor	  KJS::HTMLElement::LayerBgColor		DontDelete  document  	  KJS::HTMLElement::LayerDocument		DontDelete|ReadOnly  clip	  	  KJS::HTMLElement::LayerClip			DontDelete|ReadOnly  layers	  KJS::HTMLElement::LayerLayers			DontDelete|ReadOnly@end@begin HTMLFrameElementTable 9  contentDocument KJS::HTMLElement::FrameContentDocument        DontDelete|ReadOnly  contentWindow KJS::HTMLElement::FrameContentWindow        DontDelete|ReadOnly  frameBorder     KJS::HTMLElement::FrameFrameBorder		DontDelete  longDesc	  KJS::HTMLElement::FrameLongDesc		DontDelete  marginHeight	  KJS::HTMLElement::FrameMarginHeight		DontDelete  marginWidth	  KJS::HTMLElement::FrameMarginWidth		DontDelete  name		  KJS::HTMLElement::FrameName			DontDelete  noResize	  KJS::HTMLElement::FrameNoResize		DontDelete  scrolling	  KJS::HTMLElement::FrameScrolling		DontDelete  src		  KJS::HTMLElement::FrameSrc			DontDelete  location	  KJS::HTMLElement::FrameLocation		DontDelete@end@begin HTMLIFrameElementTable 12  align		  KJS::HTMLElement::IFrameAlign			DontDelete  contentDocument KJS::HTMLElement::IFrameContentDocument       DontDelete|ReadOnly  contentWindow KJS::HTMLElement::IFrameContentWindow        DontDelete|ReadOnly  frameBorder	  KJS::HTMLElement::IFrameFrameBorder		DontDelete  height	  KJS::HTMLElement::IFrameHeight		DontDelete  longDesc	  KJS::HTMLElement::IFrameLongDesc		DontDelete  marginHeight	  KJS::HTMLElement::IFrameMarginHeight		DontDelete  marginWidth	  KJS::HTMLElement::IFrameMarginWidth		DontDelete  name		  KJS::HTMLElement::IFrameName			DontDelete  scrolling	  KJS::HTMLElement::IFrameScrolling		DontDelete  src		  KJS::HTMLElement::IFrameSrc			DontDelete  width		  KJS::HTMLElement::IFrameWidth			DontDelete@end@begin HTMLMarqueeElementTable 2  start           KJS::HTMLElement::MarqueeStart		DontDelete|Function 0  stop            KJS::HTMLElement::MarqueeStop                 DontDelete|Function 0@end*/static KParts::LiveConnectExtension *getLiveConnectExtension(const DOM::HTMLElement & element){  DOM::HTMLDocument doc = element.ownerDocument();  KHTMLView *view = static_cast<DOM::DocumentImpl*>(doc.handle())->view();  if (view && element.handle())    return view->part()->liveConnectExtension(static_cast<khtml::RenderPart*>(element.handle()->renderer()));  return 0L;}Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName) const{  DOM::HTMLElement element = static_cast<DOM::HTMLElement>(node);#ifdef KJS_VERBOSE  kdDebug(6070) << "KJS::HTMLElement::tryGet " << propertyName.qstring() << " thisTag=" << element.tagName().string() << endl;#endif  // First look at dynamic properties  switch (element.elementId()) {    case ID_FORM: {      DOM::HTMLFormElement form = element;      // Check if we're retrieving an element (by index or by name)      bool ok;      uint u = propertyName.toULong(&ok);      if (ok)        return getDOMNode(exec,form.elements().item(u));      KJS::HTMLCollection coll(exec, form.elements());      Value namedItems = coll.getNamedItems(exec, propertyName);      if (namedItems.type() != UndefinedType)        return namedItems;    }      break;    case ID_SELECT: {      DOM::HTMLSelectElement select = element;      bool ok;      uint u = propertyName.toULong(&ok);      if (ok)        return getDOMNode(exec,select.options().item(u)); // not specified by DOM(?) but supported in netscape/IE    }      break;    case ID_APPLET:    case ID_OBJECT:    case ID_EMBED: {      KParts::LiveConnectExtension *lc = getLiveConnectExtension(element);      QString rvalue;      KParts::LiveConnectExtension::Type rtype;      unsigned long robjid;      if (lc && lc->get(0, propertyName.qstring(), rtype, robjid, rvalue))        return getLiveConnectValue(lc, propertyName.qstring(), rtype, rvalue, robjid);    }      break;  default:    break;  }  const HashTable* table = classInfo()->propHashTable; // get the right hashtable  const HashEntry* entry = Lookup::findEntry(table, propertyName);  if (entry) {    if (entry->attr & Function)      return lookupOrCreateFunction<KJS::HTMLElementFunction>(exec, propertyName, this, entry->value, entry->params, entry->attr);    return getValueProperty(exec, entry->value);  }  // Base HTMLElement stuff or parent class forward, as usual  return DOMObjectLookupGet<KJS::HTMLElementFunction, KJS::HTMLElement, DOMElement>(exec, propertyName, &KJS::HTMLElementTable, this);}Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const{  DOM::HTMLElement element = static_cast<DOM::HTMLElement>(node);  switch (element.elementId()) {  case ID_HTML: {    DOM::HTMLHtmlElement html = element;    if      (token == HtmlVersion)         return String(html.version());  }  break;  case ID_HEAD: {    DOM::HTMLHeadElement head = element;    if      (token == HeadProfile)         return String(head.profile());  }  break;  case ID_LINK: {    DOM::HTMLLinkElement link = element;    switch (token) {    case LinkDisabled:        return Boolean(link.disabled());    case LinkCharset:         return String(link.charset());    case LinkHref:            return String(link.href());    case LinkHrefLang:        return String(link.hreflang());    case LinkMedia:           return String(link.media());    case LinkRel:             return String(link.rel());    case LinkRev:             return String(link.rev());    case LinkTarget:          return String(link.target());    case LinkType:            return String(link.type());    case LinkSheet:           return getDOMStyleSheet(exec,static_cast<DOM::ProcessingInstruction>(node).sheet());    }  }  break;  case ID_TITLE: {    DOM::HTMLTitleElement title = element;    switch (token) {    case TitleText:                 return String(title.text());    }  }  break;  case ID_META: {    DOM::HTMLMetaElement meta = element;    switch (token) {    case MetaContent:         return String(meta.content());    case MetaHttpEquiv:       return String(meta.httpEquiv());    case MetaName:            return String(meta.name());    case MetaScheme:          return String(meta.scheme());    }  }  break;  case ID_BASE: {    DOM::HTMLBaseElement base = element;    switch (token) {    case BaseHref:            return String(base.href());    case BaseTarget:          return String(base.target());    }  }  break;  case ID_ISINDEX: {    DOM::HTMLIsIndexElement isindex = element;    switch (token) {    case IsIndexForm:            return getDOMNode(exec,isindex.form()); // type HTMLFormElement    case IsIndexPrompt:          return String(isindex.prompt());    }  }  break;  case ID_STYLE: {    DOM::HTMLStyleElement style = element;    switch (token) {    case StyleDisabled:        return Boolean(style.disabled());    case StyleMedia:           return String(style.media());    case StyleType:            return String(style.type());    case StyleSheet:           return getDOMStyleSheet(exec,style.sheet());    }  }  break;  case ID_BODY: {    DOM::HTMLBodyElement body = element;    switch (token) {    case BodyALink:           return String(body.aLink());    case BodyBackground:      return String(body.background());    case BodyBgColor:         return String(body.bgColor());    case BodyLink:            return String(body.link());    case BodyText:            return String(body.text());    case BodyVLink:           return String(body.vLink());    case BodyOnLoad: {        DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(node.ownerDocument().handle());        if (!doc || !checkNodeSecurity(exec, node))          return Undefined();        DOMNode* kjsDocNode = new DOMNode(exec, doc);        // Need to create a Value wrapper to avoid leaking the KJS::DOMNode        Value nodeValue(kjsDocNode);        return kjsDocNode->getListener( DOM::EventImpl::LOAD_EVENT );    }    default:      // Update the document's layout before we compute these attributes.      DOM::DocumentImpl* docimpl = node.handle()->getDocument();      if (docimpl)        docimpl->updateLayout();      switch( token ) {      case BodyScrollLeft:        return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsX() : 0);      case BodyScrollTop:        return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsY() : 0);      case BodyScrollHeight:   return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsHeight() : 0);      case BodyScrollWidth:    return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsWidth() : 0);      }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -