Commit graph

505 commits

Author SHA1 Message Date
Matt A. Tobin
4e14355697 Bug 1372829 - Part 2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr
Tag #1375
2020-04-18 07:04:22 +08:00
Matt A. Tobin
5d444ef68a Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument
Tag #1375
2020-04-18 07:04:19 +08:00
Matt A. Tobin
6aa436b588 Bug 1365092 - Move side effects of SetAttr and ParseAttribute to BeforeSetAttr and AfterSetAttr
* Moves side effects of nsGenericHTMLElement and Element's SetAttr, UnsetAttr, and ParseAttribute functions to the corresponding BeforeSetAttr and AfterSetAttr functions
* Moves side effects of HTMLAnchorElement's SetAttr, UnsetAttr, and ParseAttribute functions to the corresponding BeforeSetAttr and AfterSetAttr functions
* Moves side effects of HTMLImageElement's SetAttr function to the corresponding BeforeSetAttr and AfterSetAttr functions
* Moves side effects of SetAttr, UnsetAttr, and ParseAttribute functions to BeforeSetAttr and AfterSetAttr

Tag #1375
2020-04-18 07:04:04 +08:00
Matt A. Tobin
9d8343e19c Bug 1367683 - Optimize initializing nsRange
Tag #1375
2020-04-18 07:04:01 +08:00
Matt A. Tobin
1f233fa14b Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr
Tag #1375
2020-04-18 07:03:55 +08:00
Matt A. Tobin
d3ffda520f Bug 1355351 - Make pseudo-elements return the correct style via getComputedStyle
* Add a node property to access the ::before and ::after pseudo-elements
* Look for the frame for ::before and ::after pseudos
* Clean up pseudo-element props
* Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos

Tag #1375
2020-04-18 07:03:44 +08:00
Matt A. Tobin
6b48075b57 Issue #1375 - Include content rules from HTMLTableCellElement::WalkContentStyleRules and move to the mapped attr functionality
* Bugs 1341647 and 1341648
2020-04-18 07:03:41 +08:00
Matt A. Tobin
922cbf0217 Bug 1352389 -Don't push extra script blocker on stack when setting attributes
Tag #1375
2020-04-18 07:03:37 +08:00
Matt A. Tobin
c37b4d0c63 Bug 1330843 - Allow JS to create NAC pseudo-elements
Tag #1375
2020-04-18 07:03:31 +08:00
Matt A. Tobin
fda213de85 Bug 1346623 - Allow anonymous content created with nsIDocument::InsertAnonymousContent can change from non-native to native AC
* Prevent canvas custom content from becoming NAC when reframing the root element
* Add an API to get computed style values through an AnonymousContent object

Tag #1375
2020-04-18 07:03:28 +08:00
Matt A. Tobin
7a3f9be509 Bug 656197 - Push state updates further out across beforesetattr/aftersetattr
* Remove the generic attr preparsing mechanism from BeforeSetAttr and just preparse class attributes directly in the one place that needs to do it
* Move calls to BeforeSetAttr to after AttributeWillChange
* Remove UpdateState calls in BeforeSetAttr
* Move calls to AfterSetAttr to before UpdateState when manipulating attributes
* Remove UpdateState calls from AfterSetAttr, since they are no longer needed there

Tag #1375
2020-04-18 07:03:22 +08:00
Matt A. Tobin
484b481031 Issue #1375 - Overload FromContent() to work with const 2020-04-18 07:03:16 +08:00
Matt A. Tobin
8e51f64cad Bug 1343937 - Fix a crash in nsWrapperCache.h
* Implement and use GetInFlowParent
* Exempt scrollbar NAC from the new NAC semantics

Tag #1375
2020-04-18 07:03:11 +08:00
Matt A. Tobin
b723a5c8c4 Bug 1331322 - Allow tagging of pseudo-implementing native anonymous content with the pseudo type at creation time
* Stop using a node bit for HasExplicitBaseURI
* Move MAY_HAVE_CLASS to mBoolFlags
* Add a flag to indicate that a node is native anonymous content
* Allow tagging of pseudo-implementing native anonymous content with the pseudo type at creation time, and eliminate explicit style contexts in nsIAnonymousContentCreator::ContentInfo

