Commit d0e3e054 authored by Fred Chasen's avatar Fred Chasen

Fix textNode break issue, string-set first, update snapshots

parent 1dc062c0
...@@ -37,7 +37,7 @@ RUN apt-get update \ ...@@ -37,7 +37,7 @@ RUN apt-get update \
# installs, work. # installs, work.
RUN apt-get update && apt-get install -y wget --no-install-recommends \ RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome-unstable.list' \
&& apt-get update \ && apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \ --no-install-recommends \
......
...@@ -257,8 +257,6 @@ class Layout { ...@@ -257,8 +257,6 @@ class Layout {
parent = findElement(renderedNode, source); parent = findElement(renderedNode, source);
index = indexOf(container); index = indexOf(container);
node = child(parent, index); node = child(parent, index);
startOffset = container.textContent.slice(offset);
offset = parent.textContent.indexOf(startOffset);
} }
if (!node) { if (!node) {
...@@ -318,7 +316,7 @@ class Layout { ...@@ -318,7 +316,7 @@ class Layout {
let pos = getBoundingClientRect(node); let pos = getBoundingClientRect(node);
let left = Math.floor(pos.left); let left = Math.floor(pos.left);
let right = Math.floor(pos.right); let right = Math.floor(pos.right);
// console.log(node);
if (!range && left >= end) { if (!range && left >= end) {
// Check if it is a float // Check if it is a float
let isFloat = false; let isFloat = false;
...@@ -365,7 +363,6 @@ class Layout { ...@@ -365,7 +363,6 @@ class Layout {
// Skip children // Skip children
if (skip || right < end) { if (skip || right < end) {
next = nodeAfter(node, rendered); next = nodeAfter(node, rendered);
if (next) { if (next) {
walker = walk(next, rendered); walker = walk(next, rendered);
......
...@@ -55,6 +55,7 @@ class StringSets extends Handler { ...@@ -55,6 +55,7 @@ class StringSets extends Handler {
// this.styleSheet.insertRule(`:root { --string-${name}: "${cssVar}"; }`, this.styleSheet.cssRules.length); // this.styleSheet.insertRule(`:root { --string-${name}: "${cssVar}"; }`, this.styleSheet.cssRules.length);
// fragment.style.setProperty(`--string-${name}`, `"${cssVar}"`); // fragment.style.setProperty(`--string-${name}`, `"${cssVar}"`);
set.first = cssVar; set.first = cssVar;
fragment.style.setProperty(`--string-${name}`, `"${set.first}"`);
} else { } else {
console.log(set.value + "needs css replacement"); console.log(set.value + "needs css replacement");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment