diff options
author | Bot Blink <blinkbot@samsung.com> | 2015-12-08 01:06:17 +0900 |
---|---|---|
committer | buildbot <buildbot@samsung.com> | 2015-12-08 01:06:17 +0900 |
commit | 38d4dcbfd0f906955c3a722676e81635a64bd86d (patch) | |
tree | 7a36d5b757368dc5a1ed3f8633092b8ed33069b5 | |
parent | 777e24e0eda8838826b93b15b4a8c13ecc04822b (diff) | |
download | chromium-efl-38d4dcbfd0f906955c3a722676e81635a64bd86d.tar.gz chromium-efl-38d4dcbfd0f906955c3a722676e81635a64bd86d.tar.bz2 chromium-efl-38d4dcbfd0f906955c3a722676e81635a64bd86d.zip |
Daily Submit Request to Public from Common Trunksubmit/tizen_tv/20151207.160633submit/tizen_mobile/20151207.160630accepted/tizen/tv/20151208.131221accepted/tizen/mobile/20151208.130920
Date: 2015-12-08 01:05:36
<TRUNK HEAD INFO>
chromium-efl : ca3c2d724c6da4bf2c43a7e72b4f2eda959d5bd7
s-chromium : b7d48dbe549811ae414485f46fcdeac11fa07662
s-blink : b7d48dbe549811ae414485f46fcdeac11fa07662
s-skia : f00849420ed0de203b1830eea9396a3a48bfda75
s-libjingle : a496bb928585e39fb8a34921819b14b3abc5af1a
s-webrtc : 7776e9c58484a44bc504767a519bf84a5494ce6b
s-v8 : dcd7f63fefd4fec1f69e8c3762d780a1fa1e3a49
Change-Id: Idd97e9216df74f4833d428e1521cf11600786799
Signed-off-by: buildbot <buildbot@samsung.com>
48 files changed, 210 insertions, 1809 deletions
diff --git a/build/util/LASTCHANGE b/build/util/LASTCHANGE index 42a9469a9c9d..6b5640986cfa 100644 --- a/build/util/LASTCHANGE +++ b/build/util/LASTCHANGE @@ -1 +1 @@ -LASTCHANGE=dc07cc0d3ab4fdf4718aa6db5563aea71f603d62 +LASTCHANGE=b7d48dbe549811ae414485f46fcdeac11fa07662 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 9b94dde3b6a0..03bea5a3bc52 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -728,6 +728,17 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, } #endif +#if defined(USE_EFL) + if (!was_created_by_renderer) { + // Initialize device display info from browser. + gfx::DeviceDisplayInfoEfl display_info; + display_info.Update(params.display_info.display_width, + params.display_info.display_height, + params.display_info.dip_scale, + params.display_info.rotation_degrees); + } +#endif + // Ensure we start with a valid next_page_id_ from the browser. DCHECK_GE(next_page_id_, 0); @@ -1165,6 +1176,7 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #if defined(OS_ANDROID) || defined(OS_TIZEN_MOBILE) settings->setAutoZoomFocusedNodeToLegibleScale(true); + settings->setUseMobileViewportStyle(true); #endif #if defined(OS_ANDROID) @@ -1203,7 +1215,6 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, settings->setPreferHiddenVolumeControls(true); settings->setMainFrameClipsContent(!prefs.record_whole_document); settings->setShrinksViewportContentToFit(true); - settings->setUseMobileViewportStyle(true); settings->setAutoplayExperimentMode( blink::WebString::fromUTF8(prefs.autoplay_experiment_mode)); #endif diff --git a/ios/build/util/CANARY_VERSION b/ios/build/util/CANARY_VERSION index aab4c5eb54de..791be01c1458 100644 --- a/ios/build/util/CANARY_VERSION +++ b/ios/build/util/CANARY_VERSION @@ -1 +1 @@ -PATCH=1436 +PATCH=1437 diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 2e4a58b89e93..431b6851592d 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations @@ -669,9 +669,6 @@ crbug.com/396941 ietestcenter/css3/multicolumn/column-width-applies-to-012.htm [ crbug.com/396941 ietestcenter/css3/multicolumn/column-width-applies-to-015.htm [ ImageOnlyFailure ] crbug.com/378610 [ Win7 ] svg/custom/focus-ring-text.svg [ ImageOnlyFailure ] -crbug.com/515454 [ Mac Win7 Win10 Android Linux ] css3/fonts/font-style-matching.html [ Slow ] -crbug.com/523021 [ XP ] css3/fonts/font-style-matching.html [ Failure Slow ] - crbug.com/474987 [ Win7 Mac ] css3/flexbox/auto-margins.html [ ImageOnlyFailure ] crbug.com/267206 [ Mac ] fast/scrolling/scrollbar-tickmarks-hittest.html [ Timeout ] diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-expected.txt b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-expected.txt deleted file mode 100644 index 2426125e3813..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching-expected.txt +++ /dev/null @@ -1,1147 +0,0 @@ -According to the CSS3 Fonts Module, Step 4 or the Font Style Matching Algorithm -( https://drafts.csswg.org/css-fonts-3/#font-style-matching ) must narrow down the -available font faces by finding the nearest match in the following order of -precedence: stretch, style, weight. -abcdefg -abcdefg -abcdefg -abcdefg -abcdefg -abcdefg -abcdefg -abcdefg -Available fonts updated: ["condensed_normal_100","condensed_normal_900","condensed_italic_100","condensed_italic_900","expanded_normal_100","expanded_normal_900","expanded_italic_100","expanded_italic_900"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["condensed_normal_100","condensed_italic_100","expanded_normal_100","expanded_italic_100"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -Available fonts updated: ["condensed_normal_900","condensed_italic_900","expanded_normal_900","expanded_italic_900"] - -#condensed_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["condensed_normal_100","condensed_normal_900","expanded_normal_100","expanded_normal_900"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -Available fonts updated: ["condensed_normal_100","expanded_normal_100"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -Available fonts updated: ["condensed_normal_900","expanded_normal_900"] - -#condensed_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -Available fonts updated: ["condensed_italic_100","condensed_italic_900","expanded_italic_100","expanded_italic_900"] - -#condensed_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["condensed_italic_100","expanded_italic_100"] - -#condensed_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_normal_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -Available fonts updated: ["condensed_italic_900","expanded_italic_900"] - -#condensed_normal_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["condensed_normal_100","condensed_normal_900","condensed_italic_100","condensed_italic_900"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -Available fonts updated: ["condensed_normal_100","condensed_italic_100"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -Available fonts updated: ["condensed_normal_900","condensed_italic_900"] - -#condensed_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -Available fonts updated: ["condensed_normal_100","condensed_normal_900"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -Available fonts updated: ["condensed_normal_100"] - -#condensed_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#condensed_italic_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_normal_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_italic_100 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -#expanded_italic_900 -Expected: condensed normal 100 -Actual: condensed normal 100 -PASS - -Available fonts updated: ["condensed_normal_900"] - -#condensed_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#condensed_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_normal_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_italic_100 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -#expanded_italic_900 -Expected: condensed normal 900 -Actual: condensed normal 900 -PASS - -Available fonts updated: ["condensed_italic_100","condensed_italic_900"] - -#condensed_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -Available fonts updated: ["condensed_italic_100"] - -#condensed_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_normal_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#condensed_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_normal_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_italic_100 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -#expanded_italic_900 -Expected: condensed italic 100 -Actual: condensed italic 100 -PASS - -Available fonts updated: ["condensed_italic_900"] - -#condensed_normal_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#condensed_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_normal_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_italic_100 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -#expanded_italic_900 -Expected: condensed italic 900 -Actual: condensed italic 900 -PASS - -Available fonts updated: ["expanded_normal_100","expanded_normal_900","expanded_italic_100","expanded_italic_900"] - -#condensed_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["expanded_normal_100","expanded_italic_100"] - -#condensed_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -Available fonts updated: ["expanded_normal_900","expanded_italic_900"] - -#condensed_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#condensed_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["expanded_normal_100","expanded_normal_900"] - -#condensed_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -Available fonts updated: ["expanded_normal_100"] - -#condensed_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#condensed_italic_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_normal_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_100 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -#expanded_italic_900 -Expected: expanded normal 100 -Actual: expanded normal 100 -PASS - -Available fonts updated: ["expanded_normal_900"] - -#condensed_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_italic_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#condensed_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_normal_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_100 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -#expanded_italic_900 -Expected: expanded normal 900 -Actual: expanded normal 900 -PASS - -Available fonts updated: ["expanded_italic_100","expanded_italic_900"] - -#condensed_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#condensed_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -Available fonts updated: ["expanded_italic_100"] - -#condensed_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_normal_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#condensed_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_normal_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_100 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -#expanded_italic_900 -Expected: expanded italic 100 -Actual: expanded italic 100 -PASS - -Available fonts updated: ["expanded_italic_900"] - -#condensed_normal_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#condensed_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#condensed_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#condensed_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_normal_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_100 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - -#expanded_italic_900 -Expected: expanded italic 900 -Actual: expanded italic 900 -PASS - - diff --git a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching.html b/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching.html deleted file mode 100644 index bd99ae8f2f31..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/font-style-matching.html +++ /dev/null @@ -1,95 +0,0 @@ -<!DOCTYPE html> -<html> -<meta charset="UTF-8"> -<head> - <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script> - <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script> - <script type="text/javascript" src="resources/style-matching-test.js"></script> - <!-- available fonts ---> - <style type="text/css"> - </style> - <!-- Applied styles --> - <style type="text/css"> - body { - font-size: 24px; - line-height: 110%; - text-rendering: optimizeLegibility; - font-feature-settings: "liga" 1; - } - - #condensed_normal_100 { - font-family: CSSMatchingTest; - font-stretch: condensed; - font-style: normal; - font-weight: 100; - } - - #condensed_normal_900 { - font-family: CSSMatchingTest; - font-stretch: condensed; - font-style: normal; - font-weight: 900; - } - - #condensed_italic_100 { - font-family: CSSMatchingTest; - font-stretch: condensed; - font-style: italic; - font-weight: 100; - } - - #condensed_italic_900 { - font-family: CSSMatchingTest; - font-stretch: condensed; - font-style: italic; - font-weight: 900; - } - - #expanded_normal_100 { - font-family: CSSMatchingTest; - font-stretch: expanded; - font-style: normal; - font-weight: 100; - } - - #expanded_normal_900 { - font-family: CSSMatchingTest; - font-stretch: expanded; - font-style: normal; - font-weight: 900; - } - - #expanded_italic_100 { - font-family: CSSMatchingTest; - font-stretch: expanded; - font-style: italic; - font-weight: 100; - } - - #expanded_italic_900 { - font-family: CSSMatchingTest; - font-stretch: expanded; - font-style: italic; - font-weight: 900; - } - </style> -</head> -<body> -<pre>According to the CSS3 Fonts Module, Step 4 or the Font Style Matching Algorithm -( https://drafts.csswg.org/css-fonts-3/#font-style-matching ) must narrow down the -available font faces by finding the nearest match in the following order of -precedence: stretch, style, weight. -</pre> - <div class="test"> - <div id="condensed_normal_100">abcdefg</div> - <div id="condensed_normal_900">abcdefg</div> - <div id="condensed_italic_100">abcdefg</div> - <div id="condensed_italic_900">abcdefg</div> - <div id="expanded_normal_100">abcdefg</div> - <div id="expanded_normal_900">abcdefg</div> - <div id="expanded_italic_100">abcdefg</div> - <div id="expanded_italic_900">abcdefg</div> - </div> -</body> -</html> diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_100.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_100.ttf Binary files differdeleted file mode 100644 index 3219ccc82e18..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_100.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_900.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_900.ttf Binary files differdeleted file mode 100644 index 3bd33312e6ad..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_italic_900.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_100.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_100.ttf Binary files differdeleted file mode 100644 index 5efc2eb33062..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_100.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_900.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_900.ttf Binary files differdeleted file mode 100644 index a45139ddc261..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_condensed_normal_900.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_100.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_100.ttf Binary files differdeleted file mode 100644 index e880686951c8..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_100.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_900.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_900.ttf Binary files differdeleted file mode 100644 index 98c144117c27..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_italic_900.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_100.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_100.ttf Binary files differdeleted file mode 100644 index a93b7db10925..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_100.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_900.ttf b/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_900.ttf Binary files differdeleted file mode 100644 index 69a37e24d6d8..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/fonts/CSSMatchingTest_expanded_normal_900.ttf +++ /dev/null diff --git a/third_party/WebKit/LayoutTests/css3/fonts/resources/style-matching-test.js b/third_party/WebKit/LayoutTests/css3/fonts/resources/style-matching-test.js deleted file mode 100644 index d7ebe5fc4aea..000000000000 --- a/third_party/WebKit/LayoutTests/css3/fonts/resources/style-matching-test.js +++ /dev/null @@ -1,259 +0,0 @@ -function emptyFontFaceDeclarations() -{ - var stylesheet = document.styleSheets[0]; - var rules = stylesheet.cssRules; - var rulesLengthSnapshot = stylesheet.cssRules.length; - if (!rulesLengthSnapshot) - return; - for (var i = 0; i < rulesLengthSnapshot; i++) { - stylesheet.deleteRule(0); - } -} - -function makeFontFaceDeclaration(stretch, style, weight) -{ - var fontFaceDeclaration = '@font-face { font-family: "CSSMatchingtest"; ' + - "font-stretch: " + stretch + ";" + - "font-style: " + style + ";" + - "font-weight: " + weight + ";" + - 'src: url("' + - "resources/fonts/CSSMatchingTest_" + - stretch + "_" + style + "_" + weight + '.ttf");'; - return fontFaceDeclaration; -} - -function notifyInspectorFontsReady() { - var cssRules = document.styleSheets[0].cssRules; - var fontsAvailable = []; - for (var i = 0; i < cssRules.length; i++) { - urlmatch = /url\(.*fonts\/CSSMatchingTest_(.*).ttf\)/.exec( - cssRules[i].cssText); - fontsAvailable.push(urlmatch[1]); - } - evaluateInFrontend('window.onFontsLoaded(' + - JSON.stringify(fontsAvailable) + ");"); -} - -function updateAvailableFontFaceDeclarations(available) -{ - emptyFontFaceDeclarations(); - for (stretch of available.stretches) - for (style of available.styles) - for (weight of available.weights) { - document.styleSheets[0].addRule( - makeFontFaceDeclaration(stretch, style, weight)); - } - - document.fonts.ready.then(window.notifyInspectorFontsReady); -} - -function test() -{ - var documentNodeId; - var documentNodeSelector; - var allTestSelectors = []; - var testSelectors = []; - - var stretches = [ 'condensed', 'expanded' ]; - var styles = [ 'normal', 'italic' ]; - var weights = [ '100', '900' ]; - - var weightsHumanReadable = [ "Thin", "Black" ]; - - var fontSetVariations = []; - var currentFontSetVariation = {}; - - makeFontSetVariations(); - - function makeFontSetVariations() { - // For each of the three properties we have three choices: - // Restrict to the first value, to the second, or - // allow both. So we're iterating over those options - // for each dimension to generate the set of allowed - // options for each property. The fonts in the test - // page will later be generated from these possible - // choices / restrictions. - function choices(property) { - return [ property, [ property[0] ], [ property[1] ] ]; - } - - for (stretchChoice of choices(stretches)) { - for (styleChoice of choices(styles)) { - for (weightChoice of choices(weights)) { - var available = {}; - available.stretches = stretchChoice; - available.styles = styleChoice; - available.weights = weightChoice; - fontSetVariations.push(available); - } - } - } - } - - InspectorTest.requestDocumentNodeId(onDocumentNodeId); - - function onDocumentNodeId(nodeId) - { - documentNodeId = nodeId; - - InspectorTest.evaluateInInspectedPage( - 'JSON.stringify(' + - 'Array.prototype.map.call(' + - 'document.querySelectorAll(".test *"),' + - 'function(element) { return element.id } ));', - startTestingPage); - } - - function startTestingPage(result) - { - allTestSelectors = JSON.parse(result.result.result.value); - nextTest(); - } - - function nextTest() { - if (testSelectors.length) { - testNextPageElement(); - } else { - currentFontSetVariation = fontSetVariations.shift(); - if (currentFontSetVariation) { - testSelectors = allTestSelectors.slice(); - updateFontDeclarationsInPageForVariation( - currentFontSetVariation); - } else { - InspectorTest.completeTest(); - } - } - } - - function updateFontDeclarationsInPageForVariation(fontSetVariation) - { - window.testPageFontsReady = false; - InspectorTest.evaluateInInspectedPage( - 'updateAvailableFontFaceDeclarations(' + - JSON.stringify(fontSetVariation) + - ');'); - // nextTest() is called once we receive the onFontsLoaded - // notification from the page. - } - - // Explicitly make this available on window scope so that testing - // can resume through a signal from the page once the fonts.ready - // promise resolves. - window.onFontsLoaded = function(loadedFonts) { - InspectorTest.log("Available fonts updated: " + - JSON.stringify(loadedFonts) + "\n"); - // fonts.ready event fires too early, used fonts for rendering - // have not been updated yet. Remove this wehn crbug.com/516680 - // is fixed. - // https://drafts.csswg.org/css-font-loading/#font-face-set-ready - setTimeout(nextTest, 100); - } - - function testNextPageElement(result) - { - var nextSelector = testSelectors.shift() - if (nextSelector) { - documentNodeSelector = "#" + nextSelector; - platformFontsForElementWithSelector(documentNodeSelector); - } - } - - function platformFontsForElementWithSelector(selector) - { - InspectorTest.requestNodeId(documentNodeId, selector, onNodeId); - - function onNodeId(nodeId) - { - InspectorTest.sendCommandOrDie("CSS.getPlatformFontsForNode", - { nodeId: nodeId }, - onGotComputedFonts); - } - - function onGotComputedFonts(response) - { - logResults(response); - nextTest(); - } - } - - function logResults(response) - { - InspectorTest.log(documentNodeSelector); - logPassFailResult( - documentNodeSelector, - response.fonts[0].familyName); - } - - function cssStyleMatchingExpectationForSelector(selector) { - var selectorStretchStyleWeight = selector.substr(1).split("_"); - var selectorStretch = selectorStretchStyleWeight[0].toLowerCase(); - var selectorStyle = selectorStretchStyleWeight[1].toLowerCase(); - var selectorWeight = selectorStretchStyleWeight[2]; - - var expectedProperties = {}; - if (currentFontSetVariation.stretches.indexOf(selectorStretch) > 0) { - expectedProperties.stretch = selectorStretch; - } else { - // If the requested property value is not availabe in the - // current font set, then it's restricted to only one value, - // which is the nearest match, and at index 0. - expectedProperties.stretch = currentFontSetVariation.stretches[0]; - } - - if (currentFontSetVariation.styles.indexOf(selectorStyle) > 0) { - expectedProperties.style = selectorStyle; - } else { - expectedProperties.style = currentFontSetVariation.styles[0]; - } - - if (currentFontSetVariation.weights.indexOf(selectorWeight) > 0) { - expectedProperties.weight = selectorWeight; - } else { - expectedProperties.weight = currentFontSetVariation.weights[0]; - } - - return expectedProperties; - } - - function logPassFailResult(selector, usedFontName) - { - var actualStretchStyleWeight = - /CSSMatchingTest (\w*) (\w*) (.*)/.exec(usedFontName); - var actualStretch, actualStyle, actualWeight; - if (actualStretchStyleWeight && actualStretchStyleWeight.length > 3) { - actualStretch = actualStretchStyleWeight[1].toLowerCase(); - actualStyle = actualStretchStyleWeight[2].toLowerCase(); - // Font names have human readable weight description, - // we need to convert. - actualWeight = weights [ - weightsHumanReadable.indexOf(actualStretchStyleWeight[3]) ]; - } else { - actualStretch = usedFontName; - actualStyle = ""; - actualWeight = ""; - } - - var expectedProperties = cssStyleMatchingExpectationForSelector( - selector); - - InspectorTest.log("Expected: " + - expectedProperties.stretch + " " + - expectedProperties.style + " " + - expectedProperties.weight); - InspectorTest.log("Actual: " + actualStretch + " " + - actualStyle + " " + - actualWeight); - - if (actualStretch != expectedProperties.stretch || - actualStyle != expectedProperties.style || - actualWeight != expectedProperties.weight) { - InspectorTest.log("FAIL\n"); - } else { - InspectorTest.log("PASS\n"); - } - } -}; - -window.addEventListener("DOMContentLoaded", function () { - runTest(); -}, false); diff --git a/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces-expected.html b/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces-expected.html index 724e62c9db74..6979803eba44 100644 --- a/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces-expected.html +++ b/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces-expected.html @@ -57,3 +57,8 @@ <span style="font-weight: 900" class="helvetica">Helvetica Bold</span> <span style="font-weight: 900" class="helvetica">Helvetica Bold</span> </div> + +<p>Times followed by Ahem (normal):</p> +<div> + Times <i class="ahem" style="font-style: normal;">AHEM</i> +</div> diff --git a/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces.html b/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces.html index 8fe39a336aef..f2c46d7648cb 100644 --- a/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces.html +++ b/third_party/WebKit/LayoutTests/fast/css/font-face-multiple-faces.html @@ -26,6 +26,12 @@ } @font-face { + font-family: webkit-two; + font-style: italic; + src: url(../../resources/Ahem.ttf); + } + + @font-face { font-family: webkit-six; font-weight: 400; src: local(Courier), local('Courier New'); @@ -112,3 +118,8 @@ <span style="font-weight: 800">Helvetica Bold</span> <span style="font-weight: 900">Helvetica Bold</span> </div> + +<p>Times followed by Ahem (normal):</p> +<div style="font-family: webkit-two;"> + Times <i>AHEM</i> +</div> diff --git a/third_party/WebKit/Source/core/core.gypi b/third_party/WebKit/Source/core/core.gypi index 2cb814b5209c..81e9150ad8c4 100644 --- a/third_party/WebKit/Source/core/core.gypi +++ b/third_party/WebKit/Source/core/core.gypi @@ -1160,8 +1160,6 @@ 'css/FontLoader.h', 'css/FontSize.cpp', 'css/FontSize.h', - 'css/FontStyleMatcher.cpp', - 'css/FontStyleMatcher.h', 'css/HashTools.h', 'css/KeyframeStyleRuleCSSStyleDeclaration.cpp', 'css/KeyframeStyleRuleCSSStyleDeclaration.h', diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp index e0a7cf4c86b3..b7cd589b1d7f 100644 --- a/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp +++ b/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp @@ -55,7 +55,6 @@ PassRefPtr<SimpleFontData> CSSFontFaceSource::getFontData(const FontDescription& } // See if we have a mapping in our FontData cache. - // TODO(drott): Check whether losing traits information here is problematic. crbug.com/516677 FontCacheKey key = fontDescription.cacheKey(FontFaceCreationParams()); RefPtr<SimpleFontData>& fontData = m_fontDataTable.add(key.hash(), nullptr).storedValue->value; diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h index ffc899ddf67f..0f81c156814d 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h @@ -3232,9 +3232,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStyle italic) case FontStyleNormal: m_value.valueID = CSSValueNormal; return; - case FontStyleOblique: - m_value.valueID = CSSValueOblique; - return; case FontStyleItalic: m_value.valueID = CSSValueItalic; return; @@ -3249,7 +3246,7 @@ template<> inline CSSPrimitiveValue::operator FontStyle() const ASSERT(isValueID()); switch (m_value.valueID) { case CSSValueOblique: - return FontStyleOblique; + // FIXME: oblique is the same as italic for the moment... case CSSValueItalic: return FontStyleItalic; case CSSValueNormal: diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp index 91dee225068c..0d164a18a322 100644 --- a/third_party/WebKit/Source/core/css/FontFace.cpp +++ b/third_party/WebKit/Source/core/css/FontFace.cpp @@ -150,7 +150,7 @@ FontFace::FontFace(ExecutionContext* context, const AtomicString& family, const Document* document = toDocument(context); setPropertyFromString(document, descriptors.style(), CSSPropertyFontStyle); setPropertyFromString(document, descriptors.weight(), CSSPropertyFontWeight); - setPropertyFromString(document, descriptors.stretch(), CSSPropertyFontStretch); + // FIXME: we don't implement 'font-strech' property yet so we can't set the property. setPropertyFromString(document, descriptors.unicodeRange(), CSSPropertyUnicodeRange); setPropertyFromString(document, descriptors.variant(), CSSPropertyFontVariant); setPropertyFromString(document, descriptors.featureSettings(), CSSPropertyWebkitFontFeatureSettings); @@ -393,41 +393,6 @@ void FontFace::loadInternal(ExecutionContext* context) FontTraits FontFace::traits() const { - FontStretch stretch = FontStretchNormal; - if (m_stretch) { - if (!m_stretch->isPrimitiveValue()) - return 0; - - switch (toCSSPrimitiveValue(m_stretch.get())->getValueID()) { - case CSSValueUltraCondensed: - stretch = FontStretchUltraCondensed; - break; - case CSSValueExtraCondensed: - stretch = FontStretchExtraCondensed; - break; - case CSSValueCondensed: - stretch = FontStretchCondensed; - break; - case CSSValueSemiCondensed: - stretch = FontStretchSemiCondensed; - break; - case CSSValueSemiExpanded: - stretch = FontStretchSemiExpanded; - break; - case CSSValueExpanded: - stretch = FontStretchExpanded; - break; - case CSSValueExtraExpanded: - stretch = FontStretchExtraExpanded; - break; - case CSSValueUltraExpanded: - stretch = FontStretchUltraExpanded; - break; - default: - break; - } - } - FontStyle style = FontStyleNormal; if (m_style) { if (!m_style->isPrimitiveValue()) @@ -437,10 +402,8 @@ FontTraits FontFace::traits() const case CSSValueNormal: style = FontStyleNormal; break; - case CSSValueOblique: - style = FontStyleOblique; - break; case CSSValueItalic: + case CSSValueOblique: style = FontStyleItalic; break; default: @@ -524,7 +487,7 @@ FontTraits FontFace::traits() const } } - return FontTraits(style, variant, weight, stretch); + return FontTraits(style, variant, weight, FontStretchNormal); } static PassOwnPtrWillBeRawPtr<CSSFontFace> createCSSFontFace(FontFace* fontFace, CSSValue* unicodeRange) diff --git a/third_party/WebKit/Source/core/css/FontFaceCache.cpp b/third_party/WebKit/Source/core/css/FontFaceCache.cpp index 740419cc1963..d7f53cac16ad 100644 --- a/third_party/WebKit/Source/core/css/FontFaceCache.cpp +++ b/third_party/WebKit/Source/core/css/FontFaceCache.cpp @@ -32,7 +32,6 @@ #include "core/css/CSSSegmentedFontFace.h" #include "core/css/CSSValueList.h" #include "core/css/FontFace.h" -#include "core/css/FontStyleMatcher.h" #include "core/css/StyleRule.h" #include "core/fetch/FontResource.h" #include "core/fetch/ResourceFetcher.h" @@ -40,7 +39,6 @@ #include "platform/fonts/FontDescription.h" #include "wtf/text/AtomicString.h" - namespace blink { FontFaceCache::FontFaceCache() @@ -129,6 +127,79 @@ void FontFaceCache::clearAll() ++m_version; } +static inline bool compareFontFaces(CSSSegmentedFontFace* first, CSSSegmentedFontFace* second, FontTraits desiredTraits) +{ + const FontTraits& firstTraits = first->traits(); + const FontTraits& secondTraits = second->traits(); + + bool firstHasDesiredVariant = firstTraits.variant() == desiredTraits.variant(); + bool secondHasDesiredVariant = secondTraits.variant() == desiredTraits.variant(); + + if (firstHasDesiredVariant != secondHasDesiredVariant) + return firstHasDesiredVariant; + + // We need to check font-variant css property for CSS2.1 compatibility. + if (desiredTraits.variant() == FontVariantSmallCaps) { + // Prefer a font that has indicated that it can only support small-caps to a font that claims to support + // all variants. The specialized font is more likely to be true small-caps and not require synthesis. + bool firstRequiresSmallCaps = firstTraits.variant() == FontVariantSmallCaps; + bool secondRequiresSmallCaps = secondTraits.variant() == FontVariantSmallCaps; + if (firstRequiresSmallCaps != secondRequiresSmallCaps) + return firstRequiresSmallCaps; + } + + bool firstHasDesiredStyle = firstTraits.style() == desiredTraits.style(); + bool secondHasDesiredStyle = secondTraits.style() == desiredTraits.style(); + + if (firstHasDesiredStyle != secondHasDesiredStyle) + return firstHasDesiredStyle; + + if (desiredTraits.style() == FontStyleItalic) { + // Prefer a font that has indicated that it can only support italics to a font that claims to support + // all styles. The specialized font is more likely to be the one the author wants used. + bool firstRequiresItalics = firstTraits.style() == FontStyleItalic; + bool secondRequiresItalics = secondTraits.style() == FontStyleItalic; + if (firstRequiresItalics != secondRequiresItalics) + return firstRequiresItalics; + } + if (secondTraits.weight() == desiredTraits.weight()) + return false; + + if (firstTraits.weight() == desiredTraits.weight()) + return true; + + // http://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-matching-algorithm says : + // - If the desired weight is less than 400, weights below the desired weight are checked in descending order followed by weights above the desired weight in ascending order until a match is found. + // - If the desired weight is greater than 500, weights above the desired weight are checked in ascending order followed by weights below the desired weight in descending order until a match is found. + // - If the desired weight is 400, 500 is checked first and then the rule for desired weights less than 400 is used. + // - If the desired weight is 500, 400 is checked first and then the rule for desired weights less than 400 is used. + static const unsigned fallbackRuleSets = 9; + static const unsigned rulesPerSet = 8; + static const FontWeight weightFallbackRuleSets[fallbackRuleSets][rulesPerSet] = { + { FontWeight200, FontWeight300, FontWeight400, FontWeight500, FontWeight600, FontWeight700, FontWeight800, FontWeight900 }, + { FontWeight100, FontWeight300, FontWeight400, FontWeight500, FontWeight600, FontWeight700, FontWeight800, FontWeight900 }, + { FontWeight200, FontWeight100, FontWeight400, FontWeight500, FontWeight600, FontWeight700, FontWeight800, FontWeight900 }, + { FontWeight500, FontWeight300, FontWeight200, FontWeight100, FontWeight600, FontWeight700, FontWeight800, FontWeight900 }, + { FontWeight400, FontWeight300, FontWeight200, FontWeight100, FontWeight600, FontWeight700, FontWeight800, FontWeight900 }, + { FontWeight700, FontWeight800, FontWeight900, FontWeight500, FontWeight400, FontWeight300, FontWeight200, FontWeight100 }, + { FontWeight800, FontWeight900, FontWeight600, FontWeight500, FontWeight400, FontWeight300, FontWeight200, FontWeight100 }, + { FontWeight900, FontWeight700, FontWeight600, FontWeight500, FontWeight400, FontWeight300, FontWeight200, FontWeight100 }, + { FontWeight800, FontWeight700, FontWeight600, FontWeight500, FontWeight400, FontWeight300, FontWeight200, FontWeight100 } + }; + + unsigned ruleSetIndex = static_cast<unsigned>(desiredTraits.weight()); + ASSERT(ruleSetIndex < fallbackRuleSets); + const FontWeight* weightFallbackRule = weightFallbackRuleSets[ruleSetIndex]; + for (unsigned i = 0; i < rulesPerSet; ++i) { + if (secondTraits.weight() == weightFallbackRule[i]) + return false; + if (firstTraits.weight() == weightFallbackRule[i]) + return true; + } + + return false; +} + CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription, const AtomicString& family) { TraitsMap* familyFontFaces = m_fontFaces.get(family); @@ -144,8 +215,12 @@ CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription, if (!faceResult.storedValue->value) { for (const auto& item : *familyFontFaces) { CSSSegmentedFontFace* candidate = item.value.get(); - FontStyleMatcher styleMatcher(traits); - if (!faceResult.storedValue->value || styleMatcher.isCandidateBetter(candidate, faceResult.storedValue->value.get())) + FontTraits candidateTraits = candidate->traits(); + if (traits.style() == FontStyleNormal && candidateTraits.style() != FontStyleNormal) + continue; + if (traits.variant() == FontVariantNormal && candidateTraits.variant() != FontVariantNormal) + continue; + if (!faceResult.storedValue->value || compareFontFaces(candidate, faceResult.storedValue->value.get(), traits)) faceResult.storedValue->value = candidate; } } diff --git a/third_party/WebKit/Source/core/css/FontStyleMatcher.cpp b/third_party/WebKit/Source/core/css/FontStyleMatcher.cpp deleted file mode 100644 index f0d1fe81a59d..000000000000 --- a/third_party/WebKit/Source/core/css/FontStyleMatcher.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. - * Copyright (C) 2015 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -#include "config.h" -#include "core/css/FontStyleMatcher.h" - -#include "core/css/CSSSegmentedFontFace.h" -#include "wtf/Assertions.h" - -#include <stdlib.h> - -namespace blink { - -static inline unsigned stretchDistanceToDesired(FontTraits desired, FontTraits candidate) -{ - return abs(static_cast<int>(desired.stretch() - candidate.stretch())); -} - -static inline unsigned styleScore(FontTraits desired, FontTraits candidate) -{ - static_assert(FontStyleNormal == 0 && FontStyleItalic == 2, - "Enumeration values need to match lookup table."); - unsigned styleScoreLookupTable[][FontStyleItalic + 1] = { - // "If the value is normal, normal faces are checked first, then oblique faces, then italic faces." - // i.e. normal has the highest score, then oblique, then italic. - { 2, 1, 0 }, - // "If the value is oblique, oblique faces are checked first, then italic faces and then normal faces." - // i.e. normal gets the lowest score, oblique gets the highest, italic second best. - { 0, 2, 1 }, - // "If the value of font-style is italic, italic faces are checked first, then oblique, then normal faces" - // i.e. normal gets the lowest score, oblique is second best, italic highest. - { 0, 1, 2 } - }; - - ASSERT_WITH_SECURITY_IMPLICATION(desired.style() < FontStyleItalic + 1); - ASSERT_WITH_SECURITY_IMPLICATION(candidate.style() < FontStyleItalic + 1); - - return styleScoreLookupTable[desired.style()][candidate.style()]; -} - -static inline unsigned weightScore(FontTraits desired, FontTraits candidate) -{ - static_assert(FontWeight100 == 0 && FontWeight900 - FontWeight100 == 8, - "Enumeration values need to match lookup table."); - static const unsigned scoreLookupSize = FontWeight900 + 1; - // https://drafts.csswg.org/css-fonts/#font-style-matching - // "..if the desired weight is available that face matches. " - static const unsigned weightScoreLookup[scoreLookupSize][scoreLookupSize] = { - // "If the desired weight is less than 400, weights below the desired - // weight are checked in descending order followed by weights above the - // desired weight in ascending order until a match is found." - { 9, 8, 7, 6, 5, 4, 3, 2, 1 }, // FontWeight100 desired - { 8, 9, 7, 6, 5, 4, 3, 2, 1 }, // FontWeight200 desired - { 7, 8, 9, 6, 5, 4, 3, 2, 1 }, // FontWeight300 desired - - // "If the desired weight is 400, 500 is checked first and then the rule - // for desired weights less than 400 is used." - { 5, 6, 7, 9, 8, 4, 3, 2, 1 }, // FontWeight400 desired - - // "If the desired weight is 500, 400 is checked first and then the rule - // for desired weights less than 400 is used." - { 5, 6, 7, 8, 9, 4, 3, 2, 1 }, // FontWeight500 desired - - // "If the desired weight is greater than 500, weights above the desired - // weight are checked in ascending order followed by weights below the - // desired weight in descending order until a match is found." - { 1, 2, 3, 4, 5, 9, 8, 7, 6 }, // FontWeight600 desired - { 1, 2, 3, 4, 5, 6, 9, 8, 7 }, // FontWeight700 desired - { 1, 2, 3, 4, 5, 6, 7, 9, 8 }, // FontWeight800 desired - { 1, 2, 3, 4, 5, 6, 7, 8, 9 } // FontWeight900 desired - }; - - unsigned desiredScoresLookup = static_cast<unsigned>(desired.weight()); - unsigned candidateScoreLookup = static_cast<unsigned>(candidate.weight()); - ASSERT_WITH_SECURITY_IMPLICATION(desiredScoresLookup < scoreLookupSize); - ASSERT_WITH_SECURITY_IMPLICATION(candidateScoreLookup < scoreLookupSize); - - return weightScoreLookup[desiredScoresLookup][candidateScoreLookup]; -} - -bool FontStyleMatcher::isCandidateBetter(CSSSegmentedFontFace *candidate, CSSSegmentedFontFace *current) -{ - const FontTraits& candidateTraits = candidate->traits(); - const FontTraits& currentTraits = current->traits(); - - // According to CSS3 Fonts Font Style matching, there is a precedence for matching: - // A better stretch match wins over a better style match, a better style match - // wins over a better weight match, where "better" means closer to the desired - // traits. - int stretchComparison = 0, styleComparison = 0, weightComparison = 0; - - stretchComparison = stretchDistanceToDesired(m_fontTraits, candidateTraits) - - stretchDistanceToDesired(m_fontTraits, currentTraits); - - if (stretchComparison > 0) - return false; - if (stretchComparison < 0) - return true; - - styleComparison = styleScore(m_fontTraits, candidateTraits) - - styleScore(m_fontTraits, currentTraits); - - if (styleComparison > 0) - return true; - if (styleComparison < 0) - return false; - - weightComparison = weightScore(m_fontTraits, candidateTraits) - - weightScore(m_fontTraits, currentTraits); - - if (weightComparison > 0) - return true; - - return false; -} - -} diff --git a/third_party/WebKit/Source/core/css/FontStyleMatcher.h b/third_party/WebKit/Source/core/css/FontStyleMatcher.h deleted file mode 100644 index 292adc9eba97..000000000000 --- a/third_party/WebKit/Source/core/css/FontStyleMatcher.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FontStyleMatcher_h -#define FontStyleMatcher_h - -#include "platform/fonts/FontTraits.h" - -namespace blink { - -class CSSSegmentedFontFace; - -class FontStyleMatcher final { -public: - explicit FontStyleMatcher(const FontTraits& fontTraits) : m_fontTraits(fontTraits) {}; - bool isCandidateBetter(CSSSegmentedFontFace* candidate, CSSSegmentedFontFace* current); - -private: - FontStyleMatcher(); - const FontTraits& m_fontTraits; -}; - -} - -#endif diff --git a/third_party/WebKit/Source/platform/fonts/FontDescription.h b/third_party/WebKit/Source/platform/fonts/FontDescription.h index 2e59ab494aee..fbc2bc7078c6 100644 --- a/third_party/WebKit/Source/platform/fonts/FontDescription.h +++ b/third_party/WebKit/Source/platform/fonts/FontDescription.h @@ -242,7 +242,7 @@ private: unsigned m_widthVariant : 2; // FontWidthVariant - unsigned m_style : 2; // FontStyle + unsigned m_style : 1; // FontStyle unsigned m_variant : 1; // FontVariant unsigned m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit size // (logical sizes like "medium" don't count). diff --git a/third_party/WebKit/Source/platform/fonts/FontTraits.h b/third_party/WebKit/Source/platform/fonts/FontTraits.h index d549a983137f..95f1ffc86a5d 100644 --- a/third_party/WebKit/Source/platform/fonts/FontTraits.h +++ b/third_party/WebKit/Source/platform/fonts/FontTraits.h @@ -32,15 +32,15 @@ namespace blink { enum FontWeight { - FontWeight100 = 0, - FontWeight200 = 1, - FontWeight300 = 2, - FontWeight400 = 3, - FontWeight500 = 4, - FontWeight600 = 5, - FontWeight700 = 6, - FontWeight800 = 7, - FontWeight900 = 8, + FontWeight100, + FontWeight200, + FontWeight300, + FontWeight400, + FontWeight500, + FontWeight600, + FontWeight700, + FontWeight800, + FontWeight900, FontWeightNormal = FontWeight400, FontWeightBold = FontWeight700 }; @@ -61,8 +61,7 @@ enum FontStretch { enum FontStyle { FontStyleNormal = 0, - FontStyleOblique = 1, - FontStyleItalic = 2 + FontStyleItalic = 1 }; enum FontVariant { @@ -76,19 +75,17 @@ struct FontTraits { FontTraits(FontStyle style, FontVariant variant, FontWeight weight, FontStretch stretch) { m_traits.m_style = style; - // TODO(drott): crbug.com/516673 Variant is not relevant for font selection, - // should be removed here. m_traits.m_variant = variant; m_traits.m_weight = weight; m_traits.m_stretch = stretch; m_traits.m_filler = 0; - ASSERT(!(m_bitfield >> 11)); + ASSERT(!(m_bitfield >> 10)); } FontTraits(FontTraitsBitfield bitfield) : m_bitfield(bitfield) { ASSERT(!m_traits.m_filler); - ASSERT(!(m_bitfield >> 11)); + ASSERT(!(m_bitfield >> 10)); } FontStyle style() const { return static_cast<FontStyle>(m_traits.m_style); } FontVariant variant() const { return static_cast<FontVariant>(m_traits.m_variant); } @@ -98,11 +95,11 @@ struct FontTraits { union { struct { - unsigned m_style : 2; + unsigned m_style : 1; unsigned m_variant : 1; unsigned m_weight : 4; unsigned m_stretch : 4; - unsigned m_filler : 21; + unsigned m_filler : 22; } m_traits; FontTraitsBitfield m_bitfield; }; diff --git a/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp b/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp index 21d97b4dd12f..7f2e65b7176c 100644 --- a/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp +++ b/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp @@ -90,7 +90,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackOnStandardFontStyle( if (substitutePlatformData && substitutePlatformData->fontContainsCharacter(character)) { FontPlatformData platformData = FontPlatformData(*substitutePlatformData); platformData.setSyntheticBold(fontDescription.weight() >= FontWeight600); - platformData.setSyntheticItalic(fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique); + platformData.setSyntheticItalic(fontDescription.style() == FontStyleItalic); return fontDataFromFontPlatformData(&platformData, DoNotRetain); } @@ -131,7 +131,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip } if (fallbackFont.isItalic && description.style() == FontStyleNormal) description.setStyle(FontStyleItalic); - if (!fallbackFont.isItalic && (description.style() == FontStyleItalic || description.style() == FontStyleOblique)) { + if (!fallbackFont.isItalic && description.style() == FontStyleItalic) { shouldSetSyntheticItalic = true; description.setStyle(FontStyleNormal); } @@ -262,7 +262,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD name.data(), fontSize, (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDescription.isSyntheticBold(), - ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(), + (fontDescription.style() && !tf->isItalic()) || fontDescription.isSyntheticItalic(), fontDescription.orientation(), fontDescription.useSubpixelPositioning()); return result; diff --git a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp index 9c15de559cf4..644816a8db3c 100644 --- a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp +++ b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp @@ -372,7 +372,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD name.data(), fontSize, (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDescription.isSyntheticBold(), - ((fontDescription.style() == FontStyleItalic || fontDescription.style() == FontStyleOblique) && !tf->isItalic()) || fontDescription.isSyntheticItalic(), + (fontDescription.style() == FontStyleItalic && !tf->isItalic()) || fontDescription.isSyntheticItalic(), fontDescription.orientation(), s_useSubpixelPositioning); diff --git a/third_party/WebKit/Source/web/PopupMenuImpl.cpp b/third_party/WebKit/Source/web/PopupMenuImpl.cpp index 6ab87b1c7acb..3492830a998d 100644 --- a/third_party/WebKit/Source/web/PopupMenuImpl.cpp +++ b/third_party/WebKit/Source/web/PopupMenuImpl.cpp @@ -69,15 +69,11 @@ const char* fontVariantToString(FontVariant variant) return nullptr; } -// TODO crbug.com/516675 Add stretch to serialization - const char* fontStyleToString(FontStyle style) { switch (style) { case FontStyleNormal: return "normal"; - case FontStyleOblique: - return "oblique"; case FontStyleItalic: return "italic"; } diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index a46143fb7555..8658115e5fdc 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp @@ -192,10 +192,6 @@ #include "core/layout/LayoutThemeDefault.h" #endif -#if defined(USE_EFL) -#include "core/HTMLElementTypeHelpers.h" -#endif - // Get rid of WTF's pow define so we can use std::pow. #undef pow #include <cmath> // for std::pow @@ -1327,17 +1323,6 @@ static bool showsHandCursor(Node* node, LocalFrame* frame) || (cursor == CURSOR_AUTO && frame->eventHandler().useHandCursor(node, node->isLink())); } -#if defined(USE_EFL) -static Node* buttonNodeAncestorIfAny(Node* node) -{ - for (; node; node = node->parentNode()) { - if (isHTMLButtonElement(node)) - return node; - } - return 0; -} -#endif - Node* WebViewImpl::bestTapNode(const GestureEventWithHitTestResults& targetedTapEvent) { TRACE_EVENT0("input", "WebViewImpl::bestTapNode"); @@ -1349,13 +1334,6 @@ Node* WebViewImpl::bestTapNode(const GestureEventWithHitTestResults& targetedTap if (!bestTouchNode) return nullptr; -#if defined(USE_EFL) - Node* buttonNode = buttonNodeAncestorIfAny(bestTouchNode); - if (buttonNode) - return buttonNode; -#endif - - // We might hit something like an image map that has no layoutObject on it // Walk up the tree until we have a node with an attached layoutObject while (!bestTouchNode->layoutObject()) { diff --git a/third_party/skia/include/core/SkPath.h b/third_party/skia/include/core/SkPath.h index d3673b6d5d35..b7e58adf7fba 100644 --- a/third_party/skia/include/core/SkPath.h +++ b/third_party/skia/include/core/SkPath.h @@ -588,7 +588,7 @@ public: * @param oval The bounding oval to add as a closed contour to the path * @param dir The direction to wind the oval's contour. */ - void addOval(const SkRect& oval, Direction dir = kCW_Direction); + void addOval(const SkRect& oval, Direction dir = kCW_Direction, bool forceMoveAndClose = true); /** * Add a closed circle contour to the path diff --git a/third_party/skia/src/core/SkPath.cpp b/third_party/skia/src/core/SkPath.cpp index 1326362524c2..3366721b275f 100644 --- a/third_party/skia/src/core/SkPath.cpp +++ b/third_party/skia/src/core/SkPath.cpp @@ -1071,7 +1071,7 @@ void SkPath::addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, this->addRRect(rrect, dir); } -void SkPath::addOval(const SkRect& oval, Direction dir) { +void SkPath::addOval(const SkRect& oval, Direction dir, bool forceMoveAndClose) { assert_known_direction(dir); /* If addOval() is called after previous moveTo(), @@ -1100,7 +1100,10 @@ void SkPath::addOval(const SkRect& oval, Direction dir) { const SkScalar weight = SK_ScalarRoot2Over2; this->incReserve(9); // move + 4 conics - this->moveTo(R, cy); + if (forceMoveAndClose) + this->moveTo(R, cy); + else + this->lineTo(R, cy); if (dir == kCCW_Direction) { this->conicTo(R, T, cx, T, weight); this->conicTo(L, T, L, cy, weight); @@ -1112,7 +1115,9 @@ void SkPath::addOval(const SkRect& oval, Direction dir) { this->conicTo(L, T, cx, T, weight); this->conicTo(R, T, R, cy, weight); } - this->close(); + + if (forceMoveAndClose) + this->close(); SkPathRef::Editor ed(&fPathRef); @@ -1133,10 +1138,30 @@ void SkPath::arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, return; } + SkScalar fullCircle = SkScalar(360.0f); + if (fPathRef->countVerbs() == 0) { forceMoveTo = true; } + // If sweep angle is a full circle, + // we fast path to full oval. + SkScalar sweepAngleAbs = SkScalarAbs(sweepAngle); + SkScalar rem = SkScalarMod(sweepAngleAbs, fullCircle); + int n = (int) (sweepAngleAbs / fullCircle); + if (n >= 1) { + if (rem <= SK_ScalarNearlyZero || + fullCircle - rem <= SK_ScalarNearlyZero) { + addOval(oval, sweepAngle > 0 ? kCW_Direction : kCCW_Direction, forceMoveTo); + return; + } + } else { + if (fullCircle - rem <= SK_ScalarNearlyZero) { + addOval(oval, sweepAngle > 0 ? kCW_Direction : kCCW_Direction, forceMoveTo); + return; + } + } + SkPoint lonePt; if (arc_is_lone_point(oval, startAngle, sweepAngle, &lonePt)) { forceMoveTo ? this->moveTo(lonePt) : this->lineTo(lonePt); diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 22686e8b3b2f..e5ead2baf13b 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -293,7 +293,6 @@ function setupAndExecuteTargetBuild() { fi cd $TOPDIR - rm -f packaging ln -sf tizen_src/packaging packaging if [ "$target" == "libs" ]; then @@ -303,6 +302,7 @@ function setupAndExecuteTargetBuild() { fi gbs $CONF_FLAG build -P $PROFILE --spec $SPEC_FILE --include-all -A $ARCHITECTURE "${ARGS[@]}" $BUILD_CONF_OPTS $EXTRA_PACK_OPTS --incremental + rm -f packaging } function prepareTizen3Build() { diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index 374fb05169af..c79cf04bcc9e 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -35,9 +35,9 @@ <autotools id="efl" autogen-sh="configure" autogenargs="--with-x11=xlib --with-opengl=es --with-glib=yes --disable-pulseaudio --disable-physics --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba"> - <branch module="rel/libs/efl/efl-1.13.1.tar.xz" version="1.13.1" + <branch module="rel/libs/efl/efl-1.16.0.tar.xz" version="1.16.0" repo="download.enlightenment.org" - hash="sha256:7e06e11678063fd74522f8fc56eb3d0235e9d7f889639e2ecff4bb663a2568d6" + hash="sha256:7efebbd9964e5daf35c7e978e7cbef25f62ea933a8df73b0c4d287ef65868323" md5sum="0552eed3f337a1268aff4a476c6a5fa7"> </branch> <dependencies> @@ -47,9 +47,9 @@ <autotools id="elementary" autogen-sh="configure" autogenargs="--enable-ecore-x"> - <branch module="rel/libs/elementary/elementary-1.13.1.tar.xz" version="1.13.1" + <branch module="rel/libs/elementary/elementary-1.16.0.tar.xz" version="1.16.0" repo="download.enlightenment.org" - hash="sha256:11595b6c5f511150a26e970bf8e590f96a6ce9e33e5dd8419407013844b2b74f" + hash="sha256:483f3cf927edceaec8b61b0e4c0fe5ffbe86f227c7f82e61e8d6f0dbee598694" md5sum="317cc2f8f9f18f5473027ba9fa1b000d"> </branch> <dependencies> diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc index 9c231a04683c..85ceb88aef10 100755 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc @@ -189,6 +189,7 @@ RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget, surface_id_(0), is_modifier_key_(false), touch_events_enabled_(false), + should_check_move_threshold_(false), web_contents_(web_contents), compositor_(NULL), root_layer_(new ui::Layer(ui::LAYER_SOLID_COLOR)), @@ -1547,6 +1548,25 @@ void RenderWidgetHostViewEfl::ProcessTouchEvents() { evas_touch_point_list_nth_xy_get(evas_, i, &pt.x, &pt.y); state = evas_touch_point_list_nth_state_get(evas_, i); + // Filter out events jittery for single-touch gestures. + if (count == 1) { + if (state == EVAS_TOUCH_POINT_DOWN) { + should_check_move_threshold_ = true; + last_single_press_down_position_ = gfx::Point(pt.x, pt.y); + } else if (should_check_move_threshold_ && + state == EVAS_TOUCH_POINT_MOVE) { + gfx::Point current_point(pt.x, pt.y); + gfx::Vector2d diff = current_point - last_single_press_down_position_; + + unsigned threshold = + elm_config_scroll_thumbscroll_threshold_get(); + if (diff.LengthSquared() < threshold * threshold) + return; + + should_check_move_threshold_ = false; + } + } + ui::TouchEvent touch_event = MakeTouchEvent(pt, state, id, content_image_); HandleTouchEvent(&touch_event); } diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h index 02d6f5a09d36..79a939118241 100755 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h @@ -400,6 +400,9 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl bool touch_events_enabled_; + gfx::Point last_single_press_down_position_; + bool should_check_move_threshold_; + // The last scroll offset of the view. gfx::Vector2dF last_scroll_offset_; diff --git a/tizen_src/ewk/po_tizen/en.po b/tizen_src/ewk/po_tizen/en.po index 9c011c173340..65ae0e45d26d 100644 --- a/tizen_src/ewk/po_tizen/en.po +++ b/tizen_src/ewk/po_tizen/en.po @@ -1,5 +1,5 @@ msgid "IDS_BR_BODY_SAVE_LINK" -msgstr "Save link" +msgstr "Download Link" msgid "IDS_WEBVIEW_BODY_SHOWING_PD_ITEMS_TTS" msgstr "Showing %d items" @@ -125,13 +125,13 @@ msgid "IDS_WEBVIEW_OPT_COPY_AUDIO_URL_ABB" msgstr "Copy audio URL" msgid "IDS_WEBVIEW_OPT_COPY_IMAGE" -msgstr "Copy image" +msgstr "Copy Image" msgid "IDS_WEBVIEW_OPT_COPY_LINK_TEXT" msgstr "Copy link text" msgid "IDS_WEBVIEW_OPT_COPY_LINK_URL_ABB" -msgstr "Copy link URL" +msgstr "Copy link Address" msgid "IDS_WEBVIEW_OPT_COPY_TO_CLIPBOARD" msgstr "Copy to clipboard" @@ -161,13 +161,13 @@ msgid "IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_CURRENT_TAB_ABB" msgstr "Open" msgid "IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_NEW_TAB_ABB" -msgstr "Open image in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_OPEN_LINK_IN_CURRENT_TAB_ABB" msgstr "Open" msgid "IDS_WEBVIEW_OPT_OPEN_LINK_IN_NEW_TAB_ABB" -msgstr "Open link in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_OPEN_VIDEO_IN_NEW_WINDOW_ABB" msgstr "Open video in new window" @@ -185,7 +185,7 @@ msgid "IDS_WEBVIEW_OPT_PLAY_AUDIO_IN_NEW_TAB_ABB" msgstr "Play audio in new tab" msgid "IDS_WEBVIEW_OPT_SAVE_IMAGE_ABB" -msgstr "Save image" +msgstr "Download Image" msgid "IDS_WEBVIEW_OPT_SELECT_ABB" msgstr "Select" @@ -194,7 +194,7 @@ msgid "IDS_WEBVIEW_OPT_SELECT_ALL_ABB" msgstr "Select all" msgid "IDS_WEBVIEW_OPT_SHARE_LINK" -msgstr "Share link" +msgstr "Share Link" msgid "IDS_WEBVIEW_OPT_SHOW_HIDE_MEDIA_CONTROLS_ABB" msgstr "Show/hide media controls" diff --git a/tizen_src/ewk/po_tizen/en_PH.po b/tizen_src/ewk/po_tizen/en_PH.po index 873fe695b167..dabf58e76331 100755 --- a/tizen_src/ewk/po_tizen/en_PH.po +++ b/tizen_src/ewk/po_tizen/en_PH.po @@ -17,7 +17,7 @@ msgid "IDS_WEBVIEW_OPT_COPY" msgstr "Copy" msgid "IDS_WEBVIEW_OPT_COPY_IMAGE" -msgstr "Copy image" +msgstr "Copy Image" msgid "IDS_WEBVIEW_OPT_PASTE" msgstr "Paste" @@ -62,7 +62,7 @@ msgid "IDS_WEBVIEW_BUTTON_DONE" msgstr "Done" msgid "IDS_BR_BODY_SAVE_LINK" -msgstr "Save link" +msgstr "Download Link" msgid "IDS_BR_OPT_NAVIGATE_GO_FORWARD" msgstr "Go forward" @@ -110,16 +110,16 @@ msgid "IDS_WEBVIEW_OPT_COPY_AUDIO_URL_ABB" msgstr "Copy audio URL" msgid "IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_NEW_TAB_ABB" -msgstr "Open image in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_OPEN_LINK_IN_NEW_TAB_ABB" -msgstr "Open link in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_PLAY_AUDIO_IN_NEW_TAB_ABB" msgstr "Play audio in new tab" msgid "IDS_WEBVIEW_OPT_SAVE_IMAGE_ABB" -msgstr "Save image" +msgstr "Download Image" msgid "IDS_WEBVIEW_OPT_SEARCH_THE_INTERNET_ABB" msgstr "Search the Internet" @@ -164,7 +164,7 @@ msgid "IDS_WEBVIEW_BUTTON_SUBMIT" msgstr "Submit" msgid "IDS_WEBVIEW_OPT_COPY_LINK_URL_ABB" -msgstr "Copy link URL" +msgstr "Copy link Address" msgid "IDS_WEBVIEW_OPT_MUTE" msgstr "Mute" @@ -185,4 +185,4 @@ msgid "IDS_WEBVIEW_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_USE_YOUR_CAMERA" msgstr "%1$s (%2$s) is requesting permission to use your camera." msgid "IDS_WEBVIEW_HEADER_MESSAGE_FROM_PS_M_WEBSITE" -msgstr "Message from %s"
\ No newline at end of file +msgstr "Message from %s" diff --git a/tizen_src/ewk/po_tizen/en_US.po b/tizen_src/ewk/po_tizen/en_US.po index 31827ccce087..b78e2b5cd4d5 100755 --- a/tizen_src/ewk/po_tizen/en_US.po +++ b/tizen_src/ewk/po_tizen/en_US.po @@ -17,7 +17,7 @@ msgid "IDS_WEBVIEW_OPT_COPY" msgstr "Copy" msgid "IDS_WEBVIEW_OPT_COPY_IMAGE" -msgstr "Copy image" +msgstr "Copy Image" msgid "IDS_WEBVIEW_OPT_PASTE" msgstr "Paste" @@ -62,7 +62,7 @@ msgid "IDS_WEBVIEW_BUTTON_DONE" msgstr "Done" msgid "IDS_BR_BODY_SAVE_LINK" -msgstr "Save link" +msgstr "Download Link" msgid "IDS_BR_OPT_NAVIGATE_GO_FORWARD" msgstr "Go forwards" @@ -110,16 +110,16 @@ msgid "IDS_WEBVIEW_OPT_COPY_AUDIO_URL_ABB" msgstr "Copy audio URL" msgid "IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_NEW_TAB_ABB" -msgstr "Open image in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_OPEN_LINK_IN_NEW_TAB_ABB" -msgstr "Open link in new tab" +msgstr "Open in New tab" msgid "IDS_WEBVIEW_OPT_PLAY_AUDIO_IN_NEW_TAB_ABB" msgstr "Play audio in new tab" msgid "IDS_WEBVIEW_OPT_SAVE_IMAGE_ABB" -msgstr "Save image" +msgstr "Download Image" msgid "IDS_WEBVIEW_OPT_SEARCH_THE_INTERNET_ABB" msgstr "Search the Internet" @@ -164,7 +164,7 @@ msgid "IDS_WEBVIEW_BUTTON_SUBMIT" msgstr "Submit" msgid "IDS_WEBVIEW_OPT_COPY_LINK_URL_ABB" -msgstr "Copy link address" +msgstr "Copy link Address" msgid "IDS_WEBVIEW_OPT_MUTE" msgstr "Mute" @@ -206,4 +206,4 @@ msgid "IDS_WEBVIEW_POP_P1SS_HP2SS_IS_REQUESTING_PERMISSION_TO_USE_YOUR_CAMERA" msgstr "%1$s (%2$s) is requesting permission to use your camera." msgid "IDS_WEBVIEW_HEADER_MESSAGE_FROM_PS_M_WEBSITE" -msgstr "Message from %s"
\ No newline at end of file +msgstr "Message from %s" diff --git a/tizen_src/ewk/thirdparty/eglibc-2.18-rpm/eglibc-2.18-5.1.armv7l.rpm b/tizen_src/ewk/thirdparty/eglibc-2.18-rpm/eglibc-2.18-5.1.armv7l.rpm Binary files differdeleted file mode 100644 index a8e695f1e20e..000000000000 --- a/tizen_src/ewk/thirdparty/eglibc-2.18-rpm/eglibc-2.18-5.1.armv7l.rpm +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so b/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so Binary files differdeleted file mode 100755 index 460ca038eed6..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libnspr4.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnss3.so b/tizen_src/ewk/thirdparty/nss3.15/libnss3.so Binary files differdeleted file mode 100755 index 7461af0fafbe..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libnss3.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so b/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so Binary files differdeleted file mode 100755 index b1fd6a487717..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libnssutil3.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libplc4.so b/tizen_src/ewk/thirdparty/nss3.15/libplc4.so Binary files differdeleted file mode 100755 index 9a1de611ed81..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libplc4.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libplds4.so b/tizen_src/ewk/thirdparty/nss3.15/libplds4.so Binary files differdeleted file mode 100755 index b3bcbee25e8b..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libplds4.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so b/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so Binary files differdeleted file mode 100755 index 6b2dbbc05dc1..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libsmime3.so +++ /dev/null diff --git a/tizen_src/ewk/thirdparty/nss3.15/libssl3.so b/tizen_src/ewk/thirdparty/nss3.15/libssl3.so Binary files differdeleted file mode 100755 index c46c577e21b6..000000000000 --- a/tizen_src/ewk/thirdparty/nss3.15/libssl3.so +++ /dev/null diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec index a25b78602b6f..6c843690cf59 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/tizen_src/packaging/chromium-efl.spec @@ -283,12 +283,6 @@ Selenium WebDriver for t-browser tizen_src/build/apply_patches.sh trap 'tizen_src/build/apply_patches.sh -r' EXIT -# workaround for new nss library : search it in /usr/lib first, rather than /lib (system nss) -export LD_RUN_PATH=%{_libdir} -export LDFLAGS="$LDFLAGS -L/lib" -#/usr/lib -#/lib - # architecture related configuration + neon temporary workaround %if %{?_skip_ninja:0}%{!?_skip_ninja:1} %ifarch %{arm} aarch64 |