Tag #1375
2020-04-18 07:03:03 +08:00
Matt A. Tobin
a03838af22 Bug 1321284 - Crash in nsCSSFrameConstructor::GetInsertionPrevSibling when trying to reframe native anonymous content
* Make StyleChildrenIterator skip NAC generated by root element primary frame ancestors.
* Add nsINode::GetFlattenedTreeParentNodeForStyle.
* Add iterator class to find all restyle roots.

NOTE: Parts 1, 2, and "4.2"

Tag #1375
2020-04-18 07:02:47 +08:00
Matt A. Tobin
cb2b45e472 Bug 1305458 - Changing -moz-appearence on hover breaks change event
* Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent
* Add nsIDOMEventTarget::PreHandleEvent
* Add EventTargetChainItem::GetFirstEventTarget
* Call EventTargetChainItem::PreHandleEvent even it sets mCanHandle=false
* Move form control frame focus/blur from nsGenericHTMLFormElement::GetEventTargetParent to PreHandleEvent
* Move fire change event from HTMLTextAreaElement::GetEventTargetParent to PreHandleEvent
* Refine nsXULElement::GetEventTargetParent
* Move dispatch XUL command from nsXULElement::GetEventTargetParent to PreHandleEvent
* Move fire events and set value from HTMLInputElement::GetEventTargetParent to PreHandleEvent
* Add test case
* Let HTMLInputElement delegate event handling to it's parent class
* Refine EventTargetChain flags to reduce overheads
* Refine event target chain creation
* Refine assertion in EventTargetChainItem::Create

Tag #1375
2020-04-18 07:02:44 +08:00
Roy Tam
cf086d4da7 Merge remote-tracking branch 'origin/master' into custom 2020-03-20 09:12:43 +08:00
wolfbeast
41bd0de230 [DOM] Make sure to exit fullscreen mode if popups are opened or focused. 2020-03-20 08:58:35 +08:00
Roy Tam
55828393ce Merge remote-tracking branch 'origin/master' into custom 2020-02-27 07:37:41 +08:00
wolfbeast
f802a821cb [DOM] Add a null check 2020-02-27 07:35:38 +08:00
Roy Tam
29201b8059 Merge remote-tracking branch 'origin/master' into custom 2020-02-08 07:21:43 +08:00
Matt A. Tobin
146d0aa2d2 Issue #1395 - Remove FlyWeb Service 2020-02-08 07:11:37 +08:00
Roy Tam
c9f0b81b06 Merge remote-tracking branch 'origin/master' into custom 2020-02-07 08:01:35 +08:00
Matt A. Tobin
eda1d47bc7 Issue #1390 - Get rid of the Presentation API 2020-02-07 08:00:30 +08:00
win7-7
51f5cb3576 Issue #1384 - Match standard for colSpan/rowSpan
HTML standardizes proper behavior of colSpan and rowSpan:

The main thing is that getting the .rowSpan and .colSpan IDL properties will now return the actual clamped value that we use.
2020-02-07 07:57:04 +08:00
Roy Tam
c7bc87cff9 Merge remote-tracking branch 'origin/master' into custom 2020-01-31 07:59:13 +08:00
Gaming4JC
57da7a1935 Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition
Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value), we could use nodeInfo->NameAtom() instead.

