Commit Graph

955 Commits

Author SHA1 Message Date
Mats Palmgren
f7e4384ac8 Bug 1365614 part 2 - Backout bug 1357655. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: Ig0RVKSQw4r

--HG--
extra : source : e528713f882cfc92f4c7acaf41e00dd302105ed0
2017-05-18 11:09:00 +08:00
Carsten "Tomcat" Book
2565b104f7 Backed out changeset e528713f882c (bug 1365614) 2017-05-22 15:45:34 +02:00
Carsten "Tomcat" Book
00d4ea331d Backed out changeset bbb688fe1ba3 (bug 1365614) 2017-05-22 15:45:31 +02:00
Mats Palmgren
e706869580 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-21 17:15:00 +08:00
Mats Palmgren
a928a1b1f6 Bug 1365614 part 2 - Backout bug 1357655. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz 2017-05-18 11:09:00 +08:00
Neil Deakin
f36da07def Bug 1364115 - Allow -moz-stack-sizing to work in a single direction only. r=dbaron,manishearth
MozReview-Commit-ID: Kl7YQpfolTC

--HG--
rename : layout/reftests/bugs/346189-1-ref.xul => layout/reftests/xul/stack-sizing-1-ref.xul
rename : layout/reftests/bugs/346189-1.xul => layout/reftests/xul/stack-sizing-1.xul
extra : rebase_source : e536212980c832c04423871e0fa9dfc09f8a5994
extra : source : a65814deeb7a7f64189d3a9388ac295c6f5b4958
2017-05-15 12:33:46 +01:00
cku
5e40c4609b Bug 1310885 - Part 11. (gecko) Clean up unused things. r=heycam
MozReview-Commit-ID: CxHbNyVNSz8

--HG--
extra : rebase_source : c9b3600e31023d79736f4df871ed741c37b1647f
extra : intermediate-source : d650a2abb555fb2bed3d832bc8f007ec7909c99e
extra : source : 33e2a248ed4da28bba3b0e4b745e3d894c68ed4d
2017-04-28 19:47:04 +08:00
Xidorn Quan
3fc45ef29b Bug 1328319 part 6 - Make it possible to delay resolving counter style. r=heycam
MozReview-Commit-ID: 5rlGBf9Asu4

--HG--
extra : rebase_source : d2e154714c9dd636ff8dd1e1b40342bf2b19a222
2017-05-15 14:22:10 +10:00
Sebastian Hengst
484d2b7f51 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Jduo3F6TzgF
2017-05-14 18:04:29 +02:00
Daniel Holbert
396f88abfc Bug 1364338: Force a repaint when CSS 'outline-width' or 'outline-offset' change. r=heycam
Previously, when these properties changed, we'd only send change hints to
recompute overflow areas & trigger DLBI. If the outline was always outside of
the element's border box, this old strategy was generally OK, because the
outline tweak would cause a change to the overflow areas' size, and that would
invalidate the changed area via DLBI & trigger a repaint.

However, for outlines that are *inside* of the element (via negative
'outline-offset'), these change hints were not sufficient, because tweaks to
the outline width & offset will NOT affect the size of the element's overflow
areas and will not trigger any DLBI invalidation.

So in order to correctly handle these changes, we really need to request a
repaint of the affected element, since some piece of the element may need to be
repainted even if it's not changing in size.

MozReview-Commit-ID: J4KGUHrJ09U

--HG--
extra : rebase_source : 677950d5aebdf7e90120b8fe7bb937344da42d7d
2017-05-12 18:42:10 -07:00
cku
8aa957ea26 Bug 1310885 - Part 5. (gecko) Always release ImageValue on the main thread.
We will actually hit the assertion in the destructor of
StyleImageRequestCleanupTask after the change above:
  MOZ_ASSERT(mImageValue->mRequests.Count() == 0 || NS_IsMainThread()
             "If mImageValue has any mRequests, we need to run on main "
             "thread to release ImageValues!");

