Merged revision(s) 49889-49892 #dcded9666e-#dcded9666e from trunk:

SynEdit, Highlighter: more html5 tags. Issue #28547 patch by Janusz
........
SynEdit, Highlighter: more css3 tags. Issue #28548 patch by Janusz
........
SynEdit: invalidate if Markup.enable changes. Issue #0028729
........
SynEdit: fix drag and drop selection-text, drop (move) after multi-byte chars. Issue #0028724
........

git-svn-id: branches/fixes_1_4@49899 -
This commit is contained in:
maxim 2015-09-29 22:22:25 +00:00
parent 68eac42c57
commit 8cc0b065b0
10 changed files with 172 additions and 40 deletions

View File

@ -5827,7 +5827,7 @@ begin
try try
inherited; inherited;
ComputeCaret(X, Y); ComputeCaret(X, Y);
NewCaret := CaretXY; NewCaret := LogicalCaretXY;
// if from other control then move when SHIFT, else copy // if from other control then move when SHIFT, else copy
// if from Self then copy when CTRL, else move // if from Self then copy when CTRL, else move
if Source <> Self then begin if Source <> Self then begin
@ -5874,7 +5874,7 @@ begin
// insert the selected text // insert the selected text
FCaret.IncForcePastEOL; FCaret.IncForcePastEOL;
try try
CaretXY := NewCaret; LogicalCaretXY := NewCaret;
BlockBegin := NewCaret; BlockBegin := NewCaret;
SetSelTextPrimitive(smNormal, PChar(DragDropText), true); SetSelTextPrimitive(smNormal, PChar(DragDropText), true);
if FoldInfo <> '' then begin if FoldInfo <> '' then begin
@ -5886,9 +5886,9 @@ begin
finally finally
FCaret.DecForcePastEOL; FCaret.DecForcePastEOL;
end; end;
FCaret.LineCharPos := NewCaret; FCaret.LineBytePos := NewCaret;
BlockBegin := PhysicalToLogicalPos(NewCaret); BlockBegin := NewCaret;
BlockEnd := LogicalCaretXY; BlockEnd := NewCaret;
finally finally
InternalEndUndoBlock; InternalEndUndoBlock;
end; end;

View File

@ -52,6 +52,7 @@ type
procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override; procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override;
procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override; procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override;
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
procedure DoVisibleChanged(AVisible: Boolean); override; procedure DoVisibleChanged(AVisible: Boolean); override;
public public
constructor Create(ASynEdit: TSynEditBase); constructor Create(ASynEdit: TSynEditBase);
@ -174,6 +175,11 @@ begin
InvalidateBracketHighlight; InvalidateBracketHighlight;
end; end;
procedure TSynEditMarkupBracket.DoEnabledChanged(Sender: TObject);
begin
InvalidateBracketHighlight;
end;
procedure TSynEditMarkupBracket.DoVisibleChanged(AVisible: Boolean); procedure TSynEditMarkupBracket.DoVisibleChanged(AVisible: Boolean);
begin begin
inherited DoVisibleChanged(AVisible); inherited DoVisibleChanged(AVisible);

View File

