зеркало из https://github.com/mozilla/gecko-dev.git
94e3b7524c
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 |
||
---|---|---|
.. | ||
components.conf | ||
moz.build | ||
nsContentDLF.cpp | ||
nsContentDLF.h | ||
nsLayoutCID.h | ||
nsLayoutModule.cpp | ||
nsLayoutModule.h | ||
nsLayoutStatics.cpp | ||
nsLayoutStatics.h |