From 68baffe7a7bdcea5af427def90b09661bf5eb2dd Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Wed, 10 Dec 2014 12:28:02 +0100 Subject: [PATCH] Issue #2385111 by tadityar, Wim Leers: Bartik's CKEditor iframe stylesheet is not being loaded, hence image captions look broken --- core/modules/ckeditor/ckeditor.module | 2 +- core/modules/ckeditor/src/Tests/CKEditorTest.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index 6f35ca37307..613ab1b7bd9 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -91,7 +91,7 @@ function _ckeditor_theme_css($theme = NULL) { } } if (isset($info['base theme'])) { - $css = array_merge(_ckeditor_theme_css($info['base theme'], $css)); + $css = array_merge(_ckeditor_theme_css($info['base theme']), $css); } } return $css; diff --git a/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php index 46390a4a209..9133ee00512 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php @@ -262,7 +262,11 @@ class CKEditorTest extends KernelTestBase { $expected[] = file_create_url('core/modules/ckeditor/tests/modules/ckeditor_test.css'); $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a hook_ckeditor_css_alter() implementation exists.'); - // @todo test coverage for _ckeditor_theme_css(), by including a custom theme in this test with a "ckeditor_stylesheets" entry in its .info file. + // Enable the Bartik theme, which specifies a CKEditor stylesheet. + \Drupal::service('theme_handler')->install(['bartik']); + \Drupal::config('system.theme')->set('default', 'bartik'); + $expected[] = file_create_url('core/themes/bartik/css/ckeditor-iframe.css'); + $this->assertIdentical($expected, $this->ckeditor->buildContentsCssJSSetting($editor), '"contentsCss" configuration part of JS settings built correctly while a theme providing a CKEditor stylesheet exists.'); } /**