Kyle Huey
e5eb83ac5a
Bug 760331: Coalesce data for inline style across nodes. r=bz
...
This patch enables sharing of an nsAttrValue's MiscContainer between nodes for style rules. MiscContainers of type eCSSStyleRule are now refcounted (with some clever struct packing to ensure that the amount of memory allocated for MiscContainer remains unchanged on 32 and 64 bit). This infrastructure can be used to share most MiscContainer types in the future if we find advantages to sharing other types than just eCSSStyleRuley. A cache mapping strings to MiscContainers has been added to nsHTMLCSSStyleSheet. MiscContainers can be shared between nsAttrValues when one nsAttrValue is SetTo another nsAttrValue or when there is a cache hit in this cache. This patch also adds the ability to tell a style rule that it belongs to an nsHTMLCSSStyleSheet, with appropriate accessor functions to separate that from the existing case of belonging to an nsCSSStyleSheet.
The primary use case is to reduce memory use for pages that have lots of inline style attributes with the same value. This can happen easily with large pages that are automatically generated. An (admittedly pathological) testcase in Bug 686975 sees over 250 MB of memory savings with this change. Reusing the same MiscContainer for multiple nodes saves the overhead of maintaining separate copies of the string containing the serialized value of the style attribute and of creating separate style rules for each node. Eliminating duplicate style rules enables further savings in layout through style context sharing. The testcase sees the amount of memory used by style contexts go from over 250 MB to 10 KB.
Because the cache is based on the text value of the style attribute, it will not handle attributes that have different text values but are parsed into identical style rules. We also do not attempt to share MiscContainers when the node's base URI differs from the document URI. The effect of these limitations is expected to be low.
2012-09-30 09:40:24 -07:00
Randell Jesup
eedf93a21d
Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg
2012-09-01 22:35:17 -04:00
Ehsan Akhgari
0fd9123eac
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
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 "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Jan Varga
8fb6c69c76
Bug 779684 - Move FrameIteratorFlags to nsFrameIterator class. r=roc
2012-08-06 20:27:04 -04:00
David Zbarsky
0039e134c7
Bug 779684: Create a stack-based nsFrameIterator class out of nsIFrameTraversal and nsIFrameEnumerator r=roc
...
--HG--
rename : layout/base/nsFrameTraversal.cpp => layout/base/nsFrameIterator.cpp
rename : layout/base/nsFrameTraversal.h => layout/base/nsFrameIterator.h
2012-08-05 23:00:55 -04:00
Neil Deakin
da9b7d28c7
Bug 777339, Use prlogging for focus instead of enabling a define, allowing for easier enabling of focus logging, r=smaug
2012-07-30 20:43:28 -04:00
Aryeh Gregor
903f6c9c84
Bug 777292 - Convert incorrect conversions to nsresult and fix named constants; r=ehsan
2012-07-27 16:59:29 +03:00
Aryeh Gregor
e806eeab4f
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Tim Taubert
69cced7635
Bug 771555 - Revert setting DEBUG_FOCUS to avoid spamming the console; rs=jdm,unfocused
2012-07-11 11:12:44 +02:00
Michael Ratcliffe
4d84f2da38
Bug 771555 - GCLI needs a addon, resize, restart, cookie and pagemanip commands; r=dcamp,jwalker
2012-07-10 17:53:04 +01:00
David Zbarsky
ae718ee1c0
Bug 763350 - Clean up some includes in content/ and dom/ r=smaug
2012-07-01 16:45:59 -07:00
Chris Jones
d40f38e211
Bug 761927: Fix focus for <iframe mozbrowser remote>. r=jlebar,Enn
2012-06-22 18:27:30 -07:00
Mats Palmgren
5d7cefba71
Bug 575294, bug 760946. part=1/5 r=enndeakin,smaug
2012-06-23 03:13:56 +02:00
Andrew McCreight
072a74616f
Bug 750820 - make oldFocusedContent an nsCOMPtr in nsGlobalWindow::PageHidden. r=bz
2012-05-18 15:19:34 -07:00
Aryeh Gregor
6865bb0c16
Bug 762862 - Rename nsTypedSelection to mozilla::Selection; r=ehsan
...
--HG--
rename : layout/generic/nsTypedSelection.h => layout/generic/Selection.h
2012-06-08 17:20:55 +03:00
Ms2ger
37be1fb791
Bug 760156 - Cleanup LOCAL_INCLUDES in content/media/; r=sicking
...
This patch makes it possible to include nsGenericHTMLElement.h without adding
to LOCAL_INCLUDES.
2012-06-06 09:40:02 +02:00
Mats Palmgren
37020cf426
Back out bug 575294, bug 726264. (cset 1727de7d26ec, 6bcea3a628d8, 011c1c8e9cc7, 0be261a5042b, d51338c5cd0c)
2012-06-03 18:05:00 +02:00
Mats Palmgren
f7303bd78a
Bug 575294. part=1/4 r=enndeakin
2012-06-02 01:41:54 +02:00
Neil Rashbrook
1b6b9fd46e
Bug 626441 Moving the caret should not look for panels r=Enn
2012-05-30 08:39:17 +01:00
Gervase Markham
ca171eec44
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Trevor Saunders
60316084b6
bug 693933 - make nsFrameSelection::GetSelection() return nsTypedSelection* r=smaug
2012-04-06 17:54:38 -04:00
Adam Dane [:hobophobe]
f6bfd29afb
Bug 720126 - Update scroll API to use ScrollAxis parameters (where and when). r=roc
2012-03-19 21:09:50 -05:00
Tim Taubert
71e4bec105
Bug 731726 - Moving the parentNode of a focused DOM node does not remove the node's focus ring; r=Enn
2012-03-05 20:59:50 +01:00
Neil Deakin
e74745aeb4
Bug 653230, add panels with focusable elements into the document tab navigation order, r=smaug
2012-02-23 16:02:33 -05:00
Neil Deakin
62ea709480
Bug 670317, add a focus manager flag to restrict tab navigation to the same frame, r=smaug
2012-02-13 14:24:28 -05:00
Ms2ger
e3e8b35541
Bug 718504 - Remove some GetChildAt callers; r=smaug
2012-01-25 08:50:07 +01:00
Olli Pettay
963ff83d22
Bug 704583 - Add testing mode to FocusManager, p=enn,smaug r=smaug,enn
2012-01-13 14:42:18 +02:00
Neil Rashbrook
5d0063889c
Bug 669026 Fix caret movement when contenteditable areas are present r=ehsan
2011-12-24 00:11:30 +00:00
Chris Pearce
23331bfab8
Bug 706672 - Revoke DOM full-screen when windowed plugin focused on non-MacOSX systems, and deny requests for full-screen from non-focused-tab documents. r=smaug
2011-12-16 10:42:36 +13:00
Masayuki Nakano
658860d0f5
Bug 685395 part.3 Rename SetInputMode()/GetInputMode() to SetInputContext()/GetInputContext() and make SetInputContext() take the reason by a separated argument r=roc, sr=matspal
2011-11-27 20:51:52 +09:00
Masayuki Nakano
ba332c4403
Bug 685395 part.2 Move IMEContext to mozilla::widget::InputContext r=roc
2011-11-27 20:51:52 +09:00
Eitan Isaacson
9f4fc12e1a
Bug 700741 - Add and implement nsIFocusManager.elementIsFocusable r=Enn
2011-11-10 08:20:47 -08:00
Timothy Nikkel
09778341dc
Bug 658005. Part 2. Add a frame visibility API that takes into account everything we need, and use it. r=roc
2011-10-26 18:57:55 -05:00
Olli Pettay
c0def581fb
Bug 695758 - Don't limit E10s event/focus handling to xul:browser, but allow also xul:iframe, r=felipe
2011-10-20 15:11:31 +03:00
Olli Pettay
a86b1a4d43
Bug 682420 - Rename nsINode::GetOwnerDoc to nsINode::OwnerDoc, part 1, r=jst
...
--HG--
extra : rebase_source : baf1a25cdea68d499a7673fdf96e27b5a12dc83c
2011-10-18 13:53:36 +03:00
Ehsan Akhgari
2a602a5685
Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
...
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Yazen Ghannam
03ce28c74a
Bug 677085 - Merge "nsIDOMNSHTMLFrameElement" into "nsIDOMHTMLFrameElement"; r=bz
2011-10-15 09:34:31 +02:00
Michael Wu
d8e503c38b
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
...
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Alexander Surkov
6a04618807
Bug 673958 - rework accessible focus handling, r=enndeaking, marcoz, tbsaunde, matspal, f=marcoz
...
--HG--
rename : accessible/tests/mochitest/test_aria_activedescendant.html => accessible/tests/mochitest/events/test_focus_aria_activedescendant.html
rename : accessible/tests/mochitest/events/test_focus.html => accessible/tests/mochitest/events/test_focus_dialog.html
rename : accessible/tests/mochitest/events/test_focusdoc.html => accessible/tests/mochitest/events/test_focus_doc.html
rename : accessible/tests/mochitest/events/test_focus.xul => accessible/tests/mochitest/events/test_focus_general.xul
rename : accessible/tests/mochitest/states/test_comboboxes.xul => accessible/tests/mochitest/states/test_expandable.xul
rename : accessible/tests/mochitest/test_nsIAccessible_selects.html => accessible/tests/mochitest/states/test_selects.html
2011-09-28 10:46:11 +09:00
Masayuki Nakano
10fedc2652
Bug 669028 part.8 dom should use mozilla::LookAndFeel rather than nsILookAndFeel r=enndeakin
2011-09-09 11:27:12 +09:00
Ehsan Akhgari
e48161b8ff
Bug 677661 - Remove nsTPtrArray and add a SafeElementAt(index_type) API to nsTArray when it's instantiated with a pointer type; r=sicking
2011-08-10 01:36:00 -04:00
Felipe Gomes
0a988c309a
Bug 583976. Part 1 - Add focus manager support for focus activation/deactivation in remote content. r=enn,smaug
2011-06-17 17:08:32 -07:00
Jonas Sicking
e3f6b769a1
Bug 658714 Part 5: Search'n'replace nsPIDOMEventTarget to nsIDOMEventTarget. r=smaug
2011-06-23 19:18:00 -07:00
Olli Pettay
aac07bcf30
Bug 664438 - Don't keep DelayedBlurFocusEvents alive after xpcom-shutdown, e=enndeakin
...
--HG--
extra : rebase_source : 0925e4bb6d640e26d40f00ebe5c7f2c849a03e71
2011-06-18 12:12:13 +03:00
Jonas Sicking
509451f5cc
Bug 659539 Part 4: Use nsINode::NodeType where possible. r=bz
2011-06-14 00:56:50 -07:00
Jonas Sicking
6279797e1c
Bug 659053 Part 2: Implement a faster non-recursive Node.isEqualNode directly on nsINode. r=peterv
2011-06-14 00:56:48 -07:00
Boris Zbarsky
35d9b78644
Bug 598833 part 5. Store focus and focusring state directly on elements. r=smaug,enn
2011-05-31 21:46:56 -04:00
Boris Zbarsky
18cce8e61c
Bug 657353 part 2. Switch content state updates away from calling Begin/EndUpdate. r=sicking
2011-05-31 17:38:25 -04:00
Ms2ger
e18ad59abc
Bug 659743 - Part b: Remove nsImageMapUtils; r=smaug
2011-05-30 13:00:00 +02:00
Masayuki Nakano
a28bd9e01f
Bug 659913 part.3 Use AddObservers and RemoveObservers if the caller uses these methods of Preferences two or more times r=roc
2011-05-29 08:39:27 +09:00