c38a95564ff31ffc0c6530c1fc8e82500ac6a589
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-08-06  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r172145.
4         https://bugs.webkit.org/show_bug.cgi?id=135657
5
6         caused 1 API test to fail (Requested by zalan on #webkit).
7
8         Reverted changeset:
9
10         "Cleanup InlineTextBox::paintSelection and
11         ::localSelectionRect."
12         https://bugs.webkit.org/show_bug.cgi?id=135631
13         http://trac.webkit.org/changeset/172145
14
15 2014-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
16
17         Text-shadow with (0, 0) offset and radius = 0 is ugly
18         https://bugs.webkit.org/show_bug.cgi?id=135357
19
20         Reviewed by Darin Adler.
21
22         Instead, check for this kind of shadow and don't draw it.
23
24         Test: fast/text/empty-shadow.html
25
26         * rendering/TextPainter.cpp:
27         (WebCore::isEmptyShadow): Does a shadow match these criteria?
28         (WebCore::paintTextWithShadows): If so, don't draw it.
29
30 2014-08-06  Andy Estes  <aestes@apple.com>
31
32         [iOS] QuickLook returns an invalid MIME type for some documents
33         https://bugs.webkit.org/show_bug.cgi?id=135651
34
35         Reviewed by David Kilzer.
36
37         r172151 ensured that we ignore QuickLook delegate messages after an error, but neglected to do so for
38         connectionDidFinishLoading:. Do not call ResourceLoader::didFinishLoading() if an error has occurred.
39
40         * platform/network/ios/QuickLook.mm:
41         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]):
42
43 2014-08-06  Andy Estes  <aestes@apple.com>
44
45         [iOS] QuickLook returns an invalid MIME type for some documents
46         https://bugs.webkit.org/show_bug.cgi?id=135651
47
48         Reviewed by David Kilzer.
49
50         In some cases QuickLook indicates a failure by returning a nil MIME type in -[QLPreviewConverter previewResponse]
51         rather than calling connection:didFailWithError:. Calling ResourceLoader::didReceiveResponse() with a response
52         containing a nil MIME type leads to a crash.
53
54         Stop loading the resource and display an error page if QuickLook cannot provide a MIME type for the converted response.
55
56         No new tests. QuickLook is not testable from WebKit.
57
58         * platform/network/ios/QuickLook.mm:
59         (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Called ResourceLoader::didFail() if
60         MIME type was nil. Called ResourceLoader::didReceiveResponse() otherwise.
61         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Called -_sendDidReceiveResponseIfNecessary.
62         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
63         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
64
65 2014-08-06  Radu Stavila  <stavila@adobe.com>
66
67         REGRESSION (r163382): Overflow hidden for inner elements breaks blurring
68         https://bugs.webkit.org/show_bug.cgi?id=135318
69
70         Reviewed by Zalan Bujtas.
71
72         For elements with border radius, clipping must be applied using clipRoundedRect.
73         This regressed in r163382, when normal clipping started being applied also
74         for elements having border radius.
75
76         Test: fast/filter-image/clipped-filter.html
77
78         * rendering/RenderLayer.cpp:
79         (WebCore::RenderLayer::clipToRect):
80         (WebCore::RenderLayer::restoreClip):
81
82 2014-08-06  Zalan Bujtas  <zalan@apple.com>
83
84         Cleanup InlineTextBox::paintSelection and ::localSelectionRect.
85         https://bugs.webkit.org/show_bug.cgi?id=135631
86
87         Reviewed by Darin Adler.
88
89         Covered by existing tests.
90
91         * rendering/InlineTextBox.cpp: Ideally these 2 functions should share some more code.
92         (WebCore::InlineTextBox::localSelectionRect): Local coordinates should not be snapped/enclosed.
93         This change could potentially break some selections. Should that be the case, they need to be addressed
94         separately.
95         (WebCore::InlineTextBox::paint):
96         (WebCore::InlineTextBox::paintSelection): Minor cleanup.
97         * rendering/InlineTextBox.h:
98
99 2014-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
100
101         [GTK] Be able to disable gtk2 dependency
102         https://bugs.webkit.org/show_bug.cgi?id=135505
103
104         Reviewed by Gustavo Noronha Silva.
105
106         Do not build WebCorePlatformGTK2 when ENABLE_PLUGIN_PROCESS_GTK2
107         is OFF.
108
109         * PlatformGTK.cmake:
110
111 2014-08-06  Mark Lam  <mark.lam@apple.com>
112
113         Gardening: fix bindings test breakage for for r170564 merged in r172129.
114         <https://webkit.org/b/134333>
115
116         Not reviewed.
117
118         No new tests.
119
120         * bindings/scripts/test/JS/JSTestEventTarget.h:
121         (WebCore::JSTestEventTarget::create):
122
123 2014-08-06  Ryuan Choi  <ryuan.choi@samsung.com>
124
125         Unreviewed typo correction.
126
127         * bindings/scripts/CodeGeneratorJS.pm: removed unnecessary space.
128         (GenerateImplementation):
129
130 2014-08-05  James Craig  <jcraig@apple.com>
131
132         Web Inspector: AXI: Add label string once AccessibilityObject::computedLabel() is available
133         https://bugs.webkit.org/show_bug.cgi?id=129940
134
135         Reviewed by Chris Fleizach.
136
137         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt
138
139         * accessibility/AccessibilityObject.cpp: Fixed crash.
140         (WebCore::AccessibilityObject::accessibilityComputedLabel): 
141         * accessibility/AccessibilityObject.h: Method name update.
142         * inspector/InspectorDOMAgent.cpp: New support for getting Node label from AccessibilityObject.
143         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
144
145 2014-07-29  Filip Pizlo  <fpizlo@apple.com>
146
147         Merge r170564, r170571, r170604, r170628, r170672, r170680, r170724, r170728, r170729, r170819, r170821, r170836, r170855, r170860, r170890, r170907, r170929, r171052, r171106, r171152, r171153, r171214 from ftlopt.
148
149     2014-07-01  Mark Lam  <mark.lam@apple.com>
150     
151             [ftlopt] DebuggerCallFrame::scope() should return a DebuggerScope.
152             <https://webkit.org/b/134420>
153     
154             Reviewed by Geoffrey Garen.
155     
156             No new tests.
157     
158             * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
159             - This is not in use.  Hence, we can remove it.
160             * bindings/js/ScriptController.cpp:
161             (WebCore::ScriptController::attachDebugger):
162             - We should acquire the JSLock before modifying a JS global object.
163     
164     2014-06-25  Filip Pizlo  <fpizlo@apple.com>
165     
166             [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
167             https://bugs.webkit.org/show_bug.cgi?id=134333
168     
169             Reviewed by Geoffrey Garen.
170     
171             No new tests because no change in behavior.
172     
173             * bindings/scripts/CodeGeneratorJS.pm:
174             (GenerateHeader):
175     
176 2014-08-05  Ryuan Choi  <ryuan.choi@samsung.com>
177
178         Build break since r172093
179         https://bugs.webkit.org/show_bug.cgi?id=135636
180
181         Reviewed by Gyuyoung Kim.
182
183         Since r172093, AbstractView.idl is added in CMake Build but CodeGeneratorJS.pm does not take care of it.
184
185         No new tests required, no new functionality.
186
187         * bindings/scripts/CodeGeneratorJS.pm:
188         (ShouldGenerateToJSDeclaration):
189         (ShouldGenerateToJSImplementation):
190         (GetImplClassName): Added to rename implClassName to DOMWindow if interface name is AbstractView.
191         (GenerateHeader):
192         (GenerateImplementation):
193
194 2014-08-05  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
195
196         [CG] strokeRect does not honor lineJoin
197         https://bugs.webkit.org/show_bug.cgi?id=132948
198
199         Reviewed by Darin Adler.
200
201         Replaced use of CGContextStrokeRectWithWidth convenience function with explicit 
202         call to CGContextAddRect and CGContextStrokePath.  The convenience functions
203         CGContextStrokeRect and CGContextStrokeRectWithWidth fail to apply some attributes
204         (e.g. stroke join) of the graphics state in certain cases.
205
206         Test: fast/canvas/canvas-strokeRect-lineJoin.html
207
208         * platform/graphics/cg/GraphicsContextCG.cpp:
209         (WebCore::GraphicsContext::strokeRect):
210
211 2014-08-05  Brent Fulgham  <bfulgham@apple.com>
212
213         [Win] Build attempts to use ANGLE when not building WebGL.
214         https://bugs.webkit.org/show_bug.cgi?id=135630
215         <rdar://problem/135630>
216
217         Unreviewed build fix.
218
219         * platform/graphics/win/GraphicsContext3DWin.cpp: Move #include of GraphicsContext3D.h
220         inside USE(3D_GRAPHICS) guard.
221
222 2014-08-05  Simon Fraser  <simon.fraser@apple.com>
223
224         [iOS WK2] Crash going back on a specific tumblr blog (under ScrollingStateTree::removeNodeAndAllDescendants)
225         https://bugs.webkit.org/show_bug.cgi?id=135629
226         <rdar://problem/17802174>
227
228         Reviewed by Tim Horton.
229         
230         In r170198 I added an "orphan scrolling nodes" code path that sets aside subtrees
231         of scrolling nodes into an m_orphanedSubframeNodes map, which keeps them alive until
232         they get reparented or destroyed. The nodes in that subtree remain in m_stateNodeMap,
233         which holds raw pointers to them.
234         
235         However, ScrollingStateTree::commit() can clear m_orphanedSubframeNodes, which is
236         sometimes non-empty at this point. When that happened, we would destroy nodes which
237         were still referenced by m_stateNodeMap, with the result that a later query for the
238         same nodeID would hand back a pointer to a deleted object.
239         
240         Fix by calling recursiveNodeWillBeRemoved() on nodes in the m_orphanedSubframeNodes
241         before clearing it, which removes them and all their descendants from the state node map.
242
243         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/orphaned-subtree.html
244
245         * page/scrolling/ScrollingStateTree.cpp:
246         (WebCore::ScrollingStateTree::clear):
247         (WebCore::ScrollingStateTree::commit):
248
249 2014-08-05  Peyton Randolph  <prandolph@apple.com>
250
251         Add the ability to force text to render in white, not just black
252         https://bugs.webkit.org/show_bug.cgi?id=135625
253
254         Reviewed by Beth Dakin.
255
256         This patch introduces PaintBehaviorForceWhiteText, a complement to PaintBehaviorForceBlackText. If
257         a client specifies both PaintBehaviorForceWhiteText and PaintBehaviorForceBlackText, the text will be
258         painted black.
259
260         No new tests.
261
262         * rendering/EllipsisBox.cpp:
263         (WebCore::EllipsisBox::paint): Use the forced text color to paint the text if requested.
264         * rendering/InlineTextBox.cpp:
265         (WebCore::InlineTextBox::paint): Disable the text shadow if a text color has been forced.
266         * rendering/PaintInfo.h:
267         (WebCore::PaintInfo::forceTextColor): 
268         Return true iff the client has requested to force a black or white text color.
269         (WebCore::PaintInfo::forceWhiteText):
270         Return true iff forcing white text has been requested.
271         (WebCore::PaintInfo::forcedTextColor): 
272         Return the forced text color. Currently only white and black are supported.
273         * rendering/PaintPhase.h:
274         * rendering/RenderLayer.cpp:
275         (WebCore::RenderLayer::paintLayerContents): Remove the forceBlackText-related code as it is redundant.
276         (WebCore::RenderLayer::paintForegroundForFragments): 
277         Remove forceBlackText parameter and infer the correct behavior from the given paint behavior.
278         * rendering/RenderLayer.h:
279         * rendering/TextPaintStyle.cpp:
280         (WebCore::computeTextPaintStyle): Use the forced text color if available.
281         (WebCore::computeTextSelectionPaintStyle): Use the forced text color if available.
282
283 2014-08-05  Alex Christensen  <achristensen@webkit.org>
284
285         More work on CMake.
286         https://bugs.webkit.org/show_bug.cgi?id=135620
287
288         Reviewed by Reviewed by Laszlo Gombos.
289
290         * CMakeLists.txt:
291         Added missing idls.
292         * PlatformMac.cmake:
293         Added additional include directories and source files.
294         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
295         * css/makeSelectorPseudoElementsMap.py:
296         The Windows distribution of gperf doesn't like single quotes for its key-positions parameters.
297         * page/Chrome.h:
298         Compile fix.
299
300 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
301
302         Web Inspector: ReplayManager shouldn't assume replay status when the inspector is opened
303         https://bugs.webkit.org/show_bug.cgi?id=135212
304
305         Reviewed by Timothy Hatcher.
306
307         The frontend should be able to introspect the session and segment state machines,
308         currently loaded segment and session identifiers, and replay position.
309
310         * inspector/InspectorReplayAgent.cpp:
311         (WebCore::buildInspectorObjectForSessionState): Added.
312         (WebCore::buildInspectorObjectForSegmentState): Added.
313         (WebCore::InspectorReplayAgent::currentReplayState): Added.
314         * inspector/InspectorReplayAgent.h:
315         * inspector/protocol/Replay.json: Add currentReplayState query command.
316         * replay/ReplayController.h: Add some accessors.
317
318 2014-08-05  Dean Jackson  <dino@apple.com>
319
320         [iOS] Media controls layout incorrectly in RTL content
321         https://bugs.webkit.org/show_bug.cgi?id=135621
322         <rdar://problem/17849206>
323
324         Reviewed by Eric Carlson.
325
326         Media controls should always layout in LTR mode, even when the
327         page content is RTL. There already was a rule to do this on
328         non-iOS systems, but it wasn't getting included for iOS.
329         In this case I put the rule on the composited parent of the
330         controls in order to maintain the padding of the control panel.
331         This should still leave the captions unaffected.
332
333         * Modules/mediacontrols/mediaControlsiOS.css:
334         (video::-webkit-media-controls-panel-composited-parent): Add direction: ltr.
335
336 2014-08-05  Brian J. Burg  <burg@cs.washington.edu>
337
338         Web Replay: rename protocol methods for getting replay session/segment data
339         https://bugs.webkit.org/show_bug.cgi?id=135618
340
341         Reviewed by Timothy Hatcher.
342
343         * inspector/InspectorReplayAgent.cpp:
344         (WebCore::InspectorReplayAgent::getSessionData):
345         (WebCore::InspectorReplayAgent::getSegmentData):
346         (WebCore::InspectorReplayAgent::getSerializedSession): Deleted.
347         (WebCore::InspectorReplayAgent::getSerializedSegment): Deleted.
348         * inspector/InspectorReplayAgent.h:
349         * inspector/protocol/Replay.json:
350
351 2014-08-05  Antti Koivisto  <antti@apple.com>
352
353         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
354         https://bugs.webkit.org/show_bug.cgi?id=135603
355         <rdar://problem/17876385>
356         
357         This hit ASSERT(frame().isMainFrame()) in FrameView::updateLayerFlushThrottling
358         running scrollbars/scrollbar-iframe-click-does-not-blur-content.html and a few other tests.
359
360         * page/FrameView.cpp:
361         (WebCore::FrameView::setWasScrolledByUser): Only invoke updateLayerFlushThrottling for the main frame.
362
363 2014-08-05  Peyton Randolph  <prandolph@apple.com>
364
365         Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
366         https://bugs.webkit.org/show_bug.cgi?id=135276
367
368         Reviewed by Beth Dakin.
369
370         No new tests. Just a compiler flag.
371
372         * Configurations/FeatureDefines.xcconfig:
373
374 2014-08-05  Dean Jackson  <dino@apple.com>
375
376         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
377         https://bugs.webkit.org/show_bug.cgi?id=135488
378         <rdar://problem/17879156>
379
380         Reviewed by Antoine Quint.
381
382         Antoine found me on iMessage to tell me I'm an idiot and that I've
383         forgotten how to write JavaScript. Embarrassingly, this code is what
384         I originally had, but then second-guessed myself.
385
386         * Modules/mediacontrols/mediaControlsiOS.js:
387         (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need for the local
388         variable or conditional statement, since null and "" both evaluate as false.
389
390 2014-08-05  Antti Koivisto  <antti@apple.com>
391
392         REGRESSION: Extremely flashy scrolling while a page is still loading (because of flush throttling)
393         https://bugs.webkit.org/show_bug.cgi?id=135603
394         <rdar://problem/17876385>
395
396         Reviewed by Andreas Kling.
397
398         * page/FrameView.cpp:
399         (WebCore::determineLayerFlushThrottleState):
400         
401             Disable throttling after user has scrolled the page.
402             This is consistent with the speculative tiling. It also gets enabled on first scroll.
403
404         (WebCore::FrameView::setWasScrolledByUser):
405
406 2014-08-05  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
407
408         ASSERTION FAILED: name[0] == '@' && length >= 2 in WebCore::CSSParser::detectAtToken
409         https://bugs.webkit.org/show_bug.cgi?id=134632
410
411         At-rules must consist of at least two characters: the '@' symbol followed by
412         an identifier name. The failure of this condition makes the assertion fail.
413
414         The length of an at-rule is currently calculated by pointer arithmetic on
415         the 'result' pointer, which is expected to be set to the end of the at-rule
416         identifier by the WebCore::*CSSTokenizer::parseIdentifier method.
417         If the at-rule token is a sequence of 8-bit-only characters then
418         'result' will point correctly at the end of the identifier. However, if
419         the at-rule contains a 16-bit Unicode escape then 'result' will not be
420         updated correctly anymore, hence it cannot be used for length calculation.
421         The patch makes the parseIdentifier bump the result pointer even in the 16-bit slow case.
422
423         Patch by Renata Hodovan, backported from Chromium: https://codereview.chromium.org/241053002
424
425         Reviewed by Darin Adler.
426
427         Test: fast/css/atrule-with-escape-character-crash.html
428
429         * css/CSSParser.cpp:
430         (WebCore::CSSParser::realLex):
431
432 2014-08-04  Andy Estes  <aestes@apple.com>
433
434         [iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
435         https://bugs.webkit.org/show_bug.cgi?id=135596
436
437         Reviewed by David Kilzer.
438
439         Some iWork documents contain pre-rendered PDF previews. When WebKit asks QuickLook to convert such a document,
440         QuickLook will return this PDF as the converted response. However, until WebKit has sent the document's data to
441         QuickLook, -[QLPreviewConverter previewResponse] will misleadingly tell WebKit that the converted resource will
442         be of type 'text/html'. This leads WebKit to render the PDF preview as HTML.
443
444         Instead of querying QLPreviewConverter for the previewResponse before we've sent it any data, postpone calling
445         ResourceLoader::didReceiveResponse until we've begun to receive data via the QLPreviewConverter delegate. At
446         that point -[QLPreviewConverter previewResponse] will have the correct MIME type and we can call didReceiveResponse.
447
448         No new tests. QuickLook is not testable from WebKit.
449
450         * platform/network/ios/QuickLook.mm:
451         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): If didReceiveResponse has yet to be
452         called, call it now with QuickLookHandle::nsResponse().
453         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto.
454         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto.
455         (-[WebResourceLoaderQuickLookDelegate connectionDidFinishLoading:]): Assert that didReceiveResponse has been called.
456         (-[WebResourceLoaderQuickLookDelegate clearHandle]): Cleared the raw pointer to QuickLookHandle.
457         (WebCore::QuickLookHandle::create): Pointed WebResourceLoaderQuickLookDelegate's quickLookHandle property to
458         the newly created QuickLookHandle.
459
460 2014-08-05  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
461
462         Fixing calc() parameter parsing in cubic-bezier functions
463         https://bugs.webkit.org/show_bug.cgi?id=135605
464
465         Reviewed by Andreas Kling.
466
467         Before this patch, calc values in cubic-bezier functions weren't being read correctly
468         since they were handled as simple floats.
469
470         This is a backport of my fix in Blink: https://codereview.chromium.org/369313002/
471
472         Test: css3/calc/cubic-bezier-with-multiple-calcs-crash.html.html
473
474         * css/CSSParser.cpp:
475         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
476
477 2014-08-05  Jer Noble  <jer.noble@apple.com>
478
479         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
480         https://bugs.webkit.org/show_bug.cgi?id=135422
481
482         Reviewed by Eric Carlson.
483
484         Three related fixes:
485
486         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush
487         samples, so that the next time samples are re-enqueued, the starting point for re-enqueueing
488         is correct.
489
490         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue
491         if they are before the current media time.
492
493         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
494         the SourceBufferPrivate may signal that it's ready for new samples through the
495         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
496         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
497         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
498         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
499         up to the new current time.
500
501         If a re-enqueue is pending, don't provide media data in response to being notified that the
502         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
503         are appended.
504
505         Also, don't provide media data if we are waiting for a seek to complete.
506
507         * Modules/mediasource/MediaSource.h:
508         (WebCore::MediaSource::isSeeking): Convenience method.
509         * Modules/mediasource/SourceBuffer.cpp:
510         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
511         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
512         (WebCore::SourceBuffer::reenqueueMediaForTime):
513
514 2014-08-05  Chris Fleizach  <cfleizach@apple.com>
515
516         AX: Select text activity should return replaced text instead of previously selected text
517         https://bugs.webkit.org/show_bug.cgi?id=135595
518
519         Reviewed by Mario Sanchez Prada.
520
521         When the select activity API is used to replace text, the replacement string should be returned instead of the old selected text.
522
523         Updated existing test: platform/mac/accessibility/select-text.html
524
525         * accessibility/AccessibilityObject.cpp:
526         (WebCore::AccessibilityObject::selectText):
527
528 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
529
530         AX: Select activity behavior does not work when an existing range is already selected
531         https://bugs.webkit.org/show_bug.cgi?id=135579
532
533         Reviewed by Mario Sanchez Prada.
534
535         If you have an existing range selected, and try to apply a select and replace operation, like capitalize,
536         searching for that range will fail because it skips the currently selected range.
537
538         For these cases, it seems the best way is to start the search from the start position, rather than relying on the
539         entire range.
540
541         Updated existing test: platform/mac/accessibility/select-text.html
542
543         * accessibility/AccessibilityObject.cpp:
544         (WebCore::AccessibilityObject::selectText):
545
546 2014-08-04  Jer Noble  <jer.noble@apple.com>
547
548         [MSE][Mac] Seeking past buffered range will not resume playback when seek completes.
549         https://bugs.webkit.org/show_bug.cgi?id=135591
550
551         Reviewed by Eric Carlson.
552
553         If a seek is delayed due to seeking into an unbuffered area, playback will not be restarted
554         at that point. Instead, playback must resume when enough media data has been added, and
555         the MediaSource indicates the seek should complete.
556
557         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
558         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted):
559
560 2014-08-04  Jer Noble  <jer.noble@apple.com>
561
562         [MSE] Videos will report a stall when within 1 frame-duration before the end of a movie.
563         https://bugs.webkit.org/show_bug.cgi?id=135586
564
565         Reviewed by Eric Carlson.
566
567         Under certain circumstances, videos which are within 1/24 seconds before the end of a media stream when
568         monitorSourceBuffers() is called will fail the hasFutureTime() check. This is because hasFutureTime()
569         checks whether enough media is buffered to play back at least some time in the future, but when the
570         current time is close to the duration, not enough data is buffered to satisfy that check.
571
572         Add some logic which will break out early when the SourceBuffer has buffered up to and including the
573         media's duration, and return that the buffer indeed hasFutureTime() available.
574
575         * Modules/mediasource/SourceBuffer.cpp:
576         (WebCore::SourceBuffer::hasFutureTime):
577
578 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
579
580         Simplify the StyleInvalidation mode of rule collection
581         https://bugs.webkit.org/show_bug.cgi?id=135521
582
583         Reviewed by Antti Koivisto.
584
585         There are two branches where StyleInvalidation code is removed:
586         -Pseudo elements for shadow dom elements.
587         -Pseudo elements without dom tree counterpart.
588
589         The first can never be hit because StyleInvalidationAnalysis does a complete invalidation
590         when there is any shadow dom styling involved in the stylesheets.
591
592         Even if that branch was hit, not failing on custom pseudo elements would be equivalent
593         to ignoring those pseudo elements from the Selector. By doing so, we would match elements
594         that do not have shadow dom and invalidate pretty much everything.
595
596         Unlike pseudo elements without real elements, shadow dom elements are not matched separately with a different
597         context, thus we could generalize StyleInvalidationAnalysis to handle this case.
598
599
600         The second case handle pseudo elements that do not have a real element. That case no longer need to be handled
601         separately at the filter time, it has become a special case of SelectorChecker::match() after everything else
602         has matched.
603
604         The only condition for this to work is that the Context's pseudoId must be NOPSEUDO. This is the case
605         in practice since matching specific pseudo types would be a waste of time. ElementRuleCollector::collectMatchingRules()
606         has a new assertion to enforce that.
607
608         Test: fast/css/stylesheet-change-updates-pseudo-elements.html
609
610         * css/ElementRuleCollector.cpp:
611         (WebCore::ElementRuleCollector::collectMatchingRules):
612         * css/SelectorChecker.cpp:
613         (WebCore::SelectorChecker::matchRecursively):
614         * cssjit/SelectorCompiler.cpp:
615         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
616
617 2014-08-04  Benjamin Poulain  <benjamin@webkit.org>
618
619         Add a flag for the CSS Selectors level 4 implementation
620         https://bugs.webkit.org/show_bug.cgi?id=135535
621
622         Reviewed by Andreas Kling.
623
624         * Configurations/FeatureDefines.xcconfig:
625
626 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
627
628         AX: add AccessibilityObject::computedLabelString() for WebAXI
629         https://bugs.webkit.org/show_bug.cgi?id=129939
630
631         Reviewed by Mario Sanchez Prada.
632
633         Provide a method that the WebKit Inspector can call in order to 
634         display an accessible name for an AX node.
635
636         * accessibility/AccessibilityObject.cpp:
637         (WebCore::AccessibilityObject::accessibilityComputedLabel):
638         * accessibility/AccessibilityObject.h:
639
640 2014-08-04  Tim Horton  <timothy_horton@apple.com>
641
642         Lots of crashes in WebKit1 after r172013.
643         https://bugs.webkit.org/show_bug.cgi?id=135582
644         <rdar://problem/17837636>
645
646         Reviewed by Enrica Casucci.
647
648         * editing/SelectionRectGatherer.cpp:
649         (WebCore::SelectionRectGatherer::addRect):
650         (WebCore::SelectionRectGatherer::addGapRects):
651         Don't try to do local-to-absolute coordinate conversion if we don't have
652         a repaint container, which happens a lot in WebKit1.
653
654 2014-08-04  Alex Christensen  <achristensen@webkit.org>
655
656         Progress towards CMake on Mac.
657         https://bugs.webkit.org/show_bug.cgi?id=135528
658
659         Reviewed by Gyuyoung Kim.
660
661         * PlatformMac.cmake: Added.
662
663 2014-08-04  Tim Horton  <timothy_horton@apple.com>
664
665         Selection services menu dropdown is in the wrong place when selecting some text on Yelp
666         https://bugs.webkit.org/show_bug.cgi?id=135582
667         <rdar://problem/17837636>
668
669         Reviewed by Simon Fraser.
670
671         * editing/SelectionRectGatherer.cpp:
672         (WebCore::SelectionRectGatherer::addRect):
673         (WebCore::SelectionRectGatherer::addGapRects):
674         (WebCore::SelectionRectGatherer::addRects): Deleted.
675         Rename addRects to addGapRects for clarity.
676         Map rects and gapRects to absolute RenderView coordinates so that
677         they are in a form WebKit2 can use. Previously they were sometimes
678         relative to a different repaint container, but that information was
679         lost when moving through SelectionRectGatherer.
680
681         Ideally we would keep selection rects as full quads instead of rects
682         for more of their life, but that problem is much deeper than just SelectionRectGatherer.
683
684         * editing/SelectionRectGatherer.h:
685         Add a comment clarifying the coordinate space of the stored selection rects.
686
687         * rendering/RenderView.cpp:
688         (WebCore::RenderView::applySubtreeSelection):
689         Rename addRects to addGapRects for clarity.
690
691 2014-08-04  Bem Jones-Bey  <bjonesbe@adobe.com>
692
693         [CSS Shapes] shape-margin not respected when it extends beyond an explicitly set margin
694         https://bugs.webkit.org/show_bug.cgi?id=135308
695
696         Reviewed by Dean Jackson.
697
698         When a zero height line is supplied and the image shape extends into
699         the margin box (only possible when a shape-margin is supplied), then
700         only an empty interval was being returned. This patch makes it
701         properly return the interval for the line in question.
702
703         Test: fast/shapes/shape-outside-floats/shape-outside-image-shape-margin.html
704
705         * rendering/shapes/RasterShape.cpp:
706         (WebCore::RasterShape::getExcludedIntervals): Handle the zero height
707         line case.
708
709 2014-08-04  Zalan Bujtas  <zalan@apple.com>
710
711         Subpixel rendering: InlineTextBox mistakenly rounds offset value before painting.
712         https://bugs.webkit.org/show_bug.cgi?id=135470
713
714         Reviewed by Simon Fraser.
715
716         This patch removes the premature paint offset adjustment for inlines. Premature snapping
717         could alter the final painting coordinates and push content to wrong positions.
718
719         This patch also enforces WebCore's pixel snapping strategy (round) on text painting.
720         It ensures that text positioning is in sync with other painting related operations including
721         clipping, box decorations etc. Underlying graphics libraries can take different directions on
722         text snapping, for example CG ceils text coordinates vertically (in horizontal context,
723         with the current settings). It can lead to undesired side effects.
724
725         Test: fast/inline/hidpi-inline-selection-leaves-gap.html
726
727         * rendering/InlineTextBox.cpp:
728         (WebCore::InlineTextBox::paint):
729         * rendering/RenderLayer.cpp:
730         (WebCore::RenderLayer::calculateClipRects): wrong direction used at r171896.
731         * rendering/SimpleLineLayoutFunctions.cpp: we don't paint vertical content here.
732         (WebCore::SimpleLineLayout::paintFlow):
733
734 2014-08-04  Jer Noble  <jer.noble@apple.com>
735
736         Unreviewed, rolling out r171992, r171995, & r172000.
737
738         The cumulative effect of those revisions was to cause decoding errors when switching resolutions on YouTube.
739
740         Reverted changesets:
741
742         https://bugs.webkit.org/show_bug.cgi?id=135422 / http://trac.webkit.org/changeset/171992
743         https://bugs.webkit.org/show_bug.cgi?id=135424 / http://trac.webkit.org/changeset/171995
744         https://bugs.webkit.org/show_bug.cgi?id=135572 / http://trac.webkit.org/changeset/172000
745
746 2014-08-04  Joseph Pecoraro  <pecoraro@apple.com>
747
748         Always clear ConsoleClient when Page/WindowShell is destroyed
749         https://bugs.webkit.org/show_bug.cgi?id=135569
750
751         Reviewed by Mark Lam.
752
753         * bindings/js/ScriptController.cpp:
754         (WebCore::ScriptController::~ScriptController):
755         Whenever a window shell goes away, clear the console client.
756         We did this in clearWindowShell but not before destroying.
757
758 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
759
760         AX: isWordEndMatch should allow for multiple word selections
761         https://bugs.webkit.org/show_bug.cgi?id=135573
762
763         Reviewed by Mario Sanchez Prada.
764
765         isWordEndMatch was searching from the beginning of the selected range, which meant
766         that if the result was multiple words, we'd reject the result. 
767         Instead, we should search from the end of the range, so that we encompass all words.
768
769         Modified existing test: platform/mac/accessibility/select-text-should-match-whole-words.html
770
771         * editing/TextIterator.cpp:
772         (WebCore::SearchBuffer::isWordEndMatch):
773
774 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
775
776         AX: Secure text fields need to support Search parameterized attributes
777         https://bugs.webkit.org/show_bug.cgi?id=135568
778
779         Reviewed by Mario Sanchez Prada.
780  
781         Secure text fields still need to support the fast searching that WebKit exposes, even though they don't support
782         other parameterized attributes.
783   
784         Test: platform/mac/accessibility/secure-text-field-supports-fast-search.html
785
786         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
787         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
788
789 2014-08-04  Jer Noble  <jer.noble@apple.com>
790
791         [MSE] Further fixes for "fast forward" playback after seeking in YouTube behavior.
792         https://bugs.webkit.org/show_bug.cgi?id=135572
793
794         Reviewed by Eric Carlson.
795
796         Two related fixes:
797
798         In reenqueueMediaForTime(), update TrackBuffer.lastEnqueuedPresentationTime when we flush samples, so that
799         the next time samples are re-enqueued, the starting point for re-enqueueing is correct.
800
801         In sourceBufferPrivateDidReceiveSample(), do not add samples to the decode queue if they are before the
802         current media time.
803
804         * Modules/mediasource/SourceBuffer.cpp:
805         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
806         (WebCore::SourceBuffer::reenqueueMediaForTime):
807
808 2014-08-04  Matt Baker  <mattbaker@apple.com>
809
810         Web Inspector: All-caps CSS properties are not shown in Computed pane
811         https://bugs.webkit.org/show_bug.cgi?id=133700
812
813         Reviewed by Timothy Hatcher.
814
815         * inspector/InspectorStyleSheet.cpp:
816         (WebCore::InspectorStyle::styleWithProperties):
817
818 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
819
820         AX: SelectText functionality always selects text after current selection even if closer selection is behind it
821         https://bugs.webkit.org/show_bug.cgi?id=135546
822
823         Reviewed by Mario Sanchez Prada.
824
825         Logic was incorrect for comparing ranges found before the current selection.
826         ASSERT was incorrect for allowed ranges. We need to allow ranges that are right at the boundaries of our found ranges.
827
828         Extended existing test: platform/mac/accessibility/select-text.html
829
830         * accessibility/AccessibilityObject.cpp:
831         (WebCore::rangeClosestToRange):
832
833 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
834
835         AX: AXSelectTextWithCriteriaParameterizedAttribute incorrectly selects the beginning letters of a word
836         https://bugs.webkit.org/show_bug.cgi?id=135547
837
838         Reviewed by Mario Sanchez Prada.
839
840         Allow text search to specify that it wants to match end of words as well as start of words.
841         This allows select text criteria to match on whole words only.
842
843         Test: platform/mac/accessibility/select-text-should-match-whole-words.html
844
845         * accessibility/AccessibilityObject.cpp:
846         (WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
847         * editing/FindOptions.h:
848         * editing/TextIterator.cpp:
849         (WebCore::SearchBuffer::isWordEndMatch):
850         (WebCore::SearchBuffer::search):
851
852 2014-08-04  Jer Noble  <jer.noble@apple.com>
853
854         [MSE] Re-enqueing due to overlapping appended samples can cause stuttering playback
855         https://bugs.webkit.org/show_bug.cgi?id=135424
856
857         Reviewed by Eric Carlson.
858
859         If it become necessary to re-enqueue samples (due to appending overlapping samples which cause
860         existing samples to be removed), the previous behavior was to flush and re-enqueue the new
861         samples dependencies; i.e., everything up to and including the previous sync sample. This causes
862         the decoder to visibly stall while it decodes those non-displaying samples, which could be
863         a second or more worth of encoded video samples, depending on the frequency of sync samples.
864
865         Instead, when we are asked to re-enqueue, we will look for the next occurring sync sample.
866         If found, we can switch over to the replacement samples at that point in the decode queue.
867         This limits the overhead of a stream switch, and should allow for a visually seamless switch,
868         at the cost of having to wait for the next sync sample to occur to affect the switch.
869
870         * Modules/mediasource/SourceBuffer.cpp:
871         (WebCore::SourceBuffer::seekToTime): Clear the decode queue when seeking.
872         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Call reenqueueMediaForCurrentTime.
873         (WebCore::SourceBuffer::reenqueueMediaForCurrentTime): Switch over to the new stream only
874             at the next sync sample.
875
876 2014-08-04  Chris Fleizach  <cfleizach@apple.com>
877
878         AX: The Dictation command "Replace <phrase> with <phrase>" always capitalizes the replacement string
879         https://bugs.webkit.org/show_bug.cgi?id=135557
880
881         Reviewed by Mario Sanchez Prada.
882
883         When replacing text, we should match the capitalization of the word being replaced 
884         (unless the replacement looks like an abbreviation).   
885  
886         Test: platform/mac/accessibility/find-and-replace-match-capitalization.html
887
888         * accessibility/AccessibilityObject.cpp:
889         (WebCore::AccessibilityObject::selectText):
890
891 2014-08-04  Pratik Solanki  <psolanki@apple.com>
892
893         QuickLook resources are cache-replaced with their original binary data causing ASSERT(m_data->size() == newBuffer->size()) in CachedResource.cpp
894         https://bugs.webkit.org/show_bug.cgi?id=135548
895         <rdar://problem/17891321>
896
897         Reviewed by David Kilzer.
898
899         When loading QuickLook resources, the SharedBuffer in the CachedResource is actually a
900         converted representation of the real QuickLook resource. Replacing this with the actual
901         network resource (which is what tryReplaceEncodedData() tried to do) is wrong and triggered
902         asserts in the code.
903
904         Fix this by having CachedRawResource::mayTryReplaceEncodedData() return false if we are
905         loading a QuickLook resource.
906
907         No new tests because we don't have a way to test QuickLook documents.
908
909         * loader/ResourceLoader.cpp:
910         (WebCore::ResourceLoader::ResourceLoader):
911         (WebCore::ResourceLoader::didCreateQuickLookHandle):
912             Set a flag to indicate that we are loading a QuickLook document.
913         * loader/ResourceLoader.h:
914         (WebCore::ResourceLoader::isQuickLookResource):
915         * loader/cache/CachedRawResource.cpp:
916         (WebCore::CachedRawResource::CachedRawResource):
917         (WebCore::CachedRawResource::finishLoading):
918             Check if we were loading a QuickLook document and if so disable encoded data
919             replacement.
920         * loader/cache/CachedRawResource.h:
921             Add a new bool field returned by mayTryReplaceEncodedData(). Default is true but it is
922             set to false in finishLoading() if we were loading QuickLook document.
923
924 2014-08-04  Jer Noble  <jer.noble@apple.com>
925
926         [MSE] Seeking occasionally causes many frames to be displayed in "fast forward" mode
927         https://bugs.webkit.org/show_bug.cgi?id=135422
928
929         Reviewed by Eric Carlson.
930
931         When a seek is pending, but samples for the new time is not yet present in the SourceBuffer,
932         the SourceBufferPrivate may signal that it's ready for new samples through the
933         sourceBufferPrivateDidBecomeReadyForMoreSamples() method. In this situation, we should not
934         continue to provideMediaData(), as that will append samples from the prior-to-seeking media
935         timeline. Since the timeline may have moved forward due to the seek, a decoder may decide to
936         display those frames as quickly as possible (the "fast forward" behavior) in order to catch
937         up to the new current time.
938
939         If a re-enqueue is pending, don't provide media data in response to being notified that the
940         SourceBufferPrivate is ready for more samples. Wait until samples for the new current time
941         are appended.
942
943         * Modules/mediasource/SourceBuffer.cpp:
944         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
945         * dom/Document.cpp:
946         (WebCore::Document::unregisterCollection):
947
948 2014-08-04  Carlos Garcia Campos  <cgarcia@igalia.com>
949
950         [GTK] Install all unstable webkitdom headers
951         https://bugs.webkit.org/show_bug.cgi?id=135544
952
953         Reviewed by Gustavo Noronha Silva.
954
955         We were checking whether generated file existed before they had
956         been generated.
957
958         * PlatformGTK.cmake: Add Unstable.h header for all stable classes
959         to GObjectDOMBindingsUnstable_INSTALLED_HEADERS and split the
960         install command for stable and unstable headers making unstable
961         headers optional.
962
963 2014-08-04  peavo@outlook.com  <peavo@outlook.com>
964
965         [WinCairo] Compile error in OpenTypeMathData.cpp.
966         https://bugs.webkit.org/show_bug.cgi?id=135541
967
968         Reviewed by Brent Fulgham.
969
970         The SharedBuffer class needs to be defined.
971         Also, the OpenTypeMathData constructor should be implemented when OPENTYPE_MATH is not enabled.
972
973         * platform/graphics/opentype/OpenTypeMathData.cpp:
974
975 2014-08-03  Dan Bernstein  <mitz@apple.com>
976
977         <rdar://problem/17782529> REGRESSION: OS marketing version in iOS Simulator user-agent string is the host OS’s
978         https://bugs.webkit.org/show_bug.cgi?id=135549
979
980         Reviewed by Mark Rowe.
981
982         * platform/cocoa/SystemVersion.mm:
983         (WebCore::createSystemMarketingVersion): On the iOS Simulator, locate the system Library
984         directory relative to the Simulator root.
985
986 2014-08-02  Jeremy Jones  <jeremyj@apple.com>
987
988         Support both window and view based video fullscreen.
989         https://bugs.webkit.org/show_bug.cgi?id=135525
990
991         Reviewed by Simon Fraser.
992
993         Presenting in a separate window gives greater flexibility for rotation separately from the app.
994         Presenting in the same window works better if the interface is rehosted in another process.
995
996         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
997         (-[WebVideoFullscreenController enterFullscreen:]): Use clientRect instead of screenRect.
998         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add m_window and m_parentView.
999         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
1000         (-[WebAVVideoLayer setBounds:]): Parent view might not be fullscreen; use window instead.
1001         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Conditionally create UIWindow and UIViewController for fullscreen.
1002         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Video, not the container should have black background.
1003         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Conditionally translate finalRect.
1004         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): Clean up UIWindow and force status bar to correct orientation.
1005         (WebVideoFullscreenInterfaceAVKit::invalidate): Clean up UIWindow.
1006         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Hide window and exit without animation.
1007         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1008         (WebVideoFullscreenModelMediaElement::setVideoFullscreenLayer): Apply frame, because it may have been set before the layer.
1009
1010 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
1011
1012         Update the SearchFieldResultsButtonElement shadow Pseudo Id when HTMLInputElement's maxResults change
1013         https://bugs.webkit.org/show_bug.cgi?id=135491
1014
1015         Reviewed by Ryosuke Niwa.
1016
1017         Replace the shadowPseudoId() override + manual style invalidation by the generic pseudo ID update.
1018
1019         * html/HTMLInputElement.cpp:
1020         (WebCore::HTMLInputElement::parseAttribute):
1021         * html/InputType.cpp:
1022         (WebCore::InputType::maxResultsAttributeChanged):
1023         * html/InputType.h:
1024         * html/SearchInputType.cpp:
1025         (WebCore::SearchInputType::SearchInputType):
1026         (WebCore::updateResultButtonPseudoType):
1027         (WebCore::SearchInputType::maxResultsAttributeChanged):
1028         (WebCore::SearchInputType::createShadowSubtree):
1029         (WebCore::SearchInputType::destroyShadowSubtree):
1030         * html/SearchInputType.h:
1031         * html/shadow/TextControlInnerElements.cpp:
1032         (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): Deleted.
1033         * html/shadow/TextControlInnerElements.h:
1034
1035 2014-08-02  Benjamin Poulain  <bpoulain@apple.com>
1036
1037         Add warnings for the buggy implementations of shadowPseudoId()
1038         https://bugs.webkit.org/show_bug.cgi?id=135477
1039
1040         Reviewed by Ryosuke Niwa.
1041
1042         Dean is going to look into fixing media element styling.
1043         In the meantime, add warnings to prevent this from spreading.
1044
1045         * dom/Element.h:
1046         * html/shadow/SliderThumbElement.cpp:
1047         (WebCore::SliderThumbElement::shadowPseudoId):
1048         (WebCore::SliderContainerElement::shadowPseudoId):
1049
1050 2014-08-01  Commit Queue  <commit-queue@webkit.org>
1051
1052         Unreviewed, rolling out r171957.
1053         https://bugs.webkit.org/show_bug.cgi?id=135538
1054
1055         Caused GTK assertions and test failures (Requested by smfr on
1056         #webkit).
1057
1058         Reverted changeset:
1059
1060         "Clean up image subsampling code, make it less iOS-specific"
1061         https://bugs.webkit.org/show_bug.cgi?id=134916
1062         http://trac.webkit.org/changeset/171957
1063
1064 2014-08-01  Myles C. Maxfield  <litherum@gmail.com>
1065
1066         [CMake] Allow CMake to find GLib on FreeBSD
1067         https://bugs.webkit.org/show_bug.cgi?id=132530
1068
1069         Reviewed by Gustavo Noronha Silva.
1070
1071         On FreeBSD, glibconfig.h is at /usr/local/include/glib-2.0/glibconfig.h.
1072
1073         * Source/cmake/FindGLIB.cmake:
1074
1075 2014-08-01  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1076
1077         REGRESSION(r171942): [CMAKE] [GTK] build broken (clean build).
1078         https://bugs.webkit.org/show_bug.cgi?id=135522
1079
1080         Reviewed by Martin Robinson.
1081
1082         No new tests required, no new functionality.
1083
1084         * CMakeLists.txt: Add missing include to the inspector headers
1085         and fix the path to InspectorJSTypeBuilders.h
1086
1087 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
1088
1089         Fix resource leak in FillLayersPropertyWrapper object member
1090         https://bugs.webkit.org/show_bug.cgi?id=135462
1091
1092         Reviewed by Andreas Kling.
1093
1094         Fix leak of m_fillLayerPropertyWrapper by using unique_ptr<>.
1095         Based on patch by Przemyslaw Kuczynski.
1096
1097         * page/animation/CSSPropertyAnimation.cpp:
1098         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
1099
1100 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
1101
1102         Clean up image subsampling code, make it less iOS-specific
1103         https://bugs.webkit.org/show_bug.cgi?id=134916
1104
1105         Reviewed by Dean Jackson.
1106
1107         Compile the image subsampling code on both Mac and iOS, and make it more platform
1108         neutral in general. Add a setting to allow it to be enabled on Mac for testing.
1109         
1110         The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
1111         is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
1112         when appropriate. CG's BitmapImage now determines which level of subsampling to use
1113         for a given frame, storing the subsampling level in the frame data. It can replace
1114         an aggressively subsampled frame with a less subsampled frame if necessary.
1115         
1116         To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
1117         always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
1118         BitmapImage::draw() takes care of scaling the srcRect for subsampled images.
1119         
1120         iOS had a code path that enabled caching of frame metadata in BitmapImage without
1121         actually decoding the frame; make this cross-platform.
1122
1123         * WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
1124         * WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
1125         for Cocoa but useful for reference.
1126         * loader/cache/CachedImage.cpp:
1127         (WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
1128         (WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
1129         can get to Settings (m_loader is null for image documents).
1130         (WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
1131         caused creation of the non-subsampled image, so remove it. There's no reason to
1132         eagerly decode the frame here.
1133         * loader/cache/CachedImage.h: Fix comment.
1134         * page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
1135         * page/Settings.in: Added imageSubsamplingEnabled.
1136         * platform/graphics/BitmapImage.cpp:
1137         (WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
1138         true for iOS to catch images created in code paths where we can't get to Settings.
1139         (WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
1140         (WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
1141         just metadata, or also the frame.
1142         (WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
1143         (WebCore::BitmapImage::updateSize): When we get the size for the first time, call
1144         determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
1145         platform-specific limits into account.
1146         (WebCore::BitmapImage::dataChanged): Comment.
1147         (WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
1148         (WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
1149         then determine if we can use the currently cached frame, or whether we should resample.
1150         (WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
1151         frame metadata.
1152         (WebCore::BitmapImage::frameDurationAtIndex):
1153         (WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
1154         (WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
1155         frame metadata.
1156         (WebCore::BitmapImage::cacheFrameInfo): Deleted.
1157         (WebCore::BitmapImage::originalSize): Deleted.
1158         (WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
1159         (WebCore::BitmapImage::currentFrameSize): Deleted.
1160         (WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
1161         * platform/graphics/BitmapImage.h:
1162         (WebCore::FrameData::FrameData):
1163         * platform/graphics/GraphicsContext.h: No need to pass a scale param now.
1164         * platform/graphics/ImageSource.cpp: Non-Cocoa changes.
1165         (WebCore::ImageSource::subsamplingLevelForScale):
1166         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
1167         (WebCore::ImageSource::size):
1168         (WebCore::ImageSource::frameSizeAtIndex):
1169         (WebCore::ImageSource::createFrameAtIndex):
1170         (WebCore::ImageSource::frameBytesAtIndex):
1171         * platform/graphics/ImageSource.h: No longer stores subsampling state.
1172         (WebCore::ImageSource::isSubsampled): Deleted.
1173         * platform/graphics/cairo/BitmapImageCairo.cpp:
1174         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
1175         * platform/graphics/cg/BitmapImageCG.cpp:
1176         (WebCore::FrameData::clear):
1177         (WebCore::BitmapImage::BitmapImage): Init more members.
1178         (WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
1179         level for the platform (subsample until the image area falls under a threshold).
1180         (WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
1181         is not 1x1. Also take care not to decode a non-subsampled image.
1182         (WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
1183         computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
1184         srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
1185         Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
1186         which is affected by subsampling.
1187         (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
1188         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1189         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
1190         (WebCore::GraphicsContext3D::paintToCanvas):
1191         * platform/graphics/cg/GraphicsContextCG.cpp:
1192         (WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
1193         * platform/graphics/cg/ImageBufferCG.cpp:
1194         (WebCore::ImageBuffer::draw):
1195         * platform/graphics/cg/ImageSourceCG.cpp:
1196         (WebCore::ImageSource::ImageSource):
1197         (WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
1198         (WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
1199         make a new options dict and return it.
1200         (WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
1201         between 0 and 3 given a scale.
1202         (WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
1203         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
1204         JPEGs because of a bug, so need this to know if a frame should be subsampled.
1205         (WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
1206         (WebCore::ImageSource::orientationAtIndex):
1207         (WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
1208         (WebCore::ImageSource::getHotSpot):
1209         (WebCore::ImageSource::repetitionCount):
1210         (WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
1211         (WebCore::ImageSource::frameDurationAtIndex):
1212         (WebCore::ImageSource::frameBytesAtIndex):
1213         (WebCore::ImageSource::imageSourceOptions): Deleted.
1214         (WebCore::ImageSource::originalSize): Deleted.
1215         * platform/graphics/mac/ImageMac.mm:
1216         (WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
1217         * platform/graphics/wince/ImageWinCE.cpp:
1218         (WebCore::BitmapImage::determineMinimumSubsamplingLevel):
1219
1220 2014-08-01  Andreas Kling  <akling@apple.com>
1221
1222         Many DOM objects have InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero for no reason.
1223         <https://webkit.org/b/135519>
1224
1225         Don't set this structure flag unless the object actually has an override
1226         for getOwnPropertySlotByIndex().
1227
1228         Reviewed by Geoffrey Garen.
1229
1230         * bindings/scripts/CodeGeneratorJS.pm:
1231         (GenerateHeader):
1232         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1233         * bindings/scripts/test/JS/JSTestException.h:
1234         * bindings/scripts/test/JS/JSTestInterface.h:
1235         * bindings/scripts/test/JS/JSTestObj.h:
1236         * bindings/scripts/test/JS/JSTestTypedefs.h:
1237
1238 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
1239
1240         SVG Font kerning can take an early out if the font has no kerning information
1241         https://bugs.webkit.org/show_bug.cgi?id=135524
1242
1243         Reviewed by Dean Jackson.
1244
1245         Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
1246         and again, skip the iteration entirely if every call would return 0.
1247
1248         No new tests because there is no behavior change.
1249
1250         * rendering/svg/SVGTextRunRenderingContext.cpp:
1251         (WebCore::SVGTextRunRenderingContext::applySVGKerning):
1252         * svg/SVGFontElement.h:
1253
1254 2014-08-01  Beth Dakin  <bdakin@apple.com>
1255
1256         Inspector highlights clipped at the bottom on the page in WK1 views with 
1257         contentInsets
1258         https://bugs.webkit.org/show_bug.cgi?id=135480
1259         -and corresponding-
1260         <rdar://problem/17850323>
1261
1262         Forgot to commit this one very critical part with 
1263         http://trac.webkit.org/changeset/171951 
1264
1265         * platform/ScrollView.cpp:
1266         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
1267
1268 2014-08-01  Beth Dakin  <bdakin@apple.com>
1269
1270         Inspector highlights clipped at the bottom on the page in WK1 views with 
1271         contentInsets
1272         https://bugs.webkit.org/show_bug.cgi?id=135480
1273         -and corresponding-
1274         <rdar://problem/17850323>
1275
1276         Reviewed by Simon Fraser.
1277
1278         unscaledTotalVisibleContentSize() was the main function on Mac that was expected 
1279         to return the rect representing ALL visible content, including content that might 
1280         be in an inset area and obscured by UI elements. This patch re-names that function 
1281         to unscaledVisibleContentSizeIncludingObscuredArea(), and that patch makes that 
1282         function return the right thing in the platformWidget() case.
1283
1284         Re-name.
1285         * inspector/InspectorOverlay.cpp:
1286         (WebCore::InspectorOverlay::update):
1287
1288         Return platformVisibleContentSizeIncludingObscuredArea() for the platformWidget() 
1289         case and re-name.
1290         * platform/ScrollView.cpp:
1291         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
1292
1293         This was just wrong. It was returning the big rectangle instead of the small one 
1294         for platformWidget().
1295         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
1296
1297         New platform functions.
1298         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
1299         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
1300         (WebCore::ScrollView::unscaledTotalVisibleContentSize): Deleted.
1301         * platform/ScrollView.h:
1302         * platform/ios/ScrollViewIOS.mm:
1303         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
1304         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
1305         * platform/mac/ScrollViewMac.mm:
1306         (WebCore::ScrollView::platformVisibleContentRect):
1307         (WebCore::ScrollView::platformVisibleContentSize):
1308         (WebCore::ScrollView::platformVisibleContentRectIncludingObscuredArea):
1309         (WebCore::ScrollView::platformVisibleContentSizeIncludingObscuredArea):
1310
1311         Re-name.
1312         * rendering/RenderLayerCompositor.cpp:
1313         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1314         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1315         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1316         (WebCore::RenderLayerCompositor::ensureRootLayer):
1317
1318 2014-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
1319
1320         SVGGlyph wastes space due to padding
1321         https://bugs.webkit.org/show_bug.cgi?id=135520
1322
1323         Reviewed by Dean Jackson.
1324
1325         Rearrange members in SVGGlyph so there is no wasted padding space.
1326
1327         No new tests because there is no behavior change.
1328
1329         * platform/graphics/SVGGlyph.h:
1330         (WebCore::SVGGlyph::SVGGlyph):
1331
1332 2014-07-31  Dean Jackson  <dino@apple.com>
1333
1334         [Media iOS] Ensure there is a nice default fallback for missing wireless target names
1335         https://bugs.webkit.org/show_bug.cgi?id=135488
1336         <rdar://problem/17879156>
1337
1338         Reviewed by Eric Carlson.
1339
1340         We occasionally run into cases where this.host.externalDeviceDisplayName
1341         is empty or null, creating a pretty ugly/confusing string in the
1342         wireless playback status screen.
1343
1344         If this happens, we should default to using "Apple TV".
1345
1346         * Modules/mediacontrols/mediaControlsiOS.js:
1347         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Check if the externalDeviceDisplayName
1348         is empty or null, and fall back to "Apple TV" if so.
1349
1350 2014-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
1351
1352         URLs in srcset attributes are not made absolute upon copy and paste
1353         https://bugs.webkit.org/show_bug.cgi?id=135448
1354
1355         Reviewed by Ryosuke Niwa.
1356
1357         When pasting, canonicalize URLs in srcset the same way we do with src.
1358
1359         Test: editing/pasteboard/img-srcset-copy-paste-canonicalization.html
1360
1361         * dom/Element.cpp:
1362         (WebCore::Element::completeURLsInAttributeValue): Initial implemention, moved from markup.cpp.
1363         * dom/Element.h:
1364         (WebCore::Element::attributeContainsURL): New function for completeURLs to call.
1365         (WebCore::Element::completeURLsInAttributeValue): Only called if attributeContainsURL returns
1366         true. Default implementation simply calls isURLAttribute().
1367         * editing/markup.cpp:
1368         (WebCore::completeURLs): Call attributeContainsURL() and completeURLsInAttributeValue() to
1369         complete the URL, so nodes can perform their own behavior.
1370         * html/HTMLImageElement.cpp:
1371         (WebCore::HTMLImageElement::attributeContainsURL): Return true for srcset.
1372         (WebCore::HTMLImageElement::completeUrlAttributeValue): Use our existing srcset parser to
1373         parse the srcset attribute, then use its output to canonicalize URLs, and build it back up
1374         into a string.
1375         * html/HTMLImageElement.h:
1376         (WebCore::HTMLImageElement::attributeContainsURL):
1377         (WebCore::HTMLImageElement::completeUrlAttributeValue):
1378         * html/parser/HTMLSrcsetParser.cpp: Make parseImageCandidatesFromSrcsetAttribute() public
1379         and change its signature to return its result.
1380         (WebCore::parseImageCandidatesFromSrcsetAttribute):
1381         * html/parser/HTMLSrcsetParser.h: Ditto.
1382
1383 2014-07-31  Andreas Kling  <akling@apple.com>
1384
1385         Remove the JSC::OverridesVisitChildren flag.
1386         <https://webkit.org/b/135489>
1387
1388         Tweak the bindings code generator to stop spitting out the flag.
1389
1390         Reviewed by Geoffrey Garen.
1391
1392         * bindings/js/JSDOMBinding.h:
1393         * bindings/js/JSDOMGlobalObject.cpp:
1394         (WebCore::JSDOMGlobalObject::visitChildren):
1395         * bindings/scripts/CodeGeneratorJS.pm:
1396         (GenerateHeader):
1397         (GenerateImplementation):
1398
1399 2014-08-01  Jer Noble  <jer.noble@apple.com>
1400
1401         [MSE][Mac] Volume is not remembered between items in a YouTube playlist
1402         https://bugs.webkit.org/show_bug.cgi?id=135479
1403
1404         Reviewed by Eric Carlson.
1405
1406         When an AVSampleBufferAudioRenderer is added to the player, set its -volume and -muted
1407         properties with the current values from the HTMLMediaElement. 
1408
1409         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1410         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1411
1412 2014-08-01  Tim Horton  <timothy_horton@apple.com>
1413
1414         Fix the iOS build after r171891
1415
1416         * platform/ios/ScrollViewIOS.mm:
1417         (WebCore::ScrollView::platformTopContentInset):
1418         (WebCore::ScrollView::platformSetTopContentInset):
1419
1420 2014-08-01  Pratik Solanki  <psolanki@apple.com>
1421
1422         Remove EventNames.h include from header files
1423         https://bugs.webkit.org/show_bug.cgi?id=135486
1424
1425         Reviewed by Alexey Proskuryakov.
1426
1427         No new tests because no functional changes.
1428
1429         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
1430         * Modules/gamepad/GamepadEvent.h:
1431         * Modules/indexeddb/IDBRequest.h:
1432         * Modules/indexeddb/IDBTransaction.h:
1433         * Modules/mediastream/RTCStatsResponse.h:
1434         * Modules/websockets/WebSocket.h:
1435         * css/FontLoader.h:
1436         * dom/SecurityPolicyViolationEvent.h:
1437         * loader/appcache/DOMApplicationCache.h:
1438         * workers/AbstractWorker.h:
1439         * workers/Worker.h:
1440         * workers/WorkerGlobalScope.h:
1441         * xml/XMLHttpRequest.h:
1442         * xml/XMLHttpRequestProgressEvent.h:
1443
1444 2014-08-01  Simon Fraser  <simon.fraser@apple.com>
1445
1446         nullptr goodness in RenderLayer
1447         https://bugs.webkit.org/show_bug.cgi?id=135512
1448
1449         Reviewed by Brent Fulgham.
1450
1451         Use nullptr in RenderLayer.
1452
1453         * rendering/RenderLayer.cpp:
1454         (WebCore::RenderLayer::RenderLayer):
1455         (WebCore::RenderLayer::updateDescendantDependentFlags):
1456         (WebCore::accumulateOffsetTowardsAncestor):
1457         (WebCore::RenderLayer::scrollRectToVisible):
1458         (WebCore::RenderLayer::destroyScrollbar):
1459         (WebCore::RenderLayer::paintLayerContents):
1460         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
1461         (WebCore::RenderLayer::hitTestLayer):
1462         (WebCore::RenderLayer::hitTestList):
1463         (WebCore::RenderLayer::calculateClipRects):
1464
1465 2014-08-01  Tim Horton  <timothy_horton@apple.com>
1466
1467         Build fix for iOS
1468
1469         * bindings/objc/DOM.mm:
1470         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
1471         We use CGImageRef instead of NSImage here on iOS.
1472
1473 2014-08-01  Renato Nagy  <nagy.renato@stud.u-szeged.hu>
1474
1475         ASSERTION FAILED: listNode in WebCore::RenderListItem::updateListMarkerNumbers
1476         https://bugs.webkit.org/show_bug.cgi?id=134970
1477
1478         Reviewed by Zalan Bujtas.
1479
1480         Removed an unnecessary assert, because the null return value of enclosingList() is
1481         handled properly after this assert.
1482
1483         * rendering/RenderListItem.cpp:
1484         (WebCore::RenderListItem::updateListMarkerNumbers):
1485
1486 2014-08-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1487
1488         Replace DEPRECATED_DEFINE_STATIC_LOCAL with NeverDestroyed<T> in NavigatorContentUtils
1489         https://bugs.webkit.org/show_bug.cgi?id=135494
1490
1491         Reviewed by Andrei Bucur.
1492
1493         Use static NeverDestroyed<T> variables instead of the DEPRECATED_DEFINE_STATIC_LOCAL macro.
1494
1495         No new tests, no behavior changes.
1496
1497         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1498         (WebCore::customHandlersStateString):
1499         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
1500
1501 2014-07-31  Benjamin Poulain  <bpoulain@apple.com>
1502
1503         Remove shadowPseudoId() override from the shadow media controls
1504         https://bugs.webkit.org/show_bug.cgi?id=135474
1505
1506         Reviewed by Eric Carlson.
1507
1508         Small cleanup.
1509
1510         * html/shadow/MediaControlElementTypes.h:
1511         * html/shadow/MediaControlElements.cpp:
1512         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
1513         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
1514         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
1515         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
1516         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
1517         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
1518         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
1519         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
1520         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
1521         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
1522         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
1523         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
1524         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
1525         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
1526         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
1527         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement):
1528         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
1529         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
1530         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement):
1531         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
1532         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
1533         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
1534         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
1535         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
1536         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
1537         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
1538         (WebCore::MediaControlPanelElement::shadowPseudoId): Deleted.
1539         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId): Deleted.
1540         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId): Deleted.
1541         (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Deleted.
1542         (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Deleted.
1543         (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Deleted.
1544         (WebCore::MediaControlPanelMuteButtonElement::shadowPseudoId): Deleted.
1545         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Deleted.
1546         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Deleted.
1547         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId): Deleted.
1548         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Deleted.
1549         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Deleted.
1550         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Deleted.
1551         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Deleted.
1552         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Deleted.
1553         (WebCore::MediaControlClosedCaptionsContainerElement::shadowPseudoId): Deleted.
1554         (WebCore::MediaControlClosedCaptionsTrackListElement::shadowPseudoId): Deleted.
1555         (WebCore::MediaControlTimelineElement::shadowPseudoId): Deleted.
1556         (WebCore::MediaControlPanelVolumeSliderElement::shadowPseudoId): Deleted.
1557         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Deleted.
1558         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Deleted.
1559         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Deleted.
1560         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Deleted.
1561         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Deleted.
1562         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Deleted.
1563         (WebCore::MediaControlTextTrackContainerElement::textTrackContainerElementShadowPseudoId): Deleted.
1564         (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Deleted.
1565         * html/shadow/MediaControlElements.h:
1566         * html/shadow/MediaControls.cpp:
1567         (WebCore::MediaControls::MediaControls):
1568         (WebCore::MediaControls::shadowPseudoId): Deleted.
1569         * html/shadow/MediaControls.h:
1570
1571 2014-07-31  Timothy Horton  <timothy_horton@apple.com>
1572
1573         Build fix for platforms where we should have automaticallyAdjustsContentInsets but it isn't public yet
1574
1575         * platform/mac/ScrollViewMac.mm:
1576
1577 2014-07-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1578
1579         [EFL] Add support for building with Geoclue2.
1580         https://bugs.webkit.org/show_bug.cgi?id=135455
1581
1582         Reviewed by Gyuyoung Kim.
1583
1584         No new tests required, no new functionality.
1585
1586         * PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
1587         and include gio-unix path.
1588
1589 2014-07-31  Zalan Bujtas  <zalan@apple.com>
1590
1591         Subpixel rendering: Region painting needs to take subpixel accumulation into account.
1592         https://bugs.webkit.org/show_bug.cgi?id=135469
1593
1594         Similar to non-region painting, when the context is translated, we need to propagate
1595         the subpixel difference so that renderers get snapped to the same position as if they
1596         were not part of a region.
1597
1598         Reviewed by Simon Fraser.
1599
1600         Covered by existing tests/not testable (webkit.org/b/135470)
1601
1602         * html/shadow/MediaControlElements.cpp:
1603         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1604         * page/FrameView.cpp:
1605         (WebCore::FrameView::paintContents):
1606         * rendering/RenderLayer.cpp:
1607         (WebCore::RenderLayer::paint):
1608         (WebCore::RenderLayer::calculateClipRects):
1609         * rendering/RenderLayer.h:
1610
1611 2014-07-31  Jer Noble  <jer.noble@apple.com>
1612
1613         [iOS] Video in an <embed> has a bad aspect ratio when in fullscreen mode.
1614         https://bugs.webkit.org/show_bug.cgi?id=135481
1615
1616         Reviewed by Simon Fraser.
1617
1618         Do not change the gravity of our AVPlayerLayer when in full screen mode; its gravity
1619         is controlled by setVideoFullscreenGravity(), and should not be affected by style changes.
1620
1621         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1622         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
1623
1624 2014-07-31  Beth Dakin  <bdakin@apple.com>
1625
1626         Hit-testing broken in WebKit 1 views with AppKit's contentInsets
1627         https://bugs.webkit.org/show_bug.cgi?id=135434
1628         -and corresponding-
1629         <rdar://problem/17850323>
1630
1631         Reviewed by Benjamin Poulain.
1632
1633         AppKit's contentInsets are factored into scroll positions and mouse positions, but
1634         in WebCore, we generally want all of those things to be factored out so that, for
1635         example, the scroll position of a document pinned to the top is the same whether
1636         or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
1637         contentInsets, this patch factors the inset out or into of all coordinate
1638         conversion methods just like we do for the WebKit2 contentInset.
1639         
1640         This patch also adds the ability to test WK1 platformContentInsets with
1641         window.internals, and it re-names convertFromRenderer to 
1642         convertFromRendererToContainingView and also re-names convertToRenderer to
1643         convertFromContainingViewToRenderer.
1644
1645         ScrollView::topContentInset() takes an optional parameter indicating whether the
1646         caller wants the WebCore::Page contentInset or the platform content inset. It’s
1647         necessary to distinguish between these cases because there is a lot of code that
1648         only wants the WebCore::Page contentInset since that feature is actually
1649         implemented in WebCore as opposed to being implemented at the platform level.
1650         * WebCore.exp.in:
1651         * page/FrameView.cpp:
1652         (WebCore::FrameView::topContentInset):
1653
1654         For layout test purposes, set the platforTopContentInset here if there is a 
1655         platformWidget().
1656         (WebCore::FrameView::topContentInsetDidChange):
1657
1658         Re-named functions, also all coordinate conversion functions call 
1659         topContentInset(ManualOrPlatformContentInset)
1660         (WebCore::FrameView::convertFromContainingViewToRenderer):
1661         (WebCore::FrameView::convertToContainingView):
1662         (WebCore::FrameView::convertFromContainingView):
1663         (WebCore::FrameView::convertFromRenderer): Deleted.
1664         (WebCore::FrameView::convertToRenderer): Deleted.
1665         * page/FrameView.h:
1666         * page/Page.cpp:
1667         (WebCore::Page::setTopContentInset):
1668         * platform/ScrollView.cpp:
1669         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
1670         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
1671         (WebCore::ScrollView::contentsToRootView):
1672         (WebCore::ScrollView::rootViewToTotalContents):
1673         (WebCore::ScrollView::contentsToWindow):
1674         (WebCore::ScrollView::platformTopContentInset):
1675         (WebCore::ScrollView::platformSetTopContentInset):
1676         * platform/ScrollView.h:
1677         (WebCore::ScrollView::topContentInset):
1678         * platform/ios/ScrollViewIOS.mm:
1679         (WebCore::ScrollView::platformTopContentInset):
1680         (WebCore::ScrollView::platformSetTopContentInset):
1681
1682         Implement new platform inset-related functions using AppKit's implementation.
1683         * platform/mac/ScrollViewMac.mm:
1684         (WebCore::ScrollView::platformTopContentInset):
1685         (WebCore::ScrollView::platformSetTopContentInset):
1686         
1687         When we set the scroll position for the documentView, we have to factor the inset
1688         back into the WebCore scroll position.
1689         (WebCore::ScrollView::platformSetScrollPosition):
1690         
1691         Re-named functions.
1692         * rendering/RenderLayer.cpp:
1693         (WebCore::RenderLayer::convertFromScrollbarToContainingView):
1694         (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
1695         * rendering/RenderListBox.cpp:
1696         (WebCore::RenderListBox::convertFromScrollbarToContainingView):
1697         (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
1698
1699 2014-07-31  Dean Jackson  <dino@apple.com>
1700
1701         Default buttons do not pulse in OS X 10.10
1702         https://bugs.webkit.org/show_bug.cgi?id=135447
1703         <rdar://problem/17875896>
1704
1705         Reviewed by Dan Bernstein.
1706
1707         OS X Yosemite does not have the animated pulsing default
1708         buttons seen in previous releases. We don't need to have
1709         a timer in RenderButton constantly triggering repaints.
1710
1711         * platform/mac/ThemeMac.mm:
1712         (WebCore::paintButton): No need to advance the animation.
1713         * rendering/RenderButton.cpp:
1714         (WebCore::RenderButton::styleDidChange): Ask the theme if it
1715         should advance the animation.
1716         * rendering/RenderTheme.h:
1717         (WebCore::RenderTheme::defaultButtonHasAnimation): Virtual function
1718         indicating if the button needs to repaint.
1719         * rendering/RenderThemeMac.h:
1720         * rendering/RenderThemeMac.mm:
1721         (WebCore::RenderThemeMac::defaultButtonHasAnimation): Provide platform
1722         specific result on Yosemite and above.
1723
1724 2014-07-31  Tim Horton  <timothy_horton@apple.com>
1725
1726         DOM::renderedImageForcingBlackText returns an image with the wrong logical size on 2x displays
1727         https://bugs.webkit.org/show_bug.cgi?id=135442
1728         <rdar://problem/17614632>
1729
1730         Reviewed by Simon Fraser.
1731
1732         * bindings/objc/DOM.mm:
1733         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
1734         Scale the NSImage size by the device scale factor,
1735         similar to what we did for drag images in r167403.
1736         Ideally this scaling would happen in the code that
1737         generates the images, but this is a much larger change
1738         with much more regression potential.
1739
1740 2014-07-31  Bear Travis  <betravis@adobe.com>
1741
1742         [CSS Font Loading] Rename document.fontloader to document.fonts
1743         https://bugs.webkit.org/show_bug.cgi?id=135393
1744
1745         Reviewed by Bem Jones-Bey.
1746
1747         The most recent version of the specification has renamed
1748         document.fontloader to document.fonts. This change updates the
1749         names in WebCore and LayoutTests.
1750
1751         Fixed up existing tests under LayoutTests/fast/css/fontloader-*
1752         and LayoutTests/http/webfont/fontloader-*
1753
1754         * css/CSSFontFace.cpp:
1755         (WebCore::CSSFontFace::notifyFontLoader):
1756         (WebCore::CSSFontFace::notifyLoadingDone):
1757         * dom/Document.cpp:
1758         (WebCore::Document::fonts):
1759         (WebCore::Document::fontloader): Deleted.
1760         * dom/Document.h:
1761         * dom/Document.idl:
1762         * page/FrameView.cpp:
1763         (WebCore::FrameView::performPostLayoutTasks):
1764
1765 2014-07-31  Andrei Bucur  <abucur@adobe.com>
1766
1767         REGRESSION: Search highlight is broken in RTL multicolumn content
1768         https://bugs.webkit.org/show_bug.cgi?id=135452
1769
1770         Reviewed by Simon Fraser.
1771
1772         The offsets for elements inside RTL multi-column elements are incorrectly computed because
1773         the columns don't calculate their left position according to the writing direction.
1774
1775         The patch extracts the column position computation in two helper functions (for top and left)
1776         so they can be used when needed in different parts of the code. In our case, the |columnLogicalLeft|
1777         function should be used inside |columnTranslationForOffset|.
1778
1779         Test: fast/multicol/content-bounding-box-rtl.html
1780
1781         * rendering/RenderMultiColumnSet.cpp:
1782         (WebCore::RenderMultiColumnSet::columnLogicalLeft): Return the logical left of a column relative to the set.
1783         (WebCore::RenderMultiColumnSet::columnLogicalTop): Return the logical top of a column relative to the set.
1784         (WebCore::RenderMultiColumnSet::columnRectAt): Split the code between columnLogicalLeft and columnLogicalTop.
1785         (WebCore::RenderMultiColumnSet::collectLayerFragments): Make code clearer by adding a new line.
1786         (WebCore::RenderMultiColumnSet::columnTranslationForOffset): Use columnLogicalLeft instead of duplicating logic.
1787         * rendering/RenderMultiColumnSet.h:
1788
1789 2014-07-31  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1790
1791         Eliminate "FractionConversion" from CSSPrimitiveValue::convertToLength
1792         https://bugs.webkit.org/show_bug.cgi?id=135377
1793
1794         Reviewed by Darin Adler.
1795
1796         The FractionConversion argument in CSSPrimitiveValue::convertToLength
1797         doesn't seem to actually have a purpose. It is for converting numbers
1798         into Length(x * 100, Percent), but this case shouldn't be reachable.
1799         The original patch introducing it doesn't shed any light either:
1800         [https://bugs.webkit.org/show_bug.cgi?id=74913
1801
1802         This patch removes the now unused FractionConversion argument. Note
1803         that we can probably also merge the two Fixed conversions, as the
1804         two only differ in clamping large numbers (probably unintended).
1805
1806         Patch by Timothy Loh, backported from Blink: https://codereview.chromium.org/71253002
1807
1808         No new tests.
1809
1810         * css/CSSCalculationValue.cpp:
1811         (WebCore::determineCategory):
1812         * css/CSSParser.cpp:
1813         (WebCore::parseTransformTranslateArguments):
1814         (WebCore::parseTranslateTransformValue):
1815         (WebCore::parseTransformArguments): Deleted.
1816         * css/CSSPrimitiveValueMappings.h:
1817         (WebCore::CSSPrimitiveValue::convertToLength):
1818         * css/DeprecatedStyleBuilder.cpp:
1819         (WebCore::ApplyPropertyClip::convertToLength):
1820         * css/StyleResolver.cpp:
1821         (WebCore::StyleResolver::convertToIntLength):
1822         (WebCore::StyleResolver::convertToFloatLength):
1823         * css/TransformFunctions.cpp:
1824         (WebCore::convertToFloatLength):
1825
1826 2014-07-31  Joseph Pecoraro  <pecoraro@apple.com>
1827
1828         Web Inspector: console.profile missing profile information
1829         https://bugs.webkit.org/show_bug.cgi?id=135432
1830
1831         Reviewed by Timothy Hatcher.
1832
1833         By switching console.profile to start/stop the timeline we would
1834         not have a chance to recompile JS functions with profiling information.
1835         This used to work because whenever the inspector was open we would
1836         have profiling information enabled. Go back to that behavior.
1837
1838         * inspector/InspectorController.cpp:
1839         (WebCore::InspectorController::profilerEnabled):
1840         Instead of checking if the timeline agent has started, check if the
1841         timeline agent has been created. Going back to the normal behavior
1842         of always having profiling information when the inspector is open.
1843
1844         * inspector/InspectorTimelineAgent.h:
1845         * inspector/InspectorTimelineAgent.cpp:
1846         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
1847         Recompile initializing the timeline agent to include profiling information.
1848
1849         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1850         Recompile destrying the timeline agent, only if needed.
1851
1852         (WebCore::InspectorTimelineAgent::willCallFunction):
1853         (WebCore::InspectorTimelineAgent::didCallFunction):
1854         (WebCore::InspectorTimelineAgent::willEvaluateScript):
1855         (WebCore::InspectorTimelineAgent::didEvaluateScript):
1856         Using a boolean to track nested calls would not give expected
1857         behavior when un-nesting. Switch to a counter to ensure that
1858         as we start profiling in the outermost level we then stop
1859         profiling at that same level and not inside an inner nesting.
1860
1861 2014-07-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1862
1863         Refactor EventHandler to call ScrollAnimator::handleWheelEvent for overflow scrolling
1864         https://bugs.webkit.org/show_bug.cgi?id=135195
1865
1866         Reviewed by Beth Dakin.
1867
1868         ScrollableArea::handleWheelEvent is not currently being used to handle wheel events for overflow scrolling; it instead directly invokes ScrollableArea::scroll.
1869         In order to expose wheel phases on Mac, the PlatformWheelEvent itself should propagate down to ScrollableArea, not just the scroll granularity, direction and
1870         multiplier required by ScrollableArea::scroll. With this patch, PlatformWheelEvent will be "shipped" along with the WheelEvent.
1871
1872         No new tests, since behavior should not have changed.
1873
1874         * page/EventHandler.cpp:
1875         (WebCore::didScrollInScrollableAreaForSingleAxis): Calls ScrollableArea::scroll directly using WheelEvent's data. Used to handle programmatic WheelEvents, e.g. from JavaScript.
1876         (WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): Finds the correct ScrollableArea and attempts to scroll it using the information contained in the WheelEvent via ScrollableArea::handleWheelEvent
1877         (WebCore::EventHandler::defaultWheelEventHandler): Updated to use handleWheelEventInAppropriateEnclosingBoxForSingleAxis instead of scrollNode.
1878         (WebCore::scrollNode): Deleted.
1879         * rendering/RenderListBox.h: Made RenderListBox::scroll public so it can be invoked from EventHandler::handleWheelEventInAppropriateEnclosingBoxForSingleAxis.
1880         * rendering/RenderNamedFlowThread.cpp: Refactored to let EventHandler update nextScrollBlock in the case of isRenderNamedFlowThread().
1881         (WebCore::RenderNamedFlowThread::fragmentFromRenderBoxAsRenderBlock): 
1882         * rendering/RenderNamedFlowThread.h:
1883
1884 2014-07-31  Dan Bernstein  <mitz@apple.com>
1885
1886         WebCore part of: Server trust authentication challenges aren’t sent to the navigation delegate
1887         https://bugs.webkit.org/show_bug.cgi?id=135327
1888
1889         Reviewed by Alexey Proskuryakov.
1890
1891         * platform/network/cf/ResourceHandleCFNet.cpp:
1892         (WebCore::ResourceHandle::receivedCredential): Don’t try to change the persistence of
1893         credentials used for server trust, because the platform doesn’t support persistence values
1894         other than Session for server trust.
1895         * platform/network/mac/ResourceHandleMac.mm:
1896         (WebCore::ResourceHandle::receivedCredential): Ditto.
1897
1898 2014-07-31  Dan Bernstein  <mitz@apple.com>
1899
1900         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
1901
1902         * platform/network/cocoa/CredentialCocoa.mm:
1903         (WebCore::toCredentialPersistence):
1904
1905 2014-07-31  Dan Bernstein  <mitz@apple.com>
1906
1907         Reverted r171854, because it broke building with the OS X 10.8 SDK.
1908
1909         * platform/network/cocoa/CredentialCocoa.mm:
1910         (WebCore::toCredentialPersistence):
1911
1912 2014-07-31  Dan Bernstein  <mitz@apple.com>
1913
1914         Tried to fix building with the OS X 10.9 SDK while targeting OS X 10.8.
1915
1916         * platform/network/cocoa/CredentialCocoa.mm:
1917         (WebCore::toCredentialPersistence):
1918
1919 2014-07-31  Jer Noble  <jer.noble@apple.com>
1920
1921         REGRESSION(??): [iOS] Disabling MediaPlaybackRequiresUserGesture does not remove user gesture requirement for entering full screen.
1922         https://bugs.webkit.org/show_bug.cgi?id=135443
1923
1924         Reviewed by Dean Jackson.
1925
1926         Allow full screen mode to be entered without a user gesture if the gesture requirement for media playback
1927         has been unset.
1928
1929         * html/HTMLMediaElement.cpp:
1930         (WebCore::HTMLMediaElement::HTMLMediaElement):
1931
1932 2014-07-31  Andrei Bucur  <abucur@adobe.com>
1933
1934         [CSS Multicolumn] Clear the lines when switching to multi-column layout
1935         https://bugs.webkit.org/show_bug.cgi?id=135127
1936
1937         Reviewed by Alexandru Chiculita.
1938
1939         When switching an element to multi-column layout it becomes a container of block
1940         children. When this happens the existing line boxes must be deleted in addition
1941         to clearing the hasInlineChildren flag.
1942
1943         Tests: fast/multicol/inline-container-to-multicol.html
1944                fast/multicol/inline-container-to-multicol-float.html
1945                fast/multicol/inline-container-to-multicol-positioned.html
1946
1947         * rendering/RenderBlockFlow.cpp:
1948         (WebCore::RenderBlockFlow::createMultiColumnFlowThread):
1949
1950 2014-07-30  Andreas Kling  <akling@apple.com>
1951
1952         PropertyName's internal string is always atomic.
1953         <https://webkit.org/b/135451>
1954
1955         Use PropertyName::publicName() directly instead of taking the slow route
1956         through AtomicString::findStringWithHash().
1957
1958         These strings are always atomic, and findStringWithHash() would trudge
1959         through a full hash lookup just to discover that indeed, they are!
1960
1961         Reviewed by Benjamin Poulain.
1962
1963         * bindings/js/JSDOMBinding.cpp:
1964         (WebCore::findAtomicString): Deleted.
1965         * bindings/js/JSDOMBinding.h:
1966         * bindings/js/JSDOMWindowCustom.cpp:
1967         (WebCore::namedItemGetter):
1968         (WebCore::JSDOMWindow::getOwnPropertySlot):
1969         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1970         * bindings/js/JSHTMLDocumentCustom.cpp:
1971         (WebCore::JSHTMLDocument::canGetItemsForName):
1972         (WebCore::JSHTMLDocument::nameGetter):
1973
1974 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
1975
1976         ElementRuleCollector: group the shadow tree code
1977         https://bugs.webkit.org/show_bug.cgi?id=135410
1978
1979         Reviewed by Andreas Kling.
1980
1981         * css/ElementRuleCollector.cpp:
1982         (WebCore::ElementRuleCollector::collectMatchingRules):
1983         Little cleanup: group the shadow tree rule collection in the same block.
1984
1985 2014-07-30  Benjamin Poulain  <benjamin@webkit.org>
1986
1987         Cleanup DetailsMarkerControl
1988         https://bugs.webkit.org/show_bug.cgi?id=135429
1989
1990         Reviewed by Andreas Kling.
1991
1992         Remove the override of shadowPseudoId(). This is a simple type of shadowId,
1993         it should use the generic pseudo() path.
1994
1995         Move DetailsMarkerControl::create() out-of-line. One could justify inlining the constructor,
1996         inlining the ::create() function has little value.
1997
1998         * html/shadow/DetailsMarkerControl.cpp:
1999         (WebCore::DetailsMarkerControl::create):
2000         (WebCore::DetailsMarkerControl::DetailsMarkerControl):
2001         (WebCore::DetailsMarkerControl::rendererIsNeeded):
2002         (WebCore::DetailsMarkerControl::shadowPseudoId): Deleted.
2003         (WebCore::DetailsMarkerControl::summaryElement): Deleted.
2004         * html/shadow/DetailsMarkerControl.h:
2005         (WebCore::DetailsMarkerControl::create): Deleted.
2006
2007 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2008
2009         Remove UploadButtonElement::shadowPseudoId()
2010         https://bugs.webkit.org/show_bug.cgi?id=135435
2011
2012         Reviewed by Andreas Kling.
2013
2014         Use the generic pseudo() path instead of a custom shadowPseudoId().
2015
2016         * html/FileInputType.cpp:
2017         (WebCore::UploadButtonElement::create):
2018         (WebCore::UploadButtonElement::createForMultiple):
2019         (WebCore::UploadButtonElement::UploadButtonElement):
2020         Set the type in the common constructor instead of the call sites.
2021         (WebCore::UploadButtonElement::shadowPseudoId): Deleted.
2022         * html/FileInputType.h:
2023
2024 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2025
2026         Remove SpinButtonElement::shadowPseudoId
2027         https://bugs.webkit.org/show_bug.cgi?id=135436
2028
2029         Reviewed by Andreas Kling.
2030
2031         Use the generic pseudo.
2032
2033         * html/shadow/SpinButtonElement.cpp:
2034         (WebCore::SpinButtonElement::SpinButtonElement):
2035         (WebCore::SpinButtonElement::shadowPseudoId): Deleted.
2036         * html/shadow/SpinButtonElement.h:
2037
2038 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2039
2040         Clean up YouTubeEmbedShadowElement
2041         https://bugs.webkit.org/show_bug.cgi?id=135437
2042
2043         Reviewed by Andreas Kling.
2044
2045         * html/shadow/YouTubeEmbedShadowElement.cpp:
2046         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
2047         (WebCore::YouTubeEmbedShadowElement::pluginElement): Deleted.
2048         This is unused in WebCore.
2049
2050         (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Deleted.
2051         Use the generic pseudo path instead of a custom shadowPseudoId.
2052         * html/shadow/YouTubeEmbedShadowElement.h:
2053
2054 2014-07-30  Benjamin Poulain  <bpoulain@apple.com>
2055
2056         Remove shadowPseudoId() from InputFieldSpeechButtonElement and SearchFieldCancelButtonElement
2057         https://bugs.webkit.org/show_bug.cgi?id=135438
2058
2059         Reviewed by Andreas Kling.
2060
2061         Use the generic path.
2062
2063         * html/shadow/TextControlInnerElements.cpp:
2064         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2065         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2066         (WebCore::SearchFieldCancelButtonElement::shadowPseudoId): Deleted.
2067         (WebCore::InputFieldSpeechButtonElement::shadowPseudoId): Deleted.
2068         * html/shadow/TextControlInnerElements.h:
2069
2070 2014-07-30  Andy Estes  <aestes@apple.com>
2071
2072         USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
2073         https://bugs.webkit.org/show_bug.cgi?id=135439
2074
2075         Reviewed by Tim Horton.
2076
2077         We now support two different platform content filters, and will soon support a mock content filter (as part of
2078         webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
2079         library. ENABLE() is the correct macro to use for such a feature.
2080
2081         * Configurations/FeatureDefines.xcconfig:
2082         * WebCore.exp.in:
2083         * loader/DocumentLoader.cpp:
2084         (WebCore::DocumentLoader::finishedLoading):
2085         (WebCore::DocumentLoader::responseReceived):
2086         (WebCore::DocumentLoader::commitData):
2087         (WebCore::DocumentLoader::dataReceived):
2088         * loader/DocumentLoader.h:
2089         * loader/FrameLoaderClient.h:
2090         * platform/ContentFilter.h:
2091         * platform/ios/ContentFilterIOS.mm:
2092         * platform/mac/ContentFilterMac.mm:
2093
2094 2014-07-30  Andreas Kling  <akling@apple.com>
2095
2096         Static hash tables no longer need to be coupled with a VM.
2097         <https://webkit.org/b/135421>
2098
2099         Update for JSC::ClassInfo changes.
2100         
2101         Remove the JSNoStaticTables mode for IDL code generation, which was used to
2102         ensure that each VM had its own unique copy of certain static tables.
2103         This was used for interfaces that could be used in workers, and now there's
2104         no need to manually annotate these things anymore.
2105
2106         Also remove the DOMObjectHashTableMap class that was only used for this.
2107
2108         Reviewed by Geoffrey Garen.
2109
2110         * Modules/indexeddb/IDBAny.idl:
2111         * Modules/indexeddb/IDBCursor.idl:
2112         * Modules/indexeddb/IDBCursorWithValue.idl:
2113         * Modules/indexeddb/IDBDatabase.idl:
2114         * Modules/indexeddb/IDBFactory.idl:
2115         * Modules/indexeddb/IDBIndex.idl:
2116         * Modules/indexeddb/IDBKeyRange.idl:
2117         * Modules/indexeddb/IDBObjectStore.idl:
2118         * Modules/indexeddb/IDBOpenDBRequest.idl:
2119         * Modules/indexeddb/IDBRequest.idl:
2120         * Modules/indexeddb/IDBTransaction.idl:
2121         * Modules/indexeddb/IDBVersionChangeEvent.idl:
2122         * Modules/webdatabase/Database.idl:
2123         * Modules/webdatabase/DatabaseSync.idl:
2124         * Modules/webdatabase/SQLError.idl:
2125         * Modules/webdatabase/SQLException.idl:
2126         * Modules/webdatabase/SQLResultSet.idl:
2127         * Modules/webdatabase/SQLResultSetRowList.idl:
2128         * Modules/webdatabase/SQLTransaction.idl:
2129         * Modules/webdatabase/SQLTransactionSync.idl:
2130         * Modules/websockets/CloseEvent.idl:
2131         * Modules/websockets/WebSocket.idl:
2132         * WebCore.xcodeproj/project.pbxproj:
2133         * bindings/js/DOMObjectHashTableMap.cpp: Removed.
2134         * bindings/js/DOMObjectHashTableMap.h: Removed.
2135         * bindings/js/JSDOMBinding.cpp:
2136         (WebCore::getHashTableForGlobalData): Deleted.
2137         * bindings/js/JSDOMBinding.h:
2138         (WebCore::getStaticValueSlotEntryWithoutCaching):
2139         * bindings/js/JSDOMGlobalObject.cpp:
2140         * bindings/js/JSDOMWindowBase.cpp:
2141         * bindings/js/JSDOMWindowCustom.cpp:
2142         (WebCore::JSDOMWindow::getOwnPropertySlot):
2143         (WebCore::JSDOMWindow::put):
2144         * bindings/js/JSDOMWindowShell.cpp:
2145         * bindings/js/JSImageConstructor.cpp:
2146         * bindings/js/JSLocationCustom.cpp:
2147         (WebCore::JSLocation::putDelegate):
2148         * bindings/js/JSStorageCustom.cpp:
2149         (WebCore::JSStorage::deleteProperty):
2150         (WebCore::JSStorage::putDelegate):
2151         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2152         * bindings/js/WebCoreJSClientData.h:
2153         * bindings/scripts/CodeGeneratorJS.pm:
2154         (GenerateGetOwnPropertySlotBody):
2155         (GenerateImplementation):
2156         (GenerateConstructorHelperMethods):
2157         (hashTableAccessor): Deleted.
2158         (prototypeHashTableAccessor): Deleted.
2159         (constructorHashTableAccessor): Deleted.
2160         * bindings/scripts/IDLAttributes.txt:
2161         * bridge/c/CRuntimeObject.cpp:
2162         * bridge/c/c_instance.cpp:
2163         * bridge/objc/ObjCRuntimeObject.mm:
2164         * bridge/objc/objc_instance.mm:
2165         * bridge/objc/objc_runtime.mm:
2166         * bridge/runtime_array.cpp:
2167         * bridge/runtime_method.cpp:
2168         * bridge/runtime_object.cpp:
2169         * crypto/CryptoKey.idl:
2170         * css/CSSFontFaceLoadEvent.idl:
2171         * dom/DOMCoreException.idl:
2172         * dom/DOMStringList.idl:
2173         * dom/ErrorEvent.idl:
2174         * dom/Event.idl:
2175         * dom/EventException.idl:
2176         * dom/EventListener.idl:
2177         * dom/MessageChannel.idl:
2178         * dom/MessageEvent.idl:
2179         * dom/MessagePort.idl:
2180         * dom/ProgressEvent.idl:
2181         * fileapi/Blob.idl:
2182         * fileapi/File.idl:
2183         * fileapi/FileError.idl:
2184         * fileapi/FileException.idl:
2185         * fileapi/FileList.idl:
2186         * fileapi/FileReader.idl:
2187         * fileapi/FileReaderSync.idl:
2188         * html/DOMURL.idl:
2189         * page/EventSource.idl:
2190         * page/WorkerNavigator.idl:
2191         * workers/DedicatedWorkerGlobalScope.idl:
2192         * workers/SharedWorkerGlobalScope.idl:
2193         * workers/WorkerGlobalScope.idl:
2194         * workers/WorkerLocation.idl:
2195         * xml/XMLHttpRequest.idl:
2196         * xml/XMLHttpRequestException.idl:
2197         * xml/XMLHttpRequestProgressEvent.idl:
2198         * xml/XMLHttpRequestUpload.idl:
2199
2200 2014-07-30  Dan Bernstein  <mitz@apple.com>
2201
2202         <rdar://problem/17199364> [Mac] Popup button arrows appear on the left, underlapping text, when the UI layout direction is right-to-left
2203         https://bugs.webkit.org/show_bug.cgi?id=135426
2204
2205         Reviewed by Dean Jackson.
2206
2207         No test, because the UI layout direction in the test harness is always left-to-right.
2208
2209         * rendering/RenderThemeMac.mm:
2210         (WebCore::RenderThemeMac::popupButton): Forced the user interface layout direction of the
2211         NSPopUpButtonCell to left-to-right. Added a FIXME about how we could make this vary based on
2212         the direction of the <select>, though that would require additional changes elsewhere.
2213
2214 2014-07-30  Dan Bernstein  <mitz@apple.com>
2215
2216         Made Credential hold onto an NSURLCredential when needed.
2217         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
2218
2219         Reviewed by Alexey Proskuryakov.
2220
2221         No change in functionality.
2222
2223         * WebCore.exp.in: Updated.
2224
2225         * platform/network/Credential.h: Removed definition of CERTIFICATE_CREDENTIALS_SUPPORTED,
2226         which is not used anymore.
2227
2228         * platform/network/CredentialBase.h:
2229         (WebCore::CredentialBase::encodingRequiresPlatformData): Added a base implementation that
2230         returns false.
2231
2232         * platform/network/cf/AuthenticationCF.cpp:
2233         Changed to use the Credential constructor that takes an CFURLCredential, and the new
2234         cfCredential member function. Made the createCF and core functions Windows-only and
2235         therefore removed the CERTIFICATE_CREDENTIALS_SUPPORTED code from them.
2236         * platform/network/cf/AuthenticationCF.h:
2237
2238         * platform/network/cf/CredentialStorageCFNet.cpp:
2239         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to construct a Credential
2240         from a CFURLCredential.
2241         (WebCore::CredentialStorage::saveToPersistentStorage): Changed to use the new cfCredential
2242         member function.
2243
2244         * platform/network/cf/ResourceHandleCFNet.cpp:
2245         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto to both.
2246         (WebCore::ResourceHandle::receivedCredential): Ditto.
2247
2248         * platform/network/cocoa/CredentialCocoa.h:
2249         Replaced the m_identity, m_certificates and m_type member variables with an m_nsCredential
2250         one holding onto an NSURLCredential. Declared constructors from and getters for
2251         NSURLCredential and CFURLCredentialRef.
2252         (WebCore::Credential::encodingRequiresPlatformData): Override that checks the
2253         NSURLCredential if necessary.
2254
2255         * platform/network/cocoa/CredentialCocoa.mm:
2256         (WebCore::toNSURLCredentialPersistence): New helper function.
2257         (WebCore::toCredentialPersistence): Ditto.
2258         (WebCore::Credential::Credential): Defined constructors to create or take an
2259         NSURLCredential.
2260         (WebCore::Credential::cfCredential): Added.
2261         (WebCore::Credential::nsCredential): Added. Returns nil for the empty credential.
2262         (WebCore::Credential::isEmpty): Changed to check m_nsCredential.
2263         (WebCore::Credential::platformCompare): Changed to compare m_nsCredential if needed.
2264         (WebCore::Credential::encodingRequiresPlatformData): Returns true if the credential is not
2265         a user and a password.
2266
2267         * platform/network/mac/AuthenticationMac.h: Removed mac and core functions for Credential.
2268         * platform/network/mac/AuthenticationMac.mm:
2269         (-[WebCoreAuthenticationClientAsChallengeSender useCredential:forAuthenticationChallenge:]):
2270         Changed to use Credential constructor that takes an NSURLCredential.
2271         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Ditto. Also use the
2272         nsCredential getter.
2273
2274         * platform/network/mac/CredentialStorageMac.mm:
2275         (WebCore::CredentialStorage::getFromPersistentStorage): Use new Credential constructor.
2276
2277         * platform/network/mac/ResourceHandleMac.mm:
2278         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto. Also use the
2279         nsCredential getter.
2280         (WebCore::ResourceHandle::receivedCredential): Ditto.
2281
2282 2014-07-30  Sergio Villar Senin  <svillar@igalia.com>
2283
2284         [GTK] Build depends on OpenGL ES
2285         https://bugs.webkit.org/show_bug.cgi?id=135289
2286
2287         Reviewed by Martin Robinson.
2288
2289         Guard the OpenGL ES code with USE(OPENGL_ES_2).
2290
2291         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2292         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2293
2294 2014-07-30  Radu Stavila  <stavila@adobe.com>
2295
2296         Member name collision in RenderView and SelectionSubtreeRoot
2297         https://bugs.webkit.org/show_bug.cgi?id=135233
2298
2299         Reviewed by Mihnea Ovidenie.
2300
2301         The selectionStart/End members in RenderView have been renamed to fix confusion caused by the fact that
2302         RenderView inherits SelectionSubtreeRoot, which also has the same selectionStart/End members.
2303
2304         No new tests required, no new functionality.
2305
2306         * rendering/RenderBlock.cpp:
2307         (WebCore::RenderBlock::isSelectionRoot):
2308         * rendering/RenderView.cpp:
2309         (WebCore::RenderView::RenderView):
2310         (WebCore::RenderView::setSelection):
2311         (WebCore::RenderView::getSelection):
2312         * rendering/RenderView.h:
2313
2314 2014-07-30  Zan Dobersek  <zdobersek@igalia.com>
2315
2316         [TexMap] Move TextureMapperLayer::textureMapper() definition into the header
2317         https://bugs.webkit.org/show_bug.cgi?id=135384
2318
2319         Reviewed by Martin Robinson.
2320
2321         Move the definitions of TextureMapperLayer::textureMapper() and TextureMapperLayer::rootLayer()
2322         into the TextureMapperLayer header. This makes both functions inline-able, removing unnecessary
2323         calling overhead in GraphicsLayerTextureMapper::flushCompositingState() and
2324         GraphicsLayerTextureMapper::updateBackingStoreIfNeeded().
2325
2326         TextureMapperLayer::rootLayer() now also returns a reference.
2327
2328         * platform/graphics/texmap/TextureMapperLayer.cpp:
2329         (WebCore::TextureMapperLayer::~TextureMapperLayer):
2330         (WebCore::TextureMapperLayer::rootLayer): Deleted.
2331         (WebCore::TextureMapperLayer::textureMapper): Deleted.
2332         * platform/graphics/texmap/TextureMapperLayer.h:
2333         (WebCore::TextureMapperLayer::textureMapper):
2334         (WebCore::TextureMapperLayer::rootLayer):
2335
2336 2014-07-29  Andreas Kling  <akling@apple.com>
2337
2338         Crash when using 'em' units to specify font-size inside animation keyframe.
2339         <https://webkit.org/b/135395>
2340         <rdar://problem/17851910>
2341
2342         We'd forgotten to initialize the "parent style" when resolving keyframe
2343         styles, and this led to a crash in length conversion where the code
2344         assumes a parent style will be present.
2345
2346         To keep this fix minimal, simply make the "parent style" a clone of the
2347         base element style.
2348
2349         Reviewed by Simon Fraser.
2350
2351         Test: fast/animation/keyframe-with-font-size-in-em-units.html
2352
2353         * css/StyleResolver.cpp:
2354         (WebCore::StyleResolver::styleForKeyframe):
2355
2356 2014-07-29  Pratik Solanki  <psolanki@apple.com>
2357
2358         [iOS] REGRESSION(r171526): PDF documents fail to load in WebKit1 with disk image caching enabled
2359         https://bugs.webkit.org/show_bug.cgi?id=135359
2360         <rdar://problem/17824645>
2361
2362         Reviewed by Darin Adler.
2363
2364         r171526 broke the case where we have a memory mapped file from the DiskImageCache in the
2365         SharedBuffer. In such a case, m_buffer is empty and createCFData() returned an
2366         WebCoreSharedBufferData with an empty buffer.
2367
2368         Fix this by taking the easy route of bringing back the old code for the disk image cache
2369         file backed case. In the long run we probably want to remove the iOS specific disk image
2370         cache anyway.
2371
2372         Review also uncovered another bug in r171526 where we were balancing an Objective-C alloc
2373         with a CFRelease which is incorrect when running under GC. Fix that by using adoptNS along
2374         with adoptCF which is what the code did before.
2375
2376         No new tests because the bug only occurs on device and we can't run tests on device yet.
2377
2378         * platform/mac/SharedBufferMac.mm:
2379         (-[WebCoreSharedBufferData initWithDiskImageSharedBuffer:]):
2380         (-[WebCoreSharedBufferData length]):
2381         (-[WebCoreSharedBufferData bytes]):
2382         (WebCore::SharedBuffer::createCFData):
2383
2384 2014-07-29  Benjamin Poulain  <bpoulain@apple.com>
2385
2386         VisitedLinkState::determineLinkState should take a reference
2387         https://bugs.webkit.org/show_bug.cgi?id=135375
2388
2389         Reviewed by Sam Weinig.
2390
2391         * css/StyleResolver.cpp:
2392         (WebCore::StyleResolver::State::initElement):
2393         * dom/VisitedLinkState.h:
2394         (WebCore::VisitedLinkState::determineLinkState):
2395
2396 2014-07-29  Brady Eidson  <beidson@apple.com>
2397
2398         Make WKOriginDataManager actually operate on IndexedDatabases.
2399         https://bugs.webkit.org/show_bug.cgi?id=135346
2400
2401         Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
2402
2403         * WebCore.exp.in:
2404
2405 2014-07-29  Dan Bernstein  <mitz@apple.com>
2406
2407         Moved the Cocoa-specific parts of CredentialBase into a Cocoa-specific Credential class.
2408         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
2409
2410         Reviewed by Alexey Proskuryakov.
2411
2412         No change in functionality.
2413
2414         * WebCore.exp.in: Updated for functions moved in the class hierarchy.
2415
2416         * WebCore.xcodeproj/project.pbxproj: Added CredentialCocoa.{h,mm}.
2417
2418         * platform/network/Credential.h: For Cocoa, include CredentialCocoa.h instead of the generic
2419         class.
2420         (WebCore::Credential::Credential): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
2421
2422         * platform/network/CredentialBase.cpp:
2423         (WebCore::CredentialBase::CredentialBase): Changed to use emptyString instead of "", removed
2424         #if CERTIFICATE_CREDENTIALS_SUPPORTED code.
2425         (WebCore::CredentialBase::isEmpty): Ditto.
2426         (WebCore::CredentialBase::compare): Renamed operator== to this, removed
2427         #if CERTIFICATE_CREDENTIALS_SUPPORTED code, but changed the end to call platformCompare.
2428         (WebCore::CredentialBase::identity): Deleted.
2429         (WebCore::CredentialBase::certificates): Deleted.
2430         (WebCore::CredentialBase::type): Deleted.
2431         * platform/network/CredentialBase.h: Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED members.
2432         (WebCore::CredentialBase::platformCompare): Added a base implementation that returns true.
2433         (WebCore::operator==): Changed to use CredentialBase::compare.
2434
2435         * platform/network/cocoa/CredentialCocoa.h: Added.
2436         (WebCore::Credential::Credential):
2437         * platform/network/cocoa/CredentialCocoa.mm: Added.
2438         (WebCore::Credential::Credential): Moved the constructor that takes an identity and
2439         certificates here.
2440         (WebCore::Credential::isEmpty): Moved here.
2441         (WebCore::Credential::identity): Ditto.
2442         (WebCore::Credential::certificates): Ditto.
2443         (WebCore::Credential::type): Ditto.
2444         (WebCore::Credential::platformCompare): Moved the code that compares client-certificate
2445         credentials here.
2446
2447         * platform/network/mac/AuthenticationMac.mm:
2448         (WebCore::mac): Removed #if CERTIFICATE_CREDENTIALS_SUPPORTED guards in this Cocoa-only
2449         file.
2450         (WebCore::core): Ditto.
2451
2452 2014-07-29  Daniel Bates  <dabates@apple.com>
2453
2454         Use WTF::move() instead of std::move() to help ensure move semantics
2455         https://bugs.webkit.org/show_bug.cgi?id=135351
2456
2457         Reviewed by Alexey Proskuryakov.
2458
2459         * page/CaptionUserPreferences.cpp:
2460         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
2461
2462 2014-07-29  Mihnea Ovidenie  <mihnea@adobe.com>
2463
2464         [CSSRegions] Assertion failure hit testing a region-based multicolumn in a region
2465         https://bugs.webkit.org/show_bug.cgi?id=135385
2466
2467         Reviewed by Andrei Bucur.
2468
2469         When a region-based multicolumn element is displayed and hit tested in a region,
2470         we have to disable the named flow region information not only for painting,
2471         but also for hit-testing. This is a follow-up for https://bugs.webkit.org/show_bug.cgi?id=132121,
2472         which provided the fix for painting.
2473
2474         Test: fast/regions/assert-hit-test-multicol-in-region.html
2475
2476         * rendering/RenderLayer.cpp:
2477         (WebCore::RenderLayer::hitTestLayer):
2478
2479 2014-07-29  Zalan Bujtas  <zalan@apple.com>
2480
2481         Cleanup RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo.
2482         https://bugs.webkit.org/show_bug.cgi?id=135326
2483
2484         Reviewed by Darin Adler.
2485
2486         1. Move implementation to RenderSelectInfo.cpp
2487         2. RenderSelectionInfoBase/RenderSelectionInfo/RenderBlockSelectionInfo take Render* reference.
2488         3. Remove unused functions.
2489         4. Add RenderSelectionInfoBase::repaintRectangle()
2490
2491         No change in behavior.
2492
2493         * WebCore.xcodeproj/project.pbxproj:
2494         * rendering/RenderSelectionInfo.cpp: Added.
2495         (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
2496         (WebCore::RenderSelectionInfoBase::repaintRectangle):
2497         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
2498         (WebCore::RenderSelectionInfo::repaint):
2499         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
2500         (WebCore::RenderBlockSelectionInfo::repaint):
2501         * rendering/RenderSelectionInfo.h:
2502         (WebCore::RenderSelectionInfo::collectedSelectionRects):
2503         (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase): Deleted.
2504         (WebCore::RenderSelectionInfoBase::object): Deleted.
2505         (WebCore::RenderSelectionInfo::RenderSelectionInfo): Deleted.
2506         (WebCore::RenderSelectionInfo::repaint): Deleted.
2507         (WebCore::RenderSelectionInfo::rects): Deleted.
2508         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo): Deleted.
2509         (WebCore::RenderBlockSelectionInfo::repaint): Deleted.
2510         (WebCore::RenderBlockSelectionInfo::block): Deleted.
2511         * rendering/RenderView.cpp:
2512         (WebCore::RenderView::subtreeSelectionBounds):
2513         (WebCore::RenderView::repaintSubtreeSelection):
2514         (WebCore::RenderView::clearSubtreeSelection):
2515         (WebCore::RenderView::applySubtreeSelection):
2516
2517 2014-07-28  Pratik Solanki  <psolanki@apple.com>
2518
2519         Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
2520         https://bugs.webkit.org/show_bug.cgi?id=131782
2521
2522         Original patch by Tim Horton.
2523         Reviewed by Darin Adler.
2524
2525         No new tests because no functional changes.
2526
2527         * Modules/indexeddb/IDBCallbacks.h:
2528         * Modules/indexeddb/IDBCursorBackend.h:
2529         * loader/ios/DiskImageCacheIOS.h:
2530         Forward declare SharedBuffer in headers.
2531
2532         * Modules/indexeddb/IDBRequest.cpp:
2533         * loader/cache/CachedImage.cpp:
2534         * loader/icon/IconLoader.cpp:
2535         * loader/ios/DiskImageCacheIOS.mm:
2536         * loader/cache/MemoryCache.cpp:
2537         * loader/mac/ResourceBuffer.mm:
2538         Include SharedBuffer.h in implementation files.
2539
2540         * Modules/notifications/Notification.h:
2541         * loader/appcache/ApplicationCacheGroup.h:
2542         Remove unnecessary includes.
2543
2544         * loader/ResourceBuffer.cpp:
2545         (WebCore::ResourceBuffer::adoptSharedBuffer):
2546         * loader/ResourceBuffer.h:
2547         Out-of-line adoptSharedBuffer so that the PassRefPtr doesn't require including SharedBuffer.h.
2548
2549         * platform/graphics/opentype/OpenTypeMathData.cpp:
2550         * platform/graphics/opentype/OpenTypeMathData.h:
2551         Out-of-line destructor to avoid requiring SharedBuffer.h for the RefPtr.
2552         Forward-declare SharedBuffer in the header, include in implementation.
2553
2554 2014-07-29  Zan Dobersek  <zdobersek@igalia.com>
2555
2556         [TexMap] GraphicsLayerTextureMapper::addAnimation() box size parameter should be FloatSize
2557         https://bugs.webkit.org/show_bug.cgi?id=135237
2558
2559         Reviewed by Martin Robinson.
2560
2561         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2562         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2563         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: The boxSize parameter of the
2564         addAnimation() method must be of the same type as the parameter in the base class
2565         declaration -- a const FloatSize reference. Only then is the base virtual method
2566         actually overriden.
2567
2568 2014-07-28  Dan Bernstein  <mitz@apple.com>
2569
2570         iOS build fix.
2571
2572         * WebCore.exp.in:
2573
2574 2014-07-28  Dan Bernstein  <mitz@apple.com>
2575
2576         Introduced CredentialBase and made Credential derive from it
2577         Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
2578
2579         Reviewed by Darin Adler.
2580
2581         No change in functionality.
2582
2583         * CMakeLists.txt: Updated for source file rename.
2584
2585         * WebCore.exp.in: Changed to export CredentialBase symbols.
2586
2587         * WebCore.vcxproj/WebCore.vcxproj: Updated for source file rename and new header.
2588         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2589
2590         * WebCore.xcodeproj/project.pbxproj: Ditto.
2591
2592         * platform/network/Credential.cpp: Renamed to CredentialBase.cpp.
2593
2594         * platform/network/Credential.h: Defined Credential to derive from CredentialBase.
2595
2596         * platform/network/CredentialBase.cpp: Renamed Credential.cpp to this. Updated for the new
2597         name.
2598
2599         * platform/network/CredentialBase.h: Copied from Credential.h, renamed the class to
2600         CredentialBase, and made the constructors protected.
2601
2602 2014-07-28  Zalan Bujtas  <zalan@apple.com>
2603
2604         REGRESSION(r164133): Selection disappears after scrolling on nytimes.com
2605         https://bugs.webkit.org/show_bug.cgi?id=135361
2606
2607         Reviewed by Ryosuke Niwa.
2608
2609         Ensure that when a RenderElement, part of the current selection is removed,
2610         we recalculate and update the selection soon after layout.
2611
2612         Test: fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html
2613
2614         * editing/FrameSelection.cpp:
2615         (WebCore::FrameSelection::setNeedsSelectionUpdate):
2616         (WebCore::FrameSelection::didLayout): didLayout name reflects its functionality better.
2617         (WebCore::FrameSelection::layoutDidChange): Deleted.
2618         * editing/FrameSelection.h: : move some functions to private.
2619         * page/FrameView.cpp:
2620         (WebCore::FrameView::performPostLayoutTasks):
2621         * rendering/RenderBlockFlow.cpp:
2622         (WebCore::RenderBlockFlow::willBeDestroyed):
2623         * rendering/RenderElement.cpp:
2624         (WebCore::RenderElement::removeChildInternal):
2625         * rendering/RenderInline.cpp:
2626         (WebCore::RenderInline::willBeDestroyed):
2627
2628 2014-07-28  Dean Jackson  <dino@apple.com>
2629
2630         [Media iOS] Touching play button feels unresponsive
2631         https://bugs.webkit.org/show_bug.cgi?id=135370
2632         <rdar://problem/17756281>
2633
2634         Reviewed by Simon Fraser.
2635
2636         Add an :active rule that shows a slightly darker button when touched.
2637
2638         * Modules/mediacontrols/mediaControlsiOS.css:
2639         (audio::-webkit-media-controls-start-playback-button:active):
2640
2641 2014-07-28  Brady Eidson  <beidson@apple.com>
2642
2643         REGRESSION(168376): Standalone images pasted to Outlook 2011 don't display
2644         <rdar://problem/17768371> and https://bugs.webkit.org/show_bug.cgi?id=135363
2645
2646         Reviewed by Tim Horton.
2647
2648         Outlook isn’t prepared to handle the resource load callbacks when sent synchronously.
2649
2650         r168376 was an optimization that we no longer need, so the simplest fix is to roll it out.
2651
2652         * editing/mac/EditorMac.mm:
2653         (WebCore::Editor::WebContentReader::readImage):
2654
2655         * loader/archive/ArchiveResource.cpp:
2656         (WebCore::ArchiveResource::ArchiveResource):
2657         * loader/archive/ArchiveResource.h:
2658         (WebCore::ArchiveResource::setShouldLoadImmediately): Deleted.
2659         (WebCore::ArchiveResource::shouldLoadImmediately): Deleted.
2660
2661         * loader/cache/CachedResourceLoader.cpp:
2662         (WebCore::CachedResourceLoader::requestResource):
2663
2664 2014-07-28  Mark Hahnenberg  <mhahnenberg@apple.com>
2665
2666         ASSERTION FAILED: m_heap->vm()->currentThreadIsHoldingAPILock()
2667         https://bugs.webkit.org/show_bug.cgi?id=135352
2668
2669         Reviewed by Oliver Hunt.
2670
2671         * Modules/plugins/QuickTimePluginReplacement.mm:
2672         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): This should be taking a 
2673         JSLock like its sibling methods do (e.g. installReplacement).
2674
2675 2014-07-28  Antti Koivisto  <antti@apple.com>
2676
2677         <embed> videos flashes constantly while playing inline on iPad, making it unwatchable
2678         https://bugs.webkit.org/show_bug.cgi?id=135356
2679         <rdar://problem/16828238>
2680
2681         Reviewed by Simon Fraser.
2682         
2683         The shadow tree for media controls is scheduling style recalc. The general silliness of
2684         HTMLPlugInImageElement::willRecalcStyle/willDetachRenderers is turning those into render
2685         tree reconstructions causing flicker.
2686
2687         * html/HTMLPlugInImageElement.cpp:
2688         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2689         
2690             Don't do the forced renderer reconstruction if there is no style change for the element
2691             or its ancestors. This way recalcs scheduled by the shadow tree don't trigger the widget
2692             update code path.
2693
2694 2014-07-27  Brent Fulgham  <bfulgham@apple.com>
2695
2696         [Mac, iOS] Paint-on closed captions get out-of-order in Safari
2697         https://bugs.webkit.org/show_bug.cgi?id=135332
2698         <rdar://problem/15317278>
2699
2700         Reviewed by Jer Noble.
2701
2702         * html/shadow/MediaControlElements.cpp:
2703         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): If the
2704         number of active cues is greater than the current set of CSS boxes representing
2705         the cues, throw away the CSS boxes and re-layout all the cues.
2706         * html/track/InbandGenericTextTrack.cpp:
2707         (WebCore::InbandGenericTextTrack::addGenericCue): Add some logging.
2708         (WebCore::InbandGenericTextTrack::removeGenericCue): Ditto.
2709         * html/track/TextTrackCueGeneric.cpp:
2710         (WebCore::TextTrackCueGeneric::isOrderedBefore): Revise ordering rules so that we put
2711         newer cues earlier in the layout order so they are drawn towards the bottom
2712         of the screen. Only do this for Generic captions.
2713         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2714         (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Adjust logging
2715         messages.
2716         (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Add logging.
2717
2718 2014-07-28  Andreas Kling  <akling@apple.com>
2719
2720         REGRESSION (r160806): CSS zoom property doesn't work on anything inside anchors.
2721         <https://webkit.org/b/135344>
2722         <rdar://problem/17759577>
2723
2724         When DeprecatedStyleBuilder applies the CSS zoom property (ApplyPropertyZoom)
2725         it first resets the "effective zoom" by calling RenderStyle::setEffectiveZoom().
2726
2727         This mechanism was not resistent to being called multiple times, due to the
2728         optimization in RenderStyle::setZoom() to avoid copy-on-writing the shared data
2729         when setting some property to the already-set value.
2730
2731         The bug would happen in this sequence:
2732
2733         ApplyPropertyZoom:
2734             - setEffectiveZoom(1);
2735             - setZoom(2); // this updates the effective zoom
2736         ApplyPropertyZoom:
2737             - setEffectiveZoom(1);
2738             - setZoom(2); // this doesn't update the effective zoom
2739
2740         When we run the second setZoom(2); call, the RenderStyle's zoom value is 2
2741         already and we'll early return without updating the effective zoom.
2742
2743         This change moves the updating of the effective zoom in setZoom() to take place
2744         before the early return due to overwriting with the same value.
2745
2746         Note: the fact that we're apply the zoom property twice is an inefficiency that
2747         we should figure out a way to avoid in the future.
2748
2749         Reviewed by Simon Fraser.
2750
2751         Test: fast/css/zoom-inside-link.html
2752
2753         * rendering/style/RenderStyle.h:
2754         (WebCore::RenderStyle::setZoom):
2755
2756 2014-07-28  Bear Travis  <betravis@adobe.com>
2757
2758         [CSS Font Loading] Update Font Loading Code
2759         https://bugs.webkit.org/show_bug.cgi?id=135340
2760
2761         Reviewed by Antti Koivisto.
2762
2763         Update the Font Loading code to build again, as trunk has evolved
2764         since the feature was originally written. Mostly, this requires
2765         updating the code to work with the new Font representation.
2766
2767         The original tests were enabled only for the Chromium port.
2768         They will need to be updated when the feature is enabled by default.
2769
2770         * WebCore.xcodeproj/project.pbxproj: Add missing files.
2771         * css/FontLoader.cpp: Update to new Font representation.
2772         (WebCore::LoadFontCallback::createFromParams):
2773         (WebCore::LoadFontCallback::~LoadFontCallback):
2774         (WebCore::FontLoader::loadFont):
2775         (WebCore::FontLoader::checkFont):
2776         (WebCore::applyPropertyToCurrentStyle):
2777         (WebCore::FontLoader::resolveFontStyle):
2778
2779 2014-07-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2780
2781         Let WheelEvent wrap a PlatformWheelEvent
2782         https://bugs.webkit.org/show_bug.cgi?id=135244
2783
2784         WheelEvent now wraps a PlatformWheelEvent. m_directionInvertedFromDevice, as well as m_phase and m_momentumPhase
2785         have been removed, since the information is redundant in PlatformWheelEvent. Note that deltaX and deltaY have
2786         NOT been replaced, since we need double precision instead of float precision.
2787
2788         Reviewed by Beth Dakin.
2789
2790         No new tests, since behavior should not have changed.
2791
2792         * dom/WheelEvent.cpp:
2793         (WebCore::WheelEvent::WheelEvent):
2794         (WebCore::WheelEvent::initWheelEvent):
2795         * dom/WheelEvent.h:
2796         (WebCore::WheelEvent::wheelEvent): Returns a non-null pointer to the PlatformWheelEvent iff WheelEvent was initialized by PlatformWheelEvent.
2797         (WebCore::WheelEvent::webkitDirectionInvertedFromDevice): Updated to use PlatformWheelEvent.
2798         (WebCore::WheelEvent::phase): Updated to use PlatformWheelEvent.
2799         (WebCore::WheelEvent::momentumPhase): Updated to use PlatformWheelEvent.
2800
2801 2014-07-28  Brent Fulgham  <bfulgham@apple.com>
2802
2803         Unreviewed 'merge' fix.
2804
2805         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2806         Correct line endings to allow EWS merges again.
2807
2808 2014-07-28  Zoltan Horvath  <zoltan@webkit.org>
2809
2810         [CSS3-Text] Adjust text-justify implementation to the latest spec
2811         https://bugs.webkit.org/show_bug.cgi?id=135317
2812
2813         Reviewed by Darin Adler.
2814
2815         Text-justify no longer accepts the following values: Inter-ideograph, inter-
2816         cluster, and kashida. This patch removes them and updates the tests as well.
2817
2818         [1] http://dev.w3.org/csswg/css-text-3/#propdef-text-justify
2819
2820         Updated existing tests.
2821
2822         * css/CSSParser.cpp:
2823         (WebCore::isValidKeywordPropertyAndValue):
2824         * css/CSSPrimitiveValueMappings.h:
2825         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2826         (WebCore::CSSPrimitiveValue::operator TextJustify):
2827         * css/CSSValueKeywords.in:
2828         * rendering/style/RenderStyle.cpp:
2829         (WebCore::RenderStyle::changeRequiresLayout):
2830         * rendering/style/RenderStyleConstants.h:
2831         * rendering/style/StyleRareInheritedData.h:
2832
2833 2014-07-28  Radu Stavila  <stavila@adobe.com>
2834
2835         REGRESSION (r169105): Crash in selection
2836         https://bugs.webkit.org/show_bug.cgi?id=134303
2837
2838         Reviewed by Mihnea Ovidenie.
2839
2840         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
2841         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
2842         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
2843         we get inconsistent data.
2844
2845         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
2846         method first iterates through all subtrees and performs the "clear" method and then starts all over again
2847         and performs the "apply" method.
2848
2849         Test: fast/regions/selection/crash-deselect.html
2850
2851         * WebCore.xcodeproj/project.pbxproj:
2852         * rendering/RenderSelectionInfo.h:
2853         * rendering/RenderView.cpp:
2854         (WebCore::RenderView::setSelection):
2855         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2856         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
2857         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
2858         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
2859         (WebCore::RenderView::setSubtreeSelection): Deleted.
2860         * rendering/RenderView.h:
2861         * rendering/SelectionSubtreeRoot.cpp:
2862         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
2863         * rendering/SelectionSubtreeRoot.h:
2864         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
2865
2866 2014-07-28  Yusuke Suzuki  <utatane.tea@gmail.com>
2867
2868         CSS: Fix :visited behavior for SubSelectors
2869         https://bugs.webkit.org/show_bug.cgi?id=135324
2870
2871         Reviewed by Benjamin Poulain.
2872
2873         Disable :visited match for the selectors that has SubSelectors.
2874
2875         Tests: fast/history/nested-visited-test-complex.html
2876                fast/history/sibling-visited-test-complex.html
2877
2878         * css/SelectorChecker.cpp:
2879         (WebCore::SelectorChecker::matchRecursively):
2880
2881 2014-07-27  Ryuan Choi  <ryuan.choi@samsung.com>
2882
2883         Remove GraphicsSurfaceGLX.cpp
2884         https://bugs.webkit.org/show_bug.cgi?id=135279
2885
2886         Reviewed by Darin Adler.
2887
2888         GraphicsSurfaceGLX.cpp is not used since Qt dropped and Efl port changed at r146458
2889
2890         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: Removed.
2891
2892 2014-07-27  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
2893
2894         Support for :enabled selector on Anchor & Area elements
2895         https://bugs.webkit.org/show_bug.cgi?id=134826
2896
2897         Reviewed by Darin Adler.
2898
2899         Updates the PseudoClassEnabled selector checker to check for Anchor & Area
2900         elements with a 'href' attribute.
2901
2902         Spec: http://html.spec.whatwg.org/#selector-enabled
2903
2904         Test: fast/css/css-selector-enabled-links.html
2905
2906         * css/SelectorCheckerTestFunctions.h:
2907         (WebCore::isEnabled): Added check for anchor & area elements.
2908
2909 2014-07-27  Daniel Bates  <dabates@apple.com>
2910
2911         [WK2] Crash when accessing window.localStorage after calling window.close()
2912         https://bugs.webkit.org/show_bug.cgi?id=135328
2913         <rdar://problem/17315237>
2914
2915         Reviewed by Sam Weinig.
2916
2917         Fixes an issue where accessing local storage for the first time after calling window.close()
2918         causes a crash.
2919
2920         For now, we should disallow accessing local storage after calling window.close() regardless of
2921         whether it's the first access to local storage as this seems like a bad idiom to support. Note,
2922         this represents a change in behavior from WebKit1. If such usage of window.localStorage turns
2923         out to be reasonable then we can visit this decision again in <https://bugs.webkit.org/show_bug.cgi?id=135330>.
2924
2925         Tests: storage/domstorage/localstorage/access-storage-after-window-close.html
2926                storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html
2927                storage/domstorage/localstorage/set-value-in-storage-after-window-close.html
2928
2929         * page/DOMWindow.cpp:
2930         (WebCore::DOMWindow::localStorage): Modified to only return the cached local storage or
2931         create a new local storage so long as the page isn't being closed. Also, substitute nullptr
2932         for 0.
2933         (WebCore::DOMWindow::close): Call Page::setIsClosing() to mark that the page is closing.
2934         * page/Page.cpp:
2935         (WebCore::Page::Page): Initialize m_isClosing to false.
2936         * page/Page.h:
2937         (WebCore::Page::setIsClosing): Added.
2938         (WebCore::Page::isClosing): Added.
2939
2940 2014-07-27  Filip Pizlo  <fpizlo@apple.com>
2941
2942         Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
2943         
2944         This fixes the previous mismerge and adds test coverage for the thing that went wrong.
2945         Also, this adds some helpers for making it easier to inspect JavaScript values.
2946
2947         * testing/Internals.cpp:
2948         (WebCore::Internals::description):
2949         * testing/Internals.h:
2950         * testing/Internals.idl:
2951
2952     2014-07-25  Mark Lam  <mark.lam@apple.com>
2953     
2954             [ftlopt] Renamed DebuggerActivation to DebuggerScope.
2955             <https://webkit.org/b/134273>
2956     
2957             Reviewed by Michael Saboff.
2958     
2959             No new tests.
2960     
2961             * ForwardingHeaders/debugger/DebuggerActivation.h: Removed.
2962             - Removed because this is not used.
2963     
2964 2014-07-26  Brian J. Burg  <burg@cs.washington.edu>
2965
2966         Web Replay: log and enforce session/segment state machine transitions
2967         https://bugs.webkit.org/show_bug.cgi?id=135224
2968
2969         Reviewed by Timothy Hatcher.
2970
2971         For debugging purposes, log session and segment state transitions.
2972         Assert that segment state transitions are valid.
2973
2974         No new tests. No behavior was changed.
2975
2976         * replay/ReplayController.cpp:
2977         (WebCore::logDispatchedDOMEvent):
2978         (WebCore::sessionStateToString):
2979         (WebCore::segmentStateToString):
2980         (WebCore::ReplayController::setSessionState):
2981         (WebCore::ReplayController::setSegmentState):
2982         (WebCore::ReplayController::createSegment):
2983         (WebCore::ReplayController::completeSegment): Remove a wrong state transition.
2984         (WebCore::ReplayController::loadSegmentAtIndex):
2985         (WebCore::ReplayController::unloadSegment): Fix a now-erroneous assertion.
2986         (WebCore::ReplayController::startPlayback):
2987         (WebCore::ReplayController::pausePlayback):
2988         (WebCore::ReplayController::willDispatchEvent):
2989         (WebCore::ReplayController::cancelPlayback):
2990         * replay/ReplayController.h:
2991
2992 2014-07-26  Filip Pizlo  <fpizlo@apple.com>
2993
2994         Unreviewed, roll out r171641-r171644. It broke some tests; will investigate and
2995         reland later.
2996
2997         * ForwardingHeaders/debugger/DebuggerActivation.h: Added.
2998
2999 2014-07-26  Timothy Horton  <timothy_horton@apple.com>
3000
3001         Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
3002         https://bugs.webkit.org/show_bug.cgi?id=135319
3003         <rdar://problem/17315168>
3004
3005         Reviewed by Darin Adler and Antti Koivisto.
3006
3007         * dom/Document.h:
3008         * dom/Document.cpp:
3009         (WebCore::Document::Document):
3010         (WebCore::Document::prepareForDestruction):
3011         Add a flag on Document, m_hasPreparedForDestruction, which ensures
3012         that each Document only goes through prepareForDestruction() once.
3013         prepareForDestruction() can be called a number of times during teardown,
3014         but it's only necessary to actually execute it once.
3015         
3016         This was previously achieved by virtue of all callers of prepareForDestruction()
3017         first checking hasLivingRenderTree, and prepareForDestruction() tearing down
3018         the render tree, but that meant that prepareForDestruction() was not called
3019         for Documents who never had a render tree in the first place.
3020
3021         The only part of prepareForDestruction() that is now predicated on hasLivingRenderTree()
3022         is the call to destroyRenderTree(); the rest of the function has the potential to be relevant
3023         for non-rendered placeholder documents and can safely deal with them in other ways.
3024
3025         It is important to call prepareForDestruction() on non-rendered placeholder documents
3026         because some of the cleanup (like disconnectFromFrame()) is critical to safe destruction.
3027
3028         * loader/FrameLoader.cpp:
3029         (WebCore::FrameLoader::clear):
3030         Call prepareForDestruction() even if we don't have a living render tree.
3031         For the sake of minimizing change, removeFocusedNodeOfSubtree still
3032         depends on having a living render tree before calling prepareForDestruction().
3033
3034         * page/Frame.cpp:
3035         (WebCore::Frame::setView):
3036         (WebCore::Frame::setDocument):
3037         Call prepareForDestruction() even if we don't have a living render tree.
3038
3039 2014-07-25  Filip Pizlo  <fpizlo@apple.com>
3040
3041         Merge r170090, r170092, r170129, r170141, r170161, r170215, r170275, r170375, r170376, r170382, r170383, r170399, r170436, r170489, r170490, r170556 from ftlopt.
3042
3043     2014-07-25  Mark Lam  <mark.lam@apple.com>
3044     
3045             [ftlopt] Renamed DebuggerActivation to DebuggerScope.
3046             <https://webkit.org/b/134273>
3047     
3048             Reviewed by Michael Saboff.
3049     
3050             No new tests.
3051     
3052             * ForwardingHeaders/debugger/DebuggerActivation.h: Removed.
3053             - Removed because this is not used.
3054     
3055 2014-07-25  Zalan Bujtas  <zalan@apple.com>
3056
3057         Subpixel rendering: Rounded rect gets non-renderable at certain subpixel size.
3058         https://bugs.webkit.org/show_bug.cgi?id=135314
3059         <rdar://problem/17812921>
3060
3061         Reviewed by Tim Horton.
3062
3063         While calculating the rounded rect for painting, the radius is adjusted to compensate
3064         for the pixel snapped size. However while scaling the radius, certain values overflow
3065         (float) mantissa and it produces a non-renderable rounded rect where the radius becomes bigger
3066         than the rectangle dimensions. In such cases, we need to shrink the radius to make it
3067         renderable again.
3068
3069         Test: transitions/rounded-rect-becomes-non-renderable-while-transitioning.html
3070
3071         * platform/graphics/RoundedRect.cpp:
3072         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting): shrink the radius by
3073         one device pixel. It is as good as any other small value.
3074
3075 2014-07-25  Jer Noble  <jer.noble@apple.com>
3076
3077         [EME][Mac] CDM error messages not piped through to MediaKeySession correctly; clients don't receive error events
3078         https://bugs.webkit.org/show_bug.cgi?id=135312
3079         <rdar://problem/17817223>
3080
3081         Reviewed by Brent Fulgham.
3082
3083         Set (and clear) the client interface so that errors can be piped from the CDMSession up to the MediaKeySession.
3084
3085         * Modules/encryptedmedia/MediaKeySession.cpp:
3086         (WebCore::MediaKeySession::MediaKeySession):
3087         (WebCore::MediaKeySession::close):
3088
3089 2014-07-25  Jer Noble  <jer.noble@apple.com>
3090
3091         [MSE] Playback stalls & readyState drops to HAVE_CURRENT_DATA at end of stream with unbalanced buffered SourceBuffers
3092         https://bugs.webkit.org/show_bug.cgi?id=135291
3093         <rdar://problem/17715503>
3094
3095         Reviewed by Sam Weinig.
3096
3097         Test: media/media-source/media-source-end-of-stream-buffered.html
3098
3099         When determining the correct ReadyState for the MediaSource in monitorSourceBuffers(), use the same
3100         definition of "buffered" as is used in the calculation of HTMLMediaElement.buffered and in the
3101         Stream Ended algorithm. Namely, when the stream has ended, treat each SourceBuffer as if its last
3102         buffered range extends to the duration of the stream. This allows playback to continue through to
3103         the duration without stalling due to monitorSourceBuffers().
3104
3105         * Modules/mediasource/SourceBuffer.cpp:
3106         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream): Added; extends the last range in buffered
3107             to MediaSource::duration() if the MediaSource is ended.
3108         (WebCore::SourceBuffer::hasCurrentTime): Uses bufferedAccountingForEndOfStream().
3109         (WebCore::SourceBuffer::hasFutureTime): Ditto.
3110         (WebCore::SourceBuffer::canPlayThrough): Ditto.
3111         * Modules/mediasource/SourceBuffer.h:
3112
3113         Add a convenience method for determining whether the MediaSource has ended:
3114         * Modules/mediasource/MediaSource.cpp:
3115         (WebCore::MediaSource::isEnded):
3116         * Modules/mediasource/MediaSource.h:
3117
3118         Add start() and end() methods that don't take a (usually ignored) isValid inout parameter. Add duration()
3119         and maximumBufferedTime() convenience methods:
3120         * platform/graphics/PlatformTimeRanges.cpp:
3121         (WebCore::PlatformTimeRanges::start):
3122         (WebCore::PlatformTimeRanges::end):
3123         (WebCore::PlatformTimeRanges::duration):
3124         (WebCore::PlatformTimeRanges::maximumBufferedTime):
3125         * platform/graphics/PlatformTimeRanges.h:
3126
3127 2014-07-25  Pratik Solanki  <psolanki@apple.com>
3128
3129         [iOS] REGRESSION(r171526): Images fail to load sometimes
3130         https://bugs.webkit.org/show_bug.cgi?id=135304
3131         <rdar://problem/17811922>
3132
3133         Reviewed by Alexey Proskuryakov.
3134
3135         SharedBuffer::createCFData() calls data() as a way to coalesce the data array elements and
3136         segments into m_buffer. However, data() has an optimization where if we had a single element
3137         in the data array, it would just return that and not do coalescing. So when we passed
3138         m_buffer to WebCoreSharedData, we passed a buffer with no data in it.
3139
3140         Fix this by bringing the optimization to createCFData() and return the CFDataRef from the
3141         data array if we just have a single element.
3142
3143         No new tests. Should be covered by existing tests.
3144
3145         * platform/mac/SharedBufferMac.mm:
3146         (WebCore::SharedBuffer::createCFData):
3147
3148 2014-07-25  Jer Noble  <jer.noble@apple.com>
3149
3150         [MSE] High CPU usage in SampleMap::findSamplesWithinPresentationRange() with a large number of buffered samples.
3151         https://bugs.webkit.org/show_bug.cgi?id=135247
3152
3153         Reviewed by Geoffrey Garen.
3154
3155         Anchor our search for overlapping frames to the end of the search range when the overlap range is sufficiently
3156         close to the end of the search range. The common case for this search is when a sample is about to be appended
3157         to the end of the sample queue, so this should turn most searches into no-ops.
3158
3159         * Modules/mediasource/SampleMap.cpp:
3160         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
3161         * Modules/mediasource/SampleMap.h:
3162         * Modules/mediasource/SourceBuffer.cpp:
3163         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3164
3165 2014-07-25  Gavin Barraclough  <baraclough@apple.com>
3166
3167         Yosemite version number is 101000
3168         https://bugs.webkit.org/show_bug.cgi?id=135301
3169
3170         Reviewed by Sam Weinig.
3171
3172         * WebCore.exp.in:
3173         * platform/ContentFilter.h:
3174         * platform/mac/ScrollViewMac.mm:
3175         (WebCore::ScrollView::platformVisibleContentRect):
3176         * platform/mac/ThemeMac.mm:
3177         (WebCore::updateStates):
3178         (WebCore::paintToggleButton):
3179         * platform/network/cf/CookieJarCFNet.cpp:
3180         (WebCore::copyCookiesForURLWithFirstPartyURL):
3181         * platform/network/cf/ResourceRequest.h:
3182         (WebCore::ResourceRequest::resourcePrioritiesEnabled):
3183         * rendering/RenderThemeMac.mm:
3184         (WebCore::RenderThemeMac::search):
3185
3186 2014-07-25  David Hyatt  <hyatt@apple.com>
3187
3188         [New Multicolumn] RenderViews paginated as RL or LR don't handle percentage widths correctly.
3189         REGRESSION: Images don’t scale to fit in page in vertical text books
3190
3191         https://bugs.webkit.org/show_bug.cgi?id=135204
3192         <rdar://problem/17043792>
3193         
3194         Reviewed by Simon Fraser.
3195
3196         Added fast/multicol/pagination/RightToLeft-max-width.html
3197
3198         * rendering/RenderView.cpp:
3199         (WebCore::RenderView::availableLogicalHeight):
3200         Put back in the same code that used to exist for the old columns (but ported to the new
3201         columns).
3202     
3203 2014-07-25  Dan Bernstein  <mitz@apple.com>
3204
3205         [Mac] Unneeded MobileMe workaround in ResourceHandle::receivedCredential
3206         https://bugs.webkit.org/show_bug.cgi?id=135297
3207
3208         Reviewed by Alexey Proskuryakov.
3209
3210         * platform/network/mac/ResourceHandleMac.mm:
3211         (WebCore::ResourceHandle::receivedCredential): Removed the site-specific behavior for
3212         gallery.me.com.
3213
3214 2014-07-25  Commit Queue  <commit-queue@webkit.org>
3215
3216         Unreviewed, rolling out r171480.
3217         https://bugs.webkit.org/show_bug.cgi?id=135300
3218
3219         it broke replaced elements in pagination (Requested by dhyatt_
3220         on #webkit).
3221
3222         Reverted changeset:
3223
3224         "Ensure we compute the min and max height of replaced elements
3225         to 'none' or 0 when appropriate."
3226         https://bugs.webkit.org/show_bug.cgi?id=135181
3227         http://trac.webkit.org/changeset/171480
3228
3229 2014-07-25  Commit Queue  <commit-queue@webkit.org>
3230
3231         Unreviewed, rolling out r171587.
3232         https://bugs.webkit.org/show_bug.cgi?id=135294
3233
3234         Made fast/dom/HTMLObjectElement/beforeload-set-text-
3235         crash.xhtml crash again (Requested by ap on #webkit).
3236
3237         Reverted changeset:
3238
3239         "REGRESSION (r169105): Crash in selection"
3240         https://bugs.webkit.org/show_bug.cgi?id=134303
3241         http://trac.webkit.org/changeset/171587
3242
3243 2014-07-25  Dan Bernstein  <mitz@apple.com>
3244
3245         ResourceErrorBase::compare doesn’t call the right platformCompare override
3246         https://bugs.webkit.org/show_bug.cgi?id=135240
3247
3248         Reviewed by Alexey Proskuryakov.
3249
3250         * platform/network/ResourceErrorBase.cpp:
3251         (WebCore::ResourceErrorBase::compare): Changed to call ResourceError::platformCompare.
3252         * platform/network/cf/ResourceError.h: Made platformCompare public.
3253         * platform/network/soup/ResourceError.h: Ditto.
3254
3255 2014-07-25  Dan Bernstein  <mitz@apple.com>
3256
3257         [Cocoa] WebProtectionSpace::receivesCredentialSecurely incorrectly returns false in some cases
3258         https://bugs.webkit.org/show_bug.cgi?id=135241
3259
3260         Reviewed by Alexey Proskuryakov.
3261
3262         * WebCore.exp.in: Export ProtectionSpace::receivesCredentialSecurely.
3263
3264         * platform/network/cocoa/ProtectionSpaceCocoa.h: Declare override of receivesCredentialSecurely.
3265         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
3266         (WebCore::ProtectionSpace::receivesCredentialSecurely): Use -[NSURLProtectionSpace receivesCredentialSecurely].
3267
3268 2014-07-25  Zalan Bujtas  <zalan@apple.com>
3269
3270         Subpixel rendering: iOS video playback controls look blurry.
3271         https://bugs.webkit.org/show_bug.cgi?id=135245
3272         <rdar://problem/16878037>
3273
3274         Reviewed by Simon Fraser.
3275
3276         This patch introduces a compositing parent of the overlay control panel so that
3277         the transformed overlay panel becomes sharp. This is a workaround for webkit.org/b/135246.
3278
3279         Can't find a way to test it yet.
3280
3281         * Modules/mediacontrols/mediaControlsApple.css:
3282         (video::-webkit-media-controls-panel-composited-parent):
3283         * Modules/mediacontrols/mediaControlsApple.js:
3284         (Controller.prototype.createControls):
3285         (Controller.prototype.addControls):
3286         * Modules/mediacontrols/mediaControlsiOS.css:
3287         (video::-webkit-media-controls-panel-composited-parent):
3288         * Modules/mediacontrols/mediaControlsiOS.js: This is a workaround for webkit.org/b/135248
3289         It pushes the overlay panel down to close the gap with the video element. Since the
3290         panel's size in css pixels is scale dependent, the gap needs to be scale dependent too.
3291         (ControllerIOS.prototype.set pageScaleFactor):
3292
3293 2014-07-24  Dirk Schulze  <krit@webkit.org>
3294
3295         Turn x/y to presentation attributes
3296         https://bugs.webkit.org/show_bug.cgi?id=135215
3297
3298         Reviewed by Dean Jackson.
3299
3300         This follows the patch for width and height presentation attributes and
3301         turns x and y to presentation attributes as well:
3302
3303         http://trac.webkit.org/changeset/171341
3304
3305         Tests: svg/css/parse-length.html
3306                transitions/svg-layout-transition.html
3307
3308         Added copyright where I forgot it in previous patch.
3309
3310         * css/CSSComputedStyleDeclaration.cpp: Computed style of x and y.
3311         (WebCore::ComputedStyleExtractor::propertyValue):
3312         * css/CSSParser.cpp:
3313         (WebCore::isSimpleLengthPropertyID): Add x and y to list.
3314         * css/DeprecatedStyleBuilder.cpp:
3315         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Resolve x and y.
3316         * css/SVGCSSParser.cpp:
3317         (WebCore::CSSParser::parseSVGValue): Parse x and y property.
3318         * css/SVGCSSPropertyNames.in: Add x and y to list of names.
3319         * css/StyleResolver.h:
3320         * page/animation/CSSPropertyAnimation.cpp: Animate x and y as Length.
3321         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3322         * rendering/style/RenderStyle.h: Add x and y setters and getters.
3323         * rendering/style/SVGRenderStyle.cpp: Add x and y setters for StyleLayoutData.
3324         (WebCore::SVGRenderStyle::SVGRenderStyle):
3325         (WebCore::SVGRenderStyle::operator==):
3326         (WebCore::SVGRenderStyle::copyNonInheritedFrom):
3327         (WebCore::SVGRenderStyle::diff):
3328         * rendering/style/SVGRenderStyle.h:
3329         (WebCore::SVGRenderStyle::setX):
3330         (WebCore::SVGRenderStyle::setY):
3331         (WebCore::SVGRenderStyle::x):
3332         (WebCore::SVGRenderStyle::y):
3333         * rendering/style/SVGRenderStyleDefs.cpp: Add StyleLayoutData for style storing.
3334         (WebCore::StyleLayoutData::StyleLayoutData):
3335         (WebCore::StyleLayoutData::copy):
3336         (WebCore::StyleLayoutData::operator==):
3337         * rendering/style/SVGRenderStyleDefs.h:
3338         (WebCore::StyleLayoutData::create):
3339         (WebCore::StyleLayoutData::operator!=):
3340         * rendering/svg/RenderSVGRect.cpp:
3341         (WebCore::RenderSVGRect::updateShapeFromElement):
3342         * rendering/svg/SVGPathData.cpp: Use RenderStyle values rather than attribute values.
3343         (WebCore::updatePathFromRectElement):
3344         * svg/SVGAnimationElement.cpp:
3345         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty): Fix text detection.
3346         * svg/SVGElement.cpp: Add x and y to the relevant property lists.
3347         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3348         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3349         * svg/SVGFilterElement.cpp: Style update on change of x and y.
3350         (WebCore::SVGFilterElement::svgAttributeChanged):
3351         * svg/SVGMaskElement.cpp: Ditto.
3352         (WebCore::SVGMaskElement::svgAttributeChanged):
3353         * svg/SVGPatternElement.cpp: Ditto.
3354         (WebCore::SVGPatternElement::svgAttributeChanged):
3355         * svg/SVGRectElement.cpp: Ditto.
3356         (WebCore::SVGRectElement::svgAttributeChanged):
3357         * svg/SVGTextPositioningElement.cpp: Exclude x and y of text elements since they
3358             are lists instead of individual values. Solution about to be discussed
3359             in the WG. Keep current behavior for now.
3360         (WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute):
3361         (WebCore::SVGTextPositioningElement::isPresentationAttribute):
3362         * svg/SVGTextPositioningElement.h:
3363
3364 2014-07-24  Yusuke Suzuki  <utatane.tea@gmail.com>
3365
3366         CSS JIT: Implement Pseudo Element
3367         https://bugs.webkit.org/show_bug.cgi?id=134835
3368
3369         Reviewed by Benjamin Poulain.
3370
3371         Implement Pseudo Element handling for CSS JIT SelectorCompiler.
3372         At first, we start with the simple implementation. We handle limited number of pseudo element,
3373         before, after, first-line, first-letter.
3374
3375         Tests: fast/selectors/pseudo-element-inside-any.html
3376                fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any.html
3377                fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-not.html
3378                fast/selectors/querySelector-pseudo-element.html
3379
3380         * css/ElementRuleCollector.cpp:
3381         (WebCore::ElementRuleCollector::ruleMatches):
3382         * css/SelectorChecker.cpp:
3383         (WebCore::SelectorChecker::matchRecursively):
3384         * cssjit/SelectorCompiler.cpp:
3385         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
3386         (WebCore::SelectorCompiler::constructFragments):
3387         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3388         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
3389         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
3390         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingMode):
3391         (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
3392         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3393         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
3394         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
3395         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
3396         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
3397         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
3398         * cssjit/SelectorCompiler.h:
3399         * rendering/style/RenderStyle.h:
3400         * rendering/style/RenderStyleConstants.h:
3401
3402 2014-07-24  Radu Stavila  <stavila@adobe.com>
3403
3404         REGRESSION (r169105): Crash in selection
3405         https://bugs.webkit.org/show_bug.cgi?id=134303
3406
3407         Patch by Radu Stavila <stavila@adobe.com> on 2014-07-24
3408         Reviewed by David Hyatt.
3409
3410         When splitting the selection between different subtrees, all subtrees must have their selection cleared before
3411         starting to apply the new selection. Otherwise, when selecting objects in a named flow thread and going up
3412         its containing block chain, we can end up in the view's selection root, which has not yet been updated and so
3413         we get inconsistent data.
3414
3415         To achieve this goal, the selection update was split into a "clear" and an "apply" method. The updateSelectionForSubtrees
3416         method first iterates through all subtrees and performs the "clear" method and then starts all over again
3417         and performs the "apply" method.
3418
3419         Test: fast/regions/selection/crash-deselect.html
3420
3421         * WebCore.xcodeproj/project.pbxproj:
3422         * rendering/RenderSelectionInfo.h:
3423         * rendering/RenderView.cpp:
3424         (WebCore::RenderView::setSelection):
3425         (WebCore::RenderView::splitSelectionBetweenSubtrees):
3426         (WebCore::RenderView::updateSelectionForSubtrees): Added, clears and re-applies selection for all selection subtrees.
3427         (WebCore::RenderView::clearSubtreeSelection): Added, clears selection and returns previously selected information.
3428         (WebCore::RenderView::applySubtreeSelection): Added, updates the selection status of all objects inside the selection tree, compares old and new data and repaints accordingly.
3429         (WebCore::RenderView::setSubtreeSelection): Deleted.
3430         * rendering/RenderView.h:
3431         * rendering/SelectionSubtreeRoot.cpp:
3432         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
3433         * rendering/SelectionSubtreeRoot.h:
3434         (WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData):
3435
3436 2014-07-24  Ryosuke Niwa  <rniwa@webkit.org>
3437
3438         REGRESSION(r164401): Placing a caret doesn't bring up autocorrection panel
3439         https://bugs.webkit.org/show_bug.cgi?id=135278
3440
3441         Reviewed by Tim Horton.
3442
3443         The bug was caused by editorUIUpdateTimerFired calling respondToChangedSelection only if the selection was
3444         triggered by dictation instead of only if it was NOT triggered by dictation.
3445
3446         Prior to r164401, AlternativeTextController::respondToMarkerAtEndOfWord exited early when SetSelectionOptions
3447         had DictationTriggered set. r164401 intended to move this check to editorUIUpdateTimerFired to avoid passing
3448         options around but the boolean condition was erroneously flipped.
3449
3450         Fixed the bug by negating the condition in editorUIUpdateTimerFired.
3451
3452         No new tests for now since autocorrection panel cannot be tested automatically. (We should really automate this!)
3453
3454         * editing/Editor.cpp:
3455         (WebCore::Editor::editorUIUpdateTimerFired):
3456
3457 2014-07-24  Pratik Solanki  <psolanki@apple.com>
3458
3459         REGRESSION(r171526): [GTK] Massive crashes.
3460         https://bugs.webkit.org/show_bug.cgi?id=135283
3461
3462         Unreviewed. GTK build fix after r171526. Initialize m_buffer in SharedBuffer constructor.
3463
3464         * platform/soup/SharedBufferSoup.cpp:
3465         (WebCore::SharedBuffer::SharedBuffer):
3466
3467 2014-07-24  Tim Horton  <timothy_horton@apple.com>
3468
3469         Crashes under scanSelectionForTelephoneNumbers in Range::text() on some sites
3470         https://bugs.webkit.org/show_bug.cgi?id=135281
3471         <rdar://problem/17803347>
3472
3473         Reviewed by Ryosuke Niwa.
3474
3475         * editing/Editor.cpp:
3476         (WebCore::Editor::scanSelectionForTelephoneNumbers):
3477         toNormalizedRange is not guaranteed to return a non-null range.
3478         If it returns null, pass the empty markedRanges down to the client as our new set.
3479
3480 2014-07-24  Dan Bernstein  <mitz@apple.com>
3481
3482         WebCore part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
3483         https://bugs.webkit.org/show_bug.cgi?id=135129
3484
3485         Reviewed by Darin Adler.
3486
3487         * WebCore.exp.in: Exported equalIgnoringFragmentIdentifier(const URL&, const URL&).
3488
3489 2014-07-24  Simon Fraser  <simon.fraser@apple.com>
3490
3491         [iOS WK1] CSS viewport units use the wrong viewport size in WebKit1
3492         https://bugs.webkit.org/show_bug.cgi?id=135254
3493         <rdar://problem/17781423>
3494
3495         Reviewed by Tim Horton.
3496
3497         Test: fast/css/viewport-units-dynamic.html
3498         
3499         In WebKit1 on iOS, we want to resolve viewport units against the visible
3500         viewport, not the legacy WK1 notion of the "viewport" which is the entire document.
3501         
3502         Fixes rendering of medium.com articles in WK1 views on iPad.
3503
3504         * page/FrameView.cpp:
3505         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
3506
3507 2014-07-24  Myles C. Maxfield  <mmaxfield@apple.com>
3508
3509         Crash when measuring a glyphs from a fallback SVG font
3510         https://bugs.webkit.org/show_bug.cgi?id=135264
3511
3512         Reviewed by Simon Fraser.
3513
3514         We can't realize font data for all fallback fonts ahead
3515         of time, but we don't have all the necessary context to
3516         realize SVG fallback data when it's needed. For now, we
3517         can just bail; however, a larger, more invasive fix is
3518         in order.
3519
3520         Test: svg/text/svg-fallback-font-crash.html
3521
3522         * platform/graphics/WidthIterator.cpp:
3523         (WebCore::applyFontTransforms):
3524
3525 2014-07-24  Daniel Bates  <dabates@apple.com>
3526             And Alexey Proskuryakov  <ap@apple.com>
3527
3528         [iOS] REGRESSION (WebKit2): Can't login to Wordpress.com, facebook.com when always allowing cookies
3529         https://bugs.webkit.org/show_bug.cgi?id=135273
3530         <rdar://problem/17598815>
3531
3532         Reviewed by Alexey Proskuryakov.
3533
3534         Fixes an issue where cookies may be created in the wrong cookie store.
3535
3536         Currently, when we update the CFURLRequest object associated with a ResourceRequest object
3537         we explicitly set a cookie storage, cookie accept policy, and SSL properties based on the
3538         corresponding values in the old CFURLRequest object (if we have one). This ultimately leads
3539         to CFNetwork associating the cookies for the request with a different cookie store when we
3540         handle the request in the NetworkProcess. Instead, we shouldn't set these properties
3541         explicitly as we already copy them implicitly earlier (via CFURLRequestCreateMutableCopy()).
3542
3543         * platform/network/cf/ResourceRequestCFNet.cpp:
3544         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3545
3546 2014-07-24  Peyton Randolph  <prandolph@apple.com>
3547
3548         Rename feature flag for long-press gesture on Mac.                                                                   
3549         https://bugs.webkit.org/show_bug.cgi?id=135259                                                                  
3550
3551         Reviewed by Beth Dakin.
3552
3553         * Configurations/FeatureDefines.xcconfig:
3554         Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
3555
3556 2014-07-24  Dan Bernstein  <mitz@apple.com>
3557
3558         Fixed Windows build fix.
3559
3560         * platform/network/cf/AuthenticationCF.cpp:
3561
3562 2014-07-24  Dan Bernstein  <mitz@apple.com>
3563
3564         Attempted Windows build fix.
3565
3566         * platform/network/cf/AuthenticationCF.cpp:
3567         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
3568         * platform/network/cf/CredentialStorageCFNet.cpp:
3569         (WebCore::CredentialStorage::getFromPersistentStorage):
3570         * platform/network/cf/ProtectionSpaceCFNet.cpp:
3571         (WebCore::ProtectionSpace::receivesCredentialSecurely):
3572         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Deleted.
3573
3574 2014-07-24  Dan Bernstein  <mitz@apple.com>
3575
3576         <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
3577         https://bugs.webkit.org/show_bug.cgi?id=135229
3578
3579         Reviewed by Alexey Proskuryakov.
3580
3581         * CMakeLists.txt: Updated for rename of a source file.
3582
3583         * WebCore.exp.in: Updated.
3584
3585         * WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
3586         ProtectionSpaceCFNet.{cpp,h}.
3587         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3588
3589         * WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
3590         ProtectionSpaceCococa.{h.mm}.
3591
3592         * platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
3593         * platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
3594         in its place added a generic ProtectionSpace class that just derives from
3595         ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
3596         instead of the generic class.
3597
3598         * platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
3599         (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
3600         (WebCore::ProtectionSpaceBase::host): Ditto.
3601         (WebCore::ProtectionSpaceBase::port): Ditto.
3602         (WebCore::ProtectionSpaceBase::serverType): Ditto.
3603         (WebCore::ProtectionSpaceBase::isProxy): Ditto.
3604         (WebCore::ProtectionSpaceBase::realm): Ditto.
3605         (WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
3606         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
3607         which is now implemented in ProtectionSpaceCFNet.cpp.
3608         (WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
3609         ProtectionSpace::platformCompare at the end if needed.
3610
3611         * platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
3612         (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
3613         implementation that returns false, for ProtectionSpace implementations to override.
3614         (WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
3615         returns true, for ProtectionSpace implementations to override.
3616         (WebCore::operator==): Changed to call compare.
3617
3618         * platform/network/cf/AuthenticationCF.cpp:
3619         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
3620         ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
3621         (WebCore::createCF): Changed to use ProtectionSpace::cfSpace.
3622
3623         * platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
3624         Cocoa with #if PLATFORM(WIN).
3625
3626         * platform/network/cf/CredentialStorageCFNet.cpp:
3627         (WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
3628         ProtectionSpace::cfSpace.
3629         (WebCore::CredentialStorage::saveToPersistentStorage): Ditto.
3630
3631         * platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
3632         (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
3633         CFNetwork-specific test that was previously in ProtectionSpace.cpp.
3634
3635         * platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
3636         Declare ProtectionSpace and override receivesCredentialSecurely.
3637
3638         * platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
3639         * platform/network/mac/AuthenticationMac.mm:
3640         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
3641         ProtectionSpace constructor that takes an NSURLProtectionSpace.
3642         (WebCore::mac): Changed to use ProtectionSpace::nsSpace.
3643
3644         * platform/network/mac/CredentialStorageMac.mm:
3645         (WebCore::CredentialStorage::getFromPersistentStorage): Ditto.
3646
3647         * platform/network/mac/ResourceHandleMac.mm:
3648         (WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
3649         constructor that takes an NSURLProtectionSpace.
3650
3651         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3652         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
3653         Ditto.
3654
3655         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3656         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
3657         Ditto.
3658
3659 2014-07-24  Benjamin Poulain  <benjamin@webkit.org>
3660
3661         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
3662         https://bugs.webkit.org/show_bug.cgi?id=135227
3663         <rdar://problem/17279500>
3664
3665         Reviewed by Simon Fraser.
3666
3667         Keep track of the creation/destruction of Fixed and Sticky nodes in the ScrollingTree.
3668
3669         * page/scrolling/ScrollingTree.cpp:
3670         (WebCore::ScrollingTree::ScrollingTree):
3671         * page/scrolling/ScrollingTree.h:
3672         (WebCore::ScrollingTree::hasFixedOrSticky):
3673         (WebCore::ScrollingTree::fixedOrStickyNodeAdded):
3674         (WebCore::ScrollingTree::fixedOrStickyNodeRemoved):
3675         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3676         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
3677         (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
3678         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3679         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
3680         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
3681
3682 2014-07-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3683
3684         Let WheelEvent wrap a PlatformWheelEvent
3685         https://bugs.webkit.org/show_bug.cgi?id=135244
3686
3687         When WheelEvent is initialized with a PlatformWheelEvent, store that PlatformWheelEvent for future use.
3688
3689         Reviewed by Beth Dakin.
3690
3691         No new tests because behavior should not have changed.
3692
3693         * dom/WheelEvent.cpp: Added method to access the PlatformWheelEvent.
3694         (WebCore::WheelEvent::WheelEvent):
3695         * dom/WheelEvent.h: Added field to store PlatformWheelEvent, if initialized via PlatformWheelEvent.
3696         (WebCore::WheelEvent::wheelEvent):
3697
3698 2014-07-24  Brian J. Burg  <burg@cs.washington.edu>
3699
3700         Web Replay: don't encode/decode primitive types that lack explicit sizes
3701         https://bugs.webkit.org/show_bug.cgi?id=133430
3702
3703         Reviewed by Anders Carlsson.
3704
3705         Remove uses of unsigned long in encode/decode methods because the type lacks an
3706         explicit size. Move frame index serialization away from using unsigned long.
3707
3708         * replay/ReplayController.cpp:
3709         (WebCore::logDispatchedDOMEvent): Fix the format string.
3710         * replay/SerializationMethods.cpp:
3711         (WebCore::frameIndexFromDocument):
3712         (WebCore::frameIndexFromFrame):
3713         (WebCore::documentFromFrameIndex):
3714         (WebCore::frameFromFrameIndex):
3715         (JSC::EncodingTraits<PluginData>::encodeValue):
3716         (JSC::EncodingTraits<PluginData>::decodeValue):
3717         * replay/SerializationMethods.h:
3718         * replay/WebInputs.json: Remove primitive types without explicit sizes.
3719
3720 2014-07-24  Pratik Solanki  <psolanki@apple.com>
3721
3722         Sharing SharedBuffer between WebCore and ImageIO is racy and crash prone
3723         https://bugs.webkit.org/show_bug.cgi?id=135069
3724         <rdar://problem/17470655>
3725
3726         Reviewed by Simon Fraser.
3727
3728         When passing image data to ImageIO for decoding, we pass an NSData subclass that is a wraper
3729         around SharedBuffer. This can be a problem when ImageIO tries to access the data on the CA
3730         thread. End result is data corruption on large image loads and potential crashes. The fix is
3731         to have SharedBuffer create a copy of its data if the data has been passed to ImageIO and
3732         might be accessed concurrently.
3733
3734         Since Vector is not refcounted, we do this by having a new refcounted object in SharedBuffer
3735         that contains the buffer and we pass that in our NSData subclass WebCoreSharedBufferData.
3736         Code that would result in the Vector memory moving e.g. append(), resize(), now checks to
3737         see if the buffer was shared and if so, will create a new copy of the vector. This ensures
3738         that the main thread does not end up invalidating the vector memory that we have passed it
3739         to ImageIO.
3740
3741         No new tests because no functional changes.
3742
3743         * loader/cache/CachedResource.cpp:
3744         (WebCore::CachedResource::makePurgeable):
3745             Remove early return - createPurgeableMemory() has the correct check now.
3746         * platform/SharedBuffer.cpp:
3747         (WebCore::SharedBuffer::SharedBuffer):
3748         (WebCore::SharedBuffer::adoptVector):
3749         (WebCore::SharedBuffer::createPurgeableBuffer):
3750             Don't create purgeable buffer if we are sharing the buffer.
3751         (WebCore::SharedBuffer::append):
3752         (WebCore::SharedBuffer::clear):
3753         (WebCore::SharedBuffer::copy):
3754         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary): Added.
3755             Create a new copy of the data if we have shared the buffer and if appending to it would
3756             exceed the capacity of the vector resulting in memmove.
3757         (WebCore::SharedBuffer::appendToInternalBuffer): Added.
3758         (WebCore::SharedBuffer::clearInternalBuffer): Added.
3759         (WebCore::SharedBuffer::buffer):
3760             Create a new copy of the buffer if we have shared it.
3761         (WebCore::SharedBuffer::getSomeData):
3762         * platform/SharedBuffer.h:
3763         * platform/cf/SharedBufferCF.cpp:
3764         (WebCore::SharedBuffer::SharedBuffer):
3765         (WebCore::SharedBuffer::singleDataArrayBuffer):
3766         (WebCore::SharedBuffer::maybeAppendDataArray):
3767         * platform/mac/SharedBufferMac.mm:
3768             Pass the InternalBuffer object to WebCoreSharedBufferData
3769         (-[WebCoreSharedBufferData dealloc]):
3770         (-[WebCoreSharedBufferData initWithSharedBufferInternalBuffer:]):
3771         (-[WebCoreSharedBufferData length]):
3772         (-[WebCoreSharedBufferData bytes]):
3773         (WebCore::SharedBuffer::createNSData):
3774             Call createCFData() instead of duplicating code.
3775         (WebCore::SharedBuffer::createCFData):
3776             If the data is in purgeable memory, make a copy of it since m_buffer was cleared when
3777             creating the purgeable buffer.
3778         (-[WebCoreSharedBufferData initWithSharedBuffer:]): Deleted.
3779
3780 2014-07-24  peavo@outlook.com  <peavo@outlook.com>
3781
3782         [Curl] Enable file logging.
3783         https://bugs.webkit.org/show_bug.cgi?id=135202
3784
3785         Reviewed by Alex Christensen.
3786
3787         The Curl api offers the possibility to write log messages to file. Enable this for debugging purposes.
3788
3789         * platform/network/curl/ResourceHandleManager.cpp:
3790         (WebCore::ResourceHandleManager::ResourceHandleManager):
3791         (WebCore::ResourceHandleManager::~ResourceHandleManager):
3792         (WebCore::ResourceHandleManager::initializeHandle):
3793         * platform/network/curl/ResourceHandleManager.h:
3794
3795 2014-07-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3796
3797         Sort WebCore.exp.in after r171252
3798         https://bugs.webkit.org/show_bug.cgi?id=135239
3799
3800         Reviewed by Csaba Osztrogonác.
3801
3802         * WebCore.exp.in:
3803
3804 2014-07-24  Mihnea Ovidenie  <mihnea@adobe.com>
3805
3806         [New Multicolumn] Assertion failure when an input element has multicolumn style
3807         https://bugs.webkit.org/show_bug.cgi?id=135234
3808
3809         Reviewed by Andrei Bucur.
3810
3811         Restrict the assertion in RenderBlock::canComputeRegionRangeForBox
3812         only to RenderNamedFlowThread objects since for RenderMultiColumnFlowThread
3813         objects we can compute a range of regions during their parent block layout.   
3814
3815         Test: fast/multicol/newmulticol/input-as-multicol.html
3816
3817         * rendering/RenderBlock.cpp:
3818         (WebCore::canComputeRegionRangeForBox):
3819
3820 2014-07-23  Jeremy Jones  <jeremyj@apple.com>
3821
3822         Transparent fullscreen background when video is not present.
3823         https://bugs.webkit.org/show_bug.cgi?id=135226
3824
3825         Reviewed by Simon Fraser.
3826
3827         Set background to black just before beginning the animation to fullscreen.
3828
3829         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3830         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): set background color black.
3831
3832 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
3833
3834         ScriptController::updateDocument ASSERT mutating map while iterating map
3835         https://bugs.webkit.org/show_bug.cgi?id=135211
3836
3837         Reviewed by Oliver Hunt.
3838
3839         Avoid iterating over m_windowShells in more places. This prevents
3840         the possibility of a collection during JSC allocation which might
3841         cause a mutation to m_windowShells (HTMLMediaElement destruction).
3842
3843         Have ScriptController defriend ScriptCachedFrameData by providing
3844         a getter for the list of window shells.
3845
3846         * bindings/js/ScriptCachedFrameData.cpp:
3847         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
3848         (WebCore::ScriptCachedFrameData::restore):
3849         * bindings/js/ScriptController.cpp:
3850         (WebCore::ScriptController::windowShells):
3851         (WebCore::ScriptController::clearWindowShell):
3852         (WebCore::ScriptController::attachDebugger):
3853         (WebCore::ScriptController::updateDocument):
3854         * bindings/js/ScriptController.h:
3855
3856 2014-07-23  Commit Queue  <commit-queue@webkit.org>
3857
3858         Unreviewed, rolling out r171498.
3859         https://bugs.webkit.org/show_bug.cgi?id=135223
3860
3861         It will regress some scroll position restoration on navigation
3862         (r167916). (Requested by smfr on #webkit).
3863
3864         Reverted changeset:
3865
3866         "[iOS WK2] Header bar on nytimes articles lands in the wrong
3867         place after rubberbanding"
3868         https://bugs.webkit.org/show_bug.cgi?id=135221
3869         http://trac.webkit.org/changeset/171498
3870
3871 2014-07-23  Tim Horton  <timothy_horton@apple.com>
3872
3873         REGRESSION (r171376): Sometimes we detect less than the whole phone number
3874         https://bugs.webkit.org/show_bug.cgi?id=135220
3875         <rdar://problem/17783423>
3876
3877         Reviewed by Brady Eidson.
3878
3879         * editing/Editor.cpp:
3880         (WebCore::Editor::scanSelectionForTelephoneNumbers):
3881         Use the visible selection's start and end instead of base and extent, because they'll
3882         always be in the right order in the case of a directional selection (base can be *after* extent
3883         if you select from right to left). This fixes the code that expands the selection.
3884
3885         Pass the *entire* expanded selection to DataDetectors, instead of using TextIterator.
3886         This way, we will find each number only once, and will never get part of a phone number once
3887         and then the whole phone number later.
3888
3889 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
3890
3891         [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
3892         https://bugs.webkit.org/show_bug.cgi?id=135221
3893
3894         Reviewed by Tim Horton.
3895
3896         Add a function on GraphicsLayer to force a flush of the layer position
3897         to the underlying graphics system, so that when layers cease being
3898         scroll-coordinated, we can ensure that their layers are repositioned
3899         in the correct location.
3900
3901         * WebCore.exp.in:
3902         * platform/graphics/GraphicsLayer.h:
3903         (WebCore::GraphicsLayer::forcePositionUpdate):
3904         * platform/graphics/ca/GraphicsLayerCA.cpp:
3905         (WebCore::GraphicsLayerCA::forcePositionUpdate):
3906         * platform/graphics/ca/GraphicsLayerCA.h:
3907         * rendering/RenderLayerCompositor.cpp:
3908         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
3909
3910 2014-07-23  Pratik Solanki  <psolanki@apple.com>
3911
3912         Get rid of SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator
3913         https://bugs.webkit.org/show_bug.cgi?id=135219
3914
3915         Reviewed by Anders Carlsson.
3916
3917         No new tests because no functional changes.
3918
3919         * loader/ResourceBuffer.h:
3920         * loader/mac/ResourceBuffer.mm:
3921         (WebCore::ResourceBuffer::createNSData):
3922         * platform/SharedBuffer.h:
3923         (WebCore::SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator::NSDataRetainPtrWithoutImplicitConversionOperator): Deleted.
3924         * platform/mac/SharedBufferMac.mm:
3925         (WebCore::SharedBuffer::createNSData):
3926
3927 2014-07-23  Zalan Bujtas  <zalan@apple.com>
3928
3929         Subpixel rendering: Cleanup RenderLayerCompositor::deviceScaleFactor()
3930         https://bugs.webkit.org/show_bug.cgi?id=135208
3931
3932         Reviewed by Simon Fraser.
3933
3934         Use m_renderView.document() to retrieve device scale factor value. m_renderView.document()
3935         is always available while this->page() is not.
3936
3937         No change in behavior.
3938
3939         * rendering/RenderLayerBacking.cpp:
3940         (WebCore::RenderLayerBacking::updateTransform):
3941         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
3942         * rendering/RenderLayerCompositor.cpp:
3943         (WebCore::RenderLayerCompositor::deviceScaleFactor):
3944
3945 2014-07-23  peavo@outlook.com  <peavo@outlook.com>
3946
3947         [WinCairo] Gstreamer rendering is not working.
3948         https://bugs.webkit.org/show_bug.cgi?id=135201
3949
3950         Reviewed by Alex Christensen.
3951
3952         WinCairo does not support accelerated rendering yet.
3953
3954         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3955         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
3956
3957 2014-07-23  Commit Queue  <commit-queue@webkit.org>
3958
3959         Unreviewed, rolling out r171455.
3960         https://bugs.webkit.org/show_bug.cgi?id=135209
3961
3962         completely broke selection highlight invalidation (Requested
3963         by thorton on #webkit).
3964
3965         Reverted changeset:
3966
3967         "REGRESSION (r169105): Crash in selection"
3968         https://bugs.webkit.org/show_bug.cgi?id=134303
3969         http://trac.webkit.org/changeset/171455
3970
3971 2014-07-23  Alex Christensen  <achristensen@webkit.org>
3972
3973         Compile window-inactive and fullscreen pseudoclasses in css selectors.
3974         https://bugs.webkit.org/show_bug.cgi?id=135200
3975
3976         Reviewed by Benjamin Poulain.
3977
3978         * css/SelectorChecker.cpp:
3979         (WebCore::SelectorChecker::checkOne):
3980         Removed the check of context.hasSelectionPseudo for a window-inactive pseudoclass.
3981         Moved logic to SelectorCheckerTestFunctions.h to share with the selector compiler.
3982         * css/SelectorCheckerTestFunctions.h:
3983         (WebCore::isWindowInactive):
3984         (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
3985         (WebCore::matchesFullScreenAncestorPseudoClass):
3986         (WebCore::matchesFullScreenDocumentPseudoClass):
3987         Added from SelectorChecker.cpp.
3988         * cssjit/SelectorCompiler.cpp:
3989         (WebCore::SelectorCompiler::addPseudoClassType):
3990         Added unoptimized pseudoclass cases for window-inactive and fullscreen pseudoclasses.
3991         Explicitly listed uncompiled pseudoclasses for future work instead of using a default.
3992
3993 2014-07-23  Brent Fulgham  <bfulgham@apple.com>
3994
3995         [Win] Use NO_RETURN_DUE_TO_CRASH on Windows.
3996         https://bugs.webkit.org/show_bug.cgi?id=13519
3997
3998         Reviewed by Mark Lam.
3999
4000         * svg/SVGZoomAndPan.h: Add NO_RETURN_DUE_TO_CRASH to
4001         header so function declarations match implementation.
4002
4003 2014-07-23  Joseph Pecoraro  <pecoraro@apple.com>
4004
4005         JSDOMWindowShell leaks on pages with media elements
4006         https://bugs.webkit.org/show_bug.cgi?id=135178
4007
4008         Reviewed by Oliver Hunt.
4009
4010         The DOMWindowWorld for HTMLMediaElements with MEDIA_CONTROLS_SCRIPT
4011         was not getting cleared and removed.
4012
4013         * bindings/js/ScriptController.cpp:
4014         (WebCore::ScriptController::clearWindowShell):
4015         Iterate over a copy of the values. A sweep / garbage collection caused by
4016         any JSC allocation during iteration could trigger a mutation of the m_windowShells
4017         table that was being iterating. So instead iterate a list that won't mutate.
4018 <