Commit Graph

73 Commits

Author SHA1 Message Date
Arnaud Bienner
e5d602dc28 Bug 938334 - Use PseudoElementSupportsStyleAttribute(Type) when it makes sense to do so and remove now unnecessary nsCSSPseudoElements functions. r=dbaron 2013-12-02 22:38:45 +01:00
William Chen
a0e58e725d Bug 929885 - Implement web components ShadowRoot style sheet behavior. r=mrbkap 2013-12-02 02:26:12 -08:00
Cameron McCormack
7ffd78fd4a Bug 922669 - Part 9: Restyle pseudo-elements when their content state changes. r=bz 2013-11-28 17:46:40 +11:00
Cameron McCormack
713ca1fdcb Bug 922669 - Part 4: Pass in anonymous content nodes when restyling any pseudo-elements that can match user action pseudo-classes. r=bz 2013-11-28 17:46:38 +11:00
Cameron McCormack
850883289f Bug 943746 - Choose a better default element when calling ElementForStyleContext for a pseudo-element. r=bz 2013-11-28 12:22:20 +11:00
Jonathan Watt
81390b10c4 Bug 635240 - Implementation of the layout and anonymous shadow tree portion of <input type=number>. r=dholbert 2013-09-04 11:30:36 +01:00
Jonathan Watt
cd3d3063e4 Bug 889736, part 2 - Remove nsSVGTextPathFrame. r=heycam 2013-11-18 14:29:52 +00:00
Jonathan Watt
6d1ae94392 Bug 889736, part 1 - Remove nsSVGTextFrame and nsSVGGlyphFrame. r=heycam 2013-11-18 14:29:51 +00:00
Robert O'Callahan
38cd1ccd55 Bug 876321. Track restyling of top/left/right/bottom and treat such nodes as active scrolled roots. r=mattwoodrow
--HG--
extra : rebase_source : 24e7900efdb476a0533808956b9604d144e4db89
2013-09-09 17:08:41 -07:00
Cameron McCormack
6a434aebfc Bug 933044 - Push style scopes even if we would skip pushing ancestors when there is no ancestor filter. r=bz 2013-11-17 17:51:04 +11:00
Corey Ford
bfc27ed1e3 Bug 925259: Avoid sticky positioning inner table elements. r=dholbert 2013-11-12 12:46:47 -08:00
Robert O'Callahan
b5eb1bd690 Backout changeset 3fb9ea77d858 for bug 876321 due to test failures (CLOSED TREE)
--HG--
extra : rebase_source : 6b21bf36f9a8bd73bdd72ddfb5fe8c25e7854071
2013-11-03 23:14:26 -08:00
Robert O'Callahan
319f4f9770 Bug 876321. Track restyling of top/left/right/bottom and treat such nodes as active scrolled roots. r=mattwoodrow
--HG--
extra : rebase_source : f92bcf0b60cadefa0197cdffcd6dd9b4eaa6b2d5
2013-09-09 17:08:41 -07:00
Robert O'Callahan
5b63d94335 Bug 745485. Optimize positioning offset changes whenever the computed size does not change. r=dholbert
--HG--
extra : rebase_source : 16388d3cb0c6ee9acc1416ca0d27b2a53b0062ee
2013-09-09 17:08:41 -07:00
Robert O'Callahan
a999a450cf Bug 911889. Part 2: Refactor MarkLayersActive code into its own class and be much more explicit about what it does. r=mattwoodrow
This also changes the functionality a little bit to track independent
per-property mutation counts and independent "content active" status.
2013-09-04 23:30:57 +12:00
Phil Ringnalda
b679ae2f4c Back out 0a88dee3b92b:dc5cc7d7b84d (bug 911889) for beaucoup unexpected assertions
--HG--
extra : rebase_source : a2a13633b6028c99a3c732dbbafe8c800bc32071
2013-10-28 23:38:02 -07:00
Robert O'Callahan
c2cf6c85d0 Bug 911889. Part 2: Refactor MarkLayersActive code into its own class and be much more explicit about what it does. r=mattwoodrow
This also changes the functionality a little bit to track independent
per-property mutation counts and independent "content active" status.

