Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Improve border gradients and images #83

Closed
wants to merge 994 commits into from

Conversation

servo-wpt-sync
Copy link
Collaborator

Reviewed in servo/servo#21608.

marcoscaceres and others added 30 commits August 31, 2018 02:17
* tests for MerchantValidationEvent
 * contructor tests, including validationURL
 * complete() method

* Test fixup
This queues a report through the Reporting API whenever
navigator.requestMIDIAccess is invoked from a frame in which the 'midi`'
feature is not allowed according to feature policy.

Bug: 867471
Change-Id: Ib7966a3721067fcf7a325d75377178caaa4b327a
Reviewed-on: https://chromium-review.googlesource.com/1195703
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587617}
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1486000
gecko-commit: 18c0aff587fa935a8149f83d58664e77c35e598a
gecko-integration-branch: mozilla-inbound
gecko-reviewers: bbouvier
Consider the following case:
<span style="position:relative; left:-100px;">
  <div style="display:inline-block; position:absolute;"></div>
</span>

In our implementation the absolute positioned element will have a
counter offset applied, to ignore the negative offset on its rel-pos
parent.

The compensation was added in https://codereview.chromium.org/423173003/
which wasn't covered by the added test, and isn't consistent with other
browser implementations. (Checked with Safari, IE, and Firefox.)

BUG=398164

Change-Id: I44127ff42446a7483d7e4ebb3197ecdc915db39d
Reviewed-on: https://chromium-review.googlesource.com/1195084
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587745}
…tio for responsive images

The CL https://chromium.googlesource.com/chromium/src/+/bd4c33b5e81d495ecdac66b0375924d9565330cb
did not handle responsive images correctly. This CL resets
overridden_intrinsic_size_:
When source is chosen using W descriptor, 'sizes' sets the new width
of the overridden_intrinsic_size_, and the new height is calculated
by the aspect ratio defined by the intrinsicSize attribute.

Bug: 874629
Change-Id: I16b2f6c2fb9ae741144ba509c57f1e033c8cdc17
Reviewed-on: https://chromium-review.googlesource.com/1195801
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#587774}
The new Baseline Alignment algorithm states that items with sizing
cyclic dependencies must be excluded from any baseline context they
participate in. One of these cyclic dependencies can happen with
intrinsic sized grid areas and relative items.

The grid spec states [1] that flex-sized tracks should be considered
as content-sized when the grid container has an indefinite size. We
were using the AvailableSize(direction) function to determine whether
the grid container is indefinite or not. However, this function may
provide different results during the different phases of the grid
layout logic. This issue causes assert violations like the one
described in the bugs listed below.

The new Baseline Alignment logic is now integrated in the Grid Track
sizing algorithm. Hence, we need to ensure that an item that
participates in any baseline alignment context during the track sizing
also does during the alignment phase, at the end of the grid layout
logic. In order to achieve that, this CL forces a new computation of
the Baseline offsets during the step 3 of the Grid sizing algorith,
since during this step the available space is not indefinite anymore.

It's worth mentioning that this change assumes the issue grid items
being excluded and included of Baseline Context during the different
phases of the Grid sizing algorithm, which I hope we can clarify in
the issue [2] I filed for the CSS WG.

[1] https://drafts.csswg.org/css-grid/#fr-unit
[2] w3c/csswg-drafts#3046

Bug: 867833, 874861, 876593
Change-Id: I668d399b920c9280a8e20b3e8362f562eded4770
Reviewed-on: https://chromium-review.googlesource.com/1177757
Reviewed-by: Sergio Villar <svillar@igalia.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/master@{#587799}
The Storage API [1] defines the "persistent-storage" string to allow
querying the state of the permission. Plug this into the Permission
API [2] implementation and add a web platform test.

[1] https://storage.spec.whatwg.org/
[2] https://w3c.github.io/permissions

Intent to Ship: https://groups.google.com/a/chromium.org/d/topic/blink-dev/FRAmGlAoDTY/discussion
ChromeStatus: https://www.chromestatus.com/feature/4770049554382848

Bug: 878525

Change-Id: Ia12fb43676e04e7e60ad58b5ffbd7ee22f78ffc4
Reviewed-on: https://chromium-review.googlesource.com/1194106
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587839}
Our current implementation of canvas textBaseline alignment for top
middle and bottom doesn't do what the spec says it should, i.e. align
with the EM square.
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-textbaseline
This has been a bug on FF side for quite some years:
https://bugzilla.mozilla.org/show_bug.cgi?id=737852
This change fixes this misalignment by using the EM square ascent
and descent from SimpleFontData instead of the font's max ascent/descent.
Also fixing the EM related metrics in canvas TextMetrics.

