New issue
Advanced search Search tips

Issue 877518 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Some LayoutBox methods return physical coordinates but the callers may want the normal coordinates

Project Member Reported by wangxianzhu@chromium.org, Aug 24

Issue description

The following LayoutBox methods return geometries in physical coordinates without "Physical" in their names, unlike most of the other methods without "Physical" and "Logical" in their names returning "physical coordinates in flipped block-flow direction":

PaddingBoxRect()
ContentBoxRect()
BackgroundRect()

At least in BackgroundIsKnownToBeOpaqueInRect() and its callers, physical coordinates and normal coordinates seem to be mixed together without necessary flipping.

I think we should
1. Prefix "Physical" for them;
2. Check each of their callers to see if the caller actually want the normal coordinates;
3. Add the version of normal coordinates if needed and change the callers accordingly.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac

commit a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Fri Aug 24 20:39:55 2018

[CI] Add "Physical" prefix for LayoutBox::ContentBoxRect(), PaddingBoxRect(), BackgroundRect()

The methods return rects in physical coordinates, instead of
"physical coordinates in flipped block-flow direction" like most of the
other LayoutBox methods without "Physical" and "Logical" prefixes.

This doesn't fix the cases that the methods are mistakenly used where
"physical coordinates in flipped block-flow direction" is expected.
The bug will be left open for the fix.

R=eae@chromium.org
TBR=wangxianzhu@chromium.org # for passive changes outside of renderer/core.

Bug: 877518
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id5fd12bd5f30f309ed32818378334dab633f536e
Reviewed-on: https://chromium-review.googlesource.com/1188742
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585978}
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/exported/web_hit_test_result.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/exported/web_plugin_container_impl.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/frame/remote_frame_view.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/html/html_anchor_element.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/html/html_image_element.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/inspector/inspector_css_agent.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/inspector/inspector_highlight.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/intersection_geometry.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_box_model_object.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_box_model_object.h
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_box_test.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_embedded_content.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_file_upload_control.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_image.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_media.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_menu_list.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_replaced.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_table_test.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_view.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/layout_vtt_cue.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/page/scrolling/snap_coordinator.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/box_paint_invalidator.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/embedded_object_painter.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/image_painter.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/replaced_painter.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/text_control_single_line_painter.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/theme_painter_default.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/core/paint/video_painter.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/modules/accessibility/ax_object.cc
[modify] https://crrev.com/a18d3ac8b20dd164c9e96f4ef6a60ab109b031ac/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc

Sign in to add a comment