--HG--
extra : rebase_source : e69b8e7a95d36720bd38d74f0789ede603e58a09
2013-09-04 23:30:57 +12:00
Daniel Holbert
52236cfeca Bug 875275 part 3: Make nsColorControlFrame inherit from nsHTMLButtonControlFrame instead of nsBlockFrame. r=jwatt f=arnaud.bienner 2013-10-22 17:29:20 +02:00
Arnaud Bienner
2e3ec1b741 Bug 875275 part 1: Implement layout support for <input type="color">. r=dbaron,dholbert 2013-07-10 00:25:27 +02:00
Ehsan Akhgari
27c999b3b4 Bug 921753 - Part 1: Avoid #including nsStyleStructInlines.h in nsIFrame.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1782 to 1582.
2013-10-01 17:00:38 -04:00
Ehsan Akhgari
f720bbfbaa Bug 921876 - Stop #including nsIFrame.h in nsLayoutUtils.h; r=roc
This patch does the following:
* Move nsIFrame::IntrinsicSize to mozilla::IntrinsicSize so that it can
  be forward-declared.
* Move a number of templated inline nsLayoutUtils methods to nsIFrame.
* Use mozilla::layout::FrameChildListID instead of the
  nsIFrame::ChildListID typedef in nsLayoutUtils.h.
* Move nsReflowFrameRunnable to its only user, nsProgressMeterFrame.cpp.
* Make a number of functions requiring nsIFrame.h out-of-line.
* Remove the nsIFrame.h #include from nsLayoutUtils.h and add it to the
  places which require it implicitly.
2013-09-30 17:26:04 -04:00
L. David Baron
38a6d76524 Bug 828312 patch 11: Don't generate change hints for restyling of later continuations, since the handling of the change hints from the first continuation is required to do the necessary work. r=bzbarsky
This depends on bug 898333 in order to avoid causing:
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/dom/tests/mochitest/chrome/test_focused_link_scroll.xul | Assertion count 1 is greater than expected range 0-0 assertions.
due to the assertion:
###!!! ASSERTION: Shouldn't be trying to restyle non-elements directly: '!aContent || aContent->IsElement()', file ../../../layout/base/nsStyleChangeList.cpp, line 62

The assertion count change in layout/generic/crashtests/571995.xhtml is
expected because it changes us from having 7 of:
###!!! ASSERTION: Shouldn't be trying to restyle non-elements directly: '!aContent || aContent->IsElement()', file ../../../layout/base/nsStyleChangeList.cpp, line 62
with the stack:
  mozilla::ElementRestyler::CaptureChange(nsStyleContext*, nsStyleContext*, nsChangeHint) [layout/base/nsChangeHint.h:191]
  mozilla::ElementRestyler::RestyleSelf(nsRestyleHint) [layout/base/RestyleManager.cpp:2304]
to only having one.  This is expected since this patch changes
RestyleSelf to only call CaptureChange for the first continuation or
block-in-inline sibling.
2013-09-25 12:28:08 -07:00
L. David Baron
b19b847ec9 Bug 828312 patch 10: Add assertions to check that handling of nsChangeHint_ChildrenOnlyTransform doesn't need to check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:08 -07:00
L. David Baron
b0e32cdf38 Bug 828312 patch 9b: Make handling of RecomputePosition hint check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:08 -07:00
L. David Baron
4e7bd63a47 Bug 828312 patch 8: Make handling of UpdateEffects hint check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:07 -07:00
L. David Baron
eddf04ceed Bug 828312 patch 7: Use more typical loop structure and don't mutate |frame| in UpdateOverflow hint handling. r=bzbarsky 2013-09-25 12:28:07 -07:00
L. David Baron
2ffabf4425 Bug 828312 patch 6: Make early transform handling check continuations. r=bzbarsky
This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.
2013-09-25 12:28:07 -07:00
L. David Baron
7bb0d89ddf Bug 828312 patch 5: Don't handle UpdateCursor more than once per round of style change processing, since it's global. r=bzbarsky
(This is part of the patch stack making change hints apply across all
continuations and block-in-inline siblings.  In this case, however, the
change hint only needs to apply once, globally.)
2013-09-25 12:28:07 -07:00
L. David Baron
2c713d5f2d Bug 898209 patch 16: Move a comment that should have been moved in patch 15. No review. 2013-09-25 12:28:07 -07:00
L. David Baron
06fe81c384 Bug 898333, patch 2: Change RestyleManager::Restyle's tree traversal to reach next-continuations (and same-display block-in-inline siblings) from their prev-continuation rather than from their parent. r=bzbarsky
This patch fundamentally makes three changes:

 (1) Change the way RestyleSelf is used so that it is called in a loop,
     over all of the same-style continuations and block-in-inline
     siblings.
     (I had a note here reminding myself:
       TODO: Don't set hints for descendants!
     but I no longer remember what it meant.)

 (2) Change the traversal of children to traverse all of the children of
     the items traversed in (1).

 (3) When traversing children, skip children that are continuations,
     since we already reached them in (1) and (2).

A later patch will change the RestyleSelf loop to copy for the later
continuations rather than repeating the work.  This will mean reverting
many of the RestyleSelf changes contained here.

