Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/beginner-jhj/mini_browser
/ functions
Functions
95 in github.com/beginner-jhj/mini_browser
⨍
Functions
95
◇
Types & classes
22
↓ 11 callers
Method
set_style
* \brief Sets a CSS style property on this node. * * Uses the COMPUTED_STYLE setters map to parse and apply a CSS property value. * Silently ignore
src/html/node.cpp:160
↓ 8 callers
Method
get_tag_name
* \brief Returns the tag name of an ELEMENT node. * * \return The tag name string (e.g., "div", "p", "a"). Empty string for TEXT nodes. */
src/html/node.cpp:46
↓ 6 callers
Method
get_attribute
* \brief Retrieves an HTML attribute value by name. * * Looks up an attribute in the attributes map. Returns empty string if * the attribute doesn'
src/html/node.cpp:139
↓ 6 callers
Method
set_document
* \brief Sets a new HTML document for rendering and updates history. * * Stores the document in browser history and triggers rendering with styling
src/gui/renderer.cpp:34
↓ 5 callers
Method
get_all_styles
* \brief Returns all computed styles for this node. * * \return A COMPUTED_STYLE object containing all CSS properties and their values. */
src/html/node.cpp:173
↓ 5 callers
Method
get_type
* \brief Returns the type of this node. * * \return The NODE_TYPE (ELEMENT or TEXT). */
src/html/node.cpp:66
↓ 5 callers
Function
parse
* \brief Parses a sequence of HTML tokens into a DOM tree structure. * * Processes a vector of tokens and builds a hierarchical Node tree representa
src/html/html_parser.cpp:16
↓ 5 callers
Function
tokenize
* \brief Tokenizes HTML source code into a sequence of tokens. * * Parses HTML text into semantic tokens representing start tags, end tags, * and t
src/html/html_tokenizer.cpp:56
↓ 4 callers
Method
add_child
* \brief Adds a child node and establishes parent-child relationship. * * Appends a child node to this node's children list and sets this node * as
src/html/node.cpp:34
↓ 4 callers
Method
get_text_content
* \brief Returns the text content of a TEXT node. * * \return The text string for TEXT nodes. Empty string for ELEMENT nodes. */
src/html/node.cpp:56
↓ 3 callers
Function
create_layout_tree
* \brief Converts a DOM tree into a layout tree with computed positions and dimensions. * * Recursively traverses the DOM tree and creates a paralle
src/css/layout_tree.cpp:352
↓ 3 callers
Function
create_node
* \brief Creates a Node object from a TOKEN. * * Converts a single TOKEN into a corresponding Node. For text tokens, creates * a TEXT type node. Fo
src/html/html_parser.cpp:101
↓ 3 callers
Function
parse_inline_style
* \brief Parses inline CSS style attributes into a property-value map. * * Parses a CSS style string (e.g., "color: red; font-size: 14px") into indi
src/css/css_parser.cpp:18
↓ 3 callers
Function
skip_space
src/util_functions.cpp:18
↓ 2 callers
Function
ltrim
src/util_functions.cpp:26
↓ 2 callers
Function
resolve_url
src/util_functions.cpp:109
↓ 2 callers
Function
rtrim
src/util_functions.cpp:32
↓ 2 callers
Function
split
src/util_functions.cpp:3
↓ 2 callers
Method
to_font
include/css/computed_style.h:93
↓ 2 callers
Function
trim
src/util_functions.cpp:40
↓ 2 callers
Function
trim_copy
src/util_functions.cpp:46
↓ 1 callers
Method
add_rule
include/css/cssom.h:14
↓ 1 callers
Function
apply_style
* \brief Applies CSS styles to a DOM tree using cascade and inheritance. * * Performs a breadth-first traversal of the DOM tree, applying CSS rules
src/css/apply_style.cpp:17
↓ 1 callers
Function
calculate_content_width
* \brief Calculates the total horizontal content width of a layout tree. * * Traverses the layout tree to find the rightmost extent of all boxes, *
src/gui/renderer.cpp:461
↓ 1 callers
Function
create_cssom
* \brief Creates a CSSOM (CSS Object Model) from parsed CSS rules. * * Parses a CSS string and creates a CSSOM object containing all CSS rules * fo
src/css/css_parser.cpp:140
↓ 1 callers
Function
extract_stylesheets
* \brief Extracts CSS stylesheets from <style> tags in the DOM. * * Performs a breadth-first traversal of the DOM tree to find all <style> elements
src/css/css_parser.cpp:98
↓ 1 callers
Method
get_parent
* \brief Retrieves the parent node. * * Locks the weak pointer to the parent and returns a shared pointer. * Returns nullptr if the parent has been
src/html/node.cpp:199
↓ 1 callers
Method
inherit_color
* \brief Returns the inherited color value as a hex string. * * Converts the QColor member to its hexadecimal string representation for * use in CS
src/css/computed_style.cpp:649
↓ 1 callers
Method
inherit_font_family
* \brief Returns the inherited font-family value as a string. * * Converts the font_family member (QString) to std::string for inheritance * to chi
src/css/computed_style.cpp:715
↓ 1 callers
Method
inherit_font_size
* \brief Returns the inherited font-size value as a string. * * Converts the font_size member (in pixels) to its string representation * for inheri
src/css/computed_style.cpp:663
↓ 1 callers
Method
inherit_font_style
* \brief Returns the inherited font-style value as a string. * * Returns the font_style member for inheritance to child elements. * * \return The
src/css/computed_style.cpp:702
↓ 1 callers
Method
inherit_font_weight
* \brief Returns the inherited font-weight value as a string. * * Converts the font_weight member (QFont::Weight enum) to its numeric * CSS represe
src/css/computed_style.cpp:676
↓ 1 callers
Method
inherit_line_height
* \brief Returns the inherited line-height value as a string. * * Returns the line_height member for inheritance to child elements. * * \return Th
src/css/computed_style.cpp:727
↓ 1 callers
Method
inherit_text_align
* \brief Returns the inherited text-align value as a string. * * Converts the text_align member (TextAlign enum) to its CSS string * representation
src/css/computed_style.cpp:740
↓ 1 callers
Method
inherit_text_decoration
* \brief Returns the inherited text-decoration value as a string. * * Converts the text_decoration member (TextDecoration enum) to its CSS string *
src/css/computed_style.cpp:791
↓ 1 callers
Method
inherit_visibility
* \brief Returns the inherited visibility value as a string. * * Converts the visibility boolean member to its CSS string representation * for inhe
src/css/computed_style.cpp:771
↓ 1 callers
Function
layout_block_element
* \brief Handles layout calculation for block-level elements. * * Calculates width, positions children vertically, handles absolute/fixed * positi
src/css/layout_tree.cpp:178
↓ 1 callers
Function
layout_image_element
* \brief Handles layout calculation for image elements. * * Loads the image from various sources (local file, URL, or data URI), * calculates dime
src/css/layout_tree.cpp:21
↓ 1 callers
Function
layout_inline_element
* \brief Handles layout calculation for inline elements. * * Processes children inline with proper spacing, wrapping across lines, * and height ca
src/css/layout_tree.cpp:282
↓ 1 callers
Function
layout_text_element
* \brief Handles layout calculation for text nodes. * * Splits text into words and calculates their positions on the current line, * handling word
src/css/layout_tree.cpp:107
↓ 1 callers
Method
matching_rules
* \brief Finds all CSS rules that match a given DOM node. * * Iterates through all CSS rules in the CSSOM and tests each selector against * the pro
src/css/cssom.cpp:15
↓ 1 callers
Function
normalize_whitespace
src/util_functions.cpp:83
↓ 1 callers
Function
parse_attribute
* \brief Parses HTML attribute strings into a name-value map. * * Extracts HTML attributes from a string (e.g., "class=\"button\" id=\"submit\"") *
src/html/html_tokenizer.cpp:14
↓ 1 callers
Function
parse_css
* \brief Parses CSS source text into an array of CSS rules. * * Tokenizes and parses a complete CSS stylesheet, handling comment removal * and rule
src/css/css_parser.cpp:160
↓ 1 callers
Method
set_attribute
* \brief Sets an HTML attribute on this node. * * Stores a name-value pair in the attributes map if both are non-empty. * Used for attributes like
src/html/node.cpp:122
↓ 1 callers
Method
set_parent
* \brief Sets the parent node reference. * * Stores a weak pointer to the parent node to avoid circular references * and prevent memory leaks in th
src/html/node.cpp:186
↓ 1 callers
Function
split_into_words
src/util_functions.cpp:53
Method
CSS_RULE
include/css/css_rule.h:16
Method
Header
* \brief Constructs a Header widget with navigation and URL input controls. * * Initializes a Header widget containing back/forward buttons, file op
src/gui/header.cpp:14
Method
LINE_STATE
include/css/layout_tree.h:19
Method
MainWindow
* \brief Constructs the main browser window with header and renderer. * * Initializes the main application window with a header bar, rendering area,
src/gui/main_window.cpp:18
Method
NODE
* \brief Constructs a DOM Node with type and content. * * Creates either an ELEMENT node with a tag name or a TEXT node with text content. * The co
src/html/node.cpp:12
Method
Renderer
* \brief Constructs a Renderer widget for displaying web content. * * Initializes the renderer with empty state, ready to receive and display * HTM
src/gui/renderer.cpp:18
Method
bubble_for_link
* \brief Searches up the DOM tree for the nearest link anchor element. * * Starting from a given node, bubbles up the DOM tree looking for an <a> ta
src/gui/renderer.cpp:607
Method
create_tree
* \brief Tokenizes and parses HTML into a DOM tree. * * Converts an HTML string into tokens, then parses the tokens into a * complete DOM tree stru
src/gui/main_window.cpp:69
Method
download_image
* \brief Handles completion of image download from the network. * * Caches downloaded images in the image cache manager and triggers a reflow * to
src/gui/main_window.cpp:183
Method
draw
* \brief Builds and displays the header widget UI layout. * * Creates the horizontal layout with back/forward navigation buttons, file opener button
src/gui/header.cpp:27
Method
draw_element_box
* \brief Draws the visual aspects of an element box (background, border, image). * * Handles rendering the background color, border, and image cont
src/gui/renderer.cpp:208
Method
draw_text_node
* \brief Draws text content with alignment, decoration, and special handling. * * Renders text nodes with proper alignment (left/center/right), tex
src/gui/renderer.cpp:246
Method
fetch_url
* \brief Fetches and renders HTML content from a network URL. * * Makes an asynchronous HTTP/HTTPS request to fetch HTML content from a URL, * pars
src/gui/main_window.cpp:146
Method
find_node_at
* \brief Finds the DOM node at a given viewport coordinate. * * Delegates to find_node_in_box with the root layout box and (0,0) offset. * * \para
src/gui/renderer.cpp:526
Method
find_node_in_box
* \brief Recursively searches layout boxes to find the node at a coordinate. * * Performs a depth-first search of layout boxes, checking children fi
src/gui/renderer.cpp:545
Method
font_metrics
include/css/computed_style.h:105
Method
get_display_type
* \brief Returns the default display type for this node based on tag name. * * Uses the HTML tag name to determine default CSS display property. *
src/html/node.cpp:80
Method
get_rules
include/css/cssom.h:18
Method
go_back
* \brief Navigates to the previous page in browser history. * * Moves the history iterator backward and re-renders the previous page * if available
src/gui/renderer.cpp:634
Method
go_forward
* \brief Navigates to the next page in browser history. * * Moves the history iterator forward and re-renders the next page * if available. */
src/gui/renderer.cpp:650
Method
init_setters
============================================================================ Setter Initialization ===================================================
src/css/computed_style.cpp:138
Function
main
test/css_parser_test.cpp:13
Function
main
test/parser_test.cpp:6
Function
main
src/main.cpp:5
Method
matches
* \brief Tests if a CSS selector matches a DOM node. * * Supports three selector types: element selectors (tag names), * class selectors (dot notat
src/css/cssom.cpp:46
Method
mousePressEvent
* \brief Handles mouse press events to detect clicked links. * * Finds the DOM node at the click position and searches up the tree * for an <a> tag
src/gui/renderer.cpp:499
Method
navigate
* \brief Navigates to a URL or file path clicked in the renderer. * * Routes link clicks to appropriate handlers: local file:// URLs are loaded * a
src/gui/main_window.cpp:226
Method
paintEvent
* \brief Paints the rendered layout tree onto the widget surface. * * Fills the background with white and recursively paints all layout boxes, * in
src/gui/renderer.cpp:178
Method
paint_fixed
* \brief Paints a fixed-position layout box adjusted for scroll position. * * Calculates the screen position of a fixed element, accounting for scro
src/gui/renderer.cpp:380
Method
paint_layout
* \brief Recursively paints a layout box and its children. * * Draws background colors, borders, images, text, and text decorations. * Handles rela
src/gui/renderer.cpp:328
Method
parse_box_sizing
* \brief Parses a string value to BOX_SIZING enum. * * \param value CSS box-sizing value (e.g., "border-box", "content-box") * \return Correspondi
src/css/computed_style.cpp:47
Method
parse_color
* \brief Parses a CSS color value string into a QColor object. * * Handles both named colors and RGB/RGBA formats. Named colors are passed directly
src/css/computed_style.cpp:475
Method
parse_display_type
* \brief Parses a string value to DISPLAY_TYPE enum. * * \param value CSS display value (e.g., "block", "inline", "none") * \return Corresponding
src/css/computed_style.cpp:20
Method
parse_font_size
* \brief Parses a CSS font-size value string into pixel units. * * Converts font-size values from various CSS units (px, pt, cm, mm, in) and * CSS
src/css/computed_style.cpp:529
Method
parse_position_type
* \brief Parses a string value to POSITION_TYPE enum. * * \param value CSS position value (e.g., "static", "relative", "absolute", "fixed") * \ret
src/css/computed_style.cpp:73
Method
parse_spacing_shorthand
* \brief Parses CSS spacing shorthand values (margin/padding with 1-4 values). * * Implements CSS shorthand syntax: * - 1 value: applied to all si
src/css/computed_style.cpp:93
Method
parse_string_to_float
* \brief Parses a CSS numeric value string with units into a float. * * Converts string representations of numbers (with or without units) into * f
src/css/computed_style.cpp:628
Method
parse_text_align
* \brief Parses a string value to TEXT_ALIGN enum. * * \param value CSS text-align value (e.g., "left", "center", "right", "justify") * \return Co
src/css/computed_style.cpp:33
Method
parse_text_decoration
* \brief Parses a string value to TEXT_DECORATION enum. * * \param value CSS text-decoration value (e.g., "underline", "line-through", "overline")
src/css/computed_style.cpp:59
Method
recalculate_layout
* \brief Recalculates the layout tree based on current viewport dimensions. * * Creates a fresh layout tree with the current widget width, calculati
src/gui/renderer.cpp:142
Method
reflow
* \brief Recalculates the layout and re-renders the current document. * * Triggered by the reflow timer, updates the layout tree to account for * n
src/gui/main_window.cpp:213
Method
render
* \brief Renders a DOM tree by applying styles, creating layouts, and scheduling paint. * * Applies user agent and author CSS, creates a layout tree
src/gui/renderer.cpp:64
Method
render_file
* \brief Loads and renders an HTML file from the local filesystem. * * Opens a local HTML file, reads its content, parses it into a DOM tree, * and
src/gui/main_window.cpp:109
Method
request_reflow
* \brief Requests a delayed reflow of the rendered document. * * Starts a timer to defer DOM reflowing (layout recalculation) to batch * layout ope
src/gui/main_window.cpp:202
Method
resizeEvent
* \brief Handles window resize events and recalculates layout if needed. * * Detects width changes and triggers layout recalculation to reflow conte
src/gui/renderer.cpp:125
Method
set_connections
* \brief Establishes signal-slot connections for the main window. * * Connects header signals to main window slots for navigation, file loading, *
src/gui/main_window.cpp:83
Method
set_connections
* \brief Establishes signal-slot connections for header widget interactions. * * Connects all header buttons and controls to their respective signal
src/gui/header.cpp:62
Method
setup_ui
* \brief Sets up the main window UI with header and renderer. * * Creates the central widget, vertical layout, header bar, and scrollable * renderi
src/gui/main_window.cpp:34