Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 106eb5245b22de046dbb84cb58ec01c9317c9625
      
https://github.com/WebKit/WebKit/commit/106eb5245b22de046dbb84cb58ec01c9317c9625
  Author: Ahmad Saleem <ahmad.saleem792+git...@gmail.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    A LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-001-expected.html
    A LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-001.html
    A 
LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-offset-001-expected.html
    A LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-offset-001.html
    M LayoutTests/fast/repaint/bugzilla-7235.html
    M Source/WebCore/rendering/RenderInline.cpp

  Log Message:
  -----------
  Incorrect Static Position of Absolute Positioned Elements inside 
Rel-Positioned Containers

Incorrect Static Position of Absolute Positioned Elements inside Rel-Positioned 
Containers
https://bugs.webkit.org/show_bug.cgi?id=247869

Reviewed by Alan Baradlay.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=180488 & 
https://chromium.googlesource.com/chromium/src.git/+/116b2f293d0c16017e63e45cc9a97ee5bfa9b161

Per http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width if an
absolute positioned box's 'left' and 'right' values are both auto then it
should position itself as though it is a normal flow box in relation to its
containing block. Where the positioned box's container is a rel-positioned
inline we should disregard any offset created by that inline when
positioning the positioned box's layer.

This bug was spotted during a discussion at
http://lists.w3.org/Archives/Public/www-style/2014Jul/0549.html. The tests
are drawn from that discussion and attributed appropriately.

NOTE - Webkit was not adding any absolute positioned element with a
counter offset similar to Blink but the commit was referenced to update the 
comment.

* Source/WebCore/rendering/RenderInline.cpp:
(RenderInline::offsetForInFlowPositionedInline): Update Comment and Logic to 
align with web-specs better
* LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-offset-001.html: 
Added Test Case
* 
LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-offset-001-expected.html:
 Added Test Case Expectations
* LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-001.html: Added Test 
Case
* LayoutTests/fast/css/abs-pos-child-inside-rel-pos-inline-001-expected.html: 
Added Test Case Expectations
* LayoutTests/fast/repaint/bugzilla-7235.html: Rebaselined

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


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

Reply via email to