Common Browser Application Development Knowledge

Source: Internet
Author: User
1. the browser generates the default UA

The UA generated by the android browser is actually android. webview. websettingsclassic. getcurrentuseragent (), according to build. version. release, build. model to generate system versions, models, and other information to assemble and generate UA

2. Android webview prints the DOM tree and render tree

1. Use webviewclassic. dumpdomtree (Boolean tofile), webviewclassic. dumprendertree (Boolean tofile), and webviewclassic. dumpdisplaytree ()
2. Enable the android_dom_logging switch in source/WebKit/Android/androidlog. h.
3. Call webviewclassic. fromwebview (webview). dumpdomtree (true )...
Domtree.txt

*#document0x77e3af80html0x77b10650HTML0x77e3c098HEAD0x7816f850BODY0x7816f8a8VIDEO0x77e3b8b8#text0x77afc0f8 "\nYour browser does not support the video tag.\n"

Rendertree.txt

layer at (0,0) size 980x1325  RenderView at (0,0) size 980x1325layer at (0,0) size 980x220  RenderBlock {HTML} at (0,0) size 980x220    RenderBody {BODY} at (8,8) size 964x204      RenderText {#text} at (0,0) size 0x0layer at (8,8) size 320x200  RenderVideo {VIDEO} at (0,0) size 320x200layer at (8,8) size 320x200  RenderBlock (relative positioned) {DIV} at (0,0) size 320x200layer at (8,160) size 320x48  RenderFlexibleBox (positioned) {DIV} at (0,152) size 320x48    RenderButton {INPUT} at (0,0) size 48x48    RenderFlexibleBox {DIV} at (48,0) size 224x48      RenderSlider {INPUT} at (0,0) size 224x48        RenderBlock {DIV} at (0,8) size 32x32    RenderButton {INPUT} at (272,0) size 48x48


Common Browser Application Development Knowledge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.