Commit Graph

163 Commits

Author SHA1 Message Date
Gaming4JC 2e3b937f4e Bug 1322938 - Basic implementation of HTMLDialogElement.
Tag #1343
2020-01-07 18:33:22 -05:00
JustOff b4d686d62d Issue #1345 - Implement non-standard legacy CSSStyleSheet rules 2020-01-07 13:05:05 +02:00
wolfbeast f71108680b 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-22 23:48:40 +01:00
wolfbeast dfa7af70ce 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-22 19:57:30 +01:00
wolfbeast d6baead6c8 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-20 23:08:47 +01:00
Chris Peterson eea149e732 Issue #1328 - Part 3: Add fuzz to reftests and fix misc other tests. 2019-12-18 13:36:53 +01:00
Jonathan Kew 44967b330d Check if we're already at the end of the frame's content. 2019-12-06 13:42:37 +01:00
wolfbeast cb65f6d10c 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-01 06:31:26 +01:00
wolfbeast 0f001155aa 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-01 06:20:05 +01:00
Mats Palmgren 6ea8e51aaa Remove unnecessary calls to ReparentFloatsForInlineChild in
nsInlineFrame.
2019-11-29 10:48:50 +01:00
Mats Palmgren 7070dddb4b Simplify the overflow child frame reparenting in
nsInlineFrame::DestroyFrom.
2019-11-29 00:19:03 +01:00
wolfbeast 0f8691a488 Issue #1288 - Part 4: Update the OpenType Sanitizer component to 8.0.0 2019-11-14 10:07:01 +01:00
wolfbeast 56de283899 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-14 09:07:29 +01:00
wolfbeast bbc2206a0f Merge branch 'table-sticky-work'
This resolves #146.
2019-11-04 08:41:48 +01:00
wolfbeast 76052e837c Issue #146 - Part 7: Remove no longer relevant reftest. 2019-11-03 19:45:49 +01:00
wolfbeast 5ab2da7004 Issue #146 - Part 6: Allow position: sticky on table elements. 2019-11-03 19:43:51 +01:00
wolfbeast ce11d5cae8 Issue #146 - Part 5: Treat table row groups as containing blocks.
This aligns our behavior with Gecko/Blink.
2019-11-03 19:09:47 +01:00
wolfbeast f1b043af1d 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-03 18:49:57 +01:00
wolfbeast ee663e2930 Issue #146 - Part 3: Create nsDisplayTableBackgroundImage to avoid
display list collisions when processing the background image of a table.
2019-11-03 17:25:37 +01:00
wolfbeast db98e3efff Issue #146 - Part 3: Create nsDisplayTableFixedPosition to avoid display
list collisions when processing the background image of a table.
2019-11-03 15:12:34 +01:00
wolfbeast 0de40040f0 Issue #146 - Part 2: Remove custom table painting component.
Since we're now putting table borders and backgrounds properly in the
display lists, we no longer need this custom component to do this work
for us.
2019-11-02 23:10:06 +01:00
wolfbeast 1455272075 Issue #146 - Part 1: Draw each table's background on their own display
list items.

This patch does the following things:
1. Creates nsDisplayTableBorderCollapse that draws all collapse border
of tables.
2. Stops the use of nsDisplayTableBorderBackground.
3. Lets column and column group frames generate display items.
4. When traversing the table, also traverses the column and column group
frames.
5. For each type of table frame (col group, col, row group, row and
cell), draws their own background.
2019-11-02 22:42:07 +01:00
athenian200 afc187cc3f MoonchildProductions#1251 - Part 1: Restore initial Solaris support, fixed up.
Compared with what Pale Moon had for Solaris originally, this is mostly the same zero point I started patching from, but I've made the following changes here after reviewing all this initial code I never looked at closely before.

1. In package-manifest.in for both Basilisk and Pale Moon, I've made the SPARC code for libfreebl not interefere with the x86 code, use the proper build flags, and also updated it to allow a SPARC64 build which is more likely to be used than the 32-bit SPARC code we had there.

