[CMake] Split out generic Windows files into its own file
https://bugs.webkit.org/show_bug.cgi?id=119514

Reviewed by Gyuyoung Kim.

This allows us to add smaller CMakeLists.txt files when
adding additional Windows ports.

.:

* Source/cmake/OptionsWinCE.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

* PlatformWin.cmake: Copied from Source/WebCore/PlatformWinCE.cmake.
* PlatformWinCE.cmake:

Source/WTF:

* wtf/PlatformWin.cmake: Renamed from Source/WTF/wtf/PlatformWinCE.cmake.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix.

* GNUmakefile.list.am: Duplicated NetscapePluginModuleNone.cpp & NetscapePluginNone.cpp.
They cause build breaks of multiple definitions when targeting wayland build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Performance tester bots should report the number of failing tests
https://bugs.webkit.org/show_bug.cgi?id=120462

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-11
Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunAndUploadPerfTests.start.getText):
(RunAndUploadPerfTests.start):
(RunAndUploadPerfTests):
(RunAndUploadPerfTests.start.getText2):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FrameView: Tighten widget handling code.
<https://webkit.org/b/121155>

Reviewed by Antti Koivisto.

Harden typing in this code to work with RenderEmbeddedObject& instead of RenderObject*.
Functions and members renamed to reflect that they only deal with embedded objects.

* html/HTMLPlugInImageElement.h:
(WebCore::toHTMLPlugInImageElement):

    Add a toHTMLPlugInImageElement that takes an Element&.

* html/HTMLTagNames.in:

    Generate type helpers for applet and embed elements.

* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::removeEmbeddedObjectToUpdate):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::updateEmbeddedObject):

    Re-ordered this function in early return style. Change locals into references.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::~RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::layout):

    Updated for new FrameView function signatures.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Compile error when VIDEO is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=121156

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-09-11
Reviewed by Andreas Kling.

* WebView.cpp:
(WebView::enterFullscreenForNode): Protect isHTMLVideoElement() function with ENABLE(VIDEO) guard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
OwnPtr: Use copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=121154

Reviewed by Anders Carlsson.

Rationals:
- decrease of repeated code
- consistency with RefPtr

* wtf/OwnPtr.h:
(WTF::=):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
https://bugs.webkit.org/show_bug.cgi?id=120773

Reviewed by Anders Carlsson.

Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
for the following reasons:
- It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
- It was potential error-prone as it actually modified the type given by the Client in opaque way.

Source/WebCore:

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
(WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):

Source/WebKit2:

* UIProcess/API/efl/ewk_database_manager.cpp:
(getDatabaseOriginsCallback):
* UIProcess/API/efl/ewk_storage_manager.cpp:
(getStorageOriginsCallback):

Source/WTF:

* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page::backForward() should return a reference.
<https://webkit.org/b/121151>

Reviewed by Anders Carlsson.

There is always a BackForwardController, so make backForward() return a reference.
Also made it store a Page& internally since it's tied to the lifetime of Page.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Widget::widgetPositionsUpdated().
<https://webkit.org/b/121160>

Reviewed by Anders Carlsson.

Remove this no-op virtual that was only used by chromium.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Changed expected results after r155253
https://bugs.webkit.org/show_bug.cgi?id=121157

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-09-11

* platform/efl/editing/deleting/delete-br-004-expected.png:
* platform/efl/editing/deleting/delete-br-004-expected.txt:
* platform/efl/editing/deleting/delete-br-005-expected.png:
* platform/efl/editing/deleting/delete-br-005-expected.txt:
* platform/efl/editing/deleting/delete-br-006-expected.png:
* platform/efl/editing/deleting/delete-br-006-expected.txt:
* platform/efl/editing/selection/caret-ltr-right-expected.png:
* platform/efl/editing/selection/caret-ltr-right-expected.txt:
* platform/efl/editing/selection/caret-rtl-2-left-expected.png:
* platform/efl/editing/selection/caret-rtl-2-left-expected.txt:
* platform/efl/editing/selection/caret-rtl-right-expected.png:
* platform/efl/editing/selection/caret-rtl-right-expected.txt:
* platform/efl/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.png:
* platform/efl/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.txt:
* platform/efl/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.png:
* platform/efl/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r154899.
http://trac.webkit.org/changeset/154899
https://bugs.webkit.org/show_bug.cgi?id=121162