@ -51,6 +51,8 @@ type
procedure InternalUpdateCtrlMouse; procedure InternalUpdateCtrlMouse;
protected protected
procedure SetLines(const AValue : TSynEditStrings); override; procedure SetLines(const AValue : TSynEditStrings); override;
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
public public
procedure UpdateCtrlState(aShift: TShiftState); procedure UpdateCtrlState(aShift: TShiftState);
procedure UpdateCtrlMouse; procedure UpdateCtrlMouse;
@ -133,8 +135,8 @@ procedure TSynEditMarkupCtrlMouseLink.InternalUpdateCtrlMouse;
procedure doNotShowLink; procedure doNotShowLink;
begin begin
if CtrlMouseLine > 0 then if FCtrlMouseLine >= 0 then
TCustomSynEdit(SynEdit).Invalidate; InvalidateSynLines(FCtrlMouseLine, FCtrlMouseLine);
FCursor := crDefault; FCursor := crDefault;
CtrlMouseLine:=-1; CtrlMouseLine:=-1;
FCtrlLinkable := False; FCtrlLinkable := False;
@ -152,11 +154,13 @@ begin
(NewX2 = CtrlMouseX2) (NewX2 = CtrlMouseX2)
then then
exit; exit;
if (FCtrlMouseLine >= 0) and (FCtrlMouseLine <> NewY) then
InvalidateSynLines(FCtrlMouseLine, FCtrlMouseLine);
FCtrlLinkable := TCustomSynEdit(SynEdit).IsLinkable(NewY, NewX1, NewX2); FCtrlLinkable := TCustomSynEdit(SynEdit).IsLinkable(NewY, NewX1, NewX2);
CtrlMouseLine := fLastMouseCaret.Y; CtrlMouseLine := fLastMouseCaret.Y;
CtrlMouseX1 := NewX1; CtrlMouseX1 := NewX1;
CtrlMouseX2 := NewX2; CtrlMouseX2 := NewX2;
TCustomSynEdit(SynEdit).Invalidate; InvalidateSynLines(FCtrlMouseLine, FCtrlMouseLine);
if FCtrlLinkable then if FCtrlLinkable then
FCursor := crHandPoint FCursor := crHandPoint
else else
@ -238,6 +242,21 @@ begin
end; end;
end; end;
procedure TSynEditMarkupCtrlMouseLink.DoMarkupChanged(AMarkup: TSynSelectedColor
);
begin
inherited DoMarkupChanged(AMarkup);
if FCtrlMouseLine >= 0 then
InvalidateSynLines(FCtrlMouseLine, FCtrlMouseLine);
end;
procedure TSynEditMarkupCtrlMouseLink.DoEnabledChanged(Sender: TObject);
begin
inherited DoEnabledChanged(Sender);
if FCtrlMouseLine >= 0 then
InvalidateSynLines(FCtrlMouseLine, FCtrlMouseLine);
end;
function TSynEditMarkupCtrlMouseLink.GetMarkupAttributeAtRowCol(const aRow: Integer; function TSynEditMarkupCtrlMouseLink.GetMarkupAttributeAtRowCol(const aRow: Integer;
const aStartCol: TLazSynDisplayTokenBound; const AnRtlInfo: TLazSynDisplayRtlInfo): TSynSelectedColor; const aStartCol: TLazSynDisplayTokenBound; const AnRtlInfo: TLazSynDisplayRtlInfo): TSynSelectedColor;
begin begin

View File

@ -147,6 +147,7 @@ type
procedure DoTopLineChanged(OldTopLine : Integer); override; procedure DoTopLineChanged(OldTopLine : Integer); override;
procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override; procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override;
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override; // 1 based procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override; // 1 based
procedure DoVisibleChanged(AVisible: Boolean); override; procedure DoVisibleChanged(AVisible: Boolean); override;
function HasVisibleMatch: Boolean; // does not check, if in visible line range. Only Count and DideSingleMatch function HasVisibleMatch: Boolean; // does not check, if in visible line range. Only Count and DideSingleMatch
@ -1966,6 +1967,11 @@ begin
FMarkupEnabled := MarkupInfo.IsEnabled; FMarkupEnabled := MarkupInfo.IsEnabled;
end; end;
procedure TSynEditMarkupHighlightAllBase.DoEnabledChanged(Sender: TObject);
begin
Invalidate;
end;
function TSynEditMarkupHighlightAllBase.GetMatchCount: Integer; function TSynEditMarkupHighlightAllBase.GetMatchCount: Integer;
begin begin
Result := fMatches.Count; Result := fMatches.Count;

View File