Bug:607053,277215

Change-Id: Id6374e6fcd4e46fa989a7e23a80dc1f5bf961b94
Reviewed-on: https://chromium-review.googlesource.com/1194494
Commit-Queue: David Quiroz Marin <davidqu@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587855}
…an-inline-block

Add test for specifying column-span:all on an inline-block.
This CL adds all remaining tests from
https://github.com/abarth/http-state/tree/master/tests.
Not all of them pass, but all of them run consistently
with the same results.

This also adds a lot of documentation - in code and
when running a server.
By navigating to
<server>/cookies/http-state/resources/cookie-setter.py
All tests are gathered and run. The shown document
explains the usage of the server for debugging purposes.

Change-Id: I4a75655704dddc213a3f3b6fa26beeb14acf3338
Reviewed-on: https://chromium-review.googlesource.com/1021577
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Friedrich Horschig <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583606}
Passing the PropertyRegistration makes StyleValueFactory::FromString
find the typed value, and create appropriate and corresponding TypedOM
types.

Note: the check on property_id==CSSPropertyVariable isn't strictly
required, but it's nice to avoid the AtomicString creation if we know it's
not needed.

R=futhark@chromium.org

Bug: 641877
Change-Id: Id7f7f8c754f8aab7f64a92efd896243858d03757
Reviewed-on: https://chromium-review.googlesource.com/1199182
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588001}
Context: web-platform-tests#12606

Change the logic of should.throw() so we can handle 3 cases -

should(someExpression).throw();
should(someExpression).throw(TypeError);
should(someExpression).throw(DOMException, 'NotSupportedError');

The generic error (except for DOMException) can be passed without
the second argument, but this change will enforce the second arg
when the expected error is a DOMException type.

This touches many test files, so the work will be done in several
steps:

1. Change audit.js, audionodeoptions.js on both locations.
  (wpt, non-wpt)
2. Update affected test files with the script.
3. Update the rest of test files which can't be updated
  programmatically.

Bug: 865614
Test: All layout tests pass.
Change-Id: I16acacb26c194a0ff950aca05e931195bf55167f
Reviewed-on: https://chromium-review.googlesource.com/1184146
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587660}
This was the only class capitalized like this, and the only occurences
of "Webdriver" anywhere in the repo. For consistency with classes
WebDriverException, WebDriverProtocol and WebDriverServer.
Bug: 868068
Change-Id: I339a79b5709425b2e7d0d4d50f0bfa0602afc7ab
Reviewed-on: https://chromium-review.googlesource.com/1170171
Reviewed-by: Henrik Boström <hbos@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Steve Anton <steveanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587669}
This CL is based on: https://chromium-review.googlesource.com/c/chromium/src/+/1150725

Design doc: https://docs.google.com/document/d/1yh_-ayeaFV0EjuR51U641zbrPAB0Baqj6UrC9bT9iqQ/edit#heading=h.y7amr11fn0tb

This CL implements "intrinsicSize" attribute for HTMLVideoElement.
The value of "intrinsicSize" overrides the intrinsic size:

1. When no width and (or) height is specified, the value of
"intrinsicSize" will be used to determine the area to layout the video
content.

2. videoWidth and videoHeight will return the value defined by
"intrinsicSize".

See explainer: https://github.com/ojanvafai/intrinsicsize-attribute/blob/master/README.md

Bug: 874629
Change-Id: If4aeceee2299c50aa7b4c9bdf8fef7cb3e7eea70
Reviewed-on: https://chromium-review.googlesource.com/1191926
Commit-Queue: Luna Lu <loonybear@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587667}
The 'vertical-align: top' and 'bottom' require the size of
the ancestor line box and thus are put into pending queue
while applying the baseline shift.

When they are nested, processing all pending queue at the
root line box applies the shift multiple times. This patch
puts into the queue of the nearest ancestor that has 'top'
or 'bottom' if exists.

Bug: 877977
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6541d138267a6e42658b601901b673352e625440
Reviewed-on: https://chromium-review.googlesource.com/1198887
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588042}
Change-Id: I2b60a751ad4c3ad87e6a9e75d55e2f96698e88b9
Reviewed-on: https://chromium-review.googlesource.com/1198571
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588041}
the legacy offer options need to be passed to createOffer, not the then.
regression from web-platform-tests#12715, caused chrome to fail on import
…al-values.html.

