Граф коммитов

49 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 3a7902f2c4 Bug 1489437 - Part 1: Make HTML parser distinguish network, document.write and fragments in append operation; r=smaug,hsivonen
For custom element reaction invocation in the parser, we need a way to distinguish the tree appending operation is from fragments or not,
since we don't want to execute reactions until innerHTML finishes running.
(See spec changes https://github.com/whatwg/html/issues/4025)

We don't need to do anything for opAppendText and opAppendCommand since the text and command won't have any chance to
be a custom element.

Differential Revision: https://phabricator.services.mozilla.com/D10226
2021-01-06 09:29:41 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Alphan Chen fc59938bee Bug 1482885 - Refactor nsHtml5TreeOperation's enum plus fields into mozilla::Variant r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D42809

--HG--
extra : moz-landing-system : lando
2019-08-27 09:39:41 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Boris Zbarsky 46fc331568 Bug 1446097. Switch to "set" as the canonical nsGkAtoms name of the string "set", so it matches the actual tag name "set" in SVG. r=hsivonen,njn
Most of the noise is from the fact that clang-format on parser/html/*.{h,cpp}
reformatted all sorts of stuff.  Not running it caused lots of format changes
from the generator... I guess we changed the format rules since the last time
this got run?

MozReview-Commit-ID: IA2G87zUIKN
2018-03-16 11:26:06 -04:00
Jan Henning 9c467e7e8d Bug 1392996 - Part 1 - Add meta viewport tag to view-source document. r=hsivonen
Adding <meta name="viewport" content="width=device-width"/> to the view-source
document achieves two things when used in a mobile browser, such as Fennec:
1. When word-wrapping is turned off, the page displays at a more readable
   initial zoom level.
2. As of now, font inflation (when enabled) kicks in on the document when word-
   wrapping is turned on, which leads to the line numbers appearing in a
   noticeably smaller font size than the rest of the page.
   Adding the above meta viewport header marks the document as "mobile-friendly"
   and suppresses font inflation, which means that line numbers will appear
   normally even with word-wrapping enabled.

getMathMLSelection() in browser-content.js isn't actually used in Fennec at the
moment, but for consistency we add the meta viewport tag there as well.

MozReview-Commit-ID: K9KVHh7g7TF

--HG--
extra : rebase_source : 1054f712f5420efcd89daeaa2c8c200129544b2a
2018-01-23 22:25:09 +01:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Henri Sivonen 3d387ac082 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 1b85ba3b1c699e71e6ecacf4d1dc4271f3416b08
2017-07-04 11:00:03 +03:00
Sebastian Hengst 56587adeab Backed out changeset 5b706cd241cb (bug 483155) for Valgrind failure on Linux x64 opt. r=backout 2017-08-11 10:48:10 +02:00
Henri Sivonen dacb0e05f1 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 989c11459e16076a043aa7311c95941686e86ef7
2017-07-04 11:00:03 +03:00
Henri Sivonen c18a3863eb Bug 1269490 - Merge nsHtml5Atoms into nsGkAtoms. r=wchen
MozReview-Commit-ID: EcfnXkFuJy3

--HG--
extra : rebase_source : eb4ba2c1b95a9ccabdcdecf65f3b757691f033b8
2017-04-20 11:47:02 +03:00
Henri Sivonen 1eb6516385 Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName. r=wchen
Moving methods that refer to constant to the header that defines the
constants makes it infeasible to #define the constants at the end
of the header. To avoid introducing a new pass over the Java AST,
this patch turns the primitive constants that were
previously #defined into C++ contants, which, according to
Stroustrup 3rd ed., are handled at compile-time and don't consume
storage.

MozReview-Commit-ID: JnaDgW2OM7t

--HG--
extra : rebase_source : 3678d8db967e83d8b7e265a5ef926050cc20d770
2017-04-20 10:34:32 +03:00
Henri Sivonen 2dfbad67f6 Bug 1347737 - Introduce a new non-heap-allocated type for holding nsStringBuffer* in the HTML parser. r=wchen.
MozReview-Commit-ID: Gn9fXroxQhY

--HG--
extra : rebase_source : 70bc539e80ce0b2372569a194366cfe559614fd1
2017-03-20 14:45:15 +02:00
Henri Sivonen eea6b5c9c8 Bug 1288084 - Expose a line number for each attribute, v2; r=wchen 2016-09-20 16:31:57 +02:00
Mats Palmgren 81171b713c Bug 1256530 - Fix compiler warnings about casting to larger size. r=hsivonen
Specifically, the Microsoft VS2015u1 compiler said:
warning C4312: 'type cast': conversion from 'unsigned int' to
'nsIContent *' of greater size
2016-03-17 17:27:56 +01:00
Chris Peterson 7abc7ee59e Bug 1236322 - Part 1: Annotate intentional switch fallthroughs to suppress -Wimplicit-fallthrough warnings in parser/. r=hsivonen
parser/html/nsHtml5Highlighter.cpp:572:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

parser/htmlparser/nsScanner.cpp:425:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
parser/htmlparser/nsScanner.cpp:780:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-12-25 00:01:32 -07:00
Nathan Froyd ddf68de505 Bug 1229962 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in parser/html/; r=hsivonen 2015-11-19 20:19:57 -05:00
J. Ryan Stinnett e1f26b0e50 Bug 1067325 - Control syntax highlighting via a class. r=hsivonen 2015-05-23 18:17:50 -05:00
William Chen b55e2cb1a3 Bug 1091425 - Use the correct document when creating nodes in the HTML5 parser. r=hsivonen 2014-11-09 22:50:18 -08:00
Diwas Joshi fdfd9cce83 Bug 617789 - Links in view page source when base href exists fixed. r=hsivonen. 2014-09-30 12:35:17 +03:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Isaac Aggrey 481e7dfb0b Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Ehsan Akhgari e368dc9c85 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
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham 68d38d677f Bug 759095 - upgrade license to MPL 2, and other licensing cleanups.
--HG--
extra : rebase_source : da55a4937383eda2baf7c9a362501da8ee664146
2012-05-29 16:52:43 +01:00
Henri Sivonen 1ccc571266 Bug 742414 & Bug 731234 - Highlight script end tag correctly in View Source and avoid crashing when doing so. r=smaug. 2012-04-17 14:53:52 +03:00
Henri Sivonen 034415bb26 Bug 695640 - Remove View Source pre chunking, because it is no longer needed for reasonable perf. r=smaug. 2011-11-30 19:44:31 +02:00
Henri Sivonen bd1b9e065c Bug 703965 - Use View Source styling when viewing plain text source. r=smaug. 2011-11-30 19:44:31 +02:00
Henri Sivonen 960819c184 Bug 699356 - Show the URL of the page in the title of the View Source window. r=smaug. 2011-11-30 19:44:31 +02:00
Matt Brubeck 12c396afdf Back out 38814e0bafb9 through c5d44e6e957b because of test failures 2011-11-30 11:44:50 -08:00
Henri Sivonen 7acf63e90a Bug 695640 - Remove View Source pre chunking, because it is no longer needed for reasonable perf. r=smaug. 2011-11-30 19:44:31 +02:00
Henri Sivonen efe5ce2bae Bug 703965 - Use View Source styling when viewing plain text source. r=smaug. 2011-11-30 19:44:31 +02:00
Henri Sivonen 69efc69ab9 Bug 699356 - Show the URL of the page in the title of the View Source window. r=smaug. 2011-11-30 19:44:31 +02:00
Henri Sivonen ae6ef685b6 Bug 704667 - Take transitions from the comment start state to the data state into account when doing syntax highlighting. r=smaug. 2011-11-29 08:55:09 +02:00
Henri Sivonen 5579c150ca Bug 700260 - Honor the view_source.tab_size pref in a way that actually works. r=smaug. 2011-11-07 21:20:14 +02:00
Henri Sivonen 1a4dfbfc57 Bug 700042 - Support turning off View Source syntax highlighting. r=smaug. 2011-11-07 21:20:14 +02:00
Henri Sivonen c718393931 Bug 482921 part 14 - Address review comments. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 7506879167 Bug 482921 part 10 - Support parametrized error messages in new View Source. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 4600ed7a01 Bug 482921 part 8 - Start a new <pre> occasionally in View Source refixing bug 86355. r=bzbarsky. 2011-11-01 13:33:11 +02:00
Henri Sivonen 976ec770d6 Bug 482921 part 7 - Add an id for each line in new View Source. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 2de2833898 Bug 482921 part 4 - Support XML syntax highlighting in the parser core. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 8fd5e88e4a Bug 482921 part 3 - Highlight tree builder-level errors in View Source. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 2df8639026 Bug 482921 part 2 - Highligh tokenizer-level errors in View Source. r=Olli.Pettay. 2011-11-01 13:33:11 +02:00
Henri Sivonen 267803686e Bug 482921 part 1 - Implement HTML syntax highlighting using the new parser. r=Olli.Pettay. 2010-07-30 13:15:38 +03:00