From Part 6 to Part 9, we do put a request immediately after the creation of an
ImageValue, so even if a nsStyleImageReqeust is not resolved, we still need to
destruct mImageValue on the main thread.

MozReview-Commit-ID: F812iySXbh6

--HG--
extra : source : 74377e39719599633806c5ecd728e4015c7603d0
2017-05-08 15:08:46 +08:00
cku
4877f8d094 Bug 1310885 - Part 3. (gecko) Create a new API to receive cached ImageValue from stylo.
This patch implement several things:
1. Implement a new constructor for nsStyleImageRequest to receive an existing
   ImageValue from the caller.
2. Implement Gecko_ImageValue_Create to allow stylo to create a gecko::ImageValue
   object.
3. Implement Gecko_SetXXXXImageValue to allow stylo to pass a created ImageValue
   back to gecko.

MozReview-Commit-ID: 1SbW5w8FSV2

--HG--
extra : source : 63777ecf4c7138a0ce5847753a41efcbfc8e2b20
extra : intermediate-source : dced488c119da7e3ae27c903c0dcc76593d8a06d
2017-05-02 16:20:01 +08:00
Daniel Holbert
ad52211150 Bug 1344398 part 2: React to some CSS 'overflow' changes on body/html by simply calling UpdateViewportScrollbarStylesOverride() instead of reframing. r=bz,tnikkel
MozReview-Commit-ID: Lpr9aNv9hAB

--HG--
extra : rebase_source : c8cccf8e6495ab1d57f9680c07b3e43a488e8691
2017-05-10 13:53:27 -07:00
Wes Kocher
8f6058b583 Backed out 3 changesets (bug 1344398) for assertion failures at Element.cpp a=backout
Backed out changeset d0e5a5ba01b5 (bug 1344398)
Backed out changeset d70f9de401d1 (bug 1344398)
Backed out changeset 647d0bb3714d (bug 1344398)

MozReview-Commit-ID: DTVWf28NcNb
2017-05-10 17:43:50 -07:00
Daniel Holbert
b216b7b0e8 Bug 1344398 part 2: React to some CSS 'overflow' changes on body/html by simply calling UpdateViewportScrollbarStylesOverride() instead of reframing. r=bz,tnikkel
MozReview-Commit-ID: Lpr9aNv9hAB

--HG--
extra : rebase_source : c8cccf8e6495ab1d57f9680c07b3e43a488e8691
2017-05-10 13:53:27 -07:00
Xidorn Quan
98f239480d Bug 1362302 part 1 - Use nsIAtom for counter style names. r=dbaron
MozReview-Commit-ID: 5VK6BgGRVRs

--HG--
extra : rebase_source : 104a28eddeb7984bd9f691693cf8debc1387fb87
2017-05-06 11:34:35 +10:00
Robert Longson
0c1b6c1fcc Bug 1347409 part 2 - serialise fill and stroke fallback properly r=cam 2017-05-02 22:12:59 +01:00
Robert Longson
732aac6704 Bug 1347409 part 1 - introduce nsStyleSVGFallbackType so that we can begin to distinguish the type of paintserver fallback r=cam 2017-04-29 14:03:20 +01:00
Jonathan Watt
e0f3ff607a Bug 1350010, part 1 - Implement the '-moz-context-properties' property. r=heycam
MozReview-Commit-ID: CyVQe0UfKdy
2017-04-11 21:38:10 +01:00
cku
10c26c73a2 Bug 1341703 - Part 3. Handle nsStyleBorder::CalcDifference off main thread. r=heycam
Image loading status can be accessed in main thread only, so we can not use
nsStyleImage::IsLoaded in nsStyleBorder::CalcDifference, which might be executed
on a background thread.

The drawback of this change is we may paint a border-image, once, even before it
was actually loaded, which is a waste, because we have nothing to draw yet.

