[webkit-changes] [WebKit/WebKit] cfe7ff: offsetHeight and offsetWidth of inline box wrappin...

Alan Baradlay noreply at github.com
Wed Dec 20 15:00:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cfe7ff2ca750e30762d42eb0dcbbe28e7d249828
      https://github.com/WebKit/WebKit/commit/cfe7ff2ca750e30762d42eb0dcbbe28e7d249828
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M LayoutTests/fast/events/ondragenter.html
    A LayoutTests/fast/inline/inline-box-offset-width-height-and-continuation-expected.txt
    A LayoutTests/fast/inline/inline-box-offset-width-height-and-continuation.html
    M LayoutTests/fast/selectors/hover-descendant-shadow-tree.html
    M Source/WebCore/rendering/RenderInline.cpp
    M Source/WebCore/rendering/RenderInline.h

  Log Message:
  -----------
  offsetHeight and offsetWidth of inline box wrapping a block box is 0
https://bugs.webkit.org/show_bug.cgi?id=47618

Reviewed by Antti Koivisto.

Consult the continuation block chain when computing offsetWidth/height for inline boxes.
(see comments inline for more info)

hover-descendant-shadow-tree.html - we were incorrectly reporting 0px for both offsetHeight and offsetWidth, so essentially this test was just using offsetLeft and offsetTop.

* LayoutTests/fast/inline/inline-box-offset-width-height-and-continuation-expected.txt: Added.
* LayoutTests/fast/inline/inline-box-offset-width-height-and-continuation.html: Added.
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetWidth const):
(WebCore::RenderInline::offsetHeight const):
* Source/WebCore/rendering/RenderInline.h:

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




More information about the webkit-changes mailing list