@ -46,6 +46,7 @@ type
procedure MarkupChangedIntern(AMarkup: TObject); procedure MarkupChangedIntern(AMarkup: TObject);
protected protected
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
public public
constructor Create(ASynEdit : TSynEditBase; ASelection: TSynEditSelection); constructor Create(ASynEdit : TSynEditBase; ASelection: TSynEditSelection);
destructor Destroy; override; destructor Destroy; override;
@ -106,6 +107,11 @@ begin
InvalidateSynLines(p1.y, p2.y); InvalidateSynLines(p1.y, p2.y);
end; end;
procedure TSynEditMarkupSelection.DoEnabledChanged(Sender: TObject);
begin
DoMarkupChanged(nil);
end;
constructor TSynEditMarkupSelection.Create(ASynEdit : TSynEditBase; ASelection: TSynEditSelection); constructor TSynEditMarkupSelection.Create(ASynEdit : TSynEditBase; ASelection: TSynEditSelection);
begin begin
inherited Create(ASynEdit); inherited Create(ASynEdit);

View File

@ -42,6 +42,7 @@ type
procedure SetVisibleSpecialChars(AValue: TSynVisibleSpecialChars); procedure SetVisibleSpecialChars(AValue: TSynVisibleSpecialChars);
protected protected
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
function IsSpecial(pos: Integer): Boolean; inline; function IsSpecial(pos: Integer): Boolean; inline;
public public
constructor Create(ASynEdit : TSynEditBase); constructor Create(ASynEdit : TSynEditBase);
@ -73,7 +74,13 @@ end;
procedure TSynEditMarkupSpecialChar.DoMarkupChanged(AMarkup: TSynSelectedColor); procedure TSynEditMarkupSpecialChar.DoMarkupChanged(AMarkup: TSynSelectedColor);
begin begin
inherited DoMarkupChanged(AMarkup); inherited DoMarkupChanged(AMarkup);
FHasMarkup := AMarkup.IsEnabled; FHasMarkup := RealEnabled;
SynEdit.Invalidate;
end;
procedure TSynEditMarkupSpecialChar.DoEnabledChanged(Sender: TObject);
begin
FHasMarkup := RealEnabled;
SynEdit.Invalidate; SynEdit.Invalidate;
end; end;

View File

@ -52,6 +52,7 @@ type
procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override; procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override;
procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override; procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override;
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
public public
constructor Create(ASynEdit: TSynEditBase); constructor Create(ASynEdit: TSynEditBase);
destructor Destroy; override; destructor Destroy; override;
@ -122,6 +123,11 @@ begin
InvalidateLineHighlight; InvalidateLineHighlight;
end; end;
procedure TSynEditMarkupSpecialLine.DoEnabledChanged(Sender: TObject);
begin
InvalidateLineHighlight;
end;
function TSynEditMarkupSpecialLine.RealEnabled: Boolean; function TSynEditMarkupSpecialLine.RealEnabled: Boolean;
begin begin
Result := Enabled and Result := Enabled and

View File

@ -56,6 +56,7 @@ type
procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override; procedure DoLinesInWindoChanged(OldLinesInWindow : Integer); override;
procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override; procedure DoTextChanged(StartLine, EndLine, ACountDiff: Integer); override;
procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override; procedure DoMarkupChanged(AMarkup: TSynSelectedColor); override;
procedure DoEnabledChanged(Sender: TObject); override;
procedure DoVisibleChanged(AVisible: Boolean); override; procedure DoVisibleChanged(AVisible: Boolean); override;
procedure InvalidateCurrentHighlight; procedure InvalidateCurrentHighlight;
public public
@ -331,6 +332,12 @@ begin
InvalidateCurrentHighlight; InvalidateCurrentHighlight;
end; end;
procedure TSynEditMarkupWordGroup.DoEnabledChanged(Sender: TObject);
begin
FForceInvalidate := True;
InvalidateCurrentHighlight;
end;
procedure TSynEditMarkupWordGroup.DoVisibleChanged(AVisible: Boolean); procedure TSynEditMarkupWordGroup.DoVisibleChanged(AVisible: Boolean);
begin begin
inherited DoVisibleChanged(AVisible); inherited DoVisibleChanged(AVisible);

View File

