From: Zbigniew Kostrzewa Date: Fri, 12 Jul 2013 10:15:22 +0000 (+0200) Subject: Add support for processing only first occurence of allow-navigation. X-Git-Tag: 2.2.1_release~10^2~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81333dce6eafcb220d4895ddaec8b38fb87fd31e;p=framework%2Fweb%2Fwrt-installer.git Add support for processing only first occurence of allow-navigation. [Issue#] https://bugs.tizendev.org/jira/browse/TDIS-6856 [Problem] All allow-navigation elements from web application's configuration document are parsed but only the first one should be processed. [Cause] N/A [Solution] Process only the first occurrence of the allow-navigation element. [SCMRequest] Depends on: https://review.tizendev.org/80915 [Verification] 1. Build repository 2. Run test test/tct/wrt/tct-ext02-wrt-tests/setting-an-more Change-Id: Ief2a0ce2f6a59b40c08df0fa90ffb04caa9377dc --- diff --git a/src/configuration_parser/widget_parser.cpp b/src/configuration_parser/widget_parser.cpp index 5fe45e4..4e510cd 100644 --- a/src/configuration_parser/widget_parser.cpp +++ b/src/configuration_parser/widget_parser.cpp @@ -2108,7 +2108,8 @@ class AllowNavigationParser : public ElementParser virtual void Accept(const Text& text) { - if (m_properNamespace) { + if (m_properNamespace) + { m_origin = text.value; } } @@ -2119,6 +2120,12 @@ class AllowNavigationParser : public ElementParser virtual void Verify() { + if (m_data.allowNavigationEncountered || !m_properNamespace) + { + return; + } + m_data.allowNavigationEncountered = true; + if (m_origin.IsNull()) { LogWarning("data is empty"); return;