Web Inspector: Add a function to CSSCompletions to get a list of supported system...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 20:24:08 +0000 (20:24 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jul 2015 20:24:08 +0000 (20:24 +0000)
commit754690b7a579ae2c4cf260eae7c0d4ead54c0a2f
treee783162abcd71457890110915d9f80f9085d0f84
parent005a7fcda677c2a4e448af594e40c0dca8457c9f
Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
https://bugs.webkit.org/show_bug.cgi?id=147009

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/CSS.json: Added getSupportedSystemFontFamilyNames function.

Source/WebCore:

Test: inspector/css/get-system-fonts.html

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
Gets the list of system fonts (implemented in each platform) and returns that list.
* inspector/InspectorCSSAgent.h:
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFontFamilies):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFontFamilies):

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.activateExtraDomains):
* UserInterface/Base/Test.js:
(WebInspector.loaded):
* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSCompletions.fontFamilyNamesCallback):
(WebInspector.CSSCompletions.requestCSSCompletions):
Now also grabs the list of system font family names and adds that list to the existing completion
list for both font and font-family in CSSKeywordCompletions.
(WebInspector.CSSCompletions.requestCSSNameCompletions): Deleted.

LayoutTests:

Skip the get-system-fonts test until it is implemented.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

Added the get-system-fonts test that returns the list of system fonts.
* inspector/css/get-system-fonts-expected.html:
* inspector/css/get-system-fonts.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/css/get-system-fonts-expected.txt [new file with mode: 0644]
LayoutTests/inspector/css/get-system-fonts.html [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/protocol/CSS.json
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/platform/graphics/FontCache.h
Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp
Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
Source/WebCore/platform/graphics/mac/FontCacheMac.mm
Source/WebCore/platform/graphics/win/FontCacheWin.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Base/Test.js
Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js