2. See Mozilla bug #832272 and the old rules.mk patch from around Firefox 30 in oracle/solaris-userland. I believe they screwed up NSINSTALL on Solaris when they were trying to streamline the NSS buildsystem, because they started having unexplained issues with it around that time after Firefox 22 that they never properly resolved until Mozilla began building NSS with gyp files. I'm actually not even sure how relevant the thing they broke actually is to Solaris at this point, bug 665509 is so old it predates Firefox itself and goes back to the Mozilla suite days. I believe $(INSTALL) -t was wrong, and they meant $(NSINSTALL) -t because that makes more sense and is closer to what was there originally. It's what they have for WINNT, and it's possible a fix more like that could serve for Solaris as well. Alternatively, we could get rid of all these half-broken Makefiles and start building NSS with gyp files like Mozilla did.

3. I've completely cut out support for the Sun compiler and taken into account the reality that everyone builds Firefox (and therefore its forks) with GCC now on Solaris. This alone helped clean up a lot of the uglier parts of the code.

4. I've updated all remaining SOLARIS build flags to the newer XP_SOLARIS, because the SOLARIS flag is no longer set when building Solaris.

5. I've confirmed the workaround in gtxFontconfigFonts.cpp is no longer necessary. The Solaris people got impatient about implementing a half-baked patch for a fontconfig feature that wasn't ready yet back in 2009, and somehow convinced Mozilla to patch their software to work around it when really they should have just fixed or removed their broken fontconfig patch. The feature they wanted has since been implemented properly, and no version of Solaris still uses the broken patch that required this fix. If anyone had ever properly audited this code, it would have been removed a long time ago.
2019-10-21 04:53:39 -05:00
Gaming4JC 30d65c382f Issue #1230 - Part 3: Update Reftests
Ref:
1434478 part 7 - Update tests and enable some previously temporarily disabled Grid reftests from bug 1427608.
2019-09-28 23:47:05 -04:00
Gaming4JC 8ff295747e Issue #1230 - Part 1: Fix Back-computing percentages for intrinsic sizing in Layout CSS-Grid
List of relevant patches applied:

1398537 part 2 - [css-multicol] Implement percentages for 'column-gap' (Gecko part).

1434478 part 1 - [css-grid] Stop back-computing percentage grid gaps when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 3 - Remove IntrinsicISizeOffsetData::hPctPadding/hPctMargin members since they are now unused.

1434478 part 4 - Factor out constants like NS_UNCONSTRAINEDSIZE so they can be used in headers without needing nsIFrame.h (idempotent patch).

1434478 part 5 - Create nsLayoutUtils::ResolveToLength for resolving CSS <length-percentage> (idempotent patch).

1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin.

This is needed only for CSS Grid since in other cases we're only using IntrinsicISizeOffsets in the inline-axis and the percentage basis is always indefinite for *intrinsic sizing*. When calculating the intrinsic size of grid items in the grid container's block axis however, we do have a definite size for the grid area in the inline-axis and it should be used per: https://drafts.csswg.org/css-grid/#algo-overview "2. Next, the track sizing algorithm resolves the sizes of the grid rows, using the grid column sizes calculated in the previous step." (Percentage padding/margin for grid items is always resolved against the grid area's inline-size nowadays.)
2019-09-28 23:47:05 -04:00
Gaming4JC f1adcd1eee Issue #1233 - Part 2: Update Reftests
List of relevant patches applied:

1425599 part 15 - [css-grid] Test reference fixes + more tests.

1373678 Part 3: Add line number checks to test_grid_implicit.html.

1416350 - Part 3: Add test to verify line numbers of grids with leading implicit tracks.

1416350 - Part 4: Add a reftest of repeat:auto-fit grids with leading implicit tracks.

1417711 - [css-grid] An abs.pos. grid container child that only covers removed 'auto-fit' tracks should not span to the end padding edge.

