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