+ tag.attributes.Clear();
+ if(IsTag(markupStringBuffer,
+ markupStringEndBuffer,
+ tag))
+ {
+ if(TokenComparison(MARKUP::TAG::COLOR, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.colorRuns, styleStack, tag, characterIndex, colorRunIndex, colorTagReference, [](const Tag& tag, ColorRun& run) { ProcessColorTag(tag, run); });
+ } // <color></color>
+ else if(TokenComparison(MARKUP::TAG::ITALIC, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, iTagReference, [](const Tag&, FontDescriptionRun& fontRun) {
+ fontRun.slant = TextAbstraction::FontSlant::ITALIC;
+ fontRun.slantDefined = true;
+ });
+ } // <i></i>
+ else if(TokenComparison(MARKUP::TAG::UNDERLINE, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<UnderlinedCharacterRun>(
+ markupProcessData.underlinedCharacterRuns, styleStack, tag, characterIndex, underlinedCharacterRunIndex, uTagReference, [](const Tag& tag, UnderlinedCharacterRun& run) { ProcessUnderlineTag(tag, run); });
+ } // <u></u>
+ else if(TokenComparison(MARKUP::TAG::BOLD, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, bTagReference, [](const Tag&, FontDescriptionRun& fontRun) {
+ fontRun.weight = TextAbstraction::FontWeight::BOLD;
+ fontRun.weightDefined = true;
+ });
+ } // <b></b>
+ else if(TokenComparison(MARKUP::TAG::FONT, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, fontTagReference, [](const Tag& tag, FontDescriptionRun& fontRun) { ProcessFontTag(tag, fontRun); });
+ } // <font></font>
+ else if(TokenComparison(MARKUP::TAG::ANCHOR, tag.buffer, tag.length))
+ {
+ /* Anchor */
+ ProcessAnchorTag(markupProcessData, tag, characterIndex);
+ /* Color */
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.colorRuns, styleStack, tag, characterIndex, colorRunIndex, colorTagReference, [](const Tag& tag, ColorRun& run) {
+ run.color = Color::BLUE;
+ ProcessColorTag(tag, run);
+ });
+ /* Underline */
+ ProcessTagForRun<UnderlinedCharacterRun>(
+ markupProcessData.underlinedCharacterRuns, styleStack, tag, characterIndex, underlinedCharacterRunIndex, uTagReference, [](const Tag& tag, UnderlinedCharacterRun& run) {
+ run.properties.color = Color::BLUE;
+ run.properties.colorDefined = true;
+ ProcessUnderlineTag(tag, run);
+ });
+ } // <a href=https://www.tizen.org>tizen</a>
+ else if(TokenComparison(MARKUP::TAG::SHADOW, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new shadow run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <shadow></shadow>
+ else if(TokenComparison(MARKUP::TAG::GLOW, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new glow run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <glow></glow>
+ else if(TokenComparison(MARKUP::TAG::OUTLINE, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new outline run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <outline></outline>
+ else if(TokenComparison(MARKUP::TAG::EMBEDDED_ITEM, tag.buffer, tag.length))
+ {
+ ProcessItemTag(markupProcessData, tag, characterIndex);
+ }
+ else if(TokenComparison(MARKUP::TAG::BACKGROUND, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.backgroundColorRuns, styleStack, tag, characterIndex, backgroundRunIndex, backgroundTagReference, [](const Tag& tag, ColorRun& run) { ProcessBackground(tag, run); });
+ }
+ else if(TokenComparison(MARKUP::TAG::SPAN, tag.buffer, tag.length))
+ {
+ ProcessSpanForRun(tag,
+ spanStack,
+ markupProcessData.colorRuns,
+ markupProcessData.fontRuns,
+ markupProcessData.underlinedCharacterRuns,
+ markupProcessData.backgroundColorRuns,
+ markupProcessData.strikethroughCharacterRuns,
+ markupProcessData.characterSpacingCharacterRuns,
+ colorRunIndex,
+ fontRunIndex,
+ underlinedCharacterRunIndex,
+ backgroundRunIndex,
+ strikethroughCharacterRunIndex,
+ characterSpacingCharacterRunIndex,
+ characterIndex,
+ spanTagReference);
+ }
+ else if(TokenComparison(MARKUP::TAG::STRIKETHROUGH, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<StrikethroughCharacterRun>(
+ markupProcessData.strikethroughCharacterRuns, styleStack, tag, characterIndex, strikethroughCharacterRunIndex, sTagReference, [](const Tag& tag, StrikethroughCharacterRun& run) { ProcessStrikethroughTag(tag, run); });
+ } // <s></s>
+ else if(TokenComparison(MARKUP::TAG::PARAGRAPH, tag.buffer, tag.length))
+ {
+ ProcessParagraphTag(markupProcessData, tag, (markupStringBuffer == markupStringEndBuffer), characterIndex);
+ ProcessTagForRun<BoundedParagraphRun>(
+ markupProcessData.boundedParagraphRuns, styleStack, tag, characterIndex, boundedParagraphRunIndex, pTagReference, [](const Tag& tag, BoundedParagraphRun& run) { ProcessAttributesOfParagraphTag(tag, run); });
+ } // <p></p>
+ else if(TokenComparison(MARKUP::TAG::CHARACTER_SPACING, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<CharacterSpacingCharacterRun>(
+ markupProcessData.characterSpacingCharacterRuns, styleStack, tag, characterIndex, characterSpacingCharacterRunIndex, characterSpacingTagReference, [](const Tag& tag, CharacterSpacingCharacterRun& run) { ProcessCharacterSpacingTag(tag, run); });
+ } // <char-spacing></char-spacing>
+ } // end if( IsTag() )
+ else if(markupStringBuffer < markupStringEndBuffer)
+ {
+ ProcessMarkupStringBuffer(markupProcessData, markupStringBuffer, markupStringEndBuffer, characterIndex);
+ }