REGRESSION (r95391): ComplexTextController is unnecessarily slow with characters with combining marks when the base character is not covered by any font
https://bugs.webkit.org/show_bug.cgi?id=99654

Reviewed by Adele Peterson.

When the base character of a combining character sequence is not covered by any one of the
available fonts, there is no point looking for a font that covers the entire sequence, nor
to try to use a combination of fallback fonts for the entire sequence.

* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::systemFallback): Moved ComplexTextController::systemFallbackFontData
here and renamed it.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns): This function used to use
systemFallbackFontData() whenever Font::fontDataForCombiningCharacterSequence returned 0
for a base character with combining marks, regardless of whether the base character was
covered by any font. Changed it to preserve the return value of
fontDataForCombiningCharacterSequence, which is now 0 only if the base charcater is not in
any font, while systemFallbackFontData() is used to indicate that no single font in the
fallback list covers all characters in the sequence, but the base character is in some font.
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController): Moved systemFallbackFontData from here to SimpleFontData.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Updated for the above
move.
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence): Changed to return
systemFallbackFontData() if no single font in the fallback list covers all characters in the
sequence, while using 0 to signal the base character does not exist in any font.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move mixed content logic out of FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=45638

Reviewed by Eric Seidel.

Source/WebCore:

This change moves checks for mixed content out of FrameLoader, and into
a new MixedContentChecker object. It's a pretty straightforward
refactoring with no change to the overall logic, and only minor changes
to the code to reduce repetition.

The only substantive change is renaming the methods from 'checkIf*' to
'can*' to reflect the value of the boolean they return.

The visible functionality shouldn't change; this change should be
covered by existing tests in http/tests/security/mixedContent.

This patch is mostly a revitalization of Eric Sidel's original
patch: https://bugs.webkit.org/attachment.cgi?id=67432&action=prettypatch

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
    Hey, look! A new file!
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
* loader/FrameLoader.h:
(WebCore::FrameLoader::mixedContentChecker):
(FrameLoader):
* loader/MixedContentChecker.cpp: Added.
(WebCore):
(WebCore::MixedContentChecker::MixedContentChecker):
(WebCore::MixedContentChecker::client):
(WebCore::asUTF8):
(WebCore::MixedContentChecker::isMixedContent):
(WebCore::MixedContentChecker::canDisplayInsecureContent):
(WebCore::MixedContentChecker::canRunInsecureContent):
(WebCore::MixedContentChecker::logWarning):
* loader/MixedContentChecker.h: Added.
(WebCore):
(MixedContentChecker):
    Migrate functionality from FrameLoader::checkIf* to
    MixedContentChecker::can*.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable):
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
    Use the new method locations.

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::checkIfRunInsecureContent):
    Use the new method location.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131704 268f45cc-cd09-0410-ab3c-d52691b4dbfc