Differential Revision: https://phabricator.services.mozilla.com/D4098

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1308436
gecko-commit: 08897a32ca0578a8bc14722824fe5d0f187936de
gecko-integration-branch: mozilla-inbound
gecko-reviewers: karlt
Differential Revision: https://phabricator.services.mozilla.com/D4101

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1308436
gecko-commit: 9ad67bac864379a1784263b61fd084412673ced4
gecko-integration-branch: mozilla-inbound
gecko-reviewers: karlt
…AtTime.

Differential Revision: https://phabricator.services.mozilla.com/D4107

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1308436
gecko-commit: 1c8691a860201bec454a968097ebb4f63a0f4f66
gecko-integration-branch: mozilla-inbound
gecko-reviewers: karlt
This change adds validation checks to the USBDeviceFilter parameters
passed into navigator.usb.requestDevice.

Bug: 854703
Change-Id: I921a7f30a9e2ec5d46d3a74801de594565ab8a6f
Reviewed-on: https://chromium-review.googlesource.com/1196034
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588140}
This CL adds observable settings to MediaStreamTrack objects returned by
getDisplayMedia() calls. These constrainable properties are set before
the stream is returned based on user choice.

Information about these settings are stored in DisplayMediaInformation
struct. It is set in the low level device selection and then parsed by
UserMediaProcessor before passing it to blink.

Bug: 326740
Change-Id: I81d5f2eb24d2c1a37df0fbe2d34bc469fa575bf1
Reviewed-on: https://chromium-review.googlesource.com/1185875
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Emircan Uysaler <emircan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588162}
…cially vertical-rl)

This CL tries to correct the box model when there are scrollbars,
especially in vertical-rl mode. According to
https://www.w3.org/TR/css-overflow-3/#scrollbar-layout, scrollbars
"should be inserted between the inner border edge and the outer
padding edge".

Changes to the previous code:

- Padding|client box now excludes scrollbars, with the help of
  (Top|Left|Bottom|Right)ScrollbarWidth methods which can get the
  scrollbar widths in physical directions in various writing modes.

- Content box is now based on the new padding box by excluding the
  paddings.

- Layout of contents is now based on the correct box model. In
  vertical-rl mode, layout of contents in blocks direction starts
  from the inner edge of the new content box which has been properly
  adjusted for the scrollbar.

- Now LayoutBox::Location() and Location::PhysicalLocation() in the
  initial scroll state are correct in all writing-modes. Previously
  when they were incorrect in vertical-rl mode and some flex box
  directions, requiring an artificial scroll offset to paint the
  content at correct place.

- With the correct padding box, content box, Location(),
  PhysicalLocation(), we no longer need the band-aid code to create the
  correct painted result.

The changed code is mostly in LegacyLayout code. Some changed code is
in LayoutNG that previously converted correct LayoutNG geometries into
the problematic geometries that were previously expected by
LegacyLayout.

The correct box model is required by blink-gen-property-trees because
we can't band-aid the incorrect results in paint properties after
painting.

Bug: 833167,853945,858843,878809,876266

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux-blink-gen-property-trees;luci.chromium.try:linux_layout_tests_layout_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I41faf1ca0bfb95cb287c72703f08c8bd44e9e752
Reviewed-on: https://chromium-review.googlesource.com/1185901
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588201}
Differential Revision: https://phabricator.services.mozilla.com/D4076

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1485669
gecko-commit: 6932f13cab4b201c3f1501adce7ef43b23ca80b0
gecko-integration-branch: autoland
gecko-reviewers: dbaron
Upstreamed from servo/servo#21533 [ci skip]
We called os.path.normcase on the path to be compared, and not the
rules themselves. This fixes this by calling normcase on both the rule
and the path to be compared.

We also tried to do separator normalization before calling normcase,
which itself does slash normalization.
stephenmcgruer and others added 25 commits September 13, 2018 15:13
The correct syntax for the 'link' element uses 'href', not 'src'.
accname: Fix expectations of three tests
Added new implementation of Element::setAttributeNS() to accept
generic TrustedType as an argument.
Existing implementation renamed to Element::setAttributeNSInternal
and made private.

Bug: 739170
Change-Id: Ib83250f579ba63fc519d1870671b2801c2ce2c5c
Reviewed-on: https://chromium-review.googlesource.com/1221321
Commit-Queue: Maja Kabus <kabusm@google.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591062}
[css-contain] Split contain-paint-013 in three smaller tests
…ortant-flags

