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