From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:558:fe21:29:69:252:207:43; helo=resqmta-ch2-11v.sys.comcast.net; envelope-from=eklhad@comcast.net; receiver= Received: from resqmta-ch2-11v.sys.comcast.net (resqmta-ch2-11v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:43]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 65A8A77A9A for ; Tue, 13 Feb 2018 10:40:45 -0800 (PST) Received: from resomta-ch2-08v.sys.comcast.net ([69.252.207.104]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id lfW0eDymC9nyFlfWGeKU3R; Tue, 13 Feb 2018 18:41:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1518547292; bh=5G8Ci9O3GIHI3BSQulUfa+cLyfLpZpbKmio/8RiQHu4=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=j5LIuJzPVoJ3jr/h+gFrWCX894i8sH5T0ngjzDPCaT+iRRtHEVf1GFzYgHwvPeIda qDvGP7PwaGt5xY364KX13KxQvXFdve6eGrnfVsz+aze4Ck8lZRZujhe6+kgjgqpk/G pmkz1ydj3hWzQglkGQG1OIwNe86IWfeVdF+1WQ/G8tdTbBynC4s/6vX25XAN5RD61f thSgVITyq3DGxOj3+DhwL/vB1nJVjiVDSDdMXWKLta8YJAk8784GhhXArM4opAjWVR uxqo+h1i7dMDz5HAm5E7SnS+Vg+XNvKRUy/Eg3oFXD32xu/ZE/7pxdFMjLUQphVTXK /w2aHz7cea2ow== Received: from unknown ([IPv6:2601:408:c300:8f09:21e:4fff:fec2:a0f1]) by resomta-ch2-08v.sys.comcast.net with SMTP id lfWFea4KBe3xXlfWFemUz0; Tue, 13 Feb 2018 18:41:32 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke User-Agent: edbrowse/3.7.1 Date: Tue, 13 Feb 2018 13:41:31 -0500 Message-ID: <20180113134131.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=nextpart-eb-604642 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfMzp7UFAsPdf95jco/RRH8K3O00wMgRkngvUA0RjH7/ix51DhiZDes6wFirwYDUgjCvP9Clzd5c7o4Suipz5cx/24srrdy3IgUyJY6nggqVRYBups7Kv BnUQfQ+DKOP/yZiw8zPTck0xs2pZ2BDBxiNB+NPKbpxgK9IIFvSHefSC Subject: [Edbrowse-dev] css parser X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.25 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 18:40:45 -0000 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --nextpart-eb-604642 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Earlier posts have discussed the possibility, and the advantages, of = writing our own css parser and querySelectorAll. If we are content with handling the high runner cases, and maybe not = every corner case, it might not be as hard as first appears. (We don't handle the unusual cases now anyways.) css selector syntax is described here. https://www.w3.org/TR/CSS21/selector.html#grouping There's a lot going on, but it's straightforward. An ideal css compiler would produce a 4 dimensional structure. I have implemented such, and it seems to work on the modest files I've = tried. (I have yet to try the monster css file from stackoverflow.) Have a look at the comments in startwindow.js line 2105. If you want to play with it, browse any file with at least one css file, and in jdb, v =3D mw0.cssPieces(mw0.uncomment(document.links[0].data)); Once this is shaken out, cssGather would call this instead of the third = party css parser. Then we would write our own querySelectorAll, then invoke that from = within cssApply. That's the roadmap. Karl Dahlke --nextpart-eb-604642--