Tag UXP Issue #1344
2020-01-31 07:40:59 +08:00
Gaming4JC
2cdd48f819 Bug 1430034 - Fix attributeChangedCallback isn't fired with correct newValue when the attribute value is an empty string;
Tag UXP Issue #1344
2020-01-31 07:40:56 +08:00
Gaming4JC
a6339bef90 Bug 1421544 - Lazy push/pop CustomElementReactionsStack entry;
Tag UXP Issue #1344
2020-01-31 07:40:53 +08:00
Gaming4JC
a9b3ebace0 Bug 1413815 - Convert 'observedAttributes' to a sequence<DOMString>
Tag UXP Issue #1344
2020-01-31 07:40:51 +08:00
Gaming4JC
f64c7135b4 Bug 1407669 - Fix custom element creation hides uncatchable exceptions from the constructor.
Tag UXP Issue #1344
2020-01-31 07:40:48 +08:00
Gaming4JC
506795f384 Bug 1419305 - Part 2: Keep processing remaining elements in ElementQueue even if some of elements are already unlinked
Tag UXP Issue #1344
2020-01-31 07:40:45 +08:00
Gaming4JC
8a0e7286e0 Bug 1419305 - Part 1: Use MicroTask on CustomElements correctly
Tag UXP Issue #1344
2020-01-31 07:40:42 +08:00
Gaming4JC
249667092c Bug 1406922 - Make CycleCollectedJSContext to handle microtasks and make MutationObserver to use them
Tag UXP Issue #1344
2020-01-31 07:40:39 +08:00
Gaming4JC
fb6f6ec903 Bug 1405821 - Move microtask handling to CycleCollectedJSContext
Tag UXP Issue #1344
2020-01-31 07:40:36 +08:00
Gaming4JC
5db13d0f4b Bug 1415761 - Catch the exception and rethrow it after invoking custom elements reactions;
The spec was unclear on how CEReactions interact with thrown exceptions; see https://github.com/whatwg/html/issues/3217. The spec is now being clarified in https://github.com/whatwg/html/pull/3235.

Tag UXP Issue #1344
2020-01-31 07:40:30 +08:00
Gaming4JC
3639f0e2bd Bug 1396620 - Part 2: Fix compartment mismatch crash when doing old prototype swizzling for custom element
Tag UXP Issue #1344
2020-01-31 07:40:28 +08:00
Gaming4JC
baa035c5c4 Bug 1396620 - Part 1: Remove created callback for custom elements
Tag UXP Issue #1344
2020-01-31 07:40:25 +08:00
Gaming4JC
33693080a5 Bug 1400762 - Make dom.webcomponents.enabled pref doesn't control CustomElements feature
Tag UXP Issue #1344
2020-01-31 07:40:21 +08:00
Gaming4JC
b70a9b1d12 Bug 1405335 - Remove custom element attached and detached callbacks validation checks
Tag UXP Issue #1344
2020-01-31 07:39:56 +08:00
Gaming4JC
dba59f0317 Bug 1406325 - Part 5: Implement try to upgrade.
Tag UXP Issue #1344
2020-01-31 07:39:51 +08:00
Gaming4JC
db3b6b5884 Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue #1344
2020-01-31 07:39:47 +08:00
Gaming4JC
c4718c47bb Bug 1406325 - Part 3: Refactor custom elements clone a node.
Tag UXP Issue #1344
2020-01-31 07:39:44 +08:00
Gaming4JC
05b01709b8 Bug 1406325 - Part 2: Set CustomElementData when cloning a node.
Tag UXP Issue #1344
2020-01-31 07:39:41 +08:00
Gaming4JC
cce9b3379a Bug 1406325 - Part 1: Make sure custom element state is custom before sending callback.
Tag UXP Issue #1344
2020-01-31 07:39:37 +08:00
Gaming4JC
5d26d32825 Bug 1378079 - Part 3: Complete the steps related to custom elements in "create an element for a token".
With fixup for missing header due to unified builds.

Tag UXP Issue #1344
2020-01-31 07:39:34 +08:00
Gaming4JC
a3b5d98af7 Bug 1378079 - Part 2: Introduce throw-on-dynamic-markup-insertion counter.
Per spec, document objects have a throw-on-dynamic-markup-insertion counter, which is used in conjunction with the create an element for the token algorithm to prevent custom element constructors from being able to use document.open(), document.close(), and document.write() when they are invoked by the parser.

Tag UXP Issue #1344
2020-01-31 07:39:02 +08:00
Gaming4JC
76b1eaa538 Bug 1410790 - Add more assertion in CustomElementData::SetCustomElementDefinition and GetCustomElementDefinition;
This is a follow-up patch for bug 1392970. Since we only set CustomElementDefinition on a custom element which is custom, we could add more assertion to ensure that.

Tag UXP Issue #1344
2020-01-31 07:38:53 +08:00
Gaming4JC
c0e1a6e397 Bug 1352290 - Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue;
Tag UXP Issue #1344
2020-01-31 07:37:59 +08:00
Gaming4JC
eb9d4bb8df Bug 1407937 - Move mDefinition from CustomElementReacion to CustomElementUpgradeReaction;
Tag UXP Issue #1344
2020-01-31 07:37:56 +08:00