[webkit-changes] [WebKit/WebKit] 904f0a: Cache results of selector matching (MatchResult)

2024-07-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 904f0ad00263d681191e064154cf732f3e6cb6ee
  
https://github.com/WebKit/WebKit/commit/904f0ad00263d681191e064154cf732f3e6cb6ee
  Author: Antti Koivisto 
  Date:   2024-07-05 (Fri, 05 Jul 2024)

  Changed paths:
M LayoutTests/fast/css/style-invalidation-inline-csstext.html
M Source/WebCore/dom/Node.h
M Source/WebCore/dom/StyledElement.cpp
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/style/StyleInvalidator.cpp
M Source/WebCore/style/StyleRelations.cpp
M Source/WebCore/style/StyleRelations.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleResolver.h
M Source/WebCore/style/StyleScope.cpp
M Source/WebCore/style/StyleScope.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
M Source/WebCore/style/StyleValidity.h
M Source/WebCore/testing/Internals.cpp

  Log Message:
  ---
  Cache results of selector matching (MatchResult)
https://bugs.webkit.org/show_bug.cgi?id=276123
rdar://126281259

Reviewed by Alan Baradlay.

We can avoid selector matching on inline style change by caching the last 
results of selector matching.

* LayoutTests/fast/css/style-invalidation-inline-csstext.html:
* Source/WebCore/dom/Node.h:
* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::invalidateStyleAttribute):

Add a new InlineStyleInvalid style invalidity state.

* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyPseudoElementBitsFrom):
(WebCore::RenderStyle::outOfFlowPositionStyleDidChange const):

Fix this function (position bits are not in m_nonInheritedData). It was causing 
failures in achor tests with this patch.

* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateIfNeeded):
* Source/WebCore/style/StyleRelations.cpp:
(WebCore::Style::copyRelations):

Copy style relations from the existing style.

* Source/WebCore/style/StyleRelations.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::initializeStateAndStyle):

Factor into a function.

(WebCore::Style::Resolver::builderContext):
(WebCore::Style::Resolver::styleForElement):
(WebCore::Style::Resolver::styleForElementWithCachedMatchResult):

New version for lookups with cached results.

* Source/WebCore/style/StyleResolver.h:
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::cachedMatchResult):
(WebCore::Style::Scope::updateCachedMatchResult):

Cache in a map in Scope.

* Source/WebCore/style/StyleScope.h:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::styleForStyleable):

Save and restore per-element match result cache entries.

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::determineResolutionType):

Use new resolution type for inline-only style changes.

(WebCore::Style::TreeResolver::resolveComposedTree):
* Source/WebCore/style/StyleTreeResolver.h:
* Source/WebCore/style/StyleValidity.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::styleValidityToToString):

Canonical link: https://commits.webkit.org/280692@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ef29e9: Assertion failure in adjustContentForPagination

2024-06-18 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ef29e9a60de2f1424951f77038c5ee9dd18cc345
  
https://github.com/WebKit/WebKit/commit/ef29e9a60de2f1424951f77038c5ee9dd18cc345
  Author: Antti Koivisto 
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
A LayoutTests/fast/multicol/empty-line-assert-expected.txt
A LayoutTests/fast/multicol/empty-line-assert.html
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp

  Log Message:
  ---
  Assertion failure in adjustContentForPagination
https://bugs.webkit.org/show_bug.cgi?id=275605
rdar://124213853

Reviewed by Alan Baradlay.

* LayoutTests/fast/multicol/empty-line-assert-expected.txt: Added.
* LayoutTests/fast/multicol/empty-line-assert.html: Added.
* 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::leadingContentDisplayForLineIndex):

The code assumed we can't have two subsequent root inline boxes in 
InlineDisplay. There
are cases that generate empty lines where we get this structure.

Canonical link: https://commits.webkit.org/280118@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 969e12: CSS transition on SVG inside href fails when link ...

2024-06-07 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 969e1262811073faa52aa31cbceea18ef64183d8
  
https://github.com/WebKit/WebKit/commit/969e1262811073faa52aa31cbceea18ef64183d8
  Author: Antti Koivisto 
  Date:   2024-06-07 (Fri, 07 Jun 2024)

  Changed paths:
A LayoutTests/transitions/svg-visited-fill-expected.html
A LayoutTests/transitions/svg-visited-fill.html
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/SVGRenderStyle.h

  Log Message:
  ---
  CSS transition on SVG inside href fails when link already visited
https://bugs.webkit.org/show_bug.cgi?id=267515
rdar://121015467

Reviewed by Antoine Quint.

* LayoutTests/transitions/svg-visited-fill-expected.html: Added.
* LayoutTests/transitions/svg-visited-fill.html: Added.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::PropertyWrapperVisitedAffectedSVGPaint::PropertyWrapperVisitedAffectedSVGPaint):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Add an animation property wrapper for visited-affected fill/stroke similar to 
other color properties and use it.

* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/SVGRenderStyle.h:
(WebCore::RenderStyle::fillPaintColor const):
(WebCore::RenderStyle::visitedFillPaintColor const):
(WebCore::RenderStyle::visitedFillPaintType const):
(WebCore::RenderStyle::setFillPaintColor):
(WebCore::RenderStyle::setVisitedFillPaintColor):
(WebCore::RenderStyle::setStrokePaintColor):
(WebCore::RenderStyle::setVisitedStrokePaintColor):
(WebCore::RenderStyle::strokePaintColor const):
(WebCore::RenderStyle::visitedStrokePaintColor const):
(WebCore::RenderStyle::visitedStrokePaintType const):

Expose some helpers for the property wrapper.

Canonical link: https://commits.webkit.org/279807@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 228915: [ MacOS Debug ] fast/text/emoji-num-glyphs.html is...

2024-06-03 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 228915f55f2f7b0def26f44c01d118a163f6fd8b
  
https://github.com/WebKit/WebKit/commit/228915f55f2f7b0def26f44c01d118a163f6fd8b
  Author: Antti Koivisto 
  Date:   2024-06-03 (Mon, 03 Jun 2024)

  Changed paths:
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
M Source/WebCore/rendering/updating/RenderTreeUpdater.h

  Log Message:
  ---
  [ MacOS Debug ] fast/text/emoji-num-glyphs.html is a constant timeout
https://bugs.webkit.org/show_bug.cgi?id=270195
rdar://problem/123720564

Reviewed by Alan Baradlay.

O(n^2) in whitespace renderer elimination code.

* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateBeforeDescendants):

Also store ::before as a previous renderer.

(WebCore::RenderTreeUpdater::textRendererIsNeeded):

Track whether we have seen an in-flow renderer already.
We can use this to determine if we need to create a whitespace renderer or not.

(WebCore::RenderTreeUpdater::storePreviousRenderer):

Remember in parent stack whether we have a preceding in-flow sibling.

* Source/WebCore/rendering/updating/RenderTreeUpdater.h:

Canonical link: https://commits.webkit.org/279648@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8c82c6: [LFC] Introduce concept of primary layout state

2024-05-30 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c82c6544856e727ced9aacc14b5936042918b1e
  
https://github.com/WebKit/WebKit/commit/8c82c6544856e727ced9aacc14b5936042918b1e
  Author: Antti Koivisto 
  Date:   2024-05-30 (Thu, 30 May 2024)

  Changed paths:
M Source/WebCore/layout/LayoutState.cpp
M Source/WebCore/layout/LayoutState.h
M Source/WebCore/layout/layouttree/LayoutBox.cpp
M Source/WebCore/layout/layouttree/LayoutBox.h
M Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
M Source/WebCore/rendering/RenderView.cpp

  Log Message:
  ---
  [LFC] Introduce concept of primary layout state
https://bugs.webkit.org/show_bug.cgi?id=274895
rdar://problem/128999403

Reviewed by Alan Baradlay.

Geometry for the primary layout state gets a direct cache in layout boxes.
This way we can remove the layout state pointer from Layout::Box saving memory
and simplifying code.

* Source/WebCore/layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::LayoutState):
(WebCore::Layout::LayoutState::ensureGeometryForBoxSlow):
* Source/WebCore/layout/LayoutState.h:
(WebCore::Layout::LayoutState::type const):
(WebCore::Layout::LayoutState::hasBoxGeometry const):
(WebCore::Layout::LayoutState::ensureGeometryForBox):
(WebCore::Layout::LayoutState::geometryForBox const):
(WebCore::Layout::Box::canCacheForLayoutState const): Deleted.
(WebCore::Layout::Box::cachedGeometryForLayoutState const): Deleted.
* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::setCachedGeometryForLayoutState const): Deleted.
* Source/WebCore/layout/layouttree/LayoutBox.h:
* Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::printLayoutTreeForLiveDocuments):
* Source/WebCore/rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):

Canonical link: https://commits.webkit.org/279519@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 935af3: Faulty assert in RenderTreeBuilder::Ruby::findOrCr...

2024-05-27 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 935af36335b81e63a237452fa99fb95c08b52dc6
  
https://github.com/WebKit/WebKit/commit/935af36335b81e63a237452fa99fb95c08b52dc6
  Author: Antti Koivisto 
  Date:   2024-05-27 (Mon, 27 May 2024)

  Changed paths:
A LayoutTests/fast/ruby/ruby-block-anonymous-assert-expected.txt
A LayoutTests/fast/ruby/ruby-block-anonymous-assert.html
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp

  Log Message:
  ---
  Faulty assert in 
RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild
https://bugs.webkit.org/show_bug.cgi?id=274751
rdar://128789974

Reviewed by Alan Baradlay.

 hits asssert.

* LayoutTests/fast/ruby/ruby-block-anonymous-assert-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-block-anonymous-assert.html: Added.
* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):

Fix the assert. Ruby-block may have a non-anonymous  child.

Canonical link: https://commits.webkit.org/279351@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] cfac95: Use partial style application for non-cacheable pr...

2024-05-23 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cfac95680a14569c0cc9a2b2c1eb70904a60c812
  
https://github.com/WebKit/WebKit/commit/cfac95680a14569c0cc9a2b2c1eb70904a60c812
  Author: Antti Koivisto 
  Date:   2024-05-23 (Thu, 23 May 2024)

  Changed paths:
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/ElementRuleCollector.h
M Source/WebCore/style/MatchResult.h
M Source/WebCore/style/MatchedDeclarationsCache.cpp
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleResolver.cpp

  Log Message:
  ---
  Use partial style application for non-cacheable presentational hint style
https://bugs.webkit.org/show_bug.cgi?id=274081
rdar://127995820

Reviewed by Alan Baradlay.

Presentational hint style especially in SVG often uses many unique property 
values that
miss the the matched declarations cache. We can still use the cache partilly 
for such cases
by applying the presentational properties on top of the existing cache entry.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):

Enable partial caching for SVG presentational hints.

(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

This could also be applied to inlne style but this patch does not implement it.

(WebCore::Style::ElementRuleCollector::addMatchedProperties):
* Source/WebCore/style/ElementRuleCollector.h:
* Source/WebCore/style/MatchResult.h:
(WebCore::Style::operator==):
(WebCore::Style::MatchResult::cacheablePropertiesEqual const):

New equality comparison that ignores non-cacheable properties.

(WebCore::Style::add):
* Source/WebCore/style/MatchedDeclarationsCache.cpp:
(WebCore::Style::MatchedDeclarationsCache::computeHash):
(WebCore::Style::MatchedDeclarationsCache::find):
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):

Apply non-cacheable properties after cache hit.

Canonical link: https://commits.webkit.org/279187@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c2f909: Nullptr crash due to `display:block ruby` and cont...

2024-05-20 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c2f9092d3a8e7bf63dd1c55c9917cd391fff2665
  
https://github.com/WebKit/WebKit/commit/c2f9092d3a8e7bf63dd1c55c9917cd391fff2665
  Author: Antti Koivisto 
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
A LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt
A LayoutTests/fast/ruby/ruby-block-continuation-crash.html
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp

  Log Message:
  ---
  Nullptr crash due to `display:block ruby` and continuations
https://bugs.webkit.org/show_bug.cgi?id=268770
rdar://121960530

Reviewed by Alan Baradlay.

Continuations may end up splitting anonymous 'display:ruby' box inside block 
ruby.

* LayoutTests/fast/ruby/ruby-block-continuation-crash-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-block-continuation-crash.html: Added.
* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):

Find the correct anonymous box from nested continuation structure.

Canonical link: https://commits.webkit.org/279005@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ec2c87: Fill layer pattern for mask-mode is not correctly ...

2024-05-13 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec2c8756e6a2051c182e0e8c153490b8037df753
  
https://github.com/WebKit/WebKit/commit/ec2c8756e6a2051c182e0e8c153490b8037df753
  Author: Antti Koivisto 
  Date:   2024-05-13 (Mon, 13 May 2024)

  Changed paths:
M LayoutTests/fast/masking/parsing-mask-mode-expected.txt
M LayoutTests/fast/masking/parsing-mask-mode.html
M LayoutTests/fast/masking/parsing-mask-source-type-expected.txt
M LayoutTests/fast/masking/parsing-mask-source-type.html
M Source/WebCore/rendering/style/FillLayer.cpp

  Log Message:
  ---
  Fill layer pattern for mask-mode is not correctly applied
https://bugs.webkit.org/show_bug.cgi?id=274084
rdar://127999241

Reviewed by Tim Nguyen.

* LayoutTests/fast/masking/parsing-mask-mode.html:
* LayoutTests/fast/masking/parsing-mask-mode-expected.txt:

New results match other browsers.

* LayoutTests/fast/masking/parsing-mask-source-type-expected.txt:
* LayoutTests/fast/masking/parsing-mask-source-type.html:

* Source/WebCore/rendering/style/FillLayer.cpp:
(WebCore::FillLayer::fillUnsetProperties):

Fill unset mask-mode with a pattern similar to other fill layer properties.

Canonical link: https://commits.webkit.org/278698@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 0a3862: Allow partial style application after matched decl...

2024-05-10 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0a38622f980382fde0742e9d263c9e652037fbf4
  
https://github.com/WebKit/WebKit/commit/0a38622f980382fde0742e9d263c9e652037fbf4
  Author: Antti Koivisto 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M Source/WebCore/style/StyleResolver.cpp

  Log Message:
  ---
  Allow partial style application after matched declarations cache hit
https://bugs.webkit.org/show_bug.cgi?id=273874
rdar://127734164

Reviewed by Alan Baradlay.

* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):

We were mistakenly applying all properties instead of just ones that are needed 
if we got
a cache hit where we couldn't reuse the cached style fully.

Canonical link: https://commits.webkit.org/278648@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6d8b44: [Legacy line layout removal] Stop measuring text i...

2024-05-03 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6d8b441bc01730b462d5f6f3c18e9cbd3e8956f0
  
https://github.com/WebKit/WebKit/commit/6d8b441bc01730b462d5f6f3c18e9cbd3e8956f0
  Author: Antti Koivisto 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M LayoutTests/platform/glib/svg/batik/text/xmlSpace-expected.txt
M LayoutTests/platform/ios/svg/batik/text/xmlSpace-expected.txt
M LayoutTests/platform/mac/svg/batik/text/xmlSpace-expected.txt
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineBreaker.cpp
M Source/WebCore/rendering/line/LineBreaker.h

  Log Message:
  ---
  [Legacy line layout removal] Stop measuring text in BreakingContext
https://bugs.webkit.org/show_bug.cgi?id=273614
rdar://127416332

Reviewed by Alan Baradlay and Sam Weinig.

SVG doesn't break lines so there is no need to measure.

* LayoutTests/platform/ios/svg/batik/text/xmlSpace-expected.txt:
* LayoutTests/platform/mac/svg/batik/text/xmlSpace-expected.txt:

Non-visual change (we create an inline box for empty inline whereas previously 
we didn't)

* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
(WebCore::WordMeasurement::WordMeasurement): Deleted.
(WebCore::firstPositiveWidth): Deleted.
(WebCore::textWidth): Deleted.
(WebCore::BreakingContext::textWidthConsideringPossibleTrailingSpace): Deleted.
(WebCore::BreakingContext::computeAdditionalBetweenWordsWidth): Deleted.
* Source/WebCore/rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* Source/WebCore/rendering/line/LineBreaker.h:

Canonical link: https://commits.webkit.org/278360@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 3a5915: [IFC][Integration] Remove BoxTree::layoutBoxForRen...

2024-04-30 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3a591537a16cef9f11a37f3220807774720aba8c
  
https://github.com/WebKit/WebKit/commit/3a591537a16cef9f11a37f3220807774720aba8c
  Author: Antti Koivisto 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
M Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h
M 
Source/WebCore/layout/integration/inline/LayoutIntegrationBoxGeometryUpdater.cpp
M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h
M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp
M 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderText.h

  Log Message:
  ---
  [IFC][Integration] Remove BoxTree::layoutBoxForRenderer/rendererForLayoutBox
https://bugs.webkit.org/show_bug.cgi?id=273408
rdar://problem/127236477

Reviewed by Alan Baradlay.

Use the direct accessors instead.

* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::insertChild):
(WebCore::LayoutIntegration::BoxTree::updateContent):
(WebCore::LayoutIntegration::BoxTree::insert):
(WebCore::LayoutIntegration::showInlineContent):
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer): Deleted.
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer const): Deleted.
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox): Deleted.
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const): Deleted.
(WebCore::LayoutIntegration::BoxTree::hasRendererForLayoutBox const): Deleted.
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h:
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::updateFlexItemDimensions):
* Source/WebCore/layout/integration/inline/InlineIteratorBoxModernPath.h:
(WebCore::InlineIterator::BoxModernPath::renderer const):
(WebCore::InlineIterator::BoxModernPath::hasRenderer const):
* 
Source/WebCore/layout/integration/inline/LayoutIntegrationBoxGeometryUpdater.cpp:
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateListMarkerDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateLineBreakBoxDimensions):
(WebCore::LayoutIntegration::BoxGeometryUpdater::updateInlineBoxDimensions):
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.cpp:
(WebCore::LayoutIntegration::InlineContent::rendererForLayoutBox const): 
Deleted.
(WebCore::LayoutIntegration::InlineContent::hasRendererForLayoutBox const): 
Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContent.h:
(WebCore::LayoutIntegration::InlineContent::lineLayout const):
* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::adjustDisplayLines const):
(WebCore::LayoutIntegration::InlineContentBuilder::computeIsFirstIsLastBoxAndBidiReorderingForInlineContent
 const):
* 
Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp:
(WebCore::LayoutIntegration::InlineContentPainter::paintDisplayBox):
(WebCore::LayoutIntegration::LayerPaintScope::LayerPaintScope):
(WebCore::LayoutIntegration::LayerPaintScope::includes):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::contains const):
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):
(WebCore::LayoutIntegration::LineLayout::textBoxesFor const):
(WebCore::LayoutIntegration::LineLayout::boxFor const):
(WebCore::LayoutIntegration::LineLayout::firstInlineBoxFor const):
(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
(WebCore::LayoutIntegration::LineLayout::enclosingBorderBoxRectFor const):
(WebCore::LayoutIntegration::LineLayout::visualOverflowBoundingBoxRectFor 
const):
(WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
(WebCore::LayoutIntegration::LineLayout::hitTest):
(WebCore::LayoutIntegration::LineLayout::shiftLinesBy):
(WebCore::LayoutIntegration::LineLayout::removedFromTree):
(WebCore::LayoutIntegration::LineLayout::updateTextContent):
(WebCore::LayoutIntegration::LineLayout::rendererForLayoutBox const): Deleted.
(WebCore::LayoutIntegration::LineLayout

[webkit-changes] [WebKit/WebKit] 292d42: [IFC][Integration] Layout boxes should have a rend...

2024-04-29 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 292d42429ba215465a1e89f01981f3a92e742446
  
https://github.com/WebKit/WebKit/commit/292d42429ba215465a1e89f01981f3a92e742446
  Author: Antti Koivisto 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
M Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
A Source/WebCore/layout/layouttree/FormattingContextBoxIterator.h
M Source/WebCore/layout/layouttree/LayoutBox.cpp
M Source/WebCore/layout/layouttree/LayoutBox.h
M Source/WebCore/layout/layouttree/LayoutIterator.h
M Source/WebCore/rendering/RenderObject.cpp

  Log Message:
  ---
  [IFC][Integration] Layout boxes should have a renderer backpointer
https://bugs.webkit.org/show_bug.cgi?id=273395
rdar://127226407

Reviewed by Alan Baradlay.

Currently we are using an awkward layout box -> renderer map in BoxTree. We can 
simplify things,
save memory and improve performance by getting rid of it.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::~BoxTree):
(WebCore::LayoutIntegration::BoxTree::buildTreeForInlineContent):
(WebCore::LayoutIntegration::BoxTree::buildTreeForFlexContent):
(WebCore::LayoutIntegration::BoxTree::insertChild):
(WebCore::LayoutIntegration::BoxTree::insert):
(WebCore::LayoutIntegration::BoxTree::remove):
(WebCore::LayoutIntegration::BoxTree::contains const):
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox):
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox const):
(WebCore::LayoutIntegration::BoxTree::hasRendererForLayoutBox const):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h:
(WebCore::LayoutIntegration::BoxTree::boxCount const): Deleted.
(WebCore::LayoutIntegration::BoxTree::renderers const): Deleted.
* Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp:
(WebCore::LayoutIntegration::FlexLayout::layout):
(WebCore::LayoutIntegration::FlexLayout::updateRenderers):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateRenderTreePositions):

