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