Reenable basic deceptive link highlighting.
* bindings/vapi/javascriptcore-4.0.vapi (Object::get_property): Fix return type. * src/client/conversation-viewer/conversation-message.vala (GtkTemplate): Hook up to new deceptive_link_clicked signal, remove old DOM-based implementation. * src/client/conversation-viewer/conversation-web-view.vala (ConversationWebView): Add new deceptive_link_clicked signal and DeceptiveText enum, listen for deceptiveLinkClicked JS message and fire signal when received. * src/client/util/util-webkit.vala (WebKitUtil): Add to_object util function. * src/engine/util/util-js.vala (Geary.JS): Add to_object and get_property util functions. * ui/conversation-web-view.js (ConversationPageState) Listen for link clicks, check for deceptive text and send message if found. Add unit tests for deceptive text check. * test/js/composer-page-state-test.vala: Move ::run_javascript to parent class so new ConversationPageStateTest class can use it, adapt call sites to different parent signature.
This commit is contained in:
parent
69da046ff3
commit
2b5f94da7d
11 changed files with 371 additions and 140 deletions
|
|
@ -89,9 +89,9 @@ namespace JS {
|
|||
public bool has_property(Context ctx, String property_name);
|
||||
|
||||
[CCode (cname = "JSObjectGetProperty", instance_pos = 1.1)]
|
||||
public String get_property(Context ctx,
|
||||
String property_name,
|
||||
out Value? exception);
|
||||
public Value get_property(Context ctx,
|
||||
String property_name,
|
||||
out Value? exception);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue