gecko-dev/layout/build
Masayuki Nakano 94e3b7524c Bug 1529884 - part 1: Make Document use hashtable to map HTML command and internal command data r=smaug
Currently, `Document` converts HTML command (e.g., used by `execCommand()`) to
internal XUL command with array in the global space.  However, it requires scan
of the array for every command access.

This patch makes `Document` use hashtable to make the conversion faster.

New mapping info comes from:

- `mXULCommandName` is same as `internalCommandString`
- `mCommand` is mapped in CommandList.h from `mXULCommandName`
- `mGetEditorCommandFunc` is mapped from `mXULCommandName` in:
  - https://searchfox.org/mozilla-central/rev/d143f8ce30d1bcfee7a1227c27bf876a85f8cede/editor/libeditor/EditorController.cpp#31-32,34-38,40-41,43,45-51,54-57,67-112
  - https://searchfox.org/mozilla-central/rev/75294521381b331f821aad3d6b60636844080ee2/editor/libeditor/HTMLEditorController.cpp#26-28,31-39,48,51-52,55-58,60-63,65-73,76-80,83-88,90-91,93-94,97-100,102-104
- `mExecCommandParam` is converted from `useNewParam` and `convertToBoolean`:
  - If corresponding editor command class's `DoCommandParam()` just calls
    `DoCommand()`, `ExecCommandParam::Ignore`.
  - If `useNewParam` is `true` and `convertToBoolean` is `false`, given value
    should be ignored and may set constant instead.  In this case,
    `ExecCommandParam::Ignore`.
  - If `useNewParam` is `false` and `convertToBoolean` is `false`, given value
    should be treated as string.  In this case, `ExecCommandParam::String`.
  - If `useNewParam` is `false` and `convertToBoolean` is `true`, given value
    should be treated as bool.  In this case, if given command is not a legacy
    one, `ExecCommandParam::Boolean`.  Otherwise, i.e., if given command
    is a legacy one, `ExecCommandParam::InvertedBoolean`.
  - Otherwise, `ExecCommandParam::String`.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 10:23:59 +00:00
..
components.conf Bug 1524687: Part 3 - Convert nsImageModule to static registration. r=jwatt 2019-01-24 15:40:58 -08:00
moz.build Bug 1547397 - Part 3: Move the permission manager code to extensions/permissions; r=baku 2019-04-30 14:06:53 +00:00
nsContentDLF.cpp Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan 2019-04-12 05:31:32 +00:00
nsContentDLF.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
nsLayoutCID.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsLayoutModule.cpp Bug 1541792 - Replace linker magic with manual component registration. r=froydnj 2019-04-05 02:30:56 +00:00
nsLayoutModule.h Bug 1544897: Add includes, forward declarations, and namespaces to address non-unified build bustage in layout/{base,build,generic}. r=TYLin 2019-04-16 21:18:30 +00:00
nsLayoutStatics.cpp Bug 1529884 - part 1: Make Document use hashtable to map HTML command and internal command data r=smaug 2019-06-10 10:23:59 +00:00
nsLayoutStatics.h Bug 1511842 - Remove unused nsLayoutStaticsRef. r=TYLin 2018-12-05 02:21:40 +00:00