@ -104,6 +104,7 @@ type
function Func41: TtkTokenKind; function Func41: TtkTokenKind;
function Func43: TtkTokenKind; function Func43: TtkTokenKind;
function Func45: TtkTokenKind; function Func45: TtkTokenKind;
function Func47: TtkTokenKind;
function Func51: TtkTokenKind; function Func51: TtkTokenKind;
function Func52: TtkTokenKind; function Func52: TtkTokenKind;
function Func53: TtkTokenKind; function Func53: TtkTokenKind;
@ -119,6 +120,7 @@ type
function Func63: TtkTokenKind; function Func63: TtkTokenKind;
function Func64: TtkTokenKind; function Func64: TtkTokenKind;
function Func65: TtkTokenKind; function Func65: TtkTokenKind;
function Func66: TtkTokenKind;
function Func67: TtkTokenKind; function Func67: TtkTokenKind;
function Func69: TtkTokenKind; function Func69: TtkTokenKind;
function Func70: TtkTokenKind; function Func70: TtkTokenKind;
@ -132,6 +134,7 @@ type
function Func81: TtkTokenKind; function Func81: TtkTokenKind;
function Func82: TtkTokenKind; function Func82: TtkTokenKind;
function Func83: TtkTokenKind; function Func83: TtkTokenKind;
function Func84: TtkTokenKind;
function Func85: TtkTokenKind; function Func85: TtkTokenKind;
function Func86: TtkTokenKind; function Func86: TtkTokenKind;
function Func87: TtkTokenKind; function Func87: TtkTokenKind;
@ -171,6 +174,7 @@ type
function Func122: TtkTokenKind; function Func122: TtkTokenKind;
function Func123: TtkTokenKind; function Func123: TtkTokenKind;
function Func124: TtkTokenKind; function Func124: TtkTokenKind;
function Func125: TtkTokenKind;
function Func126: TtkTokenKind; function Func126: TtkTokenKind;
function Func127: TtkTokenKind; function Func127: TtkTokenKind;
function Func128: TtkTokenKind; function Func128: TtkTokenKind;
@ -207,6 +211,7 @@ type
function Func172: TtkTokenKind; function Func172: TtkTokenKind;
function Func173: TtkTokenKind; function Func173: TtkTokenKind;
function Func174: TtkTokenKind; function Func174: TtkTokenKind;
function Func175: TtkTokenKind;
function Func177: TtkTokenKind; function Func177: TtkTokenKind;
function Func178: TtkTokenKind; function Func178: TtkTokenKind;
function Func179: TtkTokenKind; function Func179: TtkTokenKind;
@ -217,11 +222,13 @@ type
function Func191: TtkTokenKind; function Func191: TtkTokenKind;
function Func194: TtkTokenKind; function Func194: TtkTokenKind;
function Func195: TtkTokenKind; function Func195: TtkTokenKind;
function Func198: TtkTokenKind;
function Func199: TtkTokenKind; function Func199: TtkTokenKind;
function Func200: TtkTokenKind; function Func200: TtkTokenKind;
function Func205: TtkTokenKind; function Func205: TtkTokenKind;
function Func210: TtkTokenKind; function Func210: TtkTokenKind;
function Func213: TtkTokenKind; function Func213: TtkTokenKind;
function Func216: TtkTokenKind;
function Func220: TtkTokenKind; function Func220: TtkTokenKind;
function Func222: TtkTokenKind; function Func222: TtkTokenKind;
function Func224: TtkTokenKind; function Func224: TtkTokenKind;
@ -341,6 +348,7 @@ begin
FIdentFuncTable[41] := @Func41; FIdentFuncTable[41] := @Func41;
FIdentFuncTable[43] := @Func43; FIdentFuncTable[43] := @Func43;
FIdentFuncTable[45] := @Func45; FIdentFuncTable[45] := @Func45;
FIdentFuncTable[47] := @Func47;
FIdentFuncTable[51] := @Func51; FIdentFuncTable[51] := @Func51;
FIdentFuncTable[52] := @Func52; FIdentFuncTable[52] := @Func52;
FIdentFuncTable[53] := @Func53; FIdentFuncTable[53] := @Func53;
@ -356,6 +364,7 @@ begin
FIdentFuncTable[63] := @Func63; FIdentFuncTable[63] := @Func63;
FIdentFuncTable[64] := @Func64; FIdentFuncTable[64] := @Func64;
FIdentFuncTable[65] := @Func65; FIdentFuncTable[65] := @Func65;
FIdentFuncTable[66] := @Func66;
FIdentFuncTable[67] := @Func67; FIdentFuncTable[67] := @Func67;
FIdentFuncTable[69] := @Func69; FIdentFuncTable[69] := @Func69;
FIdentFuncTable[70] := @Func70; FIdentFuncTable[70] := @Func70;
@ -369,6 +378,7 @@ begin
FIdentFuncTable[81] := @Func81; FIdentFuncTable[81] := @Func81;
FIdentFuncTable[82] := @Func82; FIdentFuncTable[82] := @Func82;
FIdentFuncTable[83] := @Func83; FIdentFuncTable[83] := @Func83;
FIdentFuncTable[84] := @Func84;
FIdentFuncTable[85] := @Func85; FIdentFuncTable[85] := @Func85;
FIdentFuncTable[86] := @Func86; FIdentFuncTable[86] := @Func86;
FIdentFuncTable[87] := @Func87; FIdentFuncTable[87] := @Func87;
@ -408,6 +418,7 @@ begin
FIdentFuncTable[122] := @Func122; FIdentFuncTable[122] := @Func122;
FIdentFuncTable[123] := @Func123; FIdentFuncTable[123] := @Func123;
FIdentFuncTable[124] := @Func124; FIdentFuncTable[124] := @Func124;
FIdentFuncTable[125] := @Func125;
FIdentFuncTable[126] := @Func126; FIdentFuncTable[126] := @Func126;
FIdentFuncTable[127] := @Func127; FIdentFuncTable[127] := @Func127;
FIdentFuncTable[128] := @Func128; FIdentFuncTable[128] := @Func128;
@ -444,6 +455,7 @@ begin
FIdentFuncTable[172] := @Func172; FIdentFuncTable[172] := @Func172;
FIdentFuncTable[173] := @Func173; FIdentFuncTable[173] := @Func173;
FIdentFuncTable[174] := @Func174; FIdentFuncTable[174] := @Func174;
FIdentFuncTable[175] := @Func175;
FIdentFuncTable[177] := @Func177; FIdentFuncTable[177] := @Func177;
FIdentFuncTable[178] := @Func178; FIdentFuncTable[178] := @Func178;
FIdentFuncTable[179] := @Func179; FIdentFuncTable[179] := @Func179;
@ -454,11 +466,13 @@ begin
FIdentFuncTable[191] := @Func191; FIdentFuncTable[191] := @Func191;
FIdentFuncTable[194] := @Func194; FIdentFuncTable[194] := @Func194;
FIdentFuncTable[195] := @Func195; FIdentFuncTable[195] := @Func195;
FIdentFuncTable[198] := @Func198;
FIdentFuncTable[199] := @Func199; FIdentFuncTable[199] := @Func199;
FIdentFuncTable[200] := @Func200; FIdentFuncTable[200] := @Func200;
FIdentFuncTable[205] := @Func205; FIdentFuncTable[205] := @Func205;
FIdentFuncTable[210] := @Func210; FIdentFuncTable[210] := @Func210;
FIdentFuncTable[213] := @Func213; FIdentFuncTable[213] := @Func213;
FIdentFuncTable[216] := @Func216;
FIdentFuncTable[220] := @Func220; FIdentFuncTable[220] := @Func220;
FIdentFuncTable[222] := @Func222; FIdentFuncTable[222] := @Func222;
FIdentFuncTable[224] := @Func224; FIdentFuncTable[224] := @Func224;
@ -626,6 +640,14 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func47: TtkTokenKind;
begin
if KeyComp('flex') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func51: TtkTokenKind; function TSynCssSyn.Func51: TtkTokenKind;
begin begin
if KeyComp('top') or KeyComp('panose-1') or KeyComp('@font-face') then if KeyComp('top') or KeyComp('panose-1') or KeyComp('@font-face') then
@ -700,7 +722,7 @@ end;
function TSynCssSyn.Func60: TtkTokenKind; function TSynCssSyn.Func60: TtkTokenKind;
begin begin
if KeyComp('cue-after') then if KeyComp('cue-after') or KeyComp('order') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -726,7 +748,7 @@ end;
function TSynCssSyn.Func63: TtkTokenKind; function TSynCssSyn.Func63: TtkTokenKind;
begin begin
if KeyComp('color') or KeyComp('z-index') then if KeyComp('color') or KeyComp('z-index') or KeyComp('tab-size') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -734,7 +756,7 @@ end;
function TSynCssSyn.Func64: TtkTokenKind; function TSynCssSyn.Func64: TtkTokenKind;
begin begin
if KeyComp('width')then if KeyComp('width') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -748,6 +770,14 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func66: TtkTokenKind;
begin
if KeyComp('align-self') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func67: TtkTokenKind; function TSynCssSyn.Func67: TtkTokenKind;
begin begin
if KeyComp('slope') or KeyComp('baseline') then if KeyComp('slope') or KeyComp('baseline') then
@ -774,7 +804,7 @@ end;
function TSynCssSyn.Func71: TtkTokenKind; function TSynCssSyn.Func71: TtkTokenKind;
begin begin
if KeyComp('target') then if KeyComp('target') or KeyComp('object-fit') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -791,7 +821,7 @@ end;
function TSynCssSyn.Func74: TtkTokenKind; function TSynCssSyn.Func74: TtkTokenKind;
begin begin
if KeyComp('speak-header') or KeyComp('min-height') or KeyComp('nav-down') if KeyComp('speak-header') or KeyComp('min-height') or KeyComp('nav-down')
or KeyComp('nav-index') then or KeyComp('nav-index') or KeyComp('@charset') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -807,8 +837,8 @@ end;
function TSynCssSyn.Func78: TtkTokenKind; function TSynCssSyn.Func78: TtkTokenKind;
begin begin
if KeyComp('page-break-after') or KeyComp('word-break') or KeyComp('border-image') or if KeyComp('page-break-after') or KeyComp('word-break') or KeyComp('border-image')
KeyComp('line-height') then or KeyComp('line-height') or KeyComp('flex-basis') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -855,6 +885,14 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func84: TtkTokenKind;
begin
if KeyComp('flex-flow') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func85: TtkTokenKind; function TSynCssSyn.Func85: TtkTokenKind;
begin begin
if KeyComp('bottom') or KeyComp('target-name') then if KeyComp('bottom') or KeyComp('target-name') then
@ -865,7 +903,7 @@ end;
function TSynCssSyn.Func86: TtkTokenKind; function TSynCssSyn.Func86: TtkTokenKind;
begin begin
if KeyComp('margin-left') or KeyComp('border-left') or KeyComp('display') then if KeyComp('margin-left') or KeyComp('border-left') or KeyComp('display') or KeyComp('flex-wrap') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -897,7 +935,7 @@ end;
function TSynCssSyn.Func90: TtkTokenKind; function TSynCssSyn.Func90: TtkTokenKind;
begin begin
if KeyComp('white-space') or KeyComp('ruby-align') then if KeyComp('white-space') or KeyComp('ruby-align') or KeyComp('align-items') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -905,7 +943,7 @@ end;
function TSynCssSyn.Func91: TtkTokenKind; function TSynCssSyn.Func91: TtkTokenKind;
begin begin
if KeyComp('orphans') or KeyComp('content') or KeyComp('@import') then if KeyComp('orphans') or KeyComp('content') or KeyComp('@import') or KeyComp('flex-grow') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1029,7 +1067,7 @@ end;
function TSynCssSyn.Func107: TtkTokenKind; function TSynCssSyn.Func107: TtkTokenKind;
begin begin
if KeyComp('border-width') or KeyComp('border-image-slice') then if KeyComp('border-width') or KeyComp('border-image-slice') or KeyComp('flex-shrink') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1037,7 +1075,8 @@ end;
function TSynCssSyn.Func108: TtkTokenKind; function TSynCssSyn.Func108: TtkTokenKind;
begin begin
if KeyComp('font-weight') or KeyComp('play-during') or KeyComp('text-wrap') then if KeyComp('font-weight') or KeyComp('play-during') or KeyComp('text-wrap')
or KeyComp('user-select') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1069,7 +1108,8 @@ end;
function TSynCssSyn.Func112: TtkTokenKind; function TSynCssSyn.Func112: TtkTokenKind;
begin begin
if KeyComp('background-image') or KeyComp('border-spacing') or KeyComp('rotation') then if KeyComp('background-image') or KeyComp('border-spacing')
or KeyComp('rotation') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1093,7 +1133,8 @@ end;
function TSynCssSyn.Func115: TtkTokenKind; function TSynCssSyn.Func115: TtkTokenKind;
begin begin
if KeyComp('table-layout') or KeyComp('border-radius') or KeyComp('column-rule') then if KeyComp('table-layout') or KeyComp('border-radius')
or KeyComp('column-rule') or KeyComp('align-content') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1110,7 +1151,7 @@ end;
function TSynCssSyn.Func117: TtkTokenKind; function TSynCssSyn.Func117: TtkTokenKind;
begin begin
if KeyComp('font-style') or KeyComp('position') or KeyComp('speak-numeral') if KeyComp('font-style') or KeyComp('position') or KeyComp('speak-numeral')
Or KeyComp('background-clip') then or KeyComp('background-clip') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1172,9 +1213,17 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func125: TtkTokenKind;
begin
if KeyComp('flex-direction') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func126: TtkTokenKind; function TSynCssSyn.Func126: TtkTokenKind;
begin begin
if KeyComp('border-collapse') or KeyComp('definition-src') then if KeyComp('border-collapse') or KeyComp('definition-src') or KeyComp('text-align-last') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1231,7 +1280,7 @@ end;
function TSynCssSyn.Func134: TtkTokenKind; function TSynCssSyn.Func134: TtkTokenKind;
begin begin
if KeyComp('layout-grid-line') then if KeyComp('layout-grid-line') or KeyComp('animation-fill-mode') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1296,7 +1345,7 @@ end;
function TSynCssSyn.Func144: TtkTokenKind; function TSynCssSyn.Func144: TtkTokenKind;
begin begin
if KeyComp('counter-reset') then if KeyComp('counter-reset') or KeyComp('box-decoration-break') or KeyComp('@supports') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1320,8 +1369,7 @@ end;
function TSynCssSyn.Func149: TtkTokenKind; function TSynCssSyn.Func149: TtkTokenKind;
begin begin
if KeyComp('border-right-color') or KeyComp('background-origin') if KeyComp('border-right-color') or KeyComp('background-origin') or KeyComp('backface-visibility') then
or KeyComp('backface-visibility') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1353,7 +1401,7 @@ end;
function TSynCssSyn.Func153: TtkTokenKind; function TSynCssSyn.Func153: TtkTokenKind;
begin begin
if KeyComp('box-ordinal-group') then if KeyComp('box-ordinal-group') or KeyComp('object-position') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1393,7 +1441,8 @@ end;
function TSynCssSyn.Func160: TtkTokenKind; function TSynCssSyn.Func160: TtkTokenKind;
begin begin
if KeyComp('layout-grid-type') or KeyComp('text-justify') or KeyComp('column-rule-width') then if KeyComp('layout-grid-type') or KeyComp('text-justify')
or KeyComp('column-rule-width') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1417,7 +1466,8 @@ end;
function TSynCssSyn.Func167: TtkTokenKind; function TSynCssSyn.Func167: TtkTokenKind;
begin begin
if KeyComp('border-right-style') or KeyComp('rotation-point') or KeyComp('transition-delay') then if KeyComp('border-right-style') or KeyComp('rotation-point')
or KeyComp('transition-delay') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1463,9 +1513,18 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func175: TtkTokenKind;
begin
if KeyComp('text-decoration-line') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func177: TtkTokenKind; function TSynCssSyn.Func177: TtkTokenKind;
begin begin
if KeyComp('animation-play-state') or KeyComp('column-rule-style') or KeyComp('transform-origin') then if KeyComp('animation-play-state') or KeyComp('column-rule-style')
or KeyComp('transform-origin') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1489,7 +1548,7 @@ end;
function TSynCssSyn.Func182: TtkTokenKind; function TSynCssSyn.Func182: TtkTokenKind;
begin begin
if KeyComp('background-attachment') then if KeyComp('background-attachment') or KeyComp('justify-content') then
Result := tkKey Result := tkKey
else else
Result := tkIdentifier; Result := tkIdentifier;
@ -1544,6 +1603,14 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func198: TtkTokenKind;
begin
if KeyComp('text-decoration-color') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func199: TtkTokenKind; function TSynCssSyn.Func199: TtkTokenKind;
begin begin
if KeyComp('background-position-x') then if KeyComp('background-position-x') then
@ -1584,6 +1651,14 @@ begin
Result := tkIdentifier; Result := tkIdentifier;
end; end;
function TSynCssSyn.Func216: TtkTokenKind;
begin
if KeyComp('text-decoration-style') then
Result := tkKey
else
Result := tkIdentifier;
end;
function TSynCssSyn.Func220: TtkTokenKind; function TSynCssSyn.Func220: TtkTokenKind;
begin begin
if KeyComp('list-style-position') then if KeyComp('list-style-position') then

