Use correct stack size on Solaris and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=114978

Recommit after wrong rollout in r150621.

* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Remove unneeded WebCore namespace use in ewk
https://bugs.webkit.org/show_bug.cgi?id=116707

Reviewed by Christophe Dumez.

* UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore".
* UIProcess/API/efl/ewk_text_checker.cpp: ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r150772.

* platform/win/ClipboardWin.cpp:
(WebCore):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::readFilenames):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r150730.

* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] pc files should have harfbuzz dependency.
https://bugs.webkit.org/show_bug.cgi?id=116852

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

* ewebkit.pc.in: Added harfbuzz as Required package.

Source/WebKit2:

* efl/ewebkit2.pc.in: Added harfbuzz as Required package.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Enable CSS logging
https://bugs.webkit.org/show_bug.cgi?id=113401

Reviewed by Benjamin Poulain.

From Blink r149265 by <serya@chromium.org>

Source/WebCore:

CSS logging was disabled in r147028 to prevent message overflow in
the inspector console. This change restores it by modifying the
CSS grammar in order to reduce as much consecutive errors as
possible in 'declaration_list' and 'decl_list' rules.

This way, for rules like 'x { color: ### }' only the first '#'
will be reported as error (instead of 3 identical errors).

The rule 'declaration' still produces multiple errors, because it
does not eat as much errors as possible. So in order not to create
a complex risky patch we just disable logging in the parser for
that rule.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::syntaxError):
(WebCore::CSSParser::isLoggingErrors):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
(CSSParser):

LayoutTests:

Unskipped console-css-warnings.html now that it's working.

* TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Clean up duplicated include files.
https://bugs.webkit.org/show_bug.cgi?id=116851

Reviewed by Christophe Dumez.

Remove some of duplicated include file in ewk files.

* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_color_picker.cpp:
* UIProcess/API/efl/ewk_context_menu.cpp:
* UIProcess/API/efl/ewk_security_origin_private.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skip failing tests after parallel gc is enabled.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unskip now passing tests.

* platform/qt-arm/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix BlackBerry debug build after r150756.

* WebKitSupport/PagePopup.cpp:
(BlackBerry::WebKit::PagePopup::writeDocument): Fix typo in
assert.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116857>

Reviewed by Antti Koivisto.

Source/WebCore:

Only Elements can be focused, so tighten Document's idea of what's focused.

Most of this patch is just updating call sites for the new names and removing
now-unnecessary isElementNode() checks and casts.

* WebCore.exp.in:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFocused):
(WebCore::AccessibilityRenderObject::setFocused):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
* bindings/objc/DOM.mm:
(-[DOMElement isFocused]):
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
(WebCore::Document::focusedNodeRemoved):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::eventTargetNodeForDocument):
* dom/Document.h:
(Document):
(WebCore::Document::focusedElement):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::focus):
(WebCore::Element::blur):
(WebCore::Element::cancelFocusAppearanceUpdate):
* dom/Node.cpp:
(WebCore::Node::rendererIsEditable):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* dom/UserTypingGestureIndicator.cpp:
(WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::setFocusedElementIfNeeded):
(WebCore::FrameSelection::currentForm):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::attach):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
(WebCore::HTMLTextFormControlElement::selectionStart):
(WebCore::HTMLTextFormControlElement::selectionEnd):
(WebCore::HTMLTextFormControlElement::selectionDirection):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::focusedFieldIndex):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedNode):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::setFocusedElement):
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionallyInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::setFocus):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::focusNodeRect):
(BlackBerry::WebKit::WebPagePrivate::contextNode):
(BlackBerry::WebKit::WebPagePrivate::clearFocusNode):
(BlackBerry::WebKit::WebPage::setNodeFocus):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::focusedNodeChanged):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::setCaretPosition):
(BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
(BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
(BlackBerry::WebKit::SelectionHandler::clipPointToVisibleContainer):
(BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):

Source/WebKit/efl:

* ewk/ewk_frame.cpp:
(ewk_frame_focused_element_geometry_get):
* ewk/ewk_view.cpp:
(ewk_view_input_method_state_set):

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(getFocusedNode):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView clearFocus]):
(-[WebHTMLView becomeFirstResponder]):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(QWebElement::hasFocus):
(QWebElement::setFocus):
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::setInputMethodState):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::mousePressEvent):
(QWebPageAdapter::handleSoftwareInputPanel):
(QWebPageAdapter::inputMethodQuery):
(QWebPageAdapter::hasFocusedNode):

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMElement::isFocused):
* WebView.cpp:
(WebView::setInitialFocus):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::focusPluginElement):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedPluginViewForFrame):
(WebKit::WebPage::setInitialFocus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Unskip now passing tests.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
https://bugs.webkit.org/show_bug.cgi?id=116597

ScrollingCoordinatorCoordinatedGraphics is tailored specifically for
fixedLayout mode. When fixedLayout is not set, it should be turned off.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-05-28
Reviewed by Allan Sandfeld Jensen.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove CachedResourceRequest::initiatorElement
https://bugs.webkit.org/show_bug.cgi?id=116862

Reviewed by Andreas Kling.

The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.

* loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
* loader/cache/CachedResourceRequest.h:
(CachedResourceRequest): Remove the initiatorElement method declaration.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webkitpy] Explicitly specify the reference file extensions
https://bugs.webkit.org/show_bug.cgi?id=116333