1416350 - Part 5: Correct the expected results for grids that have leading implicit tracks.

1418727 part 3 - [css-grid] Reftest updates.
2019-09-28 23:47:04 -04:00
Gaming4JC 22851ce36d Issue #1233 - Part 1: Fix grid overflow and rendering issues by improving Layout CSS-Grid API
List of relevant patches applied:

1425599 part 1 - [css-grid] Change the track sizing algorithm for spanning items so that it accumulates individual item contributions to the plan by max() rather than incrementing the planned size directly.

Also, fix a bug when copying back the planned limits after updating it for the first span group. It should only copy back track sizes that were actaully spanned by those items, other content-sized tracks' limits should remain at "infinity".

1425599 part 2 - [css-grid] Factor out the min-sizing parts of the track sizing for spanned items to a templated method (idempotent change).

1425599 part 3 - [css-grid] Factor out most of the max-sizing parts of the track sizing for spanned items to a templated method (idempotent change).

1425599 part 4 - [css-grid] Factor out the starting base/limit size to a templated method (idempotent change).

1425599 part 5 - [css-grid] Make CollectGrowable a templated method so that it works with either base/limit sizes (idempotent change).

1425599 part 6 - [css-grid] Make the size distribution methods templated with the intent of merging them in a later patch (idempotent change).

This patch also introduces an eInfinitelyGrowable bit to help get rid of the 'limits' temporary track sizes in the next patch.

1425599 part 7 - [css-grid] Remove the 'limits' copy of track sizes since they are no longer needed (idempotent change).

1425599 part 8 - [css-grid] Factor out the fit-content clamping function from DistributeToTrackLimits and pass it as a param instead (idempotent change).

1425599 part 9 - [css-grid] Merge DistributeToTrackLimits/Bases (idempotent change).

1425599 part 10 - [css-grid] Make MarkExcludedTracks a static method since it doesn't use 'this' (idempotent change).

1425599 part 11 - [css-grid] Hoist the marking of excluded tracks out from GrowSelectedTracksUnlimited to a separate method (idempotent change).

1425599 part 12 - [css-grid] Merge CopyPlanToBase/Limits into a templated method instead (idempotent change).

1425599 part 13 - [css-grid] Merge Grow[Base|Limits]ForSpanningItems into a templated method instead (idempotent change).

1425599 part 14 - [css-grid] Use iterators instead of an array + start/end index for the item data (idempotent change).

1425599 part 16 - [css-grid] Make SizeContributionForPhase a template.

1425599 - [css-grid] Follow-up bustage fix for stupid compiler warnings.

1378481 - Assign 'roundingError' in the default branch too, to avoid a maybe-uninitialized compiler warning.

1423292 - [css-grid] Add a couple of ItemState bits to Dump(), and make an ItemState assertion stricter (DEBUG-only changes).

1373678 Part 1: Reduce grid line numbers by count of leading implicit lines, minimum 0.

1416350 - Part 1: Correctly account for removed 'auto-fit' tracks also when there are leading implicit tracks.

1416350 - Part 2: Correct logic for Grid API line numbering with leading implicit tracks.

1418727 part 1 - [css-grid] Introduce StateBitsForRange() that collects the union of the state bits for a range of tracks (idempotent change).

