Commit Graph

30 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0e017c4d17 Bug 1469108: Propagate directionality to the shadow tree. r=smaug
Make it so that directionality of the ShadowRoot descendants is computed based
on the host and it's ancestors, but don't touch the dir=auto code, since I don't
think anybody agrees with what needs to happen there, and I think in general
it shouldn't be accounted for.

MozReview-Commit-ID: AZMBZ5m1SQf
2018-06-18 18:26:23 +02:00
Emilio Cobos Álvarez
8fe77fdc7f Bug 1469108: Fix some pre-existing style issues / unnecessary default arguments. r=smaug
MozReview-Commit-ID: 3oogRy66cwx
2018-06-18 18:26:04 +02:00
Emilio Cobos Álvarez
e354320a4a Revert three changesets (Bug 1451576) for causing bug 1467964 and since it's not generally sound. r=me
MozReview-Commit-ID: CZaLUNlGkX8
2018-06-12 16:52:52 -07:00
Boris Zbarsky
29bdf0fbd6 Bug 1462737. Make AsElement() not compile when called on Element or some subclass. r=mccr8
It's just noise if we already have an Element.
2018-05-18 23:37:56 -04:00
Timothy Guan-tin Chien
b094358998 Bug 1451576 - Allow dir=auto to work in native anonymous content r=Ehsan
The rules set in place in bug 839886 and bug 1377826 prevents any native
anonymous content to participate in auto-direction, both on having dir=auto
to work on it and have it to affect the direction of non-anonymous dir=auto
parent.

This patch relax the rules a little bit by allowing the anonymous element with
dir=auto to particiate in auto-direction. For simplicity, it would allow the
text node in to affact auto-direction only if the text node is the direct
children of the dir=auto parent.

This patch is needed for HTML-based in-content widget to display RTL
labels correctly. It shouldn't change any UI on its own; the purpose of
the fix here is to display RTL-text filenames correctly when bug 1446830
is fixed.

The change is needed in ResetDirectionSetByTextNode() because
when CC clean-up the document, the function is called from
nsTextNode::UnbindFromTree(). At that point, IsInAnonymousSubtree()
will cause an assertion error on when calling SubtreeRoot(),
since subtree hierarchy is already broken by earlier UnbindFormTree()
calls to our parent nodes.

Substitute that check with HasTextNodeDirectionalityMap() in and only
in ResetDirectionSetByTextNode() should be ok -- given the function
doesn't really do anything if HasTextNodeDirectionalityMap() is false.
There is no need to call EnsureMapIsClearFor() when the condition is false
either; EnsureMapIsClearFor() itself is a no-op if the condition is false.

MozReview-Commit-ID: GqF5ypDZcbH
2018-04-17 00:17:56 +08:00
Peter Van der Beken
a01d8c7c3b Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 3: Add message manager concrete classes for WebIDL. r=bz. 2017-06-14 16:44:17 +02:00
Boris Zbarsky
8dd8d25044 Bug 1446533 part 1. Rename nsGenericDOMDataNode to CharacterData. r=mystor
This is not renaming the files yet; that will be a separate changeset.

MozReview-Commit-ID: 5TxkEiQlaKF
2018-03-19 15:18:06 -04:00
Boris Zbarsky
a86373f271 Bug 1418076 part 11. Eliminate the nsIDOMHTMLDocument interface. r=mystor
MozReview-Commit-ID: 4lEcUeenbg3
2018-01-26 01:03:25 -05:00
Boris Zbarsky
a04420f06a Bug 1432186 part 19. Remove the nsIDOMNode::*_NODE constants. r=mccr8
MozReview-Commit-ID: KvKjeKIOB9K
2018-01-29 23:10:53 -05:00
Olli Pettay
c1989b8bdc Bug 1414452, clear dirAutoSetBy properties iteratively, r=peterv 2017-11-28 16:17:17 +02:00
Nicholas Nethercote
7dbfdaf890 Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP
2017-10-03 09:05:19 +11:00
Ehsan Akhgari
c86f263f8c Bug 1400701 - Don't use text nodes under <bdi> elements to determine the directionality of the ancestors; r=smaug 2017-09-26 14:30:15 -04:00
Xidorn Quan
9a382b0126 Bug 1377826 - Don't allow anonymous text node to affect ancestor direction. r=Ehsan
Given that elements in anonymous subtree have already been excluded from
participating in auto direction, it shouldn't make anything worse to
also exclude anonymous text node from that.

