Commit Graph

18 Commits

Author SHA1 Message Date
Florian Bruhin
52df867030 Fix test_webkitelem 2016-11-16 13:09:16 +01:00
Florian Bruhin
3e1583bb1c Make WebKitElement._is_visible private
It makes a lot of sense for this to be in webkitelem.py, but it should
not be public API as it's only used internally and can't be implemented
here with QtWebEngine.
2016-09-07 11:58:39 +02:00
Florian Bruhin
60c86a08c4 Get rid of WebElement.debug_text 2016-09-07 11:47:39 +02:00
Florian Bruhin
e700d11447 Add check_vanished() in webkitelem.insert_text 2016-09-07 11:29:26 +02:00
Florian Bruhin
8f9cfcf232 Get rid of webelem.run_js_async 2016-09-07 11:27:37 +02:00
Florian Bruhin
78d64f4791 Get rid of webkitelem.focus_elem 2016-09-07 11:24:28 +02:00
Florian Bruhin
7592345b6e Make unittests work without QtWebKit 2016-09-05 18:45:50 +02:00
Florian Bruhin
63c66945a4 Add webelem.click() and webelem.hover() 2016-08-18 14:32:19 +02:00
Florian Bruhin
6f24221c54 Replace WebElement.frame() by .has_frame() 2016-08-18 12:40:21 +02:00
Florian Bruhin
62db0095d1 Revert "Make webelem.rect_on_view work async"
This reverts commit 4e11613d2df064b138532c18f88bbf278c64f347.

We can actually make this synchronous just fine by collecting that
information when searching for the elements...
2016-08-18 12:40:21 +02:00
Florian Bruhin
e6d6302958 Make webelem.rect_on_view work async
WebKitElement still has an internal sync version used for is_visible,
but hopefully we can get rid of that soon too.
2016-08-18 12:40:21 +02:00
Florian Bruhin
8cd822c7db Add blank lines 2016-08-17 14:51:05 +02:00
Florian Bruhin
0293307d61 Remove adjust_zoom for webelem.rect_on_view
Previously, the drawn hint labels were affected by the zoom, i.e., they
were stretched out by QtWebKit and actually had to be drawn at the
unzoomed position.

The Python/C++ API gives us coordinated adjusted for zoom, so
we always *negatively* adjusted them to get the unzoomed coordinates.

JS gave us the original coordinates, so we stretched them out according
to the zoom if adjust_zoom was given (which means only when clicking a
link).

Now we always operate in term of display coordinates: The point where we
draw the hint label is equal to the point we're clicking.

Thus, the zoom level for javascript is always adjusted, and the Python
zoom level is never (negatively) adjusted.
2016-08-17 14:51:05 +02:00
Florian Bruhin
cf7170a33b Remove no longer needed webelem methods
The following methods were only used for hint labels and thus removed
now:

- document_element
- create_inside
- find_first
- set_inner_xml
- remove_from_document
- set_style_property
2016-08-17 14:44:49 +02:00
Florian Bruhin
fb3da578c5 Fix lint 2016-08-09 17:28:14 +02:00
Florian Bruhin
58fb41ab9d tests: Fix webkitelem test for tagName 2016-08-08 15:34:45 +02:00
Florian Bruhin
0b16a36120 Clean up handling of focus element
Also fixes #1359.
2016-08-08 14:05:30 +02:00
Florian Bruhin
dfbadaf7c2 Split WebElementWrapper into abstract/webkit parts 2016-08-08 13:04:53 +02:00