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