PS:
We did not check nsStyleImage::IsLoaded in both background-image and mask-image's
CalcDifference.

MozReview-Commit-ID: 5knH6dZziL8

--HG--
extra : rebase_source : 8e854960bfec130fe06e57b5e898651814e7f36e
2017-04-18 15:04:35 +08:00
Boris Chiou
afec853085 Bug 1357357 - Part 1: Add one FFI to set unsupported transition property. r=emilio
We need an FFI, Gecko_StyleTransition_SetUnsupportedProperty, to set the
mProperty and mUnknownProperty of StyleTransition. In Servo, we put
non-animatable, custom, and unrecognized property together, so this FFI
should look up the nsCSSPropertyID of the input string, and then store the
value and the unknown property string (if any) back to StyleTransition.

MozReview-Commit-ID: 4iZNKXNSrzj

--HG--
extra : rebase_source : 088daa620133418afdc6b1c97b6e90ceb7cf3b75
2017-04-26 17:41:45 +08:00
Daniel Holbert
4613644133 Bug 1357117 part 2: Add flag to distinguish between -moz & -webkit prefixed gradient expressions. r=heycam
This patch doesn't change our behavior -- we won't actually act on the new flag
until the next patch in this series.

MozReview-Commit-ID: EONsLM54eG1

--HG--
extra : rebase_source : cabd4a140d575794a8a656c47692bb9d3a02de88
2017-04-25 11:48:39 -07:00
cku
015e4aa234 Bug 1351015 - Not assuming nsStyleImage::ComputeActualCropRect always return true. r=heycam
nsStyleImage::ComputeActualCropRect may return false under 4 conditions
1. mType is not eStyleImageType_Image.
   This function is design to be used when mType is eStyleImageType_Image.
   Replace this 'if' check by MOZ_ASSERT.
2. nsStyleImage::GetImageData() returns nullptr
   This function will return true if this image refers to a local-ref resource.
3. GetImage returns failure or does not return a valid imgIContainer.
   It's possible. Please refers to the comment in imgReqestProxy::GetImage
   at [1].
4. imageSize is empty
   It's possible too. By giving a malformed image to a style image, we will hit
   this condition. And this is right what we met in this bug.

Since ComputeActualCropRect may actaully return false, we should remove the
NS_ASSERTION that assume it will always return true.

[1]
https://hg.mozilla.org/mozilla-central/file/7f1f1559cd8d/image/imgRequestProxy.cpp#l513

MozReview-Commit-ID: KHTFQJjiLtT

--HG--
extra : rebase_source : c4e119dd250094115ab23c323ca49f9ebc296698
2017-04-22 03:28:20 +08:00
Jeremy Chen
3e5064f08f Bug 1348173 - stylo: combined gecko side patch for -moz-border-*-colors support. r=heycam
MozReview-Commit-ID: 53gWkWKJNmV

--HG--
extra : rebase_source : 5bd1ddaf954533094c77a3ca5bdf9f3c3441056f
2017-04-25 14:50:44 +08:00
Iris Hsiao
28a432c0ec Backed out changeset 9c7c061b959f (bug 1348173) for hazard busted 2017-04-25 14:24:10 +08:00
Jeremy Chen
9cd2c96926 Bug 1348173 - stylo: combined gecko side patch for -moz-border-*-colors support. r=heycam
1. add binding functions for -moz-border-*-colors support.

  In Gecko, we use double pointers to nsBorderColors to store -moz-border-*-colors.
  The computed values of -moz-border-*-colors are set by couple member functions.

  To pass the computed value from Servo to Gecko, we need support for these member
  functions as well. So, I'm adding some binding functions in this patch. The
  actual use of these bindings to pass/store the computed values is separated
  in the following patch, which should be a pure Servo change. See servo PR:
  https://github.com/servo/servo/pull/16586.

2. update test expectations for -moz-border-*-colors support.

  Note that with the support of -moz-border-*-colors, 165 mochitests and 17 reftests
  could be fixed.

