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