Commit graph

186 commits

Author SHA1 Message Date
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
87bc2cab4e Bug 1343879 - Be consistent about the parent style context the document-level anonymous content container should get: it should get no parent style context.
Tag #1375
2020-04-18 07:03:18 +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
e5725baa34 Bug 1340885 - Null check frame's content when searching for NAC ancestors in GetCorrectedParent
Tag #1375
2020-04-18 07:03:08 +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
5b8f93694a Bug 1334358 - Remove nsCSSFrameConstructor::CreateAnonymousFrames
Tag #1375
2020-04-18 07:02:57 +08:00
Matt A. Tobin
499252b89f Bug 1334247 - Remove nsIAnonymousContentCreator::CreateFrameFor
Tag #1375
2020-04-18 07:02:54 +08:00
Matt A. Tobin
02ff2ef376 Issue #1375 - Fix unified sources 2020-04-18 07:02:50 +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
wolfbeast
92f7e0e48e Issue #1512 - Improve handling of multiple selections.
IsSelectionEditable should check whether the focus node and anchor node
aren't null before trying to use them.
This also changes the initialization of selections' aOutIndex to the
last range in the selection as a fallback in case we don't add a range
later (in AddItem) which could also end up with a null selection
otherwise if the additional selection nodes are removed.
2020-04-18 07:01:23 +08:00
wolfbeast
ece5e76725 [layout] Always move descendants of layout frames if moved.
If we move the frame then we always need to move any descendant views,
not just in case the frame itself has a view.
2020-04-11 09:40:49 +08:00
wolfbeast
ce621f34df Issue #1511 - Bail on orphan situation.
This resolves #1511
2020-04-11 09:40:48 +08:00
wolfbeast
db9dde67b9 Issue #1507 - Remove nsRefreshDriver's use of high res system timers.
Since we are using vsync for timing anyway in the layout refresh driver,
there is no need to bump the system timer resolution down to 1 ms.

This resolves #1507.
2020-04-11 09:40:25 +08:00
wolfbeast
1069ed9273 Issue #1355 - Make addition of cell border display items depend on
whether they should be drawn.

This reduces the size of display lists for tables by only adding display
list items that are actually going to be visibly drawn, which will help
overall performance of table drawing.
2020-03-20 08:58:29 +08:00
wolfbeast
30e381eea2 Issue #1485 - Fix incorrect grid cell sizing to min/max space.
There were actually two separate logical errors in this method:

The first part is that "origSizes.isSome()" is simply a bogus
requirement for applying min/max-sizes here. I'm still keeping
the optimization of not needlessly copying the mSizes array
(as originally intended) since it's a quite common case.

The second bug is that min/max-sizes were only applied under
the "if (fr != 0.0f)" block. This is bogus since the calculated
'fr' value depends on 'aAvailableSize' which might change by
applying min/max-sizes and thus 'fr' could become non-zero in
the second round.
To fix, this patch just moves "applyMinMax" block out one level.
2020-03-20 08:58:09 +08:00
wolfbeast
4bf8981093 Issue #1480 - Skip abspos, fixed, float and placeholders for outline. 2020-03-13 10:24:03 +08:00
win7-7
e8bb5560f7 Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster
We can devirtualize it, remove some branches.
2020-02-18 07:15:09 +08:00
wolfbeast
bcbdf11c25 [CSS] Only emit non-GC chrome wrapped XUL box warnings in debug builds. 2020-02-15 07:03:46 +08:00
wolfbeast
d750f143f3 Fix a whitespace issue in nsComputedDOMStyle.cpp 2020-02-13 07:17:39 +08:00
wolfbeast
cda9951c24 [CSS] Add stub for font-variation-settings
This stub is added because websites insist on considering this
very hardware-dependent and O.S.-variable low-level font-control
as a "critical feature" which it isn't as there is 0 guarantee
that font variation settings are supported or honored by any
operating system used by the client.

On top this is a WD status feature that sites shouldn't be using, and
the feature itself is strongly discouraged for use in favor of standard
CSS font manipulation keywords like `font-weight`.
2020-02-13 07:17:37 +08:00
win7-7
528f0eb941 Issue #1355 - Do less work for columns not in the desired set in PaintRowGroupBackgroundByColIdx
Do less work in PaintRowGroupBackgroundByColIdx for cells that are not in our desired set of columns.

crash fix:

Guard against empty column groups when building a display list for a table.
2020-02-13 07:17:12 +08:00
win7-7
915358dfcb fix whitespace
fix whitespace.
2020-02-08 07:11:57 +08:00
win7-7
a05c6a317b Issue #1386 - Devirtualize GetRowSpan/GetColSpan
It's at ~1.5% on the perf log for the Netflix use case, which seems a bit too much.
2020-02-08 07:11:55 +08:00
Matt A. Tobin
146d0aa2d2 Issue #1395 - Remove FlyWeb Service 2020-02-08 07:11:37 +08:00
Matt A. Tobin
eda1d47bc7 Issue #1390 - Get rid of the Presentation API 2020-02-07 08:00:30 +08:00
win7-7
012bac1934 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-02-07 07:56:28 +08:00
wolfbeast
ec8e49b6f8 Issue #1378 - Follow-up: make sure background items remain table-aligned. 2020-02-07 07:55:58 +08:00
wolfbeast
598fe2fa1f Issue #1378 - Align the drawing of table cell backgrounds with the spec. 2020-02-07 07:52:25 +08:00
win7-7
02487fecd6 Issue #1355 - Speed up the traversal of a table row frame's child cells
Speed up getting the first cellframe in a row and the next cellframe after the given one
2020-01-31 07:44:18 +08:00
wolfbeast
71fdf2f56b Issue #1360 - Part 2: Update tests for changed preferences. 2020-01-31 07:42:06 +08:00
Gaming4JC
34dd7065f5 Bug 1315885 - Part 4: Implement callback reaction for custom element reactions.
Note: Skipped SyncInvokeReactions since it is removed in CE v1, waste of time.

