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