1418727 part 2 - [css-grid] Require that an item spans at least one track with an 'auto' min sizing function for Automatic Minimum Size to apply.
2019-09-28 23:47:04 -04:00
wolfbeast b345c82c18 Issue #438: Revert incorrect changes to w3c-css reftests 2019-08-14 15:34:02 +02:00
wolfbeast 203cb72e94 Issue #438: Add reftests. 2019-08-14 15:24:39 +02:00
wolfbeast 0481fa14b4 Issue #438: Make the nsSVGOuterSVGAnonChildFrame a reference frame.
This causes transforms of the <svg> contents to be unaffected by
scrolling / offset changes of the <svg> element.
2019-08-14 15:20:20 +02:00
wolfbeast c67d673d4f Issue #438: Check for non-rectilinear transforms 2019-08-14 15:09:34 +02:00
wolfbeast c8666d1565 Issue #438: Rename coord/coords to originValue/transformOrigin.
For clarity and to prevent typoes.
2019-08-14 13:46:25 +02:00
wolfbeast 4bb5a957fb Issue #438: Pixel-snap subpixel value for outer SVG and anon child.
This doesn't solve the blurriness yet, but is part of the problem.
2019-08-14 13:38:25 +02:00
wolfbeast 0d530b1ca2 Issue #438: Do not round the translation of an SVG frame.
This doesn't solve the blurriness yet, but is part of the problem.
2019-08-14 13:35:08 +02:00
wolfbeast 31c765b050 Issue #1211: Allow the loading of TYPE_FONT from file: URLs.
This bypasses the CORS restriction of unique file: URLs in the case of
fonts loaded through CSS.

Resolves #1211.
2019-08-14 00:29:44 +02:00
win7-7 248476f94e Outdated comment removal (no code changes)
No code changes.
2019-08-02 16:31:54 +03:00
Gaming4JC 4a82fdad87 1332245 - Move nsScriptError from js/xpconnect to dom/bindings. 2019-07-18 22:38:33 -04:00
wolfbeast 7979df5512 Revert "Capture delayed events and cancel as necessary."
Tag #1052 (backout).
Backed out for creating issues like #1191 and other issue-less problems
with e.g. losing the caret from text boxes. Of note: this was also
backed out from m-c for similar reasons in Bug 1332433.
This fixes #1191.
This reverts commit 3424afccae.
2019-07-18 19:21:07 +02:00
win7-7 a059b0688b Fix comments for Frameproperties
https://bugzilla.mozilla.org/show_bug.cgi?id=1373884

Fixes comments for Frameproperties.

These comments went unnoticed earlier.

No code changes.
2019-07-12 00:30:22 +03:00
win7-7 570cad8279 Iterate the frame property list once to collect which child list properties we have
Look into optimizing out the hashtable lookups from nsContainerFrame
2019-07-08 19:19:56 +03:00
win7-7 e0598b0ae2 Avoid multiple hashtable lookups in DisplayItemData destructor
UXP has:

MOZ_RELEASE_ASSERT(sAliveDisplayItemDatas && sAliveDisplayItemDatas >Contains(this));
  sAliveDisplayItemDatas->RemoveEntry(this);

and this gets hit during frame destruction.

Combine these checks.
2019-07-07 20:02:35 +03:00
win7-7 00812e30df Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
2019-06-26 01:51:45 +03:00
wolfbeast f47d45be4b Revert "Improve origin-clean algorithm"
This reverts commit e69b3f567c.
2019-06-04 23:58:47 +02:00
wolfbeast fb1b45e5fc Improve origin-clean algorithm 2019-05-27 19:19:27 +02:00
win7-7 622ad88c5d Lots of time spent maintaining nsDisplayLayerEventRegions (#1116)
* Simplify the dispatch-to-content region

Simplify the dispatch-to-content region in nsDisplayLayerEventRegions::AddFrame() and AddInactiveScrollPort() if it starts to get large.

* tabs to spaces
2019-05-24 17:00:07 +00:00
Gaming4JC 73f9b2c70d Issue #1101 - Support gzip-compressed SVGs in OpenType+SVG fonts 2019-05-23 19:47:59 -04:00
Moonchild 650585f03c Merge pull request #1071 from win7-7/nsDisplayListBuilder
nsFrameList::GetLength() calls in nsDisplayListBuilder::MarkFramesForDisplayList() are slow
2019-05-03 00:44:28 +00:00
win7-7 99d111ad89 unnecessary space at the end removed 2019-05-02 16:53:08 +03:00
win7-7 9b750203d0 patch to Bug 1377329 2019-05-02 16:51:25 +03:00
win7-7 7975665f6a patch to Bug 1363423 2019-05-02 16:47:23 +03:00