L. David Baron
c18e1d2515
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
38a76e02ae
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
7597b90beb
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
fecfb82b09
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
682a633069
Bug 901269 - Part b: Stop including nsContentUtils.h in Element.h; r=jlebar
2013-08-14 08:55:46 +02:00
Corey Ford
9adda71475
Bug 898794 - Store normal frame position before applying relative positioning. r=dbaron
2013-08-08 17:20:17 -07:00
Cameron McCormack
ad5ce3ee02
Bug 899894 - Don't null check nsStyleSet::ResolveBlah return values. r=dbaron
2013-08-03 14:11:06 +10:00
Alex Xu
8a51ad6d90
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
4630a79d76
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
e858f28bd5
Bug 898329 patch 9: Fix indentation from previous patches. r=heycam
2013-07-30 17:36:12 -07:00
L. David Baron
d65b631606
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
15b84a4c52
Bug 898329 patch 7: Split ElementRestyler::Restyle into multiple functions. r=heycam
2013-07-30 17:36:11 -07:00
L. David Baron
8a822d1d0f
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
20d571f36c
Bug 898329 patch 5: Create and use ElementRestyler::mResolvedChild. r=heycam
2013-07-30 17:36:11 -07:00
L. David Baron
fe162ae7d7
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
bc4b860554
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
099ddebdb4
Bug 898329 patch 3: Create and use ElementRestyler::mWasFrameVisible. r=heycam
2013-07-30 17:36:11 -07:00
L. David Baron
08f05b299b
Bug 898329 patch 2: Fix indentation in ReParentStyleContext from patch 1. r=heycam
2013-07-30 17:36:11 -07:00
L. David Baron
c6b0925b11
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
f14c99b5b7
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
2483ea2e02
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
L. David Baron
7b58599cf0
Bug 898209 patch 13: Create and use ElementRestyler::mTreeMatchContext. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
404c7c2333
Bug 898209 patch 12: Create and use ElementRestyler::mVisibleKidsOfHiddenElement. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
cdecdd4413
Bug 898209 patch 11: Create and use member variables for accessibility notifications. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
53a139827c
Bug 898209 patch 10: Create and use ElementRestyler::mRestyleTracker. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
bec12fb9f3
Bug 898209 patch 9: Create and use ElementRestyler::mParentFrameHintsNotHandledForDescendants and mHintsNotHandledForDescendants. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
82a0a650a6
Bug 898209 patch 8: Create and use ElementRestyler::mChangeList. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
8340d616ac
Bug 898209 patch 7: Fix remaining variable shadowing warning. r=heycam
2013-07-30 17:36:10 -07:00
L. David Baron
d81ab3552b
Bug 898209 patch 6: Create and use ElementRestyler::mParentContent and mContent. r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
9925459f0e
Bug 898209 patch 5: Remove the localContent variable in favor of writing mFrame->GetContent(). r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
a413b968a0
Bug 898209 patch 4: Remove aPresContext parameter to ElementRestyler::Restyle. r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
9b61f8671b
Bug 898209 patch 3: Create and use ElementRestyler::mFrame. r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
ca739cf173
Bug 898209 patch 2: Create and use ElementRestyler::mHintsHandled. r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
6b056b0c80
Bug 898209 patch 1: Add ElementRestyler class to begin refactoring ReResolveStyleContext. r=heycam
2013-07-30 17:36:09 -07:00
L. David Baron
ffe927da2c
Bug 896138 patch 10: Move beginning and ending of ProcessPendingRestyles into helper functions on the RestyleManager. r=heycam
2013-07-30 17:36:08 -07:00
Ehsan Akhgari
2824b29025
Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
...
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:
# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.cc" \
-o -iname "*.mm" \) | \
xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
modules/libmar/src/mar_private.h \
modules/libmar/src/mar.h
# assert_replacer.py
#!/usr/bin/python
import sys
import re
pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")
def replaceInPlace(fname):
print fname
f = open(fname, "rw+")
lines = f.readlines()
for i in range(0, len(lines)):
while True:
index = re.search(pattern, lines[i])
if index != None:
index = index.start()
lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
for j in range(i + 1, len(lines)):
if lines[j].find(" ", index) == index:
lines[j] = lines[j][0:index] + lines[j][index+4:]
else:
break
else:
break
f.seek(0, 0)
f.truncate()
f.write("".join(lines))
f.close()
argc = len(sys.argv)
for i in range(1, argc):
replaceInPlace(sys.argv[i])
--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Corey Ford
7df9a3d1f1
Bug 894629 - Reference containing block's content box for relatively positioned elements in RestyleManager::RecomputePosition. r=dbaron
2013-07-22 09:28:31 -07:00
Robert O'Callahan
7a84d00a9a
Fix bustage for bug 886295
2013-07-22 16:30:18 +12:00
Robert O'Callahan
55bf3f0888
Bug 886295. Backout fix for bug 880854 to fix regression. r=mats
...
--HG--
extra : rebase_source : 66bc089c3ece4dbe4f6533fce97a902abdd4871a
2013-07-22 14:04:46 +12:00
L. David Baron
a643510184
Bug 896138 patch 9: Move RecomputePosition to a more logical place in the .cpp file, near other hint handling implementations. No review.
2013-07-20 12:14:25 -07:00
L. David Baron
2e0c82c9c0
Bug 896138 patch 7: Remove unused aFrameManager parameters to some functions. r=heycam
2013-07-20 12:14:25 -07:00
L. David Baron
539703de44
Bug 896138 patch 6: Move restyle management code from nsFrameManager to RestyleManager. r=heycam
...
This is the second of two big chunks of code moved into the new
RestyleManager class from another sources.
Note that the undisplayed map remains in nsFrameManager, although it
could perhaps have moved.
2013-07-20 12:14:25 -07:00
L. David Baron
a7c8d44db9
Bug 896138 patch 4: Move restyle management code from nsCSSFrameConstructor to RestyleManager. r=heycam
...
This moves restyling management out of nsCSSFrameConstructor (thus
reducing its size), and keeps the restyling code closer together.
This is the first of two big chunks of code moved in this patch series.
A later patch in this series will move related code from nsFrameManager
into the same destination file.
2013-07-20 12:14:25 -07:00
L. David Baron
62621bb025
Bug 896138 patch 2: Add a RestyleManager class. r=heycam
...
The later patches in this series will move restyling code into this file
from nsCSSFrameConstructor and nsFrameManager.
2013-07-20 12:14:24 -07:00