Update test for serializing shorthand with "initial" values and different important flags
Differential Revision: https://phabricator.services.mozilla.com/D5291

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1485259
gecko-commit: 6a9c8ef40c0616b6338503957e9edc8fff2e4d00
gecko-integration-branch: mozilla-inbound
gecko-reviewers: ato
…est is propagated to response

This patch add a wpt test to ensure the service worker redirected request URL
is propagated to the outer response.

Differential Revision: https://phabricator.services.mozilla.com/D4763

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1486445
gecko-commit: 78b3718b7edeb9c3187201e93ba05e89250b8a3a
gecko-integration-branch: autoland
gecko-reviewers: asuth
This CL implements the 'lazyload' policy which acts in place of the
lazyload attribute for nested frames and enforces lazyloading regardless
of the value of 'lazyload' attribute.

A follow up CL will implement the feature for images (after
LazyImageLoading is implemented).

Bug: 869492
Change-Id: I2f8ab7ad9a5937636f270c84563c73ad392dbb01
Reviewed-on: https://chromium-review.googlesource.com/1171374
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Scott Little <sclittle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590688}
Unify the path for sending pointerrawmove in pointerlock
mode with the normal event processing path.

Bug: 880524
Change-Id: I021261e0107b6172da02684cf82e0f46df304eba
Reviewed-on: https://chromium-review.googlesource.com/1205476
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591347}
Some pointer event tests used a log method that would cause the layout
to change and this caused issues for using threaded compositing.

Switch to a method that already existed before to collect the log entries
and then show them at the end of the test.

BUG=831653

Change-Id: I3d1b16d01aa15c3c1660d36ce10aa702671c6786
Reviewed-on: https://chromium-review.googlesource.com/1226097
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591349}
Since 2ae9668, the logging module is
reload in both `start_ws_server` and `start_wss_server`. This was done
to fix failing tests in gecko caused by a locked lock in the logging
module being inherited in new processes. Unfortunately this caused servo
tests to start failing.

This commits unlocks the logging global lock if it's still held instead
of reloading the whole module limiting the side effects and fixing the
tests in servo while keeping the gecko tests green.

The function `_releaseLock` is not public but has been there for a long
time and is still there in python 3.8 so I don't think we should worry
about it disappearing.
This is an obsolete prefixed alias of TransitionEvent. An
intent-to-remove has been sent, and has got LGTM*3.

Blink intent thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/0Szv8vDQh_c/flTY7ZClBwAJ

Bug: 695504
Change-Id: Ibf8083fabac8cab474e64bb37e99e62b39b3616d

TBR=timvolodine@chromium.org

Change-Id: Ibf8083fabac8cab474e64bb37e99e62b39b3616d
Reviewed-on: https://chromium-review.googlesource.com/1221689
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591442}
As noted in the comments in that file, it is essentially the same as
https://github.com/WebKit/webkit/blob/master/LayoutTests/webaudio/gain.html
which was moved from there to WPT as gain.html.  This test is now
basically redundant and adds no additional coverage.

Bug: 883167
Change-Id: Ie50111e263790025c615b64ad8f5e06428ae3177
Reviewed-on: https://chromium-review.googlesource.com/1221477
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591486}
This patch does a few things:
1) Introduces the concept of a "ReplacedPercentageResolutionSize".
   This is needed as replaced descandants of table cells have a
   different percentage resolution size than normal descendants.

2) This adds a bunch of special cases for how percentage resolution
   sizes are handled for table cells.

3) Adds the "scrollable" children of table cell quirk. This is during
   the "measure" phase, scrollable children contribute nothing to the
   size of the cell.

4) Adds the "box-sizing: border-box" table cell quirk. That is
   percentage children, during the layout phase, are sized as if they
   have box-sizing: border-box on them.

It was easier to perform all these changes as a single monolithic patch
to ensure correct behaviour.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I881a21662bfdf6b4ab7a0f62df6970143008ebca
Reviewed-on: https://chromium-review.googlesource.com/1207890
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591507}
…atform-tests#12999)

Following what we did in web-platform-tests#12975 for contain-paint-013,
this patch does the same for contain-layout-008
as they were sharing the reference file that was removed by mistake.
Respect CSS border-image-width.
Properly support gradients as a border-image-source.
Only emit a border item if the border-width is non-zero
for simple borders but still emit one if the item is
an image as paint worklet that are not drawn cause servo
to hang and fail tests.

Add a new test and mark 4 more as passing.
@jdm jdm closed this Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.