MozReview-Commit-ID: KDbp8C6Aoqd

--HG--
extra : rebase_source : 7d9675d9ece091ea6957dcae7d28c39066e69035
2017-04-24 18:23:52 +08:00
Mats Palmgren
c8ff2283ea Bug 1357655 part 1 - [css-ui] Make 'none' the initial value for 'appearance' for web and UA compatibility. Add 'appearance:auto' to UA sheets for form controls, XUL etc where needed. r=bz
MozReview-Commit-ID: 2h5ndqHresm
2017-04-21 02:24:19 +02:00
Eric Rahm
152fcf01fe Bug 1356060 - Just use nsString in URLValueData. r=heycam
This switches over from using nsStringBuffer to nsString for URLValueData's
|mString| member. This avoids various tedious conversions and can provide
potential performance improvements by avoiding length calculations.

MozReview-Commit-ID: 5eRifUZrAso
2017-04-13 15:18:25 -07:00
cku
1a241baef2 Bug 1341667 - Part 1. Keep url in nsStyleImage for local-fragment url. r=heycam
MozReview-Commit-ID: KEbO4vZXBJo

--HG--
extra : rebase_source : 1dffe2649fa2a4b5872fd2b3194a8ab2c29be98e
extra : source : 3dce4bb207fd09273dfb37581644eda454aefab8
2017-04-11 22:56:41 +08:00
cku
2b2e6d122e Bug 1354772 - Part 3. Correct the comment in Layer::CalcDifference. r=heycam
MozReview-Commit-ID: 34p6qqGO5R0

--HG--
extra : rebase_source : 51f65ba1de8f744235fe6789b3005794410d6bcf
2017-04-11 15:38:07 +08:00
cku
db1a6cab83 Bug 1354772 - Part 2. Compute URLValueData::mMightHaveRef when need. r=heycam
MozReview-Commit-ID: 8t5tKrjB1cz

--HG--
extra : rebase_source : cda9e15dcb51aeedf6bb532dd702247e60e59304
2017-04-10 16:41:51 +08:00
Nazım Can Altınova
a99f2a36a0 Bug 1341761 - Convert nsStyleImage::mElementId to use nsIAtom. r=xidorn
MozReview-Commit-ID: 9YcbhMmXYoi
2017-04-09 16:44:36 +03:00
cku
21a1b43445 Bug 1352096 - Part 2. Remove Layer::mSourceURI. r=heycam
Now, remove Layer::mSourceURI, there are several benefit of doing this:
1. Reduce the size of nsStyleImage::Layer.
2. By storing style image and url information in nsStyleImage, we can remove
many verbose comments. That is becasue there is no need to explain why we use
mSourceURI here, or why we use nsStyleImage there anymore.
3. Since all inforamtion is stored in on place, nsStyleImage, we can setup image
request or URLs by one single Gecko_SetUrlImageValue call.

MozReview-Commit-ID: 7aTQobddTB1

--HG--
extra : rebase_source : 247e3b66c727a9116c58d3d6ff3ae0f7a58f2338
2017-03-31 01:50:21 +08:00
cku
0a71f961c5 Bug 1352096 - Part 1. Implement nsStyleImage::SetURL and GetURLValueData. r=heycam
This patch implements two things:
1. Add one extra type, nsStyleImageType::eStyleImageType_Url, and puts data of
this type in nsStyleImage::mUrlData.
2. Export SetURLValueData and GetURLValueData from nsStyleImage

With these chnages, we can simply use nsStyleImage::mUrlData to replace
Layer::mSourceURI in the next patch.

MozReview-Commit-ID: E20MEzXv8cg

--HG--
extra : rebase_source : 5461edacb28676e9d3a12068f330b5db7b9fe32c
2017-03-30 23:16:46 +08:00
Xidorn Quan
2df49dbac2 Bug 1343964 part 1 - Move URLExtraData into its own header. r=heycam
This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla

MozReview-Commit-ID: 72MYq6kWm4s

--HG--
extra : rebase_source : 400fe0d7cc422f22592c302cfd4e457830b77e3e
2017-04-04 10:04:13 +10:00
Xidorn Quan
e3e4554871 Bug 1351957 - Create URLExtraData for holding base uri, referrer, and principal. r=heycam
MozReview-Commit-ID: 1wqTb3kvvWh

--HG--
extra : rebase_source : cae3dba21c916ab0f52056bd9db215249b650cd3
2017-03-30 18:54:48 +11:00
Jan Henning
8a6b5c9c8a Bug 1328868 - Part 2 - Apply the system font scale as an additional text zoom factor to all pages that are not font inflated. r=tnikkel
We want to use a similar model as Chrome on Android does for scaling our display of web content, that is use font inflation for desktop pages and plain text zooming for everything else.

Since we don't want to simply clobber any text zoom that might have been set by the user/front-end code, we allow setting and storing the system font scale separately on the PresContext. We then calculate the effective text zoom value as the product of the system font scale and the current text zoom value.

Any function that is using the PresContext's TextZoom value for layouting/rendering is switched over to this new EffectiveTextZoom value, whereas functions that are interested in the text zoom as actually set by the user/front-end (e.g. the nsDocumentViewer, or the code responsible for copying text and full zoom settings into the new PresContext on page navigation) continue using the plain TextZoom value.

As long as font inflation is enabled in principle (e.g. font.size.inflation.minTwips != 0), every page starts out as eligible for font inflation until the relevant meta viewport tags marking the page as "mobile friendly" have been detected. Since the PresShell caches the font inflation state and only recalculates it when necessary, we make use of that and set the PresContext's system font scale as necessary whenever the font inflation state has been refreshed.

MozReview-Commit-ID: 2InyE04wKAW

--HG--
extra : rebase_source : 3f6d7128f37c1dc18f67a6655f86d9a3003fe90b
extra : source : 6100458b97289f9aea5ac8fda57ded045e6860b7
2017-02-25 13:22:52 +01:00
cku
cff2217b9d Bug 1343139 - Part 2. (Main) Add nsChangeHint_UpdateContainingBlock hint when HasMask state changed. r=heycam
Look into the test case on bugzilla attachment:
o1.animate([{"mask": "linear-gradient(red,blue)", "transform": "none"}], 100);

If I replace mask by a filter effect, we won't hit that assertion. Then I looked
into nsStyleStruct, compared nsStyleSVGReset::CalcDifference with
nsStyleEffects::CalcDifference, and noticed that we miss a hint in nsStyleSVGReset:
nsStyleEffects::CalcDifference(const nsStyleEffects& aNewData) const
{
  //....
  if (HasFilters() != aNewData.HasFilters()) {
    // A change from/to being a containing block for position:fixed.
    hint |= nsChangeHint_UpdateContainingBlock;
  }
}

MozReview-Commit-ID: KeViMShnMAK

--HG--
extra : rebase_source : 35a0c4468f966d67905fa945e1ef4b16eaac6e6f
extra : source : d238abed68d3e70df3f33dbed3b58aa1754b3f67
2017-03-07 13:39:15 +08:00
cku
a9228a48bc Bug 1343139 - Part 1. Implement nsStyleSVGReset::HasMask. r=heycam
Implement this unil function to improve readability
MozReview-Commit-ID: FLKOGyq180W

--HG--
extra : rebase_source : db8dbc67dbc63c19df806e79ea36016d3d5fc8b6
extra : source : 47fa0a1f03acd6007e2d40e4ec5bc0ddba221361
2017-03-07 13:43:21 +08:00
Ting-Yu Lin
5696ee9603 Bug 1322570 Part 2 - Resolve {align,justify}-self using StyleContext from alignment container frame in ReflowInput::InitConstraints(). r=dholbert
Per bug 1322570 comment 46, it's not easy to replace ComputedJustifyItems()
and UsedJustifySelf()'s internal nsStyleContext::GetParent() without
correctness penalty, so we use GetParentAllowServo() for now.