It didn't fix the problem and broke other unit tests
(Requested by KaL on #webkit).

* UIProcess/API/gtk/tests/WebViewTest.cpp:
(WebViewTest::resizeView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] [GTK] LayerTreeHostGtk: don't set m_isValid to false if glContext() returns null
https://bugs.webkit.org/show_bug.cgi?id=120892

Reviewed by Martin Robinson.

If the GL context cannot be created then m_isValid is set to false
during the initialization of LayerTreeHostGtk.

This is not really necessary since the rest of the code already
deals with that situation, so it doesn't have any effect other
than breaking the assertion in invalidate().

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove Gail dependency from build system for GTK3
https://bugs.webkit.org/show_bug.cgi?id=119673

Reviewed by Gustavo Noronha Silva.

.:

* Source/autotools/FindDependencies.m4: Don't look for GAIL at all.
* Source/autotools/Versions.m4: Removed any reference to GAIL.
* Source/cmake/FindGAIL3.cmake: Removed.
* Source/cmake/OptionsGTK.cmake: Don't look for the GAIL package.

Source/WebCore:

* GNUmakefile.am: Removed GAIL_CFLAGS.
* PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.

Source/WebKit/gtk:

* GNUmakefile.am: Removed GAIL_CFLAGS and GAIL_LIBS.

Source/WebKit2:

* GNUmakefile.am: Removed GAIL_LIBS.

Tools:

* EWSTools/ubuntu-ews-packages: Removed libgail-dev package.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server): Do not load the 'gail' module anymore.
* TestWebKitAPI/GNUmakefile.am: Removed GAIL_LIBS.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The style checker shouldn't complain about returning or passing OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=121163

Reviewed by Antti Koivisto.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_function_definition_and_pass_ptr):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(PassPtrTest.test_pass_ref_ptr_return_value):
(PassPtrTest.test_own_ptr_parameter_value):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rework CSS parser, eliminating "floating" concept and using %destructor
https://bugs.webkit.org/show_bug.cgi?id=121161

Reviewed by Antti Koivisto.

This is some basic improvement, but there is still room for a lot more
consistent approach and formatting in this file. There is a mix of code that
works by side effects in the CSSParser class and code that works with the
values that bison generates in the union that is more or less random. And
the data structures seem too costly, with too much heap allocation. And the
CSSParser class has grown massive, with a mix of both function for use by
code that wants to trigger parsing, and helper functions called by code in
the grammar file. All of that can benefit from more refinement in the future.

* css/CSSGrammar.y.in: Made some incremental improvements to the structure
of the grammar file, including:
- Breaking up the %union so types are declared next to their use
- Eliminating one shift/reduce conflict caused by two "maybe_space" in a row
- Breaking the conditional sections out into their own sections instead of
  scattering them in with the other code.
- Eliminating unused return values in productions such as charset,
  ignored_charset, namespace, margin_box, invalid_rule, save_block,
  invalid_at, and declarations_and_margins.
- Adding %destructor to productions that return values that need to be deleted
  or deref'd. This removes the need for CSSParser to separately track these
  as "floating" to clean up in case of errors.
- Removing unneeded productions such as media_feature, region_selector,
  attr_name, and medium.
- Removing explicit code blocks that just say "$$ = $1" or empty blocks when
  there is no return type, since those are default.
- Formatting many productions on single lines since I find them easier to read.
  Later I think we could make many more CSSParser functions and make even
  more of the production single lines in the grammar file.
- Using adoptPtr, adoptRef, delete, deref, leakPtr, and leakRef to put
  heap allocated values into and out of the union without storage leaks.

