[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,93 +2,147 @@
|
||||
id: wiki-2026-0508-blink
|
||||
title: Blink
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-AUTO-7F733B]
|
||||
aliases: [P-Reinforce-AUTO-7F733B, Chromium Blink, Blink Renderer]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
tags: [auto-reinforced]
|
||||
verification_status: applied
|
||||
tags: [browser, web, rendering, chromium]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
github_commit: "[P-Reinforce] Continuous Worker - Blink"
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: cpp
|
||||
framework: chromium
|
||||
---
|
||||
|
||||
# [[Blink|Blink]]
|
||||
# Blink
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> Blink는 [[Chrome|Chrome]] 브라우저에서 사용되는 렌더러(renderer) 엔진입니다 [1]. V8 엔진 외부에서 C++ 객체를 정의하고 할당하는 역할을 담당하며, 이러한 객체들은 메모리 힙 스냅샷 내에서 보통 `InternalNode` 카테고리로 표시됩니다 [2]. Blink는 '[[Oilpan|Oilpan]]'이라는 자체적인 가비지 컬렉터(Garbage Collector)를 보유하고 있으며, V8 엔진의 가비지 컬렉터와 상호 협력하여 동작합니다 [1].
|
||||
## 매 한 줄
|
||||
> **"매 Chromium 의 rendering engine — 매 Web 의 de facto standard."**. Blink 는 Google 이 2013 년 WebKit 에서 fork 한 layout/rendering engine 으로, Chrome/Edge/Brave/Opera 등 Chromium-based browser 의 90%+ market share 를 통해 매 modern web platform (CSS Grid, Houdini, View Transitions) 을 정의한다.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **C++ 객체 및 힙 스냅샷([[Heap Snapshot|Heap Snapshot]]) 표현:**
|
||||
Blink는 V8 엔진 영역 밖에서 할당되는 C++ 객체들을 정의합니다. 크롬 개발자 도구의 힙 스냅샷을 통해 메모리를 분석할 때, Blink가 생성한 이 객체들은 기본적으로 `InternalNode`라는 이름으로 그룹화되어 표시됩니다 [2]. 만약 이 `InternalNode`가 과도한 메모리를 점유하여 메모리 누수(Leak)가 의심될 경우, 실험적 기능(Experiments) 설정을 켜서 제네릭한 `InternalNode` 대신 실제 Blink의 C++ 클래스 이름을 직접 노출시켜 디버깅할 수 있습니다 [2].
|
||||
- **자체 가비지 컬렉터 'Oilpan' 및 V8과의 협력:**
|
||||
크롬의 렌더러인 Blink는 메모리를 관리하기 위해 'Oilpan'이라는 독자적인 가비지 컬렉터를 가지고 있습니다 [1]. 현재 V8 엔진의 가비지 컬렉터와 Blink의 Oilpan 간의 협력을 향상시키기 위한 작업이 진행 중입니다. 특히, V8의 가비지 컬렉터 프로젝트인 [[Orinoco|Orinoco]]에서 도입된 새로운 기술과 기법 중 일부를 Blink의 Oilpan으로 이식(porting)하는 노력이 이루어지고 있습니다 [1].
|
||||
- **주의:** 소스에 관련 정보가 부족합니다. (제공된 소스 데이터에서는 Blink의 가비지 컬렉션(Oilpan)과 메모리 표현(`InternalNode`)에 관한 내용만 간략히 언급되어 있으며, 그 외 Blink의 세부 아키텍처나 렌더링 동작 방식에 대한 상세 정보는 포함되어 있지 않습니다.)
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 자동화 엔진에 의해 매핑된 지식으로, 추후 정밀 검증 필요.
|
||||
- **정책 변화:** Programming & Language 분야의 자동 자산화 수행.
|
||||
### 매 Pipeline
|
||||
1. **Parse** — HTML/CSS → DOM/CSSOM.
|
||||
2. **Style** — selector matching, computed style.
|
||||
3. **Layout (LayoutNG)** — box tree, fragment tree.
|
||||
4. **Paint** — display item list.
|
||||
5. **Composite (CC)** — layer tree → GPU draw quads.
|
||||
6. **Raster + Display** — Skia/SkiaGanesh → Viz → Display compositor.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Related Topics:** [[V8 Engine|V8 Engine]], Oilpan, [[Orinoco|Orinoco]], InternalNode
|
||||
- **Projects/Contexts:** [[Chrome|Chrome]], [[Heap Snapshot|Heap Snapshot]]
|
||||
- **Contradictions/Notes:** 소스 내에 Blink 자체의 전체 구조를 다루는 정보는 부족하며, V8 메모리 관리 및 힙 스냅샷 디버깅 관점에서만 제한적으로 언급되어 있습니다.
|
||||
### 매 vs WebKit / Gecko
|
||||
- **Blink (Chromium)**: V8, Skia, multi-process.
|
||||
- **WebKit (Safari)**: JavaScriptCore, CoreGraphics/Metal.
|
||||
- **Gecko (Firefox)**: SpiderMonkey, WebRender (Rust).
|
||||
|
||||
---
|
||||
*Last updated: 2026-04-19*
|
||||
### 매 응용
|
||||
1. Chrome/Edge browsers.
|
||||
2. Electron/Tauri (Tauri uses platform webview).
|
||||
3. CEF (Chromium Embedded Framework).
|
||||
4. Headless Chrome / Puppeteer / Playwright.
|
||||
|
||||
---
|
||||
## 💻 패턴
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
### Custom Element via Web Components
|
||||
```javascript
|
||||
class MyButton extends HTMLElement {
|
||||
connectedCallback() {
|
||||
this.attachShadow({ mode: "open" }).innerHTML = `
|
||||
<button><slot></slot></button>
|
||||
<style>button { padding: 8px 16px; }</style>`;
|
||||
}
|
||||
}
|
||||
customElements.define("my-button", MyButton);
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### CSS Houdini Paint Worklet
|
||||
```javascript
|
||||
// checkerboard.js
|
||||
class Checkerboard {
|
||||
paint(ctx, geom, props) {
|
||||
const size = props.get("--check-size").value;
|
||||
for (let y = 0; y < geom.height; y += size)
|
||||
for (let x = 0; x < geom.width; x += size)
|
||||
if (((x/size) + (y/size)) % 2) ctx.fillRect(x, y, size, size);
|
||||
}
|
||||
}
|
||||
registerPaint("checkerboard", Checkerboard);
|
||||
```
|
||||
```css
|
||||
div { background: paint(checkerboard); --check-size: 20; }
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### View Transitions (Blink 111+)
|
||||
```javascript
|
||||
async function navigate(url) {
|
||||
if (!document.startViewTransition) return location.assign(url);
|
||||
const t = document.startViewTransition(() => loadInto(url));
|
||||
await t.finished;
|
||||
}
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Performance: Containment
|
||||
```css
|
||||
.card {
|
||||
contain: layout paint style; /* isolate subtree work */
|
||||
content-visibility: auto; /* skip offscreen rendering */
|
||||
}
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### DevTools Trace (Programmatic)
|
||||
```javascript
|
||||
// puppeteer
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
await page.tracing.start({ path: "trace.json", categories: ["devtools.timeline"] });
|
||||
await page.goto("https://example.com");
|
||||
await page.tracing.stop();
|
||||
```
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### CDP (Chrome DevTools Protocol)
|
||||
```javascript
|
||||
const client = await page.target().createCDPSession();
|
||||
await client.send("Performance.enable");
|
||||
const { metrics } = await client.send("Performance.getMetrics");
|
||||
console.log(metrics.find(m => m.name === "LayoutCount"));
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
## 매 결정 기준
|
||||
| 상황 | 권장 |
|
||||
|---|---|
|
||||
| Cross-browser web app | Standards-only, test 3 engines |
|
||||
| Desktop app (full Chromium) | Electron/CEF |
|
||||
| Lightweight desktop | Tauri (system webview) |
|
||||
| Automation/scrape | Playwright (multi-engine) |
|
||||
| Mobile WebView | System WebView (avoid bundling) |
|
||||
|
||||
**기본값**: standards + feature detection; Blink-specific API only with fallbacks.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Browser Engine]] · [[Chromium]]
|
||||
- 변형: [[WebKit]] · [[Gecko]] · [[Servo]]
|
||||
- 응용: [[Electron]] · [[Puppeteer]] · [[Playwright]]
|
||||
- Adjacent: [[V8]] · [[Skia]] · [[LayoutNG]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: explain pipeline stage, generate web platform boilerplate.
|
||||
**언제 X**: Blink internals C++ patches — need source + CL review.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Vendor-prefixed only**: `-webkit-` without standard fallback.
|
||||
- **Layout thrashing**: read-write-read forced sync layouts.
|
||||
- **Heavy main thread**: blocks composite — use Workers + OffscreenCanvas.
|
||||
- **Assuming Chromium-only**: breaks Safari/Firefox parity.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (chromium.org docs, web.dev, Blink design docs).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — pipeline, Houdini, View Transitions |
|
||||
|
||||
Reference in New Issue
Block a user