edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] getAttributeNode / setAttributeNode
Date: Mon, 21 Aug 2017 12:11:15 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1708211155420.12268@carhart.net> (raw)
In-Reply-To: <20170721105041.eklhad@comcast.net>

On Mon, 21 Aug 2017, Karl Dahlke wrote:

> So css attributes from <style> tags or from <link> css files now apply to the objects as they should. It's cool.
> See tests 164 and 165 in jsrt.

This is great!  I tried it out last night a bit.

>
> Still acid 0 is a long way away.

Yes, I went to acid 0.  I think we are very close.  'last' and 
'penultimate' did not used to have anything in them correctly, and now 
they do.  The assertion at the end that uses computedStyle would even work 
if the property being retrieved happened to be one of the ones propagated 
by our CSS code.  qS("#instructions:last-child") returns zero elements. 
It isn't picking up penultimate.  But all of the earlier steps prior to 
the last line are working.

> One of the mysteries remaining is they set "white-space" = "pre-wrap" in the style block, but then the test checks for .whiteSpace.
> Now how when or why does white-space equate to whiteSpace? I don't get that.

Aha!  I found something out about this.  There is this DOM 
implementation by Thatcher et al, called env.js.  I used it a couple of 
years ago with an edbrowse 3.3.1 before we started ours.  I learned a lot 
from using it.  They have CSS-related code, and they have the following 
internal routines:

var __toCamelCase__ = function(name) {
     if (name) {
         return name.replace(/\-(\w)/g, function(all, letter) {
             return letter.toUpperCase();
         });
     }
     return name;
};

var __toDashed__ = function(camelCaseName) {
     if (camelCaseName) {
         return camelCaseName.replace(/[A-Z]/g, function(all) {
             return '-' + all.toLowerCase();
         });
     }
     return camelCaseName;
};


So I conclude that formalized conversion of camel case to/from dashed CSS 
is a thing.  I think that may be the missing link or one of them.

Kevin


  parent reply	other threads:[~2017-08-21 19:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19 15:38 [Edbrowse-dev] acid[0] Karl Dahlke
2017-08-19 22:53 ` Kevin Carhart
2017-08-19 23:08   ` Karl Dahlke
2017-08-19 23:33     ` Kevin Carhart
2017-08-20  0:00       ` Karl Dahlke
2017-08-20  0:37         ` Kevin Carhart
2017-08-20 14:33           ` Karl Dahlke
2017-08-20 20:00             ` Kevin Carhart
2017-08-20 20:08               ` [Edbrowse-dev] getAttributeNode / setAttributeNode Kevin Carhart
2017-08-20 20:24                 ` Karl Dahlke
2017-08-20 20:56                   ` Kevin Carhart
2017-08-20 21:59                     ` Kevin Carhart
     [not found]                       ` <20170721105041.eklhad@comcast.net>
2017-08-21 19:11                         ` Kevin Carhart [this message]
2017-08-21 20:01                           ` Karl Dahlke
2017-08-24  9:54                             ` Kevin Carhart
2017-08-24  9:57                             ` Kevin Carhart
2017-08-25  8:19                             ` Kevin Carhart
2017-08-25 22:09                               ` [Edbrowse-dev] whitespace nodes Kevin Carhart
2017-08-25 22:56                                 ` Karl Dahlke
2017-08-26  4:25                                   ` [Edbrowse-dev] (something other than) " Kevin Carhart
2017-09-02  9:03                                     ` Adam Thompson
2017-09-02 15:42                                       ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1708211155420.12268@carhart.net \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).