MozReview-Commit-ID: DJKiHqkvVvJ
2017-07-07 11:49:42 +10:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Olli Pettay
c3ee156039 Bug 1346590 - Simplify directionality handling by relying on cycle collector. r=ehsan 2017-06-27 19:48:31 -04:00
Boris Zbarsky
f41e6e5b7d Bug 1373798 part 3. Rewrite our existing checks for the state of the "dir" attr on top of the new event state flags. r=mystor
MozReview-Commit-ID: LpCYABK5ZRN
2017-06-19 23:24:59 -04:00
Wes Kocher
02c40a5aad Backed out 5 changesets (bug 1373798) for browser_parseable_css.js failures a=backout CLOSED TREE
Backed out changeset ef2e6aa3ae88 (bug 1373798)
Backed out changeset 0970ac62b245 (bug 1373798)
Backed out changeset dc19b4db7e51 (bug 1373798)
Backed out changeset a5dd7744170e (bug 1373798)
Backed out changeset 2c8752c4b6fb (bug 1373798)

MozReview-Commit-ID: J1WkPvRqELs
2017-06-19 15:56:47 -07:00
Boris Zbarsky
e9adc1a5c5 Bug 1373798 part 3. Rewrite our existing checks for the state of the "dir" attr on top of the new event state flags. r=mystor
MozReview-Commit-ID: LpCYABK5ZRN
2017-06-19 14:42:01 -04:00
Ehsan Akhgari
221d1382df Bug 1357656 - Part 1: Expose an nsIDOMWindowUtils method for retrieving the direction of a piece of text based on the first-strong character algorithm; r=mystor 2017-06-09 17:26:14 -04:00
Olli Pettay
c85d524432 Bug 1289970, ensure we don't remove valid Directionality map from textnode, r=ehsan 2016-08-11 02:54:55 +03:00
Ehsan Akhgari
5c66492286 Bug 1257208 - Use the nsTextNode concrete type in several places in DirectionalityUtils.cpp instead of nsINode and nsIContent; r=peterv 2016-03-23 14:24:56 -04:00
Sebastian Hengst
24467d4d4c Backed out changeset 01eff93538c8 (bug 1257208) for failing Reftest dir_auto-set-contained-dir-L.html and others. r=backout 2016-03-23 18:35:20 +01:00
Ehsan Akhgari
6b3fd8225c Bug 1257208 - Use the nsTextNode concrete type in several places in DirectionalityUtils.cpp instead of nsINode and nsIContent; r=peterv 2016-03-23 11:48:23 -04:00
Ehsan Akhgari
b6913d815d Bug 1228882 - Don't assume that the textnode has changed when checking whether any textnode descendants determine the directionality of a dir=auto ancestor; r=peterv 2016-03-18 16:34:58 -04:00
Nicholas Nethercote
4cd0479393 Bug 1181443 (part 1) - Use nsTHashtable::Iterator in nsCheapSet. r=froydnj.
nsCheapSet is used little enough that I didn't bother creating an iterator for
it.

I removed the dependency on PLDHashOperator by introducing nsCheapSetOperator,
which is equivalent.
2015-07-23 02:35:27 -07:00
Simon Montagu
aaaa2f56fc Bug 1169267: treat an empty nsTextDirectionalityMap as missing when changing text content 2015-06-01 18:31:42 +03:00
Ehsan Akhgari
66a11607b3 Bug 1103348 - Part 1: Correctly reset the direction of an ancestor that is still in the tree when a text node is removed; r=smontagu
This is essentially a better fix for bug 894137.  Relying on the aNullParent
argument to UnbindFromTree doesn't actually tell us if the dir=auto node
is still in the tree or not.  Instead, we can check the parent of the said
node and only reset the direction if the parent exists, which means that
the node is still in the tree.
2015-05-08 08:42:26 -04:00
Andrew McCreight
92010d3e4c Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrea Marchesini
6b10d5e43e Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Birunthan Mohanathas
e9068bbc4f Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00