Reviewed by Benjamin Poulain.

Explicitly specify the extensions that are valid for the reference files. This helps to differentiate
between valid reference files required by reftests and text baselines that have the same extension as
potential test files (specifically the current MHTML tests in the .mht files and the future .mht baselines
that were until this change recognized as reference files).

Covered by existing tests and the new test_is_reference_html_file test in webkitpy.port.base_unittest.

* Scripts/webkitpy/port/base.py:
(Port.reference_files): Iterate through the _supported_reference_extensions set.
(Port): Rename the _supported_file_extensions set to _supported_test_extensions. Add the
_supported_reference_extensions set, containing the extensions allowed for reference files.
(Port.is_reference_html_file): Return False if the file's extension is not a supported reference file extension.
(Port._has_supported_extension): Use _supported_test_extensions.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_is_reference_html_file): Add the unit test, testing various test cases around the
Port.is_reference_html_file method.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move dispatching of focus-related events from Node to Element.
<http://webkit.org/b/116864>

Reviewed by Antti Koivisto.

...and pass around pointers to Element instead of Node.

* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):

    Moved here from Node.

* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):

    Update subclass overrides and sprinkle OVERRIDE/FINAL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes
https://bugs.webkit.org/show_bug.cgi?id=116845

Reviewed by Noam Rosenthal.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didChangeContentsSize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge remote-tracking branch 'webkit-org/master'
Invalid block doesn't make declaration invalid
https://bugs.webkit.org/show_bug.cgi?id=115709

Reviewed by Andreas Kling.

From Blink r149446 by <serya@chromium.org>

Source/WebCore:

Added a new rule "declaration_recovery:" which covers any kind of
"invalid_block_list maybe_space" sequence. By appending this new
rule to every rule reductable to "declaration:" we can remove some
redundant rules and improve error recovery of some others that
were only accepting exactly one error.

One of the rules being removed was preventing invalid blocks in a
declaration to invalidate the whole declaration. The rule was
reporting the syntax error but at the same time accepting the
invalid block as part of a valid declaration.

* css/CSSGrammar.y.in:

LayoutTests:

* fast/css/parsing-error-recovery.html: Added 2 new test cases.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactoring CSS grammar
https://bugs.webkit.org/show_bug.cgi?id=116679

Reviewed by Andreas Kling.

From Blink r149948 by <serya@chromium.org>

Added "closing_parenthesis:" and "error_recovery:" to avoid code
duplication in a couple of error recovery rules. Some other rules
were also refactored which allows to reduce the the number of
shift/reduce conflicts by 2.

No new tests required as this is just a refactoring, no new
functionality added.

* css/CSSGrammar.y.in:

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