Skip to content

feat: compendium#1625

Draft
libergod wants to merge 50 commits intoopentibiabr:mainfrom
libergod:feat-compendium
Draft

feat: compendium#1625
libergod wants to merge 50 commits intoopentibiabr:mainfrom
libergod:feat-compendium

Conversation

@libergod
Copy link
Collaborator

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Behavior

Actual

Do this and that doesn't happens

Expected

Do this and that happens

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@libergod libergod marked this pull request as draft January 30, 2026 19:33
@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kokekanon
Copy link
Contributor

kokekanon commented Jan 30, 2026

@libergod

module

module.zip

I did this about nine months ago. I never finished it; CPP is very difficult.
I'm not sharing .cpp it because it could break modules that are currently in HTML/CSS.
I didn't think that it would also be necessary to add support for jpg, gif, and mp4, and that many HTML bugs should be fixed.

They are all in .cpp. I'm bad at .cpp

I don't know how to diagnose freeze and fix in vs community 2022.

mmm
mmmfghm
nndfb
nnnn

fix(html): block elements now fill parent width for correct text wrapping and centering

Auto-width block elements (display:block/list-item) now get AnchorLeft+AnchorRight,
matching standard CSS block layout. This ensures <p> widgets inside <center>/<td>
span the full container width, allowing wrapText to wrap at the correct boundary and
calculateGlyphsPositions to independently center each wrapped line. Also tightens
centerTagCenter detection to require an explicitly-set pixel width (valueCalculed > -1)
so unsized blocks are never mistaken for centered fixed-width elements.
fix(html): block elements now fill parent width for correct text wrapping and centering

Auto-width block elements (display:block/list-item) now get AnchorLeft+AnchorRight,
matching standard CSS block layout. This ensures <p> widgets inside <center>/<td>
span the full container width, allowing wrapText to wrap at the correct boundary and
calculateGlyphsPositions to independently center each wrapped line. Also tightens
centerTagCenter detection to require an explicitly-set pixel width (valueCalculed > -1)
so unsized blocks are never mistaken for centered fixed-width elements.
fix(html): fix text wrapping and center alignment in HTML renderer

- html.css: add `center { display: block; text-align: center }` so <center> elements behave as block containers and horizontally center their children, consistent with browser behaviour.

- uiwidgettext.cpp (updateText): change wrap guard from `m_rect.isValid()` to `m_rect.width() > 0` so text wrapping is applied on the first layout pass even when the widget height has not yet been resolved (height == 0).

- uiwidgethtml.cpp (applyBlock): auto-width block and list-item elements now receive AnchorLeft + AnchorRight anchors to their parent, making them fill the containing block width. Previously only AnchorLeft was set, leaving the
  right edge unconstrained.

- uiwidgethtml.cpp (applyFitContentRecursive): skip calling setWidth_px on width:auto block/list-item elements. These elements must derive their width from the containing block (via updateDimension in the layout batch), not from their content. The previous behaviour would traverse text nodes with a parent width of 0, measure their natural unwrapped width, stamp that value (e.g. 854 px) back onto the paragraph and clear pendingUpdate, causing the subsequent updateDimension call to skip the element and leave it wider than its container. Fix preserves the content-width contribution to ancestor fit-content containers.
Include img, audio, video, canvas, embed and object to have space on left/right by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants