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