Since we don't have a renderer list anymore, traverse the boxes in the 
formatting context instead.

(WebCore::LayoutIntegration::LineLayout::shiftLinesBy):
* Source/WebCore/layout/layouttree/FormattingContextBoxIterator.h: Added.
(WebCore::Layout::FormattingContextBoxIterator::FormattingContextBoxIterator):
(WebCore::Layout::FormattingContextBoxIterator::operator++):
(WebCore::Layout::FormattingContextBoxIteratorAdapter::FormattingContextBoxIteratorAdapter):
(WebCore::Layout::FormattingContextBoxIteratorAdapter::begin):
(WebCore::Layout::FormattingContextBoxIteratorAdapter::end):
(WebCore::Layout::formattingContextBoxes):

Add a iterator for traversing all boxes in a formatting context.

* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::~Box):
* Source/WebCore/layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::rendererForIntegration const):
(WebCore::Layout::Box::setRendererForIntegration):
* Source/WebCore/layout/layouttree/LayoutIterator.h:
(WebCore::Layout::LayoutBoxTraversal::nextSkippingChildren):
(WebCore::Layout::Traversal::nextSkippingChildren):
(WebCore::Layout::LayoutIterator::traverseNextSkippingChildren):
(WebCore::Layout::LayoutIterator::operator const):
(WebCore::Layout:: const):
(WebCore::Layout::LayoutIterator::get const):
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::RenderObject::~RenderObject):
(WebCore::RenderObject::setLayoutBox):
(WebCore::RenderObject::clearLayoutBox):

Canonical link: https://commits.webkit.org/278104@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 235ae8: Rebuild continuations when position property changes

2024-04-23 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 235ae8a090b2798b982fa2737c5df7d65d26298b
  
https://github.com/WebKit/WebKit/commit/235ae8a090b2798b982fa2737c5df7d65d26298b
  Author: Antti Koivisto 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M 
LayoutTests/fast/block/positioning/fixed-container-with-relative-parent-expected.html
A 
LayoutTests/fast/block/positioning/out-of-flow-continuation-rebuild-expected.html
A LayoutTests/fast/block/positioning/out-of-flow-continuation-rebuild.html
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleUpdate.cpp
M Source/WebCore/style/StyleUpdate.h

  Log Message:
  ---
  Rebuild continuations when position property changes
https://bugs.webkit.org/show_bug.cgi?id=273137
rdar://124987637

Reviewed by Alan Baradlay.

We fail to clear continuation renderers when a renderer becomes out-of-flow 
positioned.
In some cases this has painting or layout effects.

* 
LayoutTests/fast/block/positioning/fixed-container-with-relative-parent-expected.html:

Expectations of this tests were wrong and didn't match other browsers. Simply 
compare against the non-dynamic case.

* 
LayoutTests/fast/block/positioning/out-of-flow-continuation-rebuild-expected.html:
 Added.
* LayoutTests/fast/block/positioning/out-of-flow-continuation-rebuild.html: 
Added.
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRebuildRoots):

Check if the rebuild root is inside a continuation. If so start the rebuild 
from the ancestor.
Also copy pseudo-elements.

* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

If position property changes we need to check for different rebuild root.

* Source/WebCore/style/StyleUpdate.cpp:
(WebCore::Style::Update::addElement):

Collect potential rebuild roots based on a bit in Style::Update.

* Source/WebCore/style/StyleUpdate.h:

Canonical link: https://commits.webkit.org/277912@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6ca4b0: Cherry-pick 277500@main (040cadd0e752). https://bu...

2024-04-23 Thread Antti Koivisto
  Branch: refs/heads/webkitglib/2.44
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ca4b079318ede197d62866dd6ae38e9dff7f818
  
https://github.com/WebKit/WebKit/commit/6ca4b079318ede197d62866dd6ae38e9dff7f818
  Author: Antti Koivisto 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html
M Source/WebCore/css/BasicShapeFunctions.cpp
M Source/WebCore/platform/Length.cpp
M Source/WebCore/platform/Length.h

  Log Message:
  ---
  Cherry-pick 277500@main (040cadd0e752). 
https://bugs.webkit.org/show_bug.cgi?id=270296

REGRESSION(272180@main): Crash in CSSCalcOperationNode::simplifyRecursive 
with xywh() and rect() clip-paths
https://bugs.webkit.org/show_bug.cgi?id=270296
rdar://123508905

Reviewed by Darin Adler.

Clip path serialization produces inset() values which requires constructing 
calc expressions if the original
values are not insets. The code for this didn't work correctly if the 
values were calc expressions thenselves.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:

The results are correct though FAILs because they are not maximally 
simplified.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html:

Update from the WPT repo.

* Source/WebCore/css/BasicShapeFunctions.cpp:

Use the existing convertTo100PercentMinusLength instead of trying to do 
this manually.

(WebCore::valueForBasicShape):
* Source/WebCore/platform/Length.cpp:
(WebCore::convertTo100PercentMinusLengthSum):

Add a separate dual-argument version. This is needed so we can do some 
manual simplification (see the comment).

* Source/WebCore/platform/Length.h:

Canonical link: https://commits.webkit.org/277500@main

Canonical link: https://commits.webkit.org/274313.154@webkitglib/2.44



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ab3b33: Cherry-pick 277501@main (21426dee35a1). https://bu...

2024-04-23 Thread Antti Koivisto
  Branch: refs/heads/webkitglib/2.44
  Home:   https://github.com/WebKit/WebKit
  Commit: ab3b337d35921355809a224a87983e1e147ed72d
  
https://github.com/WebKit/WebKit/commit/ab3b337d35921355809a224a87983e1e147ed72d
  Author: Antti Koivisto 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
A 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html
A LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  Cherry-pick 277501@main (21426dee35a1). 
https://bugs.webkit.org/show_bug.cgi?id=272665

REGRESSION(271848@main): "Watch later" checkbox on youtube.com mis-renders
https://bugs.webkit.org/show_bug.cgi?id=272665
rdar://125644808

Reviewed by Alan Baradlay.

Percent height out-of-flow positioned boxes taking the fast path may end up 
with miscomputed height.

* 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html:
 Added.
* 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html: 
Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

Disable the out-of-flow fast path if there are percent height boxes. The 
problem is that the fast path
does a synchronous layout for these boxes before the height of the parent 
is computed.

The synchronous layout itself is a workaround but fixing it may be more 
complicated.

Canonical link: https://commits.webkit.org/277501@main

Canonical link: https://commits.webkit.org/274313.153@webkitglib/2.44



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b5ce79: [CSS Container Queries][Style queries] Incorrect d...

2024-04-18 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b5ce791faf9e1635a2418f53d054dea2ddc8d442
  
https://github.com/WebKit/WebKit/commit/b5ce791faf9e1635a2418f53d054dea2ddc8d442
  Author: Antti Koivisto 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html
M Source/WebCore/css/query/ContainerQueryFeatures.cpp
M Source/WebCore/style/StyleBuilder.cpp

  Log Message:
  ---
  [CSS Container Queries][Style queries] Incorrect difference between implicit 
and explicit initial values for custom properties
https://bugs.webkit.org/show_bug.cgi?id=270739
rdar://124573975

Reviewed by Alan Baradlay.

Make sure guaranteed-invalid values match other guaranteed-invalid values 
whether explicitly (with `initial`) or implicitly specified.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:

Test consistently for guaranteed-invalid values.

* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::resolveCustomPropertyForContainerQueries):

Return a nullptr only in failure cases (revert/revert-layer) and an invalid 
value otherwise.

Canonical link: https://commits.webkit.org/277670@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6d4b28: REGRESSION (271848@main): Incorrect position of ::...

2024-04-16 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6d4b28213caf55232f400d42214044c2b88041e0
  
https://github.com/WebKit/WebKit/commit/6d4b28213caf55232f400d42214044c2b88041e0
  Author: Antti Koivisto 
  Date:   2024-04-16 (Tue, 16 Apr 2024)

  Changed paths:
A 
LayoutTests/fast/block/positioning/simple-out-of-flow-parent-relative-expected.html
A LayoutTests/fast/block/positioning/simple-out-of-flow-parent-relative.html
R 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html
R LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  REGRESSION (271848@main): Incorrect position of ::before { position:absolute; 
bottom:0} dynamically changing content
https://bugs.webkit.org/show_bug.cgi?id=272479
rdar://126234450

Reviewed by Alan Baradlay.

This is similar to the earlier issue 
https://bugs.webkit.org/show_bug.cgi?id=272665. Here the bottom is fixed
and top is auto making it relative to the parent height.

* 
LayoutTests/fast/block/positioning/simple-out-of-flow-parent-relative-expected.html:
 Renamed from 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html.
* LayoutTests/fast/block/positioning/simple-out-of-flow-parent-relative.html: 
Renamed from 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html.

Expand the test case.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

Cover percent top and non-auto bottom cases too.

Canonical link: https://commits.webkit.org/277550@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 21426d: REGRESSION(271848@main): "Watch later" checkbox on...

2024-04-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21426dee35a1783145f695ceed7defb1d464652e
  
https://github.com/WebKit/WebKit/commit/21426dee35a1783145f695ceed7defb1d464652e
  Author: Antti Koivisto 
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
A 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html
A LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  REGRESSION(271848@main): "Watch later" checkbox on youtube.com mis-renders
https://bugs.webkit.org/show_bug.cgi?id=272665
rdar://125644808

Reviewed by Alan Baradlay.

Percent height out-of-flow positioned boxes taking the fast path may end up 
with miscomputed height.

* 
LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height-expected.html:
 Added.
* LayoutTests/fast/block/positioning/simple-out-of-flow-percent-height.html: 
Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

Disable the out-of-flow fast path if there are percent height boxes. The 
problem is that the fast path
does a synchronous layout for these boxes before the height of the parent is 
computed.

The synchronous layout itself is a workaround but fixing it may be more 
complicated.

Canonical link: https://commits.webkit.org/277501@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 040cad: REGRESSION(272180@main): Crash in CSSCalcOperation...

2024-04-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 040cadd0e752cb1b5b307278fbd635097c729efd
  
https://github.com/WebKit/WebKit/commit/040cadd0e752cb1b5b307278fbd635097c729efd
  Author: Antti Koivisto 
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html
M Source/WebCore/css/BasicShapeFunctions.cpp
M Source/WebCore/platform/Length.cpp
M Source/WebCore/platform/Length.h

  Log Message:
  ---
  REGRESSION(272180@main): Crash in CSSCalcOperationNode::simplifyRecursive 
with xywh() and rect() clip-paths
https://bugs.webkit.org/show_bug.cgi?id=270296
rdar://123508905

Reviewed by Darin Adler.

Clip path serialization produces inset() values which requires constructing 
calc expressions if the original
values are not insets. The code for this didn't work correctly if the values 
were calc expressions thenselves.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed-expected.txt:

The results are correct though FAILs because they are not maximally simplified.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html:

Update from the WPT repo.

* Source/WebCore/css/BasicShapeFunctions.cpp:

Use the existing convertTo100PercentMinusLength instead of trying to do this 
manually.

(WebCore::valueForBasicShape):
* Source/WebCore/platform/Length.cpp:
(WebCore::convertTo100PercentMinusLengthSum):

Add a separate dual-argument version. This is needed so we can do some manual 
simplification (see the comment).

* Source/WebCore/platform/Length.h:

Canonical link: https://commits.webkit.org/277500@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 15e9f9: Free a bit for Style::Validity value

2024-04-10 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15e9f9eebf67973430aafa6fd2a8587405bc88b5
  
https://github.com/WebKit/WebKit/commit/15e9f9eebf67973430aafa6fd2a8587405bc88b5
  Author: Antti Koivisto 
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h

  Log Message:
  ---
  Free a bit for Style::Validity value
https://bugs.webkit.org/show_bug.cgi?id=272407
rdar://126149625

Reviewed by Alan Baradlay and Ryosuke Niwa.

For future use.

* Source/WebCore/dom/Node.cpp:
(WebCore::Node::adjustStyleValidity):
* Source/WebCore/dom/Node.h:
(WebCore::Node::styleResolutionShouldRecompositeLayer const):

Move this bit to StateFlags so we can get one more bit for Style::Validity.

(WebCore::Node::setHasValidStyle):

Canonical link: https://commits.webkit.org/277294@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4313af: Infinite recursion with pagination and widow breaks

2024-04-04 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4313af94d4942baf5a2e112fcc2c3f0f0c5bf8dc
  
https://github.com/WebKit/WebKit/commit/4313af94d4942baf5a2e112fcc2c3f0f0c5bf8dc
  Author: Antti Koivisto 
  Date:   2024-04-04 (Thu, 04 Apr 2024)

  Changed paths:
A LayoutTests/fast/multicol/multicol-restart-empty-lines-crash-expected.txt
A LayoutTests/fast/multicol/multicol-restart-empty-lines-crash.html
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

  Log Message:
  ---
  Infinite recursion with pagination and widow breaks
https://bugs.webkit.org/show_bug.cgi?id=272147
rdar://125579563

Reviewed by Alan Baradlay.

We are creating completely empty lines which confuses the restart logic.

* LayoutTests/fast/multicol/multicol-restart-empty-lines-crash-expected.txt: 
Added.
* LayoutTests/fast/multicol/multicol-restart-empty-lines-crash.html: Added.
* 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::restartForPagination):

If the restart position computes to the first inline item then we will not be 
making progress and
should not restart.

* 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::adjustContentForPagination):

Canonical link: https://commits.webkit.org/277072@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b78e11: [@starting-style] Style adjuster wrongly invoked w...

2024-04-03 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b78e11bab3e30ab21cd2847a963341825126c1ee
  
https://github.com/WebKit/WebKit/commit/b78e11bab3e30ab21cd2847a963341825126c1ee
  Author: Antti Koivisto 
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-adjustment-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-adjustment.html
M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  ---
  [@starting-style] Style adjuster wrongly invoked with null element
https://bugs.webkit.org/show_bug.cgi?id=272076
rdar://125837628

Reviewed by Antoine Quint.

We may compute wrong starting style for elements that require style 
adjustments. This may have observable effects.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-adjustment-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-adjustment.html:
 Added.

 is always blockified per HTML spec. Test we don't trigger a transition 
based on before-adjustment value.

* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveStartingStyle const):

The pseudo-element logic was reversed.

Canonical link: https://commits.webkit.org/276993@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b852cc: [Legacy line layout removal] Remove layout overflo...

2024-03-27 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b852cc0c6f7395f2ebaf1e6db7509145fc54d649
  
https://github.com/WebKit/WebKit/commit/b852cc0c6f7395f2ebaf1e6db7509145fc54d649
  Author: Antti Koivisto 
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
R Source/WebCore/rendering/LegacyInlineFlowBoxInlines.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineInlineHeaders.h
R Source/WebCore/rendering/line/LineLayoutState.h

  Log Message:
  ---
  [Legacy line layout removal] Remove layout overflow and box model properties
https://bugs.webkit.org/show_bug.cgi?id=271757
rdar://125477907

Reviewed by Alan Baradlay.

These are not relevant for the remaining client, SVG text.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h:
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::scrollableOverflowTop 
const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::scrollableOverflowBottom 
const):
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::computeOverflow):
(WebCore::LegacyInlineFlowBox::setOverflowFromLogicalRects):
(WebCore::LegacyInlineFlowBox::addBoxShadowVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addBorderOutsetVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addOutlineVisualOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::addReplacedChildOverflow): Deleted.
(WebCore::LegacyInlineFlowBox::setLayoutOverflow): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
(WebCore::LegacyInlineFlowBox::marginLogicalLeft const): Deleted.
(WebCore::LegacyInlineFlowBox::marginLogicalRight const): Deleted.
(WebCore::LegacyInlineFlowBox::layoutOverflowRect const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalTopLayoutOverflow const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalBottomLayoutOverflow const): Deleted.
(WebCore::LegacyInlineFlowBox::logicalLayoutOverflowRect const): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBoxInlines.h: Removed.
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::addOverflowFromInlineChildren):
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::paddedLayoutOverflowRect const): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
(WebCore::LegacyRootInlineBox::baselineType const):
(WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const): Deleted.
(WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const): Deleted.
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::innerPaddingBoxWidth const):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleEmptyInline):
* Source/WebCore/rendering/line/LineInlineHeaders.h:
(WebCore::requiresLineBox):
(WebCore::hasInlineDirectionBordersPaddingOrMargin): Deleted.
(WebCore::alwaysRequiresLineBox): Deleted.
* Source/WebCore/rendering/line/LineLayoutState.h: Removed.

Remove as it has been reduced to nothing.

Canonical link: https://commits.webkit.org/276735@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 33209b: [Legacy line layout removal] Remove IndentTextOrNo...

2024-03-26 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33209beed12c1aa62a7a606b81bd7172275bae3e
  
https://github.com/WebKit/WebKit/commit/33209beed12c1aa62a7a606b81bd7172275bae3e
  Author: Antti Koivisto 
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlock.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderBlockInlines.h
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/line/LineBreaker.cpp
M Source/WebCore/rendering/line/LineWidth.cpp
M Source/WebCore/rendering/line/LineWidth.h

  Log Message:
  ---
  [Legacy line layout removal] Remove IndentTextOrNot enum
https://bugs.webkit.org/show_bug.cgi?id=271702
rdar://125410976

Reviewed by Alan Baradlay.

This enum is all over the place in the render tree. It is not needed anymore.

* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::lineBoxWidth const):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionOffset):
(WebCore::RenderBlock::logicalRightSelectionOffset):
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
* Source/WebCore/rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLineInFragment const):
(WebCore::RenderBlock::logicalRightOffsetForLineInFragment const):
(WebCore::RenderBlock::logicalLeftOffsetForLineInFragment const):
(WebCore::RenderBlock::availableLogicalWidthForLine const):
(WebCore::RenderBlock::logicalRightOffsetForLine const):
(WebCore::RenderBlock::logicalLeftOffsetForLine const):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
(WebCore::RenderBlockFlow::staticInlinePositionForOriginalDisplayInline):
(WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat const):
(WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat const):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::getClearDelta):
* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/RenderBlockInlines.h:
(WebCore::RenderBlock::endOffsetForLine const):
(WebCore::RenderBlock::endOffsetForLineInFragment const):
(WebCore::RenderBlock::startOffsetForLine const):
(WebCore::RenderBlock::startOffsetForLineInFragment const):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
(WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::layout):
* Source/WebCore/rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* Source/WebCore/rendering/line/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::availableWidthAtOffset):
(WebCore::LineWidth::wrapNextToShapeOutside):
(WebCore::LineWidth::fitBelowFloats):
(WebCore::requiresIndent): Deleted.
* Source/WebCore/rendering/line/LineWidth.h:
(WebCore::LineWidth::shouldIndentText const): Deleted.

Canonical link: https://commits.webkit.org/276687@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 09ad6a: [Legacy line layout removal] Remove text-align sup...

2024-03-26 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09ad6a20c559b27ada2b2e8bf859dc90930fb23f
  
https://github.com/WebKit/WebKit/commit/09ad6a20c559b27ada2b2e8bf859dc90930fb23f
  Author: Antti Koivisto 
  Date:   2024-03-26 (Tue, 26 Mar 2024)

  Changed paths:
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/line/LineInlineHeaders.h

  Log Message:
  ---
  [Legacy line layout removal] Remove text-align support
https://bugs.webkit.org/show_bug.cgi?id=271646
rdar://125353160

Reviewed by Alan Baradlay.

* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::updateLogicalWidthForLeftAlignedBlock): Deleted.
(WebCore::updateLogicalWidthForRightAlignedBlock): Deleted.
(WebCore::updateLogicalWidthForCenterAlignedBlock): Deleted.
(WebCore::LegacyLineLayout::updateLogicalWidthForAlignment): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
(WebCore::RenderBlockFlow::staticInlinePositionForOriginalDisplayInline):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine): Deleted.

Rename for clarity.
Move minimal version of the alignment code needed for static positioning here.

* Source/WebCore/rendering/RenderBlockFlow.h:
* Source/WebCore/rendering/line/LineInlineHeaders.h:
(WebCore::setStaticPositions): Deleted.

Canonical link: https://commits.webkit.org/276684@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e6adb3: [Legacy line layout removal] Remove incremental la...

2024-03-25 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e6adb32149c044cff114910e85d078c5fa8add7e
  
