Updated all 4 ClientWebGLContext hunk line numbers to match Firefox 146:
- RENDERER: 2575 → 2573
- VENDOR: 2586 → 2584
- COLOR_WRITEMASK: 2677 → 2676
- getShaderPrecision: 3093 → 3091
Still 21 failing hunks remain due to context mismatches in Firefox 146's
nested switch structure and other code refactoring.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
Fixed the Webdriver() function hunk in 1-leak-fixes.patch:
- Updated hunk context to match Firefox 146 structure
- Changed line number from 2318 to 2316 to match actual context
Progress:
- Reduced failing hunks from 22 → 21
- Reduced reject files from 13 → 12
- Navigator.cpp now completely resolved (all hunks apply)
Remaining: 21 hunks across 12 files, primarily due to Firefox 146
code structure changes (nested switches in WebGL, font system refactoring)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major fixes accomplished:
- Fixed ALL 10 malformed patch errors (blank context lines and hunk counts)
- Removed Git version trailers from 2 patches causing parse errors
- Fixed BrowsingContext.h by adding HasOrientationOverride field for Firefox 146
- Updated Navigator.cpp Webdriver function line number (2318 → 2363)
- Fixed Navigator.cpp include order to match Firefox 146 structure
- Applied comprehensive blank line and hunk count fixes to 18 patch files
Results:
- Reduced reject files from 33 → 13 (60% reduction)
- Reduced failing hunks from 56 → 24 (57% reduction)
- 0 malformed errors (was 10)
- Build completes successfully with 'make dir'
Remaining work:
- 24 failing hunks across 13 files (mostly line number adjustments)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed 2 malformed patch errors by merging close hunks:
1. docshell/base/nsDocShell.cpp: Merged 6 include hunks (lines 18-368) into one large hunk to fix "malformed patch at line 377" error. The hunks were too close together (less than 3 lines of context between them), causing patch to fail.
2. widget/InProcessCompositorWidget.cpp: Merged 2 hunks (lines 5-31) into one to fix "malformed patch at line 3133" error. Added proper context lines between include additions and function body modifications.
Additional fixes in other patches (collateral):
- patches/fingerprint-injection.patch: Added blank line between hunks
- patches/font-hijacker.patch: Added context lines and blank line between hunks
- patches/geolocation-spoofing.patch: Added trailing context and blank line
- patches/no-search-engines.patch: Added blank line before diff header
- patches/playwright/1-leak-fixes.patch: Fixed malformed line removal
- patches/voice-spoofing.patch: Removed invalid "\ No newline at end of file" and added proper spacing
Result: 0 malformed errors in patches/playwright/0-playwright.patch
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The other 6 hunks already applied, adding lines that shift this
hunk's output line number from 2574 to 2575.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
All hunks need to start one line later (2573→2574, etc).
This fixes the last webgl-spoofing reject.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The hunk header count changes (8,12 instead of 7,11) caused the patch
to fail. Reverting to working state.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The hunk was pointing to the function start (2318) but needs to point
to the return statement location (2337→2347 after +10 offset).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed UNMASKED_RENDERER and UNMASKED_VENDOR hunk headers:
- UNMASKED_RENDERER: 7→8 old lines, 11→12 new lines
- UNMASKED_VENDOR: 6→8 old lines, 10→12 new lines
The hunk headers were undercounting context lines.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Each hunk that adds lines affects all subsequent hunks' new line numbers:
- UNMASKED_RENDERER: +4 lines (2574→2574)
- UNMASKED_VENDOR: +4 lines (2585→2589, was 2535 incorrectly)
- COLOR_WRITEMASK: +2 lines (2676→2684, was 2676 incorrectly)
- GetShaderPrecisionFormat: +18 lines (3092→3102, was 3092 incorrectly)
- IsSupported: +11 lines (6234→6262, was 6234 incorrectly)
- GetSupportedExtensions: +12 lines (6245→6284, was 6245 incorrectly)
Total offset: +51 lines by end of file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
font-fingerprinting.context.patch:
- Update include hunk from 323→325
- Remove nsIDOMXULControlElement.h from context (moved to line 247)
- Add includes after xpcpublic.h, before #ifdef blocks
webrtc-ip.context.patch:
- Update include hunk from 325→328
- Update context to match font-fingerprinting patch
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update line numbers from 11→26 due to Firefox 146 adding more includes
- MaskConfig.hpp now added after nsString.h include at line 26
- Fixes nsSynthVoiceRegistry.cpp.rej reject file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- nsDocShell.cpp: line 16→18, update context from ArrayUtils to Attributes/AutoRestore/BasePrincipal
- CanvasRenderingContext2D.cpp: line 20→59 for OriginAttributes include
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- DateTime.cpp: line 776→833 for internalResyncICUDefaultTimeZone
- GeckoBindings.h: fix hunk header -591,6 +591,7 → -591,6 +592,7
- FontFaceImpl.h: line 8→14 for MaskConfig include after FontFaceBinding.h
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- browser/app/moz.build: add WINCONSOLE block context, line 188→183
- dom/media/moz.build: add SPHINX_TREES context, line 419→418 (in audio-context-spoofing)
Firefox 146 added new code after the sections where patches insert LOCAL_INCLUDES
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- voice-spoofing: nsSynthVoiceRegistry line 27→11
- webgl-spoofing: UNMASKED_RENDERER hunk line 2573→2574
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Line 158→333
- Change _getConfiguration to #getConfiguration (Firefox 146 uses # for private methods)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Element.cpp: rewrite first hunk for new structure (no ElementInlines.h), update second hunk 984→1007
- nsScreen.cpp: rewrite first hunk for new include order, update hunks 37→40, 89→80
Firefox 146 changed include ordering - quoted includes first, then blank, then system/mozilla includes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Line 1705→1903 for juggler-navigation notification
Note: First hunk (SetPrefersReducedMotionOverride/SetForcedColorsOverride) already applied in Firefox 146, causing Oops.rej
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update line number 9→7 for includes section
- Adjust to Firefox 146's include ordering (quoted includes first, then blank, then system includes, then blank, then other includes)
- Place MaskConfig.hpp after system includes, before Constants.h
- Update WrapObject hunk line 51→49
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Playwright patch (BrowsingContext):
- Update CanonicalBrowsingContext.cpp line 274→274 with SetParentalControlsEnabled context
- Update BrowsingContext.h CurrentOrientationType line 205→209, add HasOrientationOverride field
- Update BrowsingContext.h DisplayMode section line 246→253
- Update BrowsingContext.h DidSet section line 1164→1278, change LanguageOverride nsString→nsCString, add TimezoneOverride
Network patch:
- Update SetAcceptEncodings line 1850→2113
- Add isDictionary parameter to function signature
- Update if condition to handle isDictionary case
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update line numbers: SetAcceptEncodings 1850→2113
- Add isDictionary parameter to function signature
- Update if condition to handle isDictionary case
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update constructor signature from nsPresContext to FontVisibilityProvider
- Remove mLastPrefFirstFont and mSkipDrawing from initializer (not in FF146)
- Update line numbers: 1861→1873, 1876→1875
- Replace mPresContext with mFontVisibilityProvider for user context extraction