|
|
|
@ -40,12 +40,18 @@ WebHitTestResult::WebHitTestResult(const WebPage *page, const QPoint &pos) |
|
|
|
" return e.getAttribute('readonly') != 'readonly';" |
|
|
|
" return e.getAttribute('readonly') != 'readonly';" |
|
|
|
" return false;" |
|
|
|
" return false;" |
|
|
|
"}" |
|
|
|
"}" |
|
|
|
|
|
|
|
"function isSelected(e) {" |
|
|
|
|
|
|
|
" var selection = window.getSelection();" |
|
|
|
|
|
|
|
" if (selection.type != 'Range')" |
|
|
|
|
|
|
|
" return false;" |
|
|
|
|
|
|
|
" return window.getSelection().containsNode(e, true);" |
|
|
|
|
|
|
|
"}" |
|
|
|
"var res = {" |
|
|
|
"var res = {" |
|
|
|
" alternateText: e.getAttribute('alt')," |
|
|
|
" alternateText: e.getAttribute('alt')," |
|
|
|
" boundingRect: ''," |
|
|
|
" boundingRect: ''," |
|
|
|
" imageUrl: ''," |
|
|
|
" imageUrl: ''," |
|
|
|
" contentEditable: isEditableElement(e)," |
|
|
|
" contentEditable: isEditableElement(e)," |
|
|
|
" contentSelected: window.getSelection().containsNode(e, true)," |
|
|
|
" contentSelected: isSelected(e)," |
|
|
|
" linkTitle: ''," |
|
|
|
" linkTitle: ''," |
|
|
|
" linkUrl: ''," |
|
|
|
" linkUrl: ''," |
|
|
|
" mediaUrl: ''," |
|
|
|
" mediaUrl: ''," |
|
|
|
|