View File

@ -1007,7 +1007,7 @@ end;
function TSynHTMLSyn.Func37: TtkTokenKind; function TSynHTMLSyn.Func37: TtkTokenKind;
begin begin
if KeyComp('CITE') Or KeyComp('NAV') then begin if KeyComp('CITE') Or KeyComp('NAV') Or KeyComp('MAIN') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;
@ -1103,7 +1103,7 @@ end;
function TSynHTMLSyn.Func48: TtkTokenKind; function TSynHTMLSyn.Func48: TtkTokenKind;
begin begin
if KeyComp('BLINK') then begin if KeyComp('BLINK') Or KeyComp('DIALOG') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;
@ -1451,7 +1451,7 @@ end;
function TSynHTMLSyn.Func100: TtkTokenKind; function TSynHTMLSyn.Func100: TtkTokenKind;
begin begin
if KeyComp('FIGCAPTION') then begin if KeyComp('FIGCAPTION') Or KeyComp('MENUITEM') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;
@ -1761,7 +1761,7 @@ end;
function TSynHTMLSyn.Func159: TtkTokenKind; function TSynHTMLSyn.Func159: TtkTokenKind;
begin begin
if KeyComp('/CITE') Or KeyComp('/NAV') then begin if KeyComp('/CITE') Or KeyComp('/NAV') Or KeyComp('/MAIN') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;
@ -1842,7 +1842,7 @@ end;
function TSynHTMLSyn.Func170: TtkTokenKind; function TSynHTMLSyn.Func170: TtkTokenKind;
begin begin
if KeyComp('/BLINK') then begin if KeyComp('/BLINK') Or KeyComp('/DIALOG') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;
@ -2147,7 +2147,7 @@ end;
function TSynHTMLSyn.Func222: TtkTokenKind; function TSynHTMLSyn.Func222: TtkTokenKind;
begin begin
if KeyComp('/FIGCAPTION') then begin if KeyComp('/FIGCAPTION') Or KeyComp('/MENUITEM') then begin
Result := tkKey; Result := tkKey;
end else begin end else begin
Result := tkUndefKey; Result := tkUndefKey;