https://github.com/WebKit/WebKit/commit/e6adb32149c044cff114910e85d078c5fa8add7e
  Author: Antti Koivisto 
  Date:   2024-03-25 (Mon, 25 Mar 2024)

  Changed paths:
M Source/WebCore/rendering/LegacyInlineBox.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderCombineText.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderTextLineBoxes.cpp
M Source/WebCore/rendering/RenderTextLineBoxes.h
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineBreaker.cpp
M Source/WebCore/rendering/line/LineInfo.cpp
M Source/WebCore/rendering/line/LineInfo.h
M Source/WebCore/rendering/line/LineInlineHeaders.h
M Source/WebCore/rendering/line/LineLayoutState.h

  Log Message:
  ---
  [Legacy line layout removal] Remove incremental layout support
https://bugs.webkit.org/show_bug.cgi?id=271635
rdar://125343719

Reviewed by Alan Baradlay.

We only use this code for SVG now. SVG line layout is never incremental as
there is never more than one line.

* Source/WebCore/rendering/LegacyInlineBox.h:
(WebCore::LegacyInlineBox::InlineBoxBitfields::InlineBoxBitfields):
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::removeChild):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::constructBidiRunsForSegment):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::isCollapsibleSpace): Deleted.
(WebCore::findFirstTrailingSpace): Deleted.
(WebCore::LegacyLineLayout::handleTrailingSpaces): Deleted.
(WebCore::deleteLineRange): Deleted.
(WebCore::LegacyLineLayout::linkToEndLineIfNeeded): Deleted.
(WebCore::LegacyLineLayout::determineStartPosition): Deleted.
(WebCore::LegacyLineLayout::determineEndPosition): Deleted.
(WebCore::LegacyLineLayout::matchedEndLine): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::childRemoved): Deleted.
(WebCore::LegacyRootInlineBox::lineBreakBidiStatus const): Deleted.
(WebCore::LegacyRootInlineBox::setLineBreakInfo): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
(WebCore::LegacyRootInlineBox::lineBreakObj const): Deleted.
(WebCore::LegacyRootInlineBox::lineBreakPos const): Deleted.
(WebCore::LegacyRootInlineBox::setLineBreakPos): Deleted.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
* Source/WebCore/rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineTextIfNeeded):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::setTextWithOffset):
* Source/WebCore/rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::dirtyAll):
(WebCore::RenderTextLineBoxes::dirtyRange): Deleted.
* Source/WebCore/rendering/RenderTextLineBoxes.h:
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleText):
* Source/WebCore/rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* Source/WebCore/rendering/line/LineInfo.cpp:
(WebCore::LineInfo::setEmpty):
* Source/WebCore/rendering/line/LineInfo.h:
(WebCore::LineInfo::LineInfo):
(WebCore::LineInfo::isEmpty const):
(WebCore::LineInfo::previousLineBrokeCleanly const): Deleted.
(WebCore::LineInfo::floatPaginationStrut const): Deleted.
(WebCore::LineInfo::setPreviousLineBrokeCleanly): Deleted.
(WebCore::LineInfo::setFloatPaginationStrut): Deleted.
* Source/WebCore/rendering/line/LineInlineHeaders.h:
(WebCore::shouldCollapseWhiteSpace):
(WebCore::skipNonBreakingSpace):
* Source/WebCore/rendering/line/LineLayoutState.h:
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::endLineLogicalTop const): Deleted.
(WebCore::LineLayoutState::setEndLineLogicalTop): Deleted.
(WebCore::LineLayoutState::endLine const): Deleted.
(WebCore::LineLayoutState::setEndLine): Deleted.
(WebCore::LineLayoutState::adjustedLogicalLineTop const): Deleted.
(WebCore::LineLayoutState::setAdjustedLogicalLineTop): Deleted.
(WebCore::LineLayoutState::endLineMatched const): Deleted.
(WebCore::LineLayoutState::setEndLineMatched): Deleted.
(WebCore::LineLayoutState::markForFullLayout): Deleted.
(WebCore::LineLayoutState::isFullLayout const): Deleted.
(WebCore::LineLayoutState::usesRepaintBounds const): Deleted.
(WebCore

[webkit-changes] [WebKit/WebKit] 353c94: [@starting-style] Contents of popover is not rende...

2024-03-22 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 353c94ffa3f78de045388574a4cae299d124998e
  
https://github.com/WebKit/WebKit/commit/353c94ffa3f78de045388574a4cae299d124998e
  Author: Antti Koivisto 
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
A LayoutTests/fast/animation/starting-style-repeat-expected.html
A LayoutTests/fast/animation/starting-style-repeat.html
M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  ---
  [@starting-style] Contents of popover is not rendered when opened a 2nd time
https://bugs.webkit.org/show_bug.cgi?id=271307
rdar://125085007

Reviewed by Antoine Quint.

Repeatedly applying @starting-style may fail because we compute the style diff
against wrong style and may conclude that there is no change and fail to
update the subtree. First time round the renderer is marked invalid so we avoid
this problem.

* LayoutTests/fast/animation/starting-style-repeat-expected.html: Added.
* LayoutTests/fast/animation/starting-style-repeat.html: Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Take care to diff with the current style.

Canonical link: https://commits.webkit.org/276546@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e746fb: [@starting-style] Assert when inspecting @starting...

2024-03-21 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e746fbb46234fae9004489e4e05173f0b4ce9ae3
  
https://github.com/WebKit/WebKit/commit/e746fbb46234fae9004489e4e05173f0b4ce9ae3
  Author: Antti Koivisto 
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
M LayoutTests/inspector/css/getMatchedStylesForNode.html
M Source/WebCore/css/CSSGroupingRule.h
M Source/WebCore/css/CSSRule.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp

  Log Message:
  ---
  [@starting-style] Assert when inspecting @starting-style in debug build
https://bugs.webkit.org/show_bug.cgi?id=271373
rdar://125156125

Reviewed by Antoine Quint.

* LayoutTests/inspector/css/getMatchedStylesForNode.html:
* Source/WebCore/css/CSSGroupingRule.h:
(isType):

Add type test.

* Source/WebCore/css/CSSRule.h:
(WebCore::CSSRule::isGroupingRule const):
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):

Return the rule list for @starting-style rules.
Refactor to handle all grouping rules uniformly.

Canonical link: https://commits.webkit.org/276456@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6b47b2: [Legacy line layout removal] Remove annotations an...

2024-03-19 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b47b20aed64d66a0820b522bd050640d7ba2fce
  
https://github.com/WebKit/WebKit/commit/6b47b20aed64d66a0820b522bd050640d7ba2fce
  Author: Antti Koivisto 
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
M Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
M Source/WebCore/rendering/LegacyInlineTextBox.cpp
M Source/WebCore/rendering/LegacyInlineTextBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineBreaker.cpp

  Log Message:
  ---
  [Legacy line layout removal] Remove annotations and text combine
https://bugs.webkit.org/show_bug.cgi?id=271226
rdar://124999850

Reviewed by Alan Baradlay.

They are not not used anymore.

* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::adjustPosition):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const): Deleted.
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::hasTextDescendants const):
(WebCore::LegacyInlineFlowBox::logicalFrameRectIncludingLineHeight const):
(WebCore::LegacyInlineFlowBox::hasHardLinebreak const): Deleted.
(WebCore::LegacyInlineFlowBox::descendantsHaveSameLineHeightAndBaseline const): 
Deleted.
(WebCore::LegacyInlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline): 
Deleted.

Also remove descendantsHaveSameLineHeightAndBaseline bit which no one is using.

* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::createLineBoxes):
(WebCore::LegacyLineLayout::layoutLineBoxes):
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::selectionTop const):
(WebCore::LegacyRootInlineBox::selectionBottom const):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::textWidth):
(WebCore::BreakingContext::handleText):
(WebCore::iteratorIsBeyondEndOfRenderCombineText): Deleted.
* Source/WebCore/rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):

Canonical link: https://commits.webkit.org/276347@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6a88be: Remove containment and container query feature flags

2024-03-17 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6a88bee7c6a6d756ba7a1031c6aa33ad2e2b99e9
  
https://github.com/WebKit/WebKit/commit/6a88bee7c6a6d756ba7a1031c6aa33ad2e2b99e9
  Author: Antti Koivisto 
  Date:   2024-03-17 (Sun, 17 Mar 2024)

  Changed paths:
R LayoutTests/fast/css/contain-invalidate-if-disabled-expected.txt
R LayoutTests/fast/css/contain-invalidate-if-disabled.html
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Tools/DumpRenderTree/TestOptions.cpp

  Log Message:
  ---
  Remove containment and container query feature flags
https://bugs.webkit.org/show_bug.cgi?id=259771
rdar://113323967

Reviewed by Tim Nguyen.

These have been enabled by default for a while now.

* LayoutTests/fast/css/contain-invalidate-if-disabled-expected.txt: Removed.
* LayoutTests/fast/css/contain-invalidate-if-disabled.html: Removed.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeContainerRule):
* Tools/DumpRenderTree/TestOptions.cpp:
(WTR::TestOptions::defaults):

Canonical link: https://commits.webkit.org/276247@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9ac555: [Legacy line layout removal] Remove hyphenation

2024-03-16 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ac555f80a69415b0d9e2743ab50a5fda4487c0d
  
https://github.com/WebKit/WebKit/commit/9ac555f80a69415b0d9e2743ab50a5fda4487c0d
  Author: Antti Koivisto 
  Date:   2024-03-16 (Sat, 16 Mar 2024)

  Changed paths:
M Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h
M Source/WebCore/platform/text/BidiResolver.h
M Source/WebCore/rendering/BidiRun.cpp
M Source/WebCore/rendering/LegacyInlineBox.cpp
M Source/WebCore/rendering/LegacyInlineBox.h
M Source/WebCore/rendering/LegacyInlineTextBox.cpp
M Source/WebCore/rendering/LegacyInlineTextBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineBreaker.cpp
M Source/WebCore/rendering/line/LineBreaker.h

  Log Message:
  ---
  [Legacy line layout removal] Remove hyphenation
https://bugs.webkit.org/show_bug.cgi?id=271106
rdar://problem/124730805

Reviewed by Alan Baradlay.

SVG does not hyphenate, or break lines in general.

* Source/WebCore/layout/integration/inline/InlineIteratorBoxLegacyPath.h:
(WebCore::InlineIterator::BoxLegacyPath::hasHyphen const):
(WebCore::InlineIterator::BoxLegacyPath::textRun const):
* Source/WebCore/platform/text/BidiResolver.h:
* Source/WebCore/rendering/BidiRun.cpp:
(WebCore::BidiRun::BidiRun):
* Source/WebCore/rendering/LegacyInlineBox.cpp:
(WebCore::LegacyInlineBox::logicalHeight const):
(WebCore::LegacyInlineBox::adjustPosition):
* Source/WebCore/rendering/LegacyInlineBox.h:
(WebCore::LegacyInlineBox::InlineBoxBitfields::InlineBoxBitfields):
(WebCore::LegacyInlineBox::setExpansion): Deleted.
(WebCore::LegacyInlineBox::setExpansionWithoutGrowing): Deleted.
(WebCore::LegacyInlineBox::expansion const): Deleted.
(WebCore::LegacyInlineBox::setHasHyphen): Deleted.
(WebCore::LegacyInlineBox::setCanHaveLeftExpansion): Deleted.
(WebCore::LegacyInlineBox::setCanHaveRightExpansion): Deleted.
(WebCore::LegacyInlineBox::setForceRightExpansion): Deleted.
(WebCore::LegacyInlineBox::setForceLeftExpansion): Deleted.
(WebCore::LegacyInlineBox::hasHyphen const): Deleted.
(WebCore::LegacyInlineBox::canHaveLeftExpansion const): Deleted.
(WebCore::LegacyInlineBox::canHaveRightExpansion const): Deleted.
(WebCore::LegacyInlineBox::forceRightExpansion const): Deleted.
(WebCore::LegacyInlineBox::forceLeftExpansion const): Deleted.

Also remove some other unused leftovers.

* Source/WebCore/rendering/LegacyInlineTextBox.cpp:
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::createTextRun const):
(WebCore::LegacyInlineTextBox::text const):
(WebCore::LegacyInlineTextBox::expansionBehavior const): Deleted.
* Source/WebCore/rendering/LegacyInlineTextBox.h:
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::constructLine):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::isHyphenated const): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleBR): Deleted.
(WebCore::BreakingContext::handleOutOfFlowPositioned): Deleted.
(WebCore::BreakingContext::handleReplaced): Deleted.
(WebCore::measureHyphenWidth): Deleted.
(WebCore::tryHyphenating): Deleted.
* Source/WebCore/rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
(WebCore::LineBreaker::reset): Deleted.
* Source/WebCore/rendering/line/LineBreaker.h:
(WebCore::LineBreaker::LineBreaker):
(WebCore::LineBreaker::lineWasHyphenated): Deleted.

Canonical link: https://commits.webkit.org/276241@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 1a03c1: [Legacy line layout removal] Remove float and pagi...

2024-03-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1a03c1187459057ba2b479f620dc17f53ec252ab
  
https://github.com/WebKit/WebKit/commit/1a03c1187459057ba2b479f620dc17f53ec252ab
  Author: Antti Koivisto 
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h
M Source/WebCore/rendering/FloatingObjects.cpp
M Source/WebCore/rendering/FloatingObjects.h
M Source/WebCore/rendering/LegacyInlineBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderFragmentContainer.cpp
M Source/WebCore/rendering/RenderFragmentContainer.h
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderInline.h
M Source/WebCore/rendering/RenderLineBoxList.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineBreaker.cpp
M Source/WebCore/rendering/line/LineBreaker.h
M Source/WebCore/rendering/line/LineLayoutState.h

  Log Message:
  ---
  [Legacy line layout removal] Remove float and pagination support
https://bugs.webkit.org/show_bug.cgi?id=271056
rdar://problem/124691392

Reviewed by Alan Baradlay.

Neither is used or needed anymore.

* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h:
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::containingFragment const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::isFirstAfterPageBreak 
const):
* Source/WebCore/rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::remove):
(WebCore::FloatingObjects::clearLineBoxTreePointers): Deleted.
* Source/WebCore/rendering/FloatingObjects.h:
(WebCore::FloatingObjects::set const):
(WebCore::FloatingObject::originatingLine const): Deleted.
(WebCore::FloatingObject::clearOriginatingLine): Deleted.
(WebCore::FloatingObject::setOriginatingLine): Deleted.
* Source/WebCore/rendering/LegacyInlineBox.cpp:
(WebCore::LegacyInlineBox::logicalHeight const):
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::~LegacyLineLayout):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::linkToEndLineIfNeeded):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::determineStartPosition):
(WebCore::LegacyLineLayout::determineEndPosition):
(WebCore::LegacyLineLayout::matchedEndLine):
(WebCore::LegacyLineLayout::addOverflowFromInlineChildren):
(WebCore::LegacyLineLayout::appendFloatingObjectToLastLine): Deleted.
(WebCore::repaintDirtyFloats): Deleted.
(WebCore::LegacyLineLayout::restartLayoutRunsAndFloatsInRange): Deleted.
(WebCore::LegacyLineLayout::reattachCleanLineFloats): Deleted.
(WebCore::LegacyLineLayout::checkFloatInCleanLine): Deleted.
(WebCore::LegacyLineLayout::checkPaginationAndFloatsAtEndLine): Deleted.
(WebCore::LegacyLineLayout::lineWidthForPaginatedLineChanged const): Deleted.
(WebCore::LegacyLineLayout::positionNewFloatOnLine): Deleted.
(WebCore::LegacyLineLayout::updateFragmentForLine const): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::~LegacyRootInlineBox):
(WebCore::containingFragmentMap): Deleted.
(WebCore::LegacyRootInlineBox::containingFragment const): Deleted.
(WebCore::LegacyRootInlineBox::clearContainingFragment): Deleted.
(WebCore::LegacyRootInlineBox::setContainingFragment): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
(WebCore::LegacyRootInlineBox::lineBoxHeight const):
(WebCore::LegacyRootInlineBox::paginationStrut const): Deleted.
(WebCore::LegacyRootInlineBox::setPaginationStrut): Deleted.
(WebCore::LegacyRootInlineBox::isFirstAfterPageBreak const): Deleted.
(WebCore::LegacyRootInlineBox::setIsFirstAfterPageBreak): Deleted.
(WebCore::LegacyRootInlineBox::paginatedLineWidth const): Deleted.
(WebCore::LegacyRootInlineBox::setPaginatedLineWidth): Deleted.
(WebCore::LegacyRootInlineBox::isForTrailingFloats const): Deleted.
(WebCore::LegacyRootInlineBox::setIsForTrailingFloats): Deleted.
(WebCore::LegacyRootInlineBox::appendFloat): Deleted.
(WebCore::LegacyRootInlineBox::removeFloat): Deleted.
(WebCore::LegacyRootInlineBox::floatsPtr): Deleted.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination): Deleted.
* Source/WebCore/rendering

[webkit-changes] [WebKit/WebKit] ff763d: [Legacy line layout removal] Remove horizontal inl...

2024-03-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff763d9dead40a6ce11cc71d1aed464dbc0045f9
  
https://github.com/WebKit/WebKit/commit/ff763d9dead40a6ce11cc71d1aed464dbc0045f9
  Author: Antti Koivisto 
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
M Source/WebCore/rendering/LegacyInlineFlowBoxInlines.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  ---
  [Legacy line layout removal] Remove horizontal inline box positioning
https://bugs.webkit.org/show_bug.cgi?id=271036
rdar://124660457

Reviewed by Alan Baradlay.

SVG is the last user of LegacyInlineBoxes but it does its own inline layout and 
does not use this code.

* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addBorderOutsetVisualOverflow):
(WebCore::LegacyInlineFlowBox::getFlowSpacingLogicalWidth): Deleted.
(WebCore::isLastChildForRenderer): Deleted.
(WebCore::isAncestorAndWithinBlock): Deleted.
(WebCore::LegacyInlineFlowBox::determineSpacingForFlowBoxes): Deleted.
(WebCore::LegacyInlineFlowBox::placeBoxesInInlineDirection): Deleted.
(WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::marginLogicalLeft const):
(WebCore::LegacyInlineFlowBox::marginLogicalRight const):
(WebCore::LegacyInlineFlowBox::includeLogicalLeftEdge const): Deleted.
(WebCore::LegacyInlineFlowBox::includeLogicalRightEdge const): Deleted.
(WebCore::LegacyInlineFlowBox::setEdges): Deleted.
(WebCore::LegacyInlineFlowBox::beginPlacingBoxRangesInInlineDirection): Deleted.
(WebCore::LegacyInlineFlowBox::endPlacingBoxRangesInInlineDirection): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBoxInlines.h:
(WebCore::LegacyInlineFlowBox::borderLogicalLeft const):
(WebCore::LegacyInlineFlowBox::borderLogicalRight const):
(WebCore::LegacyInlineFlowBox::paddingLogicalLeft const):
(WebCore::LegacyInlineFlowBox::paddingLogicalRight const):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::constructLine):
(WebCore::LegacyLineLayout::updateLogicalWidthForAlignment):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::endsWithHTMLSpaces): Deleted.
(WebCore::reachedEndOfTextRenderer): Deleted.
(WebCore::LegacyLineLayout::textAlignmentForLine const): Deleted.
(WebCore::setLogicalWidthForTextRun): Deleted.
(WebCore::LegacyLineLayout::computeExpansionForJustifiedText): Deleted.
(WebCore::updateLogicalInlinePositions): Deleted.
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine): Deleted.
(WebCore::expansionBehaviorForInlineTextBox): Deleted.
(WebCore::applyExpansionBehavior): Deleted.
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin): Deleted.
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin): Deleted.
(WebCore::isLastInFlowRun): Deleted.
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::overrideTextAlignmentForLine const): Deleted.
(WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds const): Deleted.

Canonical link: https://commits.webkit.org/276152@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 3b42a3: Remove legacy vertical inline box positioning

2024-03-14 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3b42a329cb2a60cc5fa8681a3a70da08764761a9
  
https://github.com/WebKit/WebKit/commit/3b42a329cb2a60cc5fa8681a3a70da08764761a9
  Author: Antti Koivisto 
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderText.cpp
R Source/WebCore/rendering/VerticalPositionCache.h
M Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

  Log Message:
  ---
  Remove legacy vertical inline box positioning
https://bugs.webkit.org/show_bug.cgi?id=270984
rdar://problem/124626028

Reviewed by Alan Baradlay.

SVG is the last user of LegacyInlineBoxes but does its own inline layout and 
does not use this code.

* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const): Deleted.
(WebCore::verticalAlignApplies): Deleted.
(WebCore::LegacyInlineFlowBox::adjustMaxAscentAndDescent): Deleted.
(WebCore::LegacyInlineFlowBox::computeLogicalBoxHeights): Deleted.
(WebCore::placeChildInlineBoxesInBlockDirection): Deleted.
(WebCore::LegacyInlineFlowBox::placeBoxesInBlockDirection): Deleted.
(WebCore::LegacyInlineFlowBox::flipLinesInBlockDirection): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::removeEmptyTextBoxesAndUpdateVisualReordering):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::linkToEndLineIfNeeded):
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::alignBoxesInBlockDirection): Deleted.
(WebCore::LegacyRootInlineBox::beforeAnnotationsAdjustment const): Deleted.
(WebCore::LegacyRootInlineBox::lineSnapAdjustment const): Deleted.
(WebCore::setAscentAndDescent): Deleted.
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const): Deleted.
(WebCore::LegacyRootInlineBox::verticalPositionForBox): Deleted.
(WebCore::LegacyRootInlineBox::includeLeadingForBox const): Deleted.
(WebCore::LegacyRootInlineBox::includeFontForBox const): Deleted.
(WebCore::LegacyRootInlineBox::includeGlyphsForBox const): Deleted.
(WebCore::LegacyRootInlineBox::includeInitialLetterForBox const): Deleted.
(WebCore::LegacyRootInlineBox::includeMarginForBox const): Deleted.
(WebCore::LegacyRootInlineBox::fitsToGlyphs const): Deleted.
(WebCore::LegacyRootInlineBox::includesRootLineBoxFontOrLeading const): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
(WebCore::LegacyRootInlineBox::hasAnnotationsBefore const): Deleted.
(WebCore::LegacyRootInlineBox::hasAnnotationsAfter const): Deleted.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::positionLineBox): Deleted.
* Source/WebCore/rendering/VerticalPositionCache.h: Removed.
* Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::baselinePosition const):

Canonical link: https://commits.webkit.org/276115@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4df04a: Remove LegacyInlineElementBox

2024-03-14 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4df04aca977711ad0e43a3abc8dbac268c319555
  
https://github.com/WebKit/WebKit/commit/4df04aca977711ad0e43a3abc8dbac268c319555
  Author: Antti Koivisto 
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp
M Source/WebCore/layout/integration/inline/InlineIteratorBox.h
M Source/WebCore/rendering/LegacyInlineBox.h
R Source/WebCore/rendering/LegacyInlineElementBox.cpp
R Source/WebCore/rendering/LegacyInlineElementBox.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineTextBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/rendering/RenderFragmentedFlow.cpp
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderLineBoxList.cpp
M Source/WebCore/rendering/RenderLineBreak.cpp
M Source/WebCore/rendering/RenderLineBreak.h
M Source/WebCore/rendering/RenderListItem.cpp
M Source/WebCore/rendering/RenderListItem.h
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/RenderListMarker.h
M Source/WebCore/rendering/RenderReplaced.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilder.cpp

  Log Message:
  ---
  Remove LegacyInlineElementBox
https://bugs.webkit.org/show_bug.cgi?id=270966
rdar://124610531

Reviewed by Alan Baradlay.

LegacyInlineBoxes are now only needed for SVG rendering. LegacyInlineElementBox 
represents
replaced elements, s and list markers, none of which can exist in SVG 
inline tree.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/inline/InlineIteratorBox.cpp:
(WebCore::InlineIterator::boxFor):
* Source/WebCore/layout/integration/inline/InlineIteratorBox.h:
* Source/WebCore/rendering/LegacyInlineBox.h:
(WebCore::LegacyInlineBox::InlineBoxBitfields::InlineBoxBitfields):
(WebCore::LegacyInlineBox::behavesLikeText const): Deleted.
(WebCore::LegacyInlineBox::setBehavesLikeText): Deleted.

Also coded dealing with behavesLikeText etc that only applies to 
LegacyInlineElementBox.

(WebCore::LegacyInlineBox::isInlineElementBox const): Deleted.
* Source/WebCore/rendering/LegacyInlineElementBox.cpp: Removed.
* Source/WebCore/rendering/LegacyInlineElementBox.h: Removed.
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::addToLine):
(WebCore::LegacyInlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::LegacyInlineFlowBox::requiresIdeographicBaseline const):
(WebCore::LegacyInlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::LegacyInlineFlowBox::computeLogicalBoxHeights):
(WebCore::placeChildInlineBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::flipLinesInBlockDirection):
(WebCore::LegacyInlineFlowBox::computeOverflow):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const):
* Source/WebCore/rendering/LegacyInlineTextBox.h:
(WebCore::LegacyInlineTextBox::LegacyInlineTextBox):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::createInlineBoxForRenderer):
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::LegacyLineLayout::constructLine):
(WebCore::setLogicalWidthForTextRun):
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
(WebCore::LegacyLineLayout::layoutLineBoxes):
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
(WebCore::LegacyRootInlineBox::verticalPositionForBox):
(WebCore::LegacyRootInlineBox::includeLeadingForBox const):
(WebCore::LegacyRootInlineBox::includeFontForBox const):
(WebCore::LegacyRootInlineBox::includeGlyphsForBox const):
(WebCore::LegacyRootInlineBox::includeInitialLetterForBox const):
(WebCore::LegacyRootInlineBox::includeMarginForBox const):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::simplifiedNormalFlowLayout):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::createInlineBox): Deleted.
(WebCore::RenderBox::dirtyLineBoxes): Deleted.
(WebCore::RenderBox::positionLineBox): Deleted.
(WebCore::RenderBox::deleteLineBoxWrapper): Deleted.
* Source/WebCore/rendering/RenderBox.h:
(WebCore::RenderBox::inlineBoxWrapper const): Deleted.
(WebCore::RenderBox::setInlineBoxWrapper): Deleted.
* Source/WebCore/rendering

[webkit-changes] [WebKit/WebKit] 70fb31: Remove LegacyEllipsisBox

2024-03-13 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 70fb31eed2b668ecf8ac2bf9492d4918856ab2eb
  
https://github.com/WebKit/WebKit/commit/70fb31eed2b668ecf8ac2bf9492d4918856ab2eb
  Author: Antti Koivisto 
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h
M Source/WebCore/rendering/EllipsisBoxPainter.cpp
R Source/WebCore/rendering/LegacyEllipsisBox.cpp
R Source/WebCore/rendering/LegacyEllipsisBox.h
M Source/WebCore/rendering/LegacyInlineBox.cpp
M Source/WebCore/rendering/LegacyInlineBox.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineFlowBox.h
M Source/WebCore/rendering/LegacyInlineTextBox.cpp
M Source/WebCore/rendering/LegacyInlineTextBox.h
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/LegacyRootInlineBox.h
M Source/WebCore/rendering/RenderBlock.h
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderElement.h
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderTextLineBoxes.cpp
M Source/WebCore/rendering/svg/SVGInlineTextBox.cpp

  Log Message:
  ---
  Remove LegacyEllipsisBox
https://bugs.webkit.org/show_bug.cgi?id=270914
rdar://124538996

Reviewed by Alan Baradlay.

We now only use LegacyInlineBoxes for SVG which doesn't support ellipsis (or 
have a concept of text overflow in general).

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/layout/integration/inline/InlineIteratorLineBoxLegacyPath.h:
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::hasEllipsis const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::ellipsisVisualRectIgnoringBlockDirection
 const):
(WebCore::InlineIterator::LineBoxIteratorLegacyPath::ellipsisText const):
* Source/WebCore/rendering/EllipsisBoxPainter.cpp:
* Source/WebCore/rendering/LegacyEllipsisBox.cpp: Removed.
* Source/WebCore/rendering/LegacyEllipsisBox.h: Removed.
* Source/WebCore/rendering/LegacyInlineBox.cpp:
(WebCore::LegacyInlineBox::selectionState const):
(WebCore::LegacyInlineBox::canAccommodateEllipsis const): Deleted.
(WebCore::LegacyInlineBox::placeEllipsisBox): Deleted.
* Source/WebCore/rendering/LegacyInlineBox.h:
(WebCore::LegacyInlineBox::isInlineTextBox const):
(WebCore::LegacyInlineBox::setEndsWithBreak):
(WebCore::LegacyInlineBox::isEllipsisBox const): Deleted.
(WebCore::LegacyInlineBox::clearTruncation): Deleted.
(WebCore::LegacyInlineBox::hasEllipsisBox const): Deleted.
(WebCore::LegacyInlineBox::setHasEllipsisBox): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::LegacyInlineFlowBox::nodeAtPoint):
(WebCore::LegacyInlineFlowBox::canAccommodateEllipsis const): Deleted.
(WebCore::LegacyInlineFlowBox::placeEllipsisBox): Deleted.
(WebCore::LegacyInlineFlowBox::clearTruncation): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.h:
* Source/WebCore/rendering/LegacyInlineTextBox.cpp:
(WebCore::LegacyInlineTextBox::nodeAtPoint):
(WebCore::LegacyInlineTextBox::paint):
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::placeEllipsisBox): Deleted.
* Source/WebCore/rendering/LegacyInlineTextBox.h:
(WebCore::LegacyInlineTextBox::truncation const): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::deleteEllipsisLineBoxes): Deleted.
(WebCore::LegacyLineLayout::checkLinesForTextOverflow): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/rendering/LegacyRootInlineBox.cpp:
(WebCore::LegacyRootInlineBox::~LegacyRootInlineBox):
(WebCore::LegacyRootInlineBox::adjustPosition):
(WebCore::LegacyRootInlineBox::detachEllipsisBox): Deleted.
(WebCore::LegacyRootInlineBox::clearTruncation): Deleted.
(WebCore::LegacyRootInlineBox::lineCanAccommodateEllipsis): Deleted.
(WebCore::LegacyRootInlineBox::placeEllipsis): Deleted.
(WebCore::LegacyRootInlineBox::placeEllipsisBox): Deleted.
(WebCore::LegacyRootInlineBox::paintEllipsisBox const): Deleted.
(WebCore::LegacyRootInlineBox::paint): Deleted.
(WebCore::LegacyRootInlineBox::nodeAtPoint): Deleted.
(WebCore::LegacyRootInlineBox::ellipsisBox const): Deleted.
* Source/WebCore/rendering/LegacyRootInlineBox.h:
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::setHasMarkupTruncation): Deleted.
(WebCore::RenderBlockFlow::hasMarkupTruncation const): Deleted.
* Source/WebCore

[webkit-changes] [WebKit/WebKit] 515f00: Remove RubyElement and RubyTextElement

2024-03-13 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 515f002ff6fda37c0f6f4826bd85f919dba805ad
  
https://github.com/WebKit/WebKit/commit/515f002ff6fda37c0f6f4826bd85f919dba805ad
  Author: Antti Koivisto 
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/html/HTMLTagNames.in
R Source/WebCore/html/RubyElement.cpp
R Source/WebCore/html/RubyElement.h
R Source/WebCore/html/RubyTextElement.cpp
R Source/WebCore/html/RubyTextElement.h
M Source/WebCore/html/track/WebVTTElement.cpp
M Source/WebCore/html/track/WebVTTElement.h
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  Remove RubyElement and RubyTextElement
https://bugs.webkit.org/show_bug.cgi?id=270749
rdar://124331645

Reviewed by Tim Nguyen.

Ruby does not expose any unique interface so these HTMLElement subclasses are 
not needed.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/HTMLTagNames.in:
* Source/WebCore/html/RubyElement.cpp: Removed.
* Source/WebCore/html/RubyElement.h: Removed.
* Source/WebCore/html/RubyTextElement.cpp: Removed.
* Source/WebCore/html/RubyTextElement.h: Removed.
(WebCore::VTTCue::markFutureAndPastNodes):
* Source/WebCore/html/track/WebVTTElement.cpp:
(WebCore::WebVTTElementImpl::createEquivalentHTMLElement):

Canonical link: https://commits.webkit.org/276037@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d83537: REGRESSION (iOS 17.4, macOS 14.4, 270890@main): An...

2024-03-13 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d83537abc7e7901653c42553b3f7d71505f5dbc8
  
https://github.com/WebKit/WebKit/commit/d83537abc7e7901653c42553b3f7d71505f5dbc8
  Author: Antti Koivisto 
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
A 
LayoutTests/fast/animation/animation-with-DOM-mutation-and-display-none-expected.html
A 
LayoutTests/fast/animation/animation-with-DOM-mutation-and-display-none.html
M Source/WebCore/style/StyleTreeResolver.cpp

  Log Message:
  ---
  REGRESSION (iOS 17.4, macOS 14.4, 270890@main): Animating element with 
display: none still remain visible
https://bugs.webkit.org/show_bug.cgi?id=270697
rdar://124289418

Reviewed by Antoine Quint and Darin Adler.

The page sets the root of the overlay containing tree to display:none and 
immediately (before style recall) reinserts
it into another position in the document, causing render tree teardown. When we 
recompute the style (applying display:none)
we don't consider it a style change since there was no existing style due to 
the earlier teardown.
In this case we fail to clear lastStyleChangeEventStyle which has been set by 
an animation on the element.

Another animation triggered style recalc comes along, takes the optimized 
AnimationOnly code path and picks up
the lastStyleChangeEventStyle (which doesn't have display:none) bringing the 
element back alive.

* 
LayoutTests/fast/animation/animation-with-DOM-mutation-and-display-none-expected.html:
 Added.
* LayoutTests/fast/animation/animation-with-DOM-mutation-and-display-none.html: 
Added.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):

Fix by clearing lastStyleChangeEventStyle also when we have a style change to 
display:none without existing renderer.

Canonical link: https://commits.webkit.org/276035@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 99e7a2: Remove WebVTTRubyElement and WebVTTRubyTextElement

2024-03-13 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99e7a283e2ed8bda5d0455d2cabb581ee66cf3d9
  
https://github.com/WebKit/WebKit/commit/99e7a283e2ed8bda5d0455d2cabb581ee66cf3d9
  Author: Antti Koivisto 
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
M LayoutTests/media/track/webvtt-ruby-expected.txt
M LayoutTests/media/track/webvtt-ruby.html
M Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css
M Source/WebCore/css/SelectorCheckerTestFunctions.h
M Source/WebCore/css/html.css
M Source/WebCore/css/mediaControls.css
M Source/WebCore/dom/Node.h
M Source/WebCore/html/track/VTTCue.cpp
M Source/WebCore/html/track/WebVTTElement.cpp
M Source/WebCore/html/track/WebVTTElement.h
M Source/WebCore/html/track/WebVTTParser.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  Remove WebVTTRubyElement and WebVTTRubyTextElement
https://bugs.webkit.org/show_bug.cgi?id=270852
rdar://problem/124449628

Reviewed by Alan Baradlay.

WebVTT tree is implemented using an Element subclass, except for ruby elements. 
For those there
were special subclasses inheriting from RubyElement and RubyTextElement. These 
are no longer needed
since ruby is now CSS based. We can style WebVTT ruby elements similarly to 
other WebVTT elements.

* LayoutTests/media/track/webvtt-ruby-expected.txt:
* LayoutTests/media/track/webvtt-ruby.html:

Turns our offsetFoo functions are only available on HTMLElement. Since all 
WebVTT elements now inherit from plain Element
we can no longer use it to inspect the internal state. Use more universal 
getBoundingClientRect() instead.

* Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css:
([useragentpart="-webkit-media-text-track-display"] ruby):
([useragentpart="-webkit-media-text-track-display"] ruby > rt):
([useragentpart="-webkit-media-text-track-display"] ruby > :not(ruby)):

Add a relevant subset of ruby rules to the text-track stylesheet, similar to 
other WebVTT elements.
The rules on html.css don't match since these elements are not in HTML 
namespace.

* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
(WebCore::matchesFutureCuePseudoClass):
(WebCore::matchesPastCuePseudoClass):
* Source/WebCore/css/mediaControls.css:
([useragentpart="-webkit-media-text-track-display"] ruby):
([useragentpart="-webkit-media-text-track-display"] ruby > rt):
([useragentpart="-webkit-media-text-track-display"] ruby > :not(ruby)):
* Source/WebCore/dom/Node.h:
(WebCore::Node::isWebVTTElement const):
(WebCore::Node::isWebVTTRubyElement const): Deleted.
(WebCore::Node::isWebVTTRubyTextElement const): Deleted.
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCue::markFutureAndPastNodes):
* Source/WebCore/html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::WebVTTElement):
(WebCore::m_language):
(WebCore::WebVTTElement::create):
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
(WebCore::WebVTTElement::createEquivalentHTMLElement):
(WebCore::WebVTTElementImpl::create): Deleted.

Remove the now-unnedeed WebVTTElement/WebVTTElementImpl split.

(WebCore::WebVTTElementImpl::cloneElementWithoutAttributesAndChildren): Deleted.
(WebCore::WebVTTElementImpl::createEquivalentHTMLElement): Deleted.
* Source/WebCore/html/track/WebVTTElement.h:
(WebCore::WebVTTElementImpl::setWebVTTNodeType): Deleted.
(WebCore::WebVTTElementImpl::webVTTNodeType const): Deleted.
(WebCore::WebVTTElementImpl::isPastNode const): Deleted.
(WebCore::WebVTTElementImpl::setIsPastNode): Deleted.
(WebCore::WebVTTElementImpl::language const): Deleted.
(WebCore::WebVTTElementImpl::setLanguage): Deleted.
(WebCore::WebVTTElementImpl::voiceAttributeName): Deleted.
(WebCore::WebVTTElementImpl::langAttributeName): Deleted.
(WebCore::WebVTTElementImpl::WebVTTElementImpl): Deleted.
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::constructTreeFromToken):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingUserAgentPartRules):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::hasUnsupportedRubyDisplay):

Relax the check to allow any elements called "ruby" or "rt" to have ruby 
display type, not just the HTML ones

Canonical link: https://commits.webkit.org/276025@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 297c8c: Remove separate ruby user-agent stylesheet and set...

2024-03-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 297c8c16edae5c04e1392bd04d53fa0a4571de45
  
https://github.com/WebKit/WebKit/commit/297c8c16edae5c04e1392bd04d53fa0a4571de45
  Author: Antti Koivisto 
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/html.css
R Source/WebCore/css/ruby.css
M Source/WebCore/style/UserAgentStyle.cpp
M Source/WebCore/style/UserAgentStyle.h

  Log Message:
  ---
  Remove separate ruby user-agent stylesheet and setting
https://bugs.webkit.org/show_bug.cgi?id=270843
rdar://problem/124438539

Reviewed by Anne van Kesteren.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

The setting would just disable ruby stylesheet parsing.

=* Source/WebCore/CMakeLists.txt:
=* Source/WebCore/DerivedSources-input.xcfilelist:
=* Source/WebCore/DerivedSources.make:
=* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/html.css:
(ruby):
(ruby, rt):
(ruby > rt):
(ruby > :not(rb, rbc, ruby)):
(rt): Deleted.

Move the ruby style rules to the main UA sheet.

* Source/WebCore/css/ruby.css: Removed.
* Source/WebCore/style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
* Source/WebCore/style/UserAgentStyle.h:

Canonical link: https://commits.webkit.org/275971@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 472c2a: REGRESSION(272743@main): WebVTT default styling is...

2024-03-11 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 472c2a9abc39ccee3c44f9bbe1c2f97cc257780d
  
https://github.com/WebKit/WebKit/commit/472c2a9abc39ccee3c44f9bbe1c2f97cc257780d
  Author: Antti Koivisto 
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
A LayoutTests/media/track/captions-webvtt/inline.vtt
A LayoutTests/media/track/webvtt-inline-expected.txt
A LayoutTests/media/track/webvtt-inline.html
M Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css
M Source/WebCore/css/mediaControls.css

  Log Message:
  ---
  REGRESSION(272743@main): WebVTT default styling is broken
https://bugs.webkit.org/show_bug.cgi?id=270783
rdar://124380882

Reviewed by Anne van Kesteren.

272743@main changed the attribute name for pseudo elements.
The WebVTT styling relied on those names.

* LayoutTests/media/track/captions-webvtt/inline.vtt: Added.
* LayoutTests/media/track/webvtt-inline-expected.txt: Added.
* LayoutTests/media/track/webvtt-inline.html: Added.

Add a test. We had no coverage.

* Source/WebCore/Modules/modern-media-controls/controls/text-tracks.css:
([useragentpart="-webkit-media-text-track-display"]):
(u):
(i):
(.hidden):
([pseudo="-webkit-media-text-track-display"] b): Deleted.
([pseudo="-webkit-media-text-track-display"] u): Deleted.
([pseudo="-webkit-media-text-track-display"] i): Deleted.
([pseudo="-webkit-media-text-track-display"] .hidden): Deleted.
* Source/WebCore/css/mediaControls.css:
([useragentpart="-webkit-media-text-track-display"]):
(u):
(i):
(.hidden):

Also add missing .hidden to this legacy stylesheet.

([pseudo="-webkit-media-text-track-display"] b): Deleted.
([pseudo="-webkit-media-text-track-display"] u): Deleted.
([pseudo="-webkit-media-text-track-display"] i): Deleted.

Canonical link: https://commits.webkit.org/275918@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 18e217: Remove legacy ruby implementation

