3dd69f745383179f5e6e635f5199e4b949fc5c24
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-06-12  Alex Christensen  <achristensen@webkit.org>
2
3         Collect correct web timing data from CFNetwork.
4         https://bugs.webkit.org/show_bug.cgi?id=133824
5         <rdar://problem/17273654>
6
7         Reviewed by Simon Fraser.
8
9         Covered by existing web timing tests.
10
11         * platform/network/mac/ResourceHandleMac.mm:
12         (WebCore::ResourceHandle::getConnectionTimingData):
13         Use _kCFNTimingDataFetchStart as the reference start time key.
14
15 2014-06-12  Brent Fulgham  <bfulgham@apple.com>
16
17         Convert TileController and TileGrid from ObjC to C++
18         https://bugs.webkit.org/show_bug.cgi?id=133819
19         <rdar://problem/17291841>
20
21         Reviewed by Tim Horton.
22
23         Convert TileGrid.mm and TileController.mm into C++ implementations. This required creating a 'frameForLayer'
24         wrapper to call the 'frame' method of the CALayer object.
25
26         * WebCore.xcodeproj/project.pbxproj:
27         * platform/graphics/ca/mac/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.mm.
28         (WebCore::TileController::blankPixelCountForTiles):
29         * platform/graphics/ca/mac/TileController.mm: Removed.
30         * platform/graphics/ca/mac/TileGrid.cpp: Copied from platform/graphics/ca/mac/TileGrid.mm.
31         * platform/graphics/ca/mac/TileGrid.h:
32         * platform/graphics/ca/mac/TileGrid.mm: Removed.
33         * platform/graphics/mac/WebLayer.h:
34         * platform/graphics/mac/WebLayer.mm:
35         (WebCore::frameForLayer): Wrapper function to hide ObjC call from C++ compilation unit.
36
37 2014-06-12  Simon Fraser  <simon.fraser@apple.com>
38
39         [iOS WK2] Fix crash on back/foward swipe
40         https://bugs.webkit.org/show_bug.cgi?id=133826
41         <rdar://problem/17032752>
42
43         Reviewed by Tim Horton.
44
45         AsyncScrollingCoordinator::frameViewForScrollingNode() would crash with a null root
46         state node, because HistoryController::restoreScrollPositionAndViewState() tried
47         to restore scroll position (via restoreViewState()) before hooking up the scrolling
48         coordinator.
49         
50         Fix by doing the scrollingCoordinator->frameViewRootLayerDidChange() before
51         calling restoreViewState().
52         
53         Also add a defensive null-check on the root state node in updateScrollPositionAfterAsyncScrollTimerFired().
54
55         * loader/HistoryController.cpp:
56         (WebCore::HistoryController::restoreScrollPositionAndViewState):
57         * page/scrolling/AsyncScrollingCoordinator.cpp:
58         (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode):
59
60 2014-06-12  Anders Carlsson  <andersca@apple.com>
61
62         Add a space after the comma.
63
64         * platform/network/HTTPHeaderMap.cpp:
65         (WebCore::HTTPHeaderMap::add):
66
67 2014-06-12  Anders Carlsson  <andersca@apple.com>
68
69         Move header value merging to HTTPHeaderMap
70         https://bugs.webkit.org/show_bug.cgi?id=133815
71
72         Reviewed by Andreas Kling.
73
74         * platform/network/HTTPHeaderMap.cpp:
75         (WebCore::HTTPHeaderMap::set):
76         (WebCore::HTTPHeaderMap::add):
77         * platform/network/HTTPHeaderMap.h:
78         * platform/network/ResourceRequestBase.cpp:
79         (WebCore::ResourceRequestBase::addHTTPHeaderField):
80         * platform/network/ResourceResponseBase.cpp:
81         (WebCore::ResourceResponseBase::addHTTPHeaderField):
82         * xml/XMLHttpRequest.cpp:
83         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
84
85 2014-06-12  Anders Carlsson  <andersca@apple.com>
86
87         Add ShapeValue.cpp and move ShapeValue::isImageValid() there
88         https://bugs.webkit.org/show_bug.cgi?id=133809
89
90         Reviewed by Antti Koivisto.
91
92         This gets rid of CachedImage.h (and ResourceRequest and friends) from RenderStyle.h.
93
94         * CMakeLists.txt:
95         * WebCore.vcxproj/WebCore.vcxproj:
96         * WebCore.vcxproj/WebCore.vcxproj.filters:
97         * WebCore.xcodeproj/project.pbxproj:
98         * css/CSSComputedStyleDeclaration.cpp:
99         (WebCore::shapePropertyValue):
100         * css/CSSCrossfadeValue.cpp:
101         * css/CSSFilterImageValue.cpp:
102         * css/StyleResolver.h:
103         * page/animation/CSSPropertyAnimation.cpp:
104         (WebCore::blendFunc):
105         * rendering/ShapeValue.cpp: Added.
106         (WebCore::ShapeValue::isImageValid):
107         * rendering/shapes/ShapeOutsideInfo.cpp:
108         (WebCore::referenceBox):
109         (WebCore::ShapeOutsideInfo::computedShape):
110         (WebCore::ShapeOutsideInfo::isEnabledFor):
111         * rendering/style/ShapeValue.h:
112         (WebCore::ShapeValue::type):
113         (WebCore::ShapeValue::setImage):
114         (WebCore::ShapeValue::ShapeValue):
115         (WebCore::ShapeValue::isImageValid): Deleted.
116
117 2014-06-12  Zalan Bujtas  <zalan@apple.com>
118
119         Subpixel rendering: Make <select> element's decoration subpixel aware.
120         https://bugs.webkit.org/show_bug.cgi?id=133781
121         <rdar://problem/17272083>
122
123         Reviewed by Simon Fraser.
124
125         Enable <select> decoration painting on subpixel positions.
126         The theme size is still integral, but its position is snapped to device pixels.
127         Theme's label, the InlineTextBox is already subpixel position aware.
128         webkit.org/b/132005 tracks the rest of the themes.
129
130         Not testable.
131
132         * rendering/RenderTheme.cpp:
133         (WebCore::RenderTheme::paint):
134         * rendering/RenderTheme.h:
135         (WebCore::RenderTheme::paintMenuList):
136         * rendering/RenderThemeMac.h:
137         * rendering/RenderThemeMac.mm:
138         (WebCore::inflateRect):
139         (WebCore::RenderThemeMac::adjustRepaintRect):
140         (WebCore::RenderThemeMac::paintMenuList):
141         (WebCore::RenderThemeMac::progressBarRectForBounds):
142         (WebCore::RenderThemeMac::setPopupButtonCellState):
143         (WebCore::RenderThemeMac::inflateRect): Deleted.
144
145 2014-06-12  Jer Noble  <jer.noble@apple.com>
146
147         [MSE][Mac] Crash in MediaSourcePrivateAVFObjC::naturalSize()
148         https://bugs.webkit.org/show_bug.cgi?id=133789
149
150         Reviewed by Eric Carlson.
151
152         Add null-check to proctect against being queried for the naturalSize before we have a
153         m_mediaSourcePrivate.
154
155         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
156         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
157
158 2014-06-12  Alberto Garcia  <berto@igalia.com>
159
160         [GTK] fails to build with --disable-webgl --disable-accelerated-compositing
161         https://bugs.webkit.org/show_bug.cgi?id=131267
162
163         Reviewed by Philippe Normand.
164
165         Add missing headers needed for Float32Array::create().
166
167         * Modules/webaudio/AudioBuffer.cpp:
168
169 2014-06-12  Sergio Villar Senin  <svillar@igalia.com>
170
171         [GTK] REGRESSION: application name is not correctly appended to the UA
172         https://bugs.webkit.org/show_bug.cgi?id=133793
173
174         Reviewed by Carlos Garcia Campos.
175
176         We must use a blank to separate the default UA provided by WebKitGtk
177         from the application name coming from the public API.
178
179         Added an extra test case to the API tests to catch regressions.
180
181         * platform/gtk/UserAgentGtk.cpp:
182         (WebCore::standardUserAgent):
183
184 2014-06-12  Zan Dobersek  <zdobersek@igalia.com>
185
186         WorkerRunLoop::Task::performTask should take in WorkerGlobalScope* to avoid downcasting
187         https://bugs.webkit.org/show_bug.cgi?id=133616
188
189         Reviewed by Andreas Kling.
190
191         * workers/WorkerRunLoop.cpp:
192         (WebCore::WorkerRunLoop::Task::performTask): Demand the context parameter to be a pointer
193         to WorkerGlobalScope instead of ScriptExecutionContext, avoiding an unnecessary downcast.
194         In the future this complete code path should use a reference to WorkerGlobalScope instead
195         of a pointer.
196         * workers/WorkerRunLoop.h:
197
198 2014-06-12  Sergio Villar Senin  <svillar@igalia.com>
199
200         [GTK] Unsupported browser in www.icloud.com
201         https://bugs.webkit.org/show_bug.cgi?id=133403
202
203         Reviewed by Martin Robinson.
204
205         We claim to be Safari (among others) to ensure maximum
206         compatibility with existing web sites. Valid Safari UA strings do
207         always (since Safari 3.0) contain the string "Version/X" before
208         the "Safari/X" part. We were wrongly only adding it in very
209         specific cases and we were placing it at the wrong position as it
210         must precede the "Safari/X" part.
211
212         From now on we unconditionally prepend the "Version/X" string to
213         the "Safari/X" part as we always claim to be Safari. This makes
214         the NeedsSafariVersion6 quirk invalid. This not only fixes
215         "unsupported browser" issues in icloud.com, but also in
216         globalforestwatch.com and live.com among many others.
217
218         Apart from that I'm bumping the Safari Version in the UA to 8.0 as
219         we're already claiming to be "Safari/538.35"" which corresponds to
220         Safari 8 beta.
221
222         * platform/gtk/UserAgentGtk.cpp:
223         (WebCore::buildUserAgentString):
224         (WebCore::standardUserAgentForURL):
225
226 2014-06-12  Pratik Solanki  <psolanki@apple.com>
227
228         Avoid creating a CFData when checking if a resource is file backed
229         https://bugs.webkit.org/show_bug.cgi?id=133783
230
231         Reviewed by Andreas Kling.
232
233         Export SharedBuffer::hasPlatformData().
234
235         No new tests because no functional changes.
236
237         * WebCore.exp.in:
238         * platform/SharedBuffer.h:
239
240 2014-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
241
242         SVGGlyphToPathTranslator ASSERTs when encountering a missing glyph in an SVG font
243         https://bugs.webkit.org/show_bug.cgi?id=133528
244
245         Reviewed by Simon Fraser.
246
247         Turns out this assertion is benign. We can take an early out of advance() (which
248         is then handled properly by Font::dashesForIntersectionsWithRect()
249
250         Test: svg/custom/skip-underline-missing-glyph.html
251
252         * platform/graphics/mac/FontMac.mm:
253         (WebCore::Font::dashesForIntersectionsWithRect): Rather than skip partial results,
254         don't skip anything at all to be consistent.
255         * rendering/svg/SVGTextRunRenderingContext.cpp:
256         (WebCore::SVGGlyphToPathTranslator::advance): Take an early out to avoid an ASSERT.
257
258 2014-06-11  Simon Fraser  <simon.fraser@apple.com>
259
260         [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
261         https://bugs.webkit.org/show_bug.cgi?id=133779
262
263         Reviewed by Benjamin Poulain.
264
265         Add a "testing" viewport configuration with initial scale of 1.
266
267         * WebCore.exp.in:
268         * page/ViewportConfiguration.cpp:
269         (WebCore::ViewportConfiguration::testingParameters):
270         * page/ViewportConfiguration.h:
271
272 2014-06-11  Pratik Solanki  <psolanki@apple.com>
273
274         Keep CFDataRefs in SharedBuffer instead of merging them
275         https://bugs.webkit.org/show_bug.cgi?id=133775
276
277         Reviewed by Alexey Proskuryakov.
278
279         Instead of merging the CFDataRefs into one buffer, save them in as CFDataRefs in
280         SharedBuffer. They will get merged when code calls buffer() later on.
281
282         No new tests because no functional changes.
283
284         * platform/network/cf/ResourceHandleCFNet.cpp:
285         (WebCore::ResourceHandle::handleDataArray):
286
287 2014-06-11  Alexey Proskuryakov  <ap@apple.com>
288
289         editing/selection/selection-in-iframe-removed-crash.html or selection-invalid-offset.html crashes intermittently
290         https://bugs.webkit.org/show_bug.cgi?id=111521
291         <rdar://problem/15159351>
292
293         Reviewed by Brady Eidson.
294
295         Covered by existing tests.
296
297         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::commitData): Bail out if the
298         load was canceled from under receivedFirstData(). Since this is where we commit the
299         load, there are ample opportunities for scripts or clients to do anything.
300
301 2014-06-11  Zalan Bujtas  <zalan@apple.com>
302
303         Subpixel rendering: RenderBox's content clipping should clip on device pixel boundary.
304         https://bugs.webkit.org/show_bug.cgi?id=133767
305         <rdar://problem/17272365>
306
307         Reviewed by Simon Fraser.
308
309         Push RenderBox's content clipping to device pixel boundaries. Integral snapping makes
310         content cut off prematurely.
311
312         Test: fast/inline-block/hidpi-margin-top-with-subpixel-value-and-overflow-hidden.html
313
314         * rendering/RenderBox.cpp:
315         (WebCore::RenderBox::pushContentsClip):
316
317 2014-06-11  Anders Carlsson  <andersca@apple.com>
318
319         Remove XHRReplayData::addHeader
320         https://bugs.webkit.org/show_bug.cgi?id=133776
321
322         Reviewed by Antti Koivisto.
323
324         Just pass the HTTP header map to XHRReplayData::create directly.
325
326         * inspector/InspectorResourceAgent.cpp:
327         (WebCore::InspectorResourceAgent::willLoadXHR):
328         * inspector/NetworkResourcesData.cpp:
329         (WebCore::XHRReplayData::create):
330         (WebCore::XHRReplayData::XHRReplayData):
331         (WebCore::XHRReplayData::addHeader): Deleted.
332         * inspector/NetworkResourcesData.h:
333
334 2014-06-11  Andy Estes  <aestes@apple.com>
335
336         Fix the Mac build.
337
338         * WebCore.exp.in: Exported __ZN7WebCore19ResourceRequestBase15setHTTPReferrerERKN3WTF6StringE
339         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Moved ivar declarations to @interface to account for the 32-bit legacy runtime.
340
341 2014-06-11  Simon Fraser  <simon.fraser@apple.com>
342
343         Make FrameView 8 bytes smaller
344         https://bugs.webkit.org/show_bug.cgi?id=133771
345
346         Reviewed by Anders Carlsson.
347
348         m_borderX and m_borderY were historical cruft.
349
350         * page/FrameView.cpp:
351         (WebCore::FrameView::reset):
352         * page/FrameView.h:
353
354 2014-06-11  David Kilzer  <ddkilzer@apple.com>
355
356         WindowFeatures arguments shoud ignore invalid characters in values
357         <http://webkit.org/b/133703>
358         <rdar://problem/17254118>
359
360         Reviewed by Andy Estes.
361
362         Test: fast/dom/Window/window-property-invalid-characters-ignored.html
363
364         * page/WindowFeatures.cpp:
365         (WebCore::WindowFeatures::WindowFeatures): Set |length| based on
366         |buffer|, not |features|.  Switch to using a for loop.  Switch
367         to unsigned types since we are working with positive offsets
368         into a String.
369
370 2014-06-11  David Kilzer  <ddkilzer@apple.com>
371
372         Viewport arguments should ignore invalid characters in values
373         <http://webkit.org/b/133555>
374         <rdar://problem/17179650>
375
376         Reviewed by Daniel Bates.
377
378         Test: fast/viewport/viewport-warnings-7.html
379
380         * dom/Document.cpp:
381         (WebCore::Document::processArguments): Set |length| based on
382         |buffer|, not |features|.  Switch to using a for loop.  Switch
383         to unsigned types since we are working with positive offsets
384         into a String.
385
386 2014-06-11  Anders Carlsson  <andersca@apple.com>
387
388         Move some HTTP header field accessors to ResourceRequestBase.cpp
389         https://bugs.webkit.org/show_bug.cgi?id=133773
390
391         Reviewed by Andreas Kling.
392
393         This will avoid having to include HTTPHeaderNames.h from ResourceRequestBase.h.
394
395         * platform/network/ResourceRequestBase.cpp:
396         (WebCore::ResourceRequestBase::httpContentType):
397         (WebCore::ResourceRequestBase::setHTTPContentType):
398         (WebCore::ResourceRequestBase::httpReferrer):
399         (WebCore::ResourceRequestBase::setHTTPReferrer):
400         (WebCore::ResourceRequestBase::httpOrigin):
401         (WebCore::ResourceRequestBase::setHTTPOrigin):
402         (WebCore::ResourceRequestBase::httpUserAgent):
403         (WebCore::ResourceRequestBase::setHTTPUserAgent):
404         (WebCore::ResourceRequestBase::httpAccept):
405         (WebCore::ResourceRequestBase::setHTTPAccept):
406         * platform/network/ResourceRequestBase.h:
407         (WebCore::ResourceRequestBase::httpContentType): Deleted.
408         (WebCore::ResourceRequestBase::setHTTPContentType): Deleted.
409         (WebCore::ResourceRequestBase::httpReferrer): Deleted.
410         (WebCore::ResourceRequestBase::setHTTPReferrer): Deleted.
411         (WebCore::ResourceRequestBase::httpOrigin): Deleted.
412         (WebCore::ResourceRequestBase::setHTTPOrigin): Deleted.
413         (WebCore::ResourceRequestBase::httpUserAgent): Deleted.
414         (WebCore::ResourceRequestBase::setHTTPUserAgent): Deleted.
415         (WebCore::ResourceRequestBase::httpAccept): Deleted.
416         (WebCore::ResourceRequestBase::setHTTPAccept): Deleted.
417
418 2014-06-11  Anders Carlsson  <andersca@apple.com>
419
420         Remove some more unneeded member functions from HTTPHeaderMap
421         https://bugs.webkit.org/show_bug.cgi?id=133768
422
423         Reviewed by Simon Fraser.
424
425         * loader/CrossOriginAccessControl.cpp:
426         (WebCore::createAccessControlPreflightRequest):
427         * platform/network/HTTPHeaderMap.cpp:
428         (WebCore::HTTPHeaderMap::find): Deleted.
429         (WebCore::HTTPHeaderMap::keys): Deleted.
430         * platform/network/HTTPHeaderMap.h:
431
432 2014-06-11  Jer Noble  <jer.noble@apple.com>
433
434         Unreviwed Mac release build fix; mark the keyPath parameter as unused.
435
436         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
437         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
438
439 2014-06-11  Brent Fulgham  <bfulgham@apple.com>
440
441         [Win] Avoid deadlock with AVFoundation
442         https://bugs.webkit.org/show_bug.cgi?id=133762
443         <rdar://problem/17128248>
444
445         Reviewed by Eric Carlson.
446
447         Always invoke our notifications asynchronously so that we do not
448         execute long-running code while holding the AVFWrapper map mutex
449         lock. AVFoundationCF callbacks can deadlock if we call into AVF
450         while holding this lock.
451
452
453         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
454         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
455
456 2014-06-11  Csaba Osztrogonác  <ossy@webkit.org>
457
458         [CMake] One more URTBF after r169826.
459
460         * CMakeLists.txt: Generate files to the proper place.
461
462 2014-06-11  Csaba Osztrogonác  <ossy@webkit.org>
463
464         [CMake]URTBF after r169826.
465
466         * CMakeLists.txt: Typo fix.
467
468 2014-06-11  Anders Carlsson  <andersca@apple.com>
469
470         Get rid of an unneeded HTTPHeaderMap::remove overload
471         https://bugs.webkit.org/show_bug.cgi?id=133763
472
473         Reviewed by Andreas Kling.
474
475         Change HTTPHeaderMap::remove to return whether an entry was removed or not and simplify
476         ResourceRequestBase::clearHTTPAuthorization.
477
478         * platform/network/HTTPHeaderMap.cpp:
479         (WebCore::HTTPHeaderMap::remove):
480         * platform/network/HTTPHeaderMap.h:
481         * platform/network/ResourceRequestBase.cpp:
482         (WebCore::ResourceRequestBase::clearHTTPAuthorization):
483
484 2014-06-11  Jer Noble  <jer.noble@apple.com>
485
486         [EME][Mac] Propagate errors from AVSampleBufferDisplayLayer through to MSE
487         https://bugs.webkit.org/show_bug.cgi?id=133747
488
489         Reviewed by Eric Carlson.
490
491         Abstract out the delivery of errors in MediaKeySession into its own method, which can be triggered by 
492         CDMSession objects through the CDMSessionClient interface:
493         * Modules/encryptedmedia/MediaKeySession.cpp:
494         (WebCore::MediaKeySession::keyRequestTimerFired):
495         (WebCore::MediaKeySession::addKeyTimerFired):
496         (WebCore::MediaKeySession::sendMessage):
497         (WebCore::MediaKeySession::sendError):
498         * Modules/encryptedmedia/MediaKeySession.h:
499         * Modules/mediasource/SourceBuffer.cpp:
500         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError):
501         * Modules/mediasource/SourceBuffer.h:
502         * platform/graphics/SourceBufferPrivateClient.h:
503         * platform/graphics/CDMSession.h:
504
505         Add an Objective-C object which can listen for error KVO notifications:
506         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
507         (WebCore::SourceBufferPrivateAVFObjCErrorClient::~SourceBufferPrivateAVFObjCErrorClient):
508         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
509         (-[WebAVSampleBufferErrorListener initWithParent:WebCore::]):
510         (-[WebAVSampleBufferErrorListener dealloc]):
511         (-[WebAVSampleBufferErrorListener invalidate]):
512         (-[WebAVSampleBufferErrorListener beginObservingLayer:]):
513         (-[WebAVSampleBufferErrorListener stopObservingLayer:]):
514         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
515         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
516         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
517         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]):
518         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
519         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
520         (WebCore::SourceBufferPrivateAVFObjC::registerForErrorNotifications):
521         (WebCore::SourceBufferPrivateAVFObjC::unregisterForErrorNotifications):
522         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
523         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
524
525         Register for the new error notifications:
526         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
527         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Moved to source file.
528         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
529         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Register for error notifications.
530         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Unregister for error notifications.
531         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Pass through to CDMSessionClient.
532         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
533
534 2014-06-11  Andreas Kling  <akling@apple.com>
535
536         Don't force CharacterData to override getOwnPropertySlot.
537         <https://webkit.org/b/133717>
538
539         This was preventing us from taking the GetByVal fast path for Text nodes
540         since they inherit from CharacterData and having a "length" attribute
541         meant we gave them a custom getOwnPropertySlot, despite not actually
542         needing it for anything.
543
544         Reviewed by Anders Carlsson.
545
546         * bindings/scripts/CodeGeneratorJS.pm:
547         (AttributeShouldBeOnInstance):
548
549 2014-06-11  Anders Carlsson  <andersca@apple.com>
550
551         Add a script that generates a gperf hash for HTTP header names
552         https://bugs.webkit.org/show_bug.cgi?id=133760
553
554         Reviewed by Andreas Kling.
555
556         This is the first step towards getting rid of AtomicString from HTTPHeaderMap.
557
558         * CMakeLists.txt:
559         * DerivedSources.make:
560         * WebCore.vcxproj/WebCore.vcxproj:
561         * WebCore.xcodeproj/project.pbxproj:
562         * platform/network/HTTPHeaderNames.in: Added.
563         * platform/network/create-http-header-name-table: Added.
564         (HTTPHeaderName):
565
566 2014-06-11  Brent Fulgham  <bfulgham@apple.com>
567
568         ROLLOUT: r153510: Broke Table borders on Wikipedia
569         https://bugs.webkit.org/show_bug.cgi?id=132802
570         <rdar://problem/16792562>
571
572         * rendering/RenderTableCell.cpp:
573         (WebCore::RenderTableCell::paintCollapsedBorders):
574         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect): Deleted.
575         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect): Deleted.
576         * rendering/RenderTableCell.h:
577
578 2014-06-11  peavo@outlook.com  <peavo@outlook.com>
579
580         [Curl] Empty headers in request response.
581         https://bugs.webkit.org/show_bug.cgi?id=133483
582
583         Reviewed by Brent Fulgham.
584
585         When a request is taken from the cache, its cached response headers are empty, if the cache entry was created in the same session.
586         It is only when the cache entry is loaded from disc, that the response headers are properly set.
587         We need to set the cached response headers in both cases.
588         There is also an issue if two jobs are loading the same url at the same time.
589         Both jobs will then write to the cache content file, and create invalid content.
590         This can be fixed by only letting the first request write to the content file.
591
592         * platform/network/curl/CurlCacheEntry.cpp:
593         (WebCore::CurlCacheEntry::CurlCacheEntry):
594         (WebCore::CurlCacheEntry::isLoading): Added method to check if cache entry is loading the content.
595         (WebCore::CurlCacheEntry::saveResponseHeaders): Set the cached response headers when response is saved.
596         (WebCore::CurlCacheEntry::invalidate): To be on the safe side, close content file when entry is invalidated.
597         (WebCore::CurlCacheEntry::parseResponseHeaders): Made parameter const.
598         * platform/network/curl/CurlCacheEntry.h: Keep track of which job is creating this cache entry.
599         (WebCore::CurlCacheEntry::getJob):
600         * platform/network/curl/CurlCacheManager.cpp:
601         (WebCore::CurlCacheManager::loadIndex): When cache entry is loaded from disc, there is no associated job.
602         (WebCore::CurlCacheManager::didReceiveResponse): Bail out if cache entry is already currently loading,
603         otherwise associate this job with the new cache entry.
604         (WebCore::CurlCacheManager::didFinishLoading): Changed parameter type.
605         (WebCore::CurlCacheManager::isCached): Don't report the url as cached if it's currently loading content.
606         (WebCore::CurlCacheManager::didReceiveData): Don't write to the content file if the entry is not associated with the job.
607         (WebCore::CurlCacheManager::didFail): Changed parameter type.
608         * platform/network/curl/CurlCacheManager.h: Changed parameter type.
609         * platform/network/curl/ResourceHandleManager.cpp: Ditto.
610         (WebCore::writeCallback):
611         (WebCore::ResourceHandleManager::downloadTimerCallback):
612
613 2014-06-11  Sam Weinig  <sam@webkit.org>
614
615         REGRESSION (r133705): Layout Test js/dom/webidl-type-mapping.html is failing
616         https://bugs.webkit.org/show_bug.cgi?id=133736
617
618         * bindings/scripts/CodeGeneratorJS.pm:
619         (GenerateImplementation):
620         Turns out we can't remove the HashTable yet after all, as JavaScriptCore
621         relies on hasSetterOrReadonlyProperties bit to make put work correctly. We
622         can, however, skip creating the table, and just use the value array during
623         reification. 
624
625 2014-06-11  Chris Fleizach  <cfleizach@apple.com>
626
627         AX: iOS: VoiceOver ignores input type = date in Safari on iOS7
628         https://bugs.webkit.org/show_bug.cgi?id=133709
629
630         Reviewed by Mario Sanchez Prada.
631
632         The date field on iOS appears as a popup button, which is not a type we had encountered for <input> types.
633         This returns an appropriate role in that case.
634
635         * accessibility/AccessibilityRenderObject.cpp:
636         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
637
638 2014-06-11  Zan Dobersek  <zdobersek@igalia.com>
639
640         Avoid FontGlyphsCacheKey copy in FontGlyphsCacheEntry constructor
641         https://bugs.webkit.org/show_bug.cgi?id=133674
642
643         Reviewed by Andreas Kling.
644
645         * platform/graphics/Font.cpp:
646         (WebCore::FontGlyphsCacheEntry::FontGlyphsCacheEntry): The FontGlyphsCacheKey
647         variable is already passed-in as an rvalue reference, so it should be moved
648         into the constructor of the corresponding member variable instead of copied.
649
650 2014-06-11  Andy Estes  <aestes@apple.com>
651
652         Fix the build after after r169789 on platforms that build with -Wunused-const-variable
653
654         * bindings/scripts/CodeGeneratorJS.pm:
655         (GenerateHashTable): Don't create the value array if it'll never be used.
656
657 2014-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
658
659         [GTK] Use a different user agent string depending on the site
660         https://bugs.webkit.org/show_bug.cgi?id=132681
661
662         Reviewed by Anders Carlsson.
663
664         We have changed the user agent string several times to try to fix
665         broken websites that require specific things in the UA string to
666         properly work. But everytime we change the UA string to fix a
667         website we break others. We could use different UA string
668         depending on the website. UserAgentGtk code has also been cleaned
669         up, using NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
670         and avoiding unneeded conversions to UTF-8.
671
672         * platform/gtk/UserAgentGtk.cpp:
673         (WebCore::UserAgentQuirks::UserAgentQuirks): New helper private
674         class to handle user agent quirks.
675         (WebCore::UserAgentQuirks::add):
676         (WebCore::UserAgentQuirks::contains):
677         (WebCore::UserAgentQuirks::isEmpty):
678         (WebCore::platformForUAString): Bring back this method that was
679         removed to always pretend to be Macintosh.
680         (WebCore::platformVersionForUAString): Return a different platform
681         version depending on the actual platform.
682         (WebCore::versionForUAString): Return the WebKit version.
683         (WebCore::buildUserAgentString): Helper function to build the user
684         agent taking into account the UserAgentQuirks received.
685         (WebCore::standardUserAgentStatic): Standard user agent string
686         when no quirks are present.
687         (WebCore::standardUserAgent):
688         (WebCore::standardUserAgentForURL): New method that returns the
689         user agent string for the given URL.
690         * platform/gtk/UserAgentGtk.h:
691
692 2014-06-11  Alex Christensen  <achristensen@webkit.org>
693
694         [Win] Unreviewed build fix.
695
696         * platform/network/curl/ResourceRequest.h:
697         Include missing PassOwnPtr.h.
698
699 2014-06-10  Sam Weinig  <sam@webkit.org>
700
701         Actually only generate tables for History and Location.
702
703         * bindings/scripts/CodeGeneratorJS.pm:
704         (GenerateImplementation):
705
706 2014-06-10  Sam Weinig  <sam@webkit.org>
707
708         Attempt to fix the tests.
709
710         * bindings/scripts/CodeGeneratorJS.pm:
711         (GenerateImplementation):
712         Keep generating HashTables for History and Location, since they use them in
713         their custom getOwnPropertySlot delegates.
714
715 2014-06-10  Benjamin Poulain  <benjamin@webkit.org>
716
717         [iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
718         https://bugs.webkit.org/show_bug.cgi?id=133702
719
720         Reviewed by Simon Fraser.
721
722         * page/scrolling/ScrollingTree.h:
723         (WebCore::ScrollingTree::scrollingTreeNodeWillStartPanGesture):
724
725 2014-06-10  Benjamin Poulain  <benjamin@webkit.org>
726
727         Reduce the overhead of updating the animatable style on ARMv7
728         https://bugs.webkit.org/show_bug.cgi?id=133618
729
730         Reviewed by Simon Fraser.
731
732         While updating the style for animations, most of the time spent was pure calling overhead.
733
734         This patch should reduce this a bit on ARMv7:
735         1) Get the frame directly from the document instead of document->view->framview->frame.
736         2) Inline RenderObject::animation(). This is just 3 loads, setting up the registers on the call
737            site is more expensive than loading the values directly.
738         3) Inline RenderElement::setAnimatableStyle(). It has only one call site and the call is mostly
739            overhead.
740
741         * css/CSSComputedStyleDeclaration.cpp:
742         * rendering/RenderElement.cpp:
743         (WebCore::RenderElement::setAnimatableStyle): Deleted.
744         * rendering/RenderElement.h:
745         (WebCore::RenderElement::setAnimatableStyle):
746         * rendering/RenderObject.cpp:
747         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
748         (WebCore::RenderObject::animation): Deleted.
749         * rendering/RenderObject.h:
750         (WebCore::RenderObject::animation):
751         * rendering/RenderView.h:
752         (WebCore::RenderObject::frame):
753
754 2014-06-10  Sam Weinig  <sam@webkit.org>
755
756         Don't create a HashTable for JSObjects that use eager reification
757         https://bugs.webkit.org/show_bug.cgi?id=133705
758
759         Reviewed by Geoffrey Garen.
760
761         It is unnecessary to create the CompactHashIndex or HashTable for JSObjects
762         that use eager reification, since we will never look up properties directly.
763         Instead, we can iterate the HashTableValue array directly during reification.
764
765         * bindings/scripts/CodeGeneratorJS.pm:
766         (GenerateImplementation):
767         Only generate the value array for prototypes that use eager reification.
768
769         (GenerateHashTableValueArray):
770         Extract out into a helper.
771
772         (GenerateHashTable):
773         Add a parameter, $justGenerateValueArray, that if true, means we only
774         should generate the value array. 
775
776         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
777         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
778         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
779         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
780         * bindings/scripts/test/JS/JSTestException.cpp:
781         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
782         * bindings/scripts/test/JS/JSTestInterface.cpp:
783         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
784         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
785         * bindings/scripts/test/JS/JSTestNode.cpp:
786         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
787         * bindings/scripts/test/JS/JSTestObj.cpp:
788         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
789         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
790         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
791         * bindings/scripts/test/JS/JSattribute.cpp:
792         * bindings/scripts/test/JS/JSreadonly.cpp:
793
794 2014-06-10  Chris Fleizach  <cfleizach@apple.com>
795
796         AX: iOS: Return the language for attributed text marker queries
797         https://bugs.webkit.org/show_bug.cgi?id=133682
798
799         Reviewed by Mario Sanchez Prada.
800
801         Add language to the list of objects being returned for attributed text.
802
803         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
804         (AXAttributeStringSetLanguage):
805         (AXAttributedStringAppendText):
806
807 2014-06-10  Dan Bernstein  <mitz@apple.com>
808
809         WebCore part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
810         https://bugs.webkit.org/show_bug.cgi?id=133697
811
812         Reviewed by Anders Carlsson.
813
814         * platform/network/AuthenticationClient.h: Declared new virtual member functions for
815         requesting default handling of a challenge and rejecting a challenge.
816         * platform/network/ResourceHandle.h: Override new AuthenticationClient functions.
817         * platform/network/cf/ResourceHandleCFNet.cpp:
818         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling): Added. Calls
819         CFURLConnectionPerformDefaultHandlingForChallenge.
820         (WebCore::ResourceHandle::receivedChallengeRejection): Added. Calls
821         CFURLConnectionRejectChallenge.
822         * platform/network/cf/SocketStreamHandle.h: Override new AuthenticationClient functions.
823         * platform/network/cf/SocketStreamHandleCFNet.cpp:
824         (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Added empty
825         override.
826         (WebCore::SocketStreamHandle::receivedChallengeRejection): Ditto.
827
828 2014-06-09  Brent Fulgham  <bfulgham@apple.com>
829
830         REGRESSION (r167962): Out of bounds read in JSC::StructureIDTable::get()
831         https://bugs.webkit.org/show_bug.cgi?id=133463
832         <rdar://problem/17098100>
833
834         Reviewed by Geoffrey Garen.
835
836         Revise MediaControllerHost implementation so that instead of holding its
837         own pointer to the JS Controller object, it uses new properties added to
838         the internal media controls DOM hierarchy. This allows the GC to see the
839         needed lifecycle of the various media control objects and avoids the
840         premature deallocation that caused this bug.
841  
842         * Modules/mediacontrols/MediaControlsHost.h:
843         (WebCore::MediaControlsHost::controllerJSValue): Deleted.
844         (WebCore::MediaControlsHost::setControllerJSValue): Deleted.
845         * html/HTMLMediaElement.cpp:
846         (WebCore::HTMLMediaElement::controllerJSValue): Added convenience function
847         to share logic for retrieving the controller object.
848         (WebCore::HTMLMediaElement::updateCaptionContainer): Revise to use new method
849         for accessing the controller.
850         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Connect the media
851         elements JS wrapper object to the MediaControlsHost JS wrapper. Then connect
852         the MediaControlsHost JS wrapper to the Controller JS object.
853         (WebCore::HTMLMediaElement::pageScaleFactorChanged): Revise to use new method
854         for accessing the controller.
855
856 2014-06-10  Myles C. Maxfield  <mmaxfield@apple.com>
857
858         Japanese text in Google search is rendered too low and clipped
859         https://bugs.webkit.org/show_bug.cgi?id=133595
860
861         Reviewed by Simon Fraser.
862
863         This is a revert of r155324.
864
865         By forcing line-height to be normal, r155324 was forcing WebKit to inspect font metrics
866         to determine the height of a line. This means that if a fallback font was required to
867         draw a line of text, and the fallback font had a higher ascent than the primary font,
868         the entire line of text would be pushed down. If we don't force line-height to be normal,
869         then we use the line-height value instead, which short circuits this mechanism, thereby
870         not pushing text down.
871
872         No new tests (because this is simply a revert)
873
874         * css/html.css:
875         (input): Deleted.
876
877 2014-06-10  Zalan Bujtas  <zalan@apple.com>
878
879         REGRESSION (r167937): Do not use effective zoom factor while resolving media query's min-, max-(device)width/height values.
880         https://bugs.webkit.org/show_bug.cgi?id=133681
881
882         Reviewed by Simon Fraser.
883
884         We lost the default multiplier(zoom) value of 1 with r167937 at template<typename T> T computeLength().
885         Now MediaQueryEvaluator takes the current page zoom factor into account while resolving min-, max- width values.
886
887         This patch explicitly sets the multiplier value to 1 to ensure zoom independent media query value resolving.
888
889         Test: fast/media/media-query-with-scaled-content.html
890
891         * css/CSSToLengthConversionData.cpp:
892         (WebCore::CSSToLengthConversionData::viewportWidthFactor):
893         (WebCore::CSSToLengthConversionData::viewportHeightFactor):
894         * css/CSSToLengthConversionData.h:
895         * css/MediaQueryEvaluator.cpp:
896         (WebCore::MediaQueryEvaluator::eval):
897         * testing/Internals.cpp:
898         (WebCore::Internals::setPageZoomFactor):
899         * testing/Internals.h:
900         * testing/Internals.idl:
901
902 2014-06-10  Simon Fraser  <simon.fraser@apple.com>
903
904         https://bugs.webkit.org/show_bug.cgi?id=133694
905
906         Revert the part of r169733 that caused this test to start failing.
907
908         * rendering/RenderLayerCompositor.cpp:
909         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
910
911 2014-06-10  Timothy Horton  <timothy_horton@apple.com>
912
913         Factor repeated CFRunLoopObserver code out
914         https://bugs.webkit.org/show_bug.cgi?id=133690
915
916         Reviewed by Simon Fraser.
917
918         * WebCore.exp.in:
919         * WebCore.xcodeproj/project.pbxproj:
920         * platform/cf/RunLoopObserver.cpp: Added.
921         (WebCore::RunLoopObserver::create):
922         (WebCore::RunLoopObserver::~RunLoopObserver):
923         (WebCore::RunLoopObserver::runLoopObserverFired):
924         (WebCore::RunLoopObserver::schedule):
925         (WebCore::RunLoopObserver::invalidate):
926         * platform/cf/RunLoopObserver.h: Added.
927         (WebCore::RunLoopObserver::isScheduled):
928         (WebCore::RunLoopObserver::RunLoopObserver):
929         Factor CFRunLoopObserver management code out of LayerFlushScheduler and WebKit2.
930
931         * platform/graphics/ca/LayerFlushScheduler.h:
932         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
933         (WebCore::LayerFlushScheduler::LayerFlushScheduler):
934         (WebCore::LayerFlushScheduler::~LayerFlushScheduler):
935         (WebCore::LayerFlushScheduler::layerFlushCallback):
936         (WebCore::LayerFlushScheduler::schedule):
937         (WebCore::LayerFlushScheduler::invalidate):
938         (WebCore::LayerFlushScheduler::runLoopObserverCallback): Deleted.
939         Make use of WebCore::RunLoopObserver.
940
941 2014-06-10  Simon Fraser  <simon.fraser@apple.com>
942
943         Modernize loop code in scrolling tree code
944         https://bugs.webkit.org/show_bug.cgi?id=133688
945
946         Reviewed by Anders Carlsson.
947
948         Use new loop syntax for walking children.
949
950         * page/scrolling/ScrollingStateNode.cpp:
951         (WebCore::ScrollingStateNode::cloneAndResetChildren):
952         (WebCore::ScrollingStateNode::removeChild):
953         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
954         (WebCore::ScrollingStateNode::dump):
955         * page/scrolling/ScrollingTreeNode.cpp:
956         (WebCore::ScrollingTreeNode::removeChild):
957         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
958         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
959
960 2014-06-10  Anders Carlsson  <andersca@apple.com>
961
962         Add -[WKWebView evaluateJavaScript:completionHandler:]
963         https://bugs.webkit.org/show_bug.cgi?id=133689
964         <rdar://problem/17152685>
965
966         Reviewed by Geoffrey Garen.
967
968         * English.lproj/Localizable.strings:
969         Add new localizable strings.
970
971 2014-06-10  Antti Koivisto  <antti@apple.com>
972
973         Serialize ResourceRequests without platform request
974         https://bugs.webkit.org/show_bug.cgi?id=133679
975
976         Reviewed by Alexey Proskuryakov.
977
978         We create platform requests in the web process just so we can serialize them. This is unnecessary work.
979
980         * platform/network/ResourceRequestBase.h:
981         (WebCore::ResourceRequestBase::encodingRequiresPlatformData):
982         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
983         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
984         
985             Add encoding and decoding functions here to avoid exposing internals.
986
987         * platform/network/cf/ResourceRequest.h:
988         (WebCore::ResourceRequest::encodingRequiresPlatformData):
989         
990             Allow encoding without platform data if it hasn't been created yet and there is no request body.
991
992 2014-06-10  Brady Eidson  <beidson@apple.com>
993
994         Send more context about text selection to telephone number scanner
995         <rdar://problem/16874385> and https://bugs.webkit.org/show_bug.cgi?id=133684
996
997         Reviewed by Enrica Casucci.
998
999         * dom/Range.cpp:
1000         (WebCore::rangesOverlap):Add a utility to check if two ranges overlap.
1001         * dom/Range.h:
1002         
1003         * editing/Editor.cpp:
1004         (WebCore::Editor::scanSelectionForTelephoneNumbers): Create a range that is wider than the 
1005           actual selection to search for phone numbers that are not completely selected yet.
1006
1007 2014-06-10  Alex Christensen  <achristensen@webkit.org>
1008
1009         [iOS] Another unreviewed build fix after r169746.
1010
1011         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1012         Prevent another unused value error.
1013
1014 2014-06-10  Alex Christensen  <achristensen@webkit.org>
1015
1016         [iOS] Unreviewed build fix after r169746.
1017
1018         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1019         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1020         Protect startTime with !PLATFORM(IOS) to prevent a unused variable build error.
1021
1022 2014-06-10  Chris Fleizach  <cfleizach@apple.com>
1023
1024         AX: WK2: iOS: text editing does not work
1025         https://bugs.webkit.org/show_bug.cgi?id=133666
1026
1027         Reviewed by Mario Sanchez Prada.
1028
1029         In WK2, all the text editing is handled by the WebProcess, so selectedTextRange and setSelectedTextRange
1030         need to be implemented, as well as posting the right value change notification.
1031
1032         * accessibility/ios/AXObjectCacheIOS.mm:
1033         (WebCore::AXObjectCache::postPlatformNotification):
1034         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1035         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1036         (-[WebAccessibilityObjectWrapper postValueChangedNotification]):
1037         (-[WebAccessibilityObjectWrapper _accessibilitySelectedTextRange]):
1038         (-[WebAccessibilityObjectWrapper _accessibilitySetSelectedTextRange:]):
1039
1040 2014-06-10  Andreas Kling  <akling@apple.com>
1041
1042         [iOS WebKit2] Stay in "memory pressure" mode until told otherwise.
1043         <https://webkit.org/b/133671>
1044
1045         When we receive the first memory pressure signal, flip the flag in
1046         MemoryPressureHandler so that isUnderMemoryPressure() returns true
1047         from then on, until the system tells us pressure levels are back
1048         to normal.
1049
1050         The hold-off mechanism is disabled for iOS, that wasn't actually
1051         needed in the first place, since the system is not going to spam
1052         you with tons of notifications.
1053
1054         Also propagate the "critical" flag all the way from the system
1055         to the pressure handler. Note that we don't actually do anything
1056         differently based on the flag yet.
1057
1058         Reviewed by Sam Weinig.
1059
1060         * platform/MemoryPressureHandler.cpp:
1061         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1062         * platform/MemoryPressureHandler.h:
1063         (WebCore::MemoryPressureHandler::setUnderMemoryPressure):
1064         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1065         (WebCore::MemoryPressureHandler::install):
1066         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1067
1068 2014-06-10  Simon Fraser  <simon.fraser@apple.com>
1069
1070         Fix logging of sticky scrolling tree nodes
1071         https://bugs.webkit.org/show_bug.cgi?id=133670
1072
1073         Reviewed by Sam Weinig.
1074
1075         ScrollingStateStickyNode::dumpProperties() dumped stickyBoxRect() twice and
1076         didn't dump constrainingRectAtLastLayout(), so fix that.
1077
1078         * page/scrolling/ScrollingStateStickyNode.cpp:
1079         (WebCore::ScrollingStateStickyNode::dumpProperties):
1080
1081 2014-06-05  Sergio Villar Senin  <svillar@igalia.com>
1082
1083         [CSS Grid Layout] Simplify the named grid lines resolution algorithm
1084         https://bugs.webkit.org/show_bug.cgi?id=133543
1085
1086         Reviewed by Darin Adler.
1087
1088         Named grid lines resolution algorithm can be heavily simplified by
1089         inserting the implicit named grid lines generated by each grid
1090         area (<area-name>-{start|end} for rows and columns), into the list
1091         of user defined named grid lines. This way we would only have to
1092         deal with named grid lines and forget about the named grid areas
1093         (as described in the specs
1094         http://dev.w3.org/csswg/css-grid/#grid-placement-slot).
1095
1096         As a nice side effect, we'll get for free the implementation of the
1097         use case described in section 5.2.2 Implicit Named Areas.
1098
1099         Test: fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html
1100
1101         * css/StyleResolver.cpp:
1102         (WebCore::createImplicitNamedGridLinesFromGridArea):
1103         (WebCore::StyleResolver::applyProperty):
1104         * rendering/RenderGrid.cpp:
1105         (WebCore::isStartSide):
1106         (WebCore::gridLinesForSide):
1107         (WebCore::implicitNamedGridLineForSide):
1108         (WebCore::isNonExistentNamedLineOrArea):
1109         (WebCore::RenderGrid::adjustGridPositionsFromStyle):
1110         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
1111         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1112         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
1113         (WebCore::gridLineDefinedBeforeGridArea): Deleted.
1114         (WebCore::setNamedLinePositionIfDefinedBeforeArea): Deleted.
1115         (WebCore::RenderGrid::adjustNamedGridItemPosition): Deleted.
1116
1117 2014-06-10  Kiran  <kiran.guduru@samsung.com>
1118
1119         [MediaStream] Add getTracks() support to MediaStream.
1120         https://bugs.webkit.org/show_bug.cgi?id=133641
1121
1122         Reviewed by Eric Carlson.
1123
1124         A new method named getTracks is proposed to retrieve all the tracks
1125         of a MediaStream irrespective of the type. This method has been implementd.
1126
1127         Test: fast/mediastream/MediaStream-getTracks.html
1128
1129         * Modules/mediastream/MediaStream.cpp:
1130         (WebCore::MediaStream::getTracks):
1131         * Modules/mediastream/MediaStream.h:
1132         * Modules/mediastream/MediaStream.idl:
1133
1134 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
1135
1136         Remove use of view() in RenderView code
1137         https://bugs.webkit.org/show_bug.cgi?id=133669
1138
1139         Reviewed by Andreas Kling.
1140
1141         view() in RenderView just returns *this, so no need to use it.
1142
1143         * rendering/RenderView.cpp:
1144         (WebCore::RenderView::setSelection):
1145
1146 2014-06-09  Eric Carlson  <eric.carlson@apple.com>
1147
1148         [iOS] Wireless route picker control should use touch event handlers
1149         https://bugs.webkit.org/show_bug.cgi?id=133672
1150
1151         Reviewed by Brent Fulgham.
1152
1153         * Modules/mediacontrols/mediaControlsiOS.js:
1154         (ControllerIOS.prototype.createControls): Listen for touch events.
1155         (ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): New, handle touch start.
1156         (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd): New, handle touch end.
1157         (ControllerIOS.prototype.handleWirelessPickerButtonTouchCancel): New, handle touch cancel.
1158         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Deleted.
1159
1160 2014-06-09  Benjamin Poulain  <benjamin@webkit.org>
1161
1162         Do not use a mask when matching the return value of a function call on ARM
1163         https://bugs.webkit.org/show_bug.cgi?id=133614
1164
1165         Reviewed by Andreas Kling.
1166
1167         On ARM, we cannot have garbage on the top bits of booleans. It is faster to check the whole
1168         register for nullity.
1169
1170         * cssjit/FunctionCall.h:
1171         (WebCore::FunctionCall::callAndBranchOnBooleanReturnValue):
1172         (WebCore::FunctionCall::callAndBranchOnCondition):
1173         * cssjit/SelectorCompiler.cpp:
1174         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
1175         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
1176         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
1177         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
1178         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1179
1180 2014-06-09  Ryosuke Niwa  <rniwa@webkit.org>
1181
1182         Remove the bogus assertion that didn't even build.
1183
1184         * css/CSSPrimitiveValue.cpp:
1185         (WebCore::CSSPrimitiveValue::formatNumberValue):
1186
1187 2014-06-09  Ryosuke Niwa  <rniwa@webkit.org>
1188
1189         Commit the right fix.
1190
1191         * css/CSSPrimitiveValue.cpp:
1192         (WebCore::CSSPrimitiveValue::formatNumberValue):
1193
1194 2014-06-09  Ryosuke Niwa  <rniwa@webkit.org>
1195
1196         Debug build fix after r169731.
1197
1198         * css/CSSPrimitiveValue.cpp:
1199         (WebCore::CSSPrimitiveValue::formatNumberValue):
1200
1201 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
1202
1203         Work towards having frames in the scrolling tree
1204         https://bugs.webkit.org/show_bug.cgi?id=133665
1205
1206         Reviewed by Tim Horton.
1207         
1208         Optionally (based on Setting) create nodes in the scrolling tree for frames which
1209         contain async-scrollable content. This will be used on iOS/WK2 to support accelerated
1210         overflow-scroll in iframes. The setting allows for testing on OS X.
1211         
1212         The change breaks an assumption in ScrollingCoordinator/AsyncScrollingCoordinator
1213         that we're always dealing with the main frame, and changes logic in RenderLayerCompositor
1214         so that we can connect the scrolling tree across frame boundaries. RenderLayerCompositor
1215         maintains a m_subframeScrollLayersNeedReattach flag that gets set whenever we add or remove
1216         scroll-coordinated layers in the current frame. When set, after updating compositing
1217         layers we walk child frames, and, if they have scrolling nodes, re-attach them to the
1218         scrolling tree (which will find the new ancestor node).
1219
1220         Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html
1221                platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html
1222
1223         * WebCore.exp.in:
1224         * page/FrameView.cpp:
1225         (WebCore::FrameView::scrollLayerID): Use the new "for role" way of getting the node ID.
1226         * page/Settings.cpp:
1227         * page/Settings.in: Add scrollingTreeIncludesFrames.
1228         * page/scrolling/AsyncScrollingCoordinator.cpp:
1229         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1230         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Only set
1231         the region for the main frame.
1232         (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode): updateScrollPositionAfterAsyncScroll()
1233         needs to know which FrameView a given nodeID is hosted in; doing a walk of the frame tree for
1234         non-main frames seems to be the safest way.
1235         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1236         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
1237         * page/scrolling/AsyncScrollingCoordinator.h:
1238         * page/scrolling/ScrollingCoordinator.cpp:
1239         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Consult the new setting.
1240         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
1241         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
1242         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
1243         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
1244         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
1245         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
1246         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
1247         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
1248         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
1249         * page/scrolling/ScrollingCoordinator.h:
1250         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): Deleted.
1251         * rendering/RenderLayerBacking.h: Rather than separate functions to get the two scrolling
1252         node IDs, having one scrollingNodeIDForRole() makes calling code cleaner.
1253         * rendering/RenderLayerCompositor.cpp:
1254         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1255         (WebCore::RenderLayerCompositor::updateCompositingLayers):  call reattachSubframeScrollLayers()
1256         after a compositing tree update.
1257         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer): Deals with the various configurations
1258         in which we can do async scrolling of sticky elements.
1259         (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer):
1260         (WebCore::useCoordinatedScrollingForLayer):
1261         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1262         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Moved.
1263         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This is a bug fix;
1264         we only need to notify child frames, not all descendant frames.
1265         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1266         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1267         (WebCore::enclosingScrollingNodeID):
1268         (WebCore::scrollCoordinatedAncestorInParentOfFrame):
1269         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
1270         (WebCore::RenderLayerCompositor::attachScrollingNode):
1271         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1272         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1273         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1274         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1275         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
1276         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Deleted.
1277         (WebCore::isViewportConstrainedFixedOrStickyLayer): Deleted.
1278         (WebCore::isMainFrameScrollingOrOverflowScrolling): Deleted.
1279         (WebCore::nearestScrollCoordinatedAncestor): Deleted.
1280         * rendering/RenderLayerCompositor.h:
1281         * rendering/RenderView.cpp:
1282         (WebCore::RenderView::setSelection): Added comment.
1283         * testing/InternalSettings.cpp:
1284         (WebCore::InternalSettings::setScrollingTreeIncludesFrames):
1285         * testing/InternalSettings.h: Removed some useless parameter names.
1286         * testing/InternalSettings.idl: Added setScrollingTreeIncludesFrames() setting.
1287
1288 2014-06-09  Benjamin Poulain  <bpoulain@apple.com>
1289
1290         Improve CSSPrimitiveValue::customCSSText for ARMv7
1291         https://bugs.webkit.org/show_bug.cgi?id=133597
1292
1293         Reviewed by Andreas Kling.
1294
1295         On imgur, some script is updating some layout on timers and on scroll.
1296
1297         It looks like CSSPrimitiveValue::customCSSText() is a little constrained
1298         by the instruction cache on ARMv7. This patch improve the situation a bit.
1299
1300         First, the creation of the string itself is changed to go from two allocation to one.
1301         Previously, we would allocate a StringBuffer and adopt it. Now we allocate a StringImpl
1302         directly with the inline buffer.
1303
1304         The second issue is that the compiler was generating a real copy constructor for every
1305         assignment of the "text" variable (likely because the variable span is so large).
1306         This was solved by moving the string creating into a separate function (to fix the span)
1307         and being careful with passing PassRef<StringImpl> around.
1308
1309         Then there was the problem that the compiler was a little too aggressive with inlining
1310         which caused each "case" to repeat the same prologue and epilogue before formatValue().
1311         This was solved by adding formatNumberValue() with NEVER_INLINE to have the prologue/epilogue
1312         in a single place.
1313
1314         On older device, that's about 3% improvement on style access. On modern ARM64/x86_64
1315         there is no noticeable difference.
1316
1317         * css/CSSPrimitiveValue.cpp:
1318         (WebCore::CSSPrimitiveValue::formatNumberValue):
1319         (WebCore::CSSPrimitiveValue::formatNumberForcustomCSSText):
1320         (WebCore::CSSPrimitiveValue::customCSSText):
1321         (WebCore::formatNumber): Deleted.
1322         * css/CSSPrimitiveValue.h:
1323
1324 2014-06-09  Alex Christensen  <achristensen@webkit.org>
1325
1326         [iOS WebGL] Fix EXT_shader_texture_lod.
1327         https://bugs.webkit.org/show_bug.cgi?id=133633
1328
1329         Reviewed by Brady Eidson.
1330
1331         Covered by the Khronos test (and in LayoutTests):
1332         conformance/extensions/ext-shader-texture-lod.html
1333
1334         * html/canvas/WebGLRenderingContext.cpp:
1335         (WebCore::WebGLRenderingContext::getExtension):
1336         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1337         Added shader texture lod name to match value from glGetString(GL_EXTENSIONS) on iOS.
1338
1339 2014-06-09  Benjamin Poulain  <bpoulain@apple.com>
1340
1341         Document::updateStyleIfNeededForNode can get very expensive
1342         https://bugs.webkit.org/show_bug.cgi?id=133599
1343
1344         Reviewed by Andreas Kling.
1345
1346         When pages are querying their style, we first run through
1347         Document::updateStyleIfNeededForNode() to find if that particular node needs style recalc.
1348
1349         The problem was that updateStyleIfNeededForNode() could get really expensive. For each node,
1350         it needs to check the whole parent chain to find if any needs style recalc.
1351         When web pages get a bunch of nodes and querying their style, we ended up going over a lot
1352         of nodes just to find there is nothing to do.
1353
1354         This patch adds two tweaks to reduce the problem:
1355         First, before querying nodeOrItsAncestorNeedsStyleRecalc() we check if the Document is dirty at all.
1356         The other part is making nodeOrItsAncestorNeedsStyleRecalc() faster by removing useless elements check.
1357
1358         * dom/Document.cpp:
1359         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
1360         (WebCore::Document::updateStyleIfNeededForNode):
1361
1362 2014-06-09  Enrica Casucci  <enrica@apple.com>
1363
1364         iOS WebKit: Crash in charactersAroundPosition.
1365         https://bugs.webkit.org/show_bug.cgi?id=133659
1366         <rdar://problem/17220870>
1367
1368         Reviewed by Benjamin Poulain.
1369
1370         Ensure that we stay within the vector boundaries
1371         when returning the characters around the position.
1372
1373         * editing/VisibleUnits.cpp:
1374         (WebCore::charactersAroundPosition):
1375
1376 2014-06-09  Alexey Proskuryakov  <ap@apple.com>
1377
1378         Properly reset UStringSearch object in SearchBuffer constructor.
1379         https://bugs.webkit.org/show_bug.cgi?id=133662
1380         <rdar://problem/17240136>
1381
1382         Reviewed by Tim Horton.
1383
1384         * editing/TextIterator.cpp: (WebCore::SearchBuffer::~SearchBuffer):
1385
1386 2014-06-09  Eric Carlson  <eric.carlson@apple.com>
1387
1388         Automatic text track selection can select more than one track
1389         https://bugs.webkit.org/show_bug.cgi?id=133590
1390
1391         Reviewed by Brent Fulgham.
1392
1393         Test: media/video-trackmenu-selection.html
1394
1395         * html/HTMLMediaElement.cpp:
1396         (WebCore::HTMLMediaElement::configureTextTrack): Consider the currently selected
1397             track, if any.
1398
1399         * page/CaptionUserPreferencesMediaAF.cpp:
1400         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Drive-by change
1401             to make sure no non-visible text tracks are included in the track menu.
1402
1403 2014-06-09  Jer Noble  <jer.noble@apple.com>
1404
1405         [Mac] Hang when painting media before compositing mode activated
1406         https://bugs.webkit.org/show_bug.cgi?id=133655
1407
1408         Reviewed by Eric Carlson.
1409
1410         When asked to paint(), MediaPlayerPrivateAVFoundationObjC should not create an image generator
1411         or a video output. These operations are synchronous, and will block the drawing thread and cause
1412         a spin. paint() as opposed to paintImageInContext() is only called when painting the layer tree
1413         and MediaPlayerPrivateAVFoundationObjC will paint by creating a AVPlayerLayer, not by painting
1414         frames directly into the tree.
1415
1416         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1417         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
1418
1419 2014-06-09  Jer Noble  <jer.noble@apple.com>
1420
1421         [Mac][MSE] Exception thrown from ~MediaPlayerPrivateMediaSourceAVFObjC().
1422         https://bugs.webkit.org/show_bug.cgi?id=133656
1423
1424         Reviewed by Eric Carlson.
1425
1426         AVSampleBufferRenderSynchronizer can't handle being passed a NULL observer, so only attempt
1427         to remove the time jumped or duration observer if one was actually created.
1428
1429         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1430         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
1431
1432 2014-06-09  Zalan Bujtas  <zalan@apple.com>
1433
1434         Subpixel rendering: Pixelsnapping empty rounded rect results in NaN radii width/height.
1435         https://bugs.webkit.org/show_bug.cgi?id=133654
1436
1437         Reviewed by Simon Fraser.
1438
1439         Empty rounded rects don't need snapping.
1440
1441         Not testable.
1442
1443         * platform/graphics/RoundedRect.cpp:
1444         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
1445
1446 2014-05-21  Myles C. Maxfield  <mmaxfield@apple.com>
1447
1448         REGRESSION: missing underline under CJK text
1449         https://bugs.webkit.org/show_bug.cgi?id=128145
1450
1451         Reviewed by Darin Adler.
1452
1453         This patch refactors the GlyphToPathTranslator which is used to find intersections of
1454         glyphs and underlines. It was modified to allow for querying these pieces of
1455         information:
1456         1) The extents of the glyph. This can be used to make the underlines skip an entire
1457         glyph, wholesale
1458         2) What kind of skipping behavior should be used
1459         3) The Path which represents the glyph
1460         There are three skipping behaviors:
1461         1) (SkipDescenders) The previous behavior
1462         2) (SkipGlyph) Make the underline skip over the entire glyph, using the extents() function
1463         3) (DrawOverGlyph) Make the underline plow through the glyph, ignoring any descenders
1464
1465         Calculating which underlining behavior to use depends on what the base codepoint that
1466         originated that glyph is. This means that we have to map from glyphs to characters,
1467         something which is nontrivial to do. In order to solve this problem, this patch adds
1468         an optional vector to GlyphBuffer which represents the location in the original string
1469         from which a particular glyph originated. Then, when our WidthIterator code adds
1470         glyphs to the GlyphBuffer, we can include the extra information about where we are
1471         in the input string. Once this data is available, the GlyphPathTranslator can look up
1472         the base codepoint from which this glyph originates, and can run ICU functions on that
1473         codepoint.
1474
1475         We can use the ICU ublock_getCode() function to find which Unicode block a particular
1476         codepoint comes from. If the codepoint comes from a CJK block, we will use
1477         DrawOverGlyph; otherwise, we will use SkipDescenders.
1478
1479         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-cjk.html
1480
1481         * platform/graphics/Font.cpp:
1482         (WebCore::sharedUnderlineType): Look up the base codepoint from which this glyph
1483         originates, call ublock_getCode to get its Unicode block, then return
1484         a GlyphUnderlineType accordingly. This code is shared between SVG and non-SVG.
1485         * platform/graphics/Font.h: New virtual functions in GlyphToPathTranslator, as well as
1486         function signatures for the above two functions.
1487         * platform/graphics/GlyphBuffer.h: Add an optional instance member for the location
1488         from within the original string from which a particular glyph originates.
1489         (WebCore::GlyphBuffer::clear): Updated for new member.
1490         (WebCore::GlyphBuffer::add): Ditto.
1491         (WebCore::GlyphBuffer::saveOffsetsInString): Opt-in to using the new variable
1492         (WebCore::GlyphBuffer::offsetInString): New variable accessor.
1493         * platform/graphics/TextRun.h: SVG needs the TextRun to use sharedUnderlineType.
1494         * platform/graphics/WidthIterator.cpp:
1495         (WebCore::WidthIterator::advanceInternal): Use GlyphBuffer's new variable (if present).
1496         * platform/graphics/mac/ComplexTextController.cpp:
1497         (WebCore::ComplexTextController::advance): Use GlyphBuffer's new variable (if present).
1498         * platform/graphics/mac/FontMac.mm: Implement new GlyphToPathTranslator functions.
1499         (WebCore::MacGlyphToPathTranslator::path):
1500         (WebCore::MacGlyphToPathTranslator::extents):
1501         (WebCore::MacGlyphToPathTranslator::underlineType): Calls sharedUnderlineType().
1502         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
1503         (WebCore::MacGlyphToPathTranslator::increment):
1504         (WebCore::Font::dashesForIntersectionsWithRect): Ask the translator what kind of underline
1505         behavior should be used. React accordingly.
1506         (WebCore::MacGlyphToPathTranslator::nextPath): Deleted.
1507         (WebCore::MacGlyphToPathTranslator::incrementIndex): Deleted.
1508         * platform/graphics/win/UniscribeController.cpp:
1509         (WebCore::UniscribeController::shapeAndPlaceItem): Update to new signature of GlyphBuffer::add()
1510         * rendering/svg/SVGTextRunRenderingContext.cpp: Implement new GlyphToPathTranslator functions.
1511         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
1512         (WebCore::SVGGlyphToPathTranslator::getCurrentTransform):
1513         (WebCore::SVGGlyphToPathTranslator::path):
1514         (WebCore::SVGGlyphToPathTranslator::extents):
1515         (WebCore::MacGlyphToPathTranslator::underlineType): Calls sharedUnderlineType().
1516         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
1517         (WebCore::SVGGlyphToPathTranslator::increment):
1518         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
1519         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
1520         (WebCore::SVGGlyphToPathTranslator::nextPath): Deleted.
1521         (WebCore::SVGGlyphToPathTranslator::incrementIndex): Deleted.
1522         * rendering/svg/SVGTextRunRenderingContext.h: SVG needs the TextRun to use sharedUnderlineType.
1523
1524 2014-06-09  Alex Christensen  <achristensen@webkit.org>
1525
1526         [iOS WebGL] Implement OES_vertex_array_object for iOS.
1527         https://bugs.webkit.org/show_bug.cgi?id=133629
1528
1529         Reviewed by Brady Eidson.
1530
1531         Covered by the Khronos test (and in LayoutTests):
1532         conformance/extensions/oes-vertex-array-object.html
1533
1534         * platform/graphics/ios/GraphicsContext3DIOS.h:
1535         Added OpenGL vertex array function renaming for iOS adding the OES suffix.
1536         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1537         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
1538         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
1539         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
1540         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
1541         Added isVertexArrayObjectSupported and support for iOS.
1542         (WebCore::Extensions3DOpenGL::supportsExtension):
1543         Added iOS name for GL_OES_vertex_array_object extension.
1544         * platform/graphics/opengl/Extensions3DOpenGL.h:
1545         Added isVertexArrayObjectSupported for iOS.        
1546
1547 2014-06-09  Eric Carlson  <eric.carlson@apple.com>
1548
1549         [Mac] caption size is not update immediately when system preferences change
1550         https://bugs.webkit.org/show_bug.cgi?id=133598
1551
1552         Reviewed by Brent Fulgham.
1553
1554         * Modules/mediacontrols/MediaControlsHost.cpp:
1555         (WebCore::MediaControlsHost::updateCaptionDisplaySizes): New.
1556         * Modules/mediacontrols/MediaControlsHost.h:
1557
1558         * html/HTMLMediaElement.cpp:
1559         (WebCore::HTMLMediaElement::captionPreferencesChanged): Tell the controls host to update sizes.
1560
1561 2014-06-09  Daniel Bates  <dabates@apple.com>
1562
1563         [iOS] Amazon app: Cannot interact with product page after tapping on product image
1564         https://bugs.webkit.org/show_bug.cgi?id=133559
1565         <rdar://problem/16332749>
1566
1567         Reviewed by Oliver Hunt.
1568
1569         As a workaround for issues in the Amazon app, mark the attribute navigator.geolocation as
1570         replaceable so that we don't throw a JavaScript type error when assigning to an instance
1571         attribute that shadows it. At the time of writing the first such assignment to is ignored.
1572         See <https://bugs.webkit.org/show_bug.cgi?id=133648> for more details.
1573
1574         When loading a product page in the Amazon app it overwrites the readonly property geolocation
1575         on an object that extends the Navigator object. In strict mode, this operation is not honored
1576         and is treated as a JavaScript type error, which stops JavaScript execution. Therefore, the
1577         product page does not behave as intended. In contrast, this operation would not be honored in
1578         non-strict mode and would not be treated as a JavaScript type error.
1579
1580         Test: js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw.html
1581
1582         * Modules/geolocation/NavigatorGeolocation.idl:
1583
1584 2014-06-09  Andreas Kling  <akling@apple.com>
1585
1586         HTML*ListElement wrappers have custom getOwnPropertySlot()s for no good reason.
1587         <https://webkit.org/b/133653>
1588
1589         The JavaScript bindings generator was a bit overzealous in forcing every
1590         interface with "List" in the name to have its attributes on the instance.
1591         This caused some elements (HTMLUListElement, etc.) to automatically opt out
1592         of eager prototype attribute reification.
1593
1594         Reviewed by Mark Hahnenberg.
1595
1596         * bindings/scripts/CodeGeneratorJS.pm:
1597         (InterfaceRequiresAttributesOnInstance):
1598
1599 2014-06-09  Jer Noble  <jer.noble@apple.com>
1600
1601         ASSERT(!m_inRemovedLastRefFunction) in Element::addShadowRoot while destroying a document
1602         https://bugs.webkit.org/show_bug.cgi?id=133450
1603
1604         Reviewed by Eric Carlson.
1605
1606         ensureUserAgentShadowRoot() is being called when a media element is removed from its document
1607         in HTMLMediaElement::removedFrom() because Node::removedFrom() has not yet run and removed the
1608         InDocument flag from the node.  Rather than calling configureMediaControls() at this point
1609         just expilictly remove the media controls if present.
1610
1611         * html/HTMLMediaElement.cpp:
1612         (WebCore::HTMLMediaElement::parseAttribute):
1613
1614 2014-06-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1615
1616         Rebaseline bindings tests after r169703
1617
1618         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1619         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
1620         (WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot): Deleted.
1621         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1622         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1623         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
1624         (WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot): Deleted.
1625         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1626         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1627         (WebCore::JSTestEventConstructorPrototype::finishCreation):
1628         (WebCore::JSTestEventConstructorPrototype::getOwnPropertySlot): Deleted.
1629         (WebCore::JSTestEventConstructor::getOwnPropertySlot): Deleted.
1630         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1631         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1632         (WebCore::JSTestEventTargetPrototype::finishCreation):
1633         (WebCore::JSTestEventTargetPrototype::getOwnPropertySlot): Deleted.
1634         * bindings/scripts/test/JS/JSTestEventTarget.h:
1635         * bindings/scripts/test/JS/JSTestException.cpp:
1636         (WebCore::JSTestExceptionPrototype::finishCreation):
1637         (WebCore::JSTestExceptionPrototype::getOwnPropertySlot): Deleted.
1638         * bindings/scripts/test/JS/JSTestException.h:
1639         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1640         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
1641         (WebCore::JSTestGenerateIsReachablePrototype::getOwnPropertySlot): Deleted.
1642         (WebCore::JSTestGenerateIsReachable::getOwnPropertySlot): Deleted.
1643         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1644         * bindings/scripts/test/JS/JSTestInterface.cpp:
1645         (WebCore::JSTestInterfacePrototype::finishCreation):
1646         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot): Deleted.
1647         * bindings/scripts/test/JS/JSTestInterface.h:
1648         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1649         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
1650         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot): Deleted.
1651         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot): Deleted.
1652         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1653         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1654         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
1655         (WebCore::JSTestNamedConstructorPrototype::getOwnPropertySlot): Deleted.
1656         (WebCore::JSTestNamedConstructor::getOwnPropertySlot): Deleted.
1657         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1658         * bindings/scripts/test/JS/JSTestNode.cpp:
1659         (WebCore::JSTestNodePrototype::finishCreation):
1660         (WebCore::JSTestNodePrototype::getOwnPropertySlot): Deleted.
1661         (WebCore::JSTestNode::getOwnPropertySlot): Deleted.
1662         * bindings/scripts/test/JS/JSTestNode.h:
1663         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1664         (WebCore::JSTestNondeterministicPrototype::finishCreation):
1665         (WebCore::JSTestNondeterministicPrototype::getOwnPropertySlot): Deleted.
1666         (WebCore::JSTestNondeterministic::getOwnPropertySlot): Deleted.
1667         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1668         * bindings/scripts/test/JS/JSTestObj.cpp:
1669         (WebCore::JSTestObjPrototype::finishCreation):
1670         (WebCore::JSTestObjPrototype::getOwnPropertySlot): Deleted.
1671         * bindings/scripts/test/JS/JSTestObj.h:
1672         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1673         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
1674         (WebCore::JSTestOverloadedConstructorsPrototype::getOwnPropertySlot): Deleted.
1675         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot): Deleted.
1676         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1677         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1678         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
1679         (WebCore::JSTestSerializedScriptValueInterfacePrototype::getOwnPropertySlot): Deleted.
1680         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot): Deleted.
1681         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1682         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1683         (WebCore::JSTestTypedefsPrototype::finishCreation):
1684         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot): Deleted.
1685         * bindings/scripts/test/JS/JSTestTypedefs.h:
1686         * bindings/scripts/test/JS/JSattribute.cpp:
1687         (WebCore::JSattributePrototype::finishCreation):
1688         (WebCore::JSattributePrototype::getOwnPropertySlot): Deleted.
1689         (WebCore::JSattribute::getOwnPropertySlot): Deleted.
1690         * bindings/scripts/test/JS/JSattribute.h:
1691         * bindings/scripts/test/JS/JSreadonly.cpp:
1692         (WebCore::JSreadonlyPrototype::finishCreation):
1693         (WebCore::JSreadonlyPrototype::getOwnPropertySlot): Deleted.
1694         (WebCore::JSreadonly::getOwnPropertySlot): Deleted.
1695         * bindings/scripts/test/JS/JSreadonly.h:
1696
1697 2014-06-09  Simon Fraser  <simon.fraser@apple.com>
1698
1699         Group the methods in InternalSettings.idl
1700         https://bugs.webkit.org/show_bug.cgi?id=133652
1701
1702         Reviewed by Tim Horton.
1703
1704         Group methods by topic.
1705
1706         * testing/InternalSettings.idl:
1707
1708 2014-06-05  Mark Hahnenberg  <mhahnenberg@apple.com>
1709
1710         Eagerly reify DOM prototype attributes
1711         https://bugs.webkit.org/show_bug.cgi?id=133558
1712
1713         Reviewed by Oliver Hunt.
1714
1715         No new tests.
1716
1717         This allows us to get rid of a lot of the additional overhead of pushing DOM attributes up into the prototype. 
1718         By eagerly reifying the custom getters and setters into the actual JSObject we avoid having to override 
1719         getOwnPropertySlot for all of the DOM prototypes, which is a lot of the overhead of doing property lookups on 
1720         DOM wrappers.
1721
1722         * bindings/scripts/CodeGeneratorJS.pm:
1723         (prototypeHashTableAccessor): Changed to pass along the VM.
1724         (AttributeShouldBeOnInstanceForCompatibility): We were being overly conservative in regard to touch events. 
1725         This caused us to store the touch event handler getters and setters on the JSElement instance, which caused
1726         us to override getOwnPropertySlot for every JSElement subclass.
1727         (InstanceOverridesGetOwnPropertySlot): This was being overly paranoid about generate a getOwnPropertySlot if
1728         there was going to be a "constructor" property, even though we handled this in another place already.
1729         (GenerateHeader): Generate a finishCreation for prototypes unless it's the JSDOMWindow. We can't correctly 
1730         handle the DOMWindow in this version of the patch because reifying the static properties requires a global object,
1731         which hasn't been created yet when the prototype for the window object is being created.
1732         (GenerateImplementation): Generate the finishCreation calls to reifyStaticProperties.
1733
1734 2014-06-09  Alexey Proskuryakov  <ap@apple.com>
1735
1736         REGRESSION (r169681): Three tests are broken
1737         https://bugs.webkit.org/show_bug.cgi?id=133646
1738
1739         Reviewed by Tim Horton.
1740
1741         r169681 removed platformFocusRingMaxWidth() override, which returned either 0 or 9
1742         on Mac. But the cross-platform default is 3, so this changed Mac behavior.
1743
1744         I'm not entirely sure why the cross-platform default is 3 (it was also added in r168397),
1745         but restoring the override to return 0 fixes test cases.
1746
1747         While at it, also added final/override, and removed some functions that were only
1748         needed by subclasses, which we now have none.
1749
1750         * rendering/RenderThemeMac.h:
1751         (WebCore::RenderThemeMac::supportsControlTints): Deleted.
1752         (WebCore::RenderThemeMac::scrollbarControlSizeForPart): Deleted.
1753         (WebCore::RenderThemeMac::supportsSelectionForegroundColors): Deleted.
1754         (WebCore::RenderThemeMac::supportsClosedCaptioning): Deleted.
1755         (WebCore::RenderThemeMac::updateActiveState): Deleted.
1756         * rendering/RenderThemeMac.mm:
1757         (WebCore::RenderThemeMac::platformFocusRingMaxWidth):
1758         (WebCore::RenderThemeMac::setPopupButtonCellState):
1759         (WebCore::RenderThemeMac::paintSliderThumb):
1760         (WebCore::RenderThemeMac::setSearchCellState):
1761         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1762         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1763         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1764
1765 2014-06-09  Bem Jones-Bey  <bjonesbe@adobe.com>
1766
1767         [CSS Shapes] Bound RasterShapeInterval size to int
1768         https://bugs.webkit.org/show_bug.cgi?id=133576
1769
1770         Reviewed by Simon Fraser.
1771
1772         Everything in the code assumes that the interval size will always fit
1773         in an int. However, to make sure there are no negatives, the
1774         RasterShapeInterval constructor takes an unsigned. This clamps that
1775         value to make sure we can't overflow an int later.
1776
1777         * rendering/shapes/RasterShape.h:
1778         (WebCore::RasterShapeIntervals::RasterShapeIntervals):
1779
1780 2014-06-09  Zalan Bujtas  <zalan@apple.com>
1781
1782         [iOS] Gaps below and to the right of the video controls on devour.com
1783         https://bugs.webkit.org/show_bug.cgi?id=133607
1784
1785         Reviewed by Simon Fraser.
1786
1787         Non-toplevel compositing layers are device pixel aligned. In order to render the content
1788         to the same position as if the layer was not aligned, the graphics layer needs to be translated.
1789         CALayer::bounds is set to compensate for the shifted layer. However, we should not change the layer's
1790         size as that stretches the content and results in overlaps/gaps/extra fuzziness.
1791
1792         Test: compositing/contents-scale/hidpi-compositing-layer-positioned-on-scaled-context.html
1793
1794         * platform/graphics/ca/GraphicsLayerCA.cpp:
1795         (WebCore::GraphicsLayerCA::updateGeometry):
1796         (WebCore::GraphicsLayerCA::computePixelAlignment): remove old epsilon adjustment code.
1797         * platform/graphics/ca/GraphicsLayerCA.h:
1798
1799 2014-06-09  Zalan Bujtas  <zalan@apple.com>
1800
1801         [SVG] Subpixel rendering: Mask with transformed text does not render.
1802         https://bugs.webkit.org/show_bug.cgi?id=133626
1803         <rdar://problem/17123070>
1804
1805         Reviewed by Simon Fraser.
1806
1807         Replace IntRect::infiniteRect() with Layout::infiniteRect(). A transformed IntRect::infiniteRect()
1808         overflows and produces invalid repaint rect. -also remove IntRect::infiniteRect() as no one calls
1809         it anymore.
1810
1811         Tests: svg/masking/mask-transformed-text-missing-expected.svg
1812                svg/masking/mask-transformed-text-missing.svg
1813
1814         * platform/graphics/IntRect.h:
1815         (WebCore::IntRect::infiniteRect): Deleted.
1816         * rendering/svg/SVGRenderingContext.cpp:
1817         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
1818
1819 2014-06-08  Dean Jackson  <dino@apple.com>
1820
1821         [Mac] checkboxes and radio buttons animate incorrectly
1822         https://bugs.webkit.org/show_bug.cgi?id=133619
1823         <rdar://problem/16478676>
1824
1825         Reviewed by Sam Weinig.
1826
1827         As many people have noticed, the new checkboxes and radio
1828         buttons jump around during their animation. To fix this
1829         I've added yet another magic set of numbers to our
1830         native form positioning - this time the placement
1831         of the controls when rendering on the animated path.
1832         This is quite annoying, since there doesn't appear
1833         to be any pattern to the offsets (or margins) given
1834         a control size, and this case also needed a sub-pixel
1835         offset to display correctly on retina machines.
1836
1837         * platform/mac/ThemeMac.mm:
1838         (WebCore::checkboxMargins): Add comment so I know what the values mean.
1839         (WebCore::checkboxOffsets): Add the magic translation values for animated states.
1840         (WebCore::radioMargins): Ditto.
1841         (WebCore::radioOffsets):
1842         (WebCore::paintToggleButton): Paint with these new offsets.
1843
1844 2014-06-07  Dean Jackson  <dino@apple.com>
1845
1846         Regression r168397 - Form layout is incorrect on OS X Yosemite
1847         https://bugs.webkit.org/show_bug.cgi?id=133612
1848         <rdar://problem/16850492>
1849         <rdar://problem/17016914>
1850
1851         Reviewed by Anders Carlson.
1852
1853         Revision 168397 introduced a new animated style of form controls. Part of
1854         it included extending the margins for the controls to take into account the
1855         focus ring that animates in from a large radius to a small radius. This
1856         caused two problems:
1857
1858         - the incorrect margins broke many layouts
1859         - despite increased margins, there were still some areas
1860           that did not repaint correctly.
1861
1862         Restore the old margins and (temporarily) turn off focus ring animation.
1863         Bad layout is much worse than a missing animation. Another benefit
1864         of this is that we will use less memory.
1865
1866         * platform/graphics/mac/GraphicsContextMac.mm:
1867         (WebCore::drawFocusRingToContextAtTime): Pass in a time far far far in the future to
1868         get the static rendering.
1869         * platform/mac/ThemeMac.mm:
1870         (WebCore::checkboxMargins): Restore correct margins.
1871         (WebCore::radioMargins): Ditto.
1872         (WebCore::drawCellFocusRing): New method that calls WKSI with a future time.
1873         (WebCore::paintToggleButton): Call the new wrapper.
1874         (WebCore::buttonMargins): Restore correct margins.
1875         (WebCore::paintButton): Call the new wrapper.
1876         * rendering/RenderThemeMac.h:
1877         * rendering/RenderThemeMac.mm:
1878         (WebCore::RenderThemeMac::paintMenuList): Use a future time.
1879         (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. Use old outline value.
1880
1881 2014-05-29  Anders Carlsson  <andersca@apple.com>
1882
1883         HTTPHeaderMap should not derive from HashMap
1884         https://bugs.webkit.org/show_bug.cgi?id=133392
1885
1886         Reviewed by Darin Adler.
1887
1888         Use a HashMap member variable instead.
1889
1890         * WebCore.exp.in:
1891         * loader/DocumentLoader.cpp:
1892         (WebCore::DocumentLoader::responseReceived):
1893         * platform/network/HTTPHeaderMap.cpp:
1894         (WebCore::HTTPHeaderMap::copyData):
1895         (WebCore::HTTPHeaderMap::adopt):
1896         (WebCore::HTTPHeaderMap::get):
1897         (WebCore::HTTPHeaderMap::set):
1898         (WebCore::HTTPHeaderMap::add):
1899         (WebCore::HTTPHeaderMap::contains):
1900         (WebCore::HTTPHeaderMap::find):
1901         (WebCore::HTTPHeaderMap::remove):
1902         (WebCore::HTTPHeaderMap::keys):
1903         * platform/network/HTTPHeaderMap.h:
1904         (WebCore::HTTPHeaderMap::isEmpty):
1905         (WebCore::HTTPHeaderMap::size):
1906         (WebCore::HTTPHeaderMap::clear):
1907         (WebCore::HTTPHeaderMap::begin):
1908         (WebCore::HTTPHeaderMap::end):
1909         (WebCore::HTTPHeaderMap::operator==):
1910         (WebCore::HTTPHeaderMap::operator!=):
1911         * platform/network/ResourceRequestBase.cpp:
1912         (WebCore::ResourceRequestBase::adopt):
1913         * platform/network/ResourceRequestBase.h:
1914         * platform/network/ResourceResponseBase.cpp:
1915         (WebCore::ResourceResponseBase::adopt):
1916         * platform/network/ResourceResponseBase.h:
1917         * xml/XMLHttpRequest.cpp:
1918         (WebCore::XMLHttpRequest::createRequest):
1919
1920 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
1921
1922         Use C++11 lambdas to construct FileThread::Task objects
1923         https://bugs.webkit.org/show_bug.cgi?id=133079
1924
1925         Reviewed by Darin Adler.
1926
1927         Have FileThread::Task constructor take in a std::function<void ()>-like object
1928         as the second parameter. Much like with ScriptExecutionContext::Task, the idea here
1929         is to use inlined C++11 lambdas in FileThread::postTask() calls. Because FileThread::Task
1930         also requires an instance pointer, a brace-init list is passed to these calls, passing
1931         in the instance pointer as the first parameter and the C++11 lambda as the second.
1932
1933         FileThread::postTask() now takes in a FileThread::Task rvalue and moves it onto the heap
1934         and into the queue.
1935
1936         In AsyncFileStream.cpp, calls to FileThread::postTask() are updated to use C++11 lambdas.
1937         Uses of MainThreadTask are also replaced by C++11 lambdas. This modernizes the code and
1938         removes a lot of helper functions.
1939
1940         FileThread::Task doesn't use CrossThreadCopier anymore. Instead, we manually produce
1941         thread-safe copies as necessary. At the moment this approach produces another copy when
1942         passing the freshly-copied object into the lambda, but this will be avoidable once we
1943         make C++14 and the lambda capture expression support mandatory.
1944
1945         * fileapi/AsyncFileStream.cpp:
1946         (WebCore::AsyncFileStream::create):
1947         (WebCore::AsyncFileStream::stop):
1948         (WebCore::AsyncFileStream::getSize):
1949         (WebCore::AsyncFileStream::openForRead):
1950         (WebCore::AsyncFileStream::openForWrite):
1951         (WebCore::AsyncFileStream::close):
1952         (WebCore::AsyncFileStream::read):
1953         (WebCore::AsyncFileStream::write):
1954         (WebCore::AsyncFileStream::truncate):
1955         (WebCore::didStart): Deleted.
1956         (WebCore::AsyncFileStream::startOnFileThread): Deleted.
1957         (WebCore::derefProxyOnMainThread): Deleted.
1958         (WebCore::AsyncFileStream::stopOnFileThread): Deleted.
1959         (WebCore::didGetSize): Deleted.
1960         (WebCore::AsyncFileStream::getSizeOnFileThread): Deleted.
1961         (WebCore::didOpen): Deleted.
1962         (WebCore::AsyncFileStream::openForReadOnFileThread): Deleted.
1963         (WebCore::AsyncFileStream::openForWriteOnFileThread): Deleted.
1964         (WebCore::AsyncFileStream::closeOnFileThread): Deleted.
1965         (WebCore::didRead): Deleted.
1966         (WebCore::AsyncFileStream::readOnFileThread): Deleted.
1967         (WebCore::didWrite): Deleted.
1968         (WebCore::AsyncFileStream::writeOnFileThread): Deleted.
1969         (WebCore::didTruncate): Deleted.
1970         (WebCore::AsyncFileStream::truncateOnFileThread): Deleted.
1971         * fileapi/AsyncFileStream.h:
1972         * fileapi/FileThread.cpp:
1973         (WebCore::FileThread::postTask):
1974         * fileapi/FileThread.h:
1975         (WebCore::FileThread::Task::Task):
1976
1977 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
1978
1979         Pass C++11 lambdas to callOnMainThread() calls in IconDatabase
1980         https://bugs.webkit.org/show_bug.cgi?id=133374
1981
1982         Reviewed by Darin Adler.
1983
1984         Use C++11 lambads to inline the main thread tasks into the calling code,
1985         modernizing the look of the code and removing a few static methods and
1986         classes that were used as helpers.
1987
1988         * loader/icon/IconDatabase.cpp:
1989         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
1990         (WebCore::IconDatabase::performURLImport):
1991         (WebCore::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread):
1992         (WebCore::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread):
1993         (WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread):
1994         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
1995         (WebCore::IconDatabase::notifyPendingLoadDecisionsOnMainThread): Deleted.
1996         (WebCore::IconDatabase::performScheduleOrDeferSyncTimer): Deleted.
1997         (WebCore::IconDatabase::performScheduleOrDeferSyncTimerOnMainThread): Deleted.
1998         (WebCore::ClientWorkItem::ClientWorkItem): Deleted.
1999         (WebCore::ClientWorkItem::~ClientWorkItem): Deleted.
2000         (WebCore::ImportedIconURLForPageURLWorkItem::ImportedIconURLForPageURLWorkItem): Deleted.
2001         (WebCore::ImportedIconURLForPageURLWorkItem::~ImportedIconURLForPageURLWorkItem): Deleted.
2002         (WebCore::ImportedIconURLForPageURLWorkItem::performWork): Deleted.
2003         (WebCore::ImportedIconDataForPageURLWorkItem::ImportedIconDataForPageURLWorkItem): Deleted.
2004         (WebCore::ImportedIconDataForPageURLWorkItem::~ImportedIconDataForPageURLWorkItem): Deleted.
2005         (WebCore::ImportedIconDataForPageURLWorkItem::performWork): Deleted.
2006         (WebCore::RemovedAllIconsWorkItem::RemovedAllIconsWorkItem): Deleted.
2007         (WebCore::RemovedAllIconsWorkItem::performWork): Deleted.
2008         (WebCore::FinishedURLImport::FinishedURLImport): Deleted.
2009         (WebCore::FinishedURLImport::performWork): Deleted.
2010         (WebCore::performWorkItem): Deleted.
2011         * loader/icon/IconDatabase.h:
2012
2013 2014-06-07  Zan Dobersek  <zdobersek@igalia.com>
2014
2015         Replace uses of CrossThreadTask in DefaultSharedWorkerRepository, WorkerMessagingProxy with C++11 lambdas
2016         https://bugs.webkit.org/show_bug.cgi?id=133375
2017
2018         Reviewed by Darin Adler.
2019
2020         Uses of CrossThreadTask in the two classes are replaced with C++11 lambdas.
2021         The necessary cross-thread copies are created manually and passed into the
2022         lambdas by value, removing the need for CrossThreadTask and its use of CrossThreadCopier.
2023
2024         Remove the explicit use of this pointer in some lambdas -- it is captured automatically when
2025         capturing by value, so enforcing its capturing through explicit use is not necessary.
2026
2027         * workers/DefaultSharedWorkerRepository.cpp:
2028         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
2029         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
2030         (WebCore::postExceptionTask): Deleted.
2031         (WebCore::postConsoleMessageTask): Deleted.
2032         * workers/WorkerMessagingProxy.cpp:
2033         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2034         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
2035         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
2036         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2037         (WebCore::WorkerMessagingProxy::connectToInspector):
2038         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2039         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2040         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2041         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2042         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2043         (WebCore::postConsoleMessageTask): Deleted.
2044         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Deleted.
2045         (WebCore::connectToWorkerGlobalScopeInspectorTask): Deleted.
2046         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Deleted.
2047         (WebCore::dispatchOnInspectorBackendTask): Deleted.
2048         * workers/WorkerMessagingProxy.h:
2049
2050 2014-06-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2051
2052         Scheme of content utils should be compared in an ASCII case-insensitive manner
2053         https://bugs.webkit.org/show_bug.cgi?id=133502
2054
2055         Reviewed by Darin Adler.
2056
2057         According to spec, scheme must be compared in an ASCII case-insensitive manner by user agents.
2058
2059         Covered by existing tests.
2060
2061         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2062         (WebCore::isProtocolWhitelisted):
2063
2064 2014-06-06  Andreas Kling  <akling@apple.com>
2065
2066         Indexed getters should return values directly on the PropertySlot.
2067         <https://webkit.org/b/133586>
2068
2069         Make indexed getters more efficient by using PropertySlot::setValue()
2070         to pass the value directly back through the slot, instead of giving it
2071         a function pointer that JSC would then immediately call back through
2072         to retrieve the value.
2073
2074         The function pointer approach would make sense if we did inline caching
2075         of indexed getters but since we currently don't, this is pure overhead.
2076
2077         Reviewed by Darin Adler.
2078
2079         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2080         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
2081         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): Deleted.
2082         (WebCore::cssPropertyGetterCallback): Deleted.
2083         * bindings/js/JSDOMWindowCustom.cpp:
2084         (WebCore::JSDOMWindow::getOwnPropertySlot):
2085         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2086         (WebCore::indexGetter): Deleted.
2087         * bindings/scripts/CodeGeneratorJS.pm:
2088         (GenerateGetOwnPropertySlotBody):
2089         (GenerateHeader):
2090         (GetIndexedGetterExpression):
2091         (GenerateImplementation):
2092         * bridge/runtime_array.cpp:
2093         (JSC::RuntimeArray::getOwnPropertySlot):
2094         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
2095         (JSC::RuntimeArray::indexGetter): Deleted.
2096         * bridge/runtime_array.h:
2097
2098 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
2099
2100         GenericCueData elements prematurely removed
2101         https://bugs.webkit.org/show_bug.cgi?id=133588
2102
2103         Reviewed by Eric Carlson.
2104
2105         Add a 'removeCompletedCues' method instead of using the 'resetCueValues' method
2106         after processing new cues. We do not want to reset cue state if we have pending
2107         cues that are being extended by future updates (such as paint-on cues).
2108
2109         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2110         (WebCore::InbandTextTrackPrivateAVF::processCue):  Call new 'removeCompletedCues' method.
2111         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Added.
2112         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2113
2114 2014-06-06  Brady Eidson  <beidson@apple.com>
2115
2116         Initialize a char* that needs to be initialized.
2117         <rdar://problem/15840022> and https://bugs.webkit.org/show_bug.cgi?id=133585
2118
2119         Reviewed by Mark Rowe.
2120
2121         r152134 (erroneously) removed this initialization.
2122
2123         * platform/sql/SQLiteStatement.cpp:
2124         (WebCore::SQLiteStatement::prepare): tail should start out initialized to 0.
2125
2126 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
2127
2128         [iOS] Support pasting HTML
2129         https://bugs.webkit.org/show_bug.cgi?id=133581
2130         <rdar://problem/17070305>
2131
2132         Reviewed by Enrica Casucci.
2133
2134         We can probably share a lot of code between Mac and iOS here, but for now, just
2135         implement the unimplemented functions.
2136
2137         * editing/ios/EditorIOS.mm: (WebCore::Editor::WebContentReader::readHTML):
2138         Implemented based on WebArchive reading code above, and on Mac version of readHTML.
2139         Unlike on Mac, we don't need to support Microsoft CF_HTML format, as nothing
2140         generates it.
2141
2142         * platform/ios/PasteboardIOS.mm:
2143         (WebCore::Pasteboard::read):
2144         (WebCore::Pasteboard::supportedPasteboardTypes):
2145         Added HTML support, as the second preferred format after WebArchive.
2146
2147 2014-06-06  Alexey Proskuryakov  <ap@apple.com>
2148
2149         Try to fix the build after http://trac.webkit.org/changeset/169655
2150
2151         Unfortunately, the fix is very fragile, and will likely not work for some SDKs
2152         or possibly local headers - all OS versions have multiple SecBsse.h headers with
2153         different definitions for SecIdentityRef.
2154
2155         We'll see.
2156
2157         * WebCore.exp.in:
2158
2159 2014-06-06  Dan Bernstein  <mitz@apple.com>
2160
2161         WebCore part of <rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
2162         https://bugs.webkit.org/show_bug.cgi?id=133527
2163
2164         Reviewed by Darin Adler.
2165
2166         * WebCore.exp.in: Exported some Credential member functions.
2167
2168 2014-06-06  Dean Jackson  <dino@apple.com>
2169
2170         [iOS WebGL] Float texture extension has a slightly different name
2171         https://bugs.webkit.org/show_bug.cgi?id=133580
2172         <rdar://problem/17113451>
2173
2174         Reviewed by Brady Eidson.
2175
2176         Floating point textures were not available on iOS, because we were
2177         looking for the wrong extension.
2178
2179         Covered by the Khronos test (and in LayoutTests):
2180         conformance/extensions/oes-texture-float.html
2181
2182         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2183         (WebCore::Extensions3DOpenGL::supportsExtension): Look for GL_OES_texture_float
2184         as well as GL_ARB_texture_float.
2185         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2186         (WebCore::GraphicsContext3D::texImage2D): Increase the set of things skipped
2187         on PLATFORM(IOS) since they are supported natively there.
2188
2189 2014-06-05  David Hyatt  <hyatt@apple.com>
2190
2191         REGRESSION: Hit testing of composited elements is broken in new multicolumn layout.
2192         https://bugs.webkit.org/show_bug.cgi?id=133522 (<rdar://problem/17060556>)
2193         
2194         Reviewed by Simon Fraser.
2195
2196         Hit testing for the new columns doesn't care about compositing but does still
2197         need a pagination layer set to work. The old column code didn't care about this
2198         because it was top down (and wrong). The new code lets each layer paint and hit
2199         test its own fragments, so having a pagination layer set suddenly becomes relevant
2200         for composited layers.
2201     
2202         The solution is to cache whether or not the pagination layer crosses a compositing
2203         boundary, and then to force call sites of enclosingPaginationLayer to pass an argument
2204         indicating whether compositing layers should be included. Typically painting wants to
2205         exclude them but hit testing wants to include them.
2206
2207         * page/FrameView.cpp:
2208         (WebCore::updateLayerPositionFlags):
2209         * rendering/RenderLayer.cpp:
2210         (WebCore::RenderLayer::RenderLayer):
2211         (WebCore::RenderLayer::updateLayerPositions):
2212         (WebCore::RenderLayer::updatePagination):
2213         (WebCore::transparencyClipBox):
2214         (WebCore::RenderLayer::paintLayer):
2215         (WebCore::RenderLayer::paintLayerContents):
2216         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
2217         (WebCore::RenderLayer::collectFragments):
2218         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2219         (WebCore::RenderLayer::hitTestLayer):
2220         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2221         (WebCore::RenderLayer::calculateClipRects):
2222         * rendering/RenderLayer.h:
2223         * rendering/RenderLayerCompositor.cpp:
2224         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2225
2226 2014-06-06  Kiran  <kiran.guduru@samsung.com>
2227
2228         [MediaStream] 'get' prefix is missing for capabilities and constraints.
2229         https://bugs.webkit.org/show_bug.cgi?id=133573
2230
2231         Reviewed by Eric Carlson.
2232
2233         Modified the existing MediaStreamTrack.html to test the changes.
2234
2235         As per the Media Capture and Streams spec method names constreaints and
2236         capabilities should be prefixed by 'get'. So updated the method names.
2237
2238         * Modules/mediastream/MediaStreamTrack.cpp:
2239         (WebCore::MediaStreamTrack::getConstraints):
2240         (WebCore::MediaStreamTrack::getCapabilities):
2241         (WebCore::MediaStreamTrack::constraints): Deleted.
2242         (WebCore::MediaStreamTrack::capabilities): Deleted.
2243         * Modules/mediastream/MediaStreamTrack.h:
2244         * Modules/mediastream/MediaStreamTrack.idl:
2245
2246 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
2247
2248         REGRESSION(169440): Repro crash when playing a video with captions
2249         https://bugs.webkit.org/show_bug.cgi?id=133459
2250         <rdar://problem/17079081>
2251
2252         Reviewed by Eric Carlson.
2253
2254         The change I made in r169440 introduced a crash for paint-on captions. This
2255         resolves the problem as follows:
2256         1. No longer attempt to modify the start/endTime in the TextTrack implementation.
2257         2. Check for extensions to existing cues when we are about to add new arriving
2258            cues. If they extend a current pending cue, don't set an end-time for the
2259            pending cue, and throw away the new duplicate. Otherwise set the end time
2260            as previously and continue.
2261
2262         * html/track/TextTrack.cpp:
2263         (WebCore::TextTrack::hasCue): Remove 'doesExtendCue' case since this is
2264         no longer possible.
2265         * platform/graphics/InbandTextTrackPrivateClient.h:
2266         (WebCore::GenericCueData::doesExtendCueData): Added.
2267         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2268         (WebCore::InbandTextTrackPrivateAVF::processCue): Check for cues extending
2269         other cues and handle appropriately.
2270
2271 2014-06-06  Brent Fulgham  <bfulgham@apple.com>
2272
2273         ROLLOUT: r169630: Caused a retain cycle.
2274         https://bugs.webkit.org/show_bug.cgi?id=133463
2275         <rdar://problem/17098100>
2276
2277         Rolling out this change as it introduced a retain cycle.
2278
2279         * Modules/mediacontrols/MediaControlsHost.cpp:
2280         (WebCore::MediaControlsHost::setControllerJSObject): Deleted.
2281         * Modules/mediacontrols/MediaControlsHost.h:
2282         (WebCore::MediaControlsHost::controllerJSValue):
2283         (WebCore::MediaControlsHost::setControllerJSValue):
2284         (WebCore::MediaControlsHost::controllerJSObject): Deleted.
2285         * html/HTMLMediaElement.cpp:
2286         (WebCore::HTMLMediaElement::parseAttribute):
2287
2288 2014-06-05  Dean Jackson  <dino@apple.com>
2289
2290         StyleResolver doesn't compile without CSS_GRID_LAYOUT enabled
2291         https://bugs.webkit.org/show_bug.cgi?id=133568
2292
2293         Reviewed by Tim Horton.
2294
2295         * css/StyleResolver.cpp:
2296         (WebCore::isDisplayGridBox): Add UNUSED_PARAM.
2297
2298 2014-06-05  Mihnea Ovidenie  <mihnea@adobe.com>
2299
2300         [CSSRegions] Region box incorrectly overlaps floating box
2301         https://bugs.webkit.org/show_bug.cgi?id=133545
2302
2303         Reviewed by David Hyatt.
2304
2305         A region box creates a BFC and it should not overlap a floating box in the same formatting context: http://www.w3.org/TR/CSS21/visuren.html#bfc-next-to-float
2306
2307         Test: fast/regions/region-as-bfc-avoids-float.html
2308
2309         * rendering/RenderBlock.cpp:
2310         (WebCore::RenderBlock::avoidsFloats):
2311
2312 2014-06-05  Yoav Weiss  <yoav@yoav.ws>
2313
2314         Align srcset parser with recent spec changes
2315         https://bugs.webkit.org/show_bug.cgi?id=133504
2316
2317         Reviewed by Darin Adler.
2318
2319         New tests were added to fast/hidpi/image-srcset-invalid-descriptor.html
2320
2321         The srcset parser changes align it with the spec:
2322         http://picture.responsiveimages.org/#parse-srcset-attr.
2323         The spec changes are meant to give the parser better future
2324         compatibility, and enable it to work well with the 'w' descriptor, the
2325         soon to be added 'h' descriptor and function descriptors (e.g.
2326         future-descriptor(a, b, c) ).
2327
2328         * CMakeLists.txt:
2329         * WebCore.vcxproj/WebCore.vcxproj:
2330         * WebCore.vcxproj/WebCore.vcxproj.filters:
2331         * WebCore.xcodeproj/project.pbxproj:
2332         * html/HTMLImageElement.cpp:
2333         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2334         (WebCore::HTMLImageElement::parseAttribute):
2335         * html/HTMLImageElement.h:
2336         * html/parser/HTMLParserIdioms.h:
2337         (WebCore::isHTMLSpace):
2338         (WebCore::isComma):
2339         (WebCore::isHTMLSpaceOrComma):
2340         * html/parser/HTMLPreloadScanner.cpp:
2341         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2342         * html/parser/HTMLSrcsetParser.cpp:
2343         (WebCore::compareByDensity):
2344         (WebCore::appendDescriptorAndReset):
2345         (WebCore::appendCharacter):
2346         (WebCore::isEOF):
2347         (WebCore::tokenizeDescriptors):
2348         (WebCore::stringViewToFloat):
2349         (WebCore::stringViewToInt):
2350         (WebCore::parseDescriptors):
2351         (WebCore::parseImageCandidatesFromSrcsetAttribute):
2352         (WebCore::pickBestImageCandidate):
2353         (WebCore::bestFitSourceForImageAttributes):
2354         (WebCore::compareByScaleFactor): Deleted.
2355         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
2356         * html/parser/HTMLSrcsetParser.h:
2357         (WebCore::DescriptorParsingResult::DescriptorParsingResult):
2358         (WebCore::DescriptorParsingResult::hasDensity):
2359         (WebCore::DescriptorParsingResult::hasWidth):
2360         (WebCore::DescriptorParsingResult::hasHeight):
2361         (WebCore::DescriptorParsingResult::density):
2362         (WebCore::DescriptorParsingResult::resourceWidth):
2363         (WebCore::DescriptorParsingResult::resourceHeight):
2364         (WebCore::DescriptorParsingResult::setResourceWidth):
2365         (WebCore::DescriptorParsingResult::setResourceHeight):
2366         (WebCore::DescriptorParsingResult::setDensity):
2367         (WebCore::ImageCandidate::ImageCandidate):
2368         (WebCore::ImageCandidate::toString):
2369         (WebCore::ImageCandidate::url):
2370         (WebCore::ImageCandidate::setDensity):
2371         (WebCore::ImageCandidate::density):
2372         (WebCore::ImageCandidate::resourceWidth):
2373         (WebCore::ImageCandidate::srcOrigin):
2374         (WebCore::ImageCandidate::isEmpty):
2375         (WebCore::ImageWithScale::ImageWithScale): Deleted.
2376         (WebCore::ImageWithScale::imageURL): Deleted.
2377         (WebCore::ImageWithScale::scaleFactor): Deleted.
2378         * html/parser/ParsingUtilities.h: Renamed from Source/WebCore/html/track/ParsingUtilities.h.
2379         (skipExactly):
2380         (skipUntil):
2381         (skipWhile):
2382         (reverseSkipWhile):
2383
2384 2014-06-05 Wenson Hsieh  <wenson_hsieh@apple.com>
2385
2386         Current media controls look different from previous media controls. Adjusted CSS to make media elements more similar by adding padding, adjusting hues/svg, resizing elements, etc.
2387
2388         https://bugs.webkit.org/show_bug.cgi?id=133521
2389
2390         Reviewed by Eric Carlson.
2391
2392         The main issues:
2393         - The widths between elements of both audio and video players are incorrect.
2394         - The hues of audio player elements are incorrect.
2395         - The hues of video player elements are content dependent (refer to full-screen mode), and this cannot be exactly replicated using just css. This patch only attempts to make them more similar.
2396         - The height of the audio player is incorrect.
2397
2398         Test: platform/ios-sim/media/audio-width.html
2399
2400         * Modules/mediacontrols/mediaControlsiOS.css: Updated style elements for audio/video elements.
2401         (::-webkit-media-controls): Enforce a minimum width on audio/video controls.
2402         (audio): Enforce a minimum width on audio elements.
2403         (audio::-webkit-media-controls): see below
2404         (audio::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue and width/height.
2405         (audio::-webkit-media-controls-panel): adjusted hue, added left/right padding.
2406         (audio::-webkit-media-controls-fullscreen-button): removed. There's no fullscreen for audio anyways.
2407         (audio::-webkit-media-controls-current-time-display): adjusted font size, added left padding.
2408         (audio::-webkit-media-controls-time-remaining-display): adjusted font size, added right padding.
2409
2410         (video::-webkit-media-controls-panel): adjusted hue, added left/right padding.
2411         (video::-webkit-media-controls-current-time-display): added left padding.
2412         (video::-webkit-media-controls-time-remaining-display): added right padding.
2413         (video::-webkit-media-controls-wireless-playback-picker-button): modified SVG, hue, opacity and width/height.
2414         (video::-webkit-media-controls-fullscreen-button): modified SVG, hue, opacity, and width/height. In particular, made the svg seem sharper.
2415         (video::-webkit-media-controls-play-button): modified SVG, hue, opacity, and width/height.
2416
2417 2014-06-05  Commit Queue  <commit-queue@webkit.org>
2418
2419         Unreviewed, rolling out r169570.
2420         https://bugs.webkit.org/show_bug.cgi?id=133565
2421
2422         It breaks Baidu (Requested by benjaminp on #webkit).
2423
2424         Reverted changeset:
2425
2426         "[iOS] Start ignoring common bogus viewport parameters"
2427         https://bugs.webkit.org/show_bug.cgi?id=133466
2428         http://trac.webkit.org/changeset/169570
2429
2430 2014-06-05  Michael Timbrook  <timbrook@apple.com>
2431
2432         AX: Add support for ARIA 1.1 'none' role
2433         https://bugs.webkit.org/show_bug.cgi?id=133367
2434
2435         Reviewed by Chris Fleizach.
2436
2437         Added support for the 'none' role by added a lookup for it to go to PresentationalRole
2438         Test: accessibility/aria-none-role.html
2439
2440         * accessibility/AccessibilityObject.cpp:
2441         (WebCore::initializeRoleMap):
2442
2443 2014-06-05  Joanmarie Diggs  <jdiggs@igalia.com>
2444
2445         AX: [ATK] Children of tables and lists with role='presentation' should each be exposed as if they were div elements
2446         https://bugs.webkit.org/show_bug.cgi?id=133133
2447
2448         Reviewed by Chris Fleizach.
2449
2450         When a table or list has role='presentation', accessibility is "ignored"
2451         for that element, but not for the required children. The default roles
2452         for the children (CellRole and ListItemRole) do not make sense without
2453         the parent, therefore map them to DivRole in ATK if they inherit the
2454         presentational role.
2455
2456         Test: accessibility/aria-inherits-presentational.html
2457
2458         * accessibility/AccessibilityObject.h:
2459         (WebCore::AccessibilityObject::inheritsPresentationalRole):
2460         * accessibility/AccessibilityRenderObject.cpp:
2461         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2462         * accessibility/AccessibilityRenderObject.h:
2463         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2464         (atkRole):
2465
2466 2014-06-05  Brent Fulgham  <bfulgham@apple.com>
2467
2468         REGRESSION (r167962): Out of bounds read in JSC::StructureIDTable::get() 
2469         https://bugs.webkit.org/show_bug.cgi?id=133463
2470         <rdar://problem/17098100>
2471
2472         Reviewed by Dean Jackson.
2473
2474         Revise MediaControllerHost implementation so that it holds a Strong
2475         reference to the JavaScript 'Controller' object it mirrors. The
2476         MediaControllerHost is constructed when we create an HTMLMediaElement,
2477         and is the logical place to retain ownership of the JS object so that
2478         it does not get garbage collected as long as HTMLMediaElement exists.
2479
2480         * Modules/mediacontrols/MediaControlsHost.cpp:
2481         (WebCore::MediaControlsHost::setControllerJSObject): Create a strong
2482         reference to the JavaScript Controller object.
2483         * Modules/mediacontrols/MediaControlsHost.h: Use JSC::Strong to hold a
2484         JSObject, rather than a bare JSValue.
2485         (WebCore::MediaControlsHost::controllerJSObject): Change name to reflect
2486         that we are working with JSObjects, not JSValues.
2487         (WebCore::MediaControlsHost::controllerJSValue): Deleted.
2488         (WebCore::MediaControlsHost::setControllerJSValue): Deleted.
2489         * html/HTMLMediaElement.cpp:
2490         (WebCore::HTMLMediaElement::parseAttribute): Revise for changed method
2491         signature.
2492
2493 2014-06-05  Benjamin Poulain  <bpoulain@apple.com>
2494
2495         [iOS][WK2] Add device orientation
2496         https://bugs.webkit.org/show_bug.cgi?id=133530
2497
2498         Reviewed by Tim Horton.
2499
2500         Previously, WebCore was getting the orientation directly from the WebKit layer.
2501         This had to be done during the frame creation and was very fragile.
2502
2503         Frame is changed to pull the value from the chrome client. That way we avoid races
2504         and we can maintain a single value for all frames.
2505
2506         Sending the values to all the subframes is aslo done here so that we do not have to repeat
2507         it in both WebKit layers.
2508
2509         * WebCore.exp.in:
2510         * loader/EmptyClients.h:
2511         * page/ChromeClient.h:
2512         * page/Frame.cpp:
2513         (WebCore::Frame::Frame):
2514         (WebCore::Frame::orientationChanged):
2515         (WebCore::Frame::orientation):
2516         (WebCore::Frame::sendOrientationChangeEvent): Deleted.
2517         * page/Frame.h:
2518         (WebCore::Frame::orientation): Deleted.
2519
2520 2014-06-05  Timothy Horton  <timothy_horton@apple.com>
2521
2522         Fix the !CACHE_SUBIMAGES build
2523
2524         * platform/graphics/cg/GraphicsContextCG.cpp:
2525         (WebCore::GraphicsContext::drawNativeImage):
2526
2527 2014-06-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2528
2529         CSS JIT: Clean up StackAllocator
2530         https://bugs.webkit.org/show_bug.cgi?id=133506
2531
2532         Reviewed by Benjamin Poulain.
2533
2534         Cleaning up CSS JIt StackAllocator code. Sharing push / pop code and
2535         using information provided by MacroAssembler more aggressively
2536         to drop ifdefs.
2537
2538         * cssjit/StackAllocator.h:
2539         (WebCore::StackAllocator::allocateUninitialized):
2540         (WebCore::StackAllocator::push):
2541         (WebCore::StackAllocator::pop):
2542         (WebCore::StackAllocator::popAndDiscard):
2543         (WebCore::StackAllocator::popAndDiscardUpTo):
2544         (WebCore::StackAllocator::alignStackPreFunctionCall):
2545         (WebCore::StackAllocator::unalignStackPostFunctionCall):
2546         (WebCore::StackAllocator::stackUnitInBytes):
2547
2548 2014-06-05  Zalan Bujtas  <zalan@apple.com>
2549
2550         Subpixel rendering: border-radius painting falls back to rectangle when the snapped rounded rect becomes non-renderable.
2551         https://bugs.webkit.org/show_bug.cgi?id=133491
2552
2553         Reviewed by Simon Fraser.
2554
2555         Pixel snapping can change the rectangle's size when it is on a certain subpixel position. (usually it does not)
2556         This patch ensures that the snapped rect is still renderable by adjusting the radii as well.
2557
2558         Test: fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html
2559
2560         * platform/graphics/RoundedRect.cpp:
2561         (WebCore::RoundedRect::Radii::scale):
2562         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
2563         * platform/graphics/RoundedRect.h:
2564
2565 2014-06-05  Commit Queue  <commit-queue@webkit.org>
2566
2567         Unreviewed, rolling out r169587.
2568         https://bugs.webkit.org/show_bug.cgi?id=133552
2569
2570         Calls a pure virtual method, crashes (Requested by ap on
2571         #webkit).
2572
2573         Reverted changeset:
2574
2575         "WebKit should adopt journal_mode=wal for all SQLite
2576         databases."
2577         https://bugs.webkit.org/show_bug.cgi?id=133496
2578         http://trac.webkit.org/changeset/169587
2579
2580 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
2581
2582         Apply Character-level mirroring to stretchy operators in RTL mode.
2583         https://bugs.webkit.org/show_bug.cgi?id=130839
2584
2585         Reviewed by Chris Fleizach.
2586
2587         We add support for character-level mirroring for stretchy MathML operators in RTL mode.
2588         Glyph-level mirroring (via the rtlm OpenType feature) will be handled in bug 130840.
2589
2590         Test: mathml/presentation/stretchy-rtl.html
2591
2592         * rendering/mathml/RenderMathMLOperator.cpp: reorganize the Unicode stretchyCharacters table to make mirroring easy.
2593         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): pass the right boolean to glyphDataForCharacter.
2594         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): ditto
2595         (WebCore::RenderMathMLOperator::findStretchyData): ditto and change the index for the stretchyCharacters fallback.
2596         (WebCore::RenderMathMLOperator::updateStyle): pass the right boolean to glyphDataForCharacter.
2597         (WebCore::RenderMathMLOperator::paint): remove the FIXME comment.
2598         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): switch the leading/trailing space in RTL mode.
2599
2600 2014-06-05  Zalan Bujtas  <zalan@apple.com>
2601
2602         Subpixel rendering: Buttons in default media controls shift vertically when controls fade in or out.
2603         https://bugs.webkit.org/show_bug.cgi?id=133488
2604
2605         Reviewed by Simon Fraser.
2606
2607         Filter effects are not subpixel aware yet. They paint to integrally sized image buffers.
2608         In order to ensure that the content is rendered to the the same position on the filter 
2609         source context as if there was no filter, the repaint rects need to be adjusted to match with
2610         the internal filter snapping (enclosingIntRect).
2611         This is a temporary change until after filter effects get subpixelized.
2612
2613         However, this changeset regresses RenderNameFlow clipping when the content is on subpixel position
2614         and filter effect is present. Instead of adding the failing test cases to TestExpectations, I removed
2615         the video controls from the <video> to make the tests pass, when possible (they just happen to have <video>)
2616         and filed webkit.org/b/133523 to track the regression.
2617
2618         Test: css3/filters/filter-is-on-subpixel-position.html
2619
2620         * rendering/RenderLayer.cpp:
2621         (WebCore::RenderLayer::setupFilters):
2622
2623 2014-06-05  Kiran  <kiran.guduru@samsung.com>
2624
2625         [MediaStream] MediaStream.addTrack should not check for tracks ended state.
2626         https://bugs.webkit.org/show_bug.cgi?id=133510
2627
2628         Reviewed by Eric Carlson.
2629
2630         Adding and removing of tracks to a MediaStream should not have dependency
2631         on tracks state. So the check for MediaStreamTrack's ended state has been
2632         removed while adding a track in MediaStreamPrivate.cpp.
2633
2634         Test: fast/mediastream/MediaStream-add-ended-tracks.html
2635
2636         * platform/mediastream/MediaStreamPrivate.cpp:
2637         (WebCore::MediaStreamPrivate::addTrack):
2638
2639 2014-06-05  Gwang Yoon Hwang  <yoon@igalia.com>
2640
2641         [GTK] Remove ScrollViewGtk.cpp
2642         https://bugs.webkit.org/show_bug.cgi?id=133535
2643
2644         Reviewed by Carlos Garcia Campos.
2645
2646         Because GTK+ WK1 was removed, we don't have to consider special cases
2647         handled in ScrollViewGtk.cpp.
2648
2649         No new tests are necessary because there is no behavior change.
2650
2651         * PlatformGTK.cmake:
2652         * platform/ScrollView.cpp:
2653         (WebCore::ScrollView::setScrollbarModes):
2654         (WebCore::ScrollView::visibleContentRectInternal):
2655         * platform/gtk/ScrollViewGtk.cpp: Removed.
2656
2657 2014-06-05  Frédéric Wang  <fred.wang@free.fr>
2658
2659         MathML operators not stretched horizontally
2660         https://bugs.webkit.org/show_bug.cgi?id=72828
2661
2662         Reviewed by Chris Fleizach.
2663
2664         This patch adds basic horizontal stretching rules for operators inside
2665         an <munder>, <mover> or <munderover> elements. The stretchy operators
2666         in such an element stretch to cover the size of the non-stretchy
2667         operators. This only works when fonts that have an OpenType MATH table
2668         are used.
2669
2670         Tests: mathml/opentype/horizontal-LatinModern.html
2671                mathml/opentype/opentype-stretchy-horizontal.html
2672                mathml/opentype/horizontal-LatinModern-munderover.html
2673
2674         * rendering/mathml/RenderMathMLOperator.cpp:
2675         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): We add an ordered list of operators that have horizontal stretch direction.
2676         (WebCore::RenderMathMLOperator::RenderMathMLOperator): init m_Vertical
2677         (WebCore::RenderMathMLOperator::SetOperatorProperties): set m_Vertical by checking whether the operator is in the horizontalOperators list.
2678         (WebCore::RenderMathMLOperator::stretchTo): We do not stretch vertically
2679         if the operator has horizontal direction.
2680         We also add a new version stretchTo(LayoutUnit width) for horizontal stretching only.
2681         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Handle horizontal stretching: the maximumGlyphWidth is the maximum of
2682         the base size or of the stretch size.
2683         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator): Add an ASSERT to ensure that this function is only called for vertical stretching.
2684         (WebCore::RenderMathMLOperator::findStretchyData): Add an ASSERT to ensure that this function is not called to get the maximum width of a horizontal stretchy operator.
2685         We take into account m_isVertical when calling getMathVariants or computing sizes.
2686         There is not any Unicode-only construction for horizontal stretching, so a MATH table is required for horizontal stretching.
2687         (WebCore::RenderMathMLOperator::updateStyle): Ignore some code paths specific to vertical stretching and take into account the m_Vertical parameters.
2688         For horizontal stretching, the m_stretch*Baseline parameters are now updated to match the metrics of the size variant or of the maximum of the parts in the glyph assembly.
2689         (WebCore::RenderMathMLOperator::computeLogicalHeight): logicalHeight is now explicitely the sum of m_stretchHeightAboveBaseline and m_stretchDepthBelowBaseline, since it can be different from the stretchSize() in horizontal stretching.
2690         (WebCore::RenderMathMLOperator::paintGlyph): handle trimming for horizontal stretching.
2691         (WebCore::RenderMathMLOperator::fillWithVerticalExtensionGlyph): rename the function and ensure it is only call for m_isVertical.
2692         (WebCore::RenderMathMLOperator::fillWithHorizontalExtensionGlyph): same as fillWithVerticalExtensionGlyph, but for horizontal stretching.
2693         (WebCore::RenderMathMLOperator::paint): For glyph assembly, choose between paintVerticalGlyphAssembly or paintHorizontalGlyphAssembly.
2694         (WebCore::RenderMathMLOperator::paintVerticalGlyphAssembly): rename the function and ensure it is only call for m_isVertical.
2695         (WebCore::RenderMathMLOperator::paintHorizontalGlyphAssembly): same as paintVerticalGlyphAssembly but for horizontal stretching.
2696         * rendering/mathml/RenderMathMLOperator.h: we add a m_isVertical member to indicate the stretch direction and a m_stretchWidth to indicate the width of the stretchy character.
2697         We define the horizontal counterparts of fillWith*ExtensionGlyph, paint*GlyphAssembly, GlyphPaintTrimming  StretchyData.
2698         Finally stretchSize() takes into account the stretch direction.
2699         * rendering/mathml/RenderMathMLUnderOver.cpp: We override the layout() function to stretch munderover children horizontally.
2700         (WebCore::RenderMathMLUnderOver::layout):
2701         * rendering/mathml/RenderMathMLUnderOver.h: we declare layout().
2702
2703 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2704
2705         [CSS Shapes] Image lifetime is not properly handled for gradient shapes
2706         https://bugs.webkit.org/show_bug.cgi?id=133414
2707
2708         Reviewed by Simon Fraser.
2709
2710         Refactor computedShape() and it's helpers to be able to properly
2711         manage the lifetime of the image returned from StyleImage.
2712
2713         This is a port of a Blink patch by Hans Muller.
2714
2715         Test: fast/shapes/shape-outside-floats/shape-outside-uncached-gradient.html
2716
2717         * rendering/shapes/ShapeOutsideInfo.cpp:
2718         (WebCore::ShapeOutsideInfo::createShapeForImage): Properly handle the
2719             lifetime of the image. Changed to use StyleImage::image() to get
2720             the image in all cases there's no need to special case cached
2721             images.
2722         (WebCore::ShapeOutsideInfo::computedShape): Call createShapeForImage.
2723         (WebCore::getShapeImageAndRect): Deleted.
2724         * rendering/shapes/ShapeOutsideInfo.h:
2725
2726 2014-06-04  Bem Jones-Bey  <bjonesbe@adobe.com>
2727
2728         [CSS Shapes] Fix off by one in creating a RasterShape
2729         https://bugs.webkit.org/show_bug.cgi?id=133499
2730
2731         Reviewed by Darin Adler.
2732
2733         Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-crash.html
2734
2735         * rendering/shapes/RasterShape.cpp:
2736         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
2737             marginY1 is supposed to be an inclusive endpoint, however, maxY()
2738             is an exclusive endpoint. This simply changes marginY1 into an
2739             exclusive endpoint.
2740
2741 2014-06-04  Benjamin Poulain  <bpoulain@apple.com>
2742
2743         [iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
2744         https://bugs.webkit.org/show_bug.cgi?id=133490
2745
2746         Reviewed by Tim Horton.
2747
2748         Expose the WebKit1 parameter "ScaleIsInitial". It is used for a similar concept in WebKit2 (userHasChangedPageScaleFactor).
2749
2750         Add "exposedContentPosition", which is the scroll position of the exposed rect.
2751
2752         * history/HistoryItem.h:
2753         (WebCore::HistoryItem::exposedContentPosition):
2754         (WebCore::HistoryItem::setExposedContentPosition):
2755         (WebCore::HistoryItem::setScaleIsInitial):
2756         * loader/HistoryController.cpp:
2757         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2758
2759 2014-06-04  Alex Christensen  <achristensen@webkit.org>
2760
2761         Enable WebGL on Windows.
2762         https://bugs.webkit.org/show_bug.cgi?id=133503
2763
2764         Reviewed by Brent Fulgham.
2765
2766         No new tests, but we should enable the webgl tests soon.
2767
2768         * html/canvas/WebGLRenderingContext.cpp:
2769         (WebCore::WebGLRenderingContext::markContextChanged):
2770         Check if the context and RenderBox are accelerated to use accelerated code path.
2771         * html/canvas/WebGLRenderingContext.h:
2772         Disable accelerated compositing on WebGL canvases until that works.
2773         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2774         (WebCore::GraphicsContext3D::reshapeFBOs):
2775         Compile fix after r166563.
2776
2777 2014-06-04  Benjamin Poulain  <benjamin@webkit.org>
2778
2779         Regression(r169547): Crash in WebCore::styleForFirstLetter() while loading http://thenextweb.com/apple/2014/02/21/apple-confirms-acquired-testflight-creator-burstly/
2780         https://bugs.webkit.org/show_bug.cgi?id=133500
2781
2782         Reviewed by Antti Koivisto.
2783
2784         Unlike the other tree marking optimization, adding HasPseudoStyle() on an element style
2785         during style resolution must be conservative and not set the flag unless every other filter
2786         matched first.
2787
2788         After r169547, the SelectorChecker was setting flags on HasPseudoStyle() during the pseudo
2789         element matching. If that passed but the remaining filter did not match, the element style
2790         could have the flag "FIRST_LETTER" while not being able to resolve a style for "FIRST_LETTER".
2791
2792         When the layout code was creating the renderer, it would find the FIRST_LETTER flag on the main style
2793         and try to get the specific style for FIRST_LETTER. Since no rule would resolve for FIRST_LETTER,
2794         the style would be null and the code would be crashing when accessing its parameters.
2795
2796         This patch fixes the issue by moving the style marking for pseudo element at the end of the matching.
2797
2798         Test: fast/css/first-letter-on-non-matching-selectors.html
2799
2800         * css/SelectorChecker.cpp:
2801         (WebCore::SelectorChecker::match):
2802         (WebCore::SelectorChecker::matchRecursively):
2803         * css/SelectorChecker.h:
2804         (WebCore::SelectorChecker::match): Deleted.
2805
2806 2014-06-04  Eric Carlson  <eric.carlson@apple.com>
2807
2808         [iOS] allow UA to specify network interface
2809         https://bugs.webkit.org/show_bug.cgi?id=133396
2810
2811         Reviewed by Jer Noble.
2812
2813         * html/HTMLMediaElement.cpp:
2814         (WebCore::HTMLMediaElement::mediaPlayerInterfaceName): Return settings->networkInterfaceName.
2815         * html/HTMLMediaElement.h:
2816
2817         * platform/graphics/MediaPlayer.cpp:
2818         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName): Pass through the media element.
2819         * platform/graphics/MediaPlayer.h:
2820         (WebCore::MediaPlayerClient::mediaPlayerNetworkInterfaceName):
2821
2822         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2823         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): If the media player
2824             wants to use a specific netork interface name, pass it to the AVAsset allocator.
2825
2826 2014-06-03  Jon Honeycutt  <jhoneycutt@apple.com>
2827
2828         Pasting multiple photos on iOS only pastes one photo
2829
2830         <https://bugs.webkit.org/show_bug.cgi?id=133495>
2831         <rdar://problem/16138616>
2832
2833         Reviewed by Alexey Proskuryakov.
2834
2835         * editing/ios/EditorIOS.mm:
2836         (WebCore::Editor::pasteWithPasteboard):
2837         Create a WebContentReader. For each pasteboard item, get the document
2838         fragment for that item, and add it to the reader. If we fail to get
2839         the fragment from the delegate, fall back to using
2840         webContentFromPasteboard() as before.
2841
2842 2014-06-04  Myles C. Maxfield  <litherum@gmail.com>
2843
2844         Use references instead of pointers for non-optional arguments during text layout
2845         https://bugs.webkit.org/show_bug.cgi?id=133501
2846
2847         Reviewed by Tim Horton.
2848
2849         This patch applies some cleanup to InlineBox layout functions to take
2850         references instead of pointers where appropriate.
2851
2852         No new tests are necessary because there is no behavior change.
2853
2854         * rendering/InlineFlowBox.cpp:
2855         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Make the function take a
2856         reference to the RootInlineBox instead of a pointer. This function does some
2857         rounding.
2858         (WebCore::InlineFlowBox::addTextBoxVisualOverflow): Make the function take a
2859         reference to the InlineTextBox instead of a pointer.
2860         (WebCore::InlineFlowBox::computeOverflow): Update call to addTextBoxVisualOverflow
2861         to pass a reference instead of a pointer.
2862         * rendering/RootInlineBox.cpp:
2863         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Update call to
2864         computeLogicalBoxHeights to pass a reference instead of a pointer.
2865         (WebCore::RootInlineBox::ascentAndDescentForBox): Make the function take a
2866         reference to the InlineBox instead of a pointer.
2867         (WebCore::RootInlineBox::includeLeadingForBox): Make the function take a reference
2868         instead of a pointer.
2869         (WebCore::RootInlineBox::includeFontForBox): Ditto.
2870         (WebCore::RootInlineBox::includeGlyphsForBox): Ditto.
2871         (WebCore::RootInlineBox::includeMarginForBox): Ditto.
2872         * rendering/RootInlineBox.h: Move functions that are not externally called into
2873         a private: section. In addition, update function signatures to take references
2874         instead of pointers.
2875
2876 2014-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
2877
2878         Lists styled with SVG fonts are not rendered as expected
2879         https://bugs.webkit.org/show_bug.cgi?id=133198
2880
2881         Reviewed by Simon Fraser.
2882
2883         There were a couple places in RenderListMarker and RenderMenuList that were
2884         implicitly creating TextRuns by passing a String to a function which
2885         expected a TextRun. Because TextRun has a constructor which takes a single
2886         String and isn't marked explicit, TextRuns were being created without
2887         any of the associated code that initializes the TextRun (such as creating
2888         a RenderingContext if necessary).
2889
2890         There is currently one more client of this code that needs to be fixed.
2891         This is in RenderThemeIOS::adjustMenuListButtonStyle(). However, fixing
2892         this will be a somewhat large change, and is out of scope for this patch.
2893         I will submit a follow-up patch that fixes this permanently. Once this is
2894         fixed, I can mark TextRun's constructors as explicit.
2895
2896         Test: svg/custom/list-items-with-svg-font-family.html
2897
2898         * platform/graphics/TextRun.h:
2899         (WebCore::TextRun::TextRun): Mark constructors as explicit.
2900         * rendering/RenderListMarker.cpp:
2901         (WebCore::RenderListMarker::computePreferredLogicalWidths): Call
2902         RenderBlock::constructTextRun.
2903         (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto.
2904         * rendering/RenderMenuList.cpp:
2905         (RenderMenuList::updateOptionsWidth): Ditto.
2906         * rendering/RenderThemeIOS.mm:
2907         (WebCore::adjustInputElementButtonStyle): Instead of crashing, mark
2908         form controls rendered with SVG fonts as having 0 width. This isn't
2909         perfect, but fixing this is out of scope for this patch.
2910
2911 2014-06-04  Andreas Kling  <akling@apple.com>
2912
2913         WebKit should adopt journal_mode=wal for all SQLite databases.
2914         <https://webkit.org/b/133496>
2915         <rdar://problem/15600186>
2916
2917         We already had code to enable write-ahead logging, but it didn't work
2918         since calling SQLiteStatement::step() without first calling prepare()
2919         is a no-op.
2920
2921         Converted it to use into a simple executeCommand() instead.
2922
2923         Reviewed by Brady Eidson.
2924
2925         * platform/sql/SQLiteDatabase.cpp:
2926         (WebCore::SQLiteDatabase::open):
2927
2928 2014-06-04  Radu Stavila  <stavila@adobe.com>
2929
2930         REGRESSION: [CSS Regions] Regions with overflow:auto generate scrollbars even if the content flows into the following regions and as such, should not be scrolled
2931         https://bugs.webkit.org/show_bug.cgi?id=133481
2932
2933         Reviewed by Antti Koivisto.
2934
2935         When enlarging the layout overflow of a scrollable region, the portion of the content that flows
2936         in the region must be taken into consideration. If the content continues to flow into the next
2937         region, the layout overflow of the current region must not be enlarged.
2938
2939         Test: fast/regions/scrollable-first-region.html
2940
2941         * rendering/RenderFlowThread.cpp:
2942         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2943
2944 2014-06-03  Benjamin Poulain  <benjamin@webkit.org>
2945
2946         Fix some corner cases of :hover and :active in quirks mode
2947         https://bugs.webkit.org/show_bug.cgi?id=133493
2948
2949         Reviewed by Andreas Kling.
2950
2951         Previously, the quirks mode of :hover and :active were evaluated from the SelectorFragment
2952         in fragmentOnlyMatchesLinksInQuirksMode(). There were two problems with that approach:
2953         1) The FragmentGenerator optimizes out some filter when they always match or can never match.
2954            Those fragment should still qualify :hover and :active, but they were lost
2955            for fragmentOnlyMatchesLinksInQuirksMode().
2956         2) Explicitely listing every attribute of SelectorFragment in fragmentOnlyMatchesLinksInQuirksMode()
2957            was extremly fragile. When :not() and :-webkit-any() were added, we forgot to update the quirks
2958            exceptions.
2959
2960         This patch moves the quirks mode exception code from the code generator to the Fragment generator.
2961         The useless filters are no longer ignored for the quirks, and we don't need to update the quirks mode detection
2962         with every change of SelectorFragment.
2963
2964         It is inefficient and ugly, but that is how that quirks is defined. It is only a problem for compilation,
2965         execution time remains unchanged.
2966
2967         * cssjit/SelectorCompiler.cpp:
2968         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2969         (WebCore::SelectorCompiler::addPseudoClassType):
2970         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2971         (WebCore::SelectorCompiler::pseudoClassOnlyMatchesLinksInQuirksMode):
2972         (WebCore::SelectorCompiler::constructFragments):
2973         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
2974         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode): Deleted.
2975
2976 2014-06-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2977
2978         Need to check invalid scheme in navigator content utils 
2979         https://bugs.webkit.org/show_bug.cgi?id=133296
2980
2981         Reviewed by Darin Adler.
2982
2983         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2984         (WebCore::verifyProtocolHandlerScheme): Just fix a wrong typo.
2985
2986 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
2987
2988         WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
2989         https://bugs.webkit.org/show_bug.cgi?id=133472
2990         <rdar://problem/15686848>
2991
2992         Reviewed by Simon Fraser.
2993
2994         * WebCore.exp.in:
2995
2996 2014-06-03  Yoav Weiss  <yoav@yoav.ws>
2997
2998         Refactor the srcset parser into its own file
2999         https://bugs.webkit.org/show_bug.cgi?id=133480
3000
3001         Reviewed by Andreas Kling.
3002
3003         No new tests, since this patch doesn't change the parser's behavior.
3004
3005         This patch moves the srcset parser into its own file,
3006         in order to prepare the code for alignment with recent spec changes.
3007
3008         * CMakeLists.txt:
3009         * html/HTMLImageElement.cpp:
3010         * html/parser/HTMLParserIdioms.cpp:
3011         (WebCore::compareByScaleFactor): Deleted.
3012         (WebCore::parseDescriptors): Deleted.
3013         (WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
3014         (WebCore::bestFitSourceForImageAttributes): Deleted.
3015         * html/parser/HTMLParserIdioms.h:
3016         (WebCore::ImageWithScale::ImageWithScale): Deleted.
3017         (WebCore::ImageWithScale::imageURL): Deleted.
3018         (WebCore::ImageWithScale::scaleFactor): Deleted.
3019         * html/parser/HTMLPreloadScanner.cpp:
3020         * html/parser/HTMLSrcsetParser.cpp: Added.
3021         (WebCore::compareByScaleFactor):
3022         (WebCore::parseDescriptors):
3023         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
3024         (WebCore::bestFitSourceForImageAttributes):
3025         * html/parser/HTMLSrcsetParser.h: Added.
3026         (WebCore::ImageWithScale::ImageWithScale):
3027         (WebCore::ImageWithScale::imageURL):
3028         (WebCore::ImageWithScale::scaleFactor):
3029
3030 2014-06-03  Mario Sanchez Prada  <mario.prada@samsung.com>
3031
3032         [ATK] accessibility/textarea-selected-text-range.html is failing
3033         https://bugs.webkit.org/show_bug.cgi?id=133479
3034
3035         Reviewed by Chris Fleizach.
3036
3037         Implement atk_text_set_caret_offset() in terms of
3038         atk_text_set_selection() for zero-length selections.
3039
3040         No new tests needed, the following test should just start
3041         passing again now: accessibility/textarea-selected-text-range.html.
3042
3043         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3044         (webkitAccessibleTextSetCaretOffset): Reimplemented this function
3045         in terms of webkitAccessibleTextSetSelection().
3046
3047 2014-06-03  Alex Christensen  <achristensen@webkit.org>
3048
3049         Corrected arm64 assertion in css jit.
3050
3051         Rubber stamped by Benjamin Poulain.
3052
3053         * cssjit/StackAllocator.h:
3054         (WebCore::StackAllocator::pop):
3055         Changed assertion from incorrectly matching x86_64 to using the correct minimum offset,
3056         taking into account that a stackUnitInBytes is used for two registers on arm64
3057         except the last stack unit, which could only be used for one register if there are
3058         an odd number of registers.
3059
3060 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
3061
3062         [iOS] Start ignoring common bogus viewport parameters
3063         https://bugs.webkit.org/show_bug.cgi?id=133466
3064         <rdar://problem/16203396>
3065
3066         Reviewed by Sam Weinig.
3067
3068         Incorrect viewports are spreading really quickly lately. We have to start ignoring
3069         some combinations of arguments as they are almost always used incorrectly, causing
3070         a poor user experience on those websites.
3071
3072         * dom/ViewportArguments.cpp:
3073         (WebCore::finalizeViewportArguments):
3074
3075 2014-06-03  Yusuke Suzuki  <utatane.tea@gmail.com>
3076
3077         CSS JIT: add support for the "any" pseudo class
3078         https://bugs.webkit.org/show_bug.cgi?id=133473
3079
3080         Reviewed by Benjamin Poulain.
3081
3082         Add support for the :any pseudo class.
3083
3084         Test: fast/selectors/pseudo-class-any.html
3085
3086         * cssjit/SelectorCompiler.cpp:
3087         (WebCore::SelectorCompiler::addPseudoClassType):
3088         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3089         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3090         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesAnyPseudoClass):
3091
3092 2014-06-02  Jer Noble  <jer.noble@apple.com>
3093
3094         Update PlatformTimeRanges to use MediaTime rather than doubles for time values.
3095         https://bugs.webkit.org/show_bug.cgi?id=133454
3096
3097         Reviewed by Eric Carlson.
3098
3099         PlatformTimeRanges will now use MediaTime, so operations at the platform level won't
3100         lose precision when converting to and from doubles and rational time values like CMTime.
3101
3102         * Modules/mediasource/SourceBuffer.cpp:
3103         (WebCore::currentTimeFudgeFactor):
3104         (WebCore::SourceBuffer::hasCurrentTime):
3105         (WebCore::SourceBuffer::hasFutureTime):
3106         (WebCore::SourceBuffer::canPlayThrough):
3107         * html/HTMLMediaElement.cpp:
3108         (WebCore::HTMLMediaElement::parseAttribute):
3109         * html/TimeRanges.cpp:
3110         (WebCore::TimeRanges::TimeRanges):
3111         (WebCore::TimeRanges::start):
3112         (WebCore::TimeRanges::end):
3113         (WebCore::TimeRanges::add):
3114         (WebCore::TimeRanges::contain):
3115         (WebCore::TimeRanges::find):
3116         (WebCore::TimeRanges::nearest):
3117         (WebCore::TimeRanges::totalDuration):
3118         * platform/graphics/MediaPlayerPrivate.h:
3119         (WebCore::MediaPlayerPrivateInterface::seekable):
3120         * platform/graphics/PlatformTimeRanges.cpp:
3121         (WebCore::PlatformTimeRanges::create):
3122         (WebCore::PlatformTimeRanges::PlatformTimeRanges):
3123         (WebCore::PlatformTimeRanges::invert):
3124         (WebCore::PlatformTimeRanges::start):
3125         (WebCore::PlatformTimeRanges::end):
3126         (WebCore::PlatformTimeRanges::add):
3127         (WebCore::PlatformTimeRanges::contain):
3128         (WebCore::PlatformTimeRanges::find):
3129         (WebCore::PlatformTimeRanges::nearest):
3130         (WebCore::PlatformTimeRanges::totalDuration):
3131         * platform/graphics/PlatformTimeRanges.h:
3132         (WebCore::PlatformTimeRanges::Range::Range):
3133         (WebCore::PlatformTimeRanges::Range::isPointInRange):
3134         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3135         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
3136         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3137         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
3138         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3139         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
3140         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3141         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
3142         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Deleted.
3143         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3144         (WebCore::MediaPlayerPrivateQTKit::buffered):
3145         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3146         (WebCore::MediaPlayerPrivateGStreamer::buffered):
3147         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3148         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
3149
3150 2014-06-03  Benjamin Poulain  <bpoulain@apple.com>
3151
3152         [iOS][WK2] Align the highlight rects with device pixels
3153         https://bugs.webkit.org/show_bug.cgi?id=133464
3154
3155         Reviewed by Enrica Casucci.
3156
3157         Add utility functions to pixel align points and rects.
3158
3159         * WebCore.exp.in:
3160         * platform/graphics/FloatPoint.h:
3161         (WebCore::flooredToDevicePixels):
3162         (WebCore::ceiledToDevicePixels):
3163         * platform/graphics/FloatRect.cpp:
3164         (WebCore::enclosingRectExtendedToDevicePixels):
3165         * platform/graphics/FloatRect.h:
3166
3167 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
3168
3169         Prepopulated tiles may never be unparented from TileGrids with aggressive tile retention on
3170         https://bugs.webkit.org/show_bug.cgi?id=133471
3171
3172         Reviewed by Simon Fraser.
3173
3174         * platform/graphics/ca/mac/TileController.h:
3175         * platform/graphics/ca/mac/TileGrid.h:
3176         (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
3177         * platform/graphics/ca/mac/TileGrid.mm:
3178         (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
3179         (WebCore::TileGrid::cohortRemovalTimerFired):
3180         Factor timeUntilExpiration() out of cohortRemovalTimerFired().
3181
3182         (WebCore::TileGrid::revalidateTiles):
3183         Ensure that secondary tiles that never touch the primary coverage rect
3184         are still unparented eventually (after 2 seconds, the same lifetime we use
3185         for cohorts in non-aggressive retention).
3186         Schedule another revalidateTiles if we left parented secondary tiles behind.
3187
3188 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
3189
3190         TileGrid::prepopulateRect populates the wrong tiles if scale != 1
3191         https://bugs.webkit.org/show_bug.cgi?id=133470
3192
3193         Reviewed by Simon Fraser.
3194
3195         * page/FrameView.cpp:
3196         (WebCore::FrameView::requestScrollPositionUpdate):
3197         * platform/graphics/ca/mac/TileGrid.mm:
3198         (WebCore::TileGrid::prepopulateRect):
3199         (WebCore::TileGrid::revalidateTiles):
3200         prepopulateRect takes rects in "content" coordinates, but when later passed to
3201         ensureTilesForRect, they're expected to be in the same coordinate space as the layer's
3202         visible rect, and are scaled up. So, apply the inverse scale to counter that.
3203
3204 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
3205
3206         Minor TileCoverageMap refinements
3207         https://bugs.webkit.org/show_bug.cgi?id=133468
3208
3209         Reviewed by Simon Fraser.
3210
3211         * platform/graphics/ca/mac/TileController.mm:
3212         (WebCore::TileController::setContentsScale):
3213         * platform/graphics/ca/mac/TileCoverageMap.h:
3214         * platform/graphics/ca/mac/TileCoverageMap.mm:
3215         (WebCore::TileCoverageMap::TileCoverageMap):
3216         (WebCore::TileCoverageMap::setDeviceScaleFactor):
3217         Keep the TileCoverageMap's contentsScale at the device scale factor, so that it
3218         looks sharp on non-1x displays.
3219
3220         (WebCore::TileCoverageMap::update):
3221         Decrease the height available for the TileCoverageMap by the topContentInset;
3222         it's already being vertically offset by the topContentInset, but the height was
3223         not adjusted, so it would run off the bottom of the window.
3224
3225         * platform/graphics/ca/mac/TileGrid.mm:
3226         (WebCore::TileGrid::drawTileMapContents):
3227         If using aggressive tile retention (and thus not coloring tiles based on age),
3228         dim tiles that aren't in the visible cohort.
3229
3230 2014-06-03  Timothy Horton  <timothy_horton@apple.com>
3231
3232         Fix a typo, TileGrid::updateTilerLayerProperties
3233         https://bugs.webkit.org/show_bug.cgi?id=133474
3234
3235         Reviewed by Anders Carlsson.
3236
3237         * platform/graphics/ca/mac/TileController.mm:
3238         (WebCore::TileController::setAcceleratesDrawing):
3239         (WebCore::TileController::setTilesOpaque):
3240         (WebCore::TileController::setTileDebugBorderWidth):
3241         (WebCore::TileController::setTileDebugBorderColor):
3242         * platform/graphics/ca/mac/TileGrid.h:
3243         * platform/graphics/ca/mac/TileGrid.mm:
3244         (WebCore::TileGrid::updateTileLayerProperties):
3245         (WebCore::TileGrid::updateTilerLayerProperties):
3246         s/updateTilerLayerProperties/updateTileLayerProperties/g
3247
3248 2014-06-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3249
3250         [SOUP] ResourceLoadTiming.responseStart is always 0
3251         https://bugs.webkit.org/show_bug.cgi?id=133469
3252
3253         Reviewed by Sergio Villar Senin.
3254
3255         * platform/network/soup/ResourceHandleSoup.cpp:
3256         (WebCore::sendRequestCallback): Record the responseStart time.
3257
3258 2014-06-02  David Kilzer  <ddkilzer@apple.com>
3259
3260         [iOS] WebCore fails to build: platform/network/mac/ResourceHandleMac.mm:729:62: error: use of undeclared identifier '_CFURLConnectionCopyTimingData'
3261         <http://webkit.org/b/133445>
3262         <rdar://problem/17090035>
3263
3264         Reviewed by Alexey Proskuryakov.
3265
3266         * platform/network/mac/ResourceHandleMac.mm: Attempt to fix the
3267         build by including a private header and local declaration.
3268
3269 2014-05-31  Anders Carlsson  <andersca@apple.com>
3270
3271         Change DeferrableOneShotTimer to use std::function instead of being a class template
3272         https://bugs.webkit.org/show_bug.cgi?id=133423
3273
3274         Reviewed by Antti Koivisto.
3275
3276         Also, add a new constructor to DeferrableOneShotTimer that takes an std::function. Change the callback
3277         to not pass a DeferrableOneShotTimer& anymore. Change the delay parameter to use std::chrono::milliseconds.
3278
3279         * css/CSSImageGeneratorValue.cpp:
3280         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
3281         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
3282         * css/CSSImageGeneratorValue.h:
3283         * html/HTMLPlugInImageElement.cpp:
3284         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
3285         * html/HTMLPlugInImageElement.h:
3286         * loader/cache/CachedResource.cpp:
3287         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
3288         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
3289         (WebCore::CachedResource::decodedDataDeletionTimerFired):
3290         * loader/cache/CachedResource.h:
3291         * loader/cache/MemoryCache.cpp:
3292         (WebCore::MemoryCache::MemoryCache):
3293         * loader/cache/MemoryCache.h:
3294         (WebCore::MemoryCache::setDeadDecodedDataDeletionInterval):
3295         (WebCore::MemoryCache::deadDecodedDataDeletionInterval):
3296         * platform/Timer.h:
3297         (WebCore::Timer::Timer):
3298         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
3299         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
3300         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
3301         * platform/graphics/cg/SubimageCacheWithTimer.h:
3302
3303 2014-06-02  Benjamin Poulain  <benjamin@webkit.org>
3304
3305         Make pseudo element matching for style resolution more JIT friendly
3306         https://bugs.webkit.org/show_bug.cgi?id=133441
3307
3308         Reviewed by Antti Koivisto.
3309
3310         Sharing pseudo elements is a complicated mess shared between the SelectorChecker
3311         and the RuleCollector.
3312
3313         For compiling pseudo element matching, it would be best if all the complexity could
3314         be moved to compile time instead of runtime. It is also preferable to keep the compiler
3315         independant of the RuleCollector implementation's detail.
3316
3317         This patch is a first step toward that goal. The main objective here is to make
3318         "dynamicPseudo" completely internal to the SelectorChecker.
3319         This is mostly a mechanical change, it is likely PseudoElement matching could be simplified
3320         further but that is not attempted here.
3321
3322         Test: fast/css/style-sharing-empty-rule-modification.html
3323
3324         * css/ElementRuleCollector.cpp:
3325         (WebCore::ElementRuleCollector::ruleMatches):
3326         The condition regarding pseudo element matching has been moved into SelectorChecker::match().
3327
3328         This creates an extra cost for querySelector(), but that should be fine since the vast majority
3329         of selectors are JIT compiled and never use SelectorChecker in the first place.
3330
3331         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3332         The loop is changed such that the tree marking (Style::setHasPseudoStyle) could be moved
3333         to SelectorChecker.
3334
3335         The conditions about the security origin for getMatchedCSSRules() and the empty style rules
3336         are moved prior to the call to ElementRuleCollector::ruleMatches(). This ensure we keep the same
3337         behavior of not adding the pseudo style for empty rules (this could also help with tree marking
3338         in general but empty rules are probably uncommon).
3339
3340         There is one behavior change from making this loop simpler: the SharingRules and StyleInvalidation
3341         modes now update their ruleRange. It is useless but it is simpler.
3342
3343         * css/ElementRuleCollector.h:
3344         * css/SelectorChecker.cpp:
3345         (WebCore::SelectorChecker::matchRecursively):
3346         The tree marking has been moved here.
3347
3348         * css/SelectorChecker.h:
3349         (WebCore::SelectorChecker::match):
3350         The pseudo element matching has been moved here.
3351
3352         * css/StyleResolver.h:
3353         (WebCore::checkRegionSelector):
3354         * dom/SelectorQuery.cpp:
3355         (WebCore::SelectorDataList::selectorMatches):
3356
3357 2014-06-02  Jeremy Jones  <jeremyj@apple.com>
3358
3359         Send external playback properties to fullscreen.
3360         https://bugs.webkit.org/show_bug.cgi?id=133366
3361
3362         Reviewed by Simon Fraser.
3363
3364         Refactor property updates in WebVideoFullscreenModelMediaElement and update
3365         setExternalPlayback on webkitcurrentplaybacktargetiswirelesschangedEvent.
3366
3367         * WebCore.exp.in: Add export for setExternalPlayback.
3368         * platform/ios/WebVideoFullscreenInterface.h: add setExternalPlayback
3369         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: add setExternalPlayback
3370         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3371         (-[WebAVPlayerController isPlayingOnExternalScreen]): added
3372         (+[WebAVPlayerController keyPathsForValuesAffectingPlayingOnExternalScreen]): added
3373         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): added
3374         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): added
3375         * platform/ios/WebVideoFullscreenModelMediaElement.h: add updateForEventName
3376         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
3377         (WebVideoFullscreenModelMediaElement::setMediaElement): refactor property changes into updateForEventName()
3378         (WebVideoFullscreenModelMediaElement::handleEvent): refactor property changes into updateForEventName()
3379         (WebVideoFullscreenModelMediaElement::updateForEventName): remove duplicate code, implement for setExternalPlayback
3380
3381 2014-06-02  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3382
3383         WebCore build fix for webreplay
3384         https://bugs.webkit.org/show_bug.cgi?id=133401
3385
3386         Reviewed by Darin Adler.
3387
3388         * replay/MemoizedDOMResult.cpp:
3389         (WebCore::MemoizedDOMResultBase::createFromEncodedResult):
3390         Add a default nullptr return in order to avoid a gcc warning.
3391         The warning is because of a non-void method that has a case which doesn't return.
3392         * replay/ReplayController.cpp:
3393         (WebCore::ReplayController::setForceDeterministicSettings):
3394         Guard the ScrollingCoordinator with the appropriate #ifdef.
3395         * replay/SerializationMethods.cpp:
3396         Guard the KeypressCommand with COCOA as it is only present there.
3397
3398 2014-06-02  Jer Noble  <jer.noble@apple.com>
3399
3400         Further unreviewed GTK build fix after r169536.
3401
3402         Update the m_duration contructor in MediaSourceGStreamer.
3403
3404         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3405         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
3406
3407 2014-06-02  Jer Noble  <jer.noble@apple.com>
3408
3409         Unreviewed GTK build fix after r169536.
3410
3411         Update MediaSourceGStreamer to match new duration parameters.
3412
3413         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3414         (WebCore::MediaSourceGStreamer::setDuration): Ditto.
3415         * platform/graphics/gstreamer/MediaSourceGStreamer.h:
3416         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3417
3418 2014-06-02  Jer Noble  <jer.noble@apple.com>
3419
3420         [MSE][Mac] Media does not generate 'ended' event when playing to duration.
3421         https://bugs.webkit.org/show_bug.cgi?id=133452
3422
3423         Reviewed by Eric Carlson.
3424
3425         Add a boundaryTimeObserver to the AVSampleBufferRenderSynchronizer to detect when
3426         playback crosses the duration boundary, and pause in that event. Also refuse to begin
3427         playback if the currentTime is beyond the duration. Also, pause playback if duration
3428         becomes less than currentTime.
3429
3430         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3431         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3432         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
3433         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
3434         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime):
3435         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
3436         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
3437
3438         Update MediaSource::duration() and ::setDuration() to take and give MediaTimes rather than doubles:
3439         * Modules/mediasource/MediaSource.cpp:
3440         (WebCore::MediaSource::duration): double -> MediaTime.
3441         (WebCore::MediaSource::setDuration): Ditto.
3442         (WebCore::MediaSource::streamEndedWithError): Ditto.
3443         * platform/graphics/MediaSourcePrivate.h: Ditto.
3444         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3445         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3446         (WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Ditto.
3447         (WebCore::MediaSourcePrivateAVFObjC::duration): Ditto.
3448         (WebCore::MediaSourcePrivateAVFObjC::setDuration): Ditto.
3449         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3450         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Ditto.
3451         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Ditto.
3452         (WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
3453         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
3454         (WebCore::MockMediaPlayerMediaSource::updateDuration): Ditto.
3455         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3456         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3457         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Ditto.
3458         (WebCore::MockMediaSourcePrivate::duration): Ditto.
3459         (WebCore::MockMediaSourcePrivate::setDuration): Ditto.
3460         * platform/mock/mediasource/MockMediaSourcePrivate.h:
3461
3462 2014-06-02  Zalan Bujtas  <zalan@apple.com>
3463
3464         Rename ImagePaintingContext to ImagePaintingOptions.
3465         https://bugs.webkit.org/show_bug.cgi?id=133451
3466
3467         Reviewed by Simon Fraser.
3468
3469         No change in functionality.
3470
3471         * WebCore.exp.in:
3472         * html/HTMLCanvasElement.cpp:
3473         (WebCore::HTMLCanvasElement::paint):
3474         * html/canvas/CanvasRenderingContext2D.cpp:
3475         (WebCore::CanvasRenderingContext2D::drawImage):
3476         * platform/graphics/GraphicsContext.cpp:
3477         (WebCore::GraphicsContext::drawImage):
3478         (WebCore::GraphicsContext::drawTiledImage):
3479         (WebCore::GraphicsContext::drawImageBuffer):
3480         * platform/graphics/GraphicsContext.h:
3481         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
3482         (WebCore::ImagePaintingContext::ImagePaintingContext): Deleted.
3483         * rendering/RenderBoxModelObject.cpp:
3484         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3485         * rendering/RenderEmbeddedObject.cpp:
3486         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
3487         * rendering/RenderImage.cpp:
3488         (WebCore::RenderImage::paintIntoRect):
3489         * rendering/RenderSnapshottedPlugIn.cpp:
3490         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
3491
3492 2014-05-31  Brent Fulgham  <bfulgham@apple.com>
3493
3494         REGRESSION (r154622): Borders disappear when hovering over cells in table
3495         https://bugs.webkit.org/show_bug.cgi?id=133057
3496         <rdar://problem/15922359>
3497
3498         Reviewed by Tim Horton.
3499
3500         * rendering/RenderTableCell.cpp:
3501         (WebCore::RenderTableCell::paintCollapsedBorders): Revert recent
3502         non-edge collapsed border optimization due to drawing
3503         regressions.
3504
3505 2014-06-02  Zalan Bujtas  <zalan@apple.com>
3506
3507         Provide better encapsulation for image related painting properties.
3508         https://bugs.webkit.org/show_bug.cgi?id=133434
3509
3510         Reviewed by Darin Adler.
3511
3512         Image related drawing property list keeps growing for the functions below and results in
3513         multiple overloadings with seemingly random default parameters.
3514         
3515         GraphicsContext::drawImage()
3516         GraphicsContext::drawTiledImage()
3517         GraphicsContext::drawImageBuffer()
3518         
3519         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
3520         introducing a new property does not result in yet another overloaded function.
3521
3522         No change in functionality.
3523
3524         * WebCore.exp.in:
3525         * html/HTMLCanvasElement.cpp:
3526         (WebCore::HTMLCanvasElement::paint):
3527         * html/canvas/CanvasRenderingContext2D.cpp:
3528         (WebCore::CanvasRenderingContext2D::drawImage):
3529         (WebCore::CanvasRenderingContext2D::compositeBuffer):
3530         * platform/graphics/GraphicsContext.cpp:
3531         (WebCore::GraphicsContext::drawImage):
3532         (WebCore::GraphicsContext::drawTiledImage):
3533         (WebCore::GraphicsContext::drawImageBuffer):
3534         * platform/graphics/GraphicsContext.h:
3535         (WebCore::ImagePaintingContext::ImagePaintingContext):
3536         * platform/graphics/ShadowBlur.cpp:
3537         (WebCore::ShadowBlur::endShadowLayer):
3538         * platform/graphics/cairo/ImageBufferCairo.cpp:
3539         (WebCore::ImageBuffer::draw):
3540         * platform/graphics/filters/FEComposite.cpp:
3541         (WebCore::FEComposite::platformApplySoftware):
3542         * rendering/FilterEffectRenderer.cpp:
3543         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
3544         * rendering/RenderBoxModelObject.cpp:
3545         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3546         * rendering/RenderEmbeddedObject.cpp:
3547         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
3548         * rendering/RenderImage.cpp:
3549         (WebCore::RenderImage::paintReplaced):
3550         (WebCore::RenderImage::paintIntoRect):
3551         * rendering/RenderSnapshottedPlugIn.cpp:
3552         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
3553
3554 2014-06-02  Commit Queue  <commit-queue@webkit.org>
3555
3556         Unreviewed, rolling out r169529.
3557         https://bugs.webkit.org/show_bug.cgi?id=133447
3558
3559         caused assert in drawImage() (Requested by zalan on #webkit).
3560
3561         Reverted changeset:
3562
3563         "Provide better encapsulation for image related painting
3564         properties."
3565         https://bugs.webkit.org/show_bug.cgi?id=133434
3566         http://trac.webkit.org/changeset/169529
3567
3568 2014-06-02  Zalan Bujtas  <zalan@apple.com>
3569
3570         Provide better encapsulation for image related painting properties.
3571         https://bugs.webkit.org/show_bug.cgi?id=133434
3572
3573         Reviewed by Darin Adler.
3574
3575         Image related drawing property list keeps growing for the functions below and results in
3576         multiple overloadings with seemingly random default parameters.
3577         
3578         GraphicsContext::drawImage()
3579         GraphicsContext::drawTiledImage()
3580         GraphicsContext::drawImageBuffer()
3581         
3582         This patch provides encapsulation for the image drawing properties. Encapsulation ensures that
3583         introducing a new property does not result in yet another overloaded function.
3584
3585         No change in functionality.
3586
3587         * WebCore.exp.in:
3588         * html/HTMLCanvasElement.cpp:
3589         (WebCore::HTMLCanvasElement::paint):
3590         * html/canvas/CanvasRenderingContext2D.cpp:
3591         (WebCore::CanvasRenderingContext2D::drawImage):
3592         (WebCore::CanvasRenderingContext2D::compositeBuffer):
3593         * platform/graphics/GraphicsContext.cpp:
3594         (WebCore::GraphicsContext::drawImage):
3595         (WebCore::GraphicsContext::drawTiledImage):
3596         (WebCore::GraphicsContext::drawImageBuffer):
3597         * platform/graphics/GraphicsContext.h:
3598         (WebCore::ImagePaintingContext::ImagePaintingContext):
3599         * platform/graphics/ShadowBlur.cpp:
3600         (WebCore::ShadowBlur::endShadowLayer):
3601         * platform/graphics/cairo/ImageBufferCairo.cpp:
3602         (WebCore::ImageBuffer::draw):
3603         * platform/graphics/filters/FEComposite.cpp:
3604         (WebCore::FEComposite::platformApplySoftware):
3605         * rendering/FilterEffectRenderer.cpp:
3606         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
3607         * rendering/RenderBoxModelObject.cpp:
3608         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3609         * rendering/RenderEmbeddedObject.cpp:
3610         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
3611         * rendering/RenderImage.cpp:
3612         (WebCore::RenderImage::paintReplaced):
3613         (WebCore::RenderImage::paintIntoRect):
3614         * rendering/RenderSnapshottedPlugIn.cpp:
3615         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
3616
3617 2014-06-02  Kiran  <kiran.guduru@samsung.com>
3618
3619         Add mock DTMFSender support.
3620         https://bugs.webkit.org/show_bug.cgi?id=133298
3621
3622         Reviewed by Eric Carlson.
3623
3624         Implemented mock implementation for RTCPeerConnectionHandler. Now creating
3625         RTCDTMFSenderHandlerMock and returning while creating DTMFSender instead of
3626         returning null.
3627        
3628         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
3629
3630         * CMakeLists.txt:
3631         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Added.
3632         (WebCore::RTCDTMFSenderHandlerMock::RTCDTMFSenderHandlerMock):
3633         (WebCore::RTCDTMFSenderHandlerMock::setClient):
3634         (WebCore::RTCDTMFSenderHandlerMock::insertDTMF):
3635         * platform/mock/RTCDTMFSenderHandlerMock.h: Added.
3636         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
3637         (WebCore::RTCPeerConnectionHandlerMock::createDTMFSender):
3638
3639 2014-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3640
3641         [GTK] media controls should prevent 'click' events from reaching the page
3642         https://bugs.webkit.org/show_bug.cgi?id=133402
3643
3644         Reviewed by Eric Carlson.
3645
3646         When handling events, we events we need to return true in order
3647         that the superclass gets the value and prevents the execution of
3648         the default event handler in the page.
3649
3650         Test: media/media-controls-cancel-events.html
3651
3652         * Modules/mediacontrols/mediaControlsGtk.js:
3653         (ControllerGtk.prototype.handleMuteButtonMouseOver):
3654         (ControllerGtk.prototype.handleVolumeBoxMouseOut):
3655         (ControllerGtk.prototype.handleCaptionButtonClicked):
3656         (ControllerGtk.prototype.handleCaptionButtonMouseOver):
3657         (ControllerGtk.prototype.handleCaptionButtonShowMenu):
3658         (ControllerGtk.prototype.handleCaptionButtonMouseOut):
3659         (ControllerGtk.prototype.handleCaptionMouseOut): Return true to
3660         prevent forwarding the event execution.
3661
3662 2014-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
3663
3664         CSS JIT: add support for the "not" pseudo class
3665         https://bugs.webkit.org/show_bug.cgi?id=133314
3666
3667         Reviewed by Benjamin Poulain.
3668
3669         Add :not pseudo class support to CSS JIT. Current implementation
3670         doesn't support visitedMatchType. So when link pseudo class appears in
3671         :not sub fragment, fallback to the non-JIT implementation.
3672
3673         Tests: fast/selectors/not-active-hover-quirks.html
3674                fast/selectors/not-active-hover-strict.html
3675                fast/selectors/pseudo-class-not.html
3676
3677         * cssjit/SelectorCompiler.cpp:
3678         (WebCore::SelectorCompiler::addPseudoClassType):
3679         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3680         (WebCore::SelectorCompiler::constructFragments):
3681         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3682         (WebCore::SelectorCompiler::computeBacktrackingInformation):
3683         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3684         (WebCore::SelectorCompiler::fragmentOnlyMatchesLinksInQuirksMode):
3685         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3686         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
3687         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3688         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesNotPseudoClass):
3689         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation): Deleted.
3690
3691 2014-06-01  Jer Noble  <jer.noble@apple.com>
3692
3693         [MSE] Appends of overlapping sample data do not clear existing samples properly.
3694         https://bugs.webkit.org/show_bug.cgi?id=133435
3695
3696         Reviewed by Darin Adler.
3697
3698         Test: media/media-source/media-source-overlapping-append.html
3699
3700         The MSE spec has a spec error in how it removes overlapping frames. The intention seems to be
3701         to check for overlapping samples only when the incoming sample increases the highest presentation time
3702         field. But due to a mismatch in the range of a sample, defined as [start, end), and the check, which 
3703         treats the end as inclusive, the overlapping check is almost never run.
3704
3705         Add the sample comparison logic to match [start, end) ranges, and rename the existing check to differentiate
3706         it from the new one:
3707         * Modules/mediasource/SampleMap.cpp:
3708         (WebCore::SamplePresentationTimeIsInsideRangeComparator::operator()):
3709         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
3710         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
3711         (WebCore::SampleMap::findSamplesWithinPresentationRange):
3712         * Modules/mediasource/SampleMap.h:
3713
3714         Update the overlapping check to occur whenever the highest presentation time increases, and update the
3715         logic within that check to catch all overlapping frames.
3716         * Modules/mediasource/SourceBuffer.cpp:
3717         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
3718         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3719         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
3720         * Modules/mediasource/SourceBuffer.h:
3721         * WebCore.exp.in:
3722
3723         Add a dump method to MediaSample so that samples can be easily converted to a string for testing.
3724         * platform/MediaSample.h:
3725         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3726         (WebCore::MediaSampleAVFObjC::presentationSize):
3727         (WebCore::MediaSampleAVFObjC::dump):
3728
3729         Update the Mock MSE implementation to pass along a "generation" field, to aid in testing.
3730         * platform/mock/mediasource/MockBox.cpp:
3731         (WebCore::MockSampleBox::MockSampleBox):
3732         * platform/mock/mediasource/MockBox.h:
3733         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3734         (WebCore::MockMediaSample::dump):
3735
3736         Add a method to internals to dump the buffered samples to string.
3737         * Modules/mediasource/SourceBuffer.cpp:
3738         (WebCore::SourceBuffer::bufferedSamplesForTrackID):
3739         * Modules/mediasource/SourceBuffer.h:
3740         * testing/Internals.cpp:
3741         (WebCore::Internals::bufferedSamplesForTrackID):
3742         * testing/Internals.h:
3743         * testing/Internals.idl:
3744
3745 2014-06-01  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
3746
3747         getBBox() returns (0,0) when width or height is zero.
3748         https://bugs.webkit.org/show_bug.cgi?id=93290
3749
3750         Reviewed by Philip Rogers.
3751
3752         The SVG spec states that a width or height of zero for  rects, circles and
3753         ellipses is valid but disables rendering of that shape.
3754         In this case, getBBox() should return the actual bounding box of the element.
3755         Previously, WebKit always returned (0,0,0,0) rather than the
3756         correct bounding box. This patch fixes that. 
3757
3758         Rects and ellipses both now follow the same behaviour where
3759         the fall-back code path is only used when the shape will render (e.g. not
3760         when a dimension <= 0).
3761   
3762         This necessitates calling calculateRadiiAndCenter for ellipses even
3763         when the calculated values will be discarded in the fall back code path.
3764         But calculateRadiiAndCenter is cheap and this avoids making changes 
3765         elsewhere to stop CG drawing a zero width (or height) ellipse.  
3766
3767         Tests: svg/custom/getBBox-js-circle-zerodimension.html
3768                svg/custom/getBBox-js-ellipse-zerodimension.html
3769                svg/custom/getBBox-js-rect-zerodimension.html
3770
3771         * rendering/svg/RenderSVGEllipse.cpp:
3772         (WebCore::RenderSVGEllipse::updateShapeFromElement):
3773         Only follow fall-back code path when shape renders. 
3774         width||height==0 is not an error case so calculate bounding box.        
3775
3776         * rendering/svg/RenderSVGRect.cpp:
3777         (WebCore::RenderSVGRect::updateShapeFromElement):
3778         Only follow fall-back code path when shape renders. 
3779         rx||ry==0 is not an error case so calculate bounding box.        
3780
3781 2014-06-01  Simon Fraser  <simon.fraser@apple.com>
3782
3783         Don't scroll to non-integral scroll offsets
3784         https://bugs.webkit.org/show_bug.cgi?id=133436
3785         <rdar://problem/17088336>
3786
3787         Reviewed by Darin Adler.
3788
3789         With the gradual migration of scroll offsets to floating point, we ended
3790         up with a fully floating point code path been event scroll deltas and
3791         setting scroll positions in the scrolling tree.
3792         
3793         With some input devices (e.g. Logitech scrollwheel mice), the scroll deltas
3794         come in with non-integral values, and that caused the scroll offset to be non-integral,
3795         resulting in fuzzy layer contents. So round the scroll position.
3796
3797         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3798         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition):
3799
3800 2014-05-31  Anders Carlsson  <andersca@apple.com>
3801
3802         Add a LazyNeverDestroyed class template and use it
3803         https://bugs.webkit.org/show_bug.cgi?id=133425
3804
3805         Reviewed by Darin Adler.
3806
3807         * Modules/webdatabase/DatabaseBackendBase.cpp:
3808         (WebCore::guidMutex):
3809         * crypto/CryptoAlgorithmRegistry.cpp:
3810         (WebCore::registryMutex):
3811         * inspector/WorkerDebuggerAgent.cpp:
3812         * loader/CrossOriginAccessControl.cpp:
3813         (WebCore::isOnAccessControlResponseHeaderWhitelist):
3814         * platform/network/NetworkStateNotifier.cpp:
3815         (WebCore::networkStateNotifier):
3816         * workers/DefaultSharedWorkerRepository.cpp:
3817         (WebCore::DefaultSharedWorkerRepository::instance):
3818         * workers/DefaultSharedWorkerRepository.h:
3819         * workers/WorkerThread.cpp:
3820         (WebCore::threadSetMutex):
3821         * xml/XMLHttpRequest.cpp:
3822         (WebCore::staticData):
3823
3824 2014-06-01  Zalan Bujtas  <zalan@apple.com>
3825
3826         Subpixel rendering: Selection gap produces a pixel line overlap on inline boxes.
3827         https://bugs.webkit.org/show_bug.cgi?id=133429
3828
3829         Reviewed by Simon Fraser.
3830
3831         Do not floor logical right/left values when selection gap is calculated for RenderBlocks.
3832         It produces overlapping line/gap because the floored value is intersecting/too far from the
3833         non-floored content selection rect.
3834
3835         Tests: fast/inline/hidpi-selection-gap-and-inline-selection-have-gap-rtl.html
3836                fast/inline/hidpi-selection-gap-overlaps-inline-selection.html
3837
3838         * rendering/RenderBlock.cpp:
3839         (WebCore::RenderBlock::logicalLeftSelectionGap):
3840         (WebCore::RenderBlock::logicalRightSelectionGap):
3841
3842 2014-05-31  Timothy Horton  <timothy_horton@apple.com>
3843
3844         REGRESSION (r169412): Garbage pixels when vertical rubber-banding on http://yvoschaap.com/pmarca/
3845         https://bugs.webkit.org/show_bug.cgi?id=133418
3846         <rdar://problem/17065494>
3847
3848         Reviewed by Sam Weinig.
3849
3850         * WebCore.exp.in:
3851         * platform/graphics/FloatPoint.h:
3852         (WebCore::toFloatPoint):
3853         * platform/graphics/Image.cpp:
3854         (WebCore::Image::drawTiled):
3855         The manual tiling code previously adjusted the initial
3856         tiling source rect so that if the pattern was out of phase,
3857         the first row and column would paint only the necessary part
3858         of the tile. However, it did not also adjust the destination rect,
3859         so the tile was painted in entirely the wrong place.
3860         Additional testing (by enabling manual tiling mode for all patterned
3861         images and running all of the layout tests) exposed another bug
3862         where the last row and column would paint too much, which
3863         was resolved by clipping to the outer image's destination rect.
3864
3865 2014-05-31  Benjamin Poulain  <benjamin@webkit.org>
3866
3867         CSS JIT cleanup: move two utility functions out of the properties-matcher section
3868         https://bugs.webkit.org/show_bug.cgi?id=133427
3869
3870         Reviewed by Andreas Kling.
3871
3872         Just move the code, no other modification.
3873
3874         * cssjit/SelectorCompiler.cpp:
3875         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
3876         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoNextAdjacentElement):
3877
3878 2014-05-31  Darin Adler  <darin@apple.com>
3879
3880         Viewport percentage tests that resize the viewport are flaky
3881         https://bugs.webkit.org/show_bug.cgi?id=133351
3882
3883         Reviewed by Anders Carlsson.
3884
3885         * page/FrameView.cpp:
3886         (WebCore::FrameView::setFrameRect): Removed code that explicitly sends a resize event here.
3887         The resize event will be sent as a side effect of layout instead.
3888         (WebCore::FrameView::sendResizeEventIfNeeded): Don't send a resize event until layout is done,
3889         since this is what propagates the new geometry in so the JavaScript code can detect it. Also
3890         simplified the logic and streamlined a little, and added a FIXME about the bad idea here where
3891         the code enqueues an event for an unknown time in the future. Removed the unneeded code that
3892         passes in the DOM window as the target to dispatchWindowEvent, since that gets filled in as the
3893         target by default.
3894
3895 2014-05-31  Anders Carlsson  <andersca@apple.com>
3896
3897         Don't use std::mutex::try_lock to check if we own a mutex
3898         https://bugs.webkit.org/show_bug.cgi?id=133421
3899
3900         Reviewed by Dan Bernstein.
3901
3902         According the C++ standard, calling try_lock on a mutex that's already owned by the current thread
3903         is undefined behavior, so don't do that.
3904
3905         * Modules/webdatabase/DatabaseBackendBase.cpp:
3906         (WebCore::guidToVersionMap):
3907         (WebCore::updateGuidVersionMap):
3908         (WebCore::guidToDatabaseMap):
3909         (WebCore::guidForOriginAndName):
3910
3911 2014-05-30  Enrica Casucci  <enrica@apple.com>
3912
3913         REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
3914         https://bugs.webkit.org/show_bug.cgi?id=133413
3915         <rdar://problem/16948333>
3916
3917         Reviewed by Benjamin Poulain.
3918
3919         Adding utility functions and their exports.
3920
3921         * WebCore.exp.in:
3922         * editing/TextIterator.cpp:
3923         (WebCore::plainTextReplacingNoBreakSpace):
3924         * editing/TextIterator.h:
3925         * editing/VisibleUnits.cpp:
3926         (WebCore::charactersAroundPosition):
3927         (WebCore::characterBeforePosition): Deleted.
3928         * editing/VisibleUnits.h:
3929
3930 2014-05-30  Zalan Bujtas  <zalan@apple.com>
3931
3932         Cleanup temporary setting of image interpolation quality in GraphicsContext::drawImage*
3933         https://bugs.webkit.org/show_bug.cgi?id=133407
3934
3935         Reviewed by Darin Adler.
3936
3937         Add helper class to set/reset image interpolation quality value.
3938
3939         No change in functionality.
3940
3941         * platform/graphics/GraphicsContext.cpp:
3942         (WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
3943         (WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer):
3944         (WebCore::GraphicsContext::drawImage):
3945         (WebCore::GraphicsContext::drawTiledImage):
3946         (WebCore::GraphicsContext::drawImageBuffer):
3947
3948 2014-05-30  Myles C. Maxfield  <mmaxfield@apple.com>
3949
3950         Support -apple-system-font on OS X
3951         https://bugs.webkit.org/show_bug.cgi?id=133382
3952
3953         Addressing post-review comments.
3954
3955         * platform/mac/WebFontCache.mm:
3956         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
3957
3958 2014-05-30  Prashant Hiremath  <hiremathprashants@gmail.com>
3959
3960         Remove repetitive header in HTMLInputElement.cpp
3961         https://bugs.webkit.org/show_bug.cgi?id=133376
3962
3963         Reviewed by Anders Carlsson.
3964
3965         It is just removal repeative headers hence no test needed.
3966
3967         * html/HTMLInputElement.cpp:
3968
3969 2014-05-30  Zalan Bujtas  <zalan@apple.com>
3970
3971         Remove redundant GraphicsContext::drawImage() function.
3972         https://bugs.webkit.org/show_bug.cgi?id=133347
3973
3974         Reviewed by Simon Fraser.
3975
3976         There are 2 GraphicsContext::drawImage functions with very similar parameter list. This looks
3977         to be a source of confusion and results in passing unneeded parameters.
3978
3979         No change in functionality.
3980
3981         * html/canvas/CanvasRenderingContext2D.cpp:
3982         (WebCore::CanvasRenderingContext2D::drawImage):
3983         (WebCore::drawImageToContext):
3984         * platform/graphics/GraphicsContext.cpp:
3985         (WebCore::GraphicsContext::drawImage):
3986         * platform/graphics/GraphicsContext.h:
3987         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3988         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3989         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
3990         (WebCore::BitmapTextureImageBuffer::updateContents):
3991         * rendering/RenderBoxModelObject.cpp:
3992         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3993
3994 2014-05-29  Alex Christensen  <achristensen@webkit.org>
3995
3996         Prepare css jit for arm64 and other architectures.
3997         https://bugs.webkit.org/show_bug.cgi?id=133394
3998
3999         Reviewed by Benjamin Poulain.
4000
4001         * cssjit/FunctionCall.h:
4002         (WebCore::FunctionCall::swapArguments):
4003         * cssjit/RegisterAllocator.h:
4004         Use a designated temporary register on arm64 to prevent using a deallocated argument register to swap argument registers in.
4005         * cssjit/SelectorCompiler.cpp:
4006         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
4007         Added assertion to make sure there are enough registe