CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.
<http://webkit.org/b/115116>
<rdar://problem/13727709>

Reviewed by Simon Fraser.

The logic that dirties the style if there's a relevant attribute selector in the document
shouldn't run if the attribute is being overwritten with an identical value.
Move this into willModifyAttribute() instead, since we need access to both the old and the new value.

This reduces unnecessary style recalculation in Mac App Store content.

* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::willModifyAttribute):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Update build dependencies
https://bugs.webkit.org/show_bug.cgi?id=115111

Patch by Simon Pena <simon.pena@samsung.com> on 2013-04-24
Reviewed by Martin Robinson.

The install-dependencies script was missing a dependency on EGL,
which is expected when building Cairo.

* gtk/install-dependencies: Added a dependency on libegl1-mesa
for both apt and yum.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Implement LayerTreeHostGtk::pageBackgroundTransparencyChanged
https://bugs.webkit.org/show_bug.cgi?id=115094

Reviewed by Tim Horton.

The method was introduced in r149004 (and a stub implementation for the GTK port added in r149017).
Implement the method for the GTK port in the same manner it is implemented under the Mac port,
calling setContentsOpaque on the non-composited content layer.

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


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

Unreviewed.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleBooleanBranch): Explicitly
truncate to 32-bit to avoid compiler warnings. It's safe to truncate
because the payload of a boolean is the low bits on both 64-bit and 32-bit.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WAI-ARIA landmarks no longer speak type of landmark on iOS
https://bugs.webkit.org/show_bug.cgi?id=114547

Reviewed by David Kilzer.

Source/WebCore: 

We want iOS to speak the landmark type.
I've moved the landmark role description to the base Mac class and exposed
these localized strings to iOS (the ones used to return landmark descriptions).

I've also updated the accessibilityLabel to account for landmark type, but also
handle multiple label sources more gracefully by appending commas, which changed a few
tests in minor ways.

Test: platform/iphone-simulator/accessibility/landmark-type.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore):
(WebCore::AXButtonActionVerb):
(WebCore::AXRadioButtonActionVerb):
(WebCore::AXTextFieldActionVerb):
(WebCore::AXCheckedCheckBoxActionVerb):
(WebCore::AXUncheckedCheckBoxActionVerb):
(WebCore::AXLinkActionVerb):
(WebCore::AXMenuListPopupActionVerb):
(WebCore::AXMenuListActionVerb):
* platform/LocalizedStrings.h:
(WebCore):

LayoutTests: 

* platform/iphone-simulator/accessibility/landmark-type-expected.txt: Added.
* platform/iphone-simulator/accessibility/landmark-type.html: Added.
* platform/iphone-simulator/accessibility/link-with-images-text-expected.txt:
* platform/iphone-simulator/accessibility/link-with-images-text.html:
     Minor change to accomodate trimming of white space.
* platform/iphone-simulator/accessibility/math-expected.txt:
* platform/iphone-simulator/accessibility/math.html:
     Math objects now include "math" as the landmark type.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Use stamp files for generate-forwarding-headers makefile rules
https://bugs.webkit.org/show_bug.cgi?id=115118

Reviewed by Martin Robinson.

Source/WebKit2:

Use a stamp file for the WebKit2 forwarding generator rule. Also
fix the rule dependencies that pointed to a non existent variable.

* GNUmakefile.am:

Tools:

Use a stamp file for the TestWebKitAPI and WebKitTestRunner
forwarding generator rules and don't call it for soup since there
aren't soup directories in TestWebKitAPI and WebKitTestRunner.

* TestWebKitAPI/GNUmakefile.am:
* WebKitTestRunner/GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use post-branch store for RefCountedBase::derefBase
https://bugs.webkit.org/show_bug.cgi?id=115078

Reviewed by Andreas Kling.

* wtf/RefCounted.h:
(WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove wxWebKit #ifdefs from WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=115079

Reviewed by Geoffrey Garen.

* page/FrameView.cpp:
(WebCore::FrameView::wheelEvent):
* page/Settings.cpp:
(WebCore):
* page/Settings.h:
(Settings):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove wxWebKit #ifdefs from WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=115080

Reviewed by Geoffrey Garen.

* plugins/PluginView.h:
(PluginView):
* plugins/mac/PluginViewMac.mm:
(WebCore::nativeWindowFor):
(WebCore::cgHandleFor):
(WebCore::topLevelOffsetFor):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::snapshot):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove wxWebKit #ifdefs from WebCore/platform/graphics
https://bugs.webkit.org/show_bug.cgi?id=115081

Reviewed by Geoffrey Garen.

* platform/graphics/BitmapImage.h:
(BitmapImage):
* platform/graphics/Color.h:
(Color):
* platform/graphics/FloatRect.h:
(FloatRect):
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::add):
* platform/graphics/Gradient.h:
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/ImageBufferData.h:
* platform/graphics/IntPoint.h:
(IntPoint):
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
(IntSize):
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* platform/graphics/SimpleFontData.h:
(SimpleFontData):
(WebCore::SimpleFontData::widthForGlyph):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/transforms/AffineTransform.h:
(AffineTransform):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not use static string in DiagnosticLoggingKeys
https://bugs.webkit.org/show_bug.cgi?id=115093

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-24
Reviewed by Andreas Kling.

The code is not hot enough to justify keeping the memory around.
This removes 3kb from the binary on x86_64.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
(WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::passKey):
(WebCore::DiagnosticLoggingKeys::failKey):
(WebCore::DiagnosticLoggingKeys::noopKey):
* page/DiagnosticLoggingKeys.h:
(DiagnosticLoggingKeys):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Moving word boundaries backwards fails when there is a text node starting with an apostrophe
https://bugs.webkit.org/show_bug.cgi?id=115070

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

The bug was caused by previousBoundary erroneously assuming that we don't need any more context if a word
boundary is found at the beginning of a string. For example, when "I'll" is split into two text nodes,
"I" and "'ll", there is a word boundary between "'" and "ll" in "'ll" so we need to examine the whole "I'll".

Fixed the bug by obtaining more context when the character starts exactly at offset 1 in a text node to
work around this bug. In the long term, we probably need to provide Foundation of the entire context since in
languages like Hebrew and some of European languages, there could be many accents and combining characters
between split into multiple text nodes as one variant is seen in the newly added test case.

Test: editing/selection/previous-word-boundary-across-text-nodes.html

* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):

LayoutTests: 

Added a test case for moving bacwkards with a word granurality across multiple text nodes.
Some test cases still fail since this patch only implements a work around.

* editing/selection/previous-word-boundary-across-text-nodes-expected.txt: Added.
* editing/selection/previous-word-boundary-across-text-nodes.html: Added.


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