Remove genericFamily enum from FontDescription
https://bugs.webkit.org/show_bug.cgi?id=139207

Reviewed by Andreas Kling.

We use predefined AtomicStrings for generic families. The side enum adds no information.

* css/CSSFontSelector.cpp:
(WebCore::resolveGenericFamily):
(WebCore::CSSFontSelector::getFontData):

    Match the existing quirk where the default font can be replaced by @font-face rule but user generic families can't.

(WebCore::CSSFontSelector::resolvesFamilyFor):
(WebCore::fontDataForGenericFamily): Deleted.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInheritValue):
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::checkForGenericFamilyChange):

    Remove the explicit monospace check, earlier useFixedDefaultSize check is equivalent.

(WebCore::StyleResolver::initializeFontStyle):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::useFixedDefaultSize):
(WebCore::FontDescription::setWeight):
(WebCore::FontDescription::equalForTextAutoSizing):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::genericFamily): Deleted.
(WebCore::FontDescription::setGenericFamily): Deleted.
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):

    Reset the lineheight unconditionally for buttons.
    This always happened before because the explicitly set generic family made the font compare false.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

    Resolve document style for final value immediately as it can't be affected by @font-face rules.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/misc/authentication-redirect tests use the same authentication realm
https://bugs.webkit.org/show_bug.cgi?id=139225

Reviewed by Tim Horton.

* http/tests/misc/authentication-redirect-1/resources/auth-then-redirect.php:
* http/tests/misc/authentication-redirect-2/resources/auth-then-redirect.php:
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect-with-url-credentials.php:
* http/tests/misc/authentication-redirect-3/resources/auth-then-redirect.php:
Use different realms.

* http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt:
This test's results no longer depend on previous tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Keyboard input should be disabled in the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139219
<rdar://problem/19052381>

Reviewed by Anders Carlsson.

Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
and WKThumbnailViews. Also block the fake mouseMove events that originate in
the Web process upon scrolling, because we were missing those despite blocking
ordinary mouseMove events.

* page/ChromeClient.h:
(WebCore::ChromeClient::shouldDispatchFakeMouseMoveEvents):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
Allow ChromeClient to disable the dispatch of "fake" mouseMove events
that happens during scrolling.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
apply not only to mouse events but also key events, Quick Look events, menu
preparation events, swipe events, etc.

Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
with the addition of ignoring scrollWheel events.

(-[WKView scrollWheel:]):
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
Adjust to the new name.

(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
(-[WKView quickLookWithEvent:]):
(-[WKView prepareForMenu:withEvent:]):
(-[WKView willOpenMenu:withEvent:]):
(-[WKView didCloseMenu:withEvent:]):
Block all of these events as well as those we were previously blocking.

(-[WKView _setIgnoresAllEvents:]):
(-[WKView _setIgnoresNonWheelMouseEvents:]):
(-[WKView _setIgnoresNonWheelEvents:]):
(-[WKView _ignoresNonWheelEvents]):
(-[WKView _ignoresAllEvents]):
* UIProcess/API/mac/WKViewInternal.h:
Adjust to the new names and the addition of ignoresAllEvents.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Adjust to the new name.

(-[WKActionMenuController prepareForMenu:withEvent:]):
Move bailing from prepareForMenu: up to WKView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelEvents]):
(-[WKWebView _setIgnoresNonWheelEvents:]):
(-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
(-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Adjust to the new name (without "mouse" in it).

* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
Explicitly tell WKView to disable event handling while thumbnailed,
instead of having WKView special-case thumbnail views internally.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
* WebProcess/WebPage/WebPage.messages.in:
Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
and through to WebKit2's ChromeClient implementation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The parser should allocate all pieces of the AST
https://bugs.webkit.org/show_bug.cgi?id=139230

Reviewed by Oliver Hunt.

This is a step toward a 14% parsing speedup.

Previously, allocation was split between the parser and certain node
constructor functions. This made for some duplicated code and circular
dependencies.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty): No need to pass through
the VM, since our callee no longer needs to allocate anything.

(JSC::ASTBuilder::createProperty): Allocate the identifier for our
callee, since that is simpler than requiring our callee to notice that
we didn't do so, and do it for us.

(JSC::ASTBuilder::createForInLoop): Allocate the DeconstructingAssignmentNode
for our callee, since that is simpler than requiring our callee to notice
that we didn't do so, and do it for us.

Also, reuse some code instead of duplicating it.

(JSC::ASTBuilder::createForOfLoop): Ditto.

(JSC::ASTBuilder::createArrayPattern):
(JSC::ASTBuilder::createObjectPattern):
(JSC::ASTBuilder::createBindingLocation): No need to pass through a VM
pointer, since our callee no longer needs to allocate anything.

(JSC::ASTBuilder::createBreakStatement): Deleted.
(JSC::ASTBuilder::createContinueStatement): Deleted.

* parser/NodeConstructors.h:
(JSC::PropertyNode::PropertyNode):
(JSC::DeconstructionPatternNode::DeconstructionPatternNode):
(JSC::ArrayPatternNode::ArrayPatternNode):
(JSC::ArrayPatternNode::create):
(JSC::ObjectPatternNode::ObjectPatternNode):
(JSC::ObjectPatternNode::create):
(JSC::BindingNode::create):
(JSC::BindingNode::BindingNode):
(JSC::ContinueNode::ContinueNode): Deleted.
(JSC::BreakNode::BreakNode): Deleted.
(JSC::EnumerationNode::EnumerationNode): Deleted.
(JSC::ForInNode::ForInNode): Deleted.
(JSC::ForOfNode::ForOfNode): Deleted. Deleted a bunch of special cases
that don't exist anymore, now that the parser allocates all pieces of
the AST unconditionally.

* parser/Nodes.h: Ditto.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseBreakStatement):
(JSC::Parser<LexerType>::parseContinueStatement): Allocate the null
identifier for our callee, since that is simpler than requiring our
callee to notice that we didn't do so, and do it for us.

(JSC::Parser<LexerType>::parseProperty):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createProperty): No need to pass through a VM
pointer, since our callee no longer needs to allocate anything.


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