* css/CSSParser.cpp:
(WebCore::CSSParser::~CSSParser): Remove the now-unneeded deleteAllValues for
the various colections of floating things.
(WebCore::CSSParser::createFilterRule): Don't put the rule into m_parsedRules,
just return a PassRefPtr instead.
(WebCore::CSSParser::createImportRule): Ditto.
(WebCore::CSSParser::createMediaRule): Ditto.
(WebCore::CSSParser::createEmptyMediaRule): Ditto.
(WebCore::CSSParser::createSupportsRule): Ditto.
(WebCore::CSSParser::createKeyframesRule): Ditto.
(WebCore::CSSParser::createStyleRule): Ditto.
(WebCore::CSSParser::createFontFaceRule): Ditto.
(WebCore::CSSParser::createHostRule): Ditto.
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Got rid of the
unused return value from this function and changed it to to take a reference
instead of a pointer.
(WebCore::CSSParser::rewriteSpecifiersWithElementName): Ditto.
(WebCore::CSSParser::rewriteSpecifiers): Changed this to take and return OwnPtr.
(WebCore::CSSParser::createPageRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.
(WebCore::CSSParser::createSelectorVector): Added. Used to implement the
optimization where we recycle a single selector vector. Not sure we still need
this, or maybe we need more optimizations like it, but for now keep it.
(WebCore::CSSParser::recycleSelectorVector): Ditto.
(WebCore::CSSParser::createRegionRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.
(WebCore::CSSParser::createMarginAtRule): Got rid of unused return value.
When this function is implemented for real, we might add a return value.
(WebCore::CSSParser::createKeyframe): Don't put keyframe into m_parsedKeyframes,
return PassRefPtr instead.
(WebCore::CSSParser::createViewportRule): Don't put rule into m_parsedRules, return
PassRefPtr instead.

* css/CSSParser.h: Removed many now-needed functions to manage floating items.
Changed rule creation functions to return PassRefPtr. Other changes as mentioned above.

* css/CSSParserValues.cpp:
(WebCore::destroy): Added.
(WebCore::CSSParserValueList::~CSSParserValueList): Updated to call destroy.
* css/CSSParserValues.h: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Compile errors.
https://bugs.webkit.org/show_bug.cgi?id=121153

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-09-11
Reviewed by Brent Fulgham.

* page/win/FrameCairoWin.cpp:
(WebCore::imageFromRect): Return empty GDIObject.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Get actual handle from GDIObject.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix the indentation after r105848. Typo fix after r155523.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunAndUploadPerfTests):
(RunAndUploadPerfTests.start):
(RunAndUploadPerfTests.getText2):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARM buildfix after r155491
https://bugs.webkit.org/show_bug.cgi?id=121152

Reviewed by Anders Carlsson.

FELightingNEON.cpp and FELightingNEON.h is inside COMPILER(GCC) guard, so it's safe to use GCC attribute.

* platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Use __aligned__ GCC attribute directly.
* platform/graphics/cpu/arm/filters/FELightingNEON.h: Use __aligned__ GCC attribute instead of ugly template magic.
(WebCore::FELighting::platformApplyNeon):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unnecessary Document::frame() null checks in rendererIsNeeded().
<https://webkit.org/b/121166>

Reviewed by Anders Carlsson.

rendererIsNeeded() is only called during style resolve, which only happens
while there's a Frame present.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::rendererIsNeeded):
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement Vector::append for move-only types
https://bugs.webkit.org/show_bug.cgi?id=120805

Source/WTF:

Reviewed by Andreas Kling.

* wtf/Vector.h:
(WTF::::expandCapacity):
Remove const from the pointer passed to expandCapacity, it can be non-const if we're moving.

(WTF::::append):
Change append to take U&& and use std::forward when constructing the element and when passing
the element along to appendSlowCase if that's necessary.

(WTF::::appendSlowCase):
Use std::forward.

(WTF::::uncheckedAppend):
Rename val to value.

Tools:

Reviewed by Sam Weinig.

Add a test for Vector<MoveOnly>::append.

* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):

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