Some of the pieces marked temporary will be removed in bug 828312 patch
11, and the rest should hopefully be removed in bug 918064.
2013-09-25 12:28:07 -07:00
L. David Baron
d6992d5f88 Bug 898333, patch 1: Restyle the :after pseudo-element after the content children. r=bzbarsky 2013-09-25 12:28:07 -07:00
Corey Ford
3fc43261c7 Bug 904197 - Use the union of continuations' rects in sticky positioning calculations. r=dholbert
Reftest inline-3.html fails because handling the sticky element's margin correctly will take more work; similarly, border/padding on containing-block continuations won't be handled quite right. Reftest column-contain-1a fails because some of the anonymous blocks inside an nsColumnSetFrame have 0 height.
2013-09-13 16:53:48 -07:00
Corey Ford
5db567cbb1 Bug 886646 - Part 6: Implement sticky positioning, calculated on reflow and scroll. r=dbaron, r=dholbert 2013-09-06 09:35:16 -04:00
Ms2ger
772a9d87b7 Bug 901269 - Part b: Stop including nsContentUtils.h in Element.h; r=jlebar 2013-08-14 08:55:46 +02:00
Corey Ford
c1f2a8126d Bug 898794 - Store normal frame position before applying relative positioning. r=dbaron 2013-08-08 17:20:17 -07:00
Cameron McCormack
975a0a23c3 Bug 899894 - Don't null check nsStyleSet::ResolveBlah return values. r=dbaron 2013-08-03 14:11:06 +10:00
Alex Xu
59fcd38f0a Bug 900284: Use #ifdef ACCESSIBILITY around member variables only used inside #ifdef ACCESSIBILITY, to avoid clang warnings (and reduce object size with --disable-accessibility). r=dbaron 2013-07-31 19:15:19 -07:00
L. David Baron
17fe37d76a Bug 898329 patch 10: Fix wrapping of comment that I just reintended. r=heycam 2013-07-30 17:36:12 -07:00
L. David Baron
9d6733d78c Bug 898329 patch 9: Fix indentation from previous patches. r=heycam 2013-07-30 17:36:12 -07:00
L. David Baron
9b7ac3d29e Bug 898329 patch 8: Use for loops instead of while loops for iterating extra style contexts. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
016d6d8b55 Bug 898329 patch 7: Split ElementRestyler::Restyle into multiple functions. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
720d37a092 Bug 898329 patch 6: Avoid using pseudoTag outside of what will be in RestyleManager::RestyleSelf. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
372c024c0e Bug 898329 patch 5: Create and use ElementRestyler::mResolvedChild. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
0d0cdd5410 Bug 898329 patch 4: Avoid using newContext outside of what will be in RestyleManager::RestyleSelf. r=heycam
This replaces newContext with mFrame->StyleContext(), which is a valid
replacement since all of the replacements are inside a test that we
don't have a framechange hint.  If we have a framechange hint, then
mFrame still has its old style context.
2013-07-30 17:36:11 -07:00
L. David Baron
8c39cda548 Bug 898329 patch 3.5: Don't check undisplayed content if we're going to reframe. r=heycam
This avoids doing work that is unnecessary; if we're going to reframe
anyway, the frame destruction will clear the undisplayed content list,
and we'll then rebuild it when we recreate the frame (if needed).

It is also a prerequisite for patch 4, which replaces some uses of
newContext with mFrame->StyleContext().  These are the same as long as
we don't have a framechange hint, since when we do have a framechange
hint we leave the old style context on the frame to avoid violating
invariants.  This patch ensures that all such uses replaced in patch 4
are actually inside a check that we don't have a framechange hint.
(Most of them already were.)
2013-07-30 17:36:11 -07:00
L. David Baron
069d654106 Bug 898329 patch 3: Create and use ElementRestyler::mWasFrameVisible. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
6edf3e771d Bug 898329 patch 2: Fix indentation in ReParentStyleContext from patch 1. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
7b10df02a0 Bug 898329 patch 1: Remove null-checks on oldContext and newContext and avoid manual reference counting. r=heycam 2013-07-30 17:36:11 -07:00
L. David Baron
aee2be3fd9 Bug 898209 patch 15: Use constructor flags on ElementRestyler's regular constructor to avoid manipulating mHintsHandled from the outside. r=heycam
This is the second of two patches added on top to address review
comments on patch 2.
2013-07-30 17:36:10 -07:00
L. David Baron
07bdb25977 Bug 898209 patch 14: Add constructor flags to ElementRestyler's regular constructor so we can avoid manipulating mHintsHandled from the outside. r=heycam
This is the first of two patches added on top to address review comments
on patch 2.
2013-07-30 17:36:10 -07:00