f0801b4c07a1ed15714069f38fa5c4ae183a20d2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-07-06  Andreas Kling  <akling@apple.com>
2
3         Inline Node's rare data getters.
4         <https://webkit.org/b/134652>
5
6         There was a fair bit of overhead when calling Node::ensureRareData()
7         from Document's collection getters. This patch inlines the case where
8         we've already materialized the rare data.
9
10         Reviewed by Antti Koivisto.
11
12         * dom/Node.cpp:
13         (WebCore::Node::materializeRareData):
14         (WebCore::Node::rareData): Deleted.
15         (WebCore::Node::ensureRareData): Deleted.
16         * dom/Node.h:
17         * dom/NodeRareData.h:
18         (WebCore::Node::rareData):
19         (WebCore::Node::ensureRareData):
20
21 2014-07-05  Dean Jackson  <dino@apple.com>
22
23         [iOS] MediaDocument should set a viewport
24         https://bugs.webkit.org/show_bug.cgi?id=134658
25         <rdar://problem/17552339>
26
27         Reviewed by Zalan Bujtas.
28
29         A MediaDocument should fill the viewport, so set its
30         initial-scale to 1 and make it non-zoomable.
31
32         * html/MediaDocument.cpp:
33         (WebCore::MediaDocumentParser::createDocumentStructure): Create
34         a <head> element and a <meta> element with a 1:1 viewport.
35
36 2014-07-05  Commit Queue  <commit-queue@webkit.org>
37
38         Unreviewed, rolling out r170825.
39         https://bugs.webkit.org/show_bug.cgi?id=134653
40
41         broke debug builds (Requested by kling on #webkit).
42
43         Reverted changeset:
44
45         "Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS
46         macro and generateTypeHelpers"
47         https://bugs.webkit.org/show_bug.cgi?id=134647
48         http://trac.webkit.org/changeset/170825
49
50 2014-07-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
51
52         Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeHelpers
53         https://bugs.webkit.org/show_bug.cgi?id=134647
54
55         Reviewed by Andreas Kling.
56
57         Use type cast macro and generation tag for isFoo() and toFoo() in some MathML classes.
58
59         No new tests, no behavior change.
60
61         * mathml/MathMLElement.h: Place MathMLElementTypeHelpers.h to the bottom of the
62         file so that functions from that file can use the Element|Node classes and other things defined in this file.
63         (WebCore::isMathMLElement): Deleted.
64         * mathml/MathMLMencloseElement.h:
65         (WebCore::toMathMLMencloseElement): Deleted.
66         * mathml/mathtags.in:
67
68 2014-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
69
70         [EFL] Support Geolocation
71         https://bugs.webkit.org/show_bug.cgi?id=134439
72
73         Reviewed by Antonio Gomes.
74
75         Add geoclue files in order to enable geolocation for EFL port.
76
77         * PlatformEfl.cmake:
78
79 2014-07-04  Benjamin Poulain  <benjamin@webkit.org>
80
81         CSS JIT: compile :in-range and :out-of-range
82         https://bugs.webkit.org/show_bug.cgi?id=134639
83
84         Reviewed by Andreas Kling.
85
86         The pseudo class :in-range and :out-of-range are trivial non-inlined selectors.
87
88         * css/SelectorChecker.cpp:
89         (WebCore::SelectorChecker::checkOne):
90         * css/SelectorCheckerTestFunctions.h:
91         (WebCore::isInRange):
92         (WebCore::isOutOfRange):
93         * cssjit/SelectorCompiler.cpp:
94         (WebCore::SelectorCompiler::addPseudoClassType):
95
96 2014-07-04  Andreas Kling  <akling@apple.com>
97
98         Fast path for jsStringWithCache() when asked for the same string repeatedly.
99         <https://webkit.org/b/134635>
100
101         Reviewed by Darin Adler.
102
103         * WebCore.exp.in:
104         * bindings/js/JSDOMBinding.cpp:
105         (WebCore::jsStringWithCache): Deleted.
106         * bindings/js/JSDOMBinding.h:
107         (WebCore::JSValueTraits<String>::arrayJSValue):
108         (WebCore::jsStringWithCache): Deleted.
109         * bridge/c/c_utility.cpp:
110         (JSC::Bindings::convertNPVariantToValue):
111         * loader/cache/CachedResourceHandle.h:
112
113 2014-07-04  Zalan Bujtas  <zalan@apple.com>
114
115         Subpixel rendering: ebay.com rotating billboard on the main page has cut off buttons.
116         https://bugs.webkit.org/show_bug.cgi?id=134636
117         <rdar://problem/17529112>
118
119         Reviewed by Darin Adler.
120
121         Missing pixel snapping when clipping the transparency layer for BackgroundBleedUseTransparencyLayer.
122         Clipping needs to take the same snapping strategy as the rest of the painting code.
123
124         Test: fast/borders/border-radius-on-subpixel-position-non-hidpi.html
125
126         * rendering/RenderBox.cpp:
127         (WebCore::RenderBox::paintBoxDecorations):
128
129 2014-05-10  Andreas Kling  <akling@apple.com>
130
131         QualifiedName should use RefPtr<QualifiedNameImpl> internally.
132         <https://webkit.org/b/132796>
133
134         We were not inlining ~QualifiedName() and it was showing up in some
135         profiles (over 1% on dom-attr.html.)
136
137         This patch modernizes QualifiedName a bit by using RefPtr to store
138         the QualifiedNameImpl instead of doing manual ref() and deref()
139         in out-of-line functions.
140
141         Reviewed by Darin Adler.
142
143         * WebCore.exp.in:
144         * dom/QualifiedName.cpp:
145         (WebCore::QNameComponentsTranslator::translate):
146         (WebCore::QualifiedName::QualifiedName):
147         (WebCore::QualifiedName::~QualifiedName): Deleted.
148         (WebCore::QualifiedName::deref): Deleted.
149         * dom/QualifiedName.h:
150         (WebCore::QualifiedName::QualifiedNameImpl::create):
151         (WebCore::QualifiedName::QualifiedName):
152         (WebCore::QualifiedName::isHashTableDeletedValue):
153         (WebCore::QualifiedName::~QualifiedName):
154         (WebCore::QualifiedName::operator=):
155         (WebCore::QualifiedName::impl):
156         (WebCore::QualifiedName::ref): Deleted.
157
158 2014-07-04  Dean Jackson  <dino@apple.com>
159
160         [iOS] [Media] Prevent page zoom if it started in the video element
161         https://bugs.webkit.org/show_bug.cgi?id=134640
162         <rdar://problem/16630794>
163
164         Reviewed by Sam Weinig.
165
166         In r170572 I attempted to prevent the page zoom from happening
167         when the user was attempting to fullscreen the video. That fix was
168         not complete, because it relied on the touchstart event being
169         sent before a gesture event. It turns out this doesn't always happen,
170         so we need to apply the same check in the gesture event - if the
171         gesture began with two fingers on the media, don't do a page zoom.
172         The exception is zooming out, if you've managed to make the video
173         cover the entire screen (also, the pinch-out-of-fullscreen gesture
174         does not get handled by WebKit).
175
176         * Modules/mediacontrols/mediaControlsiOS.js:
177         (ControllerIOS.prototype.handleBaseGestureChange): Add a check to
178         make sure our pinch didn't start in the video element.
179
180 2014-07-04  Hunseop Jeong  <hs85.jeong@samsung.com>
181
182         [CoordinatedGraphics] Use the C++11 syntax to clean-up for loops 
183         https://bugs.webkit.org/show_bug.cgi?id=134594
184
185         Reviewed by Darin Adler.
186
187         Convert a couple of loops to range-based for 
188
189         No change in functionality, no new tests.
190
191         * platform/graphics/TiledBackingStore.cpp:
192         (WebCore::TiledBackingStore::updateTileBuffers):
193         (WebCore::TiledBackingStore::resizeEdgeTiles):
194         (WebCore::TiledBackingStore::setKeepRect):
195         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
196         (WebCore::CompositingCoordinator::~CompositingCoordinator):
197         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
198         (WebCore::CompositingCoordinator::setVisibleContentsRect):
199         (WebCore::CompositingCoordinator::purgeBackingStores):
200         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
201         (WebCore::CoordinatedBackingStore::removeAllTiles):
202         (WebCore::CoordinatedBackingStore::paintToTextureMapper):
203         (WebCore::CoordinatedBackingStore::drawBorder):
204         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
205         (WebCore::CoordinatedBackingStore::commitTileOperations):
206         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
207         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
208         (WebCore::CoordinatedGraphicsScene::commitPendingBackingStoreOperations):
209
210 2014-07-04  Andreas Kling  <akling@apple.com>
211
212         CTTE: ScriptElement always has a HTTPScriptElement or SVGScriptElement.
213         <https://webkit.org/b/134637>
214
215         Have ScriptElement store the pointer to the more specific subclass
216         element as a reference. Also made the constructor protected since
217         nobody should instantiate ScriptElement directly.
218
219         Reviewed by Antti Koivisto.
220
221         * dom/ScriptElement.cpp:
222         (WebCore::ScriptElement::ScriptElement):
223         (WebCore::ScriptElement::childrenChanged):
224         (WebCore::ScriptElement::dispatchErrorEvent):
225         (WebCore::ScriptElement::prepareScript):
226         (WebCore::ScriptElement::requestScript):
227         (WebCore::ScriptElement::executeScript):
228         (WebCore::ScriptElement::notifyFinished):
229         (WebCore::ScriptElement::ignoresLoadRequest):
230         (WebCore::ScriptElement::scriptContent):
231         * dom/ScriptElement.h:
232         (WebCore::ScriptElement::element):
233         * dom/ScriptRunner.cpp:
234         (WebCore::ScriptRunner::queueScriptForExecution):
235         * html/HTMLScriptElement.cpp:
236         (WebCore::HTMLScriptElement::HTMLScriptElement):
237         * svg/SVGScriptElement.cpp:
238         (WebCore::SVGScriptElement::SVGScriptElement):
239
240 2014-07-04  Julien Quint  <pom@graougraou.com>
241
242         input type=range element should only fire change events after committing a  value
243         https://bugs.webkit.org/show_bug.cgi?id=134545
244
245         Reviewed by Dean Jackson.
246
247         A "change" event was fired every time the slider thumb element was dragged
248         by the user. The "change" event is now fired only after the thumb
249         element has stopped moving; previously, both "input" and "change" events
250         where dispatched while changes were being made. This new behavior is
251         consistent with the specification (cf.
252         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#event-input-change),
253         as well as other implementations such as Firefox and Chrome.
254
255         * Modules/mediacontrols/mediaControlsApple.js:
256         (Controller.prototype.createControls): Listen to the "input" event
257         rather than the "change" event for the timeline control in order to
258         keep track of value changes when the user is dragging the thumb.
259         * accessibility/AccessibilitySlider.cpp:
260         (WebCore::AccessibilitySlider::setValue): Dispatch "change" event while
261         setting the new value rather than dispatching later, since setting the
262         value now clears the change flag.
263         * html/RangeInputType.cpp:
264         (WebCore::RangeInputType::setValue): Update the text value of the
265         control in the case when no event is to be dispatched, so that this
266         value can be checked the next time a "change" event dispatch is
267         requested.
268         * html/shadow/SliderThumbElement.cpp:
269         (WebCore::SliderThumbElement::setPositionFromPoint): Removed the
270         dispatch of the "change" event, and no longer track the text value of
271         the element as a result of dispatching a "change" event.
272         (WebCore::SliderThumbElement::stopDragging): Dispatch the "change" event
273         on completing the drag.
274
275 2014-07-04  Andreas Kling  <akling@apple.com>
276
277         CTTE: ApplicationCacheHost always has a DocumentLoader.
278         <https://webkit.org/b/b/128435>
279
280         Have ApplicationCacheHost store the backpointer to its owning
281         DocumentLoader as a reference.
282
283         Reviewed by Sam Weinig.
284
285         * loader/DocumentLoader.cpp:
286         (WebCore::DocumentLoader::DocumentLoader):
287         (WebCore::DocumentLoader::startLoadingMainResource):
288         * loader/appcache/ApplicationCacheHost.cpp:
289         (WebCore::ApplicationCacheHost::ApplicationCacheHost):
290         (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
291         (WebCore::ApplicationCacheHost::selectCacheWithoutManifest):
292         (WebCore::ApplicationCacheHost::selectCacheWithManifest):
293         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
294         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
295         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
296         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
297         (WebCore::ApplicationCacheHost::finishedLoadingMainResource):
298         (WebCore::ApplicationCacheHost::maybeLoadResource):
299         (WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
300         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
301         (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
302         (WebCore::ApplicationCacheHost::stopDeferringEvents):
303         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
304         (WebCore::ApplicationCacheHost::update):
305         (WebCore::ApplicationCacheHost::swapCache):
306         (WebCore::ApplicationCacheHost::abort):
307         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
308         * loader/appcache/ApplicationCacheHost.h:
309         (WebCore::ApplicationCacheHost::documentLoader): Deleted.
310
311 2014-07-04  Antti Koivisto  <antti@apple.com>
312
313         REGRESSION(r159345): Lines are clipped between pages when printing web content from Safari
314         https://bugs.webkit.org/show_bug.cgi?id=134633
315         <rdar://problem/17088936>
316
317         Reviewed by Zalan Bujtas.
318
319         Test: printing/simple-lines-break.html
320
321         * rendering/SimpleLineLayout.cpp:
322         (WebCore::SimpleLineLayout::canUseFor):
323         
324             Disable simple lines if global pagination is enabled.
325             Printing does not currently use flow threads which we already test for.
326
327 2014-07-04  Zan Dobersek  <zdobersek@igalia.com>
328
329         Unreviewed. Fixing the build after r170795.
330
331         Mac didn't like that change as it seems to properly typedef long long to int64_t.
332         That's not the case on 64-bit Linux (for some reason), so I'm changing the type of
333         the two long long variables in FormDataElement to int64_t to avoid any further trouble.
334
335         * platform/network/FormData.h:
336
337 2014-07-03  Brady Eidson  <beidson@apple.com>
338
339         When showing the selection menu, include menu options for all selected phone numbers.
340         <rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
341
342         Reviewed by Tim Horton.
343
344         * English.lproj/Localizable.strings:
345
346         * dom/Range.cpp:
347         (WebCore::rangesOverlap): Fix reversed arguments that caused some types of overlaps to not be detected.
348
349 2014-07-03  Daniel Bates  <dabates@apple.com>
350
351         Add WTF::move()
352         https://bugs.webkit.org/show_bug.cgi?id=134500
353
354         Rubber-stamped by Anders Carlsson.
355
356         Substitute WTF::move() for std::move().
357
358         * Modules/battery/NavigatorBattery.cpp:
359         * Modules/encryptedmedia/MediaKeys.cpp:
360         * Modules/gamepad/NavigatorGamepad.cpp:
361         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
362         * Modules/geolocation/NavigatorGeolocation.cpp:
363         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
364         * Modules/indexeddb/IDBDatabaseBackend.cpp:
365         * Modules/indexeddb/IDBDatabaseBackend.h:
366         [...]
367
368 2014-07-03  Benjamin Poulain  <bpoulain@apple.com>
369
370         [iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
371         https://bugs.webkit.org/show_bug.cgi?id=134582
372
373         Reviewed by Tim Horton.
374
375         * WebCore.exp.in:
376         * platform/ScrollView.h:
377         (WebCore::ScrollView::unobscuredContentSize):
378         * platform/ios/ScrollViewIOS.mm:
379         (WebCore::ScrollView::unobscuredContentRect):
380         (WebCore::ScrollView::setUnobscuredContentSize):
381
382 2014-07-02  Brent Fulgham  <bfulgham@apple.com>
383
384         [Mac] WebKit1 WebView iframe not responding to scroll gestures
385         https://bugs.webkit.org/show_bug.cgi?id=134569
386         <rdar://problem/17309008>
387
388         Reviewed by Simon Fraser.
389
390         New test: platform/mac/fast/scrolling/scroll-iframe-fragment.html
391
392         WK1 scrollable areas are implemented on top of PlatformWidget (i.e., NSView) objects. They only
393         perform a scroll operation if the EventHandler::handleWheelEvent method returns 'false', indicating
394         that the Cocoa layer should do scrolling work. This is in contrast to WK2, where the scrolling is
395         handled separately and we return 'true' from EventHandler::handleWheelEvent to indicate that the
396         scroll event has been handled and that no other work is needed. This mismatch in the meaning of
397         EventHandler::handleWheelEvent means that WK1 views do not properly handle scroll wheel events.
398
399         To correct this, we need to see if we are acting on an Element backed by a PlatformWidget. When we
400         are (the WK1 case) we want to return 'false' to instruct the Cocoa object to do the scroll operation.
401         To implement proper latching behavior in WK1, we must return 'true' in the case where we are latched
402         to a PlatformWidget, and that PlatformWidget did not start the scroll gesture at the edge of
403         the region in the dominant scroll direction.
404
405         Finally, additional logic was needed to determine whether the PlatformWidget is scrolled to the
406         edge in the dominant scroll direction.
407
408         * page/EventHandler.cpp:
409         (WebCore::EventHandler::platformCompleteWheelEvent): Added stub.
410         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added stub.
411         (WebCore::EventHandler::handleWheelEvent): Call new platformCompletePlatformWidgetWheelEvent if the
412         event was handled for a PlatformWidget.
413         * page/EventHandler.h:
414         * page/mac/EventHandlerMac.mm:
415         (WebCore::widgetForEventTarget): Added helper function.
416         (WebCore::scrollViewForEventTarget): Added helper function.
417         (WebCore::eventTargetIsPlatformWidget): Added helper function.
418         (WebCore::EventHandler::platformPrepareForWheelEvents): Check whether we are at a scrolled edge
419         for the NSView (PlatformWidget) case.
420         (WebCore::EventHandler::platformCompleteWheelEvent): Return 'false' when handling WK1-style scrolls.
421         (WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Added. We generally want to
422         return false so the PlatformWidget handles scrolling, except in the case where we are latched to
423         a PlatformWidget, which has already performed its scroll, and we want to avoid propegating a
424         scroll event to an enclosing region.
425
426 2014-07-03  Pratik Solanki  <psolanki@apple.com>
427
428         Preserve old behavior of creating an NSURLRequest of the exact same type as passed to us
429         https://bugs.webkit.org/show_bug.cgi?id=134605
430         <rdar://problem/17544641>
431
432         Reviewed by Andreas Kling.
433
434         We have client code that passes us a subclass of NSURLRequest to load resource. Later when
435         we call willSendRequest, they test to make sure they get an object of the same type. My
436         optimization in r170642 broke this path when I cleared out the NSURLRequest object. We
437         already had code in updateNSURLRequest() that was taking this quirk into account but I broke
438         that. Fix it by reverting to old behavior for such clients.
439
440         No new tests though we need one. I will add it later.
441
442         * platform/network/cf/ResourceRequest.h:
443         * platform/network/cf/ResourceRequestCFNet.cpp:
444         (WebCore::ResourceRequest::doUpdatePlatformRequest):
445         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
446         (WebCore::ResourceRequest::setStorageSession):
447         * platform/network/ios/ResourceRequestIOS.mm:
448         (WebCore::ResourceRequest::updateNSURLRequest):
449         (WebCore::ResourceRequest::clearOrUpdateNSURLRequest):
450
451 2014-07-02  Anders Carlsson  <andersca@apple.com>
452
453         Stop using EncoderAdapter/DecoderAdapter for FormData
454         https://bugs.webkit.org/show_bug.cgi?id=134571
455
456         Reviewed by Andreas Kling.
457
458         * WebCore.exp.in:
459         * platform/network/FormData.cpp:
460         (WebCore::encodeElement): Deleted.
461         (WebCore::decodeElement): Deleted.
462         (WebCore::FormData::encode): Deleted.
463         (WebCore::FormData::decode): Deleted.
464         * platform/network/FormData.h:
465         (WebCore::FormDataElement::encode):
466         (WebCore::FormDataElement::decode):
467         (WebCore::FormData::encode):
468         (WebCore::FormData::decode):
469
470 2014-07-03  Brady Eidson  <beidson@apple.com>
471
472         Selection rects sent to ServicesOverlayController are wrong.
473         <rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
474
475         Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
476
477         * WebCore.exp.in:
478
479         Update the gatherer to keep GapRects separate from LayoutRects:
480         * editing/SelectionRectGatherer.cpp:
481         (WebCore::SelectionRectGatherer::addRects):
482         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
483         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
484         * editing/SelectionRectGatherer.h:
485
486         * page/EditorClient.h:
487         (WebCore::EditorClient::selectionRectsDidChange): Updated to take LayoutRects and GapRects separately.
488
489         Change RenderSelectionInfo to also hang on to the individual rects that formed the final bounding rect:
490         * rendering/RenderSelectionInfo.h:
491         (WebCore::RenderSelectionInfo::RenderSelectionInfo): If the RenderObject is a RenderText, then call
492           collectSelectionRectsForLineBoxes instead of selectionRectForRepaint.
493         (WebCore::RenderSelectionInfo::rects):
494
495         * rendering/RenderText.cpp:
496         (WebCore::RenderText::collectSelectionRectsForLineBoxes): Added
497         (WebCore::RenderText::selectionRectForRepaint):
498         * rendering/RenderText.h:
499
500         * rendering/RenderTextLineBoxes.cpp:
501         (WebCore::RenderTextLineBoxes::collectSelectionRectsForRange): Added
502         * rendering/RenderTextLineBoxes.h:
503
504         * rendering/RenderView.cpp:
505         (WebCore::RenderView::setSubtreeSelection): Add the list of rects to the gatherer instead of just 
506           the bounding rect.
507
508 2014-07-03  Brady Eidson  <beidson@apple.com>
509
510         Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
511         <rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
512
513         Reviewed by Eric Carlson.
514
515         Since WebCore::IconDatabase is not RefCounted there’s no obvious way to keep it alive until it is
516         truly no longer needed.
517
518         This isn’t generally a problem because they are usually a singleton that lasts the lifetime of the process.
519
520         In the WebKit2 case, WebCore::IconDatabases can come and go as their owning WebIconDatabases come and go.
521
522         So we can rely on WebIconDatabase to handle the lifetime appropriately. 
523
524         * loader/icon/IconDatabase.cpp:
525         (WebCore::IconDatabase::close): If the database is actually closed, notify the client.
526         (WebCore::IconDatabase::IconDatabase):
527         (WebCore::IconDatabase::isOpen): Take into account whether there’s any main thread callbacks, plus what
528           is covered by isOpenBesidesMainThreadCallbacks.
529         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks): Take into account whether the sync thread
530           is still running and whether or not the database file is still open.
531         (WebCore::IconDatabase::checkClosedAfterMainThreadCallback): Checks to see if the database has just
532           become 100% closed and - if so - notify the client.
533         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread): Updated to increment the main thread
534           callback count and to call checkClosedAfterMainThreadCallback when done.
535         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread): Ditto.
536         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread): Ditto.
537         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread): Ditto.
538         * loader/icon/IconDatabase.h:
539
540         * loader/icon/IconDatabaseClient.h:
541         (WebCore::IconDatabaseClient::didClose): Added. For the IconDatabase to tell its client it is 100% closed.
542
543 2014-07-03  Chris Fleizach  <cfleizach@apple.com>
544
545         AX: VoiceOver does not read aria-expanded attribute on controls in Safari
546         https://bugs.webkit.org/show_bug.cgi?id=134527
547
548         Reviewed by Mario Sanchez Prada.
549
550         Expose whether the ARIA expanded property is present or not.
551
552         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
553         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
554
555 2014-07-02  Jon Honeycutt  <jhoneycutt@apple.com>
556
557         Removing an element with CSS -webkit-overflow-scrolling: touch breaks
558         subsequent touch events
559
560         <https://bugs.webkit.org/show_bug.cgi?id=134584>
561         <rdar://problem/17202021>
562
563         This issue is caused by the order of teardown for RenderLayers.
564
565         RenderLayer clears its m_backing in its destructor, calling the
566         RenderLayerBacking destructor. The RenderLayerBacking destructor calls
567         RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
568         access the RenderLayer's backing that has already been cleared. This
569         causes us to skip the call to ChromeClient::removeScrollingLayer(),
570         resulting in a stale view that can block touch events.
571
572         Reviewed by Simon Fraser.
573
574         * rendering/RenderLayerBacking.cpp:
575         (WebCore::RenderLayerBacking::updateScrollingLayers):
576         When calling willRemoveScrollingLayerWithBacking(), pass both the layer
577         and the RenderLayerBacking.
578
579         * rendering/RenderLayerCompositor.cpp:
580         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
581         Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
582         backing might have already been cleared.
583         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.
584
585         * rendering/RenderLayerCompositor.h:
586         Renamed willRemoveScrollingLayer() to
587         willRemoveScrollingLayerWithBacking() and added a parameter.
588
589 2014-07-01  Mark Rowe  <mrowe@apple.com>
590
591         Ensure that the WebKit bundle version in the user agent string continues to match the current format.
592         <https://webkit.org/b/134524> / <rdar://problem/17447771>
593
594         Reviewed by Simon Fraser.
595
596         * page/cocoa/UserAgent.h:
597         * page/cocoa/UserAgent.mm:
598         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
599         to the file.
600         (WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
601         string to three components.
602         * page/ios/UserAgentIOS.mm:
603         (WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
604         * page/mac/UserAgentMac.mm:
605         (WebCore::standardUserAgentWithApplicationName): Ditto.
606
607 2014-07-01  Mark Rowe  <mrowe@apple.com>
608
609         <https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
610
611         Reviewed by Simon Fraser.
612
613         * page/cocoa/UserAgent.h:
614         * page/cocoa/UserAgent.mm:
615         (WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
616         * page/ios/UserAgentIOS.mm:
617         (WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
618         before including it in the user agent string.
619         * page/mac/UserAgentMac.mm:
620         (WebCore::standardUserAgentWithApplicationName): Ditto.
621
622 2014-07-02  Mark Rowe  <mrowe@apple.com>
623
624         <https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
625
626         Reviewed by Simon Fraser.
627
628         * WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
629         * page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
630         * page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
631         Move systemMarketingVersionForUserAgentString to a location where it can be shared between
632         Mac and iOS.
633         * page/ios/UserAgentIOS.mm:
634         (WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
635         * page/mac/UserAgentMac.mm:
636         * platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
637         * platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
638         Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
639         codepath for iOS as well.
640
641 2014-07-02  Anders Carlsson  <andersca@apple.com>
642
643         Remove keyed coding from FormData
644         https://bugs.webkit.org/show_bug.cgi?id=134565
645
646         Reviewed by Tim Horton.
647
648         * platform/network/FormData.cpp:
649         (WebCore::encodeElement): Deleted.
650         (WebCore::decodeElement): Deleted.
651         (WebCore::FormData::encode): Deleted.
652         (WebCore::FormData::decode): Deleted.
653         * platform/network/FormData.h:
654
655 2014-07-02  Anders Carlsson  <andersca@apple.com>
656
657         Get rid of the HistoryItem encoding/decoding in WebCore
658         https://bugs.webkit.org/show_bug.cgi?id=134564
659
660         Reviewed by Beth Dakin.
661
662         * WebCore.exp.in:
663         * history/HistoryItem.cpp:
664         (WebCore::HistoryItem::encodeBackForwardTree): Deleted.
665         (WebCore::encodeRect): Deleted.
666         (WebCore::encodeSize): Deleted.
667         (WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
668         (WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
669         (WebCore::decodeRect): Deleted.
670         (WebCore::decodeSize): Deleted.
671         (WebCore::HistoryItem::decodeBackForwardTree): Deleted.
672         * history/HistoryItem.h:
673
674 2014-07-02  Alex Christensen  <achristensen@webkit.org>
675
676         [WebGL] Fix crash when glsl expressions are too complex.
677         https://bugs.webkit.org/show_bug.cgi?id=134554
678         <rdar://problem/17540462>
679
680         Reviewed by Dean Jackson.
681         
682         This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.
683
684         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
685         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
686         Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.
687
688 2014-07-02  Benjamin Poulain  <benjamin@webkit.org>
689
690         WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
691         https://bugs.webkit.org/show_bug.cgi?id=134552
692
693         Reviewed by Alex Christensen.
694
695         Little cleanup:
696         -The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
697         -Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
698          size everywhere, no functional change.
699         -Same idea for the stack: welcome StackReferenceVector!
700
701         * cssjit/FunctionCall.h:
702         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
703         Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
704         from mistakes.
705
706         * cssjit/RegisterAllocator.h:
707         (WebCore::RegisterAllocator::allocatedRegisters):
708         * cssjit/SelectorCompiler.cpp:
709         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
710         Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
711         calleeSavedRegisterStackReferences to always overallocate.
712         The code generator is never on the heap, so that should not change anything.
713
714         * cssjit/StackAllocator.h:
715         (WebCore::StackAllocator::push):
716         (WebCore::StackAllocator::pop):
717
718 2014-07-02  Dan Bernstein  <mitz@apple.com>
719
720         Remove some code only needed for versions of Safari that are no longer supported
721         https://bugs.webkit.org/show_bug.cgi?id=134537
722
723         Reviewed by Anders Carlsson.
724
725         * bindings/objc/DOMHTML.mm:
726         (-[DOMHTMLInputElement _rectOnScreen]): Deleted.
727         (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
728         (-[DOMHTMLInputElement _selectedRange]): Deleted.
729         * bindings/objc/DOMPrivate.h:
730         * editing/EditorCommand.cpp:
731         (WebCore::createCommandMap):
732
733 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
734
735         [GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
736         https://bugs.webkit.org/show_bug.cgi?id=134548
737
738         Reviewed by Philippe Normand.
739
740         Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
741         since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>
742
743         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
744
745 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
746
747         [GTK] Unstable headers should include webkitdomdefines-unstable.h
748         https://bugs.webkit.org/show_bug.cgi?id=134540
749
750         Reviewed by Martin Robinson.
751
752         Instead of the class header that can only be included from webkitdom.h.
753
754         * bindings/scripts/CodeGeneratorGObject.pm:
755         (WriteData):
756
757 2014-07-02  Mario Sanchez Prada  <mario.prada@samsung.com>
758
759         REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
760         https://bugs.webkit.org/show_bug.cgi?id=134399
761
762         Reviewed by Chris Fleizach.
763
764         Check that the value of optionIndex passed as a parameter is valid
765         before calling didUpdateActiveOption() over the item of the menu
766         list, to prevent crashes in platforms where renderers (and therefore
767         accessibility objects) might not be created for items at the time
768         of calling AccessibilityMenuList::didUpdateActiveOption().
769
770         * accessibility/AccessibilityMenuList.cpp:
771         (WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.
772
773 2014-07-02  Carlos Garcia Campos  <cgarcia@igalia.com>
774
775         [GTK] Do not add forward declaration of class struct for interfaces
776         https://bugs.webkit.org/show_bug.cgi?id=134297
777
778         Reviewed by Martin Robinson.
779
780         * PlatformGTK.cmake: Make files generated by
781         gobject-generate-headers.pl script depend on it.
782         * bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
783         * bindings/gobject/WebKitDOMNodeFilter.h: Ditto
784         * bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
785         * bindings/scripts/gobject-generate-headers.pl: Use Iface instead
786         of Class suffix for interfaces.
787
788 2014-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
789
790         [GTK] XPathNSResolver should be exposed as an interface instead of as a class
791         https://bugs.webkit.org/show_bug.cgi?id=134028
792
793         Reviewed by Gustavo Noronha Silva.
794
795         Add custom implementation of WebKitDOMXPathNSResolver to expose it
796         as an interface instead of a class. It also includes an internal
797         default implementation of the interface to support methods that
798         create a XPathNSResolver using the native implementation.
799
800         * PlatformGTK.cmake: Add new files to compilation.
801         * bindings/gobject/GObjectXPathNSResolver.cpp: Added.
802         (WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
803         (WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
804         webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
805         * bindings/gobject/GObjectXPathNSResolver.h: Added.
806         (WebCore::GObjectXPathNSResolver::create):
807         (WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
808         a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
809         * bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
810         (webkit_dom_xpath_ns_resolver_default_init):
811         (webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
812         (webkitDOMNativeXPathNSResolverFinalize):
813         (webkitDOMNativeXPathNSResolverConstructor):
814         (webkit_dom_native_xpath_ns_resolver_init):
815         (webkit_dom_native_xpath_ns_resolver_class_init):
816         (webkitDOMNativeXPathNSResolverLookupNamespaceURI):
817         (webkitDOMXPathNSResolverIfaceInit):
818         (WebKit::core): Return the native XPathNSResolver when using the
819         internal implementation or create a custom XPathNSResolver when
820         using a user provided WebKitDOMXPathNSResolver.
821         (WebKit::kit):
822         * bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
823         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
824         * bindings/scripts/CodeGeneratorGObject.pm:
825         (GenerateFunction): Add exceptions for XPathNSResolver since
826         the core method returns a PassRefPtr.
827
828 2014-07-01  Frédéric Wang  <fred.wang@free.fr>
829
830         The OpenType MATH table is not read on Mac
831         https://bugs.webkit.org/show_bug.cgi?id=133569
832
833         Reviewed by Chris Fleizach.
834
835         An incorrect tag format is used to load the OpenType MATH table on Mac.
836         This commit makes the format consistent with what is used for other tables on Mac.
837         This will allow to load the MATH table and to use it for the MathML rendering.
838
839         No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.
840
841         * platform/graphics/opentype/OpenTypeMathData.cpp:
842
843 2014-07-01  Alex Christensen  <achristensen@webkit.org>
844
845         [Win64] Unreviewed build fix.
846
847         * WebCore.vcxproj/WebCore.vcxproj:
848         Exclude CA files from 32 and 64 bit WinCairo builds.
849         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
850         Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.
851
852 2014-07-01  Alex Christensen  <achristensen@webkit.org>
853
854         Reduce dynamic memory allocation in css jit.
855         https://bugs.webkit.org/show_bug.cgi?id=134416
856
857         Reviewed by Benjamin Poulain.
858
859         * cssjit/FunctionCall.h:
860         (WebCore::FunctionCall::saveAllocatedRegisters):
861         * cssjit/RegisterAllocator.h:
862         * cssjit/SelectorCompiler.cpp:
863         (WebCore::SelectorCompiler::addPseudoClassType):
864         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
865         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
866         * cssjit/StackAllocator.h:
867         (WebCore::StackAllocator::push):
868         (WebCore::StackAllocator::pop):
869         Use inlineCapacity template parameter to reduce malloc calls.
870         I use 32 as the inline capacity for non-register related vectors because that
871         is probably big enough for the selector compiler, and if it is not then a malloc
872         call will not be significant because the selector is very complex.
873
874 2014-07-01  Eric Carlson  <eric.carlson@apple.com>
875
876         WebVTT percentage value can be a float
877         https://bugs.webkit.org/show_bug.cgi?id=134511
878
879         Reviewed by Brent Fulgham.
880
881         No new tests, existing tests modified.
882
883         * html/track/TextTrackCueGeneric.cpp:
884         (WebCore::TextTrackCueGeneric::setLine): int -> double.
885         (WebCore::TextTrackCueGeneric::setPosition): Ditto.
886         * html/track/TextTrackCueGeneric.h:
887
888         * html/track/VTTCue.cpp:
889         (WebCore::VTTCue::setLine): Ditto.
890         (WebCore::VTTCue::setPosition):  Ditto.
891         (WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
892         (WebCore::scanPercentage): Deleted.
893         * html/track/VTTCue.h:
894
895         * html/track/VTTScanner.cpp:
896         (WebCore::VTTScanner::scanFloat): Support negative values.
897         * html/track/VTTScanner.h:
898
899         * html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
900         * html/track/WebVTTParser.h:
901
902         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
903         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
904             reference rather than a pointer.
905         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
906         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
907             we are asking the client to delete the cue because the client will have already deleted
908             it when status when to GenericCueData::Complete.
909         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
910
911 2014-07-01  Simon Fraser  <simon.fraser@apple.com>
912
913         Improve behavior of position:sticky on zoomed pages
914         https://bugs.webkit.org/show_bug.cgi?id=134535
915         <rdar://problem/12898829>
916
917         Reviewed by Dean Jackson.
918
919         Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
920         
921         Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
922         since all the other math happens in unscaled coordinates.
923
924         * rendering/RenderBoxModelObject.cpp:
925         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
926
927 2014-07-01  Alex Christensen  <achristensen@webkit.org>
928
929         [WebGL] Fix PVRTC extension.
930         https://bugs.webkit.org/show_bug.cgi?id=134525
931
932         Reviewed by Dean Jackson.
933
934         * html/canvas/WebGLRenderingContext.cpp:
935         (WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
936         Remove the return false which I mistakenly committed in r170128
937         and make the gl error match the S3TC error and the khronos test.
938
939 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
940
941         AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
942         https://bugs.webkit.org/show_bug.cgi?id=133875
943
944         Reviewed by Enrica Casucci.
945
946         Support the toggle button type in iOS.
947
948         Test: platform/ios-sim/accessibility/toggle-button.html
949
950         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
951         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
952         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
953         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
954
955 2014-07-01  Dean Jackson  <dino@apple.com>
956
957         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
958         https://bugs.webkit.org/show_bug.cgi?id=134513
959         <rdar://problem/12078860>
960         <rdar://problem/16745393>
961
962         Reviewed by Tim Horton.
963
964         Subsampled images (e.g. JPEG) were not consistently using
965         their original dimensions and subsampled dimensions. This caused
966         things like texImage2D to pack the pixels incorrectly, or drawImage
967         to squish the rendering.
968
969         Renamed m_scale to m_subsamplingScale on FrameData.
970
971         Tests: fast/canvas/image-potential-subsample.html
972                fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
973
974         * platform/graphics/BitmapImage.cpp:
975         (WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
976         (WebCore::BitmapImage::frameAtIndex): Ditto.
977         * platform/graphics/BitmapImage.h:
978         (WebCore::FrameData::FrameData): Ditto.
979         * platform/graphics/cg/BitmapImageCG.cpp:
980         (WebCore::FrameData::clear): Ditto.
981         (WebCore::BitmapImage::BitmapImage): Ditto.
982         (WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
983         rather than assuming the srcRect accurately reflects how many pixels we have
984         in the Bitmap.
985         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
986         * platform/graphics/cg/GraphicsContext3DCG.cpp:
987         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
988         time we just ask the image decoder to take into account the subsampled size
989         when it is "generating" a frame, causing it to use the bitmap data it has already
990         decoded.
991
992 2014-07-01  Joseph Pecoraro  <pecoraro@apple.com>
993
994         Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
995         https://bugs.webkit.org/show_bug.cgi?id=133818
996
997         Reviewed by Beth Dakin.
998
999         * inspector/InspectorOverlay.cpp:
1000         (WebCore::InspectorOverlay::update):
1001         Take the topContentInset into account when sizing the InspectorOverlay's FrameView.
1002
1003 2014-07-01  Chris Fleizach  <cfleizach@apple.com>
1004
1005         AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
1006         https://bugs.webkit.org/show_bug.cgi?id=134492
1007
1008         Reviewed by Andreas Kling.
1009
1010         Support the indeterminate attribute in AX code.
1011
1012         Test: Update existing test: accessibility/aria-checked-mixed-value
1013
1014         * accessibility/AccessibilityObject.cpp:
1015         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1016
1017 2014-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
1018
1019         Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
1020         https://bugs.webkit.org/show_bug.cgi?id=133883
1021
1022         Reviewed by Enrica Casucci.
1023
1024         enclosingDeletableElement() makes sure that the element's container is editable, but not
1025         that it is capable of having content inside it (like how a <br> can't).
1026
1027         No new tests. I don't think this is testable because it requires setting some state in System Preferences.
1028
1029         * editing/DeleteButtonController.cpp:
1030         (WebCore::enclosingDeletableElement):
1031
1032 2014-07-01  Alex Christensen  <achristensen@webkit.org>
1033
1034         [iOS] Unreviewed build fix after r170640.
1035
1036         * page/EditorClient.h:
1037         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
1038         Add ifdefs to make everything compile and link.
1039
1040 2014-07-01  Daniel Bates  <dabates@apple.com>
1041
1042         Remove unnecessary calls to std::move()
1043         https://bugs.webkit.org/show_bug.cgi?id=134493
1044
1045         Reviewed by Anders Carlsson.
1046
1047         * Modules/encryptedmedia/CDM.cpp:
1048         (WebCore::CDM::CDM):
1049         * css/CSSGrammar.y.in:
1050         * css/CSSPrimitiveValue.cpp:
1051         (WebCore::CSSPrimitiveValue::formatNumberValue):
1052         * css/MediaQuery.cpp:
1053         (WebCore::MediaQuery::MediaQuery):
1054         * platform/graphics/mac/FontMac.mm:
1055         (WebCore::Font::dashesForIntersectionsWithRect):
1056
1057 2014-07-01  Zalan Bujtas  <zalan@apple.com>
1058
1059         Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
1060         https://bugs.webkit.org/show_bug.cgi?id=134491
1061
1062         Reviewed by Simon Fraser.
1063
1064         Do not early round geometry values, while computing background image position. It changes the final
1065         subpixel values and that could lead to wrong snap positions.
1066         pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.
1067
1068         Test: fast/backgrounds/background-image-size-double-rounding.html
1069
1070         * rendering/RenderBoxModelObject.cpp:
1071         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1072
1073 2014-07-01  Pratik Solanki  <psolanki@apple.com>
1074
1075         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
1076         https://bugs.webkit.org/show_bug.cgi?id=134441
1077
1078         Reviewed by Andreas Kling.
1079
1080         No new tests. Should be covered by existing tests.
1081
1082         * platform/network/cf/ResourceRequest.h:
1083         (WebCore::ResourceRequest::ResourceRequest):
1084         (WebCore::ResourceRequest::encodingRequiresPlatformData):
1085         * platform/network/cf/ResourceRequestCFNet.cpp:
1086         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1087         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1088         (WebCore::ResourceRequest::setStorageSession):
1089         * platform/network/cocoa/ResourceRequestCocoa.mm:
1090         (WebCore::ResourceRequest::nsURLRequest):
1091
1092 2014-07-01  Brady Eidson  <beidson@apple.com>
1093
1094         Combine the Telephone and Selection overlay controllers, updating UI behavior.
1095         https://bugs.webkit.org/show_bug.cgi?id=134461
1096
1097         Reviewed by Tim Horton.
1098
1099         * WebCore.exp.in:
1100
1101         * dom/Range.cpp:
1102         (WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
1103         * dom/Range.h:
1104
1105 2014-07-01  Antti Koivisto  <antti@apple.com>
1106
1107         REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
1108         https://bugs.webkit.org/show_bug.cgi?id=134489
1109
1110         Reviewed by Zalan Bujtas.
1111
1112         Test: fullscreen/full-screen-plugin.html
1113
1114         It is difficult to restore the render tree correctly in all cases after removing a full screen
1115         renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
1116         Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.
1117         
1118         With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.
1119
1120         * dom/Document.cpp:
1121         (WebCore::unwrapFullScreenRenderer):
1122         
1123             Force reconstruction conditionally.
1124
1125         (WebCore::Document::webkitWillEnterFullScreenForElement):
1126         (WebCore::Document::webkitDidExitFullScreenForElement):
1127         * rendering/RenderFullScreen.cpp:
1128         (WebCore::RenderFullScreen::wrapRenderer):
1129         (WebCore::RenderFullScreen::unwrapRenderer):
1130         
1131             Deal with the simple case of single child, possibly in anonymous wrapper.
1132             In other cases request reconstruction.
1133             This is covered by the existing fullscreen tests.
1134
1135         * rendering/RenderFullScreen.h:
1136
1137 2014-07-01  Zan Dobersek  <zdobersek@igalia.com>
1138
1139         Remove remaining Vector<> copies in WebCore accessibility code
1140         https://bugs.webkit.org/show_bug.cgi?id=133263
1141
1142         Reviewed by Darin Adler.
1143
1144         * accessibility/AXObjectCache.cpp:
1145         (WebCore::AXObjectCache::notificationPostTimerFired): Don't copy the Vector member and
1146         then clear it -- move it into the local variable instead.
1147         * accessibility/AccessibilityNodeObject.cpp:
1148         (WebCore::AccessibilityNodeObject::ariaLabeledByText): Move the axElements Vector into
1149         the AccessibilityText constructor.
1150         (WebCore::AccessibilityNodeObject::stringValue): Create a const reference to the Vector of
1151         HTMLSelectElement's list items instead of copying it.
1152         * accessibility/AccessibilityObject.h:
1153         (WebCore::AccessibilityText::AccessibilityText): Take the Vector parameter by non-const
1154         value and move it into the member variable.
1155         * accessibility/AccessibilityRenderObject.cpp: 
1156         (WebCore::AccessibilityRenderObject::stringValue): Create a const reference to the Vector
1157         of HTMLSelectElement's list items instead of copying it.
1158         (WebCore::AccessibilityRenderObject::ariaSelectedRows): Wrap the AccessibilityChildrenVector
1159         iteration in a lambda. Use it to iterate over either the newly-constructed Vector (in case
1160         the object has the tree role) or the reference to the vector returned by
1161         AccessibilityTable::rows() (in case the object is an AccessibilityTable instance).
1162
1163 2014-06-30  Commit Queue  <commit-queue@webkit.org>
1164
1165         Unreviewed, rolling out r170605.
1166         https://bugs.webkit.org/show_bug.cgi?id=134484
1167
1168         The changes cause crashes on ARM64 (Requested by benjaminp on
1169         #webkit).
1170
1171         Reverted changeset:
1172
1173         "Reduce dynamic memory allocation in css jit."
1174         https://bugs.webkit.org/show_bug.cgi?id=134416
1175         http://trac.webkit.org/changeset/170605
1176
1177 2014-06-30  Anders Carlsson  <andersca@apple.com>
1178
1179         Change the AddBackForwardItem message to take a page state object
1180         https://bugs.webkit.org/show_bug.cgi?id=134475
1181
1182         Reviewed by Andreas Kling.
1183
1184         * WebCore.exp.in:
1185
1186 2014-06-30  Benjamin Poulain  <benjamin@webkit.org>
1187
1188         [iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
1189         https://bugs.webkit.org/show_bug.cgi?id=134471
1190         <rdar://problem/17513542>
1191
1192         Reviewed by Enrica Casucci.
1193
1194         UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
1195         since the page has no way of overriding that behavior.
1196
1197         This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
1198         by default for those object, and enabled for images that are in a link.
1199
1200         * css/html.css:
1201         (applet, embed, object, img):
1202         (:-webkit-any-link img):
1203
1204 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
1205
1206         All Indic text is rendered as boxes on iOS
1207         https://bugs.webkit.org/show_bug.cgi?id=134464
1208
1209         Reviewed by Simon Fraser.
1210
1211         I made a typo in r170207.
1212
1213         Test: fast/text/indic.html
1214
1215         * platform/graphics/ios/FontCacheIOS.mm:
1216         (WebCore::languageSpecificFallbackFont):
1217
1218 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
1219
1220         [iOS] languageSpecificFallbackFont() is not consistent
1221         https://bugs.webkit.org/show_bug.cgi?id=134473
1222
1223         Reviewed by Darin Adler.
1224
1225         It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.
1226
1227         No tests because there is no behavior change.
1228
1229         * platform/graphics/ios/FontCacheIOS.mm:
1230         (WebCore::languageSpecificFallbackFont):
1231
1232 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
1233
1234         [Win] Unreviewed gardening.
1235
1236         * WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
1237         and JSFileReaderSync multiple times.
1238
1239 2014-06-30  Daniel Bates  <dabates@apple.com>
1240
1241         Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
1242         https://bugs.webkit.org/show_bug.cgi?id=134470
1243
1244         Reviewed by Anders Carlsson.
1245
1246         Currently we always copy construct the captured std::function object when calling callOnMainThread()
1247         in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
1248         const in a lambda expression's body by default. That is, the std::function object is captured as const.
1249         Instead, we should mark this lambda expression as mutable so the captured std::function object is
1250         non-const and hence we can use move semantics when passing it to callOnMainThread().
1251
1252         * page/scrolling/ScrollingThread.cpp:
1253         (WebCore::ScrollingThread::dispatchBarrier):
1254
1255 2014-06-30  Anders Carlsson  <andersca@apple.com>
1256
1257         Adopt the legacy session decoding inside WebPage::restoreSession for now
1258         https://bugs.webkit.org/show_bug.cgi?id=134465
1259
1260         Reviewed by Sam Weinig.
1261
1262         * WebCore.exp.in:
1263
1264 2014-06-30  Commit Queue  <commit-queue@webkit.org>
1265
1266         Unreviewed, rolling out r170578.
1267         https://bugs.webkit.org/show_bug.cgi?id=134462
1268
1269         causes assertions loading nytimes.com on iOS (Requested by
1270         smfr on #webkit).
1271
1272         Reverted changeset:
1273
1274         "Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
1275         https://bugs.webkit.org/show_bug.cgi?id=134441
1276         http://trac.webkit.org/changeset/170578
1277
1278 2014-06-30  Alex Christensen  <achristensen@webkit.org>
1279
1280         Reduce dynamic memory allocation in css jit.
1281         https://bugs.webkit.org/show_bug.cgi?id=134416
1282
1283         Reviewed by Benjamin Poulain.
1284
1285         * cssjit/FunctionCall.h:
1286         (WebCore::FunctionCall::FunctionCall):
1287         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
1288         * cssjit/RegisterAllocator.h:
1289         * cssjit/SelectorCompiler.cpp:
1290         (WebCore::SelectorCompiler::addPseudoClassType):
1291         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
1292         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1293         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1294         Use inlineCapacity template parameter to reduce malloc calls.
1295         I use 16 and 32 as the inline capacity for non-register related vectors because that
1296         is probably big enough for the selector compiler, and if it is not then a malloc
1297         call will not be significant because the selector is very complex.
1298         * cssjit/StackAllocator.h:
1299         (WebCore::StackAllocator::push):
1300         Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.
1301
1302 2014-06-30  Alex Christensen  <achristensen@webkit.org>
1303
1304         Use non-thumb registers in armv7 css jit.
1305         https://bugs.webkit.org/show_bug.cgi?id=134450
1306
1307         Reviewed by Geoff Garen.
1308
1309         * cssjit/RegisterAllocator.h:
1310         (WebCore::RegisterAllocator::isValidRegister):
1311         (WebCore::RegisterAllocator::isCallerSavedRegister):
1312         Use additional general purpose registers.
1313         * cssjit/SelectorCompiler.cpp:
1314         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
1315         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1316         Always succeed when compiling css selectors.
1317
1318 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
1319
1320         Tiles on bottom of screen are not always allocated when necessary
1321         https://bugs.webkit.org/show_bug.cgi?id=134272
1322
1323         Reviewed by Simon Fraser.
1324
1325         The initial visibleRect is in the coordinate of the root layer, so its origin
1326         is at the top left of the view. The initial rect we were using doesn't
1327         include the contents inset, so it was too short, which was causing tiles near
1328         the bottom of the screen to not always be allocated if the tile threshold was
1329         close to the bottom of the view. Instead, we want to include the contents
1330         inset size so the visible rect includes the entire view.
1331         GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
1332         the visible rect into the tiled layer's coordinate system, at which point it
1333         is used for visible tile logic.
1334
1335         Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html
1336
1337         * platform/graphics/ca/TileCoverageMap.cpp:
1338         (WebCore::TileCoverageMap::update):
1339         * rendering/RenderLayerCompositor.cpp:
1340         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1341
1342 2014-06-30  Brent Fulgham  <bfulgham@apple.com>
1343
1344         [Win] Unreviewed project gardening.
1345
1346         * WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
1347         files appear in appropriate places in project view.
1348         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1349
1350 2014-06-30  Zalan Bujtas  <zalan@apple.com>
1351
1352         Remove redundant repaintCompositedLayers() parameter and its dependencies.
1353         https://bugs.webkit.org/show_bug.cgi?id=134431
1354
1355         Reviewed by Darin Adler.
1356
1357         No change in functionality.
1358
1359         * rendering/RenderLayer.cpp:
1360         (WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
1361         (WebCore::RenderLayer::convertToLayerCoords): Deleted.
1362         * rendering/RenderLayer.h:
1363         * rendering/RenderLayerCompositor.cpp:
1364         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
1365         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
1366         * rendering/RenderLayerCompositor.h:
1367
1368 2014-06-30  Alex Christensen  <achristensen@webkit.org>
1369
1370         Remove webkit prefix from pointer lock.
1371         https://bugs.webkit.org/show_bug.cgi?id=134312
1372
1373         Reviewed by Dean Jackson.
1374
1375         * dom/Document.cpp:
1376         (WebCore::Document::exitPointerLock):
1377         (WebCore::Document::pointerLockElement):
1378         (WebCore::Document::webkitExitPointerLock): Deleted.
1379         (WebCore::Document::webkitPointerLockElement): Deleted.
1380         * dom/Document.h:
1381         * dom/Document.idl:
1382         * dom/Element.cpp:
1383         (WebCore::Element::requestPointerLock):
1384         (WebCore::Element::webkitRequestPointerLock): Deleted.
1385         * dom/Element.h:
1386         * dom/Element.idl:
1387         * dom/EventNames.h:
1388         * dom/MouseEvent.idl:
1389         * dom/MouseRelatedEvent.h:
1390         (WebCore::MouseRelatedEvent::movementX):
1391         (WebCore::MouseRelatedEvent::movementY):
1392         (WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
1393         (WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
1394         * page/PointerLockController.cpp:
1395         (WebCore::PointerLockController::PointerLockController):
1396         Initialize all data members.
1397         (WebCore::PointerLockController::requestPointerLock):
1398         (WebCore::PointerLockController::didAcquirePointerLock):
1399         (WebCore::PointerLockController::didNotAcquirePointerLock):
1400         (WebCore::PointerLockController::didLosePointerLock):
1401
1402 2014-06-30  Myles C. Maxfield  <mmaxfield@apple.com>
1403
1404         U16_IS_SURROGATE should not be called with a UChar32
1405         https://bugs.webkit.org/show_bug.cgi?id=134440
1406
1407         Reviewed by Darin Adler.
1408
1409         No new tests because there is no behavior change.
1410
1411         * platform/graphics/mac/ComplexTextController.cpp:
1412         (WebCore::advanceByCombiningCharacterSequence):
1413
1414 2014-06-30  Ryuan Choi  <ryuan.choi@samsung.com>
1415
1416         [EFL] Remove m_evasObject from Widget
1417         https://bugs.webkit.org/show_bug.cgi?id=134442
1418
1419         Reviewed by Gyuyoung Kim.
1420
1421         Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
1422         in the Widget.cpp because it's not used for WebKit2/Efl.
1423
1424         * platform/Widget.h:
1425         (WebCore::Widget::evasObject): Deleted.
1426         * platform/efl/ScrollbarEfl.cpp:
1427         Removed WebKit1/Efl specific code which uses m_evasObject.
1428         It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
1429         (WebCore::ScrollbarEfl::ScrollbarEfl):
1430         (WebCore::ScrollbarEfl::~ScrollbarEfl):
1431         (WebCore::ScrollbarEfl::setParent):
1432         (WebCore::ScrollbarEfl::frameRectsChanged):
1433         (WebCore::ScrollbarEfl::invalidate):
1434         (ScrollbarEfl::ScrollbarEfl): Deleted.
1435         (ScrollbarEfl::~ScrollbarEfl): Deleted.
1436         (scrollbarEflEdjeMessage): Deleted.
1437         (ScrollbarEfl::setParent): Deleted.
1438         (ScrollbarEfl::updateThumbPosition): Deleted.
1439         (ScrollbarEfl::updateThumbProportion): Deleted.
1440         (ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
1441         (ScrollbarEfl::frameRectsChanged): Deleted.
1442         (ScrollbarEfl::invalidate): Deleted.
1443         * platform/efl/ScrollbarEfl.h:
1444         Removed unnecessary methods. In addition, applied final, override keyword.
1445         (WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
1446         (WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
1447         (WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
1448         (WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
1449         * platform/efl/WidgetEfl.cpp:
1450         (WebCore::Widget::Widget):
1451         (WebCore::Widget::setEvasObject): Deleted.
1452
1453 2014-06-30  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1454
1455         Fix deprecated warning with bison 3
1456         https://bugs.webkit.org/show_bug.cgi?id=133791
1457
1458         Reviewed by Csaba Osztrogonác.
1459
1460         No new tests because no functional changes.
1461
1462         * css/CSSGrammar.y.in:
1463         * xml/XPathGrammar.y:
1464
1465 2014-06-30  Jaehun Lim  <ljaehun.lim@samsung.com>
1466
1467         Remove HarfBuzzShaper::setDrawRange()
1468         https://bugs.webkit.org/show_bug.cgi?id=134243
1469
1470         Reviewed by Gyuyoung Kim.
1471
1472         setDrawRange() is not used anywhere. Remove it.
1473         And m_fromIndex and m_toIndex are changed by only setDrawRange().
1474         So remove them too and use the default values instead of them.
1475
1476         No new tests, no behavior changes.
1477
1478         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1479         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1480         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
1481             currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
1482         (WebCore::HarfBuzzShaper::setDrawRange): Deleted.
1483         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
1484
1485 2014-06-29  Pratik Solanki  <psolanki@apple.com>
1486
1487         Create NSURLRequest lazily when USE(CFNETWORK) is enabled
1488         https://bugs.webkit.org/show_bug.cgi?id=134441
1489
1490         Reviewed by Sam Weinig.
1491
1492         No new tests. Should be covered by exsting tests.
1493
1494         * platform/network/cf/ResourceRequest.h:
1495         (WebCore::ResourceRequest::ResourceRequest):
1496         * platform/network/cf/ResourceRequestCFNet.cpp:
1497         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1498         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1499         (WebCore::ResourceRequest::setStorageSession):
1500         * platform/network/cocoa/ResourceRequestCocoa.mm:
1501         (WebCore::ResourceRequest::nsURLRequest):
1502
1503 2014-06-29  Ryuan Choi  <ryuan.choi@samsung.com>
1504
1505         [EFL] Remove netscape plugin implementation from WebCore
1506         https://bugs.webkit.org/show_bug.cgi?id=134438
1507
1508         Reviewed by Gyuyoung Kim.
1509
1510         Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.
1511
1512         * PlatformEfl.cmake:
1513         * plugins/efl/PluginPackageEfl.cpp: Removed.
1514         * plugins/efl/PluginViewEfl.cpp: Removed.
1515         * plugins/x11/PluginViewX11.cpp: Removed.
1516         This file is to share common code between WebKit1/Efl and WebKit1/GTk.
1517         Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.
1518
1519 2014-06-29  Yoav Weiss  <yoav@yoav.ws>
1520
1521         Add support for HTMLImageElement's sizes attribute
1522         https://bugs.webkit.org/show_bug.cgi?id=133620
1523
1524         Reviewed by Dean Jackson.
1525
1526         Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
1527                fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
1528                fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
1529                fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
1530                http/tests/loading/sizes/preload-image-sizes-2x.html
1531                http/tests/loading/sizes/preload-image-sizes.html
1532
1533         This patch adds support for HTMLImageElement's sizes attribute and the
1534         related srcset extended syntax as defined in
1535         http://picture.responsiveimages.org/.
1536         This sizes attribute syntax is added to the CSSGrammar and parsed by
1537         the CSSParser.
1538         The SourceSizeList class is generated by the parser, and used to get
1539         the final source size.
1540         HTMLImageElement and HTMLPreloadScanner send this value to
1541         HTMLSrcsetParser.
1542         HTMLSrcsetParser uses this value in order to pick the right resource.
1543
1544         * CMakeLists.txt: Added css/SourceSizeList.cpp.
1545         * Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
1546         * WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
1547         * WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
1548         * WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
1549         * css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
1550         Source size list, Source size length and source size.
1551         * css/CSSParser.cpp:
1552         (WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
1553         (WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
1554         * css/CSSParser.h:
1555         * css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
1556         (WebCore::SourceSize::match):
1557         (WebCore::computeLength):
1558         (WebCore::defaultValue):
1559         (WebCore::SourceSize::length):
1560         (WebCore::SourceSizeList::parseSizesAttribute):
1561         (WebCore::SourceSizeList::getEffectiveSize):
1562         * css/SourceSizeList.h: Added.
1563         (WebCore::SourceSize::SourceSize):
1564         (WebCore::SourceSizeList::append):
1565         * html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
1566         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
1567         (WebCore::HTMLImageElement::parseAttribute):
1568         (WebCore::HTMLImageElement::currentSrc):
1569         * html/HTMLImageElement.h:
1570         * html/HTMLImageElement.idl:
1571         * html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
1572         HTMLPreloadScanner calls.
1573         (WebCore::HTMLDocumentParser::pumpTokenizer):
1574         (WebCore::HTMLDocumentParser::insert):
1575         (WebCore::HTMLDocumentParser::append):
1576         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
1577         * html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
1578         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1579         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1580         (WebCore::TokenPreloadScanner::scan):
1581         (WebCore::HTMLPreloadScanner::scan):
1582         * html/parser/HTMLPreloadScanner.h:
1583         * html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
1584         (WebCore::parseDescriptors):
1585         (WebCore::pickBestImageCandidate):
1586         (WebCore::bestFitSourceForImageAttributes):
1587         * html/parser/HTMLSrcsetParser.h:
1588
1589 2014-06-29  Andreas Kling  <akling@apple.com>
1590
1591         No need to lazily initialize ResourceResponse internals when accessing timing data.
1592         <https://webkit.org/b/134437>
1593         <rdar://problem/17499876>
1594
1595         When building with ENABLE(WEB_TIMING), the last thing that would happen when
1596         serializing a ResourceResponse in the network process is that we'd retrieve
1597         the ResourceLoadTiming to encode it as part of the response. Doing so would
1598         trigger the lazy instantiation of ResourceResponse's internal data structures.
1599
1600         Since timing data is not actually lazily instantiated, we can just not do that.
1601
1602         This shaves off ~550ms of network process main thread time on PLT, reducing
1603         response latency by not doing unnecessary stuff before letting the web process
1604         look at the downloaded data.
1605
1606         Reviewed by Gavin Barraclough.
1607
1608         * WebCore.exp.in:
1609         * platform/network/ResourceResponseBase.cpp:
1610         (WebCore::ResourceResponseBase::adopt):
1611         (WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
1612         (WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
1613         * platform/network/ResourceResponseBase.h:
1614         (WebCore::ResourceResponseBase::resourceLoadTiming):
1615
1616 2014-06-29  Pratik Solanki  <pratik.solanki@gmail.com>
1617
1618         Refactor ResourceRequest into Cocoa and iOS specific files
1619         https://bugs.webkit.org/show_bug.cgi?id=134430
1620
1621         Reviewed by Andreas Kling.
1622
1623         No new tests because no functional changes.
1624
1625         * WebCore.xcodeproj/project.pbxproj:
1626         * platform/network/cf/ResourceRequestCFNet.cpp:
1627         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
1628         * platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
1629         (WebCore::ResourceRequest::nsURLRequest):
1630         (WebCore::ResourceRequest::cfURLRequest):
1631         (WebCore::ResourceRequest::doUpdateResourceRequest):
1632         (WebCore::ResourceRequest::doUpdateResourceHTTPBody):
1633         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1634         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1635         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
1636         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
1637         (WebCore::ResourceRequest::setStorageSession):
1638         * platform/network/ios/ResourceRequestIOS.mm: Added.
1639         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
1640         (WebCore::ResourceRequest::ResourceRequest):
1641         (WebCore::ResourceRequest::updateNSURLRequest):
1642         * platform/network/mac/ResourceRequestMac.mm:
1643         (WebCore::initQuickLookResourceCachingQuirks):
1644         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
1645         (WebCore::ResourceRequest::ResourceRequest):
1646         (WebCore::ResourceRequest::updateNSURLRequest):
1647         (WebCore::ResourceRequest::applyWebArchiveHackForMail):
1648         (WebCore::ResourceRequest::nsURLRequest): Deleted.
1649         (WebCore::ResourceRequest::cfURLRequest): Deleted.
1650         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
1651         (WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
1652         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
1653         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
1654         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
1655         (WebCore::ResourceRequest::setStorageSession): Deleted.
1656
1657 2014-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1658
1659         TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
1660         https://bugs.webkit.org/show_bug.cgi?id=133678
1661
1662         Reviewed by Alexey Proskuryakov.
1663
1664         Test: fast/encoding/backslash-encoding-jp.html
1665
1666         * platform/text/TextCodecICU.cpp:
1667         (WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.
1668
1669 2014-06-28  Dean Jackson  <dino@apple.com>
1670
1671         [iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
1672         https://bugs.webkit.org/show_bug.cgi?id=134433
1673         <rdar://problem/16630794>
1674
1675         Reviewed by Eric Carlson.
1676
1677         Detect the number of target touches (those directly on the
1678         video element) and disable the page zoom if it looks
1679         like the user is trying to trigger fullscreen.
1680
1681         * Modules/mediacontrols/mediaControlsiOS.js:
1682         (ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
1683         two touches in this video element, don't trigger fullscreen. The
1684         exception is if we haven't yet started playback.
1685         (ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
1686         if we haven't started playback (iOS 7 behaviour).
1687         (ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
1688         number of targetted touches.
1689
1690 2014-06-27  Simon Fraser  <simon.fraser@apple.com>
1691
1692         [iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
1693         https://bugs.webkit.org/show_bug.cgi?id=134426
1694         <rdar://problem/17474523>
1695
1696         Reviewed by Tim Horton.
1697
1698         After committing a new layer tree (with possibly stale position:fixed layer
1699         positions), we need the scrolling tree to update those positions based on
1700         the current scroll offset.
1701         
1702         Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
1703         which is required to update fixed/sticky child nodes.
1704
1705         * WebCore.exp.in:
1706         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1707         (WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
1708         * page/scrolling/ScrollingTreeScrollingNode.h:
1709
1710 2014-06-28  Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos  <cgarcia@igalia.com>
1711
1712         [GTK] Use public getter/setter in GObject DOM bindings properties implementation.
1713         https://bugs.webkit.org/show_bug.cgi?id=134390.
1714
1715         Reviewed by Carlos Garcia Campos.
1716
1717         The current GObject DOM bindings generator is duplicating code when
1718         implementing the get/set_property methods and the public
1719         getters/setters, instead of making one invoking the other.
1720         
1721         This commit changes this behaviour so the code is not duplicated,
1722         making it easier to maintain.
1723
1724         No new tests needed.
1725
1726         * bindings/scripts/CodeGeneratorGObject.pm:
1727         (GenerateProperty):
1728         (GenerateProperties):
1729         (WriteData):
1730         (GetCoreObject): Deleted.
1731         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1732         (webkit_dom_test_active_dom_object_get_property):
1733         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1734         (webkit_dom_test_event_constructor_get_property):
1735         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1736         (webkit_dom_test_exception_get_property):
1737         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1738         (webkit_dom_test_interface_set_property):
1739         (webkit_dom_test_interface_get_property):
1740         * bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
1741         (webkit_dom_test_nondeterministic_set_property):
1742         (webkit_dom_test_nondeterministic_get_property):
1743         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1744         (webkit_dom_test_obj_set_property):
1745         (webkit_dom_test_obj_get_property):
1746         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1747         (webkit_dom_test_serialized_script_value_interface_get_property):
1748         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1749         (webkit_dom_test_typedefs_set_property):
1750         (webkit_dom_test_typedefs_get_property):
1751         * bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
1752         (webkit_dom_test_exception_get_property):
1753         (webkit_dom_attribute_get_property):
1754
1755 2014-06-28  Radu Stavila  <stavila@adobe.com>
1756
1757         [New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
1758         https://bugs.webkit.org/show_bug.cgi?id=133941
1759
1760         Reviewed by Darin Adler.
1761
1762         When having a multicol element inside an element with overflow:hidden and border-radius,
1763         the fragments representing the columns need to have the border radius set also, to ensure
1764         proper clipping.
1765
1766         Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html
1767
1768         * rendering/RenderLayer.cpp:
1769         (WebCore::RenderLayer::collectFragments):
1770
1771 2014-06-27  Zalan Bujtas  <zalan@apple.com>
1772
1773         Subpixel rendering: Background clipping with subpixel behaves differently when composited.
1774         https://bugs.webkit.org/show_bug.cgi?id=134422
1775
1776         Reviewed by Simon Fraser.
1777
1778         Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
1779         It ensures that cliprect starts from the right position when graphics layer is not on the same
1780         coordinates as the associated render layer.
1781
1782         Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html
1783
1784         * rendering/RenderLayer.cpp:
1785         (WebCore::RenderLayer::clipToRect):
1786         (WebCore::RenderLayer::paintLayer):
1787         (WebCore::RenderLayer::applyFilters):
1788         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1789         (WebCore::RenderLayer::paintBackgroundForFragments):
1790         (WebCore::RenderLayer::paintForegroundForFragments):
1791         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
1792         (WebCore::RenderLayer::paintOutlineForFragments):
1793         (WebCore::RenderLayer::paintMaskForFragments):
1794         (WebCore::RenderLayer::paintOverflowControlsForFragments):
1795         (WebCore::RenderLayer::calculateClipRects):
1796         * rendering/RenderLayer.h:
1797
1798 2014-06-27  Brent Fulgham  <bfulgham@apple.com>
1799
1800         [Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
1801         https://bugs.webkit.org/show_bug.cgi?id=134418
1802
1803         Reviewed by Eric Carlson.
1804
1805         Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
1806         Windows.
1807
1808         * DerivedSources.cpp: Add new IDL files
1809         * DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
1810         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
1811         Objective C.)
1812         * WebCore.vcxproj/WebCore.vcxproj: Update for new files.
1813         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1814         * WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
1815         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
1816         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
1817         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1818         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
1819         Moved from MediaPlayerPrivateAVFoundationObjC.
1820         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1821         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
1822         Update for new API calls.
1823         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
1824         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
1825         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1826         Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
1827         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1828         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
1829         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
1830         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1831         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1832         Remove method that was moved to base class.
1833
1834 2014-06-27  Benjamin Poulain  <benjamin@webkit.org>
1835
1836         Remove BufferForAppendingHyphen
1837         https://bugs.webkit.org/show_bug.cgi?id=134376
1838
1839         Reviewed by Darin Adler.
1840
1841         It is legacy, from a time when that code was using a Vector.
1842
1843         The problem is that StringBuilder's memory was also implicitly used to keep
1844         the string alive for the lifespan of the TextRun. That seems quite dangerous
1845         as changes in StringBuilder could have changed that.
1846
1847         To fix the lifetime issue, my first idea was to make it explicit by passing
1848         a String reference to hold the memory alive, and a boolean to say if the text
1849         need an hyphen. The problem with that is this code is very hot and I made things
1850         worse.
1851
1852         The solution with this patch is to just pass a pointer to a String to do both
1853         the buffer reference, and the decision to add the hyphen. Having a single
1854         argument with 2 meanings is not pretty but that's not worse than the old buffer.
1855
1856         * editing/TextIterator.cpp:
1857         * rendering/InlineTextBox.cpp:
1858         (WebCore::InlineTextBox::localSelectionRect):
1859         (WebCore::InlineTextBox::paint):
1860         (WebCore::InlineTextBox::paintSelection):
1861         (WebCore::InlineTextBox::constructTextRun):
1862         (WebCore::adjustCharactersAndLengthForHyphen): Deleted.
1863         * rendering/InlineTextBox.h:
1864         (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
1865         * rendering/RenderText.cpp:
1866
1867 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
1868
1869         Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
1870         https://bugs.webkit.org/show_bug.cgi?id=134407
1871
1872         Reviewed by Eric Carlson.
1873
1874         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1875         (-[WebAVPlayerController init]):
1876         Load AVPlayerController on use.
1877         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
1878         Remove loading on construction.
1879         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
1880         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
1881         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.
1882
1883 2014-06-27  Alex Christensen  <achristensen@webkit.org>
1884
1885         Remove extra operations from 64-bit or on armv7.
1886         https://bugs.webkit.org/show_bug.cgi?id=134408
1887
1888         Reviewed by Geoffrey Garen.
1889
1890         * cssjit/SelectorCompiler.cpp:
1891         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
1892         Only do or operations if it would change values.
1893         Often we're only setting one flag, so half the operations are not necessary.
1894
1895 2014-06-27  Beth Dakin  <bdakin@apple.com>
1896
1897         ScrollView::rootViewToTotalContents() needs to take topContentInset into account
1898         https://bugs.webkit.org/show_bug.cgi?id=134415
1899         -and corresponding-
1900         <rdar://problem/17473633>
1901
1902         Reviewed by Simon Fraser.
1903
1904         This affects hit testing in headers aka PageBanners.
1905
1906         The root view will be anchored above the start of the total contents if there is a 
1907         topContentInset, so the inset value should be subtracted to get into the right 
1908         coordinate space here.
1909         * platform/ScrollView.cpp:
1910         (WebCore::ScrollView::rootViewToTotalContents):
1911
1912 2014-06-27  Antti Koivisto  <antti@apple.com>
1913
1914         Flush throttling with remote layers
1915         https://bugs.webkit.org/show_bug.cgi?id=134398
1916
1917         Reviewed by Darin Adler.
1918
1919         With remote layer trees the flush scheduling lives in the WebKit2 layer. The throttling code
1920         needs to live there as well.
1921         
1922         Add the required callbacks and disable the existing throttling code in RenderLayerCompositor
1923         when remote layers are in use. Later we can get rid of the RenderLayerCompositor throttling code.
1924
1925         * WebCore.xcodeproj/project.pbxproj:
1926         * loader/FrameLoader.cpp:
1927         (WebCore::FrameLoader::loadProgressingStatusChanged):
1928         * page/ChromeClient.h:
1929         (WebCore::ChromeClient::adjustLayerFlushThrottling):
1930         * page/FrameView.cpp:
1931         (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
1932         (WebCore::FrameView::loadProgressingStatusChanged):
1933         
1934             Factor the progress status change activities to a function.
1935
1936         (WebCore::FrameView::updateLayerFlushThrottling):
1937         (WebCore::FrameView::setExposedRect):
1938         
1939             Move the call to adjustTiledBackingCoverage from WebKit to here.
1940
1941         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames): Deleted.
1942         * page/FrameView.h:
1943         * page/LayerFlushThrottleState.h: Added.
1944         * rendering/RenderLayerCompositor.cpp:
1945         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1946
1947 2014-06-27  Brady Eidson  <beidson@apple.com>
1948
1949         The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
1950         https://bugs.webkit.org/show_bug.cgi?id=134375
1951
1952         Reviewed by Darin Adler.
1953
1954         No new tests (Not yet a tested config)
1955
1956         * Modules/gamepad/GamepadManager.cpp:
1957         (WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
1958         (WebCore::GamepadManager::platformGamepadDisconnected):
1959         (WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
1960         (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
1961           notifying it of each connected Gamepad.
1962         (WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
1963         (WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
1964         * Modules/gamepad/GamepadManager.h:
1965
1966         * platform/GamepadProviderClient.h: Added platformGamepadInputActivity.
1967
1968         * platform/mac/HIDGamepadProvider.cpp:
1969         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
1970         (WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
1971           that a button was pressed.
1972         (WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
1973         * platform/mac/HIDGamepadProvider.h:
1974
1975 2014-06-27  Brady Eidson  <beidson@apple.com>
1976
1977         HIDGamepads should populate themselves with initial input values
1978         https://bugs.webkit.org/show_bug.cgi?id=134381
1979
1980         Reviewed by Darin Adler.
1981
1982         No new tests (Not yet a tested config)
1983
1984         * platform/mac/HIDGamepad.cpp:
1985         (WebCore::HIDGamepad::getCurrentValueForElement):
1986         (WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
1987         (WebCore::HIDGamepad::maybeAddButton):
1988         (WebCore::HIDGamepad::maybeAddAxis):
1989         * platform/mac/HIDGamepad.h:
1990         (WebCore::HIDGamepadElement::HIDGamepadElement):
1991         (WebCore::HIDGamepadButton::HIDGamepadButton):
1992         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
1993
1994 2014-06-27  Peyton Randolph  <prandolph@apple.com>
1995
1996         Add feature flag for link long-press gesture.
1997         https://bugs.webkit.org/show_bug.cgi?id=134262
1998
1999         Reviewed by Enrica Casucci.
2000
2001         * Configurations/FeatureDefines.xcconfig:
2002         Add ENABLE_LINK_LONG_PRESS.
2003
2004 2014-06-26  Brady Eidson  <beidson@apple.com>
2005
2006         HIDGamepadProvider should only be active when someone is interested in Gamepads.
2007         https://bugs.webkit.org/show_bug.cgi?id=134374
2008
2009         Reviewed by Darin Adler.
2010
2011         No new tests (Not yet a tested config)
2012
2013         * Modules/gamepad/GamepadManager.cpp:
2014         (WebCore::GamepadManager::registerNavigator): Add some logging.
2015         (WebCore::GamepadManager::unregisterNavigator): Ditto.
2016
2017         * platform/mac/HIDGamepadProvider.cpp:
2018         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
2019         (WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
2020         (WebCore::HIDGamepadProvider::openAndScheduleManager):
2021         (WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
2022           all current gamepads.
2023         (WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
2024         (WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
2025         (WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
2026           callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
2027           spin of the runloop.
2028         (WebCore::HIDGamepadProvider::deviceRemoved):
2029         * platform/mac/HIDGamepadProvider.h:
2030         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.
2031
2032 2014-06-27  Alex Christensen  <achristensen@webkit.org>
2033
2034         Prevent unnecessary register saving in css jit.
2035         https://bugs.webkit.org/show_bug.cgi?id=133955
2036
2037         Reviewed by Geoff Garen.
2038
2039         * cssjit/FunctionCall.h:
2040         (WebCore::FunctionCall::prepareAndCall):
2041         (WebCore::FunctionCall::cleanupPostCall):
2042         (WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
2043         (WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
2044         (WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
2045         (WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
2046         Only push caller saved registers before function calls.
2047         * cssjit/RegisterAllocator.h:
2048         (WebCore::RegisterAllocator::isValidRegister):
2049         Corrected register ranges.
2050         (WebCore::RegisterAllocator::isCallerSavedRegister): Added.
2051
2052 2014-06-27  Beth Dakin  <bdakin@apple.com>
2053
2054         Custom scrollbars should not create ScrollbarPainters on Mac
2055         https://bugs.webkit.org/show_bug.cgi?id=134406
2056         -and corresponding-
2057         <rdar://problem/16178301>
2058
2059         Reviewed by Tim Horton.
2060
2061         The solution here is to return early in ScrollbarThemeMac::registerScrollbar() if 
2062         the scrollbar is custom. However, since this function is called during the 
2063         RenderScrollbar and Scrollbar constructor, we need to re-implement 
2064         Scrollbar::isCustomScrollbar() to return a member variable that is passed into the 
2065         constructor. Otherwise, we will get Scrollbar’s implementation is 
2066         isCustomScrollbar() wrongfully returning false since instead of the derived
2067         class’s implementation. 
2068
2069         Scrollbar constructor now has an option parameter isCustomScrollbar that defaults 
2070         to false. That value is returned by isCustomScrollbar()
2071         * platform/Scrollbar.cpp:
2072         (WebCore::Scrollbar::Scrollbar):
2073         * platform/Scrollbar.h:
2074
2075         Return early if this is a custom scrollbar since the rest of the function deals 
2076         with creating a native scrollbar and getting it in the right state.
2077         * platform/mac/ScrollbarThemeMac.mm:
2078         (WebCore::ScrollbarThemeMac::registerScrollbar):
2079
2080         Send true to the Scrollbar constructor to indicate that this is a custom 
2081         scrollbar.
2082         * rendering/RenderScrollbar.cpp:
2083         (WebCore::RenderScrollbar::RenderScrollbar):
2084         * rendering/RenderScrollbar.h:
2085
2086 2014-06-27  Eric Carlson  <eric.carlson@apple.com>
2087
2088         [Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
2089         https://bugs.webkit.org/show_bug.cgi?id=134401
2090
2091         Reviewed by Jer Noble.
2092
2093         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2094         (WebCore::metadataType): Use SOFT_LINK_POINTER_OPTIONAL for AVMetadataKeySpaceISOUserData
2095             so we don't have problems on OS versions where it isn't defined.
2096
2097 2014-06-27  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
2098
2099         REGRESSION (r168685): css calc() expression fails 
2100         https://bugs.webkit.org/show_bug.cgi?id=134059
2101
2102         The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
2103         because primitiveType() function in CSSCalculationValue.cpp has handled
2104         CalcPercentLength and CalcPercentNumber categories as if they were angles.
2105         The patch fixes this incorrect behavior.
2106
2107         Reviewed by Simon Fraser.
2108
2109         Test: fast/css/calc-percentage-pixel.html
2110
2111         * css/CSSCalculationValue.cpp:
2112
2113 2014-06-27  Jer Noble  <jer.noble@apple.com>
2114
2115         [MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
2116         https://bugs.webkit.org/show_bug.cgi?id=134389
2117
2118         Reviewed by Eric Carlson.
2119
2120         Two subtests in mediasource-append-buffer.html are failing. Bring setDuration() up to spec
2121         by throwing an exception if the duration is called while any SourceBuffer is updating. Do
2122         not cancel pending events when a SourceBuffer is removed from its MediaSource. And mark the
2123         SourceBuffer as having pending activity if there are pending events to be fired.
2124
2125         * Modules/mediasource/MediaSource.cpp:
2126         (WebCore::MediaSource::setDuration):
2127         * Modules/mediasource/SourceBuffer.cpp:
2128         (WebCore::SourceBuffer::removedFromMediaSource):
2129         (WebCore::SourceBuffer::hasPendingActivity):
2130
2131 2014-06-26  Simon Fraser  <simon.fraser@apple.com>
2132
2133         [iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
2134         https://bugs.webkit.org/show_bug.cgi?id=134377
2135         <rdar://problem/16762224>
2136
2137         Reviewed by Tim Horton.
2138         
2139         Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
2140         has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
2141         contexts.
2142         
2143         An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
2144         and needs to truncate the scrolled content on the left side. To pass the
2145         correct geometry to the UI process, we need to introduce the concept of
2146         "reachable" size as well as total content size; normally these are the same,
2147         but will differ when scrolling is only allowed on one axis but there is overflow
2148         on both axes.
2149         
2150         To get the reachable size, add RenderLayer::scrollableContentsSize().
2151         
2152         RenderLayer::visibleSize() was wrong; the function should return the size of the 
2153         scrollable portion, but used layer size which includes borders. Fix to use pixelSnappedClientWidth()/Height(),
2154         which is what we use for scrollbar computations.
2155
2156         * WebCore.exp.in:
2157         * page/scrolling/AsyncScrollingCoordinator.cpp:
2158         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2159         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
2160         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
2161         * page/scrolling/ScrollingCoordinator.h:
2162         * page/scrolling/ScrollingStateScrollingNode.cpp:
2163         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2164         (WebCore::ScrollingStateScrollingNode::setReachableContentsSize):
2165         * page/scrolling/ScrollingStateScrollingNode.h:
2166         (WebCore::ScrollingStateScrollingNode::reachableContentsSize):
2167         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2168         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2169         * page/scrolling/ScrollingTreeScrollingNode.h:
2170         (WebCore::ScrollingTreeScrollingNode::reachableContentsSize):
2171         * rendering/RenderLayer.cpp:
2172         (WebCore::RenderLayer::visibleSize):
2173         (WebCore::RenderLayer::scrollableContentsSize):
2174         * rendering/RenderLayer.h:
2175         * rendering/RenderLayerCompositor.cpp:
2176         (WebCore::updateScrollingLayerWithClient):
2177         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2178
2179 2014-06-27  Bear Travis  <betravis@adobe.com>
2180
2181         [Feature Queries] Fix feature queries build on Mac
2182         https://bugs.webkit.org/show_bug.cgi?id=134359
2183
2184         Reviewed by Antti Koivisto.
2185
2186         Update the XCode project and Feature Queries code to build on Mac.
2187
2188         There are existing tests for supports in the LayoutTests/css3 directory.
2189
2190         * WebCore.xcodeproj/project.pbxproj: Add the Feature Queries files
2191         to the XCode project.
2192         * css/CSSGrammar.y.in: Update CSSParserExpression to CSSParserValueList.
2193         * css/DOMWindowCSS.idl: Add ImplementationLacksVTable metadata.
2194
2195 2014-06-27  Jer Noble  <jer.noble@apple.com>
2196
2197         [MSE] media/media-source/media-source-tracks.html is crashy
2198         https://bugs.webkit.org/show_bug.cgi?id=134385
2199
2200         Reviewed by Eric Carlson.
2201
2202         Fix the refactoring error (self assignment) introduced by r170488.
2203
2204         * Modules/mediasource/SourceBuffer.cpp:
2205         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2206
2207 2014-06-27  Mark Hahnenberg  <mhahnenberg@apple.com>
2208
2209         XHR should keep attributes on instance
2210         https://bugs.webkit.org/show_bug.cgi?id=134363
2211
2212         Reviewed by Sam Weinig.
2213
2214         Test: js/dom/xhr-prototype-define-property.html
2215
2216         Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
2217         not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.
2218
2219         * bindings/scripts/CodeGeneratorJS.pm:
2220         (InterfaceRequiresAttributesOnInstanceForCompatibility):
2221
2222 2014-06-27  Jeremy Jones  <jeremyj@apple.com>
2223
2224         removeCodedFrames should modify ref to TrackBuffer no a copy.
2225         https://bugs.webkit.org/show_bug.cgi?id=134380
2226
2227         Reviewed by Daniel Bates.
2228
2229         * Modules/mediasource/SourceBuffer.cpp:
2230         (WebCore::SourceBuffer::removeCodedFrames):
2231         Iterate with a reference.
2232
2233 2014-06-27  Zalan Bujtas  <zalan@apple.com>
2234
2235         Set cliprect radius unconditionally in RenderLayer.
2236         https://bugs.webkit.org/show_bug.cgi?id=134396
2237
2238         Reviewed by Simon Fraser.
2239
2240         No change in functionality.
2241
2242         * rendering/RenderLayer.cpp:
2243         (WebCore::RenderLayer::calculateClipRects):
2244
2245 2014-06-27  Manuel Rego Casasnovas  <rego@igalia.com>
2246
2247         [CSS Grid Layout] Interaction between auto-placement and column / row spanning
2248         https://bugs.webkit.org/show_bug.cgi?id=110633
2249
2250         Reviewed by Sergio Villar Senin.
2251
2252         Modify auto-placement algorithm in order to support span in both
2253         definite and automatic positions.
2254
2255         This patch fixes examples like:
2256         grid-row: auto;
2257         grid-column: 2 / span 3;
2258
2259         And also:
2260         grid-row: auto;
2261         grid-column: span 3;
2262
2263         Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
2264                fast/css-grid-layout/grid-item-auto-placement-definite-span.html
2265
2266         * rendering/RenderGrid.cpp:
2267         (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
2268         checks if a grid area is or not empty.
2269         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
2270         that now receives two arguments with the span value in both directions.
2271         (WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
2272         method to grow in both directions at the same time if needed. It ensures
2273         that the grid is big enough to insert a new item.
2274         (WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
2275         receives a GridCoordinate. It uses ensureGridSize() before inserting the
2276         item in the grid.
2277         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
2278         the grid is big enough to place the largest span for auto-positioned
2279         items.
2280         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
2281         New method that returns a GridCoordinate outside current grid with the
2282         requested dimensions.
2283         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
2284         method to calculate the item's span and use the new version of
2285         nextEmptyGridArea(). If an empty area is not found it uses
2286         createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
2287         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
2288         (WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
2289         * rendering/RenderGrid.h: Modify methods headers and add new method
2290         signature.
2291         * rendering/style/GridCoordinate.h:
2292         (WebCore::GridSpan::integerSpan): Add new simple method to return the
2293         span value of a position.
2294         * rendering/style/GridResolvedPosition.cpp:
2295         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
2296         Implement method to take into account span in auto-placement algorithm.
2297         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
2298         checks related with named grid line spans in auto-positioned items,
2299         which is not allowed according to the spec.
2300         * rendering/style/GridResolvedPosition.h: Update method header.
2301
2302 2014-06-27  Mahesh Kulkarni  <mahesh.kk@samsung.com>
2303
2304         [XHR] open method must uppercase only standard method types
2305         https://bugs.webkit.org/show_bug.cgi?id=134264
2306
2307         Reviewed by Darin Adler.
2308
2309         As per step-5 of http://xhr.spec.whatwg.org/#the-open()-method only
2310         DELETE, PUT, GET, POST, OPTIONS, HEAD are standard. Use other methods as is without case change.
2311         All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
2312         This merges blink changes from r176592.
2313
2314         Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
2315                http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html
2316
2317         * xml/XMLHttpRequest.cpp:
2318         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
2319
2320 2014-06-27  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
2321
2322         Increase priority on SharedTimer source.
2323         http://bugs.webkit.org/show_bug.cgi?id=134109
2324
2325         While running webkit on a Debian virtual machine I stumbled upon an issue where JS
2326         setTimeout callbacks were not being properly invoked due to machine limitations and the
2327         usage of a low priority on setTimeout timers.
2328
2329         This patch increases the SharedTimer source priority to use the default glib priority which
2330         fixes the issue, making setTimeout JS calls work properly on the test environment.
2331
2332         Reviewed by Gustavo Noronha Silva.
2333
2334         * platform/gtk/SharedTimerGtk.cpp:
2335         (WebCore::setSharedTimerFireInterval):
2336
2337 2014-06-27  Zalan Bujtas  <zalan@apple.com>
2338
2339         Remove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
2340         https://bugs.webkit.org/show_bug.cgi?id=134378
2341
2342         Reviewed by Simon Fraser.
2343
2344         No change in functionality.
2345
2346         * rendering/RenderLayer.cpp:
2347         (WebCore::RenderLayer::calculateClipRects):
2348
2349 2014-06-27  Philippe Normand  <pnormand@igalia.com>
2350
2351         [GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
2352         https://bugs.webkit.org/show_bug.cgi?id=133605
2353
2354         Reviewed by Carlos Garcia Campos.
2355
2356         Don't attempt to load blank URLs with the GStreamer media
2357         player. Those URLs trigger the codec installer which is useless in
2358         this scenario. This patch also renames some of the variables of
2359         the ::load method, as suggested by Carlos.
2360
2361         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2362         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2363         Check video-sink validity before disconnecting its signal handlers.
2364         (WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
2365         URLs (about:blank).
2366         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2367         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2368         Disconnect repaint handler only if it's valid.
2369
2370 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2371
2372         [GTK] Expose getter and setter functions for attributes named type
2373         https://bugs.webkit.org/show_bug.cgi?id=134300
2374
2375         Reviewed by Martin Robinson.
2376
2377         We skip those because the getter conflicts with the get_type()
2378         function of all GObjects. We should use a different name for them. As
2379         a general rule we use the last word of the class name, something like:
2380
2381           webkit_dom_blob_get_type() -> webkit_dom_blob_get_blob_type()
2382           webkit_dom_event_get_type() -> webkit_dom_event_get_event_type()
2383
2384         It's consistent with other existing DOM methods like
2385         webkit_dom_xpath_result_get_result_type() or webkit_dom_css_value_get_css_value_type().
2386         This patch also adds some exceptions for particular cases.
2387
2388         * bindings/gobject/webkitdom.symbols: Add new public symbols.
2389         * bindings/scripts/CodeGeneratorGObject.pm:
2390         (GetFunctionSigName): Helper function to return the function name
2391         that takes into account all exceptions when generating getters and
2392         setters of attributes named type. Otherwise the name is returned unmodified.
2393         (GenerateFunction): Use GetFunctionSigName().
2394         (GenerateFunctions): Do not skip functions for type attributes.
2395
2396 2014-06-27  Sungmann Cho  <sungmann.cho@navercorp.com>
2397
2398         Remove unnecessary #include in HistoryController
2399         https://bugs.webkit.org/show_bug.cgi?id=134369
2400
2401         Reviewed by Daniel Bates.
2402
2403         After the landing of https://webkit.org/b/130099, HistoryController doesn't need
2404         WebCore::Settings class. So we can remove the related header.
2405
2406         * loader/HistoryController.cpp:
2407
2408 2014-06-26  Jeongeun Kim  <je_julie.kim@samsung.com>
2409
2410         REGRESSION (r170287): SVGDocumentExtensions::rebuildElements() called on removed element
2411         https://bugs.webkit.org/show_bug.cgi?id=134304
2412
2413         Reviewed by Daniel Bates.
2414
2415         Roll out <http://trac.webkit.org/170287> (https://bugs.webkit.org/show_bug.cgi?id=134186)
2416         as it led to SVGDocumentExtensions::rebuildElements() being called on an element(s) that
2417         may no longer be in the document.
2418
2419         * dom/ContainerNode.cpp:
2420         (WebCore::ContainerNode::removeChild):
2421         (WebCore::ContainerNode::removeChildren):
2422         * dom/Document.cpp:
2423         (WebCore::Document::commonTeardown):
2424         (WebCore::Document::implicitClose):
2425         * history/CachedFrame.cpp:
2426         (WebCore::CachedFrameBase::restore):
2427         * svg/SVGDocumentExtensions.cpp:
2428         (WebCore::SVGDocumentExtensions::startAnimations):
2429         (WebCore::SVGDocumentExtensions::pauseAnimations):
2430         (WebCore::SVGDocumentExtensions::unpauseAnimations):
2431         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
2432         (WebCore::SVGDocumentExtensions::rebuildElements):
2433         * svg/SVGDocumentExtensions.h:
2434
2435 2014-06-26  Tim Horton  <timothy_horton@apple.com>
2436
2437         [WK2] Pinch-zoom shadows can overlap headers and footers
2438         https://bugs.webkit.org/show_bug.cgi?id=134372
2439         <rdar://problem/16004095>
2440
2441         Reviewed by Simon Fraser.
2442
2443         * WebCore.exp.in:
2444         * rendering/RenderLayerCompositor.cpp:
2445         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2446         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2447         Put header/footer layers in front of the root content layer instead of behind.
2448         Ideally nothing would ever overlap them, but this will give them precedence regardless.
2449
2450 2014-06-26  David Kilzer  <ddkilzer@apple.com>
2451
2452         [Win] Always NULL-terminate the string in createUTF8String()
2453         <http://webkit.org/b/134353>
2454         <rdar://problem/17471783>
2455
2456         Reviewed by Brent Fulgham.
2457
2458         * plugins/PluginView.cpp:
2459         (WebCore::createUTF8String): Pull out CString length into local
2460         variable.  Switch to use memcpy.  Always NULL-terminate the
2461         string.
2462
2463 2014-06-26  Jer Noble  <jer.noble@apple.com>
2464
2465         [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
2466         https://bugs.webkit.org/show_bug.cgi?id=134367
2467
2468         Reviewed by Darin Adler.
2469
2470         Add a couple of null-checks to protect against methods being called in the brief time
2471         between when the object is created and when it's asked to load.
2472
2473         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2474         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
2475         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
2476
2477 2014-06-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2478
2479         Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
2480         https://bugs.webkit.org/show_bug.cgi?id=134289
2481
2482         Reviewed by Darin Adler.
2483
2484         If we do early return when there is invalid protocol, we're able to avoid unnecessary call flow.
2485
2486         No new tests, covered by existing tests.
2487
2488         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2489         (WebCore::verifyProtocolHandlerScheme):
2490
2491 2014-06-26  Benjamin Poulain  <bpoulain@apple.com>
2492
2493         [WK1] Use native touch event's timestamp for DOM touch event
2494         https://bugs.webkit.org/show_bug.cgi?id=134326
2495
2496         Reviewed by Enrica Casucci.
2497
2498         * platform/ios/PlatformEventFactoryIOS.mm:
2499         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
2500         Use device event timestamp to get more accurate timing information. This also removes
2501         the variance introduced by WebKit when computing velocity/acceleration/etc.
2502
2503 2014-06-26  Balazs Kelemen  <b.kelemen@samsung.com>
2504
2505         Memcache migth not be pruned when it should for https pages
2506         https://bugs.webkit.org/show_bug.cgi?id=134361
2507
2508         Reviewed by Geoffrey Garen.
2509
2510         There is no reason we should not try to prune in case of a https resource.
2511
2512         No observable change in behavior, no tests.
2513
2514         * loader/cache/CachedResource.cpp:
2515         (WebCore::CachedResource::removeClient):
2516         Call prune unconditionally and remove an unnecessary branch.
2517
2518 2014-06-26  Alexey Proskuryakov  <ap@apple.com>
2519
2520         REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
2521         https://bugs.webkit.org/show_bug.cgi?id=133882
2522         <rdar://problem/17271965>
2523
2524         Reviewed by Brady Eidson.
2525
2526         This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
2527         and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
2528         which still use the improved approach, and don't count against 6 connections.
2529
2530         * loader/ResourceLoadScheduler.cpp:
2531         (WebCore::ResourceLoadScheduler::scheduleLoad):
2532         * platform/network/cf/ResourceRequest.h:
2533         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
2534         * platform/network/cf/ResourceRequestCFNet.cpp:
2535         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2536         (WebCore::ResourceRequest::doUpdateResourceRequest):
2537         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
2538         * platform/network/mac/ResourceRequestMac.mm:
2539         (WebCore::ResourceRequest::doUpdateResourceRequest):
2540         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2541
2542 2014-06-26  Brady Eidson  <beidson@apple.com>
2543
2544         Remove use of PlatformStrategies for Gamepad API.
2545         https://bugs.webkit.org/show_bug.cgi?id=134348
2546
2547         Reviewed by Dean Jackson.
2548
2549         No new tests (Not yet a tested config)
2550
2551         Introduce a virtual GamepadProvider with a process-global shared provider.
2552         The base implementation of the GamepadProvider does nothing.
2553         * platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
2554         (WebCore::GamepadProvider::shared):
2555         (WebCore::GamepadProvider::setSharedProvider):
2556         (WebCore::GamepadProvider::startMonitoringGamepads):
2557         (WebCore::GamepadProvider::stopMonitoringGamepads):
2558         (WebCore::GamepadProvider::platformGamepads):
2559         * platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
2560         (WebCore::GamepadProvider::~GamepadProvider):
2561
2562         * platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
2563         (WebCore::GamepadProviderClient::~GamepadProviderClient):
2564
2565         GamepadManager is now a GamepadProviderClient:
2566         * Modules/gamepad/GamepadManager.cpp:
2567         (WebCore::GamepadManager::GamepadManager):
2568         (WebCore::GamepadManager::registerNavigator):
2569         (WebCore::GamepadManager::unregisterNavigator):
2570         * Modules/gamepad/GamepadManager.h:
2571
2572         Remove the GamepadStrategy altogether:
2573         * platform/PlatformStrategies.h:
2574         (WebCore::PlatformStrategies::PlatformStrategies):
2575         (WebCore::PlatformStrategies::gamepadStrategy): Deleted.
2576
2577         Call to the shared GamepadProvider instead of the strategy:
2578         * Modules/gamepad/NavigatorGamepad.cpp:
2579         (WebCore::NavigatorGamepad::gamepads):
2580         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
2581         (WebCore::NavigatorGamepad::gamepadConnected):
2582
2583         HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
2584         LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
2585         * platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
2586         (WebCore::deviceMatchingDictionary):
2587         (WebCore::deviceAddedCallback):
2588         (WebCore::deviceRemovedCallback):
2589         (WebCore::deviceValuesChangedCallback):
2590         (WebCore::HIDGamepadProvider::shared):
2591         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
2592         (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
2593         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
2594         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
2595         (WebCore::HIDGamepadProvider::deviceAdded):
2596         (WebCore::HIDGamepadProvider::deviceRemoved):
2597         (WebCore::HIDGamepadProvider::valuesChanged):
2598         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
2599         * platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
2600         (WebCore::HIDGamepadProvider::platformGamepads):
2601         (WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):
2602
2603         * WebCore.exp.in:
2604         * WebCore.xcodeproj/project.pbxproj:
2605
2606         * platform/mac/HIDGamepad.h: Fix incorrect comment
2607
2608 2014-06-26  Andreas Kling  <akling@apple.com>
2609
2610         Skip memcmp()ing fully downloaded resources after they become mmap()able.
2611         <https://webkit.org/b/134362>
2612
2613         When we receive word that a downloaded resource is now available for mmap()ing
2614         from the file system, we don't need to compare against the buffered data,
2615         since even if there were a mismatch, the cached version should be the canonical one.
2616
2617         This was added as belt-and-suspenders while the supporting mechanism was being
2618         developed in CFNetwork, and there's no evidence of a race today. This change
2619         turns the runtime checks into debug-only assertions.
2620
2621         Saves ~300ms of main thread time on PLT.
2622
2623         Reviewed by Geoff Garen.
2624
2625         * loader/cache/CachedResource.cpp:
2626         (WebCore::CachedResource::tryReplaceEncodedData):
2627
2628 2014-06-26  Jer Noble  <jer.noble@apple.com>
2629
2630         [MSE] Refactoring: Use C++11 for-loops in SourceBuffer.
2631         https://bugs.webkit.org/show_bug.cgi?id=134352
2632
2633         Reviewed by Darin Adler.
2634
2635         Use C++11 style for-loops where appropriate in SourceBuffer now that the
2636         SampleMap ordered objects support them.
2637
2638         * Modules/mediasource/SourceBuffer.cpp:
2639         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
2640         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
2641         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2642         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2643         (WebCore::SourceBuffer::validateInitializationSegment):
2644         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2645
2646 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2647  
2648         [iOS]: Tapping <button> outside of a form is no longer working
2649         https://bugs.webkit.org/show_bug.cgi?id=134319
2650         <rdar://problem/17213346>
2651
2652         Reviewed by Daniel Bates.
2653
2654         Restore behavior of allowing <button> clicks outside of <form>.
2655         This used to be iOS behavior before it was removed in favor of the
2656         OpenSource (Android?) behavior. Now, willRespondToMouseClickEvents
2657         is only used by iOS, so lets restore the iOS behavior.
2658
2659         * html/HTMLButtonElement.cpp:
2660         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
2661
2662 2014-06-26  Jer Noble  <jer.noble@apple.com>
2663
2664         Unreviewed build-fix. Remove unintentionial rename of MediaTime.h -> MediaTimeHash.h.
2665
2666         * Modules/mediasource/SampleMap.h:
2667
2668 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
2669
2670         [iOS] no need to deactivate audio session
2671         https://bugs.webkit.org/show_bug.cgi?id=134350
2672
2673         Reviewed by Jer Noble.
2674
2675         * platform/audio/mac/MediaSessionManagerMac.cpp:
2676         (MediaSessionManager::updateSessionState): Don't bother calling 
2677             AudioSession::setActive(false), WebCore's audio session will be deactivated 
2678             automatically if another application begins playing audio.
2679
2680 2014-06-26  Jer Noble  <jer.noble@apple.com>
2681
2682         [MSE] Refactoring: Differentiate between SampleMap decode and presentation order methods
2683         https://bugs.webkit.org/show_bug.cgi?id=134349
2684
2685         Reviewed by Geoffrey Garen.
2686
2687         Refactor SampleMap to clarify the distinction between methods which return decode-order
2688         iterators and ones which retun presentation-order iterators.
2689
2690         Add two classes, PresentationOrderSampleMap and DecodeOrderSampleMap, to contain the actual
2691         MediaTime-to-Sample maps, and move the methods returning presentation-order and decode-order
2692         iterators to each, respectively.  Rename the {presentation,decode}{Begin,End}() methods to
2693         begin() and end() so the objects can be used in C++11 for-loops.
2694
2695         Update all the call sites in SourceBuffer to use the new ordered objects.
2696
2697         * Modules/mediasource/SampleMap.cpp:
2698         (WebCore::SampleIsLessThanMediaTimeComparator::operator()): Use new ordered objects.
2699         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()): Ditto.
2700         (WebCore::SampleMap::clear): Ditto.
2701         (WebCore::SampleMap::addSample): Ditto.
2702         (WebCore::SampleMap::removeSample): Ditto.
2703         (WebCore::PresentationOrderSampleMap::findSampleContainingPresentationTime): Renamed from SampleMap version.
2704         (WebCore::PresentationOrderSampleMap::findSampleAfterPresentationTime): Ditto.
2705         (WebCore::DecodeOrderSampleMap::findSampleWithDecodeTime): Ditto.
2706         (WebCore::PresentationOrderSampleMap::reverseFindSampleContainingPresentationTime): Ditto.
2707         (WebCore::PresentationOrderSampleMap::reverseFindSampleBeforePresentationTime): Ditto.
2708         (WebCore::DecodeOrderSampleMap::reverseFindSampleWithDecodeTime): Ditto.
2709         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToPresentationTime): Ditto.
2710         (WebCore::DecodeOrderSampleMap::findSyncSamplePriorToDecodeIterator): Ditto.
2711         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterPresentationTime): Ditto.
2712         (WebCore::DecodeOrderSampleMap::findSyncSampleAfterDecodeIterator): Ditto.
2713         (WebCore::PresentationOrderSampleMap::findSamplesBetweenPresentationTimes): Ditto.
2714         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRange): Ditto.
2715         (WebCore::DecodeOrderSampleMap::findDependentSamples): Ditto.
2716         * Modules/mediasource/SampleMap.h:
2717         (WebCore::PresentationOrderSampleMap::begin): Renamed from presentationBegin().
2718         (WebCore::PresentationOrderSampleMap::end): Renamed from presentationEnd().
2719         (WebCore::PresentationOrderSampleMap::rbegin): Renamed from reversePresentationBegin().
2720         (WebCore::PresentationOrderSampleMap::rend): Renamed from reversePresentationEnd().
2721         (WebCore::DecodeOrderSampleMap::begin): Renamed from decodeBegin().
2722         (WebCore::DecodeOrderSampleMap::end): Renamed from decodeEnd().
2723         (WebCore::DecodeOrderSampleMap::rbegin): Renamed from reverseDecodeBegin().
2724         (WebCore::DecodeOrderSampleMap::rend): Renamed from reverseDecodeEnd().
2725         (WebCore::SampleMap::SampleMap): Create new ordered objects.
2726         (WebCore::SampleMap::sizeInBytes): Use new ordered objects.
2727         (WebCore::SampleMap::decodeOrder): Simple accessor.
2728         (WebCore::SampleMap::presentationOrder): Simple accessor.
2729         * Modules/mediasource/SourceBuffer.cpp:
2730         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Use new ordered objects.
2731         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Ditto.
2732         (WebCore::SourceBuffer::removeCodedFrames): Ditto.
2733         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
2734         (WebCore::SourceBuffer::bufferedSamplesForTrackID): Ditto.
2735
2736 2014-06-26  Chris Fleizach  <cfleizach@apple.com>
2737
2738         Add an undo group for each dictated utterance in WebKit
2739         https://bugs.webkit.org/show_bug.cgi?id=134086
2740
2741         Applied review comments from Sam Weinig.
2742
2743         Move the associated USE #define into Platform.h.
2744  
2745         * WebCore.xcodeproj/project.pbxproj:
2746         * editing/mac/TextUndoInsertionMarkup.h: Removed.
2747         * editing/mac/TextUndoInsertionMarkupMac.h:
2748
2749 2014-06-26  Shivakumar JM  <shiva.jm@samsung.com>
2750
2751         [EFL][WK2] Fix Debug Build Error in Webcore module.
2752         https://bugs.webkit.org/show_bug.cgi?id=134345
2753
2754         Reviewed by Zalan Bujtas.
2755
2756         Use static cast to change the type of variable to fix error
2757
2758         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2759         (WebCore::HarfBuzzShaper::setDrawRange):
2760
2761 2014-06-26  Eric Carlson  <eric.carlson@apple.com>
2762
2763         [Mac] allow host application to canonicalize media urls
2764         https://bugs.webkit.org/show_bug.cgi?id=134329
2765
2766         Reviewed by Dean Jackson.
2767
2768         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2769         (WebCore::canonicalURL): New, use NSURLProtocol to canonicalize a URL.
2770         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Call canonicalURL.
2771
2772 2014-06-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2773
2774         [GTK] Add padding for future expansion to WebKitDOMEventTargetIface
2775         https://bugs.webkit.org/show_bug.cgi?id=134298
2776
2777         Reviewed by Martin Robinson.
2778
2779         * bindings/gobject/WebKitDOMEventTarget.h:
2780
2781 2014-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2782
2783         [GTK] Add support for constants in GObject DOM bindings
2784         https://bugs.webkit.org/show_bug.cgi?id=133983
2785
2786         Reviewed by Martin Robinson.
2787
2788         * bindings/gobject/webkitdom.symbols: Add stable constants.
2789         * bindings/scripts/CodeGeneratorGObject.pm:
2790         (GenerateHeader): Add constants to the header.
2791         (Generate): Pass the interface object to GenerateHeader to get the constants
2792         (IsInterfaceSymbol): Helper function that returns whether the given
2793         symbol belongs to the interface. Check also constants now.
2794         (ReadStableSymbols): Use IsInterfaceSymbol().
2795         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2796         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2797
2798 2014-06-26  Manuel Rego Casasnovas  <rego@igalia.com>
2799
2800         [CSS Grid Layout] Properly support for z-index on grid items
2801         https://bugs.webkit.org/show_bug.cgi?id=103329
2802
2803         Reviewed by Benjamin Poulain.
2804
2805         From Blink r157620 by <jchaffraix@chromium.org> and r172402 by
2806         <wangxianzhu@chromium.org>.
2807
2808         The specification says that grid should match flexbox and force
2809         grid items to be stacking context if z-index is set, regardless
2810         of 'position'. After this change, this is what happens.
2811
2812         Previously z-index changes of static positioned objects were ignored.
2813         However, z-index is applicable for some static positioned objects,
2814         such as grid items. Ignoring them makes the object not to be properly
2815         painted on z-index change.
2816
2817         As StyleResolver has ensured that z-index is non-auto only if
2818         applicable, RenderStyle::changeRequiresLayerRepaint() should not check
2819         again (with inconsistent conditions).
2820
2821         Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html
2822                fast/css-grid-layout/grid-item-z-index-stacking-context.html
2823                fast/css-grid-layout/grid-item-z-index-support.html
2824
2825         * css/StyleResolver.cpp:
2826         (WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent
2827         display is flexbox or grid.
2828         (WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index
2829         condition.
2830         * rendering/style/RenderStyle.cpp:
2831         (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks
2832         out of non-static positioned objects if.
2833
2834 2014-06-25  Dean Jackson  <dino@apple.com>
2835
2836         HIDGamepad should use CFIndex when looping
2837         https://bugs.webkit.org/show_bug.cgi?id=134337
2838
2839         Reviewed by Dan Bernstein.
2840
2841         * platform/mac/HIDGamepad.cpp:
2842         (WebCore::HIDGamepad::initElementsFromArray): Replace int with CFIndex, and use
2843         a local variable for CFArrayCount.
2844
2845 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
2846
2847         Build fix attempt after r170465.
2848
2849         * platform/mac/HIDGamepad.cpp:
2850         (WebCore::HIDGamepad::initElementsFromArray):
2851
2852 2014-06-25  Dean Jackson  <dino@apple.com>
2853
2854         [Mac] Radio buttons and checkboxes vanish when redrawn
2855         https://bugs.webkit.org/show_bug.cgi?id=134335
2856
2857         Reviewed by Dan Bernstein.
2858
2859         I screwed up when landing r170343 by moving some code around
2860         which broke the logic. We need to query the animation
2861         state for controls after we draw (both statically and animated).
2862
2863         * platform/mac/ThemeMac.mm:
2864         (WebCore::paintToggleButton): We need to check the state of animation again, after
2865         we draw.
2866
2867 2014-06-25  Brady Eidson  <beidson@apple.com>
2868
2869         Add HID-based gamepad implementation for Mac
2870         https://bugs.webkit.org/show_bug.cgi?id=134324
2871
2872         Reviewed by Dean Jackson.
2873
2874         No new tests (Not yet a tested config)
2875
2876         * Modules/gamepad/Gamepad.cpp:
2877         (WebCore::Gamepad::Gamepad):
2878         (WebCore::Gamepad::updateFromPlatformGamepad): Update the Gamepad’s data from the passed-in PlatformGamepad.
2879         * Modules/gamepad/Gamepad.h:
2880
2881         * Modules/gamepad/GamepadButton.h:
2882         (WebCore::GamepadButton::create): Change to use Ref instead of RefPtr.
2883
2884         GamepadManager is a GamepadStrategyClient that receives notifications from the platform gamepad implementation
2885         and forwards them to NavigatorGamepad objects. In the future it will also handle event dispatch and exposing
2886         gamepads to the API layer when a button is pressed:
2887         * Modules/gamepad/GamepadManager.cpp: Added.
2888         (WebCore::GamepadManager::shared):
2889         (WebCore::GamepadManager::GamepadManager):
2890         (WebCore::GamepadManager::platformGamepadConnected):
2891         (WebCore::GamepadManager::platformGamepadDisconnected):
2892         (WebCore::GamepadManager::registerNavigator):
2893         (WebCore::GamepadManager::unregisterNavigator):
2894         * Modules/gamepad/GamepadManager.h:
2895
2896         The NavigatorGamepad supplement actually manages visibility of Gamepads on a per-DOMWindow basis:
2897         * Modules/gamepad/NavigatorGamepad.cpp:
2898         (WebCore::NavigatorGamepad::NavigatorGamepad):
2899         (WebCore::NavigatorGamepad::~NavigatorGamepad):
2900         (WebCore::NavigatorGamepad::from):
2901         (WebCore::NavigatorGamepad::gamepads):
2902         (WebCore::NavigatorGamepad::gamepadsBecameVisible):
2903         (WebCore::NavigatorGamepad::gamepadConnected):
2904         (WebCore::NavigatorGamepad::gamepadDisconnected):
2905         * Modules/gamepad/NavigatorGamepad.h:
2906         (WebCore::NavigatorGamepad::navigationStart):
2907
2908         HIDGamepad is a PlatformGamepad that wraps an IOHIDDeviceRef and keeps input values updated:
2909         * platform/mac/HIDGamepad.cpp: Added.
2910         (WebCore::HIDGamepad::HIDGamepad):
2911         (WebCore::HIDGamepad::initElements):
2912         (WebCore::HIDGamepad::initElementsFromArray):
2913         (WebCore::HIDGamepad::maybeAddButton):
2914         (WebCore::HIDGamepad::maybeAddAxis):
2915         (WebCore::HIDGamepad::valueChanged):
2916         * platform/mac/HIDGamepad.h: Added.
2917         (WebCore::HIDGamepadElement::HIDGamepadElement):
2918         (WebCore::HIDGamepadElement::~HIDGamepadElement):
2919         (WebCore::HIDGamepadElement::isButton):
2920         (WebCore::HIDGamepadElement::isAxis):
2921         (WebCore::HIDGamepadButton::HIDGamepadButton):
2922         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
2923         (WebCore::HIDGamepad::hidDevice):
2924
2925         HIDGamepadListener wraps an IOHIDManagerRef and continuously listens for changes to Gamepad-type
2926         devices plugged in to the system:
2927         * platform/mac/HIDGamepadListener.cpp: Added.
2928         (WebCore::deviceMatchingDictionary):
2929         (WebCore::deviceAddedCallback):
2930         (WebCore::deviceRemovedCallback):
2931         (WebCore::deviceValuesChangedCallback):
2932         (WebCore::HIDGamepadListener::shared):
2933         (WebCore::HIDGamepadListener::HIDGamepadListener):
2934         (WebCore::HIDGamepadListener::indexForNewlyConnectedDevice):
2935         (WebCore::HIDGamepadListener::deviceAdded):
2936         (WebCore::HIDGamepadListener::deviceRemoved):
2937         (WebCore::HIDGamepadListener::valuesChanged):
2938         (WebCore::HIDGamepadListener::removeGamepadForDevice):
2939         * platform/mac/HIDGamepadListener.h: Copied from Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp.
2940         (WebCore::HIDGamepadListenerClient::~HIDGamepadListenerClient):
2941         (WebCore::HIDGamepadListener::setClient):
2942         (WebCore::HIDGamepadListener::platformGamepads):
2943         (WebCore::HIDGamepadListener::setShouldDispatchCallbacks):
2944
2945         * WebCore.exp.in:
2946         * WebCore.xcodeproj/project.pbxproj:
2947
2948 2014-06-25  Ryosuke Niwa  <rniwa@webkit.org>
2949
2950         WebProgressTracker updates progress too frequently
2951         https://bugs.webkit.org/show_bug.cgi?id=134185
2952
2953         Reviewed by Tim Horton.
2954
2955         The old code throttled the progress update to when either 100ms has passed or the delta is at least 2%
2956         but this was still not enough in pages that loaded in sub-seconds. The new code always throttles it at 200ms.
2957
2958         * loader/ProgressTracker.cpp:
2959         (WebCore::ProgressTracker::ProgressTracker):
2960         (WebCore::ProgressTracker::incrementProgress):
2961         * loader/ProgressTracker.h:
2962
2963 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
2964
2965         [iOS WK2] Fixed position elements jump around when zooming
2966         https://bugs.webkit.org/show_bug.cgi?id=134328
2967         <rdar://problem/17447048>
2968
2969         Reviewed by Zalan Bujtas.
2970
2971         If a given remote layer tree commit contains changes of layers for viewport-constrained
2972         objects, then the associated scrolling tree also needs to show that the layers changed,
2973         since we need to re-run the "viewport changed" logic in the UI process to get the
2974         layers correctly positioned for the current zoom level.
2975         
2976         The bug was that page scale changes resulted in small "pixel alignment" position
2977         changes which touched layers, but we didn't commit any scrolling tree changes. So
2978         the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
2979         update to adjust them for the current transient zoom.
2980
2981         Fix by making use of the existing "alignment offset" field in the ViewportConstraints
2982         data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
2983         fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
2984         nodes were updated.
2985
2986         * page/scrolling/ScrollingConstraints.h:
2987         (WebCore::StickyPositionViewportConstraints::operator==):
2988         * platform/graphics/GraphicsLayer.h:
2989         (WebCore::GraphicsLayer::pixelAlignmentOffset):
2990         * platform/graphics/ca/GraphicsLayerCA.cpp:
2991         (WebCore::GraphicsLayerCA::updateGeometry):
2992         * platform/graphics/ca/GraphicsLayerCA.h:
2993         * rendering/RenderLayerCompositor.cpp:
2994         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2995         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2996
2997 2014-06-25  Simon Fraser  <simon.fraser@apple.com>
2998
2999         [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view
3000         https://bugs.webkit.org/show_bug.cgi?id=134323
3001
3002         Reviewed by Benjamin Poulain.
3003
3004         Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements
3005         out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale
3006         relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width.
3007         The width is clamped to get reasonable behavior on wide pages.
3008
3009         * page/FrameView.cpp:
3010         (WebCore::FrameView::rectForViewportConstrainedObjects):
3011
3012 2014-06-25  Brady Eidson  <beidson@apple.com>
3013
3014         Add new platform gamepad abstractions
3015         https://bugs.webkit.org/show_bug.cgi?id=134325
3016
3017         Reviewed by Dean Jackson.
3018
3019         No new tests (Not yet a tested config)
3020
3021         - GamepadStrategy lets ports customize the 3 basic behaviors needed for a gamepad
3022           implementation to feed the API in WebCore.
3023         - GamepadStrategyClient gives arbitrary objects in WebCore the ability to register
3024           for callbacks with the GamepadStrategy.
3025         - PlatformGamepad is a platform-agnostic object that represents the data that
3026           feeds into the Gamepad object that is exposed to web content.
3027
3028         The code in this patch is dead as-is, but https://bugs.webkit.org/show_bug.cgi?id=134324
3029         will contain an immediate follow-up patch that uses it.
3030
3031         Makes sense to review them separately.
3032
3033         * WebCore.xcodeproj/project.pbxproj:
3034
3035         * platform/GamepadStrategy.h: Added.
3036         (WebCore::GamepadStrategy::~GamepadStrategy):
3037
3038         * platform/GamepadStrategyClient.h: Added.
3039         (WebCore::GamepadStrategyClient::~GamepadStrategyClient):
3040
3041         * platform/PlatformGamepad.h: Added.
3042         (WebCore::PlatformGamepad::~PlatformGamepad):
3043         (WebCore::PlatformGamepad::id):
3044         (WebCore::PlatformGamepad::lastUpdateTime):
3045         (WebCore::PlatformGamepad::connectTime):
3046         (WebCore::PlatformGamepad::PlatformGamepad):
3047
3048         * platform/PlatformStrategies.h:
3049         (WebCore::PlatformStrategies::gamepadStrategy):
3050         (WebCore::PlatformStrategies::PlatformStrategies):
3051
3052 2014-06-25  Zalan Bujtas  <zalan@apple.com>
3053
3054         Assertion failed: CGPathAddRoundedRect asserts on non-renderable rounded rectangle.
3055         https://bugs.webkit.org/show_bug.cgi?id=134288
3056
3057         Reviewed by Simon Fraser.
3058
3059         Speculative fix. This changeset attempts to address a possible mantissa overflow of radius
3060         when checking whether the rounded rectangle is renderable.
3061         We convert both the radius and the rectangle values to CGFloat(float/double) to perform
3062         this renderable check, instead of always using float.
3063
3064         * platform/graphics/FloatRoundedRect.cpp:
3065         (WebCore::FloatRoundedRect::Radii::scale): Move scale(float, float) from RoundedRect to FloatRoundedRect.
3066         (WebCore::FloatRoundedRect::isRenderable): Add check if radius is >= 0.
3067         * platform/graphics/FloatRoundedRect.h:
3068         * platform/graphics/RoundedRect.cpp:
3069         (WebCore::RoundedRect::Radii::scale):
3070         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): use FloatRoundeRect::Radii.
3071         * platform/graphics/RoundedRect.h:
3072         * platform/graphics/cg/PathCG.cpp:
3073         (WebCore::Path::platformAddPathForRoundedRect): use epsilon() to ensure width/height is always >= even with mantissa overflow. 
3074
3075 2014-06-25  Jer Noble  <jer.noble@apple.com>
3076
3077         [MSE] removeCodedFrames() can remove more than it should
3078         https://bugs.webkit.org/show_bug.cgi?id=134320
3079
3080         Reviewed by Geoff Garen.
3081
3082         removeCodedFrames() can remove more samples than it should because it compares an iterator
3083         in presentation timespace to one in decode timespace. Clean up this code by removing frames
3084         in decode order. Rename variables and add comments to make explicit which timespace defines
3085         the iterators being used.
3086
3087         * Modules/mediasource/SourceBuffer.cpp:
3088         (WebCore::SourceBuffer::removeCodedFrames):
3089
3090 2014-06-25  Beth Dakin  <bdakin@apple.com>
3091
3092         Crash in ScrollingTree::isRubberBandInProgress()
3093         https://bugs.webkit.org/show_bug.cgi?id=134316
3094         -and corresponding-
3095         <rdar://problem/16247911>
3096
3097         Reviewed by Geoffrey Garen.
3098
3099         This crash appears to have been caused by http://trac.webkit.org/changeset/161276 
3100         which moved the ScrollingNode creation code from ScrollingTree over to 
3101         ScrollingCoordinator. This creates a thread safety issue. In the crashing case, we 
3102         believe that the ScrollingCoordinator's ScrollingTree pointer had been null-ed out
3103         even though the ScrollingTree was kept alive by the bind call to propagate 
3104         commitNewTreeState() over to the scrolling thread. The fix is to move node 
3105         creation back to the ScrollingTree and to use the this pointer to create new
3106         nodes rather than the ScrollingCoordinator's ScrollingTree pointer.
3107
3108         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
3109         * page/scrolling/AsyncScrollingCoordinator.h:
3110
3111         Re-name createNode to createScrollingTreeNode(). 
3112         * page/scrolling/ScrollingTree.cpp:
3113         (WebCore::ScrollingTree::updateTreeFromStateNode):
3114         * page/scrolling/ScrollingTree.h:
3115
3116         Remove this implementation of createNode that called into the 
3117         ScrollingCoordinator.
3118         * page/scrolling/ThreadedScrollingTree.cpp:
3119         (WebCore::ThreadedScrollingTree::createNode): Deleted.
3120         * page/scrolling/ThreadedScrollingTree.h:
3121
3122         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
3123         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
3124         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
3125         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode): Deleted.
3126
3127         Re-name createNode to createScrollingTreeNode, and actually create the nodes here.
3128         * page/scrolling/ios/ScrollingTreeIOS.cpp:
3129         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
3130         (WebCore::ScrollingTreeIOS::createNode): Deleted.
3131         * page/scrolling/ios/ScrollingTreeIOS.h:
3132
3133         Don't allow ScrollingCoordinator to handle ScrollingTreeNode creation.
3134         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3135         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3136         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode): Deleted.
3137
3138         Add the implementation of createScrollingTreeNode() for the Mac to 
3139         ScrollingTreeMac since it can create Mac-specific nodes.
3140         * page/scrolling/mac/ScrollingTreeMac.cpp:
3141         (ScrollingTreeMac::createScrollingTreeNode):
3142         * page/scrolling/mac/ScrollingTreeMac.h:
3143
3144 2014-06-25  Enrica Casucci  <enrica@apple.com>
3145
3146         iOS build fix after http://trac.webkit.org/changeset/170447.
3147         Unreviewed.
3148
3149         * editing/mac/TextUndoInsertionMarkup.h:
3150
3151 2014-06-25  Chris Fleizach  <cfleizach@apple.com>
3152
3153         Add an undo group for each dictated utterance in WebKit
3154         https://bugs.webkit.org/show_bug.cgi?id=134086
3155
3156         Reviewed by Enrica Casucci.
3157
3158         Provide a mechanism for ending the current undo group on a text insertion.
3159         This allows a stream of text, that is normally part of one undo group, to be
3160         broken up so that subsequent undo commands will only undo portions of the text stream.
3161
3162         * WebCore.exp.in:
3163         * WebCore.xcodeproj/project.pbxproj:
3164         * editing/mac/TextUndoInsertionMarkup.h: Added.
3165         * editing/mac/TextUndoInsertionMarkup.mm: Added.
3166         (WebCore::shouldRegisterInsertionUndoGroup):
3167         (WebCore::registerInsertionUndoGrouping):
3168
3169 2014-06-25  Joseph Pecoraro  <pecoraro@apple.com>
3170
3171         [iOS]: WK2 Inspector Node Search
3172         https://bugs.webkit.org/show_bug.cgi?id=134279
3173
3174         Reviewed by Benjamin Poulain.
3175
3176         * WebCore.exp.in:
3177         Export Node::inspect for WebKit2.
3178
3179 2014-06-25  Dana Burkart  <dburkart@apple.com>
3180
3181         Add support for 5-tuple versioning.
3182
3183         Reviewed by David Farler.
3184
3185         * Configurations/Version.xcconfig:
3186
3187 2014-06-25  Jer Noble  <jer.noble@apple.com>
3188
3189         [MSE][Mac] REGRESSION(r170336) - zero tolerance seeks are ignored.
3190         https://bugs.webkit.org/show_bug.cgi?id=134310
3191
3192         Reviewed by Brent Fulgham.
3193
3194         Tests for zero tolerance seeks were inadvertantly reversed in r170336.
3195
3196         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3197         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
3198
3199 2014-06-25  Jer Noble  <jer.noble@apple.com>
3200
3201         [MSE][Mac] Pause playback when readyState drops below HAVE_FUTURE_DATA, and do not complete seek until it rises above HAVE_METADATA.
3202         https://bugs.webkit.org/show_bug.cgi?id=134306
3203
3204         Reviewed by Eric Carlson.
3205
3206         Pause the synchronizer before seeking, and do not resume the synchronizer until it both reports that the seek completed,
3207         and that the readyState rises above HAVE_METADATA. In every other location where we change the rate of the synchronizer,
3208         gate that rate change on the above.
3209
3210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3211         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3212         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Check shouldBePlaying().
3213         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Ditto.
3214         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Unset m_seekCompleted.
3215         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Pause the synchronizer.
3216         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble): Check shouldBePlaying().
3217         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying): Test m_seeking, !m_seekCompleted, and the readyState.
3218         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): Set m_seekCompleted; check shouldBePlaying() and play if appropriate.
3219
3220 2014-06-25  Jer Noble  <jer.noble@apple.com>
3221
3222         [MSE] Update monitorSourceBuffers to match recent spec changes
3223         https://bugs.webkit.org/show_bug.cgi?id=134305
3224
3225         Reviewed by Eric Carlson.
3226
3227         In W3C bug #24347, the text for the third clause of Source Buffer Monitoring was updated. Update our
3228         implementation to match the new text.
3229
3230         * Modules/mediasource/MediaSource.cpp:
3231         (WebCore::MediaSource::monitorSourceBuffers):
3232
3233 2014-06-25  Alex Christensen  <achristensen@webkit.org>
3234             And peavo@outlook.com  <peavo@outlook.com>
3235
3236         Use references instead of pointers in RenderTheme.
3237         https://bugs.webkit.org/show_bug.cgi?id=134261
3238
3239         Reviewed by Zalan Bujtas.
3240
3241         * css/StyleResolver.cpp:
3242         (WebCore::StyleResolver::adjustRenderStyle):
3243         * html/TextFieldInputType.cpp:
3244         (WebCore::TextFieldInputType::shouldHaveSpinButton):
3245         * html/shadow/SliderThumbElement.cpp:
3246         (WebCore::RenderSliderThumb::updateAppearance):
3247         * platform/efl/RenderThemeEfl.cpp:
3248         (WebCore::RenderThemeEfl::adjustSizeConstraints):
3249         (WebCore::RenderThemeEfl::applyEdjeRTLState):
3250         (WebCore::RenderThemeEfl::isControlStyled):
3251         (WebCore::RenderThemeEfl::paintThemePart):
3252         (WebCore::RenderThemeEfl::supportsFocusRing):
3253         (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
3254         (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
3255         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
3256         (WebCore::RenderThemeEfl::adjustCheckboxStyle):
3257         (WebCore::RenderThemeEfl::adjustRadioStyle):
3258         (WebCore::RenderThemeEfl::adjustButtonStyle):
3259         (WebCore::RenderThemeEfl::adjustMenuListStyle):
3260         (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
3261         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
3262         (WebCore::RenderThemeEfl::adjustTextAreaStyle):
3263         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
3264         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
3265         (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
3266         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
3267         (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
3268         (WebCore::RenderThemeEfl::adjustProgressBarStyle):
3269         (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
3270         (WebCore::RenderThemeEfl::animationDurationForProgressBar):
3271         * platform/efl/RenderThemeEfl.h:
3272         * platform/gtk/RenderThemeGtk.cpp:
3273         (WebCore::RenderThemeGtk::supportsFocusRing):
3274         (WebCore::RenderThemeGtk::adjustButtonStyle):
3275         (WebCore::RenderThemeGtk::adjustMenuListStyle):
3276         (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
3277         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
3278         (WebCore::adjustSearchFieldIconStyle):
3279         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
3280         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
3281         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
3282         (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
3283         (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
3284         (WebCore::borderRadiiFromStyle):
3285         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
3286         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
3287         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
3288         (WebCore::RenderThemeGtk::adjustProgressBarStyle):
3289         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar):
3290         (WebCore::RenderThemeGtk::animationDurationForProgressBar):
3291         (WebCore::RenderThemeGtk::calculateProgressRect):
3292         * platform/gtk/RenderThemeGtk.h:
3293         * platform/gtk/RenderThemeGtk2.cpp:
3294         (WebCore::setToggleSize):
3295         (WebCore::RenderThemeGtk::setCheckboxSize):
3296         (WebCore::RenderThemeGtk::setRadioSize):
3297         (WebCore::RenderThemeGtk::comboBoxArrowSize):
3298         (WebCore::RenderThemeGtk::getComboBoxPadding):
3299         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
3300         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
3301         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
3302         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
3303         (WebCore::RenderThemeGtk::paintMenuList):
3304         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
3305         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
3306         * platform/gtk/RenderThemeGtk3.cpp:
3307         (WebCore::setToggleSize):
3308         (WebCore::RenderThemeGtk::setCheckboxSize):
3309         (WebCore::RenderThemeGtk::setRadioSize):
3310         (WebCore::getComboBoxMetrics):
3311         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
3312         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
3313         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
3314         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
3315         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
3316         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
3317         * rendering/RenderButton.cpp:
3318         (WebCore::RenderButton::layout):
3319         * rendering/RenderInline.cpp:
3320         (WebCore::RenderInline::paintOutline):
3321         * rendering/RenderMediaControls.cpp:
3322         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
3323         * rendering/RenderMediaControls.h:
3324         * rendering/RenderMenuList.cpp:
3325         (WebCore::RenderMenuList::adjustInnerStyle):
3326         (RenderMenuList::computeIntrinsicLogicalWidths):
3327         (RenderMenuList::menuStyle):
3328         * rendering/RenderMeter.cpp:
3329         (WebCore::RenderMeter::updateLogicalWidth):
3330         (WebCore::RenderMeter::computeLogicalHeight):
3331         * rendering/RenderObject.cpp:
3332         (WebCore::RenderObject::paintOutline):
3333         * rendering/RenderProgress.cpp:
3334         (WebCore::RenderProgress::updateAnimationState):
3335         * rendering/RenderTextControlSingleLine.cpp:
3336         (WebCore::RenderTextControlSingleLine::layout):
3337         * rendering/RenderTheme.cpp:
3338         (WebCore::RenderTheme::adjustStyle):
3339         (WebCore::RenderTheme::isControlStyled):
3340         (WebCore::RenderTheme::supportsFocusRing):
3341         (WebCore::RenderTheme::stateChanged):
3342         (WebCore::RenderTheme::adjustCheckboxStyle):
3343         (WebCore::RenderTheme::adjustRadioStyle):
3344         (WebCore::RenderTheme::adjustButtonStyle):
3345         (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
3346         (WebCore::RenderTheme::adjustTextFieldStyle):
3347         (WebCore::RenderTheme::adjustTextAreaStyle):
3348         (WebCore::RenderTheme::adjustMenuListStyle):
3349         (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
3350         (WebCore::RenderTheme::adjustMeterStyle):
3351         (WebCore::RenderTheme::meterSizeForBounds):
3352         (WebCore::RenderTheme::animationRepeatIntervalForProgressBar):
3353         (WebCore::RenderTheme::animationDurationForProgressBar):
3354         (WebCore::RenderTheme::adjustProgressBarStyle):
3355         (WebCore::RenderTheme::shouldHaveSpinButton):
3356         (WebCore::RenderTheme::adjustMediaControlStyle):
3357         (WebCore::RenderTheme::adjustSliderTrackStyle):
3358         (WebCore::RenderTheme::adjustSliderThumbStyle):
3359         (WebCore::RenderTheme::adjustSliderThumbSize):
3360         (WebCore::RenderTheme::adjustSearchFieldStyle):
3361         (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
3362         (WebCore::RenderTheme::adjustSearchFieldDecorationPartStyle):
3363         (WebCore::RenderTheme::adjustSearchFieldResultsDecorationPartStyle):
3364         (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
3365         * rendering/RenderTheme.h:
3366         (WebCore::RenderTheme::supportsHover):
3367         (WebCore::RenderTheme::minimumMenuListSize):
3368         (WebCore::RenderTheme::popupInternalPaddingLeft):
3369         (WebCore::RenderTheme::popupInternalPaddingRight):
3370         (WebCore::RenderTheme::popupInternalPaddingTop):
3371         (WebCore::RenderTheme::popupInternalPaddingBottom):
3372         (WebCore::RenderTheme::popupMenuSize):
3373         (WebCore::RenderTheme::setCheckboxSize):
3374         (WebCore::RenderTheme::setRadioSize):
3375         (WebCore::RenderTheme::setButtonSize):
3376         * rendering/RenderThemeIOS.h:
3377         * rendering/RenderThemeIOS.mm:
3378         (WebCore::RenderThemeIOS::adjustCheckboxStyle):
3379         (WebCore::RenderThemeIOS::isControlStyled):
3380         (WebCore::RenderThemeIOS::adjustRadioStyle):
3381         (WebCore::RenderThemeIOS::popupInternalPaddingRight):
3382         (WebCore::RenderThemeIOS::adjustRoundBorderRadius):
3383         (WebCore::RenderThemeIOS::adjustMenuListButtonStyle):
3384         (WebCore::RenderThemeIOS::adjustSliderTrackStyle):
3385         (WebCore::RenderThemeIOS::adjustSliderThumbSize):
3386         (WebCore::RenderThemeIOS::animationRepeatIntervalForProgressBar):
3387         (WebCore::RenderThemeIOS::animationDurationForProgressBar):
3388         (WebCore::RenderThemeIOS::adjustSearchFieldStyle):
3389         (WebCore::RenderThemeIOS::adjustButtonStyle):
3390         (WebCore::RenderThemeIOS::setButtonSize):
3391         (WebCore::RenderThemeIOS::shouldHaveSpinButton):
3392         * rendering/RenderThemeMac.h:
3393         * rendering/RenderThemeMac.mm:
3394         (WebCore::RenderThemeMac::isControlStyled):
3395         (WebCore::RenderThemeMac::controlSizeForFont):
3396         (WebCore::RenderThemeMac::sizeForFont):
3397         (WebCore::RenderThemeMac::sizeForSystemFont):
3398         (WebCore::RenderThemeMac::setSizeFromFont):
3399         (WebCore::RenderThemeMac::setFontFromControlSize):
3400         (WebCore::RenderThemeMac::controlSizeForSystemFont):
3401         (WebCore::RenderThemeMac::adjustTextFieldStyle):
3402         (WebCore::RenderThemeMac::adjustTextAreaStyle):
3403         (WebCore::RenderThemeMac::paintMenuList):
3404         (WebCore::RenderThemeMac::meterSizeForBounds):
3405         (WebCore::RenderThemeMac::paintMeter):
3406         (WebCore::RenderThemeMac::levelIndicatorFor):
3407         (WebCore::RenderThemeMac::progressBarRectForBounds):
3408         (WebCore::RenderThemeMac::minimumProgressBarHeight):
3409         (WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
3410         (WebCore::RenderThemeMac::animationDurationForProgressBar):
3411         (WebCore::RenderThemeMac::adjustProgressBarStyle):
3412         (WebCore::RenderThemeMac::paintProgressBar):
3413         (WebCore::RenderThemeMac::adjustMenuListStyle):
3414         (WebCore::RenderThemeMac::popupInternalPaddingLeft):
3415         (WebCore::RenderThemeMac::popupInternalPaddingRight):
3416         (WebCore::RenderThemeMac::popupInternalPaddingTop):
3417         (WebCore::RenderThemeMac::popupInternalPaddingBottom):
3418         (WebCore::RenderThemeMac::popupMenuSize):
3419         (WebCore::RenderThemeMac::minimumMenuListSize):
3420         (WebCore::RenderThemeMac::adjustSliderTrackStyle):
3421         (WebCore::RenderThemeMac::adjustSliderThumbStyle):
3422         (WebCore::RenderThemeMac::setSearchCellState):
3423         (WebCore::RenderThemeMac::setSearchFieldSize):
3424         (WebCore::RenderThemeMac::adjustSearchFieldStyle):
3425         (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
3426         (WebCore::RenderThemeMac::adjustSearchFieldDecorationPartStyle):
3427         (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationPartStyle):
3428         (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
3429         (WebCore::RenderThemeMac::adjustSliderThumbSize):
3430         * rendering/RenderThemeSafari.cpp:
3431         (WebCore::RenderThemeSafari::isControlStyled):
3432         (WebCore::RenderThemeSafari::adjustRepaintRect):
3433         (WebCore::RenderThemeSafari::baselinePosition):
3434         (WebCore::RenderThemeSafari::controlSizeForFont):
3435         (WebCore::RenderThemeSafari::sizeForFont):
3436         (WebCore::RenderThemeSafari::sizeForSystemFont):
3437         (WebCore::RenderThemeSafari::setSizeFromFont):
3438         (WebCore::RenderThemeSafari::setFontFromControlSize):
3439         (WebCore::RenderThemeSafari::controlSizeForSystemFont):
3440         (WebCore::RenderThemeSafari::paintCheckbox):
3441         (WebCore::RenderThemeSafari::setCheckboxSize):
3442         (WebCore::RenderThemeSafari::paintRadio):
3443         (WebCore::RenderThemeSafari::setRadioSize):
3444         (WebCore::RenderThemeSafari::setButtonPaddingFromControlSize):
3445         (WebCore::RenderThemeSafari::adjustButtonStyle):
3446       &