https://github.com/web-platform-tests/wpt
Revision a878a9a9a5d1f4b0160620ba5479ba2c7d2e2373 authored by Javier Fernandez on 07 May 2018, 17:04:09 UTC, committed by Blink WPT Bot on 07 May 2018, 17:13:31 UTC
The definition of intrinsic size excludes explicitly performing layouts
to compute the final value. However, it may be necessary to laid out
some children to retrieve accurate information about the geometry of
the box, specially when some of these children are orthogonal to the
box its intrinsic size is being computed.

However, the writing-mode specification suggest [1] that auto-sized
orthogonal boxes may require to run their sizing phase before any
content contribution could be established.

The Blink engine discourages performing layouts during intrinsic size
computation. In order to address the orthogonal flow issues and get
a more accurate sizing, both during intrinsic size and layout phases,
the engine performs a pre-layout of all the orthogonal boxes in the
layout tree (LocalFrameView::LayoutOrthogonalWritingModeRoot).

However, this pre-layout operations doesn't make sense for grid items
because the grid areas, the grid items' actual containing blocks, are
not computed yet. Hence, we decided to exclude grid items from this
pre-layout operation (PrepareOrthogonalWritingModeRootForLayout).

With this CL, we follow the same plan Blink has for orthogonal flow
boxes, but doing it once the grid items are placed in their
corresponding grid areas. Since the grid tracks sizing algorithm has
not been run at this stage, the size of the grid areas is estimated
based on the track's max-sizing function, in a similar way [2] the
algorithm does to deal with orthogonal items during the layout phase.

This change is covered by current tests, however, added an additional
test to verify we use the max-track sizing as a way to estimate the
orthogonal item's block-axis size.

[1] https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows
[2] https://drafts.csswg.org/css-grid/#algo-overview

Change-Id: I836b92120825916324f94befec6d35263ec84f2b
Reviewed-on: https://chromium-review.googlesource.com/1027882
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#556469}
1 parent 644351d
History
Tip revision: a878a9a9a5d1f4b0160620ba5479ba2c7d2e2373 authored by Javier Fernandez on 07 May 2018, 17:04:09 UTC
[css-grid] Avoid layouts during intrinsic size computation
Tip revision: a878a9a
File Mode Size
.well-known
2dcontext
BackgroundSync
FileAPI
IndexedDB
WebCryptoAPI
WebIDL
accelerometer
accname
acid
ambient-light
annotation-model
annotation-protocol
annotation-vocab
apng
async-local-storage
audio-output
background-fetch
battery-status
beacon
bluetooth
budget-api
clear-site-data
client-hints
clipboard-apis
common
compat
conformance-checkers
console
content-security-policy
cookie-store
cookies
core-aam
cors
credential-management
css
custom-elements
device-memory
docs
dom
domparsing
domxpath
dpub-aam
dpub-aria
editing
encoding
encrypted-media
entries-api
eventsource
feature-policy
fetch
fonts
fullscreen
gamepad
generic-sensor
geolocation-API
geolocation-sensor
graphics-aam
gyroscope
hr-time
html
html-imports
html-longdesc
html-media-capture
imagebitmap-renderingcontext
images
infrastructure
input-events
interfaces
intersection-observer
js
keyboard-lock
longtask-timing
magnetometer
mathml
media
media-capabilities
media-source
mediacapture-fromelement
mediacapture-image
mediacapture-record
mediacapture-streams
mediasession
mimesniff
mixed-content
navigation-timing
netinfo
notifications
offscreen-canvas
old-tests
orientation-event
orientation-sensor
page-visibility
paint-timing
payment-handler
payment-method-basic-card
payment-method-id
payment-request
performance-timeline
picture-in-picture
pointerevents
pointerlock
preload
presentation-api
proximity
quirks
referrer-policy
remote-playback
requestidlecallback
resize-observer
resource-timing
resources
screen-orientation
secure-contexts
selection
server-timing
service-workers
shadow-dom
speech-api
storage
streams
subresource-integrity
svg
svg-aam
tools
touch-events
trusted-types
uievents
upgrade-insecure-requests
url
user-timing
vibration
visual-viewport
wai-aria
wake-lock
wasm
web-animations
web-nfc
web-share
webaudio
webauthn
webdriver
webgl
webmessaging
webrtc
websockets
webstorage
webusb
webvr
webvtt
webxr
workers
worklets
x-frame-options
xhr
.codecov.yml -rw-r--r-- 66 bytes
.gitignore -rw-r--r-- 340 bytes
.gitmodules -rw-r--r-- 519 bytes
.pyup.yml -rw-r--r-- 1.0 KB
.taskcluster.yml -rw-r--r-- 39.6 KB
.travis.yml -rw-r--r-- 3.3 KB
CONTRIBUTING.md -rw-r--r-- 1.6 KB
LICENSE.md -rw-r--r-- 5.1 KB
README.md -rw-r--r-- 16.5 KB
check_stability.ini -rw-r--r-- 524 bytes
config.default.json -rw-r--r-- 829 bytes
lint.whitelist -rw-r--r-- 54.2 KB
serve.py -rw-r--r-- 263 bytes
server-side.md -rw-r--r-- 8.1 KB
testharness_runner.html -rw-r--r-- 95 bytes
update-built-tests.sh -rwxr-xr-x 208 bytes
wpt -rwxr-xr-x 95 bytes
wpt.py -rw-r--r-- 15 bytes

README.md

back to top