Also, fix the reftest.list added in bug 1334403 which incorrectly wrote test
page as reference page.

MozReview-Commit-ID: 6kAAWSFojd5

--HG--
extra : rebase_source : 2d03302115dd40281cec27bc18750b6933682855
2017-03-20 14:12:08 +08:00
Mats Palmgren
eeffa0c3eb Bug 1333482 part 1 - [css-ui] Introduce the 'appearance: auto | none' property. r=dholbert
MozReview-Commit-ID: 3itCDTKuYQ9
2017-03-23 22:11:17 -07:00
Bobby Holley
e1fdc9a6a2 Bug 1347435 - Use a wrapper class to maintain the mBinding invariant and stop resolving during the cascade. r=emilio 2017-03-22 20:17:18 -07:00
Ting-Yu Lin
dd4484225f Bug 1338446 Part 4 - Label StyleImageRequestCleanupTask. r=heycam
If nsStyleImageRequest::Resolve() has been called, we cache the DocGroup and
use it for dispatching events for the clean up task. Otherwise, it's safe to
do clean up task on non-main thread.

MozReview-Commit-ID: BXalEkc6dBm

--HG--
extra : rebase_source : ccc7c43a385f3149b53763030419561fc64efbfa
2017-03-14 21:29:55 +08:00
cku
c486e7014c Bug 1340044 - Part 2. Rename value in StyleGeometryBox. r=heycam
This change is to use gecko_enum_prefix in helpers.mako.rs, so that we do not
need to manually write code for nsStyleDisplay::mTransformBox.

MozReview-Commit-ID: 7UAL0iUcSIO

--HG--
extra : rebase_source : e99b7c163991df7ef3e7c0404fcef1832718a150
2017-03-16 15:18:10 +08:00
cku
85448394ac Bug 1340044 - Part 1. Declare mTransformBox as StyleGeometryBox. r=heycam
MozReview-Commit-ID: 9fcHkDtNHhL

--HG--
extra : rebase_source : 61cdec71eea4f80e2e1e702bf6a03132287545a3
2017-03-15 12:21:07 +08:00
Bobby Holley
25a6e79a53 Bug 1347399 - Use a thread-safe URI comparison in CalcStyleDifference. r=heycam
MozReview-Commit-ID: Fpb1guCxXUZ
2017-03-16 20:18:57 -07:00
Manish Goregaokar
8b8d456955 Bug 1296477 - Part 2: stylo: Implement remaining content values; r=heycam
MozReview-Commit-ID: 9fLM5bdR8hr

--HG--
extra : rebase_source : f1397129408e7e9763733c026855a99321b09656
2017-03-11 22:40:54 -08:00
cku
1f0fb806e9 Bug 1345739 - Implement nsStyleImageRequest::GetImageURI. r=heycam
MozReview-Commit-ID: Jqhio1RaqG1

--HG--
extra : rebase_source : eb82e8f4e5e3376e1f2ae5866f964765a7972c4e
2017-03-09 13:03:32 +08:00
cku
35c9e03f96 Bug 1345377 - Implement URLValueData::HasRef. r=heycam
Improve code readability.

MozReview-Commit-ID: HDJ7TeyqCpN

--HG--
extra : rebase_source : 228b5915fcf002b8f27283b9d0df4bf2b544b2f1
2017-03-07 17:31:48 +08:00
Boris Chiou
89f3bc4396 Bug 1248340 - Part 1: Add the type of Frames in nsTimingFunction. r=birtles
MozReview-Commit-ID: GPn8D9gwjqa

--HG--
extra : rebase_source : 25e9f5f5d94545e26e467fe8666c03d8d222cda2
2017-02-24 14:34:08 +08:00