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