Tag UXP Issue #1344
2020-01-31 07:36:40 +08:00
Gaming4JC
a2e1955dc6 Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
2020-01-31 07:35:02 +08:00
Gaming4JC
900df90dae Bug 1322938 - Basic implementation of HTMLDialogElement.
Tag #1343
2020-01-09 21:27:54 +08:00
JustOff
13aff00f59 Issue #1345 - Implement non-standard legacy CSSStyleSheet rules 2020-01-09 21:23:47 +08:00
wolfbeast
b753aec164 Issue #1118 - Part 6: Fix various tests that are no longer correct.
The behavior change of document.open() requires these tests to be
changed to account for the new spec behavior.
2019-12-28 21:20:04 +08:00
wolfbeast
fc5d61608c Issue #1118 - Part 5: Change the way document.open() works
This changes the work we do for document.open() in the following ways:
- We no longer create a new Window when doing document.open().
  We use the same Window but remove all the event listeners on the
  existing DOM tree and Window before removing the document's existing
  children to provide a clean slate document to use for .write().
- We no longer create a session history entry (previously would be a
  wyciwyg URI). We now replace the current one, effectively losing the
  entry for the original document.
- We now support document.open() on windowless documents.
2019-12-28 21:20:03 +08:00
wolfbeast
72b9aaa248 Issue #1219 - Align computed DOM styles with mainstream behvior.
This updates our behavior for computed DOM styling to no longer return
null on elements that have no display, but return a 0-length (empty)
style instead and don't throw. For this we stop looking at having a
presentation for the style and just look at the document instead.

This resolves #1219
2019-12-21 07:12:56 +08:00
Jonathan Kew
c0a28dbd30 Check if we're already at the end of the frame's content. 2019-12-06 22:46:45 +08:00
wolfbeast
4630022115 Issue #1309 - Fix handling of display rows where the elements are not
forming a monotonically increasing sequence (e.g. with position:sticky)

Relative positioning can cause table parts to move, which can cause
issues with the cursor position to know which rows can be skipped.
To make this work, use the max difference between the frame's rect and
the union of the frame's "normal" position and the overflow rect to
cover the area of relatively positioned elements even if they are out of
order.

This resolves #1309.
2019-12-02 15:46:02 +08:00
wolfbeast
75d291480c Issue #1308 - Create nsDisplayTableBackgroundColor to avoid display
list collisions when processing the background color of a table.

This is effectively #146 Part 3c to go along with the other 2 there.

This resolves #1308.
2019-12-02 15:46:00 +08:00
Mats Palmgren
2f3a6a58b4 Remove unnecessary calls to ReparentFloatsForInlineChild in
nsInlineFrame.
2019-12-02 15:45:56 +08:00
Mats Palmgren
a67d5f872c Simplify the overflow child frame reparenting in
nsInlineFrame::DestroyFrom.
2019-11-29 11:36:46 +08:00
wolfbeast
207b043e1c Issue #1288 - Part 4: Update the OpenType Sanitizer component to 8.0.0 2019-11-15 14:24:00 +08:00
wolfbeast
729ee0f18a Issue #1288 - Part 1a: Update brotli to 1.0.7
This also reorganizes the exports in the build system to use `brotli/`
as include directory.
2019-11-15 14:23:54 +08:00
wolfbeast
cfb46e368d Issue #146 - Part 7: Remove no longer relevant reftest. 2019-11-05 10:43:09 +08:00
wolfbeast
d26e13657b Issue #146 - Part 6: Allow position: sticky on table elements. 2019-11-05 10:43:07 +08:00
wolfbeast
af75c920b0 Issue #146 - Part 5: Treat table row groups as containing blocks.
This aligns our behavior with Gecko/Blink.
2019-11-05 10:43:05 +08:00
wolfbeast
babd256e10 Issue #146 - Part 4: Adjust tests for fixes.
This also adds a reftest for border radius on collapsed borders (should
be ignored according to the CSS3 standard). We didn't do this before,
except on internal elements.
2019-11-05 10:43:02 +08:00
wolfbeast
a96ec7b886 Issue #146 - Part 3: Create nsDisplayTableBackgroundImage to avoid
display list collisions when processing the background image of a table.
2019-11-05 10:43:00 +08:00
wolfbeast
c8aaad0428 Issue #146 - Part 3: Create nsDisplayTableFixedPosition to avoid display
list collisions when processing the background image of a table.
2019-11-05 10:42:57 +08:00