2024-03-09 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 18e217e0c1998003d85e7596be9e58bb25867328
  
https://github.com/WebKit/WebKit/commit/18e217e0c1998003d85e7596be9e58bb25867328
  Author: Antti Koivisto 
  Date:   2024-03-09 (Sat, 09 Mar 2024)

  Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/editing/Editing.cpp
M Source/WebCore/editing/TextIterator.cpp
M Source/WebCore/html/RubyElement.cpp
M Source/WebCore/html/RubyElement.h
M Source/WebCore/html/RubyTextElement.cpp
M Source/WebCore/html/track/WebVTTElement.cpp
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
M Source/WebCore/layout/integration/LayoutIntegrationCoverage.h
M Source/WebCore/platform/ios/SelectionGeometry.cpp
M Source/WebCore/platform/ios/SelectionGeometry.h
M Source/WebCore/rendering/LegacyInlineFlowBox.cpp
M Source/WebCore/rendering/LegacyInlineTextBox.cpp
M Source/WebCore/rendering/LegacyLineLayout.cpp
M Source/WebCore/rendering/LegacyLineLayout.h
M Source/WebCore/rendering/LegacyRootInlineBox.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlock.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderElementInlines.h
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebCore/rendering/RenderLineBreak.cpp
M Source/WebCore/rendering/RenderObject.cpp
M Source/WebCore/rendering/RenderObject.h
R Source/WebCore/rendering/RenderRuby.cpp
R Source/WebCore/rendering/RenderRuby.h
R Source/WebCore/rendering/RenderRubyBase.cpp
R Source/WebCore/rendering/RenderRubyBase.h
R Source/WebCore/rendering/RenderRubyRun.cpp
R Source/WebCore/rendering/RenderRubyRun.h
R Source/WebCore/rendering/RenderRubyText.cpp
R Source/WebCore/rendering/RenderRubyText.h
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderTreeAsText.cpp
M Source/WebCore/rendering/TextDecorationPainter.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/line/LineWidth.cpp
M Source/WebCore/rendering/line/LineWidth.h
M Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.h

  Log Message:
  ---
  Remove legacy ruby implementation
https://bugs.webkit.org/show_bug.cgi?id=270741
rdar://124325661

Reviewed by Alan Baradlay.

Remove dead code.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* Source/WebCore/editing/Editing.cpp:
(WebCore::isBlock):
* Source/WebCore/editing/TextIterator.cpp:
(WebCore::shouldEmitNewlinesBeforeAndAfterNode):
* Source/WebCore/html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer): Deleted.
* Source/WebCore/html/RubyElement.h:
* Source/WebCore/html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):
* Source/WebCore/html/track/WebVTTElement.cpp:
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForChild):
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.h:
* Source/WebCore/platform/ios/SelectionGeometry.cpp:
(WebCore::SelectionGeometry::SelectionGeometry):
(WebCore::operator<<):
* Source/WebCore/platform/ios/SelectionGeometry.h:
(WebCore::SelectionGeometry::isInFixedPosition const):
(WebCore::SelectionGeometry::isRubyText const): Deleted.
* Source/WebCore/rendering/LegacyInlineFlowBox.cpp:
(WebCore::placeChildInlineBoxesInBlockDirection):
(WebCore::LegacyInlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::LegacyInlineFlowBox::computeUnderAnnotationAdjustment const):
* Source/WebCore/rendering/LegacyInlineTextBox.cpp:
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::LegacyLineLayout::computeExpansionForJustifiedText):
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::setMarginsForRubyRun): Deleted.
(WebCore::LegacyLineLayout::updateRubyForJustifiedText): Deleted.
* Source/WebCore/rendering/LegacyLineLayout.h:
* Source/WebCore/ren

[webkit-changes] [WebKit/WebKit] 264120: Handle custom property applying in Style::Builder

2024-03-06 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 264120dc6a7eede1bfa2399da6db11f255b0efa9
  
https://github.com/WebKit/WebKit/commit/264120dc6a7eede1bfa2399da6db11f255b0efa9
  Author: Antti Koivisto 
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
M Source/WebCore/css/process-css-properties.py
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StyleBuilderGenerated.h
M Source/WebCore/style/StyleBuilderState.h

  Log Message:
  ---
  Handle custom property applying in Style::Builder
https://bugs.webkit.org/show_bug.cgi?id=270581
rdar://124149638

Reviewed by Alan Baradlay.

Move it outside the giant switch. This simplifies the code.

* Source/WebCore/css/process-css-properties.py:

Generate switch instead of a series of ifs for value/initial/inherit.

* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyProperty):

We no longer need to pass the registered property to the normal apply function.
Also pass the value/initial/inherit as a three-value enum rather than as 
separate bits (which were mutually exclusive).

(WebCore::Style::Builder::applyCustomPropertyValue):

Apply custom properties here.

* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyInitialCustomProperty): Deleted.
(WebCore::Style::BuilderCustom::applyInheritCustomProperty): Deleted.
(WebCore::Style::BuilderCustom::applyValueCustomProperty): Deleted.
* Source/WebCore/style/StyleBuilderGenerated.h:
* Source/WebCore/style/StyleBuilderState.h:

Canonical link: https://commits.webkit.org/275774@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e1b6c5: [CSS Container Queries][Style queries] Resolve con...

2024-03-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e1b6c5a12f892f3dee434dab3b6764a9fd7115ae
  
https://github.com/WebKit/WebKit/commit/e1b6c5a12f892f3dee434dab3b6764a9fd7115ae
  Author: Antti Koivisto 
  Date:   2024-03-05 (Tue, 05 Mar 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M Source/WebCore/css/query/ContainerQueryFeatures.cpp

  Log Message:
  ---
  [CSS Container Queries][Style queries] Resolve container units in style 
queries correctly
https://bugs.webkit.org/show_bug.cgi?id=270511
rdar://124058441

Reviewed by Antoine Quint.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:

Provide the context element so container units can be resolved.

Canonical link: https://commits.webkit.org/275689@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 65ee36: REGRESSION(IFC multicol): Satisfying `widows` can ...

2024-03-04 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 65ee365616b160ff51540fd6611625d89eda3b64
  
https://github.com/WebKit/WebKit/commit/65ee365616b160ff51540fd6611625d89eda3b64
  Author: Antti Koivisto 
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
A LayoutTests/fast/multicol/multicol-intrusive-float-orphan-expected.html
A LayoutTests/fast/multicol/multicol-intrusive-float-orphan.html
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp
M 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.h

  Log Message:
  ---
  REGRESSION(IFC multicol): Satisfying `widows` can cause a floating image to 
overlap text
https://bugs.webkit.org/show_bug.cgi?id=269818
rdar://123343009

Reviewed by Alan Baradlay.

Combination of a widow break and intruding floats requires another layout pass.
Legacy line layout did this as well using a bit different approach.

* LayoutTests/fast/multicol/multicol-intrusive-float-orphan-expected.html: 
Added.
* LayoutTests/fast/multicol/multicol-intrusive-float-orphan.html: Added.
* Source/WebCore/layout/formattingContexts/inline/invalidation/InlineDamage.h:
* 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.cpp:
(WebCore::Layout::InlineInvalidation::updateInlineDamage):

Include the vertical restart position to InlineDamage,

(WebCore::Layout::InlineInvalidation::restartForPagination):

Add a new invlaidation type for pagination relayout. It restarts from the top 
of the page to be relayouted.

* 
Source/WebCore/layout/formattingContexts/inline/invalidation/InlineInvalidation.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::layout):

Perform another layout if we have damage after pagination adjustments.

(WebCore::LayoutIntegration::LineLayout::adjustContentForPagination):

Damage the content if needed.

(WebCore::LayoutIntegration::LineLayout::adjustContent): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):

In case we need a layout restart return the restart position.
This is needed when we have a widow break.

* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.h:

Canonical link: https://commits.webkit.org/275629@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 11d5d6: Viewport unit conversion should work in empty frame

2024-03-04 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 11d5d62ba36c7db1aab5cdf2b465dc8a8890eaf9
  
https://github.com/WebKit/WebKit/commit/11d5d62ba36c7db1aab5cdf2b465dc8a8890eaf9
  Author: Antti Koivisto 
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
A LayoutTests/fast/css/viewport-unit-conversion-crash-expected.txt
A LayoutTests/fast/css/viewport-unit-conversion-crash.html
M Source/WebCore/css/CSSPrimitiveValue.cpp

  Log Message:
  ---
  Viewport unit conversion should work in empty frame
https://bugs.webkit.org/show_bug.cgi?id=270289
rdar://116715588

Reviewed by Alan Baradlay.

We hit a release assert in some cases.

* LayoutTests/fast/css/viewport-unit-conversion-crash-expected.txt: Added.
* LayoutTests/fast/css/viewport-unit-conversion-crash.html: Added.
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::convertingToLengthHasRequiredConversionData const):

An empty viewport is a valid reference for resolving viewport units. The only 
requirement here is that we have access to one.
Also test for non-fixed conversion first to make the code less confusing.

Canonical link: https://commits.webkit.org/275620@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 801286: [CSS Container Queries][Style queries] Update styl...

2024-02-28 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 801286aa3dcb9720da3f98e6d25ce5e1ab5b79bb
  
https://github.com/WebKit/WebKit/commit/801286aa3dcb9720da3f98e6d25ce5e1ab5b79bb
  Author: Antti Koivisto 
  Date:   2024-02-28 (Wed, 28 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-query-change-expected.txt
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/style/RuleSet.cpp
M Source/WebCore/style/RuleSet.h
M Source/WebCore/style/StyleScopeRuleSets.cpp
M Source/WebCore/style/StyleScopeRuleSets.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h

  Log Message:
  ---
  [CSS Container Queries][Style queries] Update style correctly for 
non-inherited custom property mutations
https://bugs.webkit.org/show_bug.cgi?id=270110
rdar://123645196

Reviewed by Alan Baradlay.

Mutating a custom property referenced in a style query needs to re-evaluate 
descendant styles or potential
style containers. This needs to happen also when the custom property is 
non-inherited.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-query-change-expected.txt:
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::customPropertyValueEqual const):

Add a helper.

* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::containerQueryRules const):
* Source/WebCore/style/RuleSet.h:
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ScopeRuleSets::collectFeatures const):
(WebCore::Style::ScopeRuleSets::customPropertyNamesInStyleContainerQueries 
const):

Collect all the property names used in style queries.

* Source/WebCore/style/StyleScopeRuleSets.h:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::computeDescendantsToResolve const):

Check if we have property dependent style queries and if so see if their value 
has changed.
If it has we need to re-resolve the descendants.

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::computeDescendantsToResolve): Deleted.
* Source/WebCore/style/StyleTreeResolver.h:

Canonical link: https://commits.webkit.org/275445@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a24a25: Back identifier tokens in custom properties with s...

2024-02-27 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a24a25b87e86c3c62d9e4ca0cc1e8f4d3939c8eb
  
https://github.com/WebKit/WebKit/commit/a24a25b87e86c3c62d9e4ca0cc1e8f4d3939c8eb
  Author: Antti Koivisto 
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
M Source/WebCore/css/CSSVariableData.cpp
M Source/WebCore/css/parser/CSSParserToken.cpp
M Source/WebCore/css/parser/CSSParserToken.h

  Log Message:
  ---
  Back identifier tokens in custom properties with string literals
https://bugs.webkit.org/show_bug.cgi?id=269986
rdar://123506269

Reviewed by Cameron McCormack.

Tokens don't own the underlying string so we construct a separate backing 
string for tokens that need it.
Identifier tokens can in mosts cases be backed by their string literals, saving 
memory and work.

* Source/WebCore/css/CSSVariableData.cpp:
(WebCore::CSSVariableData::updateBackingStringsInTokens):
(WebCore::CSSVariableData::CSSVariableData):

Point the string backing to a literal if possible.

* Source/WebCore/css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::id const):
(WebCore::CSSParserToken::functionId const):
(WebCore::CSSParserToken::identOrFunctionId const):
(WebCore::CSSParserToken::tryUseStringLiteralBacking):

Known identifier tokens can use literal backing if cases match (usually all 
lowercase).

(WebCore::CSSParserToken::copyWithUpdatedString const): Deleted.

Remove unsed function.

* Source/WebCore/css/parser/CSSParserToken.h:
(WebCore::CSSParserToken::isBackedByStringLiteral const):
(WebCore::CSSParserToken::initValueFromStringView):

* Source/WebCore/css/parser/CSSParserToken.h:

Canonical link: https://commits.webkit.org/275375@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 262c7e: Preserve whitespace when serializing custom proper...

2024-02-23 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 262c7e61cab2ef3cdeeab58d28d932aafc4cac39
  
https://github.com/WebKit/WebKit/commit/262c7e61cab2ef3cdeeab58d28d932aafc4cac39
  Author: Antti Koivisto 
  Date:   2024-02-23 (Fri, 23 Feb 2024)

  Changed paths:
M LayoutTests/css-custom-properties-api/crash.html
M LayoutTests/css-custom-properties-api/inline.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-syntax/custom-property-rule-ambiguity-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition-expected.txt
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserToken.cpp
M Source/WebCore/css/parser/CSSParserToken.h
M Source/WebCore/css/parser/CSSTokenizer.cpp

  Log Message:
  ---
  Preserve whitespace when serializing custom properties
https://bugs.webkit.org/show_bug.cgi?id=269971
rdar://123491915

Reviewed by Anne van Kesteren.

"Specified values of custom properties must be serialized exactly as specified 
by the author. Simplifications
that might occur in other properties, such as dropping comments, normalizing 
whitespace, reserializing numeric
tokens from their value, etc., must not occur."

https://drafts.csswg.org/css-variables-2/#serializing-custom-props

* LayoutTests/css-custom-properties-api/crash.html:
* LayoutTests/css-custom-properties-api/inline.html

Update the tests. Leading and trailing whitespaces should be trimmed also when 
using CSSStyleDeclaration.setProperty().
This matches other browsers.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html:

Fix a bug in this WPT. It was checking a wrong property and not testing 
anything.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-syntax/custom-property-rule-ambiguity-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cssText-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-definition-expected.txt:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseCustomPropertyValue):

Also fix trimming of leading and trailing whitespace in 
CSSStyleDeclaration.setProperty() API.

* Source/WebCore/css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::CSSParserToken):

Remember the number of whitespaces represented by a whitespace token.

(WebCore::CSSParserToken::operator== const):

Also take the space count into account in equality comparison.
This is used for custom properties only.

(WebCore::CSSParserToken::serialize const):

Preserve the spaces in custom property serialization mode.

* Source/WebCore/css/parser/CSSParserToken.h:
* Source/WebCore/css/parser/CSSTokenizer.cpp:
(WebCore::CSSTokenizer::whiteSpace):

Count the spaces.

Canonical link: https://commits.webkit.org/275236@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 11c573: Serialization and equality comparison of CSS numbe...

2024-02-22 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 11c57336e700b00fa2a46d465be30274518e0816
  
https://github.com/WebKit/WebKit/commit/11c57336e700b00fa2a46d465be30274518e0816
  Author: Antti Koivisto 
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-custom-props-expected.txt
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSPropertyRule.cpp
M Source/WebCore/css/CSSVariableData.cpp
M Source/WebCore/css/CSSVariableData.h
M Source/WebCore/css/CSSVariableReferenceValue.cpp
M Source/WebCore/css/parser/CSSParserToken.cpp
M Source/WebCore/css/parser/CSSParserToken.h
M Source/WebCore/css/parser/CSSParserTokenRange.cpp
M Source/WebCore/css/parser/CSSParserTokenRange.h

  Log Message:
  ---
  Serialization and equality comparison of CSS number tokens in custom 
properties should use the original string
https://bugs.webkit.org/show_bug.cgi?id=269910
rdar://123435602

Reviewed by Matthieu Dubet.

Custom property value "0.10" should serialize as such and not as "0.1". Also 
they shouldn't compare equal.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-color/parsing/color-valid-relative-color-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/serialize-custom-props-expected.txt:
* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::customCSSText const):
* Source/WebCore/css/CSSPropertyRule.cpp:
(WebCore::CSSPropertyRule::initialValue const):
* Source/WebCore/css/CSSVariableData.cpp:
(WebCore::CSSVariableData::serialize const):

Use the custom property serialization mode.

* Source/WebCore/css/CSSVariableData.h:
* Source/WebCore/css/CSSVariableReferenceValue.cpp:
(WebCore::CSSVariableReferenceValue::customCSSText const):
* Source/WebCore/css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::originalText const):
(WebCore::CSSParserToken::operator== const):

Use string equality for numbers. This is used for custom properties only.

(WebCore::CSSParserToken::serialize const):

Add a separate serialization mode for custom properties. It returns the 
original string for number values.
It will later also preserve whitespace.

* Source/WebCore/css/parser/CSSParserToken.h:
* Source/WebCore/css/parser/CSSParserTokenRange.cpp:
(WebCore::CSSParserTokenRange::serialize const):
* Source/WebCore/css/parser/CSSParserTokenRange.h:

Serialize the original text.

Canonical link: https://commits.webkit.org/275196@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 7839f9: [CSS Container Queries][Style queries] Allow !impo...

2024-02-21 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7839f9caaeec6540011d7470842f0966773b92a1
  
https://github.com/WebKit/WebKit/commit/7839f9caaeec6540011d7470842f0966773b92a1
  Author: Antti Koivisto 
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/css/parser/CSSParserTokenRange.cpp
M Source/WebCore/css/parser/CSSParserTokenRange.h
M Source/WebCore/css/query/GenericMediaQueryParser.cpp

  Log Message:
  ---
  [CSS Container Queries][Style queries] Allow !important
https://bugs.webkit.org/show_bug.cgi?id=269844
rdar://123374708

Reviewed by Alan Baradlay.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeTrailingImportantAndWhitespace):

Factor into a function and clean up.

(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::removeTrailingWhitespace): Deleted.
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSParserTokenRange.cpp:
(WebCore::CSSParserTokenRange::trimTrailingWhitespace):
(WebCore::CSSParserTokenRange::consumeLast):
(WebCore::CSSParserTokenRange::consumeAllExcludingTrailingWhitespace): Deleted.

Some helper improvements.

* Source/WebCore/css/parser/CSSParserTokenRange.h:
(WebCore::CSSParserTokenRange::consumeAll):
* Source/WebCore/css/query/GenericMediaQueryParser.cpp:
(WebCore::MQ::consumeCustomPropertyValue):

Consume away any !important and proceed to ignore it.

Canonical link: https://commits.webkit.org/275104@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4560c7: [@starting-style] Starting style should inherit fr...

2024-02-20 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4560c7e615dbcf3a0d3aa9193297ef30c29edcbd
  
https://github.com/WebKit/WebKit/commit/4560c7e615dbcf3a0d3aa9193297ef30c29edcbd
  Author: Antti Koivisto 
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h

  Log Message:
  ---
  [@starting-style] Starting style should inherit from parent after-change style
https://bugs.webkit.org/show_bug.cgi?id=269781
rdar://123302667

Reviewed by Antoine Quint.

"Starting style inherits from the parent’s after-change style just like 
after-change style does."

https://drafts.csswg.org/css-transitions-2/#defining-before-change-style

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt:
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveStartingStyle const):

Use lastStyleChangeEventStyle as the parent after-change style if there is one.

* Source/WebCore/style/StyleTreeResolver.h:
(WebCore::Style::TreeResolver::scope const):
(WebCore::Style::TreeResolver::parent const):

Canonical link: https://commits.webkit.org/275061@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f13b31: Remove accidentally landed WTFLogAlways

2024-02-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f13b316740d673cef7531aee1745c6daf352b179
  
https://github.com/WebKit/WebKit/commit/f13b316740d673cef7531aee1745c6daf352b179
  Author: Antti Koivisto 
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp

  Log Message:
  ---
  Remove accidentally landed WTFLogAlways
https://bugs.webkit.org/show_bug.cgi?id=269457
rdar://123005211

Unreviewed cleanup.

* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):

Canonical link: https://commits.webkit.org/274720@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 20f1c3: Don't try to deduplicate SVG presentation attribut...

2024-02-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 20f1c3fa6bbff1049237054dba3666ea8680d138
  
https://github.com/WebKit/WebKit/commit/20f1c3fa6bbff1049237054dba3666ea8680d138
  Author: Antti Koivisto 
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/WebCore/css/MutableStyleProperties.cpp
M Source/WebCore/css/MutableStyleProperties.h
M Source/WebCore/css/StyleProperties.cpp
M Source/WebCore/dom/StyledElement.cpp
M Source/WebCore/style/ElementRuleCollector.cpp

  Log Message:
  ---
  Don't try to deduplicate SVG presentation attribute style that is likely 
unique
https://bugs.webkit.org/show_bug.cgi?id=269439


Reviewed by Ryosuke Niwa.

