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