Skip to content

Commit

Permalink
Bump parley (inline box support merged to main)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jul 21, 2024
1 parent 5315d76 commit e2437a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ style_traits = { git = "https://github.com/dioxuslabs/stylo", rev = "10767f4" }
selectors = { git = "https://github.com/dioxuslabs/stylo", rev = "10767f4" } # 2024-05-15 + dioxus patches
html5ever = "0.27" # needs to match stylo markup5ever version
taffy = { git = "https://github.com/dioxuslabs/taffy", rev = "a2378a72fe6ebf86969bb5e9c5b15ff351bf086c" }
parley = { git = "https://github.com/nicoburns/parley", rev = "4c71f69fe628797215bdc31d457c7213d13f4ed2" }
parley = { git = "https://github.com/nicoburns/parley", rev = "002a0050ca5b28aab47717ef3905b315e823ad48" }
dioxus = { git = "https://github.com/dioxuslabs/dioxus", rev = "a3aa6ae771a2d0a4d8cb6055c41efc0193b817ef"}
dioxus-ssr = { git = "https://github.com/dioxuslabs/dioxus", rev = "a3aa6ae771a2d0a4d8cb6055c41efc0193b817ef" }
tokio = { version = "1.25.0", features = ["full"] }
Expand Down
10 changes: 5 additions & 5 deletions packages/blitz/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use blitz_dom::{
};
use html5ever::local_name;
use image::{imageops::FilterType, DynamicImage};
use parley::layout::LayoutItem2;
use parley::layout::PositionedLayoutItem;
use style::{
dom::TElement,
values::{
Expand Down Expand Up @@ -317,14 +317,14 @@ where
for item in line.items() {
print!(" ");
match item {
LayoutItem2::GlyphRun(run) => {
PositionedLayoutItem::GlyphRun(run) => {
print!(
"RUN (x: {}, w: {}) ",
run.offset().round(),
run.run().advance()
)
}
LayoutItem2::InlineBox(ibox) => print!(
PositionedLayoutItem::InlineBox(ibox) => print!(
"BOX (id: {} x: {} y: {} w: {}, h: {})",
ibox.id,
ibox.x.round(),
Expand Down Expand Up @@ -680,7 +680,7 @@ where
// Render inline boxes
for line in text_layout.layout.lines() {
for item in line.items() {
if let LayoutItem2::InlineBox(ibox) = item {
if let PositionedLayoutItem::InlineBox(ibox) = item {
self.render_node(scene, ibox.id as usize, pos);
}
}
Expand Down Expand Up @@ -788,7 +788,7 @@ impl ElementCx<'_> {

for line in text_layout.layout.lines() {
for item in line.items() {
if let LayoutItem2::GlyphRun(glyph_run) = item {
if let PositionedLayoutItem::GlyphRun(glyph_run) = item {
let mut x = glyph_run.offset();
let y = glyph_run.baseline();
let run = glyph_run.run();
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ impl Document {
// Store sizes and positions of inline boxes
for line in inline_layout.layout.lines() {
for item in line.items() {
if let parley::layout::LayoutItem2::InlineBox(ibox) = item {
if let parley::layout::PositionedLayoutItem::InlineBox(ibox) = item {
let node = &mut self.nodes[ibox.id as usize];
let padding = node.style.padding.resolve_or_zero(child_inputs.parent_size);
let border = node.style.border.resolve_or_zero(child_inputs.parent_size);
Expand Down

0 comments on commit e2437a8

Please sign in to comment.