* Source/WebCore/css/MutableStyleProperties.cpp:
(WebCore::MutableStyleProperties::immutableCopy const):
(WebCore::MutableStyleProperties::immutableDeduplicatedCopy const):
* Source/WebCore/css/MutableStyleProperties.h:
* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::immutableCopyIfNeeded const):
* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationalHintStyle):

SVG x/y attributes rarely repeat so avoid deduplication work if they are 
present.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::matchAllRules):

Mark SVG properties that are shared much between elements uncacheable to avoid 
cache bloat.

Canonical link: https://commits.webkit.org/274715@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5c5316: Cache CSSParserContext in document

2024-02-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c53168684f12f4d5f715dd9440523fe3c75c4e3
  
https://github.com/WebKit/WebKit/commit/5c53168684f12f4d5f715dd9440523fe3c75c4e3
  Author: Antti Koivisto 
  Date:   2024-02-15 (Thu, 15 Feb 2024)

  Changed paths:
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/style/StyleScope.cpp

  Log Message:
  ---
  Cache CSSParserContext in document
https://bugs.webkit.org/show_bug.cgi?id=269436
rdar://122993740

Reviewed by Ryosuke Niwa.

Repeatedly reconstructing it can be expensive as it accesses many settings 
fields.

* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::updateBaseURL):
(WebCore::Document::cssParserContext const):
(WebCore::Document::invalidateCachedCSSParserContext):
* Source/WebCore/dom/Document.h:
* Source/WebCore/style/StyleScope.cpp:
(WebCore::Style::Scope::didChangeStyleSheetEnvironment):

Invalidate when needed.

Canonical link: https://commits.webkit.org/274707@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 52ba50: [CSS Container Queries][Style queries] Enable by d...

2024-02-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 52ba501a0c9917d1284e85ad1ee93e5f3389e6e0
  
https://github.com/WebKit/WebKit/commit/52ba501a0c9917d1284e85ad1ee93e5f3389e6e0
  Author: Antti Koivisto 
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml

  Log Message:
  ---
  [CSS Container Queries][Style queries] Enable by default
https://bugs.webkit.org/show_bug.cgi?id=269193
rdar://122800215

Reviewed by Tim Nguyen.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

Flip the switch.

Canonical link: https://commits.webkit.org/274481@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9c97e5: [CSS Container Queries][Style queries] Resolve cus...

2024-02-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9c97e55d92afcdf5c161edf21a59efe47a86d10c
  
https://github.com/WebKit/WebKit/commit/9c97e55d92afcdf5c161edf21a59efe47a86d10c
  Author: Antti Koivisto 
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M Source/WebCore/css/query/ContainerQueryFeatures.cpp
M Source/WebCore/css/query/GenericMediaQueryParser.cpp
M Source/WebCore/style/ContainerQueryEvaluator.cpp
M Source/WebCore/style/StyleBuilder.cpp
M Source/WebCore/style/StyleBuilder.h

  Log Message:
  ---
  [CSS Container Queries][Style queries] Resolve custom properties in style 
queries if needed
https://bugs.webkit.org/show_bug.cgi?id=269189
rdar://122793669

Reviewed by Alan Baradlay.

Handle style(--foo:var(bar)), style(--foo:inherit) and registered custom 
properties.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:

Resolve custom property values in style queries against the current style and 
registered property enviroment using Style::Builder.

* Source/WebCore/css/query/GenericMediaQueryParser.cpp:

Parse the custom property value in query using the path that returns unresolved 
and css-wide keyword values if needed.

(WebCore::MQ::consumeCustomPropertyValue):
* Source/WebCore/style/ContainerQueryEvaluator.cpp:

Pass also the parent style so 'inherit' can be resolved correctly.

(WebCore::Style::ContainerQueryEvaluator::featureEvaluationContextForQuery 
const):
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::resolveCustomPropertyForContainerQueries):

Expose a helper for this case.

* Source/WebCore/style/StyleBuilder.h:

Canonical link: https://commits.webkit.org/274471@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2a76b5: [CSS Container Queries][Style queries] Basic evalu...

2024-02-09 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a76b5d5da5c7bdd0458253953c8e88e7f4a42f5
  
https://github.com/WebKit/WebKit/commit/2a76b5d5da5c7bdd0458253953c8e88e7f4a42f5
  Author: Antti Koivisto 
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-query-change-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/display-contents-dynamic-style-queries-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-005-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-style-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-for-shadow-dom-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width-expected.txt
M Source/WebCore/css/parser/CSSParserTokenRange.cpp
M Source/WebCore/css/parser/CSSParserTokenRange.h
M Source/WebCore/css/query/ContainerQuery.h
M Source/WebCore/css/query/ContainerQueryFeatures.cpp
M Source/WebCore/css/query/GenericMediaQueryParser.cpp
M Source/WebCore/style/ContainerQueryEvaluator.cpp
M Source/WebCore/style/ContainerQueryEvaluator.h
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/SelectorMatchingState.h
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
M Source/WebCore/style/StyleUpdate.cpp
M Source/WebCore/style/StyleUpdate.h

  Log Message:
  ---
  [CSS Container Queries][Style queries] Basic evaluation support
https://bugs.webkit.org/show_bug.cgi?id=269061
rdar://122623247

Reviewed by Alan Baradlay.

Evaluate @container style(--property:foo) queries.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-query-change-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/display-contents-dynamic-style-queries-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-005-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-style-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-for-shadow-dom-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width-expected.txt:
* Source/WebCore/css/parser/CSSParserTokenRange.cpp:
(WebCore::CSSParserTokenRange::consumeAllExcludingTrailingWhitespace):

Add a helper.

* Source/WebCore/css/parser/CSSParserTokenRange.h:
* Source/WebCore/css/query/ContainerQuery.h:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:

Evaluate the query by looking up and comparing the property value.

* Source/WebCore/css/query/GenericMediaQueryParser.cpp:
(WebCore::MQ::consumeCustomPropertyValue):

Don't include trailing whitespace to custom property value.

(WebCore::MQ::FeatureParser::consumeBooleanOrPlainFeature):
* Source/WebCore/style/ContainerQueryEvaluator.h:

Pass the currently resolved style via ContainerQueryEvaluationState.

* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::ContainerQueryEvaluator):
(WebCore::Style::styleForContainer):
(WebCore::Style::ContainerQueryEvaluator::featureEvaluationContextForQuery 
const):

Look up the currently resolved

[webkit-changes] [WebKit/WebKit] bbc81c: [CSS Container Queries][Style queries] Initial par...

2024-02-08 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bbc81c098ea4d0410dc5c3ee59aeb254324b00a6
  
https://github.com/WebKit/WebKit/commit/bbc81c098ea4d0410dc5c3ee59aeb254324b00a6
  Author: Antti Koivisto 
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/css/MediaQueryParserContext.cpp
M Source/WebCore/css/MediaQueryParserContext.h
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/css/query/ContainerQueryFeatures.cpp
M Source/WebCore/css/query/ContainerQueryFeatures.h
M Source/WebCore/css/query/ContainerQueryParser.cpp
M Source/WebCore/css/query/ContainerQueryParser.h
M Source/WebCore/css/query/GenericMediaQueryParser.cpp
M Source/WebCore/css/query/GenericMediaQueryParser.h
M Source/WebCore/css/query/GenericMediaQuerySerialization.cpp
M Source/WebCore/css/query/GenericMediaQueryTypes.h
M Source/WebCore/css/query/MediaQueryParser.cpp
M Source/WebCore/css/query/MediaQueryParser.h
M Source/WebCore/style/ContainerQueryEvaluator.cpp

  Log Message:
  ---
  [CSS Container Queries][Style queries] Initial parsing support
https://bugs.webkit.org/show_bug.cgi?id=268992
rdar://122550262

Reviewed by Alan Baradlay.

Parse @container style(--custom-property:foo)

https://drafts.csswg.org/css-contain-3/#container-style-query

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

Feature flag, off by default.

* Source/WebCore/css/MediaQueryParserContext.cpp:
(WebCore::MediaQueryParserContext::MediaQueryParserContext):
* Source/WebCore/css/MediaQueryParserContext.h:
* Source/WebCore/css/parser/CSSParserContext.cpp:
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/query/ContainerQueryFeatures.cpp:
(WebCore::CQ::Features::StyleFeatureSchema::StyleFeatureSchema):

Add a feature schema for custom property style queries. Evaluation is not yet 
implemented.

(WebCore::CQ::Features::style):
* Source/WebCore/css/query/ContainerQueryFeatures.h:
* Source/WebCore/css/query/ContainerQueryParser.cpp:
(WebCore::CQ::ContainerQueryParser::isValidFunctionId):

Allow style() functions in container queries.

(WebCore::CQ::ContainerQueryParser::schemaForFeatureName):
* Source/WebCore/css/query/ContainerQueryParser.h:
* Source/WebCore/css/query/GenericMediaQueryParser.cpp:
(WebCore::MQ::consumeFeatureName):
(WebCore::MQ::FeatureParser::consumeBooleanOrPlainFeature):

Consume custom properties as feature names and values.

(WebCore::MQ::FeatureParser::validateFeatureAgainstSchema):

Validate custom property value type.

* Source/WebCore/css/query/GenericMediaQueryParser.h:
(WebCore::MQ::GenericMediaQueryParser::consumeCondition):
(WebCore::MQ::GenericMediaQueryParser::isValidFunctionId):
(WebCore::MQ::GenericMediaQueryParser::consumeCondition):
(WebCore::MQ::GenericMediaQueryParser::consumeQueryInParens):

Add support for function-like productions (`style()`) in the generic query 
grammar.

(WebCore::MQ::GenericMediaQueryParser::consumeAndValidateFeature):
(WebCore::MQ::GenericMediaQueryParser::validateFeature):
(WebCore::MQ::GenericMediaQueryParser::schemaForFeatureName):
* Source/WebCore/css/query/GenericMediaQuerySerialization.cpp:
(WebCore::MQ::serialize):
* Source/WebCore/css/query/GenericMediaQueryTypes.h:
* Source/WebCore/css/query/MediaQueryParser.cpp:
(WebCore::MQ::MediaQueryParser::schemaForFeatureName):
* Source/WebCore/css/query/MediaQueryParser.h:
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::selectContainer):

Canonical link: https://commits.webkit.org/274315@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b4b81d: Make container and media query parsers static

2024-02-06 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4b81de18ca795f39d87bad1b328a7a9a64371c7
  
https://github.com/WebKit/WebKit/commit/b4b81de18ca795f39d87bad1b328a7a9a64371c7
  Author: Antti Koivisto 
  Date:   2024-02-06 (Tue, 06 Feb 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
R Source/WebCore/css/ContainerQuery.cpp
R Source/WebCore/css/ContainerQuery.h
R Source/WebCore/css/ContainerQueryParser.cpp
R Source/WebCore/css/ContainerQueryParser.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
A Source/WebCore/css/query/ContainerQuery.cpp
A Source/WebCore/css/query/ContainerQuery.h
A Source/WebCore/css/query/ContainerQueryParser.cpp
A Source/WebCore/css/query/ContainerQueryParser.h
M Source/WebCore/css/query/GenericMediaQueryParser.cpp
M Source/WebCore/css/query/GenericMediaQueryParser.h
M Source/WebCore/css/query/MediaQueryParser.cpp
M Source/WebCore/css/query/MediaQueryParser.h

  Log Message:
  ---
  Make container and media query parsers static
https://bugs.webkit.org/show_bug.cgi?id=268822
rdar://122384606

Reviewed by Alan Baradlay.

Simplify the code by avoiding unnecessary instantiation of the generic query 
parser.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeContainerRule):
* Source/WebCore/css/query/ContainerQuery.cpp: Renamed from 
Source/WebCore/css/ContainerQuery.cpp.
* Source/WebCore/css/query/ContainerQuery.h: Renamed from 
Source/WebCore/css/ContainerQuery.h.

Also move this to css/query directory.

* Source/WebCore/css/query/ContainerQueryParser.cpp: Renamed from 
Source/WebCore/css/ContainerQueryParser.cpp.
(WebCore::CQ::ContainerQueryParser::consumeContainerQuery):
* Source/WebCore/css/query/ContainerQueryParser.h: Renamed from 
Source/WebCore/css/ContainerQueryParser.h.

Also move ContainerQueryParser to css/query directory.
Also move ContainerQueryParser to CQ namespace.

* Source/WebCore/css/query/GenericMediaQueryParser.cpp:
(WebCore::MQ::FeatureParser::consumeFeature):
(WebCore::MQ::FeatureParser::consumeBooleanOrPlainFeature):
(WebCore::MQ::FeatureParser::consumeRangeFeature):
(WebCore::MQ::FeatureParser::consumeValue):
(WebCore::MQ::FeatureParser::validateFeatureAgainstSchema):
(WebCore::MQ::GenericMediaQueryParserBase::consumeFeature): Deleted.
(WebCore::MQ::GenericMediaQueryParserBase::consumeBooleanOrPlainFeature): 
Deleted.
(WebCore::MQ::GenericMediaQueryParserBase::consumeRangeFeature): Deleted.
(WebCore::MQ::GenericMediaQueryParserBase::consumeValue): Deleted.
(WebCore::MQ::GenericMediaQueryParserBase::validateFeatureAgainstSchema): 
Deleted.
* Source/WebCore/css/query/GenericMediaQueryParser.h:
(WebCore::MQ::GenericMediaQueryParser::consumeCondition):
(WebCore::MQ::GenericMediaQueryParser::consumeQueryInParens):
(WebCore::MQ::GenericMediaQueryParser::consumeAndValidateFeature):
(WebCore::MQ::GenericMediaQueryParser::validateFeature):
(WebCore::MQ::GenericMediaQueryParser::schemaForFeatureName):
(WebCore::MQ::GenericMediaQueryParserBase::GenericMediaQueryParserBase): 
Deleted.
(WebCore::MQ::GenericMediaQueryParser::GenericMediaQueryParser): Deleted.
(WebCore::MQ::GenericMediaQueryParser::concreteParser): Deleted.
(WebCore::MQ::GenericMediaQueryParser::consumeFeature): Deleted.
(WebCore::MQ::GenericMediaQueryParser::schemaForFeatureName 
const): Deleted.
* Source/WebCore/css/query/MediaQueryParser.cpp:
(WebCore::MQ::MediaQueryParser::parse):
(WebCore::MQ::MediaQueryParser::parseCondition):
(WebCore::MQ::MediaQueryParser::consumeMediaQueryList):
(WebCore::MQ::MediaQueryParser::consumeMediaQuery):
(WebCore::MQ::MediaQueryParser::schemaForFeatureName):
(WebCore::MQ::MediaQueryParser::MediaQueryParser): Deleted.
(WebCore::MQ::MediaQueryParser::schemaForFeatureName const): Deleted.
* Source/WebCore/css/query/MediaQueryParser.h:

Canonical link: https://commits.webkit.org/274145@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 39f36d: [CSS Container Queries] Queries with unknown featu...

2024-02-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39f36da26b7671d55bc256f852cc652255d1328b
  
https://github.com/WebKit/WebKit/commit/39f36da26b7671d55bc256f852cc652255d1328b
  Author: Antti Koivisto 
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-selection-unknown-features-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt
M Source/WebCore/css/ContainerQuery.h
M Source/WebCore/css/ContainerQueryParser.cpp
M Source/WebCore/css/ContainerQueryParser.h
M Source/WebCore/css/query/GenericMediaQueryTypes.h
M Source/WebCore/style/ContainerQueryEvaluator.cpp

  Log Message:
  ---
  [CSS Container Queries] Queries with unknown features should not select a 
container
https://bugs.webkit.org/show_bug.cgi?id=268741
rdar://122307175

Reviewed by Alan Baradlay.

https://github.com/w3c/csswg-drafts/issues/7551 changed the behavior for 
unknown features:

"If the  contains unknown or unsupported container features, 
no query container will be selected."

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-selection-unknown-features-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt:
* Source/WebCore/css/ContainerQuery.h:
* Source/WebCore/css/ContainerQueryParser.cpp:
(WebCore::ContainerQueryParser::consumeContainerQuery):

Traverse the features and see if we have anything unknown along with collecting 
the axis requirements.

(WebCore::ContainerQueryParser::consumeFeature): Deleted.

Traverse after consuming instead.

* Source/WebCore/css/ContainerQueryParser.h:
(WebCore::ContainerQueryParser::ContainerQueryParser):
* Source/WebCore/css/query/GenericMediaQueryTypes.h:
(WebCore::MQ::traverseFeatures):

Also traverse GeneralEnclosed which is what unknown features turn into.

* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::featureEvaluationContextForQuery 
const):

Bail out for unknown features.

Canonical link: https://commits.webkit.org/274098@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 17588e: web-platform-tests/css/css-contain/container-queri...

2024-02-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 17588eadaae5e7177116b3f0aa0fdeb352970792
  
https://github.com/WebKit/WebKit/commit/17588eadaae5e7177116b3f0aa0fdeb352970792
  Author: Antti Koivisto 
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
M LayoutTests/TestExpectations

  Log Message:
  ---
  web-platform-tests/css/css-contain/container-queries/pseudo-elements-009.html 
is flaky
https://bugs.webkit.org/show_bug.cgi?id=268740

Unreviewed test gardening.

* LayoutTests/TestExpectations:

This newly added ::selection and ::highlight test appears to be flaky.

Canonical link: https://commits.webkit.org/274096@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 99ca4b: [CSS Container Queries] Re-import WPT tests

2024-02-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99ca4b74d779a3ffe365d42db18fed1c58e6c91d
  
https://github.com/WebKit/WebKit/commit/99ca4b74d779a3ffe365d42db18fed1c58e6c91d
  Author: Antti Koivisto 
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/resources/resource-files.json
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/WEB_FEATURES.yml
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/auto-scrollbars-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/auto-scrollbars.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue-expected.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue-ref.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-selection-unknown-features-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-selection-unknown-features.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-bug-1505250-crash.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-custom-highlight-crash.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/remove-dom-child-change-style.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/w3c-import.log
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-008-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-008.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-009-expected.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-009-ref.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-009.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-010-expected.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-010-ref.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-010.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-011-expected.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-011.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-012-expected.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-012.html
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-013-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-013.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-style-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-style.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation.html
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/w3c-import.log

  Log Message:
  ---
  [CSS Container Queries] Re-import WPT tests
https://bugs.webkit.org/show_bug.cgi?id=268735
rdar://122302681

Reviewed by Kimmo Kinnunen.

Upstream commit: 
https://github.com/web-platform-tests/wpt/commit/85f9a174f63d2ff81f7b4f6070a8a2f491e218db

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/WEB_FEATURES.yml:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/auto-scrollbars-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/auto-scrollbars.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue-expected.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue-ref.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-for-cue.html:
* 
LayoutTests

[webkit-changes] [WebKit/WebKit] 826792: REGRESSION (267163@main): Name for ::slotted pseud...

2024-02-03 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 82679256a4152facc36c85a38532d7196646d886
  
https://github.com/WebKit/WebKit/commit/82679256a4152facc36c85a38532d7196646d886
  Author: Antti Koivisto 
  Date:   2024-02-03 (Sat, 03 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped.html
M Source/WebCore/style/ContainerQueryEvaluator.cpp

  Log Message:
  ---
  REGRESSION (267163@main): Name for ::slotted pseudo element inside container 
query resolved against wrong scope
https://bugs.webkit.org/show_bug.cgi?id=268683
rdar://14135

Reviewed by Alan Baradlay.

The name in

@container name (width) { ::slotted(*) { } }

is resolved against wrong scope when matching ::slotted.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped.html:
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::selectContainer):

Use the host of the originating element () for :host scope resolution 
when matching ::slotted() rules.

Canonical link: https://commits.webkit.org/274050@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 14e104: REGRESSION (Safari 17): Named at-rule container sk...

2024-02-02 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 14e1048a543f74f0bad414db694db43a7116c644
  
https://github.com/WebKit/WebKit/commit/14e1048a543f74f0bad414db694db43a7116c644
  Author: Antti Koivisto 
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped.html
M Source/WebCore/style/ContainerQueryEvaluator.cpp

  Log Message:
  ---
  REGRESSION (Safari 17): Named at-rule container skipped when container named 
in a :host selector
https://bugs.webkit.org/show_bug.cgi?id=267046
rdar://120428386

Reviewed by Alan Baradlay.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-name-tree-scoped.html:
* Source/WebCore/style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::selectContainer):

A container query should be allowed to match a host element with container name 
that defined by :host rule in the same shadow tree as the query.

Canonical link: https://commits.webkit.org/273987@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d96647: children should have white-space:nowrap

2024-01-31 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d96647d9709657c02a36a2334bd8c30f6149e646
  
https://github.com/WebKit/WebKit/commit/d96647d9709657c02a36a2334bd8c30f6149e646
  Author: Antti Koivisto 
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
A LayoutTests/fast/ruby/implicit-base-child-nowrap-expected.html
A LayoutTests/fast/ruby/implicit-base-child-nowrap.html
M Source/WebCore/css/ruby.css

  Log Message:
  ---
   children should have white-space:nowrap
