Add FINAL decorators to the InlineBox class hierarchy.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-25  Andreas Kling  <akling@apple.com>
2
3         Add FINAL decorators to the InlineBox class hierarchy.
4         <http://webkit.org/b/115177>
5
6         Reviewed by Antti Koivisto.
7
8         From Blink r148628 by <cevans@chromium.org>:
9
10         FINAL is a macro in wtf/Compiler.h that does the correct thing if the compiler does not support "final")
11         The approach used is as simple as possible whilst being thorough.
12         So, leaf classes have FINAL applied to the whole class whereas intermediary classes have FINAL applied to relevant methods.
13
14         FINAL allows a compiler to devirtualize call sites and turn them into direct calls. As you might expect, this is perf positive:
15         (clang on Linux):
16         - line_layout.html goes from 120 runs/s -> 123 runs/2, +2.5%
17         - html5-full-render.html goes from 3176ms -> 3162ms, +0.4%
18
19         I have confidence that the former result is statistically significant (as the numbers are very very stable) but not the latter.
20
21         * rendering/EllipsisBox.h:
22         * rendering/InlineFlowBox.h:
23         * rendering/InlineTextBox.h:
24         * rendering/RootInlineBox.h:
25         * rendering/TrailingFloatsRootInlineBox.h:
26         * rendering/svg/SVGInlineFlowBox.h:
27         * rendering/svg/SVGInlineTextBox.h:
28         * rendering/svg/SVGRootInlineBox.h:
29
30 2013-04-25  Andreas Kling  <akling@apple.com>
31
32         CSS parser: Add error recovery while parsing @-webkit-keyframes key values.
33         <http://webkit.org/b/115175>
34
35         From Blink r148714 by <apavlov@chromium.org>:
36
37         If not a percentage, "from", or "to" value is used in a key list, the rule is erroneous,
38         and due to the absense of recovery, the parser skips the following, valid CSS rule.
39
40         On a related note, keyframes, whose selectors contain invalid keys, should be discarded
41         altogether, according to <http://www.w3.org/TR/css3-animations/#keyframes>
42
43         Tests: animations/keyframes-invalid-keys.html
44                fast/css/webkit-keyframes-errors.html
45
46         * css/CSSGrammar.y.in:
47         * css/CSSParser.cpp:
48         (WebCore::CSSParser::rewriteSpecifiers):
49
50 2013-04-25  Antti Koivisto  <antti@apple.com>
51
52         REGRESSION (r147797): Animations slideshows of images on www.thesuperficial.com are slow
53         https://bugs.webkit.org/show_bug.cgi?id=115172
54
55         Reviewed by Andreas Kling.
56
57         On this page ads dynamically loaded to subframes on slideshow navigation switch us to state where we throttle layer flushes.
58         
59         Fix by ignoring any subframe-originated loads when determining throttling.
60
61         * loader/FrameLoader.cpp:
62         (WebCore::FrameLoader::loadProgressingStatusChanged):
63         * loader/ProgressTracker.cpp:
64         (WebCore::ProgressTracker::isMainLoadProgressing):
65         
66             Rename, ignore subframe originated loads. Subframe loads that are initiated during the main load still count.
67
68         * loader/ProgressTracker.h:
69         (ProgressTracker):
70         * page/FrameView.cpp:
71         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
72         * page/FrameView.h:
73         (FrameView):
74         * rendering/RenderLayerBacking.cpp:
75         (WebCore::computeTileCoverage):
76
77 2013-04-25  Andreas Kling  <akling@apple.com>
78
79         SVG: Fix viewBox animations on shapes with non-scaling-stroke.
80         <http://webkit.org/b/115173>
81
82         From Blink r149058 by <pdr@chromium.org>:
83
84         Previously hasAttribute() to determine if a viewBox was set in the transform
85         code for non-scaling-strokes. hasAttribute() should not be used in this case,
86         as it will return false if the attribute is not set but the value is animating.
87
88         This patch switches to checking if the viewBox is empty instead of checking for
89         the presence of the attribute.
90
91         Test: svg/stroke/animated-non-scaling-stroke.html
92
93         * svg/SVGSVGElement.cpp:
94         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
95         * svg/SVGSVGElement.h:
96         (WebCore::SVGSVGElement::hasEmptyViewBox):
97
98 2013-04-25  Andreas Kling  <akling@apple.com>
99
100         Remove isPluginElement hack in Document::setFocusedNode()
101         <http://webkit.org/b/115171>
102
103         From Blink r148800 by <tkent@chromium.org>:
104
105         This hack is no longer necessary because r147591 made isFocusable for plugin
106         elements work correctly.
107
108         * dom/Document.cpp:
109         (WebCore::Document::setFocusedNode):
110
111 2013-04-25  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
112
113         EventSource: Synchronous loader callback not handled properly
114         https://bugs.webkit.org/show_bug.cgi?id=115104
115
116         When attempting a cross-origin request towards a non-HTTP URL, an early verification
117         of the protocol scheme will cause didFailAccessControlCheck to be called synchronously
118         before the loader has even finished being created. This special case was not handled
119         properly, since we tried to cancel a non-existing loader, which resulted in a crash.
120         In addition to checking whether a request is in flight before trying to cancel it,
121         this change also schedules the initial creation of the loader to happen asynchronously
122         when an EventSource is constructed, so that a script can register for the error event
123         before it is dispatched (as a result of passing a non-HTTP URL to the constructor).
124
125         Reviewed by Alexey Proskuryakov.
126
127         Test: http/tests/eventsource/eventsource-cors-non-http.html
128
129         * page/EventSource.cpp:
130         (WebCore::EventSource::EventSource):
131         (WebCore::EventSource::create):
132         (WebCore::EventSource::scheduleInitialConnect):
133         (WebCore):
134         (WebCore::EventSource::scheduleReconnect):
135         (WebCore::EventSource::connectTimerFired):
136         (WebCore::EventSource::close):
137         (WebCore::EventSource::abortConnectionAttempt):
138         * page/EventSource.h:
139         (EventSource):
140
141 2013-04-25  Patrick Gansterer  <paroga@webkit.org>
142
143         Unreviewed WinCE build fix after r148545.
144
145         * page/wince/FrameWinCE.cpp:
146
147 2013-04-24  Kent Tamura  <tkent@chromium.org>
148
149         Back references don't work in pattern attribute
150         https://bugs.webkit.org/show_bug.cgi?id=105875
151
152         Reviewed by Geoffrey Garen.
153
154         This imports a part of Blink r148951.
155
156         Tests: Update fast/forms/ValidityState-patternMismatch.html
157
158         * html/BaseTextInputType.cpp:
159         (WebCore::BaseTextInputType::patternMismatch):
160         Don't use capturing parentheses. They affected back references in
161         pattern attribute values.
162
163 2013-04-24  Tim Horton  <timothy_horton@apple.com>
164
165         PDFPlugin: Cursor should become an i-beam when over selectable text
166         https://bugs.webkit.org/show_bug.cgi?id=115018
167         <rdar://problem/12645012>
168
169         Reviewed by Alexey Proskuryakov.
170
171         * WebCore.exp.in: Export the I-beam and arrow cursors.
172
173 2013-04-24  Simon Fraser  <simon.fraser@apple.com>
174
175         Garbage at the top of http://www.technologyreview.com after scrolling
176         https://bugs.webkit.org/show_bug.cgi?id=114825
177
178         Reviewed by Tim Horton.
179
180         Garbage pixels are caused by GraphicsLayerCA setting a layer to be opaque,
181         but then not painting anything into it. On this page, the element is
182         toggled to be visibility:hidden on scrolling, but RenderLayer::backgroundIsKnownToBeOpaqueInRect()
183         failed to consider that as something that can cause backgrounds not to be opaque.
184         
185         For the bug to happen, some subtle interactions with r142012 come into play
186         for the layer to remain visible, hence the slightly complex testcase.
187         
188         Test: compositing/contents-opaque/visibility-hidden.html
189
190         * rendering/RenderLayer.cpp:
191         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
192
193 2013-04-24  Simon Fraser  <simon.fraser@apple.com>
194
195         Dump layer opaqueness in the Compositing log output
196         https://bugs.webkit.org/show_bug.cgi?id=115132
197
198         Reviewed by Tim Horton.
199
200         It's useful to see whether we consider layers to be opaque in the Compositing
201         log channel output, so dump it.
202
203         * rendering/RenderLayerCompositor.cpp:
204         (WebCore::RenderLayerCompositor::logLayerInfo):
205
206 2013-04-24  Seokju Kwon  <seokju.kwon@gmail.com>
207
208         Add efl to JSInspectorFrontendHost::port()
209         https://bugs.webkit.org/show_bug.cgi?id=115137
210
211         Reviewed by Timothy Hatcher.
212
213         No new tests, because there is no change in behavior.
214
215         * bindings/js/JSInspectorFrontendHostCustom.cpp:
216         (WebCore::JSInspectorFrontendHost::port):
217
218 2013-04-24  Kangil Han  <kangil.han@samsung.com>
219
220         Function parameter quotePair can be passed by reference
221         https://bugs.webkit.org/show_bug.cgi?id=115089
222
223         Reviewed by Alexey Proskuryakov.
224
225         Minor performance patch.
226
227         * rendering/style/QuotesData.cpp:
228         (WebCore::QuotesData::addPair):
229         * rendering/style/QuotesData.h:
230         (QuotesData):
231
232 2013-04-24  Brady Eidson  <beidson@apple.com>
233
234         Implementors of CachedResource subclasses should be forced to decide if encoded data can be replaced.
235         https://bugs.webkit.org/show_bug.cgi?id=115140
236
237         Reviewed by Beth Dakin.
238
239         No new tests (No behavior change).
240
241         This makes mayTryReplaceEncodedData() return false in CachedResource, but overrides to true
242         in all CachedResource subclasses besides CachedFont (which already has an implementation).
243
244         * loader/cache/CachedCSSStyleSheet.h:
245         * loader/cache/CachedImage.h:
246         * loader/cache/CachedRawResource.h:
247         * loader/cache/CachedResource.h:
248         * loader/cache/CachedSVGDocument.h:
249         * loader/cache/CachedScript.h:
250         * loader/cache/CachedShader.h:
251         * loader/cache/CachedTextTrack.h:
252         * loader/cache/CachedXSLStyleSheet.h:
253
254 2013-04-24  Brady Eidson  <beidson@apple.com>
255
256         Once a custom font is cached to disk, it starts failing to render until the page is refreshed.
257         <rdar://problem/13622998> and https://bugs.webkit.org/show_bug.cgi?id=115131
258
259         Reviewed by Alexey Proskuryakov.
260
261         No new tests (Not a tested config, nor are disk cache issues currently testable).
262
263         * loader/cache/CachedResource.h:
264         (WebCore::CachedResource:: mayTryReplaceEncodedData): Allow subclasses to refuse encoded data replacement.
265
266         * loader/cache/CachedResource.cpp:
267         (WebCore::CachedResource::tryReplaceEncodedData): Only try if shouldTryReplaceEncodedData() is true.
268
269         * loader/cache/CachedFont.cpp:
270         (WebCore::CachedFont::CachedFont):
271         (WebCore::CachedFont::ensureCustomFontData):
272         (WebCore::CachedFont::mayTryReplaceEncodedData): Return false if the custom font data has ever been created.
273         * loader/cache/CachedFont.h:
274
275 2013-04-24  Beth Dakin  <bdakin@apple.com>
276
277         Vertical overlay scrollbar in iframes fades in and out rapidly when you scroll in 
278         a circle
279         https://bugs.webkit.org/show_bug.cgi?id=115124
280         -and corresponding-
281         <rdar://problem/13168957>
282
283         Reviewed by Anders Carlsson.
284
285         With http://trac.webkit.org/changeset/119834 we started calling 
286         ScrollbarPainterController's contentAreaScrolled/contentAreaScrolledInDirection 
287         API on a zero-delay timer instead of calling it right away. This prevented some 
288         crashes that we saw whenever this was called during a layout. However, that delay, 
289         combined with the particulars of contentAreaScrolledInDirection cause this bug 
290         where sometimes the scrollbars in an iframe will fade out very noticeably when 
291         scrolling in a circle.
292
293         This change makes it so we will only use the zero-delay timer if the 
294         ScrollableArea is not currently handling a wheel event. If it IS handling a wheel 
295         event, then we will send the notifications to AppKit right away. I confirmed that 
296         this change did not reintroduce the old crashes. 
297
298         Keep track of whether we are currently handling a wheel event with the new member 
299         variable m_isHandlingWheelEvent.
300         * page/EventHandler.cpp:
301         (WebCore::EventHandler::EventHandler):
302         (WebCore::EventHandler::handleWheelEvent):
303         * page/EventHandler.h:
304         (WebCore::EventHandler::isHandlingWheelEvent):
305         (EventHandler):
306
307         To prevent layering violations, the ScrollableArea sub-classes will have to access 
308         this information from the EventHandler.
309         * page/FrameView.cpp:
310         (WebCore::FrameView::isHandlingWheelEvent):
311         * page/FrameView.h:
312         * platform/ScrollableArea.h:
313         (WebCore::ScrollableArea::isHandlingWheelEvent):
314         * rendering/RenderLayer.cpp:
315         (WebCore::RenderLayer::isHandlingWheelEvent):
316         * rendering/RenderLayer.h:
317         (RenderLayer):
318         * rendering/RenderListBox.cpp:
319         (WebCore::RenderListBox::isHandlingWheelEvent):
320         * rendering/RenderListBox.h:
321
322         sendContentAreaScrolledSoon() can be private. Also add new function 
323         sendContentAreaScrolled().
324         * platform/mac/ScrollAnimatorMac.h:
325         (ScrollAnimatorMac):
326
327         If the ScrollableArea is handling a wheel event, call 
328         sendContentAreaScrolled(), otherwise call sendContentAreaScrolledSoon()
329         * platform/mac/ScrollAnimatorMac.mm:
330         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
331         (WebCore::ScrollAnimatorMac::sendContentAreaScrolled):
332
333         Re-factored to use sendContentAreaScrolled()
334         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
335
336 2013-04-24  Ryosuke Niwa  <rniwa@webkit.org>
337
338         Fix a merge error in r149007 (was missing a null check added in r148777).
339
340         * rendering/LogicalSelectionOffsetCaches.h:
341         (WebCore::containingBlockForAbsolutePosition):
342
343 2013-04-24  Otto Derek Cheung  <otcheung@rim.com>
344
345         Battery API won't return updated battery status until client calls didChangeBatteryStatus
346         https://bugs.webkit.org/show_bug.cgi?id=114891
347
348         Reviewed by Rob Buis.
349
350         The BatteryStatus object in BatteryManager won't get updated until BatteryClient calls
351         didChangeBatteryStatus in BatteryController. Any attempts to call webkitBattery.charged()
352         or other get functions will always return the default values until the next battery status
353         change object gets passed to the controller.
354
355         We need to update the manager when we attach it to the controller, and update all
356         existing managers when the controller receives it's first battery status object.
357
358         * Modules/battery/BatteryController.cpp:
359         (WebCore::BatteryController::addListener):
360         (WebCore::BatteryController::updateBatteryStatus):
361         * Modules/battery/BatteryManager.cpp:
362         (WebCore::BatteryManager::didChangeBatteryStatus):
363         (WebCore::BatteryManager::updateBatteryStatus):
364         (WebCore):
365         * Modules/battery/BatteryManager.h:
366         (BatteryManager):
367
368 2013-04-24  Jacky Jiang  <zhajiang@blackberry.com>
369
370         Clean up unused code in ViewportArguments.h
371         https://bugs.webkit.org/show_bug.cgi?id=115121
372
373         Reviewed by Benjamin Poulain.
374
375         The target-densityDPI emulation implementation has been removed by
376         r147893, so clean up the remaining code as well.
377
378         * dom/ViewportArguments.h:
379
380 2013-04-24  Andreas Kling  <akling@apple.com>
381
382         ElementData should use 'unsigned' attribute indices.
383         <http://webkit.org/b/115103>
384
385         Reviewed by Antti Koivisto.
386
387         Switch to using 'unsigned' for attribute indices. This gives consistent behavior
388         on 32/64-bit, and the underlying storage is already limited by Vector's 32-bit capacity.
389
390         Added an ElementData::attributeNotFound constant (-1) since we can't use WTF::notFound.
391
392         * dom/Element.cpp:
393         (WebCore::Element::detachAttribute):
394         (WebCore::Element::removeAttribute):
395         (WebCore::Element::setAttribute):
396         (WebCore::Element::setSynchronizedLazyAttribute):
397         (WebCore::Element::setAttributeInternal):
398         (WebCore::Element::setAttributeNode):
399         (WebCore::Element::removeAttributeNode):
400         (WebCore::Element::removeAttributeInternal):
401         (WebCore::UniqueElementData::removeAttribute):
402         (WebCore::ElementData::getAttributeItemIndexSlowCase):
403         * dom/Element.h:
404         (ElementData):
405         (UniqueElementData):
406         (Element):
407         (WebCore::Element::getAttributeItemIndex):
408         (WebCore::Element::attributeCount):
409         (WebCore::ElementData::length):
410         (WebCore::ElementData::getAttributeItem):
411         (WebCore::ElementData::getAttributeItemIndex):
412         * dom/NamedNodeMap.cpp:
413         (WebCore::NamedNodeMap::removeNamedItem):
414         (WebCore::NamedNodeMap::removeNamedItemNS):
415         (WebCore::NamedNodeMap::length):
416         * dom/NamedNodeMap.h:
417         (NamedNodeMap):
418
419 2013-04-24  Andreas Kling  <akling@apple.com>
420
421         ElementData::attributeItem() should bounds-check the index.
422         <http://webkit.org/b/115076>
423
424         Reviewed by Antti Koivisto.
425
426         Switch the ASSERT_WITH_SECURITY_IMPLICATION to a RELEASE_ASSERT.
427
428         * dom/Element.h:
429         (WebCore::ElementData::attributeItem):
430
431 2013-04-23  Andreas Kling  <akling@apple.com>
432
433         Setting an inline style property to "" shouldn't cause style recalc unless the property was present.
434         <http://webkit.org/b/115122>
435
436         Reviewed by Antti Koivisto.
437
438         StylePropertySet::setProperty() handles empty strings by removing the property entirely.
439         If there was no property to remove, it shouldn't claim that it changed something, as that
440         will cause the CSSOM wrapper to mark the element for style recalc.
441
442         A common idiom that triggers this is excessive use of { element.style.display = ''; }
443
444         * css/StylePropertySet.cpp:
445         (WebCore::MutableStylePropertySet::setProperty):
446
447 2013-04-23  Ryosuke Niwa  <rniwa@webkit.org>
448
449         Moving word boundaries backwards fails when there is a text node starting with an apostrophe
450         https://bugs.webkit.org/show_bug.cgi?id=115070
451
452         Reviewed by Alexey Proskuryakov.
453
454         The bug was caused by previousBoundary erroneously assuming that we don't need any more context if a word
455         boundary is found at the beginning of a string. For example, when "I'll" is split into two text nodes,
456         "I" and "'ll", there is a word boundary between "'" and "ll" in "'ll" so we need to examine the whole "I'll".
457
458         Fixed the bug by obtaining more context when the character starts exactly at offset 1 in a text node to
459         work around this bug. In the long term, we probably need to provide Foundation of the entire context since in
460         languages like Hebrew and some of European languages, there could be many accents and combining characters
461         between split into multiple text nodes as one variant is seen in the newly added test case.
462
463         Test: editing/selection/previous-word-boundary-across-text-nodes.html
464
465         * editing/VisibleUnits.cpp:
466         (WebCore::previousBoundary):
467
468 2013-04-24  Benjamin Poulain  <bpoulain@apple.com>
469
470         Do not use static string in DiagnosticLoggingKeys
471         https://bugs.webkit.org/show_bug.cgi?id=115093
472
473         Reviewed by Andreas Kling.
474
475         The code is not hot enough to justify keeping the memory around.
476         This removes 3kb from the binary on x86_64.
477
478         * page/DiagnosticLoggingKeys.cpp:
479         (WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
480         (WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
481         (WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
482         (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
483         (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
484         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
485         (WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
486         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
487         (WebCore::DiagnosticLoggingKeys::passKey):
488         (WebCore::DiagnosticLoggingKeys::failKey):
489         (WebCore::DiagnosticLoggingKeys::noopKey):
490         * page/DiagnosticLoggingKeys.h:
491         (DiagnosticLoggingKeys):
492
493 2013-04-24  Benjamin Poulain  <benjamin@webkit.org>
494
495         Remove wxWebKit #ifdefs from WebCore/platform/graphics
496         https://bugs.webkit.org/show_bug.cgi?id=115081
497
498         Reviewed by Geoffrey Garen.
499
500         * platform/graphics/BitmapImage.h:
501         (BitmapImage):
502         * platform/graphics/Color.h:
503         (Color):
504         * platform/graphics/FloatRect.h:
505         (FloatRect):
506         * platform/graphics/FloatSize.h:
507         (FloatSize):
508         * platform/graphics/FontPlatformData.h:
509         * platform/graphics/GlyphBuffer.h:
510         (WebCore):
511         (WebCore::GlyphBuffer::glyphAt):
512         (WebCore::GlyphBuffer::add):
513         * platform/graphics/Gradient.h:
514         * platform/graphics/GraphicsContext.h:
515         (GraphicsContext):
516         * platform/graphics/Image.cpp:
517         (WebCore::Image::drawTiled):
518         * platform/graphics/ImageBufferData.h:
519         * platform/graphics/IntPoint.h:
520         (IntPoint):
521         * platform/graphics/IntRect.h:
522         * platform/graphics/IntSize.h:
523         (IntSize):
524         * platform/graphics/NativeImagePtr.h:
525         (WebCore):
526         * platform/graphics/Path.h:
527         * platform/graphics/Pattern.h:
528         * platform/graphics/SimpleFontData.h:
529         (SimpleFontData):
530         (WebCore::SimpleFontData::widthForGlyph):
531         * platform/graphics/mac/ComplexTextController.cpp:
532         (WebCore::ComplexTextController::collectComplexTextRuns):
533         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
534         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
535         * platform/graphics/transforms/AffineTransform.h:
536         (AffineTransform):
537         * platform/graphics/transforms/TransformationMatrix.h:
538         (TransformationMatrix):
539
540 2013-04-24  Benjamin Poulain  <benjamin@webkit.org>
541
542         Remove wxWebKit #ifdefs from WebCore/plugins
543         https://bugs.webkit.org/show_bug.cgi?id=115080
544
545         Reviewed by Geoffrey Garen.
546
547         * plugins/PluginView.h:
548         (PluginView):
549         * plugins/mac/PluginViewMac.mm:
550         (WebCore::nativeWindowFor):
551         (WebCore::cgHandleFor):
552         (WebCore::topLevelOffsetFor):
553         (WebCore::PluginView::platformStart):
554         * plugins/win/PluginViewWin.cpp:
555         (windowHandleForPageClient):
556         (WebCore::PluginView::handleMouseEvent):
557         (WebCore::PluginView::platformStart):
558         (WebCore::PluginView::snapshot):
559
560 2013-04-24  Benjamin Poulain  <benjamin@webkit.org>
561
562         Remove wxWebKit #ifdefs from WebCore/page
563         https://bugs.webkit.org/show_bug.cgi?id=115079
564
565         Reviewed by Geoffrey Garen.
566
567         * page/FrameView.cpp:
568         (WebCore::FrameView::wheelEvent):
569         * page/Settings.cpp:
570         (WebCore):
571         * page/Settings.h:
572         (Settings):
573
574 2013-04-24  Chris Fleizach  <cfleizach@apple.com>
575
576         AX: WAI-ARIA landmarks no longer speak type of landmark on iOS
577         https://bugs.webkit.org/show_bug.cgi?id=114547
578
579         Reviewed by David Kilzer.
580
581         We want iOS to speak the landmark type.
582         I've moved the landmark role description to the base Mac class and exposed
583         these localized strings to iOS (the ones used to return landmark descriptions).
584
585         I've also updated the accessibilityLabel to account for landmark type, but also
586         handle multiple label sources more gracefully by appending commas, which changed a few
587         tests in minor ways.
588
589         Test: platform/iphone-simulator/accessibility/landmark-type.html
590
591         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
592         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
593         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
594         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
595         (-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
596         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
597         (-[WebAccessibilityObjectWrapper roleDescription]):
598         * platform/LocalizedStrings.cpp:
599         (WebCore):
600         (WebCore::AXButtonActionVerb):
601         (WebCore::AXRadioButtonActionVerb):
602         (WebCore::AXTextFieldActionVerb):
603         (WebCore::AXCheckedCheckBoxActionVerb):
604         (WebCore::AXUncheckedCheckBoxActionVerb):
605         (WebCore::AXLinkActionVerb):
606         (WebCore::AXMenuListPopupActionVerb):
607         (WebCore::AXMenuListActionVerb):
608         * platform/LocalizedStrings.h:
609         (WebCore):
610
611 2013-04-24  Andreas Kling  <akling@apple.com>
612
613         CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.
614         <http://webkit.org/b/115116>
615         <rdar://problem/13727709>
616
617         Reviewed by Simon Fraser.
618
619         The logic that dirties the style if there's a relevant attribute selector in the document
620         shouldn't run if the attribute is being overwritten with an identical value.
621         Move this into willModifyAttribute() instead, since we need access to both the old and the new value.
622
623         This reduces unnecessary style recalculation in Mac App Store content.
624
625         * dom/Element.cpp:
626         (WebCore::Element::attributeChanged):
627         (WebCore::Element::willModifyAttribute):
628
629 2013-04-24  Jonathan Feldstein <jfeldstein@blackberry.com>
630
631         [BlackBerry] Fixes the San Angeles demo on khronos.org
632         https://bugs.webkit.org/show_bug.cgi?id=115106
633
634         Reviewed by Rob Buis
635         Internally Reviewed by Jeremy Nicholl and Arvid Nilsson
636
637         Fixes a bug in which the currently bound vertex array object's vertex array
638         state was being modified as opposed to the default vertex array state.
639
640         * platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
641         (EGLImageLayerWebKitThread::blitToFrontBuffer):
642
643 2013-04-24  Nico Weber  <thakis@chromium.org>
644
645         Fold RenderThemeMacShared into RenderThemeMac
646         https://bugs.webkit.org/show_bug.cgi?id=115086
647
648         Reviewed by Anders Carlsson.
649
650         No intended functionality change.
651
652         * WebCore.xcodeproj/project.pbxproj:
653         * rendering/RenderThemeMac.h:
654         (RenderThemeMac):
655         (WebCore::RenderThemeMac::supportsControlTints):
656         (WebCore::RenderThemeMac::scrollbarControlSizeForPart):
657         (WebCore::RenderThemeMac::supportsSelectionForegroundColors):
658         (WebCore::RenderThemeMac::supportsClosedCaptioning):
659         (WebCore::RenderThemeMac::updateActiveState):
660         * rendering/RenderThemeMac.mm:
661         (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
662         (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
663         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
664         (WebCore::RenderThemeMac::RenderThemeMac):
665         (WebCore::RenderThemeMac::~RenderThemeMac):
666         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
667         (WebCore):
668         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
669         (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor):
670         (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor):
671         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor):
672         (WebCore::RenderThemeMac::platformFocusRingColor):
673         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor):
674         (WebCore::toFontWeight):
675         (WebCore::RenderThemeMac::systemFont):
676         (WebCore::convertNSColorToColor):
677         (WebCore::menuBackgroundColor):
678         (WebCore::RenderThemeMac::platformColorsDidChange):
679         (WebCore::RenderThemeMac::systemColor):
680         (WebCore::RenderThemeMac::usesTestModeFocusRingColor):
681         (WebCore::RenderThemeMac::isControlStyled):
682         (WebCore::RenderThemeMac::adjustRepaintRect):
683         (WebCore::RenderThemeMac::inflateRect):
684         (WebCore::RenderThemeMac::convertToPaintingRect):
685         (WebCore::RenderThemeMac::updateCheckedState):
686         (WebCore::RenderThemeMac::updateEnabledState):
687         (WebCore::RenderThemeMac::updateFocusedState):
688         (WebCore::RenderThemeMac::updatePressedState):
689         (WebCore::RenderThemeMac::controlSupportsTints):
690         (WebCore::RenderThemeMac::controlSizeForFont):
691         (WebCore::RenderThemeMac::setControlSize):
692         (WebCore::RenderThemeMac::sizeForFont):
693         (WebCore::RenderThemeMac::sizeForSystemFont):
694         (WebCore::RenderThemeMac::setSizeFromFont):
695         (WebCore::RenderThemeMac::setFontFromControlSize):
696         (WebCore::RenderThemeMac::controlSizeForSystemFont):
697         (WebCore::RenderThemeMac::paintTextField):
698         (WebCore::RenderThemeMac::adjustTextFieldStyle):
699         (WebCore::RenderThemeMac::paintCapsLockIndicator):
700         (WebCore::RenderThemeMac::paintTextArea):
701         (WebCore::RenderThemeMac::adjustTextAreaStyle):
702         (WebCore::RenderThemeMac::popupButtonMargins):
703         (WebCore::RenderThemeMac::popupButtonSizes):
704         (WebCore::RenderThemeMac::popupButtonPadding):
705         (WebCore::RenderThemeMac::paintMenuList):
706         (WebCore::RenderThemeMac::meterSizeForBounds):
707         (WebCore::RenderThemeMac::paintMeter):
708         (WebCore::RenderThemeMac::supportsMeter):
709         (WebCore::RenderThemeMac::levelIndicatorStyleFor):
710         (WebCore::RenderThemeMac::levelIndicatorFor):
711         (WebCore::RenderThemeMac::progressBarSizes):
712         (WebCore::RenderThemeMac::progressBarMargins):
713         (WebCore::RenderThemeMac::minimumProgressBarHeight):
714         (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
715         (WebCore::RenderThemeMac::animationDurationForProgressBar):
716         (WebCore::RenderThemeMac::adjustProgressBarStyle):
717         (WebCore::RenderThemeMac::paintProgressBar):
718         (WebCore::TopGradientInterpolate):
719         (WebCore::BottomGradientInterpolate):
720         (WebCore::MainGradientInterpolate):
721         (WebCore::TrackGradientInterpolate):
722         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
723         (WebCore::RenderThemeMac::paintMenuListButton):
724         (WebCore::menuListButtonSizes):
725         (WebCore::RenderThemeMac::adjustMenuListStyle):
726         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
727         (WebCore::RenderThemeMac::popupInternalPaddingRight):
728         (WebCore::RenderThemeMac::popupInternalPaddingTop):
729         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
730         (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
731         (WebCore::RenderThemeMac::setPopupButtonCellState):
732         (WebCore::RenderThemeMac::menuListSizes):
733         (WebCore::RenderThemeMac::minimumMenuListSize):
734         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
735         (WebCore::RenderThemeMac::paintSliderTrack):
736         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
737         (WebCore::RenderThemeMac::paintSliderThumb):
738         (WebCore::RenderThemeMac::paintSearchField):
739         (WebCore::RenderThemeMac::setSearchCellState):
740         (WebCore::RenderThemeMac::searchFieldSizes):
741         (WebCore::RenderThemeMac::setSearchFieldSize):
742         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
743         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
744         (WebCore::RenderThemeMac::cancelButtonSizes):
745         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
746         (WebCore::RenderThemeMac::resultsButtonSizes):
747         (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
748         (WebCore::RenderThemeMac::paintSearchFieldDecoration):
749         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
750         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
751         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
752         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
753         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
754         (WebCore::RenderThemeMac::sliderTickSize):
755         (WebCore::RenderThemeMac::sliderTickOffsetFromTrackCenter):
756         (WebCore::RenderThemeMac::adjustSliderThumbSize):
757         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
758         (WebCore::RenderThemeMac::popupButton):
759         (WebCore::RenderThemeMac::search):
760         (WebCore::RenderThemeMac::searchMenuTemplate):
761         (WebCore::RenderThemeMac::sliderThumbHorizontal):
762         (WebCore::RenderThemeMac::sliderThumbVertical):
763         (WebCore::RenderThemeMac::textField):
764         (WebCore::RenderThemeMac::fileListNameForWidth):
765         * rendering/RenderThemeMacShared.h: Removed.
766         * rendering/RenderThemeMacShared.mm: Removed.
767
768 2013-04-24  ChangSeok Oh  <changseok.oh@collabora.com>
769
770         [GTK][AC] Visible rect doesn't update after resizing a window.
771         https://bugs.webkit.org/show_bug.cgi?id=115096
772
773         Reviewed by Gustavo Noronha Silva.
774
775         Once we set actor's a clip rect, we should update the rect when resizing the actor.
776
777         No new tests since no new functionality.
778
779         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
780         (WebCore::GraphicsLayerClutter::setSize):
781
782 2013-04-24  ChangSeok Oh  <changseok.oh@collabora.com>
783
784         [GTK][AC] Fix unexpected clear of ClutterContent.
785         https://bugs.webkit.org/show_bug.cgi?id=115099
786
787         Reviewed by Gustavo Noronha Silva.
788
789         adoptGRef doesn't increase a reference count. So if a actor has a valid ClutterContent,
790         it would be cleared unexpectedly by smart pointer when escaping a function.
791
792         No new tests, no functionality changed.
793
794         * platform/graphics/clutter/GraphicsLayerActor.cpp:
795         (graphicsLayerActorUpdateTexture):
796
797 2013-04-24  Alberto Garcia  <agarcia@igalia.com>
798
799         DOMFileSystemBase: fix multiple definitions in the BlackBerry port
800         https://bugs.webkit.org/show_bug.cgi?id=114950
801
802         Reviewed by Xan Lopez.
803
804         The following  methods are already defined in DOMFileSystemBlackBerry.cpp:
805
806         crackFileSystemURL()
807         createFileSystemURL()
808         isValidType()
809         supportsToURL()
810
811         * Modules/filesystem/DOMFileSystemBase.cpp:
812         (WebCore):
813
814 2013-04-24  George Staikos  <gstaikos@rim.com>
815
816         [BlackBerry] Add support for JPEG image quality during encoding.
817         https://bugs.webkit.org/show_bug.cgi?id=105773
818
819         Reviewed by Xan Lopez.
820
821         PR 271611
822         Internally reviewed by Liam Quinn.
823
824         Pass the quality flag into the encoder, with a default of 65
825
826         Covered by existing tests.
827
828         * platform/image-encoders/JPEGImageEncoder.cpp:
829         (WebCore::compressRGBABigEndianToJPEG):
830         * platform/image-encoders/JPEGImageEncoder.h:
831         (WebCore):
832
833 2013-04-24  Csaba Osztrogon√°c  <ossy@webkit.org>
834
835         Fix cast-align WebCore/platform/graphics/GraphicsContext3D.cpp on ARM
836         https://bugs.webkit.org/show_bug.cgi?id=115036
837
838         Reviewed by Benjamin Poulain.
839
840         * platform/graphics/GraphicsContext3D.cpp:
841         (WebCore):
842
843 2013-04-24  Andreas Kling  <akling@apple.com>
844
845         Remove unnecessary MutableStylePropertySet casts.
846         <http://webkit.org/b/115075>
847
848         Reviewed by Geoffrey Garen.
849
850         Get rid of some now-unneeded static_casts that were left from the StylePropertySet
851         refactoring last weekend.
852
853         * css/StylePropertySet.cpp:
854         (WebCore::MutableStylePropertySet::setProperty):
855         * editing/EditingStyle.cpp:
856         (WebCore::EditingStyle::triStateOfStyle):
857         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
858
859 2013-04-24  Kangil Han  <kangil.han@samsung.com>
860
861         [Minor code cleanup] Remove duplicated condition check
862         https://bugs.webkit.org/show_bug.cgi?id=115082
863
864         Reviewed by Andreas Kling.
865
866         areRectsPartiallyAligned() has duplicated condition check, so remove it.
867
868         * page/SpatialNavigation.cpp:
869         (WebCore::areRectsPartiallyAligned):
870
871 2013-04-24  Krzysztof Wolanski  <k.wolanski@samsung.com>
872
873         [EFL] Fix build warnings caused by missing images attributes for default buttons
874         https://bugs.webkit.org/show_bug.cgi?id=114955
875
876         Reviewed by Gyuyoung Kim.
877
878         Added default image for each button from mediacontrol catalog.
879
880         No new tests, because there is no change in behavior.
881
882         * platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc:
883         * platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc:
884         * platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc:
885         * platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc:
886         * platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc:
887         * platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc:
888
889 2013-04-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
890
891         Unreviewed build fix with gstreamer 0.10.x after r147555.
892
893         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
894         (webKitWebAudioSrcLoop):
895
896 == Rolled over to ChangeLog-2013-04-24 ==