You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2020/01/21 10:01:08 UTC
[wicket] 01/01: Merge branch 'csp-display-none' into csp
This is an automated email from the ASF dual-hosted git repository.
papegaaij pushed a commit to branch csp
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 491e1d3c65be7c8f4f87bdff10e374c0f3510677
Merge: 1e618f3 93a3cf6
Author: Emond Papegaaij <em...@topicus.nl>
AuthorDate: Tue Jan 21 11:00:40 2020 +0100
Merge branch 'csp-display-none' into csp
.../src/main/java/org/apache/wicket/Component.java | 4 +-
.../src/main/java/org/apache/wicket/Page.java | 2 +-
.../wicket/css/WicketCoreCSSResourceReference.java | 36 ++++++++++++++
.../java/org/apache/wicket/css/wicket-core.css | 19 ++++++++
.../org/apache/wicket/mock/MockApplication.java | 2 +
.../wicket/protocol/http/WebApplication.java | 9 ++++
.../apache/wicket/settings/ResourceSettings.java | 56 +++++++++++++++++++++-
.../org/apache/wicket/PlaceholderTagIdTest.java | 2 +-
.../markup/IEConditionalCommentsPage-expected.html | 23 +++++++++
.../org/apache/wicket/markup/MarkupParserTest.java | 4 +-
.../markup/html/basic/HomePageRedirectTest.java | 4 +-
.../markup/html/basic/RedirectPage-expected1.html | 5 ++
.../markup/html/basic/RedirectPage-expected2.html | 5 ++
.../markup/html/internal/AjaxEnclosureTest.java | 2 +-
...eEnclosureDifferentNamespaceExpectedResult.html | 3 +-
.../InlineEnclosurePageExpectedResult_1.html | 5 +-
.../InlineEnclosurePageExpectedResult_2.html | 3 +-
.../InlineEnclosurePanelPageExpectedResult.html | 3 +-
.../markup/html/internal/InlineEnclosureTest.java | 2 +
...reWithWicketMessagePage_invisible_expected.html | 5 +-
...sureWithWicketMessagePage_visible_expected.html | 3 +-
.../markup/html/internal/TogglePageTest.java | 2 +-
.../panel/InlinePanelPageExpectedResult_8.html | 4 +-
.../wicket/queueing/ComponentQueueingTest.java | 2 +-
.../ajax/markup/html/AjaxIndicatorAppender.java | 2 +-
25 files changed, 184 insertions(+), 23 deletions(-)
diff --cc wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index 1d72fff,95dfd3b..aab068b6
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@@ -763,13 -759,15 +764,21 @@@ public abstract class WebApplication ex
setAjaxRequestTargetProvider(AjaxRequestHandler::new);
getAjaxRequestTargetListeners().add(new AjaxEnclosureListener());
+
+ getHeaderContributorListeners().add(head -> {
+ Optional<CssResourceReference> wicketCoreCSS = getResourceSettings().getWicketCoreCSS();
+ if (wicketCoreCSS.isPresent())
+ {
+ head.render(CssHeaderItem.forReference(wicketCoreCSS.get()));
+ }
+ });
+ cspEnforcer = newCspEnforcer();
+ getRequestCycleListeners().add(getCsp());
+ getHeaderResponseDecorators()
+ .add(response -> new CspNonceHeaderResponseDecorator(response, getCsp()));
+ getCsp().blocking().unsafeInline();
+
// Configure the app.
configure();
}