https://bugs.webkit.org/show_bug.cgi?id=268475
rdar://121202426

Reviewed by Alan Baradlay.

We may end up wrapping inside anonymous ruby base because while the base
has 'white-space:nowrap' the content doesn't necessarily have it.

* LayoutTests/fast/ruby/implicit-base-child-nowrap-expected.html: Added.
* LayoutTests/fast/ruby/implicit-base-child-nowrap.html: Added.
* Source/WebCore/css/ruby.css:
(ruby > rt):
(ruby > :not(rb, rbc)):

Set nowrap for any direct ruby children (except for unsupported ruby elements 
to avoid behavior changes for them).

Canonical link: https://commits.webkit.org/273852@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 154460: [@starting-style] Enable by default

2024-01-30 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1544606a8541c44e64d73ae4693c90da45ca6402
  
https://github.com/WebKit/WebKit/commit/1544606a8541c44e64d73ae4693c90da45ca6402
  Author: Antti Koivisto 
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml

  Log Message:
  ---
  [@starting-style] Enable by default
https://bugs.webkit.org/show_bug.cgi?id=268369
rdar://121918611

Reviewed by Antoine Quint.

Flip the switch.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

Canonical link: https://commits.webkit.org/273740@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b28ede: [@starting-style] Use starting style as before-cha...

2024-01-30 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b28edead7c0c1615e7f7f934c475245e61742fe7
  
https://github.com/WebKit/WebKit/commit/b28edead7c0c1615e7f7f934c475245e61742fe7
  Author: Antti Koivisto 
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-starting-style-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-basic-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-pseudo-elements-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-size-container-expected.txt
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/MatchResult.h
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
M Source/WebCore/style/Styleable.cpp

  Log Message:
  ---
  [@starting-style] Use starting style as before-change style for animations
https://bugs.webkit.org/show_bug.cgi?id=268285
rdar://121844935

Reviewed by Darin Adler and Matthieu Dubet.

Compute the starting style if needed and use it.

https://drafts.csswg.org/css-transitions-2/#at-ruledef-starting-style

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-starting-style-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-basic-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-pseudo-elements-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-size-container-expected.txt:
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addMatchedProperties):
* Source/WebCore/style/MatchResult.h:

Track if MatchResult contains any starting style rules for quick testing.

* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

Try to compute a starting style if we don't have an existing before-change 
style.

(WebCore::Style::TreeResolver::resolveStartingStyle const):

Resolve the starting style by re-applying the matched properties with 
@starting-style rules enabled.

* Source/WebCore/style/StyleTreeResolver.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::cancelStyleOriginatedAnimations const):

Take care to also clear the lastStyleChangeEventStyle when canceling animations.

Canonical link: https://commits.webkit.org/273734@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] aa0c3c: [@starting-style] Add CSSOM

2024-01-29 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa0c3c8b01ffbb220b15dfb7c4ce2434acc7372a
  
https://github.com/WebKit/WebKit/commit/aa0c3c8b01ffbb220b15dfb7c4ce2434acc7372a
  Author: Antti Koivisto 
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/idlharness-2-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/interfaces/css-transitions-2.idl
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
A Source/WebCore/css/CSSStartingStyleRule.cpp
A Source/WebCore/css/CSSStartingStyleRule.h
A Source/WebCore/css/CSSStartingStyleRule.idl
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRuleImport.cpp
M Source/WebCore/inspector/InspectorStyleSheet.cpp

  Log Message:
  ---
  [@starting-style] Add CSSOM
https://bugs.webkit.org/show_bug.cgi?id=268306
rdar://problem/121862449

Reviewed by Tim Nguyen.

Add CSSStartingStyleRule interface.

https://drafts.csswg.org/css-transitions-2/#the-cssstartingstylerule-interface

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/idlharness-2-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/interfaces/css-transitions-2.idl:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/css/CSSStartingStyleRule.cpp: Added.
(WebCore::CSSStartingStyleRule::CSSStartingStyleRule):
(WebCore::CSSStartingStyleRule::cssText const):
* Source/WebCore/css/CSSStartingStyleRule.h: Added.
* Source/WebCore/css/CSSStartingStyleRule.idl: Added.
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper const):
* Source/WebCore/css/StyleRuleImport.cpp:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):

Canonical link: https://commits.webkit.org/273690@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e5df40: Factor inline stylesheet cache into a class

2024-01-24 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e5df4028963eb94d06adc84eb4ec3999de4f502e
  
https://github.com/WebKit/WebKit/commit/e5df4028963eb94d06adc84eb4ec3999de4f502e
  Author: Antti Koivisto 
  Date:   2024-01-24 (Wed, 24 Jan 2024)

  Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/CSSStyleSheet.cpp
M Source/WebCore/css/CSSStyleSheet.h
M Source/WebCore/css/StyleSheetContents.h
M Source/WebCore/dom/InlineStyleSheetOwner.cpp
M Source/WebCore/dom/InlineStyleSheetOwner.h
M Source/WebCore/page/MemoryRelease.cpp
A Source/WebCore/style/StyleSheetContentsCache.cpp
A Source/WebCore/style/StyleSheetContentsCache.h

  Log Message:
  ---
  Factor inline stylesheet cache into a class
https://bugs.webkit.org/show_bug.cgi?id=267996
rdar://problem/121514266

Reviewed by Ryosuke Niwa.

Add StyleSheetContentsCache and use it.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::CSSStyleSheet):
(WebCore::CSSStyleSheet::replaceSync):
* Source/WebCore/css/StyleSheetContents.h:
* Source/WebCore/dom/InlineStyleSheetOwner.cpp:
(WebCore::makeStyleSheetContentsCacheKey):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::inlineStyleSheetCache): Deleted.
(WebCore::makeInlineStyleSheetCacheKey): Deleted.
(WebCore::InlineStyleSheetOwner::clearCache): Deleted.
* Source/WebCore/dom/InlineStyleSheetOwner.h:
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
* Source/WebCore/style/StyleSheetContentsCache.cpp: Added.
(WebCore::Style::StyleSheetContentsCache::singleton):
(WebCore::Style::StyleSheetContentsCache::get):
(WebCore::Style::StyleSheetContentsCache::add):
(WebCore::Style::StyleSheetContentsCache::clear):
* Source/WebCore/style/StyleSheetContentsCache.h: Added.

Canonical link: https://commits.webkit.org/273437@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] bfcf9b: [@starting-style] Add parsing support

2024-01-23 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bfcf9bf5da23fd0e272fa6b63fd1f6830322a576
  
https://github.com/WebKit/WebKit/commit/bfcf9bf5da23fd0e272fa6b63fd1f6830322a576
  Author: Antti Koivisto 
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
M 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-name-defining-rules-expected.txt
R 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-transitions/starting-style-name-defining-rules-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
M Source/WebCore/css/StyleRule.cpp
M Source/WebCore/css/StyleRule.h
M Source/WebCore/css/StyleRuleType.h
M Source/WebCore/css/StyleSheetContents.cpp
M Source/WebCore/css/parser/CSSAtRuleID.cpp
M Source/WebCore/css/parser/CSSAtRuleID.h
M Source/WebCore/css/parser/CSSParserContext.cpp
M Source/WebCore/css/parser/CSSParserContext.h
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
M Source/WebCore/inspector/InspectorStyleSheet.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/MatchResult.h
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/RuleData.cpp
M Source/WebCore/style/RuleData.h
M Source/WebCore/style/RuleSet.cpp
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h

  Log Message:
  ---
  [@starting-style] Add parsing support
https://bugs.webkit.org/show_bug.cgi?id=267855
rdar://121373181

Reviewed by Matthieu Dubet.

Add support for parsing @starting-style rules.

https://drafts.csswg.org/css-transitions-2/#at-ruledef-starting-style

The styles are not actually used yet.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-name-defining-rules-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:

Add a setting. Not enabled yet.

* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::visitDerived):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleScope::styleSheetContents const):
(WebCore::StyleRuleScope::setStyleSheetContents):
(WebCore::StyleRuleStartingStyle::create):
(WebCore::StyleRuleStartingStyle::StyleRuleStartingStyle):

Add a StyleRule.

* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isGroupRule const):
(WebCore::StyleRuleBase::isStartingStyleRule const):
(isType):
* Source/WebCore/css/StyleRuleType.h:
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources const):
* Source/WebCore/css/parser/CSSAtRuleID.cpp:
(WebCore::cssAtRuleID):
* Source/WebCore/css/parser/CSSAtRuleID.h:
* Source/WebCore/css/parser/CSSParserContext.cpp:
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeStartingStyleRule):

Parse the rule. This is simple as there are no arguments to parse.

* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::transferMatchedRules):
* Source/WebCore/style/MatchResult.h:
(WebCore::Style::operator==):
(WebCore::Style::add):

Pass if a given declaration belongs to starting-style.

* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):

Skip @starting-style rules unless we are building a before-change RenderStyle.
With this patch we always skip.

* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleData.h:
(WebCore::Style::RuleData::isStartingStyle const):

Remember if the rule is part of a starting-style.

* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::addRule):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRule):

Gather child rules from @starting-style.

(WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList):
* Source/WebCore/style/RuleSetBuilder.h:

Canonical link: https://commits.webkit.org/273351@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4ff0fd: REGRESSION (268038@main): :not(:has(:not(foo))) mi...

2024-01-18 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ff0fdab94ceae40ad1582477eac1b7800a11ba3
  
https://github.com/WebKit/WebKit/commit/4ff0fdab94ceae40ad1582477eac1b7800a11ba3
  Author: Antti Koivisto 
  Date:   2024-01-18 (Thu, 18 Jan 2024)

  Changed paths:
A LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt
A LayoutTests/fast/selectors/has-scope-breaking-classification.html
M Source/WebCore/style/ChildChangeInvalidation.cpp
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl

  Log Message:
  ---
  REGRESSION (268038@main): :not(:has(:not(foo))) misclassified as scope 
breaking
https://bugs.webkit.org/show_bug.cgi?id=267628
rdar://120492012

Reviewed by Cameron McCormack.

Seen in https://tc39.es/ecma262/#sec-completion-record-specification-type

* LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt: 
Added.
* LayoutTests/fast/selectors/has-scope-breaking-classification.html: Added.
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::ChildChangeInvalidation::invalidateForChangeOutsideHasScope):
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

:not() outside :has() would still put us into CanBreakScope::Yes mode.
Fix by only setting CanBreakScope::Yes if we are actually inside :has().

* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::hasScopeBreakingHasSelectors const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

Add testing support.

Canonical link: https://commits.webkit.org/273177@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9b890f: REGRESSION (Fullscreen API): cnn.com: Videos are z...

2024-01-16 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b890f5bbf67ee100a7e5962ee58168e82fa71d1
  
https://github.com/WebKit/WebKit/commit/9b890f5bbf67ee100a7e5962ee58168e82fa71d1
  Author: Antti Koivisto 
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  REGRESSION (Fullscreen API): cnn.com: Videos are zoomed in when playing in 
full screen on iOS
https://bugs.webkit.org/show_bug.cgi?id=267543
rdar://119640248

Reviewed by Tim Nguyen.

The page uses bitmovin video player which correctly sets 'object-fit:contain' 
for the full screen
video element. However the page also has a style rule with equivalent 
specificity that sets 'object-fit:fill'.
The video player stylesheet is inserted dynamically and its position in the 
document varies, allowing
the 'fill' rule win under some circumstances.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsFullscreenObjectFitQuirk const):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):

Adjust the style 'object-fit:fill' -> 'object-fit:contain'

Canonical link: https://commits.webkit.org/273061@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 04dd4e: Avoid traversing all custom properties in Styleabl...

2024-01-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04dd4ecfc6edde45a6517687ab7bf4ff9c66f36f
  
https://github.com/WebKit/WebKit/commit/04dd4ecfc6edde45a6517687ab7bf4ff9c66f36f
  Author: Antti Koivisto 
  Date:   2024-01-15 (Mon, 15 Jan 2024)

  Changed paths:
M Source/WebCore/css/CSSCustomPropertyValue.cpp
M Source/WebCore/css/CSSCustomPropertyValue.h
M Source/WebCore/rendering/style/StyleCustomPropertyData.cpp
M Source/WebCore/rendering/style/StyleCustomPropertyData.h
M Source/WebCore/style/Styleable.cpp

  Log Message:
  ---
  Avoid traversing all custom properties in Styleable::updateCSSTransitions 
when not needed
https://bugs.webkit.org/show_bug.cgi?id=267536
rdar://121002539

Reviewed by Antoine Quint.

* Source/WebCore/css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::isAnimatable const):

Factor into a function.

* Source/WebCore/css/CSSCustomPropertyValue.h:
* Source/WebCore/rendering/style/StyleCustomPropertyData.cpp:
(WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
(WebCore::StyleCustomPropertyData::set):

Check if the newly set property is animatable.

(WebCore::StyleCustomPropertyData::size const): Deleted.
* Source/WebCore/rendering/style/StyleCustomPropertyData.h:
(WebCore::StyleCustomPropertyData::size const):
(WebCore::StyleCustomPropertyData::mayHaveAnimatableProperties const):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSTransitions const):

Bail out if before traversing if we already know the properties are not 
animatable.

Canonical link: https://commits.webkit.org/273045@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2f6959: Remove PropertyCascade::PropertyType::VariableRefe...

2024-01-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2f6959fb1324843c1d0d16153ff806cf57d899e8
  
https://github.com/WebKit/WebKit/commit/2f6959fb1324843c1d0d16153ff806cf57d899e8
  Author: Antti Koivisto 
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/style/MatchedDeclarationsCache.cpp
M Source/WebCore/style/MatchedDeclarationsCache.h
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleResolver.cpp

  Log Message:
  ---
  Remove PropertyCascade::PropertyType::VariableReference
https://bugs.webkit.org/show_bug.cgi?id=267447
rdar://120892359

Reviewed by Ryosuke Niwa.

We have an optimization where the cascade only applies properties containing 
variable references.
This doesn't seem to be helpful in practice so remove it.

* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::inheritedCustomPropertiesEqual const): Deleted.

This was only needed for this optimization.

* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/style/MatchedDeclarationsCache.cpp:
(WebCore::Style::MatchedDeclarationsCache::computeHash):
(WebCore::Style::MatchedDeclarationsCache::find):
* Source/WebCore/style/MatchedDeclarationsCache.h:
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):

Canonical link: https://commits.webkit.org/272963@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 839528: [iFC][Ruby] frameset with display:none crashes in ...

2024-01-10 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8395281e9b922d0a61ca44f141c9374cabc6fcc6
  
https://github.com/WebKit/WebKit/commit/8395281e9b922d0a61ca44f141c9374cabc6fcc6
  Author: Antti Koivisto 
  Date:   2024-01-10 (Wed, 10 Jan 2024)

  Changed paths:
A LayoutTests/fast/ruby/ruby-frameset-display-none-crash-expected.txt
A LayoutTests/fast/ruby/ruby-frameset-display-none-crash.html
M Source/WebCore/html/HTMLFrameElement.cpp
M Source/WebCore/html/HTMLFrameSetElement.cpp
M Source/WebCore/html/HTMLFrameSetElement.h
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  [iFC][Ruby] frameset with display:none crashes in ruby
https://bugs.webkit.org/show_bug.cgi?id=267331
rdar://120496400

Reviewed by Alan Baradlay.

 generates a renderer even with 'display:none' breaking some 
assumptions.

* LayoutTests/fast/ruby/ruby-frameset-display-none-crash-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-frameset-display-none-crash.html: Added.
* Source/WebCore/html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::rendererIsNeeded):
* Source/WebCore/html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::rendererIsNeeded): Deleted.
* Source/WebCore/html/HTMLFrameSetElement.h:
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):

Adjust frameset/frame always have 'display:block', even when it is orginally 
'none'.
This matches other browsers.

Canonical link: https://commits.webkit.org/272846@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 17e8cb: [IFC][Ruby] Disable multicolumn for ruby boxes

2024-01-08 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 17e8cb5ee8ec1bf4464d78603833a4b3a388ec2e
  
https://github.com/WebKit/WebKit/commit/17e8cb5ee8ec1bf4464d78603833a4b3a388ec2e
  Author: Antti Koivisto 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
A LayoutTests/fast/ruby/ruby-multicol-crash-expected.txt
A LayoutTests/fast/ruby/ruby-multicol-crash.html
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  [IFC][Ruby] Disable multicolumn for ruby boxes
https://bugs.webkit.org/show_bug.cgi?id=267221
rdar://120496640

Reviewed by Alan Baradlay.

* LayoutTests/fast/ruby/ruby-multicol-crash-expected.txt: Added.
* LayoutTests/fast/ruby/ruby-multicol-crash.html: Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willCreateColumns const):

Disallow columns in ruby blocks.

Canonical link: https://commits.webkit.org/272759@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4992ea: Input element with inherited display:ruby hits assert

2024-01-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4992ead0c2849d41bdb4195177e35836c5a54cdd
  
https://github.com/WebKit/WebKit/commit/4992ead0c2849d41bdb4195177e35836c5a54cdd
  Author: Antti Koivisto 
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
A LayoutTests/fast/ruby/input-with-inherited-ruby-display-expected.txt
A LayoutTests/fast/ruby/input-with-inherited-ruby-display.html
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  Input element with inherited display:ruby hits assert
https://bugs.webkit.org/show_bug.cgi?id=267130
rdar://120496475

Reviewed by Alan Baradlay.

We only support ruby display types with ruby elements for now.
They can be inherited to other elements though, leading to unexpected state.

* LayoutTests/fast/ruby/input-with-inherited-ruby-display-expected.txt: Added.
* LayoutTests/fast/ruby/input-with-inherited-ruby-display.html: Added.
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::hasUnsupportedRubyDisplay):
(WebCore::Style::Adjuster::adjust const):

Adjust the style to disallow non-ruby elements from having ruby display types.

Canonical link: https://commits.webkit.org/272693@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9b67f9: REGRESSION(268038@main): poor performance with :ha...

2024-01-05 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9b67f95c4810d05d68b047eb9e84b48f7826783d
  
https://github.com/WebKit/WebKit/commit/9b67f95c4810d05d68b047eb9e84b48f7826783d
  Author: Antti Koivisto 
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h
M Source/WebCore/style/ChildChangeInvalidation.cpp
M Source/WebCore/style/ChildChangeInvalidation.h
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/style/StyleRelations.cpp
M Source/WebCore/style/StyleRelations.h

  Log Message:
  ---
  REGRESSION(268038@main): poor performance with :has(+ :not(.class)) 
pseudo-class selector
https://bugs.webkit.org/show_bug.cgi?id=267078
rdar://119819247

Reviewed by Cameron McCormack.

The selector gets misclassified as scope breaking.
Fixing the issue reveals it was hiding other invalidation bugs.

* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchHasPseudoClass const):

Add a new flag for the case where element is affected by :has() containing 
:nth-child() and similar.
The use of existing flags didn't work correctly in all situations because they 
would get wiped at
wrong time.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::resetStyleRelations):
* Source/WebCore/dom/Element.h:
(WebCore::Element::affectedByHasWithPositionalPseudoClass const):
(WebCore::Element::setAffectedByHasWithPositionalPseudoClass):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::adjustStyleValidity):
* Source/WebCore/dom/Node.h:
(WebCore::Node::hasInvalidRenderer const):
(WebCore::Node::setHasValidStyle):

Juggle the flags around to make space.

* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::ChildChangeInvalidation::invalidateForHasBeforeMutation):
(WebCore::Style::ChildChangeInvalidation::invalidateForHasAfterMutation):

Handle text node insertions and removals since they may affect :empty state 
within :has().
Test for the new :nth-child() flag instead of the old ones.

* Source/WebCore/style/ChildChangeInvalidation.h:
(WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation):
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):

Break out of the loop if the current selector is the leftmost one before 
computing
MatchElement/IsScopeBreaking. Selector :not(.class) would get computed as scope 
breaking
even though there is nothing on the left of .class. Also stop 
CanBreakScope::Yes from affecting
subsequent selectors after the one that can actually leak the scope.

* Source/WebCore/style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):
* Source/WebCore/style/StyleRelations.h:

Canonical link: https://commits.webkit.org/272678@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 270a64: Remove unused needsUpdateReplacedDimensions boolea...

2023-12-22 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 270a645a047bc8c8abd8eb5a68226c3f1837cf71
  
https://github.com/WebKit/WebKit/commit/270a645a047bc8c8abd8eb5a68226c3f1837cf71
  Author: Antti Koivisto 
  Date:   2023-12-22 (Fri, 22 Dec 2023)

  Changed paths:
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  Remove unused needsUpdateReplacedDimensions boolean from layoutModernLines
https://bugs.webkit.org/show_bug.cgi?id=266811
rdar://120041834

