Commit Graph
12 Commits
Author SHA1 Message Date
Brian Birtles e0c8e2c737 Bug 1365472 - Use animated class names when doing selector matching in Servo; r=heycam
Using SVG SMIL it is possible to animate the class attribute of an element using
markup such as the following:

  <style>
    .red {
      fill: red;
    }
  </style>
  <svg>
    <circle cx="50" cy="50" r="30" fill="blue">
      <set attributeName="class" to="red" begin="1s"/>
    </circle>
  </svg>

In Gecko, Element::GetClasses handles this case by looking for an animated class
string when the element in question is an SVG element.

This patch causes our Servo bindings to use GetClasses when querying attribute
values for selector matching.

Note that animating the class attribute is *not* expected to affect attribute
selectors such as `circle[class="red"]`. It does in Chrome, but that is due to
a Blink bug where animating attributes using SMIL affects the result of
getAttribute:

  https://bugs.chromium.org/p/chromium/issues/detail?id=735820

This patch adjusts the behavior for both the GeckoElement case and the
ServoElementSnapshot case.

MozReview-Commit-ID: DAFWHSH1aYB
2017-06-27 10:55:03 -07:00
Emilio Cobos Álvarez 5808ad7655 Bug 1368240: Record whether an snapshot is recording a class attribute change or id change. r=heycam
I'll use this information in order to get fewer dependencies out of the
dependency set.

MozReview-Commit-ID: 5HlmKmSNO8p
2017-06-13 15:52:42 +02:00
Cameron McCormack db62fb440e Bug 1365162 - Part 3: Record on snapshots whether the element supports lang="" attributes. r=emilio
MozReview-Commit-ID: KpzwsKpBiOO
2017-06-07 11:11:44 +08:00
Cameron McCormack 7ac5893904 Bug 1365159 - Part 1: Record :-moz-browser-frame and :-moz-table-border-nonzero state on snapshots. r=emilio
MozReview-Commit-ID: BEglHnXhpYJ
2017-06-05 14:19:30 +08:00
Boris Zbarsky 5774429fdc Bug 1365659 part 2. Add id/class flags to stylo snapshots and set them correctly on the Gecko side. r=emilio
MozReview-Commit-ID: 4ylYDIbR3lI
2017-05-18 11:31:54 -04:00
Boris Zbarsky 6fd7955bb2 Bug 1365659 part 1. Change stylo element snapshot member ordering to pack a bit better. r=emilio
MozReview-Commit-ID: 4pe8JJAXiXz
2017-05-18 11:30:42 -04:00
Bobby Holley d32ad433ef Bug 1362549 - Assert against accessing the attributes of a snapshot that doesn't have attributes saved. r=emilio
MozReview-Commit-ID: 8BsnTF6uIGM
2017-05-05 18:13:30 -07:00
Bobby Holley 3775205e64 Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal. r=emilio
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-25 10:06:39 -08:00
Emilio Cobos Álvarez 53df0418ff Bug 1290335: stylo: Assert the snapshot is taken in ServoRestyleManager::AttributeChanged. r=heycam
Also fixes an embarrassing typo in the implementation of
ServoElementSnapshot::AddAttrs.

MozReview-Commit-ID: 7LHZVLo6j60
2016-08-03 15:11:15 -07:00
Jonathan Kingston cbe9f85c5f Bug 1173199 - Create preference to disable MathML. r=heycam, r=huseby, r=smaug
If the mathml.disabled preference is true, treat <math> and other MathML
elements as generic XML elements.

This patch disables the rendering code of MathML however preserves the
namespace so to reduce the breakage.

Original patch by: Kathy Brade <[email protected]>

MozReview-Commit-ID: A2f2Q2b4eqR
2016-06-28 15:24:48 +01:00
Emilio Cobos Álvarez e054965222 Bug 1287951: followup: Know if a snapshot belongs to a HTML element in an HTML document at construction time. r=heycam
MozReview-Commit-ID: eN0j8vnesa
2016-07-30 15:03:31 -07:00
Emilio Cobos Álvarez 029cda8ee4 Bug 1287951: stylo: Add support for computing style hints from Servo. r=heycam
MozReview-Commit-ID: ALuJxcfAMuL
2016-07-21 16:57:52 -07:00