Commit a3b39a44 authored by wangmingming's avatar wangmingming

7777

parent 8f1c663b
...@@ -63,12 +63,15 @@ let sss = [{ ...@@ -63,12 +63,15 @@ let sss = [{
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["⛎", -1, 96], "fillText": ["⛎", -1, 96],
"imageData": [62, 28, 1, 1] "imageData": [62, 28, 1, 1]
}] }
]
let imgRes = {}; let imgRes = {};
for (let i = 0; i < sss.length; i++) { for (let i = 0; i < sss.length; i++) {
var a = document.createElement('canvas') var a = document.createElement('canvas')
a.width = 96
a.height = 96
let ctx = a.getContext('2d'); let ctx = a.getContext('2d');
let s = sss[i]; let s = sss[i];
ctx.font = s.font; ctx.font = s.font;
......
This diff is collapsed.
...@@ -266,12 +266,12 @@ function Window(options) { ...@@ -266,12 +266,12 @@ function Window(options) {
// } // }
let res = Reflect.get(target, p, receiver); let res = Reflect.get(target, p, receiver);
if (p !== 'debug' && p !== 'Object'){ if (p !== 'debug' && p !== 'Object'){
// console.log('window get', p, typeof res) console.log('window get', p, typeof res)
} }
if (p === 'StyleSheet'){ // if (p === 'StyleSheet'){
debugger; // debugger;
} // }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','top','JSON', 'Math'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') { if (!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','top','JSON', 'Math'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
......
...@@ -138,9 +138,9 @@ const proxy = function (tt, name) { ...@@ -138,9 +138,9 @@ const proxy = function (tt, name) {
// } // }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
// if (!['_registeredHandlers', 'window', '_currentEvent', 'performance', 'debug', '_eventListenerss', 'top', 'prototype'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') { if (!['_registeredHandlers', 'window', '_currentEvent', 'performance', 'debug', '_eventListenerss', 'top', 'prototype'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
// return proxy(res, p) return proxy(res, p)
// } }
return res; return res;
}, },
// getPrototypeOf(target) { // getPrototypeOf(target) {
......
...@@ -2813,9 +2813,9 @@ class CanvasRenderingContext2D { ...@@ -2813,9 +2813,9 @@ class CanvasRenderingContext2D {
console.log('CanvasRenderingContext2D.ellipse') console.log('CanvasRenderingContext2D.ellipse')
} }
fillRect() { fillRect(a,b,c,d) {
console.log('CanvasRenderingContext2D.fillRect') console.log('CanvasRenderingContext2D.fillRect')
return this._context.fillRect(...arguments) return this._context.fillRect(a,b,c,d)
} }
lineTo() { lineTo() {
...@@ -3776,12 +3776,14 @@ canvas: {writable: undefined, enumerable: true, configurable: true}, ...@@ -3776,12 +3776,14 @@ canvas: {writable: undefined, enumerable: true, configurable: true},
configurable: true configurable: true
}, },
}) })
window.WebGLRenderingContext = WebGLRenderingContext
let t = proxy(new WebGLRenderingContext(), 'WebGLRenderingContext11') let t = proxy(new WebGLRenderingContext(), 'WebGLRenderingContext11')
// let t = new WebGLRenderingContext() // let t = new WebGLRenderingContext()
this._context = t; this._context = t;
} }
// console.log('contextId res', this._context) // console.log('contextId res', this._context)
this._context = idlUtils.proxy(this._context, 'context' + contextId) // this._context = idlUtils.proxy(this._context, 'context' + contextId)
return this._context; return this._context;
} }
......
This diff is collapsed.
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