Reviewed by Alan Baradlay.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

Canonical link: https://commits.webkit.org/272450@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6c89c1: REGRESSION(267786@main): Crash under RenderBlock::...

2023-12-20 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6c89c10cbe633ca89d115925817694c1742e8ece
  
https://github.com/WebKit/WebKit/commit/6c89c10cbe633ca89d115925817694c1742e8ece
  Author: Antti Koivisto 
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
A LayoutTests/fast/css/container-style-editability-crash-expected.txt
A LayoutTests/fast/css/container-style-editability-crash.html
M 
LayoutTests/platform/ios-wk2/fast/dom/focus-dialog-blur-input-type-change-crash-expected.txt
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h

  Log Message:
  ---
  REGRESSION(267786@main): Crash under RenderBlock::isSelectionRoot() with 
query container
https://bugs.webkit.org/show_bug.cgi?id=263522
rdar://115777188

Reviewed by Alan Baradlay.

* LayoutTests/fast/css/container-style-editability-crash-expected.txt: Added.
* LayoutTests/fast/css/container-style-editability-crash.html: Added.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::resolveComputedStyle):
(WebCore::Element::computedStyleForEditability):

Avoid triggering style resolution when computing editability.

* Source/WebCore/dom/Element.h:

Originally-landed-as: 267815.436@safari-7617-branch (699e9669a530). 
rdar://119596409
Canonical link: https://commits.webkit.org/272334@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] de47ae: WTFCrashWithSecurityImplication in WebCore::Render...

2023-12-19 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: de47ae4003e992e436df92a14ed69138601d9039
  
https://github.com/WebKit/WebKit/commit/de47ae4003e992e436df92a14ed69138601d9039
  Author: Antti Koivisto 
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/multicol/last-set-crash-expected.txt
A LayoutTests/fast/multicol/last-set-crash.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/rendering/RenderMultiColumnFlow.cpp
M Source/WebCore/rendering/RenderMultiColumnFlow.h

  Log Message:
  ---
  WTFCrashWithSecurityImplication in 
WebCore::RenderFragmentedFlow::removeLineFragmentInfo()
https://bugs.webkit.org/show_bug.cgi?id=264327
rdar://114559559

Reviewed by Alan Baradlay.

* LayoutTests/TestExpectations:

Skip test on debug due to some assertion failures.

* LayoutTests/fast/multicol/last-set-crash-expected.txt: Added.
* LayoutTests/fast/multicol/last-set-crash.html: Added.
* Source/WebCore/rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::fragmentAtBlockOffset const):

Tree mutations may have made m_lastSetWorkedOn cache invalid by moving the 
multicolumn set under a different multicolumn flow.
Check for this.

* Source/WebCore/rendering/RenderMultiColumnFlow.h:

Also make it use WeakPtr.

Originally-landed-as: 267815.546@safari-7617-branch (f524a15d0633). 
rdar://114559559
Canonical link: https://commits.webkit.org/272294@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] bcdeb1: [IFC][Ruby] Anonymous bases should have white-spac...

2023-12-19 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bcdeb1ae72eb306219987658997deb4159a9ccb9
  
https://github.com/WebKit/WebKit/commit/bcdeb1ae72eb306219987658997deb4159a9ccb9
  Author: Antti Koivisto 
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/fast/ruby/floating-ruby-text-expected.txt
M LayoutTests/fast/ruby/positioned-ruby-text-expected.txt
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.h

  Log Message:
  ---
  [IFC][Ruby] Anonymous bases should have white-space:nowrap
https://bugs.webkit.org/show_bug.cgi?id=266635
rdar://119864996

Reviewed by Alan Baradlay.

The UA stylesheet has 'white-space: nowrap' for bases 
https://www.w3.org/TR/css-ruby-1/#default-ua-ruby.
This should also be applied to anonymous bases. The behavior matches Firefox.

* LayoutTests/TestExpectations:
* LayoutTests/fast/ruby/floating-ruby-text-expected.txt:
* LayoutTests/fast/ruby/positioned-ruby-text-expected.txt:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):

Don't reset ruby style when propagating style changes to anonymous children.

* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::createAnonymousStyleForRuby):

Set 'white-space: nowrap' to anonymous base style.

(WebCore::createAnonymousRendererForRuby):

Factor into functions.

(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):
(WebCore::RenderTreeBuilder::Ruby::attachForStyleBasedRuby):
* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.h:

Canonical link: https://commits.webkit.org/272285@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4be388: Ruby style cleanups

2023-12-19 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4be388cadb468d7b951a79e5ea6940a3aec607e6
  
https://github.com/WebKit/WebKit/commit/4be388cadb468d7b951a79e5ea6940a3aec607e6
  Author: Antti Koivisto 
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
M LayoutTests/fast/ruby/ruby-block-style-not-updated-expected.txt
M Source/WebCore/html/RubyElement.cpp
M Source/WebCore/html/RubyTextElement.cpp
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  Ruby style cleanups
https://bugs.webkit.org/show_bug.cgi?id=266623
rdar://119856171

Reviewed by Tim Nguyen and Alan Baradlay.

* LayoutTests/fast/ruby/ruby-block-style-not-updated-expected.txt:
* Source/WebCore/html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer):
* Source/WebCore/html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):

Ensure we can't create legacy ruby renderers with css ruby enabled.

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::forceBidiIsolationForRuby):

Rename and include all cases to switch.

(WebCore::Style::Adjuster::adjust const):

Remove some no-op code.

(WebCore::Style::adjustUnicodeBidiForRuby): Deleted.

Canonical link: https://commits.webkit.org/272267@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ccf559: Allow all table cells in hasSimpleStaticPositionFo...

2023-12-18 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ccf559313bf6240ea8d959c4ab7664afc416dc8a
  
https://github.com/WebKit/WebKit/commit/ccf559313bf6240ea8d959c4ab7664afc416dc8a
  Author: Antti Koivisto 
  Date:   2023-12-18 (Mon, 18 Dec 2023)

  Changed paths:
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  Allow all table cells in hasSimpleStaticPositionForOutOfFlowChildren
https://bugs.webkit.org/show_bug.cgi?id=266570

Reviewed by Alan Baradlay.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::hasSimpleStaticPositionForOutOfFlowChildren):

There should be no reason not to. Table cell instrinsic padding is included in 
paddingBefore().

Canonical link: https://commits.webkit.org/272215@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4e68d9: [IFC][Ruby] Implement text-emphasis suppression

2023-12-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4e68d91bac6a6343b2add468e06264644d62f943
  
https://github.com/WebKit/WebKit/commit/4e68d91bac6a6343b2add468e06264644d62f943
  Author: Antti Koivisto 
  Date:   2023-12-15 (Fri, 15 Dec 2023)

  Changed paths:
M Source/WebCore/rendering/RenderText.cpp

  Log Message:
  ---
  [IFC][Ruby] Implement text-emphasis suppression
https://bugs.webkit.org/show_bug.cgi?id=266484
rdar://119722467

Reviewed by Alan Baradlay.

for fast/text/emphasis-avoid-ruby.html

* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::emphasisMarkExistsAndIsAbove):

Find the annotation and check if it is empty, same as the legacy code below.

Canonical link: https://commits.webkit.org/272127@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 1da279: [IFC][Ruby] Return correct accessibility roles

2023-12-15 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1da27950f8f1ec9d6cc023e460a1186a08b4e991
  
https://github.com/WebKit/WebKit/commit/1da27950f8f1ec9d6cc023e460a1186a08b4e991
  Author: Antti Koivisto 
  Date:   2023-12-15 (Fri, 15 Dec 2023)

  Changed paths:
M LayoutTests/accessibility/mac/ruby-hierarchy-roles-expected.txt
M LayoutTests/accessibility/mac/ruby-hierarchy-roles.html
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp

  Log Message:
  ---
  [IFC][Ruby] Return correct accessibility roles
https://bugs.webkit.org/show_bug.cgi?id=266468
rdar://119712254

Reviewed by Alan Baradlay.

* LayoutTests/accessibility/mac/ruby-hierarchy-roles-expected.txt:
* LayoutTests/accessibility/mac/ruby-hierarchy-roles.html:

Update the test for the new ruby hierarchy.
Blockify by setting position:absolute.

* LayoutTests/platform/mac-wk1/TestExpectations:

Disable for now in WK1 because the setting leaks accross tests.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

Return the roles.

* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):

Return the existing anonymous ruby box for a ruby-block parent if there is one.

Canonical link: https://commits.webkit.org/272111@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e44bf5: [IFC][Ruby] fix web-platform-tests/editing/run/ins...

2023-12-14 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e44bf50fe7914190924a7ed97458bbaf443cf6b9
  
https://github.com/WebKit/WebKit/commit/e44bf50fe7914190924a7ed97458bbaf443cf6b9
  Author: Antti Koivisto 
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
M Source/WebCore/editing/Editing.cpp

  Log Message:
  ---
  [IFC][Ruby] fix web-platform-tests/editing/run/inserthorizontalrule.html
https://bugs.webkit.org/show_bug.cgi?id=266397
rdar://119659338

Reviewed by Alan Baradlay.

 with display:inline-block should not have special  treatment in 
editing code.
This gets hit in this test because inlinification of  content.

* Source/WebCore/editing/Editing.cpp:
(WebCore::isRenderedAsNonInlineTableImageOrHR):

Canonical link: https://commits.webkit.org/272040@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] fd9b66: REGRESSION(268264@main): wpt /css/css-break/float-...

2023-12-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd9b66e15e45663f1b4b5407db1a0c4edc837cd9
  
https://github.com/WebKit/WebKit/commit/fd9b66e15e45663f1b4b5407db1a0c4edc837cd9
  Author: Antti Koivisto 
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp

  Log Message:
  ---
  REGRESSION(268264@main): wpt /css/css-break/float-010.html
https://bugs.webkit.org/show_bug.cgi?id=263894
rdar://117690570

Reviewed by Alan Baradlay.

* LayoutTests/TestExpectations:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):

Treat floats with break-inside:avoid unsplittable.

* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeLineAdjustmentForPagination):

Allow breaking floats that are taller than the page.

Canonical link: https://commits.webkit.org/271934@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 82e8aa: REGRESSION(268128@main): wpt /css/css-break/widows...

2023-12-12 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 82e8aacca639924ab97b4f7541c103f46307ac1f
  
https://github.com/WebKit/WebKit/commit/82e8aacca639924ab97b4f7541c103f46307ac1f
  Author: Antti Koivisto 
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp

  Log Message:
  ---
  REGRESSION(268128@main): wpt /css/css-break/widows-orphans-019.html
https://bugs.webkit.org/show_bug.cgi?id=266276
rdar://117690962

Reviewed by Alan Baradlay.

* LayoutTests/TestExpectations:
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::computeAdjustmentsForPagination):

Don't try to set a widow break if there are no lines to move to the next page.

Canonical link: https://commits.webkit.org/271932@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 390903: [IFC][Ruby] Remove rt { line-height:1 } from ruby.css

2023-12-11 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3909033f7ed2560462c6536c74ab5fa2cbecec90
  
https://github.com/WebKit/WebKit/commit/3909033f7ed2560462c6536c74ab5fa2cbecec90
  Author: Antti Koivisto 
  Date:   2023-12-11 (Mon, 11 Dec 2023)

  Changed paths:
M LayoutTests/fast/ruby/ruby-line-height-expected.txt
M LayoutTests/fast/ruby/ruby-line-height.html
M Source/WebCore/css/ruby.css

  Log Message:
  ---
  [IFC][Ruby] Remove rt { line-height:1 } from ruby.css
https://bugs.webkit.org/show_bug.cgi?id=266217
rdar://119489614

Reviewed by Alan Baradlay.

* LayoutTests/fast/ruby/ruby-line-height-expected.txt:
* LayoutTests/fast/ruby/ruby-line-height.html:
* Source/WebCore/css/ruby.css:
(ruby > rt):

This rule is from the ruby spec. For ease of feature enablement remove the rule 
for now
and use the same annotation line-height as the legacy.

Canonical link: https://commits.webkit.org/271874@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 658e8c: [iFC][Ruby] Add a mechanism to partially enable st...

2023-12-11 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 658e8c04ba57845361f43f6310a64b1e0f39e357
  
https://github.com/WebKit/WebKit/commit/658e8c04ba57845361f43f6310a64b1e0f39e357
  Author: Antti Koivisto 
  Date:   2023-12-11 (Mon, 11 Dec 2023)

  Changed paths:
M Source/WebCore/html/RubyElement.cpp
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  [iFC][Ruby] Add a mechanism to partially enable style based ruby
https://bugs.webkit.org/show_bug.cgi?id=266214
rdar://119489155

Reviewed by Alan Baradlay.

Allow incremental enabling.

* Source/WebCore/html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::disableStyleBasedRubyIfNeeded):

For now disable style based ruby for 'text-align:justify' and nested case.

(WebCore::Style::Adjuster::adjust const):

Canonical link: https://commits.webkit.org/271873@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5b298b: [IFC] Optimize out-of-flow positioned boxes in inl...

2023-12-10 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5b298bedb216083ca2c89eff8d0347fd2c2dcf03
  
https://github.com/WebKit/WebKit/commit/5b298bedb216083ca2c89eff8d0347fd2c2dcf03
  Author: Antti Koivisto 
  Date:   2023-12-10 (Sun, 10 Dec 2023)

  Changed paths:
M LayoutTests/compositing/repaint/move-backing-sharing-layer-expected.txt
M 
LayoutTests/fast/repaint/absolute-position-change-containing-block-expected.txt
M 
LayoutTests/fast/repaint/incorrect-repaint-when-container-changes-from-overflow-visible-to-hidden-expected.txt
M 
LayoutTests/platform/ios-wk2/compositing/repaint/move-backing-sharing-layer-expected.txt
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  ---
  [IFC] Optimize out-of-flow positioned boxes in inline layout
https://bugs.webkit.org/show_bug.cgi?id=266065
rdar://problem/119461223

Reviewed by Alan Baradlay.

We have nothing but out-of-flow boxes so we don't need to run the actual line 
layout.
Instead, we can just set the static positions to the point where all these 
boxes would end up.
This is a common case when using transforms to animate positioned boxes.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::shouldSwitchToLegacyOnInvalidation 
const): Deleted.

No need to switch to legacy in this case anymore.

* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
(WebCore::hasSimpleStaticPositionForOutOfFlowChildren):
(WebCore::RenderBlockFlow::layoutModernLines):

Bail out before creating LineLayout.

(WebCore::RenderBlockFlow::setStaticPositionsForSimpleOutOfFlowContent):

We only need to reset the static positions in this case.

* Source/WebCore/rendering/RenderBlockFlow.h:

Canonical link: https://commits.webkit.org/271848@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9086d7: [IFC][Ruby] Force unicode-bidi to correct value

2023-12-10 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9086d78da701a2fe50818e7b730065c680dc95cf
  
https://github.com/WebKit/WebKit/commit/9086d78da701a2fe50818e7b730065c680dc95cf
  Author: Antti Koivisto 
  Date:   2023-12-10 (Sun, 10 Dec 2023)

  Changed paths:
M Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
M Source/WebCore/style/StyleAdjuster.cpp

  Log Message:
  ---
  [IFC][Ruby] Force unicode-bidi to correct value
https://bugs.webkit.org/show_bug.cgi?id=266179
rdar://119462025

Reviewed by Alan Baradlay.

https://drafts.csswg.org/css-ruby-1/#bidi

"Bidi isolation is forced on all internal ruby boxes and the ruby container: 
the normal and embed
values of unicode-bidi compute to isolate, and bidi-override computes to 
isolate-override."

* Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForStyleBasedRubyChild):

Set unicode-bidi::isolate for the anonymous base.

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::isRubyContainerOrInternalRubyBox):
(WebCore::Style::adjustUnicodeBidiForRuby):
(WebCore::Style::Adjuster::adjust const):

Adjust unicode-bidi for container and annotation boxes per spec.

Canonical link: https://commits.webkit.org/271839@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 1750bf: [IFC][Ruby] Disable fast/ruby/ruby-line-height.htm...

2023-12-04 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1750bfb07c80e5cc302083b43931e630d17adf4c
  
https://github.com/WebKit/WebKit/commit/1750bfb07c80e5cc302083b43931e630d17adf4c
  Author: Antti Koivisto 
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
M LayoutTests/platform/mac-wk1/TestExpectations

  Log Message:
  ---
  [IFC][Ruby] Disable fast/ruby/ruby-line-height.html on WK1
https://bugs.webkit.org/show_bug.cgi?id=265783
rdar://119121706

Unreviewed test gardening.

It uses



but that leaks to other tests on WK1 because the setting affects the global UA 
sheet. WK2 knows to swap the process.

* LayoutTests/platform/mac-wk1/TestExpectations:

Skip for now.

Canonical link: https://commits.webkit.org/271468@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6052e4: [IFC][Ruby] Don't let display:ruby-text through to...

2023-12-01 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6052e4dcacd49e052b1681410e1f4d6d48d312e1
  
https://github.com/WebKit/WebKit/commit/6052e4dcacd49e052b1681410e1f4d6d48d312e1
  Author: Antti Koivisto 
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
M Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp

  Log Message:
  ---
  [IFC][Ruby] Don't let display:ruby-text through to IFC if the parent box is 
not display:ruby
https://bugs.webkit.org/show_bug.cgi?id=265657
rdar://119028775

Reviewed by Alan Baradlay.

fast/ruby/ruby-text-before-child-split.html
fast/ruby/ruby-overhang-crash.html

* Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::adjustStyleIfNeeded):

Continuations may cause annotations to get through into surpring places but IFC 
doesn't deal with it.

Canonical link: https://commits.webkit.org/271386@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ea5244: [IFC][Ruby] Update fast/ruby/ruby-line-height.html...

2023-11-30 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ea5244ff065d50385c7320cdb6b3811ae88773b2
  
https://github.com/WebKit/WebKit/commit/ea5244ff065d50385c7320cdb6b3811ae88773b2
  Author: Antti Koivisto 
  Date:   2023-11-30 (Thu, 30 Nov 2023)

  Changed paths:
M LayoutTests/fast/ruby/ruby-line-height-expected.txt
M LayoutTests/fast/ruby/ruby-line-height.html

  Log Message:
  ---
  [IFC][Ruby] Update fast/ruby/ruby-line-height.html to spec UA sheet 
line-height
https://bugs.webkit.org/show_bug.cgi?id=265576
rdar://118982013

Reviewed by Alan Baradlay.

The ruby UA stylesheet https://www.w3.org/TR/css-ruby-1/#default-ua-ruby has

rt { line-height: 1; }

Update the test for that (the old stylesheet has 'normal').

* LayoutTests/fast/ruby/ruby-line-height-expected.txt:
* LayoutTests/fast/ruby/ruby-line-height.html:

Also set font-size explicitly so the test works better across browsers.

Canonical link: https://commits.webkit.org/271340@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9da902: [IFC][Ruby] Don't inherit text decorations through...

2023-11-29 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9da902cdac2f71df13d9abd5fa67ddb328d56393
  
https://github.com/WebKit/WebKit/commit/9da902cdac2f71df13d9abd5fa67ddb328d56393
  Author: Antti Koivisto 
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
M Source/WebCore/rendering/TextDecorationPainter.cpp

  Log Message:
  ---
  [IFC][Ruby] Don't inherit text decorations through annotation box
https://bugs.webkit.org/show_bug.cgi?id=265523
rdar://118934032

Reviewed by Alan Baradlay.

"Text decoration does not propagate from the base text to the annotations."

https://www.w3.org/TR/css-ruby-1/#ruby-text-decoration

Tested by fast/ruby/text-decoration-in-descendants-ruby.html with style-based 
ruby enabled.

* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::collectStylesForRenderer):

Canonical link: https://commits.webkit.org/271288@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 04aab9: [IFC][Ruby] Ensure split inlines have display:inline

2023-11-29 Thread Antti Koivisto
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04aab9f24bf40250f7d4fcc22e864f29821bc122
  
https://github.com/WebKit/WebKit/commit/04aab9f24bf40250f7d4fcc22e864f29821bc122
  Author: Antti Koivisto 
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
M Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp

  Log Message:
  ---
  [IFC][Ruby] Ensure split inlines have display:inline
https://bugs.webkit.org/show_bug.cgi?id=265514
rdar://problem/118932123

Reviewed by Alan Baradlay.

With ruby we may end up splitting inline display types other that 'inline'.
Ensure we just generate plain inlines so we don't create unexpected structures.

This fixes

fast/ruby/continuation-and-column-spanner-crash.html
fast/ruby/crash-when-ruby-base-is-collapsed.html
fast/ruby/ruby-illegal-1.html
fast/ruby/ruby-base-merge-block-children-crash.html
fast/ruby/ruby-illegal-combined.html

with style based ruby enabled.

* Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::cloneAsContinuation):

Canonical link: https://commits.webkit.org/271279@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


  1   2   3   4   >