From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:400c:c09::22f; helo=mail-wm0-x22f.google.com; envelope-from=arthompson1990@gmail.com; receiver= Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 6216577AAF for ; Tue, 13 Feb 2018 10:58:59 -0800 (PST) Received: by mail-wm0-x22f.google.com with SMTP id x4so14496651wmc.0 for ; Tue, 13 Feb 2018 10:59:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ITj2X2/tZCweeb/+70zn0IS6BitfLCo7UCT/nv6bcL4=; b=Aq4MvEOgrcywV2i0ZcX0uRrc99Z/d2eT/ZXq75+pBxZn86dabcxoVWm8BVYiouGmbv qO/BIfjVGjNFEkOkubee8ONGHjfPwDB3V4IlcNMlWIqsv9Aaw3C8sJ6BHSmwzxjN3Xz6 8hR2+STaRIt5cwtFW/tUV3Bn5vRknlrYuvmY1gg4EplWqJScnVI2ZI87lBxmNPqcjviT wxyaCsFsNfvwOwA96GR+AgNtziH5tAb+swN0hulpdzE94zmLMjGYdgkanx9OXaZlvohG nXaOK8g+uylArKZ4lg0wo468rYpp3zwMcIoLJcuzMCofGWVqMvGUnUcaQvdP5d+hlB0d Y7jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ITj2X2/tZCweeb/+70zn0IS6BitfLCo7UCT/nv6bcL4=; b=BHEAw/cTER/KaRSXBpxUUQxmHm/D//qlwGO3AIC83sA2KJHTliOxap/QX8HMV7+rKl h0MbmQtc0jEHP6IaVw7WIa0dI49C1g6OkkC1zIktGh0i4A11k3ANmoCmMFXdEumR1xgb igeKF3o0ub5BjgaDMRDGU2AgDhK+BAJm7jCCHaClWGgRWSgQpqqJTUcgQS7GNOQ9UkDh A/QiRghQ6ziwntOZNW/tD+EuIOpbtx9QN5vXaBnHkBZcxqvRTwMQ4qa4KB7dr40YOdmY ZKOMAvPok1qkeWn0UoP6PfhqnRkm0gVo4zOZjqslvdGIlWYfinDSLHACVCFS3YqTn0Bs 87pA== X-Gm-Message-State: APf1xPD293SQiz0dlg1a3/Udsn4aHhKzLSaazn4Ay/pbHert9Y2tUdIG 4/e8OCG6WvI9bWIh+1eVik4= X-Google-Smtp-Source: AH8x226YwZC2NdikLBW89eJEwBAFLsWODJmKvyeQRCHMW7iqpoWgyxXlAwovDMt3La4Km3TE2blLDA== X-Received: by 10.28.138.85 with SMTP id m82mr2218223wmd.56.1518548385097; Tue, 13 Feb 2018 10:59:45 -0800 (PST) Received: from toaster (a.5.9.3.b.f.e.f.f.f.4.4.2.d.a.2.2.4.0.9.2.4.1.1.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1142:9042:2ad2:44ff:fefb:395a]) by smtp.gmail.com with ESMTPSA id c1sm1429866wre.10.2018.02.13.10.59.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 10:59:44 -0800 (PST) Date: Tue, 13 Feb 2018 18:59:36 +0000 From: Adam Thompson To: Karl Dahlke Cc: Edbrowse-dev@lists.the-brannons.com Message-ID: <20180213185936.l2la7s2rdsdze2fy@toaster> References: <20180113134131.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180113134131.eklhad@comcast.net> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [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:58:59 -0000 On Tue, Feb 13, 2018 at 01:41:31PM -0500, Karl Dahlke wrote: > 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.) Indeed and we've got to do something. We need some of css but the third-party software just doesn't appear to be good enough... that's a shame. > 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 = 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. Sounds good, I'll have a play with it and see what I can find. Hopefully it all works as expected. Thanks for working on this, Adam.