Commit Graph

326 Commits

Author SHA1 Message Date
Daisuke Akatsuka
4e8abff7f9 Bug 1210796 - Part 1a: Add GetUnanimatedComputedStyle into nsIDOMWindowUtils to use in animationinspector of devtools. r=birtles,heycam
In this patch, we implement nsIDOMWindowUtils::GetUnanimatedComputedStyle
which returns computed value of given CSS property without animation rule.  This
method is used from the DevTools animation inspector to fill in keyframe values
when the property value is null (indicating that the underlying/base value is
being used).

In order to implement this, we extend nsComputedDOMStyle constructor to fetch
the computed style minus animation style (i.e. the base style). This is somewhat
complicated by the fact that for discrete animation.
StyleAnimationValue::ExtractComputedValue may return ‘unset’, ‘initial’ or
‘inherit’. For example, if the author uses the 'unset' 'initial' or 'inherit'
keyword for a discrete property (e.g. 'align-content’), ExtractComputedValue
returns the keywords as-is. Furthermore, if the user does not set any specific
keyword, ExtractComputedValue returns ‘unset’.  We use this new
nsComputedDOMStyle mechanism to resolve these keywords into a valid keyword for
computed style in the same way as other properties (e.g. ‘opacity’).

MozReview-Commit-ID: HffJ9SCDf2k
2017-04-18 12:15:47 +09:00
Xidorn Quan
965dabfa7a Bug 1355683 - Remove Window.getDefaultComputedStyle. r=bz
MozReview-Commit-ID: A2IwfiJiPL
2017-04-13 16:50:37 +08:00
Xidorn Quan
c61841a1ad Bug 1343964 part 7 - Use URLExtraData for declaration modification directly for Servo backend. r=heycam
MozReview-Commit-ID: 78JRYKk9hgV
2017-04-04 16:09:20 +10:00
Brian Birtles
7eef79dbda Bug 1315874 - Make GetStyleContextWithoutAnimation not flush; r=heycam
There are currently no call sites of GetStyleContextWithoutAnimation
but there are a couple of places (including this patch series) where we would
like to use such a method, but without the flushing behavior.

This patch drops the flushing from GetStyleContextWithoutAnimation and
renames it to GetUnanimatedStyleContextNoFlush. It also makes a few other minor
tweaks:

* Adds the aStyleType parameter for consistency with GetStyleContextNoFlush and
  GetStyleContext
* Moves the implementation of this method and GetStyleContextNoFlush to the
  header file since they simply wrap DoGetStyleContextNoFlush.
* Changes the order of these declarations so that the more specialized method
  comes later.
* Drops the comment describing the method since both the method name and the
  inline definition should now make it obvious what it is doing.

(Actually making this method not return animation styles when it re-uses an
existing style context will happen in the next patch.)

MozReview-Commit-ID: JYeim4A9Imr
2017-04-03 16:49:09 +09:00
Brian Birtles
4de61d72aa Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F
2017-04-05 14:39:23 +09:00
Mats Palmgren
8297bf43a1 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
Neerja Pancholi
5fddb99f6b Bug 1339298 - Add boilerplate code for CSS3 multicol column-span parsing and define pref 'layout.css.column-span.enabled' to toggle it. r=dholbert
MozReview-Commit-ID: 6aSlRhcKm8i
2017-02-13 16:57:33 -08:00
jeremychen@mozilla.com
8e500e1044 Bug 276079 - parse and compute CSS text-justify property. r=xidorn
MozReview-Commit-ID: K3bh0H2SPnE
2017-03-01 20:58:25 +08:00
Neerja Pancholi
55ce6ad5a8 Bug 1339619 - Refactor parsing code for '-moz-text-size-adjust' to use the (more conventional) keyword table approach to calculate computed style. r=dholbert
MozReview-Commit-ID: 2mawqnlUh8t
2017-02-16 13:27:16 -08:00
cku
1819876e04 Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce
2017-02-21 23:26:17 +08:00
Carsten "Tomcat" Book
1bff0b1adf Backed out changeset fb3c04effbd1 (bug 1336905) for bustage in stylo builds 2017-02-14 11:07:17 +01:00
cku
b2b713cfd2 Bug 1336905 - Part 1. Remove StyleShapeSource's template argument. r=heycam,TYLin
MozReview-Commit-ID: FHTwGyXHsce
2017-02-06 15:50:22 +08:00
Hiroyuki Ikezoe
6f69d969b2 Bug 1330190 - Part 1: Add nsComputedDOMStyle::GetStyleContextForElementWithoutAnimation. r=heycam
We need another variant of GetStyleContextForElement() that does not consider
animation rules at all to get the base styles of the target element (i.e.
styles without animations).
In subsequent patches we also skip nsAnimationManager::UpdateAnimations() and
EffectCompositor::UpdateEffectProperties() to avoid (indirect) recursive calls
for resolving style of the same element.

MozReview-Commit-ID: G5olgXIMtvY
2017-01-16 16:57:09 +09:00
Ting-Yu Lin
9eb2a46c79 Bug 1320014 Part 11 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function. r=mats
Because the new function checks types, we need to change the fullCorner type
in nsComputedDOMStyle::GetEllipseRadii() and
StyleAnimationValue::ExtractComputedValue() from uint8_t to |Corner| to fix
build error.

MozReview-Commit-ID: 5NuFE3yA2QD
2017-01-05 14:59:17 +08:00
Xidorn Quan
7749bec582 Bug 1063162 part 2 - Implement caret-color property. r=dholbert
MozReview-Commit-ID: DH7CX1d477R
2016-12-22 11:04:15 +11:00
cku
b00f9ec88d Bug 1311270 - Part 3. Replace {bg|mask}-origin/{bg|mask}-clip constants by StyleGeometryBox.
MozReview-Commit-ID: DYokhDa9fFQ
2016-11-22 15:30:01 +08:00
Jonathan Kew
458d6a28c3 Bug 1321022 pt 4 - Implement CSS parsing of the font-variations-setting property, storing the value into nsFont. r=dholbert 2016-12-03 12:18:36 +00:00
Ting-Yu Lin
03d0c3c4c4 Bug 1317588 Part 2 - Remove mozilla::css::Side typedef. r=mats
This patch is written with the help of the following script.

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "css::Side" "Side"

MozReview-Commit-ID: DPV6vivpPUp
2016-11-18 16:28:38 +08:00
Brad Werth
a55dd18df2 Bug 1304636 Part 1: Make GetComputedStyle report 'auto' for min-width:auto flex/grid items. r=dholbert
MozReview-Commit-ID: 3snktoHTohq
2016-11-18 13:47:30 -08:00
Xidorn Quan
0124519d82 Bug 1294299 part 1 - Make nsDOMCSSDeclaration use DeclarationBlock. r=heycam
MozReview-Commit-ID: B2eHrpxOMJ8
2016-11-03 14:41:02 +11:00
Manish Goregaokar
f35d90e274 Bug 1311959 - Remove marker-offset; r=tromey,xidorn
MozReview-Commit-ID: 72Fse0z1BiY
2016-10-21 15:34:46 +05:30
Cameron McCormack
a9fde7344c Bug 1298774 - Part 9: Remove FragmentOrURL. r=cjku
MozReview-Commit-ID: Du10tRgKtQ4
2016-10-11 14:56:12 +08:00
Cameron McCormack
6c5d4ffa1f Bug 1298774 - Part 4: Make ShapeStyleSource use css::URLValue for url() storage instead of FragmentOrURL. r=cjku
MozReview-Commit-ID: CQy6ArR48Sp
2016-10-11 14:56:11 +08:00
Astley Chen
91185e25aa Bug 1292447: part 2 - Get border-*-radius and outline-radius-* props value resolved to computed value. r=xidorn
MozReview-Commit-ID: L05tISAdu0q
2016-10-03 18:14:20 +08:00
Xidorn Quan
dcfa696ded Bug 1299741 part 11 - Change text-{emphasis,fill,stroke}-color to using StyleComplexColor. r=dbaron
MozReview-Commit-ID: 1MlgGAkdPn8
2016-09-16 14:40:45 +10:00
tlin@mozilla.com
ac64370cdb Bug 1295084 Part 4 - Rename Position::PositionCoord to Position::Coord. r=dholbert 2016-08-25 09:59:51 +00:00
tlin@mozilla.com
299b487db0 Bug 1295084 Part 3 - Move nsStyleImageLayers::Position to mozilla::Position. r=dholbert 2016-08-25 09:59:51 +00:00
tlin@mozilla.com
67549f401c Bug 1295084 Part 1 - Move FragmentOrURL into mozilla namespace. r=dholbert 2016-08-25 09:59:51 +00:00
Ting-Yu Lin
1bcd857cd6 Bug 1288626 Part 8 - Add shape-outside support to style system. r=heycam
I have to move the definition of StyleBasicShape and StyleShapeSource prior to
where nsStyleDisplay::mShapeOutside is defined since the template struct need to
be fully defined before using as a member variable.

Use SetIdent() in CreatePrimitiveValueForBasicShapeOrURL() in
nsComputedDOMStyle.cpp per bug 1288626 comment 6.

MozReview-Commit-ID: 1KZS299CFul
2016-07-22 15:40:01 +08:00
Ting-Yu Lin
5256d6f706 Bug 1288626 Part 7 - Rename StyleClipShapeSizing to StyleClipPathGeometryBox. r=heycam
Change to geometry box to match the name in the spec.
https://drafts.fxtf.org/css-masking-1/#the-clip-path

MozReview-Commit-ID: 8jDTynCkJ4A
2016-07-28 13:45:43 +08:00
Ting-Yu Lin
403c83e1f8 Bug 1288626 Part 3 - Rename nsStyleBasicShape to StyleBasicShape. r=heycam
MozReview-Commit-ID: 9NUKpZ4s4kG
2016-07-27 18:14:36 +08:00
Ting-Yu Lin
556b5d389a Bug 1288626 Part 1 - Move nsBasicShape and nsStyleClipPath into mozilla namespace. r=heycam
MozReview-Commit-ID: D9wwa1rLUNa
2016-07-27 17:38:26 +08:00
cku
c3dd18c64e Bug 1288812 - Part 1. Serialize just the fragment for local urls. r=heycam
MozReview-Commit-ID: 7FQ5hXgG3gg
2016-08-06 06:51:44 +08:00
Jeremy Chen
2c264512f6 Bug 1289007 - part1: parse and compute initial-letter property. r=heycam
MozReview-Commit-ID: E0eXolZ93oJ
2016-07-28 15:23:36 +08:00
Manish Goregaokar
f0b17743f1 Bug 1287755 - Replace NS_STYLE_CLIP_SHAPE_SIZING_* with an enum class; r=heycam
MozReview-Commit-ID: KutLb8H9JOk
2016-07-20 11:12:42 +05:30
Jonathan Watt
9c5b8de022 Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Thomas Wisniewski
43fe8110fa Bug 955857 - Replace CSS word-wrap with overflow-wrap, and add it back as a CSS_PROP_ALIAS. r=dbaron
MozReview-Commit-ID: FiZJvm25rNN
2016-05-23 20:27:21 -04:00
Ting-Yu Lin
8b56b9553d Bug 1274835 - Refactor code to process basic shape from clip-path. r=heycam
This can be used in the implementation of shape-outside.

MozReview-Commit-ID: C7bd4D2Kwpm
2016-05-22 20:41:19 +08:00
Markus Stange
ccb436a498 Bug 550426 - Add support for {background,mask}-position-{x,y}, computed style additions. r=dbaron
MozReview-Commit-ID: 5GSsS7EYwfB
2016-04-21 20:23:02 -04:00
Wes Kocher
1a290e54b0 Backed out 10 changesets (bug 550426) for failures in browser_css_autocompletion.js
Backed out changeset 6ff2e12738ca (bug 550426)
Backed out changeset 10ee68fd318e (bug 550426)
Backed out changeset 324f4f602730 (bug 550426)
Backed out changeset 81306e78ccaa (bug 550426)
Backed out changeset 44b820f6fb3d (bug 550426)
Backed out changeset 987b6ff7262e (bug 550426)
Backed out changeset d505646974c7 (bug 550426)
Backed out changeset 2162ecc18859 (bug 550426)
Backed out changeset 1a030aba3acc (bug 550426)
Backed out changeset 3655883e7faf (bug 550426)

MozReview-Commit-ID: AlUihrLtlhL
2016-04-29 14:47:43 -07:00
Markus Stange
fe03743b6b Bug 550426 - Add support for {background,mask}-position-{x,y}, computed style additions. r=dbaron
MozReview-Commit-ID: 5GSsS7EYwfB
2016-04-21 20:23:02 -04:00
Jeremy Chen
753e4f7268 Bug 1248708 - Part1: parse and compute -webkit-text-stroke property. r=heycam 2016-04-23 01:40:39 +08:00
Tobias Schneider
bf5c366559 Bug 1209273 - Part 1: Support for adjust-color CSS property. r=dbaron 2016-03-08 09:25:24 -08:00
Carsten "Tomcat" Book
a5ce6d8137 Backed out changeset d5a9ff0ae110 (bug 1209273) for test failures in browser_rules_completion-new-property_02.js 2016-04-01 11:58:12 +02:00
Tobias Schneider
db4a5786ac Bug 1209273 - Part 1 - Support for color-adjust CSS property. r=dbaron 2016-03-10 10:51:00 +01:00
Jeremy Chen
f9662ce154 Bug 1247777 - Part1: parse and compute -webkit-text-fill-color property. r=heycam 2016-03-25 15:54:49 +08:00
CJKu
3c9eb1e509 Bug 1243734 - Part 1. Use MOZ_ENABLE_MASK_AS_SHORTHAND to define the type of mask property; r=dbaron
MozReview-Commit-ID: FkPgdh8YHOC
2016-03-01 19:52:17 +08:00
CJKu
9859c96940 Bug 686281 - Mask CSS parsing and Mask DOM API. r=dbaron 2016-01-28 06:28:00 +01:00
CJKu
d5371994d3 Bug 686281 - Implement nsStyleImageLayers; r=dbaron 2016-01-28 06:24:00 +01:00
Mats Palmgren
f2de56b86a Bug 1240795 - [css-grid] Refactor GetComputedTemplateColumns/Rows to return a self-contained value. r=dholbert 2016-01-27 17:02:13 +01:00