e60735e55e7ce133c06b02a94e1078723f21e984
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-11  Roger Fong  <roger_fong@apple.com>
2
3         [Windows] Unreviewed build fix.
4
5         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
6         (WebCore::GraphicsContext3D::checkVaryingsPacking):
7
8 2014-09-11  Beth Dakin  <bdakin@apple.com>
9
10         WebKit scrollbars flash in non-dominant spaces when entering Mission Control
11         https://bugs.webkit.org/show_bug.cgi?id=136761
12         -and corresponding-
13         rdar://problem/18195616
14
15         Reviewed by Tim Horton.
16
17         This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
18         Show match the logic in AppKit. We only want these notifications when the window 
19         has become both visible and active (or lost both, in the case of hide).
20
21         Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it 
22         only when both visibility and active-state have changed.
23         * page/FocusController.cpp:
24         (WebCore::FocusController::setViewState):
25         (WebCore::FocusController::setIsVisibleAndActiveInternal):
26         (WebCore::FocusController::setIsVisibleInternal): Deleted.
27         * page/FocusController.h:
28
29         FocusController::setViewState() is the only place that needs to call 
30         ScrollableArea::contentAreaDidHide/Show, so remove these callers.
31         * page/FrameView.cpp:
32         (WebCore::FrameView::didMoveOnscreen): Deleted.
33         (WebCore::FrameView::willMoveOffscreen): Deleted.
34         * page/FrameView.h:
35         * page/Page.cpp:
36         (WebCore::Page::setIsVisibleInternal):
37
38 2014-09-10  Michael Saboff  <msaboff@apple.com>
39
40         Move JSScope out of JSFunction into separate JSCallee class
41         https://bugs.webkit.org/show_bug.cgi?id=136725
42
43         Reviewed by Oliver Hunt.
44
45         Created new JSCallee class that contains a JSScope*.  Changed JSFunction to inherit from
46         JSCallee.
47
48         * ForwardingHeaders/runtime/JSCallee.h: New forwarding header.
49
50 2014-09-11  Roger Fong  <roger_fong@apple.com>
51
52         Unreviewed build fix iOS.
53
54         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
55         (WebCore::GraphicsContext3D::checkVaryingsPacking):
56
57 2014-09-11  Jer Noble  <jer.noble@apple.com>
58
59         Add site-specific quirk for entering fullscreen on YouTube.com.
60         https://bugs.webkit.org/show_bug.cgi?id=136742
61
62         Reviewed by Eric Carlson.
63
64         YouTube only resizes its <video> content when entering fullscreen after receiving the "webkitfullscreenchange"
65         event, which is fired once the animation to enter fullscreen completes. This leaves the apparent <video> content
66         too small during the animation, especially at the beginning of the animation. Add a site-specific hack for
67         YouTube sites which fires the "webkitfullscreenchange" event synchronously with the beginning of the enter
68         fullscreen animation. This will cause YouTube to resize their <video> content during the period of time where we
69         disable screen updates, and makes the enter fullscreen animation seamless.
70
71         Add a static utility method, hostIsYouTube(), for the various pieces of this site-specific hack, and expand it
72         to match youtube.co.uk, youtube.fr, etc.
73
74         * dom/Document.cpp:
75         (WebCore::hostIsYouTube): Added.
76         (WebCore::Document::webkitWillEnterFullScreenForElement): Fire fullscreenchange event if hacks are enabled.
77         (WebCore::Document::webkitDidEnterFullScreenForElement): Don't fire the event if same.
78         (WebCore::Document::webkitDidExitFullScreenForElement): Use hostIsYouTube().
79         
80 2014-09-11  Bear Travis  <betravis@adobe.com>
81
82         [CSS Font Loading] Enable CSS Font Loading on Mac
83         https://bugs.webkit.org/show_bug.cgi?id=135473
84
85         Reviewed by Antti Koivisto.
86
87         Enable CSS Font Loading in FeatureDefines, and in
88         RuntimeEnabledFeatures.
89
90         Font Loading tests have been toggled back on in the Mac
91         TestExpectations file.
92
93         * Configurations/FeatureDefines.xcconfig:
94         * bindings/generic/RuntimeEnabledFeatures.cpp:
95         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
96
97 2014-09-11  Chris Dumez  <cdumez@apple.com>
98
99         Use tighter typing for Document::ownerElement() return value
100         https://bugs.webkit.org/show_bug.cgi?id=136746
101
102         Reviewed by Ryosuke Niwa.
103
104         Use tighter typing for Document::ownerElement() return value at call
105         sites to increase code readability a bit and allow the compiler to
106         generate slightly more efficient code in some cases. In particular,
107         the more efficient HTMLElement::hasTagName(HTMLQualifiedName) is
108         now called in several cases instead of the one on Node. This bypasses
109         unnecessary isHTMLElement() checks.
110
111         No new tests, no behavior change.
112
113         * accessibility/AccessibilityNodeObject.cpp:
114         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
115         * dom/Document.cpp:
116         (WebCore::Document::updateLayout):
117         (WebCore::Document::topDocument):
118         * html/HTMLBodyElement.cpp:
119         (WebCore::HTMLBodyElement::insertedInto):
120         * rendering/RenderBoxModelObject.cpp:
121         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
122         * rendering/RenderLayer.cpp:
123         (WebCore::RenderLayer::scrollRectToVisible):
124         * rendering/RenderView.cpp:
125         (WebCore::RenderView::paintBoxDecorations):
126
127 2014-09-10  Roger Fong  <roger_fong@apple.com>
128
129         Check for varying packing restrictions per program instead of per shader.
130         https://bugs.webkit.org/show_bug.cgi?id=136585.
131         <rdar://problem/16308409>.
132
133         Reviewed by Dean Jackson.
134
135         Covered by webgl/1.0.2/conformance/ogles/GL/build/build_009_to_016.html.
136
137         * html/canvas/WebGLRenderingContext.cpp:
138         (WebCore::WebGLRenderingContext::linkProgram): 
139         Check for varying packing restrictions when linking the program.
140
141         * platform/graphics/GraphicsContext3D.h:
142         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
143         (WebCore::GraphicsContext3D::checkVaryingsPacking): 
144         Checks varyings shared by both vertex and fragment shaders and makes sure
145         they satisfy packing restrictions.
146
147 2014-09-11  Beth Dakin  <bdakin@apple.com>
148
149         Support rubber-banding in sub-frames
150         https://bugs.webkit.org/show_bug.cgi?id=136726
151         -and corresponding-
152         rdar://problem/10011924
153
154         Reviewed by Tim Horton.
155
156         Set the appropriate scroll elasticity for all frames! As long as its enabled, sub-
157         frames want an elasticity of ScrollElasticityAutomatic, which will allow for 
158         latching. 
159         * page/FrameView.cpp:
160         (WebCore::FrameView::FrameView):
161
162         Account for rubber-banding in sub-frames.
163         (WebCore::FrameView::isScrollableOrRubberbandable):
164         (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
165
166         This patch also re-names rubberBandingForOverflowScrollEnabled to 
167         rubberBandingForSubScrollableRegionsEnabled
168         * page/Settings.in:
169         * rendering/RenderLayer.cpp:
170         (WebCore::RenderLayer::overhangAmount):
171         (WebCore::RenderLayer::setHasHorizontalScrollbar):
172         (WebCore::RenderLayer::setHasVerticalScrollbar):
173
174 2014-09-11  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>
175
176         Initial implementation of SVG to OTF font converter
177         https://bugs.webkit.org/show_bug.cgi?id=136688
178
179         Reviewed by Darin Adler.
180
181         This patch creates a new file and new function which turns an SVG font into an OpenType font.
182         This function is not very full featured, and as such is never called. However, it works with
183         fonts that only support simple horizontal basic multilingual plane codepoints. It has only
184         been tested on OS X, and does not have any automated tests. This patch is only jumping off
185         point, laying the basic groundwork for a more robust font converter.
186
187         The goal of this patch is to eventually allow us to delete the codepath with which we draw
188         text using SVG fonts. Using a native codepath instead will allow for better performance,
189         security, and code clarity. In my initial benchmarks, using this converter instead of the
190         SVG codepath is at least a 100x speed improvement (after running for 4 hours I stepped
191         away from my machine).
192
193         No new tests because the function is not ready to be called (yet!)
194         Initial implementation of SVG to OTF font converter
195         https://bugs.webkit.org/show_bug.cgi?id=136688
196
197         * WebCore.xcodeproj/project.pbxproj: Add new file.
198         * svg/SVGPathBuilder.h: Single function. Takes a SVGFontElement and returns a byte
199         * svg/SVGToOTFFontConversion.cpp: Added.
200         (WebCore::write32): Write a big-endian Int32.
201         (WebCore::write16): Write a big-endian Int16.
202         (WebCore::overwrite32): Overwrite an existing Int32 in a vector (instead of appending)
203         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Internal class to hold state during
204         function calls.
205         (WebCore::roundDownToPowerOfTwo):
206         (WebCore::SVGToOTFFontConverter::appendCMAPTable): See function name.
207         (WebCore::SVGToOTFFontConverter::appendHEADTable): Ditto.
208         (WebCore::clampTo): Used to clamp data types to fit into other data types.
209         (WebCore::SVGToOTFFontConverter::appendHHEATable): See function name.
210         (WebCore::SVGToOTFFontConverter::appendHMTXTable): Ditto.
211         (WebCore::SVGToOTFFontConverter::appendMAXPTable): Ditto.
212         (WebCore::SVGToOTFFontConverter::appendNAMETable): Ditto.
213         (WebCore::SVGToOTFFontConverter::appendOS2Table): Ditto.
214         (WebCore::SVGToOTFFontConverter::appendPOSTTable): Ditto.
215         (WebCore::isValidStringForCFF): The CFF font format only allows strings with particular
216         characters in them.
217         (WebCore::appendCFFValidString): Append a string assuming it's valid to append.
218         (WebCore::SVGToOTFFontConverter::appendCFFTable): See function name.
219         (WebCore::SVGToOTFFontConverter::appendVORGTable): Ditto.
220         (WebCore::writeCFFEncodedNumber): CFF has this wacky encoding scheme for encoding and
221         decoding numbers.
222         (WebCore::CFFBuilder::CFFBuilder): Subclass of SVGPathBuilder, which is used for building
223         CFF CharStrings (which are glyph path representations).
224         (WebCore::CFFBuilder::updateForConstituentPoint): Invoked for every point in a path, does
225         things like updates glyph bounding box information.
226         (WebCore::CFFBuilder::boundingBox): Getter.
227         (WebCore::transcodeGlyphPaths): SVG path data string -> CFF CharString
228         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Generate internal state ahead of
229         time before generating any tables.
230         (WebCore::isFourByteAligned):
231         (WebCore::calculateChecksum): OTF files have checksums.
232         (WebCore::SVGToOTFFontConverter::appendTable): Invoked for each entry in the table of
233         contents of the OTF font.
234         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Write out the tables.
235         (WebCore::convertSVGToOTFFont): Entry point.
236         * svg/SVGToOTFFontConversion.h: Added.
237
238 2014-09-11  Jer Noble  <jer.noble@apple.com>
239
240         [EME] REGRESSION(??): test media/encrypted-media/encrypted-media-v2-syntax.html is failing
241         https://bugs.webkit.org/show_bug.cgi?id=136723
242
243         Reviewed by Eric Carlson.
244
245         Update a comment to point to the implemented Working Draft 18 Feburary 2014 version of the spec.
246
247         * Modules/encryptedmedia/MediaKeys.cpp:
248         (WebCore::MediaKeys::createSession):
249
250 2014-09-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
251
252         [WK2] Authentication dialog is displayed for cross-origin XHR
253         https://bugs.webkit.org/show_bug.cgi?id=131349
254
255         Reviewed by Alexey Proskuryakov.
256
257         * WebCore.exp.in: Export of isAllowedToAskUserForCredentials.
258         * loader/ResourceLoader.cpp:
259         (WebCore::ResourceLoader::isAllowedToAskUserForCredentials): Replacing clientCredentialPolicy method. Returns true if credentials can be requested to the user.
260         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Updated to use isAllowedToAskUserForCredentials.
261         * loader/ResourceLoader.h: Removing clientCredentialPolicy method and adding isAllowedToAskUserForCredentials method.
262
263 2014-09-11  Chris Fleizach  <cfleizach@apple.com>
264
265         AX: Children inside a <legend> are not accessible
266         https://bugs.webkit.org/show_bug.cgi?id=136735
267
268         Reviewed by Mario Sanchez Prada.
269
270         The AX children of a <legend> are being hidden currently, which makes it impossible for
271         VoiceOver to activate control elements inside of a <legend>.
272         The solution is that legend elements SHOULD be allowed to have children.
273
274         Test: accessibility/legend-children-are-visible.html
275
276         * accessibility/AccessibilityNodeObject.cpp:
277         (WebCore::AccessibilityNodeObject::canHaveChildren):
278
279 2014-09-11  Brendan Long  <b.long@cablelabs.com>
280
281         Fix FIXME's in JSTrackCustom now that AudioTrack and VideoTrack exist.
282         https://bugs.webkit.org/show_bug.cgi?id=136552
283
284         Reviewed by Eric Carlson.
285
286         * bindings/js/JSTrackCustom.cpp:
287         (WebCore::toTrack): Add casts for AudioTrack and VideoTrack.
288
289 2014-09-11  Carlos Garcia Campos  <cgarcia@igalia.com>
290
291         [GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog
292         https://bugs.webkit.org/show_bug.cgi?id=136700
293
294         Reviewed by Sergio Villar Senin.
295
296         Remove WebKitAuthenticationWidget. The only reason why we had this
297         widget separated in WebCore was to share it between WebKit1 and
298         WebKit2, but now it's only used by WebKitAuthenticationDialog in WebKit2.
299
300         * PlatformGTK.cmake: Remove files from compilation.
301         * platform/gtk/WebKitAuthenticationWidget.cpp: Removed.
302         * platform/gtk/WebKitAuthenticationWidget.h: Removed.
303
304 2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
305
306         Use ASSERT instead of ASSERT_WITH_SECURITY_IMPLICATION
307         https://bugs.webkit.org/show_bug.cgi?id=136732
308
309         Reviewed by Andy Estes.
310
311         Since r173458 changed to use static_cast<> with toFoo, ASSERT_WITH_SECURITY_IMPLICATION doesn't
312         need to be used anymore. ASSERT is enough for it.
313
314         * workers/DefaultSharedWorkerRepository.cpp:
315         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
316         * workers/WorkerMessagingProxy.cpp:
317         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
318         * xml/XMLHttpRequest.cpp:
319         (WebCore::XMLHttpRequest::document):
320
321 2014-09-10  Adenilson Cavalcanti  <cavalcantii@gmail.com>
322
323         [SVG] Cleanup iterator code in SMILTimeContainer using range-based loop
324         https://bugs.webkit.org/show_bug.cgi?id=136720
325
326         Reviewed by Filip Pizlo.
327
328         No new tests, no change on behavior.
329
330         * svg/animation/SMILTimeContainer.cpp:
331         (WebCore::SMILTimeContainer::setElapsed):
332         (WebCore::SMILTimeContainer::updateAnimations):
333
334 2014-09-10  Timothy Horton  <timothy_horton@apple.com>
335
336         Fix the build.
337
338         * platform/network/ResourceHandle.h:
339         * platform/network/mac/ResourceHandleMac.mm:
340
341 2014-09-09  Myles C. Maxfield <mmaxfield@apple.com>  <litherum@gmail.com>
342
343         Delete class SavedDrawingStateForMask
344         https://bugs.webkit.org/show_bug.cgi?id=136498
345
346         Reviewed by Darin Adler.
347
348         This class is left over from when text-decoration-skip: ink used
349         GraphicsContext masking.
350
351         No new tests because there is no behavior change.
352
353         * rendering/InlineTextBox.cpp:
354         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
355         * rendering/InlineTextBox.h:
356         * rendering/TextPainter.cpp:
357         (WebCore::TextPainter::TextPainter):
358         (WebCore::paintTextWithShadows):
359         (WebCore::TextPainter::paintText):
360         * rendering/TextPainter.h:
361         (WebCore::SavedDrawingStateForMask::SavedDrawingStateForMask): Deleted.
362         * rendering/svg/SVGInlineTextBox.cpp:
363         (WebCore::SVGInlineTextBox::paintTextWithShadows):
364
365 2014-09-10  Tim Horton  <timothy_horton@apple.com>
366
367         Call setCollectsTimingData only once, and before making any {CF,NS}URLConnections
368         https://bugs.webkit.org/show_bug.cgi?id=136731
369         <rdar://problem/18252844>
370
371         Reviewed by Simon Fraser.
372
373         * platform/network/cf/ResourceHandleCFNet.cpp:
374         (WebCore::ResourceHandle::start):
375         Move setCollectsTimingData to before createCFURLConnection, so the first connection
376         has timing data associated with it.
377
378         * platform/network/mac/ResourceHandleMac.mm:
379         (WebCore::ResourceHandle::createNSURLConnection):
380         Move setCollectsTimingData to before we create our NSURLConnection, so the first connection
381         has timing data associated with it.
382         Use setCollectsTimingData instead of the NSURLConnection SPI directly.
383
384         (WebCore::ResourceHandle::setCollectsTimingData):
385         Only call _setCollectsTimingData once.
386
387 2014-09-10  Enrica Casucci  <enrica@apple.com>
388
389         Remove iOS-only -webkit-composition-fill-color CSS property.
390         https://bugs.webkit.org/show_bug.cgi?id=136728
391         rdar://problem/10439154
392
393         Reviewed by Tim Horton.
394
395         This property is no longer used on iOS.
396
397         * css/CSSComputedStyleDeclaration.cpp:
398         (WebCore::ComputedStyleExtractor::propertyValue):
399         * css/CSSParser.cpp:
400         (WebCore::CSSParser::parseValue):
401         * css/CSSPropertyNames.in:
402         * css/StyleResolver.cpp:
403         (WebCore::StyleResolver::applyProperty):
404         * editing/EditingStyle.cpp:
405         * platform/graphics/Color.h:
406         * rendering/InlineTextBox.cpp:
407         (WebCore::InlineTextBox::paintCompositionBackground):
408         * rendering/style/RenderStyle.h:
409         * rendering/style/StyleRareInheritedData.cpp:
410         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
411         (WebCore::StyleRareInheritedData::operator==):
412         * rendering/style/StyleRareInheritedData.h:
413
414 2014-09-10  Tim Horton  <timothy_horton@apple.com>
415
416         Remove ImageSource::ShouldSkipMetadata
417         https://bugs.webkit.org/show_bug.cgi?id=136713
418
419         Reviewed by Pratik Solanki.
420
421         * platform/graphics/ImageSource.h:
422         * platform/graphics/cg/ImageSourceCG.cpp:
423         (WebCore::createImageSourceOptions):
424         (WebCore::imageSourceOptions):
425         (WebCore::ImageSource::frameSizeAtIndex):
426         (WebCore::ImageSource::createFrameAtIndex):
427         (WebCore::ImageSource::frameDurationAtIndex):
428         Remove ShouldSkipMetadata and users. Nobody ever uses DoNotSkipMetadata.
429
430 2014-09-10  Beth Dakin  <bdakin@apple.com>
431
432         https://bugs.webkit.org/show_bug.cgi?id=136650
433         Rubber-banding in the DOM view of the WebInspector is really jumpy
434         -and corresponding-
435         rdar://problem/18166043
436
437         Reviewed by Darin Adler.
438
439         This patch implements the ScrollableArea virtual function isRubberBandInProgress() 
440         for RenderLayer, and then uses that to determine whether to clamp the scroll 
441         position in updateScrollInfoAfterLayout().
442         * rendering/RenderLayer.cpp:
443         (WebCore::RenderLayer::isRubberBandInProgress):
444         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
445         * rendering/RenderLayer.h:
446
447 2014-09-10  Tim Horton  <timothy_horton@apple.com>
448
449         Remove a workaround in frameIsCompleteAtIndex for a problem that was fixed in Lion
450         https://bugs.webkit.org/show_bug.cgi?id=136652
451
452         Reviewed by Dan Bernstein.
453
454         * platform/graphics/cg/ImageSourceCG.cpp:
455         (WebCore::ImageSource::frameIsCompleteAtIndex):
456         ImageIO returns the right thing now.
457
458 2014-09-10  Myles C. Maxfield  <mmaxfield@apple.com>
459
460         Laying out a TextRun using an SVG font is O(n^2)
461         https://bugs.webkit.org/show_bug.cgi?id=136584
462
463         Reviewed by Darin Adler.
464
465         Addressing post-commit review from Darin.
466
467         No new tests.
468
469         * platform/graphics/Font.h:
470         (WebCore::Font::treatAsSpace): Un-inline.
471         (WebCore::Font::treatAsZeroWidthSpace): Ditto.
472         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
473         * svg/SVGFontData.cpp:
474         (WebCore::computeNormalizedSpaces): Avoid unnecessary copy.
475
476 2014-09-10  peavo@outlook.com  <peavo@outlook.com>
477
478         [Curl] Optimization; avoid reallocating string many times.
479         https://bugs.webkit.org/show_bug.cgi?id=136704
480
481         Reviewed by Alex Christensen.
482
483         Adding individual characters to a string is inefficient, the string will be reallocated each time.
484
485         * platform/network/curl/CookieJarCurl.cpp:
486         (WebCore::readCurlCookieToken):
487
488 2014-09-10  peavo@outlook.com  <peavo@outlook.com>
489
490         [Curl] Compile error, CertificateInfo.h is not found.
491         https://bugs.webkit.org/show_bug.cgi?id=136703
492
493         Reviewed by Alex Christensen.
494
495         Curl also needs to implement the CertificateInfo class.
496
497         * platform/network/curl/CertificateInfo.h: Added.
498         (WebCore::CertificateInfo::CertificateInfo):
499
500 2014-09-10  Simon Fraser  <simon.fraser@apple.com>
501
502         Clean up some ENABLE(PICTURE_SIZES) stuff, don't change function signatures inside #ifdefs
503         https://bugs.webkit.org/show_bug.cgi?id=136654
504
505         Reviewed by Darin Adler.
506
507         Adding parameters inside an #ifdef makes for unreadable code, so remove some
508         #if ENABLE(PICTURE_SIZES) related to the preload scanner and always pass the arguments.
509         Reduced the argument count on some functions by just passing a Document&. 
510         
511         Also fix a couple of uses of #if ENABLE_PICTURE_SIZES.
512
513         * html/HTMLImageElement.h:
514         * html/parser/HTMLDocumentParser.cpp:
515         (WebCore::HTMLDocumentParser::pumpTokenizer):
516         (WebCore::HTMLDocumentParser::insert):
517         (WebCore::HTMLDocumentParser::append):
518         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
519         * html/parser/HTMLPreloadScanner.cpp:
520         (WebCore::TokenPreloadScanner::scan):
521         (WebCore::HTMLPreloadScanner::scan):
522         * html/parser/HTMLPreloadScanner.h:
523         * html/parser/HTMLSrcsetParser.cpp:
524         (WebCore::pickBestImageCandidate):
525         (WebCore::bestFitSourceForImageAttributes):
526         * html/parser/HTMLSrcsetParser.h:
527
528 2014-09-10  Chris Fleizach  <cfleizach@apple.com>
529
530         AX: aria-labelledby is not honoring sub-node text
531         https://bugs.webkit.org/show_bug.cgi?id=136689
532
533         Reviewed by Mario Sanchez Prada.
534
535         Test: accessibility/aria-labelledby-with-descendants.html
536
537         When aria-labelledby retrieves the textUnderElements it needs to consider
538         all sub-children, including focusable content.
539
540         * accessibility/AccessibilityNodeObject.cpp:
541         (WebCore::accessibleNameForNode):
542
543 2014-09-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
544
545         Use toDocument instead of static_cast<Document*>
546         https://bugs.webkit.org/show_bug.cgi?id=136694
547
548         Reviewed by Andy Estes.
549
550         Clean up static_cast<Document*>.
551
552         * Modules/mediasource/SourceBuffer.cpp:
553         (WebCore::SourceBuffer::document):
554         * Modules/webaudio/AudioContext.cpp:
555         (WebCore::AudioContext::document):
556         * bindings/gobject/WebKitDOMPrivate.cpp:
557         (WebKit::wrap):
558         * dom/ScriptExecutionContext.cpp:
559         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Add a line to remove .get().
560         * workers/DefaultSharedWorkerRepository.cpp:
561         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
562         * workers/WorkerMessagingProxy.cpp:
563         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
564         * xml/XMLHttpRequest.cpp:
565         (WebCore::XMLHttpRequest::document):
566         (WebCore::XMLHttpRequest::open):
567
568 2014-09-10  Yusuke Suzuki  <utatane.tea@gmail.com>
569
570         Merge CheckingContexts from SelectorCompiler and SelectorChecker
571         https://bugs.webkit.org/show_bug.cgi?id=135255
572
573         Reviewed by Benjamin Poulain.
574
575         In this patch, we merge SelectorChecker::SelectorCheckingContext and SelectorCompiler::CheckingContext.
576         We expose only SelectorChecker::CheckingContext. That is the same to the old SelectorCompiler::CheckingContext.
577
578         In SelectorChecker.cpp, we define SelectorChecker::CheckingContextWithStatus and use it internally.
579         And we move VisitedMatchType from SelectorChecker.h to SelectorChecker.cpp.
580
581         VisitedMatchType is also explicitly used by SelectorCheckerFastPath. However, SelectorCheckerFastPath is now
582         used only from SelectorQuery (Style resolution algorithm no longer uses it: r171059).
583         In this patch, we remove SelectorCheckerFastPath since the major cases are covered by CSS JIT.
584         In `RightMostWithIdMatch`, `Element#matches` and multiple selectors `querySelector('a, b')` cases,
585         CSS JIT is not used. So dropping fast path affects them. But 1) these cases are rare or 2) the target node
586         is typically only one since nodes are filtered before matching. So it doesn't have performance regression.
587
588         And now since CheckingContextWithStatus is the derived class of CheckingContext, we can use
589         the same test functions; template parameter is not necessary. It reduces code size.
590
591         * CMakeLists.txt:
592         * WebCore.xcodeproj/project.pbxproj:
593         * css/CSSAllInOne.cpp:
594         * css/ElementRuleCollector.cpp:
595         (WebCore::ElementRuleCollector::ruleMatches):
596         * css/SelectorChecker.cpp:
597         (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
598         (WebCore::SelectorChecker::match):
599         (WebCore::checkingContextForParent):
600         (WebCore::SelectorChecker::matchRecursively):
601         (WebCore::canMatchHoverOrActiveInQuirksMode):
602         (WebCore::SelectorChecker::checkOne):
603         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
604         * css/SelectorChecker.h:
605         (WebCore::SelectorChecker::CheckingContext::CheckingContext):
606         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext): Deleted.
607         * css/SelectorCheckerFastPath.cpp: Removed.
608         * css/SelectorCheckerFastPath.h: Removed.
609         * css/SelectorCheckerTestFunctions.h:
610         (WebCore::scrollbarMatchesEnabledPseudoClass):
611         (WebCore::scrollbarMatchesDisabledPseudoClass):
612         (WebCore::scrollbarMatchesHoverPseudoClass):
613         (WebCore::scrollbarMatchesActivePseudoClass):
614         (WebCore::scrollbarMatchesHorizontalPseudoClass):
615         (WebCore::scrollbarMatchesVerticalPseudoClass):
616         (WebCore::scrollbarMatchesDecrementPseudoClass):
617         (WebCore::scrollbarMatchesIncrementPseudoClass):
618         (WebCore::scrollbarMatchesStartPseudoClass):
619         (WebCore::scrollbarMatchesEndPseudoClass):
620         (WebCore::scrollbarMatchesDoubleButtonPseudoClass):
621         (WebCore::scrollbarMatchesSingleButtonPseudoClass):
622         (WebCore::scrollbarMatchesNoButtonPseudoClass):
623         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
624         * css/StyleResolver.h:
625         (WebCore::checkRegionSelector):
626         * cssjit/SelectorCompiler.cpp:
627         (WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
628         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
629         (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
630         (WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
631         (WebCore::SelectorCompiler::elementIsActiveForStyleResolution):
632         (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary):
633         (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution):
634         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
635         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
636         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
637         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
638         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
639         * cssjit/SelectorCompiler.h:
640         (WebCore::SelectorCompiler::CheckingContext::CheckingContext): Deleted.
641         * dom/SelectorQuery.cpp:
642         (WebCore::SelectorDataList::SelectorDataList):
643         (WebCore::SelectorDataList::selectorMatches):
644         (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
645         (WebCore::isCompiledSelector):
646         (WebCore::SelectorDataList::compileSelector):
647         (WebCore::SelectorDataList::execute):
648         * dom/SelectorQuery.h:
649         (WebCore::SelectorDataList::SelectorData::SelectorData):
650
651 2014-09-09  Jer Noble  <jer.noble@apple.com>
652
653         [MSE] http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html failing after r173318
654         https://bugs.webkit.org/show_bug.cgi?id=136676
655
656         Reviewed by Eric Carlson.
657
658         Revert the inadvertant conditional change introduced in r173318.
659
660         * Modules/mediasource/MediaSource.cpp:
661         (WebCore::MediaSource::setDurationInternal):
662
663 2014-09-09  Roger Fong  <roger_fong@apple.com>
664
665         Unreviewed build fix for Windows.
666
667         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
668         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
669         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
670
671 2014-09-09  Dan Bernstein  <mitz@apple.com>
672
673         FrameLoader::prepareForHistoryNavigation is unused
674         https://bugs.webkit.org/show_bug.cgi?id=136683
675
676         Reviewed by Tim Horton.
677
678         * loader/FrameLoader.cpp:
679         (WebCore::FrameLoader::prepareForHistoryNavigation): Deleted.
680         * loader/FrameLoader.h: Removed the declaration.
681
682 2014-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
683
684         [CSS Grid Layout] Ignore ::first-letter pseudo-element
685         https://bugs.webkit.org/show_bug.cgi?id=136625
686
687         Reviewed by Darin Adler.
688
689         According to the spec the ::first-letter pseudo-element do not apply to
690         grid containers (neither to flexboxes).
691
692         Fixed issue in RenderBlock::getFirstLetter() that applies to both grids
693         and flexboxes. Basically if the grid's or flexbox's container was
694         defining the ::first-line pseudo-element and the grid or flexbox itself
695         too, the value from the grid or flexbox was being applied to the items.
696         Added the proper check to avoid this.
697
698         Added two new tests for grid and modified one flexbox test to cover the
699         issue explained above.
700
701         Tests: css3/flexbox/flexbox-ignore-container-firstLetter.html
702                fast/css-grid-layout/grid-container-ignore-first-letter.html
703                fast/css-grid-layout/grid-item-first-letter-valid.html
704
705         * rendering/RenderBlock.cpp:
706         (WebCore::isRenderBlockFlowOrRenderButton): New method refactoring
707         similar calls through the source code.
708         (WebCore::RenderBlock::firstLineBlock): Use
709         isRenderBlockFlowOrRenderButton().
710         (WebCore::findFirstLetterBlock): Modify it to use
711         isRenderBlockFlowOrRenderButton() in order to include grids and not only
712         check flexboxes.
713         (WebCore::RenderBlock::getFirstLetter): Use
714         isRenderBlockFlowOrRenderButton().
715         (WebCore::RenderBlock::updateFirstLetter): Early return if
716         firstLetterContainer is null (in the case of flexboxes or grids).
717
718 2014-09-09  Benjamin Poulain  <benjamin@webkit.org>
719
720         Add support for :read-write/:read-only matching editable content
721         https://bugs.webkit.org/show_bug.cgi?id=136668
722
723         Reviewed by Antti Koivisto.
724
725         This is the second part of the update of :read-write/:read-only to the latest spec
726         (http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selectors).
727
728         The selectors :read-write/:read-only should match elements that are editable. The exact definition is:
729         "elements that are editing hosts or editable and are neither input elements nor textarea elements".
730
731         Matching that definition is really easy. It was done by updating HTMLElement's matchesReadWritePseudoClass()
732         to consider both contentEditable and designMode.
733
734         The tricky part is making that efficient in all cases. Matching contentEditable is horribly inefficient
735         compared to the other primitives. We don't want to execute that for every element.
736
737         Since matchesReadWritePseudoClass() was used by the theming code, that code was adjusted to
738         -Avoid calling that on regular HTMLElement, limiting the query to <input> and <textarea> where it is fast.
739         -Avoid the call entirely when possible.
740
741         Tests: fast/css/read-only-read-write-contenteditable-basics.html
742                fast/css/read-only-read-write-designmode-basics.html
743                fast/css/read-only-read-write-webkit-user-modify.html
744                fast/selectors/read-only-read-write-contenteditable-basics.html
745                fast/selectors/read-only-read-write-contenteditable-svg-foreignObject.html
746                fast/selectors/read-only-read-write-designmode-basics.html
747                fast/selectors/read-only-read-write-style-update.html
748
749         * html/HTMLElement.cpp:
750         (WebCore::contentEditableType):
751         This code is a generalization of the code that was in HTMLElement::contentEditable().
752         It is used by both matchesReadWritePseudoClass() and contentEditable() to determine
753         a valid state from the value of contentEditable.
754
755         (WebCore::HTMLElement::matchesReadWritePseudoClass):
756         Per the definition of editable content, we first check if the current element is an editing host,
757         if not we look for an editing host. If there are none, test for designMode.
758
759         (WebCore::HTMLElement::contentEditable):
760
761         (WebCore::RenderTheme::isReadOnlyControl):
762         The old definition would only match <input> and <textarea>. The code was updated to keep the same
763         behavior after matchesReadWritePseudoClass() is udpated. This avoids the performance problem of calling
764         matchesReadWritePseudoClass() on regular HTMLElement.
765
766         * platform/ControlStates.h:
767         ReadOnlyState was only used by ThemeMac for convertControlStatesToThemeDrawState().
768         In turn, convertControlStatesToThemeDrawState() was only used for painting
769         "-webkit-inner-spin-button". Buttons are not read-write to begin with.
770         The whole code looks like legacy from styling of input elements and was removed.
771
772         Removing ReadOnlyState removes the expensive part of extractControlStatesForRenderer().
773
774         * html/HTMLElement.h:
775         * html/HTMLFormControlElement.cpp:
776         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
777         * platform/mac/ThemeMac.mm:
778         (WebCore::convertControlStatesToThemeDrawState):
779         * rendering/RenderTheme.cpp:
780         (WebCore::RenderTheme::extractControlStatesForRenderer):
781
782 2014-09-09  Jer Noble  <jer.noble@apple.com>
783
784         [MSE] media/media-source tests broken after r173318
785         https://bugs.webkit.org/show_bug.cgi?id=136675
786
787         Reviewed by Eric Carlson.
788
789         Fixes the following tests:
790             http/tests/media/media-source/mediasource-play.html
791             http/tests/media/media-source/mediasource-remove.html
792             media/media-source/media-source-monitor-source-buffers.html
793             media/media-source/media-source-overlapping-append-buffered.html   
794
795         In r173318, a for loop was converted to a C++11 loop, but in so doing, left
796         pre-initialized, empty values in the beginning of returned Vector, which caused
797         the calling algorithm to miscalculate the amount of data buffered by the media
798         source.
799
800         * Modules/mediasource/MediaSource.cpp:
801         (WebCore::MediaSource::activeRanges):
802
803 2014-09-09  Takeshi Kurosawa  <taken.spc@gmail.com>
804
805         AX: HTML5 landmark (and related) elements should not be ignored.
806         https://bugs.webkit.org/show_bug.cgi?id=135116
807
808         Reviewed by Chris Fleizach.
809
810         Make sure following element should not be ignored in computeAccessibilityIsIgnored
811         - header, aside, address, main, nav, article, section
812         - dt, dd
813
814         Tests: platform/mac/accessibility/descriptionlist-not-ignored.html
815                platform/mac/accessibility/landmark-not-ignored.html
816
817         * accessibility/AccessibilityRenderObject.cpp:
818         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
819
820 2014-09-08  Sergio Villar Senin  <svillar@igalia.com>
821
822         [CSS Grid Layout] RenderGrid methods should take RenderBox references
823         https://bugs.webkit.org/show_bug.cgi?id=136630
824
825         Reviewed by Darin Adler.
826
827         RenderGrid has several methods that take pointers to RenderBox
828         instances but the body of those methods assumes that the objects
829         will never be NULL. We should replace them by references.
830
831         * rendering/RenderGrid.cpp:
832         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
833         (WebCore::RenderGrid::logicalContentHeightForChild):
834         (WebCore::RenderGrid::minContentForChild):
835         (WebCore::RenderGrid::maxContentForChild):
836         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
837         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
838         (WebCore::RenderGrid::insertItemIntoGrid):
839         (WebCore::RenderGrid::placeItemsOnGrid):
840         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
841         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
842         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
843         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
844         (WebCore::RenderGrid::layoutGridItems):
845         (WebCore::RenderGrid::cachedGridCoordinate):
846         (WebCore::RenderGrid::gridAreaBreadthForChild):
847         (WebCore::RenderGrid::findChildLogicalPosition):
848         * rendering/RenderGrid.h:
849
850 2014-09-09  Antti Koivisto  <antti@apple.com>
851
852         Remove unnecessary assert that is getting hit in some scenarios.
853
854         * platform/network/ResourceResponseBase.cpp:
855         (WebCore::ResourceResponseBase::certificateInfo):
856
857 2014-09-09  Antti Koivisto  <antti@apple.com>
858
859         Try to fix windows build.
860
861         * platform/network/cf/ResourceResponseCFNet.cpp:
862         (WebCore::ResourceResponse::platformCertificateInfo):
863
864 2014-09-08  Mihnea Ovidenie  <mihnea@adobe.com>
865
866         [CSSRegions]Incorrect layout for multicol element transformed into region
867         https://bugs.webkit.org/show_bug.cgi?id=136459
868
869         Reviewed by David Hyatt.
870
871         Until we will support the multicolumn region functionality, a multicolumn element
872         that also has flow-from style is not transformed into a region (https://bugs.webkit.org/show_bug.cgi?id=135153).
873         However, when a multicolumn element with flow-from style dynamically loses
874         its multicolumn style while keeping the flow-from style, we have to transform
875         the element into a region by detaching and attaching the associated DOM node,
876         in the same way we are proceeding when an element receives a different flow-from style.
877
878         Test: fast/regions/multicol/nested-multicol-into-region-dynamic.html
879
880         * style/StyleResolveTree.cpp:
881         (WebCore::Style::determineChange):
882
883 2014-09-08  Antti Koivisto  <antti@apple.com>
884
885         Pass certificate info as part of ResourceResponse
886         https://bugs.webkit.org/show_bug.cgi?id=136611
887
888         Reviewed by Darin Adler.
889
890         The current way of passing certificate info separately from ResourceResponse and then jamming it back
891         is complex and confusing. This patch makes it a true part of the ResourceResponse.
892
893         With this patch we also only create and pass the certificate info object for the main resource. It is
894         a big and complex object and we never look into it for any other resource type.
895
896         * WebCore.exp.in:
897         * platform/network/ResourceResponseBase.cpp:
898         (WebCore::ResourceResponseBase::ResourceResponseBase):
899
900             Mark initialized for synthetic responses, unitialized for those backed by a platform request.
901
902         (WebCore::ResourceResponseBase::initializeCertificateInfo):
903
904             Calling this pulls the certificate info out from the platform type.
905             It shoud only be used for resources that need it.
906
907         (WebCore::ResourceResponseBase::certificateInfo):
908         * platform/network/ResourceResponseBase.h:
909         (WebCore::ResourceResponseBase::platformCertificateInfo):
910         (WebCore::ResourceResponseBase::platformSuggestedFileName):
911         (WebCore::ResourceResponseBase::encode):
912         (WebCore::ResourceResponseBase::decode):
913
914             Encode and decode certificate info if it is present.
915
916         * platform/network/cf/ResourceResponse.h:
917         * platform/network/mac/CertificateInfo.h:
918         * platform/network/mac/CertificateInfoMac.mm:
919         (WebCore::CertificateInfo::CertificateInfo):
920         * platform/network/mac/ResourceResponseMac.mm:
921         (WebCore::ResourceResponse::platformCertificateInfo):
922         (WebCore::ResourceResponse::setCertificateChain): Deleted.
923         (WebCore::ResourceResponse::certificateChain): Deleted.
924         * platform/network/soup/ResourceResponse.h:
925         * platform/network/soup/ResourceResponseSoup.cpp:
926         (WebCore::ResourceResponse::platformCertificateInfo):
927
928 2014-09-09  Mihnea Ovidenie  <mihnea@adobe.com>
929
930         [CSSRegions] Use C++11 range-based loops in FlowThreadController
931         https://bugs.webkit.org/show_bug.cgi?id=136634
932
933         Reviewed by Andrei Bucur.
934
935         No new tests as no new functionality was introduced.
936
937         * rendering/FlowThreadController.cpp:
938         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
939         (WebCore::FlowThreadController::styleDidChange):
940         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
941         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
942         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
943         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
944         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
945         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
946         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
947         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
948         (WebCore::FlowThreadController::collectFixedPositionedLayers):
949         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
950
951 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
952
953         Minor refactor in CSSComputedStyleDeclaration
954         https://bugs.webkit.org/show_bug.cgi?id=136664
955
956         Reviewed by Darin Adler.
957
958         The "if (length.isPercentNotCalculated()) createValue() else zoomAdjustedPixelValue()"
959         pattern occurred a number of times here, so factor into percentageOrZoomAdjustedValue().
960
961         * css/CSSComputedStyleDeclaration.cpp:
962         (WebCore::positionOffsetValue): l -> length
963         (WebCore::percentageOrZoomAdjustedValue):
964         (WebCore::getBorderRadiusCornerValues):
965         (WebCore::getBorderRadiusCornerValue):
966         (WebCore::scrollSnapDestination):
967         (WebCore::scrollSnapPoints):
968         (WebCore::scrollSnapCoordinates):
969
970 2014-09-08  Alexey Proskuryakov  <ap@apple.com>
971
972         Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups" error "no such table: CacheGroups"
973         https://bugs.webkit.org/show_bug.cgi?id=136647
974
975         Reviewed by Darin Adler.
976
977         * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
978         Don't try to delete the tables if we can't expect to have them yet.
979
980 2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
981
982         REGRESSION (r172153): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
983         https://bugs.webkit.org/show_bug.cgi?id=136612
984
985         Reviewed by Darin Adler.
986
987         r172153 was fundamentally broken, and would restore graphics contexts that had never been saved. This patch
988         reimplements r172153 by using "continue" to skip loop iterations instead of changing the internal logic of
989         the loop.
990
991         In addition, I have refactored InlineTextBox::applyShadowToGraphicsContext() to take an extra boolean
992         reference as an out parameter in order to make it obvious it if saved a graphics context that needs
993         to be restored. This should make it less likely to make these kinds of mistakes in the future.
994
995         Test: fast/text/empty-shadow-with-color.html
996
997         * rendering/InlineTextBox.cpp:
998         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Add bool reference out param.
999         * rendering/InlineTextBox.h: Ditto.
1000         * rendering/TextPainter.cpp:
1001         (WebCore::isEmptyShadow): Change logic to not skip loop iterations on a null shadow.
1002         (WebCore::paintTextWithShadows): Use continue to skip loop iterations for empty shadows. In addition,
1003         use the out param in InlineTextBox::applyShadowToGraphicsContext().
1004         * rendering/svg/SVGInlineTextBox.cpp:
1005         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update for new sigurature of
1006         InlineTextBox::applyShadowToGraphicsContext().
1007
1008 2014-09-08  Commit Queue  <commit-queue@webkit.org>
1009
1010         Unreviewed, rolling out r173402.
1011         https://bugs.webkit.org/show_bug.cgi?id=136649
1012
1013         Breaking buildw with error "unable to restore file position to
1014         0x00000c60 for section __DWARF.__debug_info (errno = 9)"
1015         (Requested by mlam_ on #webkit).
1016
1017         Reverted changeset:
1018
1019         "Move CallFrame and Register inlines functions out of
1020         JSScope.h."
1021         https://bugs.webkit.org/show_bug.cgi?id=136579
1022         http://trac.webkit.org/changeset/173402
1023
1024 2014-09-05  Mark Lam  <mark.lam@apple.com>
1025
1026         Move CallFrame and Register inlines functions out of JSScope.h.
1027         <https://webkit.org/b/136579>
1028
1029         Reviewed by Geoffrey Garen.
1030
1031         No new tests.
1032
1033         Added #include of the appropriate *Inlines.h files.  Unlike in
1034         JavaScriptCore, I #include'd the specific needed *Inlines.h instead of
1035         JSCInlines.h.  This is done to minimize the need for WebCore to be
1036         rebuilt when JSC changes are introduced.
1037
1038         * ForwardingHeaders/interpreter/RegisterInlines.h: Added.
1039         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
1040         * bindings/js/JSAudioTrackCustom.cpp:
1041         * bindings/js/JSBiquadFilterNodeCustom.cpp:
1042         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1043         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1044         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1045         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1046         * bindings/js/JSDOMBinding.h:
1047         * bindings/js/JSDOMStringListCustom.cpp:
1048         * bindings/js/JSDOMWindowBase.cpp:
1049         * bindings/js/JSDOMWindowShell.cpp:
1050         * bindings/js/JSDocumentCustom.cpp:
1051         * bindings/js/JSHTMLDocumentCustom.cpp:
1052         * bindings/js/JSOscillatorNodeCustom.cpp:
1053         * bindings/js/JSPannerNodeCustom.cpp:
1054         * bindings/js/JSPopStateEventCustom.cpp:
1055         * dom/TreeWalker.cpp:
1056         * html/HTMLPlugInImageElement.cpp:
1057         * inspector/CommandLineAPIModule.cpp:
1058         * inspector/InspectorController.cpp:
1059
1060 2014-09-08  Dean Jackson  <dino@apple.com>
1061
1062         Separate the Apple media controls module from other ports
1063         https://bugs.webkit.org/show_bug.cgi?id=136644
1064         rdar://problem/18270969
1065
1066         Reviewed by Eric Carlson.
1067
1068         Make a mediaControlsBase.{js|css} that acts as the base
1069         class for the EFL and GTK ports (they were using mediaControlsApple).
1070         Over time, the Apple-specific controls may use more of the
1071         Base class.
1072
1073         * Modules/mediacontrols/mediaControlsBase.css: Added.
1074         * Modules/mediacontrols/mediaControlsBase.js: Added.
1075         * PlatformEfl.cmake:
1076         * PlatformGTK.cmake:
1077         * platform/efl/RenderThemeEfl.cpp:
1078         (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Load Base rather than Apple.
1079         (WebCore::RenderThemeEfl::mediaControlsScript): Ditto.
1080         * rendering/RenderThemeGtk.cpp:
1081         (WebCore::RenderThemeGtk::mediaControlsScript): Ditto.
1082
1083 2014-09-08  Jochen Eisinger  <jochen@chromium.org>
1084
1085         Always update the referrer header in CachedResource
1086         https://bugs.webkit.org/show_bug.cgi?id=136642
1087
1088         Reviewed by Alexey Proskuryakov.
1089
1090         If a request already includes a referrer header, and the document has
1091         a non-default referrer policy, it is possible that we have to modify
1092         the referrer header.
1093
1094         * loader/cache/CachedResource.cpp:
1095         (WebCore::CachedResource::addAdditionalRequestHeaders):
1096
1097 2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1098
1099         Remove FILTERS flag
1100         https://bugs.webkit.org/show_bug.cgi?id=136571
1101
1102         Reviewed by Darin Adler.
1103
1104         No new tests required, no new functionality.
1105
1106         * CMakeLists.txt:
1107         * Configurations/FeatureDefines.xcconfig:
1108         * DerivedSources.make:
1109         * dom/DOMImplementation.cpp:
1110         (WebCore::isSupportedSVG10Feature):
1111         (WebCore::isSupportedSVG11Feature):
1112         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
1113         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
1114         * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h:
1115         * platform/graphics/cpu/arm/filters/NEONHelpers.h:
1116         * platform/graphics/filters/DistantLightSource.cpp:
1117         * platform/graphics/filters/DistantLightSource.h:
1118         * platform/graphics/filters/FEBlend.cpp:
1119         * platform/graphics/filters/FEBlend.h:
1120         * platform/graphics/filters/FEColorMatrix.cpp:
1121         * platform/graphics/filters/FEColorMatrix.h:
1122         * platform/graphics/filters/FEComponentTransfer.cpp:
1123         * platform/graphics/filters/FEComponentTransfer.h:
1124         * platform/graphics/filters/FEComposite.cpp:
1125         * platform/graphics/filters/FEComposite.h:
1126         * platform/graphics/filters/FEConvolveMatrix.cpp:
1127         * platform/graphics/filters/FEConvolveMatrix.h:
1128         * platform/graphics/filters/FEDiffuseLighting.cpp:
1129         * platform/graphics/filters/FEDiffuseLighting.h:
1130         * platform/graphics/filters/FEDisplacementMap.cpp:
1131         * platform/graphics/filters/FEDisplacementMap.h:
1132         * platform/graphics/filters/FEDropShadow.cpp:
1133         * platform/graphics/filters/FEDropShadow.h:
1134         * platform/graphics/filters/FEFlood.cpp:
1135         * platform/graphics/filters/FEFlood.h:
1136         * platform/graphics/filters/FEGaussianBlur.cpp:
1137         * platform/graphics/filters/FEGaussianBlur.h:
1138         * platform/graphics/filters/FELighting.cpp:
1139         * platform/graphics/filters/FELighting.h:
1140         * platform/graphics/filters/FEMerge.cpp:
1141         * platform/graphics/filters/FEMerge.h:
1142         * platform/graphics/filters/FEMorphology.cpp:
1143         * platform/graphics/filters/FEMorphology.h:
1144         * platform/graphics/filters/FEOffset.cpp:
1145         * platform/graphics/filters/FEOffset.h:
1146         * platform/graphics/filters/FESpecularLighting.cpp:
1147         * platform/graphics/filters/FESpecularLighting.h:
1148         * platform/graphics/filters/FETile.cpp:
1149         * platform/graphics/filters/FETile.h:
1150         * platform/graphics/filters/FETurbulence.cpp:
1151         * platform/graphics/filters/FETurbulence.h:
1152         * platform/graphics/filters/Filter.h:
1153         * platform/graphics/filters/FilterEffect.cpp:
1154         * platform/graphics/filters/FilterEffect.h:
1155         * platform/graphics/filters/LightSource.h:
1156         * platform/graphics/filters/PointLightSource.cpp:
1157         * platform/graphics/filters/PointLightSource.h:
1158         * platform/graphics/filters/SourceAlpha.cpp:
1159         * platform/graphics/filters/SourceAlpha.h:
1160         * platform/graphics/filters/SourceGraphic.cpp:
1161         * platform/graphics/filters/SourceGraphic.h:
1162         * platform/graphics/filters/SpotLightSource.cpp:
1163         * platform/graphics/filters/SpotLightSource.h:
1164         * rendering/svg/RenderSVGResource.cpp:
1165         (WebCore::removeFromCacheAndInvalidateDependencies):
1166         * rendering/svg/RenderSVGResourceFilter.cpp:
1167         * rendering/svg/RenderSVGResourceFilter.h:
1168         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1169         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
1170         * rendering/svg/RenderSVGRoot.cpp:
1171         * rendering/svg/SVGRenderSupport.cpp:
1172         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
1173         * rendering/svg/SVGRenderTreeAsText.cpp:
1174         (WebCore::writeSVGResourceContainer):
1175         (WebCore::writeResources):
1176         * rendering/svg/SVGRenderingContext.cpp:
1177         (WebCore::SVGRenderingContext::~SVGRenderingContext):
1178         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1179         * rendering/svg/SVGRenderingContext.h:
1180         (WebCore::SVGRenderingContext::SVGRenderingContext):
1181         * rendering/svg/SVGResources.cpp:
1182         (WebCore::targetReferenceFromResource):
1183         (WebCore::SVGResources::buildCachedResources):
1184         (WebCore::SVGResources::removeClientFromCache):
1185         (WebCore::SVGResources::resourceDestroyed):
1186         (WebCore::SVGResources::buildSetOfResources):
1187         (WebCore::SVGResources::resetFilter):
1188         (WebCore::SVGResources::dump):
1189         * rendering/svg/SVGResources.h:
1190         (WebCore::SVGResources::filter):
1191         (WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData):
1192         * rendering/svg/SVGResourcesCycleSolver.cpp:
1193         (WebCore::SVGResourcesCycleSolver::breakCycle):
1194         * svg/SVGAnimatedEnumeration.cpp:
1195         (WebCore::enumerationValueForTargetAttribute):
1196         * svg/SVGComponentTransferFunctionElement.cpp:
1197         * svg/SVGComponentTransferFunctionElement.h:
1198         * svg/SVGComponentTransferFunctionElement.idl:
1199         * svg/SVGFEBlendElement.cpp:
1200         * svg/SVGFEBlendElement.h:
1201         * svg/SVGFEBlendElement.idl:
1202         * svg/SVGFEColorMatrixElement.cpp:
1203         * svg/SVGFEColorMatrixElement.h:
1204         * svg/SVGFEColorMatrixElement.idl:
1205         * svg/SVGFEComponentTransferElement.cpp:
1206         * svg/SVGFEComponentTransferElement.h:
1207         * svg/SVGFEComponentTransferElement.idl:
1208         * svg/SVGFECompositeElement.cpp:
1209         * svg/SVGFECompositeElement.h:
1210         * svg/SVGFECompositeElement.idl:
1211         * svg/SVGFEConvolveMatrixElement.cpp:
1212         * svg/SVGFEConvolveMatrixElement.h:
1213         * svg/SVGFEConvolveMatrixElement.idl:
1214         * svg/SVGFEDiffuseLightingElement.cpp:
1215         * svg/SVGFEDiffuseLightingElement.h:
1216         * svg/SVGFEDiffuseLightingElement.idl:
1217         * svg/SVGFEDisplacementMapElement.cpp:
1218         * svg/SVGFEDisplacementMapElement.h:
1219         * svg/SVGFEDisplacementMapElement.idl:
1220         * svg/SVGFEDistantLightElement.cpp:
1221         * svg/SVGFEDistantLightElement.h:
1222         * svg/SVGFEDistantLightElement.idl:
1223         * svg/SVGFEDropShadowElement.cpp:
1224         * svg/SVGFEDropShadowElement.h:
1225         * svg/SVGFEDropShadowElement.idl:
1226         * svg/SVGFEFloodElement.cpp:
1227         * svg/SVGFEFloodElement.h:
1228         * svg/SVGFEFloodElement.idl:
1229         * svg/SVGFEFuncAElement.cpp:
1230         * svg/SVGFEFuncAElement.h:
1231         * svg/SVGFEFuncAElement.idl:
1232         * svg/SVGFEFuncBElement.cpp:
1233         * svg/SVGFEFuncBElement.h:
1234         * svg/SVGFEFuncBElement.idl:
1235         * svg/SVGFEFuncGElement.cpp:
1236         * svg/SVGFEFuncGElement.h:
1237         * svg/SVGFEFuncGElement.idl:
1238         * svg/SVGFEFuncRElement.cpp:
1239         * svg/SVGFEFuncRElement.h:
1240         * svg/SVGFEFuncRElement.idl:
1241         * svg/SVGFEGaussianBlurElement.cpp:
1242         * svg/SVGFEGaussianBlurElement.h:
1243         * svg/SVGFEGaussianBlurElement.idl:
1244         * svg/SVGFEImageElement.cpp:
1245         * svg/SVGFEImageElement.h:
1246         * svg/SVGFEImageElement.idl:
1247         * svg/SVGFELightElement.cpp:
1248         * svg/SVGFELightElement.h:
1249         * svg/SVGFEMergeElement.cpp:
1250         * svg/SVGFEMergeElement.h:
1251         * svg/SVGFEMergeElement.idl:
1252         * svg/SVGFEMergeNodeElement.cpp:
1253         * svg/SVGFEMergeNodeElement.h:
1254         * svg/SVGFEMergeNodeElement.idl:
1255         * svg/SVGFEMorphologyElement.cpp:
1256         * svg/SVGFEMorphologyElement.h:
1257         * svg/SVGFEMorphologyElement.idl:
1258         * svg/SVGFEOffsetElement.cpp:
1259         * svg/SVGFEOffsetElement.h:
1260         * svg/SVGFEOffsetElement.idl:
1261         * svg/SVGFEPointLightElement.cpp:
1262         * svg/SVGFEPointLightElement.h:
1263         * svg/SVGFEPointLightElement.idl:
1264         * svg/SVGFESpecularLightingElement.cpp:
1265         * svg/SVGFESpecularLightingElement.h:
1266         * svg/SVGFESpecularLightingElement.idl:
1267         * svg/SVGFESpotLightElement.cpp:
1268         * svg/SVGFESpotLightElement.h:
1269         * svg/SVGFESpotLightElement.idl:
1270         * svg/SVGFETileElement.cpp:
1271         * svg/SVGFETileElement.h:
1272         * svg/SVGFETileElement.idl:
1273         * svg/SVGFETurbulenceElement.cpp:
1274         * svg/SVGFETurbulenceElement.h:
1275         * svg/SVGFETurbulenceElement.idl:
1276         * svg/SVGFilterElement.cpp:
1277         * svg/SVGFilterElement.h:
1278         * svg/SVGFilterElement.idl:
1279         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1280         * svg/SVGFilterPrimitiveStandardAttributes.h:
1281         * svg/graphics/filters/SVGFEImage.cpp:
1282         * svg/graphics/filters/SVGFEImage.h:
1283         * svg/graphics/filters/SVGFilter.cpp:
1284         * svg/graphics/filters/SVGFilter.h:
1285         * svg/graphics/filters/SVGFilterBuilder.cpp:
1286         * svg/graphics/filters/SVGFilterBuilder.h:
1287         * svg/svgtags.in:
1288
1289 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
1290
1291         Use enum class for the RunPostLayoutTasks enum
1292         https://bugs.webkit.org/show_bug.cgi?id=136640
1293
1294         Reviewed by Dean Jackson.
1295
1296         Use enum class for RunPostLayoutTasks fixing callers. Add an explanatory comment,
1297         and add some spacing.
1298
1299         * dom/Document.cpp:
1300         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1301         * dom/Document.h:
1302         * html/HTMLAppletElement.cpp:
1303         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
1304         * html/HTMLEmbedElement.cpp:
1305         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
1306         * html/HTMLObjectElement.cpp:
1307         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
1308         * testing/Internals.cpp:
1309         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
1310
1311 2014-09-08  peavo@outlook.com  <peavo@outlook.com>
1312
1313         [WinCairo] Compile error.
1314         https://bugs.webkit.org/show_bug.cgi?id=136633
1315
1316         Reviewed by Darin Adler.
1317
1318         Enum name has already been defined.
1319
1320         * platform/audio/AudioHardwareListener.h:
1321
1322 2014-09-08  Tim Horton  <timothy_horton@apple.com>
1323
1324         Remove some unused code in ImageSourceCG
1325         https://bugs.webkit.org/show_bug.cgi?id=136638
1326
1327         Reviewed by Dan Bernstein.
1328
1329         * platform/graphics/cg/ImageSourceCG.cpp:
1330         (WebCore::ImageSource::setData):
1331         Remove this code. Firstly, it's in a USE(CG) && !PLATFORM(COCOA) && !PLATFORM(WIN)
1332         block, and that's simply not a thing. Secondly, the referenced bug was fixed in Lion.
1333
1334 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1335
1336         Introduce CSS_RULE_TYPE_CASTS, and use it
1337         https://bugs.webkit.org/show_bug.cgi?id=136628
1338
1339         Reviewed by Darin Adler.
1340
1341         As a step to use toFoo, this patch introduces toCSSFooRule(). This will help to detect
1342         wrong type cast. Additionally some missing type casts are clean up as well.
1343
1344         No new tests, no behavior changes.
1345
1346         * bindings/gobject/WebKitDOMPrivate.cpp:
1347         (WebKit::wrap):
1348         * css/CSSFontSelector.cpp:
1349         (WebCore::CSSFontSelector::addFontFaceRule):
1350         * css/CSSImportRule.h:
1351         * css/CSSMediaRule.h:
1352         * css/CSSParser.cpp:
1353         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
1354         * css/CSSRule.h:
1355         * css/CSSStyleRule.h:
1356         * css/CSSSupportsRule.h:
1357         * css/InspectorCSSOMWrappers.cpp:
1358         (WebCore::InspectorCSSOMWrappers::collect):
1359         * css/WebKitCSSRegionRule.h:
1360         * inspector/InspectorCSSAgent.cpp:
1361         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1362         (WebCore::InspectorCSSAgent::collectStyleSheets):
1363         * inspector/InspectorStyleSheet.cpp:
1364         (WebCore::asCSSRuleList):
1365         (WebCore::fillMediaListChain):
1366         * page/PageSerializer.cpp:
1367         (WebCore::PageSerializer::serializeCSSStyleSheet):
1368
1369 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1370
1371         [EFL[WK2] MiniBrowser comes to crash on debug mode
1372         https://bugs.webkit.org/show_bug.cgi?id=136617
1373
1374         Reviewed by Csaba Osztrogonác.
1375
1376         Fix wrong ASSERTION use in applyCursorFromEcoreX().
1377
1378         * platform/efl/EflScreenUtilities.cpp: Change ASSERT(!window) with *ASSERT(window)*
1379         (WebCore::applyCursorFromEcoreX):
1380
1381 2014-09-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1382
1383         Introduce toBasicShapeFoo() instead of static_cast<BasicShapeFoo*>
1384         https://bugs.webkit.org/show_bug.cgi?id=136609
1385
1386         Reviewed by Darin Adler.
1387
1388         To use BasicShapeFoo() helps to detect wrong type casting and improve code readability.
1389
1390         No new tests, no behavior changes.
1391
1392         * css/BasicShapeFunctions.cpp:
1393         (WebCore::valueForBasicShape):
1394         * rendering/shapes/Shape.cpp:
1395         (WebCore::Shape::createShape):
1396         * rendering/style/BasicShapes.cpp:
1397         (WebCore::BasicShape::canBlend):
1398         (WebCore::BasicShapeCircle::blend):
1399         (WebCore::BasicShapeEllipse::blend):
1400         (WebCore::BasicShapePolygon::blend):
1401         (WebCore::BasicShapeInset::blend):
1402         * rendering/style/BasicShapes.h:
1403
1404 2014-09-06  Jer Noble  <jer.noble@apple.com>
1405
1406         [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
1407         https://bugs.webkit.org/show_bug.cgi?id=136604
1408
1409         Reviewed by Eric Carlson.
1410
1411         YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
1412         screen because the "fullscreenchange" event is fired asynchronously after the exit animation
1413         completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
1414         event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
1415         to run during the period of time where we've disabled screen updates, instead of immediately
1416         after.
1417
1418         * dom/Document.cpp:
1419         (WebCore::Document::webkitDidExitFullScreenForElement):
1420
1421 2014-09-06  Darin Adler  <darin@apple.com>
1422
1423         Make updates suggested by new version of Xcode
1424         https://bugs.webkit.org/show_bug.cgi?id=136603
1425
1426         Reviewed by Mark Rowe.
1427
1428         * Configurations/Base.xcconfig: Added COMBINE_HIDPI_IMAGES and
1429         ENABLE_STRICT_OBJC_MSGSEND as suggested by Xcode upgrade check.
1430
1431         * WebCore.xcodeproj/project.pbxproj: Let Xcode remove an orphaned item from the file,
1432         and also updated LastUpgradeCheck.
1433
1434         * html/HTMLMediaElement.cpp:
1435         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Use #if/#else/#endif instead of
1436         using #if/return/#endif and leaving code unreachable.
1437         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
1438         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
1439         * html/canvas/WebGLDrawBuffers.cpp:
1440         (WebCore::WebGLDrawBuffers::supported): Ditto.
1441
1442 2014-09-06  Brian J. Burg  <burg@cs.washington.edu>
1443
1444         Web Inspector: convert DockSide to an enum class
1445         https://bugs.webkit.org/show_bug.cgi?id=136601
1446
1447         Reviewed by Timothy Hatcher.
1448
1449         * inspector/InspectorFrontendClient.h:
1450         * inspector/InspectorFrontendClientLocal.cpp:
1451         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
1452         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
1453         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
1454         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
1455         * inspector/InspectorFrontendHost.cpp:
1456         (WebCore::InspectorFrontendHost::requestSetDockSide):
1457
1458 2014-09-06  Antti Koivisto  <antti@apple.com>
1459
1460         Serialize ResourceResponses using WebKit types
1461         https://bugs.webkit.org/show_bug.cgi?id=136545
1462
1463         Fix the failing webarchive tests.
1464
1465         * platform/network/mac/ResourceResponseMac.mm:
1466         (WebCore::ResourceResponse::initNSURLResponse): Map empty text encoding name to nil NSString.
1467
1468 2014-09-06  peavo@outlook.com  <peavo@outlook.com>
1469
1470         [WinCairo][Curl] fileExists() incorrectly claims folder does not exist.
1471         https://bugs.webkit.org/show_bug.cgi?id=136598
1472
1473         Reviewed by Alex Christensen.
1474
1475         The fileExists() function will always return false on Windows,
1476         if the filename parameter ends with a slash or backslash.
1477
1478         * platform/network/curl/CurlCacheManager.cpp:
1479         (WebCore::CurlCacheManager::setCacheDirectory): Add slash after call to fileExists().
1480
1481 2014-09-06  David Kilzer  <ddkilzer@apple.com>
1482
1483         New clang warns about boolean checks for |this| pointer in RenderObject debug methods
1484         <http://webkit.org/b/136599>
1485
1486         Reviewed by Zalan Bujtas.
1487
1488         Ignores the following static analyzer warnings:
1489
1490             Source/WebCore/rendering/RenderObject.cpp:1465:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
1491                 if (!this) {
1492                     ~^~~~
1493             Source/WebCore/rendering/RenderObject.cpp:1584:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
1494                 if (!this)
1495                     ~^~~~
1496
1497         * rendering/RenderObject.cpp:
1498         (WebCore::RenderObject::showRenderObject):
1499         (WebCore::RenderObject::showRenderSubTreeAndMark):
1500         Add "#pragma clang" preprocessor macros to ignore this warning
1501         since the code is only compiled for Debug builds.  Also add a
1502         pragma for the pragma so older clangs don't complain about an
1503         unkonwn pragma.
1504
1505 2014-09-06  Antti Koivisto  <antti@apple.com>
1506
1507         Serialize ResourceResponses using WebKit types
1508         https://bugs.webkit.org/show_bug.cgi?id=136545
1509
1510         Reviewed by Alexey Proskuryakov.
1511
1512         Serialization is faster and we can mostly avoid having NSURLResponses in web process.
1513
1514         * WebCore.exp.in:
1515         * platform/network/ResourceLoadTiming.h:
1516         (WebCore::ResourceLoadTiming::encode):
1517         (WebCore::ResourceLoadTiming::decode):
1518         * platform/network/ResourceResponseBase.h:
1519         (WebCore::ResourceResponseBase::encode):
1520         (WebCore::ResourceResponseBase::decode):
1521
1522             Serialize from the WebCore data instead of serializing NSURLResponse.
1523
1524         * platform/network/cf/ResourceResponseCFNet.cpp:
1525         (WebCore::ResourceResponse::cfURLResponse):
1526
1527             Synthesize CFURLResponse by creating NSURLResponse on Cocoa platforms so we don't need copy code.
1528             This has negligible performance impact, NSURLResponse is just a wrapper around CFURLResponse.
1529
1530         * platform/network/mac/ResourceResponseMac.mm:
1531         (WebCore::ResourceResponse::nsURLResponse):
1532         (WebCore::ResourceResponse::setCertificateChain):
1533
1534             Avoid unnecessary NSURLRequest instantiation in debug builds.
1535
1536 2014-09-06  David Kilzer  <ddkilzer@apple.com>
1537
1538         HTMLElement.cpp does not compile with new clang
1539         <http://webkit.org/b/136600>
1540
1541         Reviewed by Chris Fleizach.
1542
1543         Fixes the following static analyzer warning:
1544
1545             Source/WebCore/html/HTMLElement.cpp:545:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
1546                 if (!this || !parentNode())
1547                     ~^~~~
1548
1549         * html/HTMLElement.cpp:
1550         (WebCore::HTMLElement::setOuterText): Remove "!this" check added
1551         in r75738.  It would only cover up real bugs, and isn't even hit
1552         in layout tests.
1553
1554 2014-09-06  Ryuan Choi  <ryuan.choi@gmail.com>
1555
1556         [EFL] Drop evas object cursor support
1557         https://bugs.webkit.org/show_bug.cgi?id=136324
1558
1559         Reviewed by Gyuyoung Kim.
1560
1561         Removed evas object cursor because there are some bugs.
1562         ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.
1563
1564         * platform/efl/DefaultTheme/CMakeLists.txt: Removed cursor related code.
1565         * platform/efl/DefaultTheme/default.edc: Ditto.
1566         * platform/efl/DefaultTheme/widget/cursor/cursor.edc: Removed.
1567         * platform/efl/EflScreenUtilities.cpp:
1568         (WebCore::getEcoreCursor):
1569         (WebCore::applyCursorFromEcoreX): Renamed applyFallbackCursor.
1570         (WebCore::createCustomCursor): Added to make custom cursor.
1571         (WebCore::applyFallbackCursor): Deleted.
1572         * platform/efl/EflScreenUtilities.h:
1573
1574 2014-09-05  Commit Queue  <commit-queue@webkit.org>
1575
1576         Unreviewed, rolling out r173340 and r173342.
1577         https://bugs.webkit.org/show_bug.cgi?id=136596
1578
1579         Broke many tests (Requested by ap on #webkit).
1580
1581         Reverted changesets:
1582
1583         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
1584         https://bugs.webkit.org/show_bug.cgi?id=136474
1585         http://trac.webkit.org/changeset/173340
1586
1587         "Build fix after r173340."
1588         http://trac.webkit.org/changeset/173342
1589
1590 2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>
1591
1592         Use WTFString::split(char) in more places
1593         https://bugs.webkit.org/show_bug.cgi?id=136543
1594
1595         Reviewed by Sam Weinig.
1596
1597         * inspector/InspectorDOMAgent.cpp:
1598         (WebCore::InspectorDOMAgent::nodeForPath):
1599         * mathml/MathMLMencloseElement.cpp:
1600         (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
1601         * page/PerformanceResourceTiming.cpp:
1602         (WebCore::passesTimingAllowCheck):
1603         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1604         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
1605         * platform/graphics/opengl/GLPlatformContext.cpp:
1606         (WebCore::parseExtensions):
1607         * platform/gtk/PasteboardHelper.cpp:
1608         (WebCore::PasteboardHelper::fillDataObjectFromDropData):
1609         * platform/network/curl/CurlCacheEntry.cpp:
1610         (WebCore::CurlCacheEntry::loadResponseHeaders):
1611         * platform/network/curl/CurlCacheManager.cpp:
1612         (WebCore::CurlCacheManager::loadIndex):
1613
1614 2014-09-05  Myles C. Maxfield  <mmaxfield@apple.com>
1615
1616         Laying out a TextRun using an SVG font is O(n^2)
1617         https://bugs.webkit.org/show_bug.cgi?id=136584
1618
1619         Reviewed by Andreas Kling.
1620
1621         Caching the version of the run with normalized spaces leads to a 5x speedup on the
1622         performance test this patch adds.
1623
1624         Note that SVGFontData::applySVGGlyphSelection() is still unnecesarrily O(n), so more
1625         work can be done here. In particular, the call to collectGlyphsForString() can likely
1626         be sped up.
1627
1628         No new correctness tests because there is no behavior change.
1629         Performance Test: SVG/SVG-Text.html
1630
1631         * platform/graphics/Font.h:
1632         (WebCore::Font::treatAsSpace): Make inline.
1633         (WebCore::Font::treatAsZeroWidthSpace): Ditto.
1634         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
1635         * platform/graphics/SimpleFontData.h: Add String cache argument.
1636         * platform/graphics/TextRun.h: Move member variables around for better packing.
1637         (WebCore::TextRun::TextRun): Ditto.
1638         * platform/graphics/WidthIterator.cpp: Add String cache argument.
1639         (WebCore::WidthIterator::glyphDataForCharacter): Ditto.
1640         (WebCore::WidthIterator::advanceInternal): Create String cache and pass it to
1641         glyphDataForCharacter.
1642         * platform/graphics/WidthIterator.h: Add String cache argument.
1643         * rendering/svg/SVGTextRunRenderingContext.cpp: Ditto.
1644         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Ditto.
1645         * rendering/svg/SVGTextRunRenderingContext.h: Ditto.
1646         * svg/SVGFontData.cpp:
1647         (WebCore::SVGFontData::applySVGGlyphSelection): Call computeNormalizedSpaces
1648         to consult with the cache.
1649         (WebCore::computeNormalizedSpaces): Compute cached String value.
1650         * svg/SVGFontData.h: Add String cache argument.
1651
1652 2014-09-05  David Kilzer  <ddkilzer@apple.com>
1653
1654         REGRESSION (r169407): Calls to RenderStyle::getRoundedBorderFor() in computeRoundedRectForBoxShape() still include RenderView pointer
1655         <http://webkit.org/b/136591>
1656         <rdar://problem/18143731>
1657
1658         Reviewed by Simon Fraser.
1659
1660         In r169407, the RenderView* argument was removed from
1661         RenderStyle::getRoundedBorderFor().  This argument was not
1662         removed from these calls in computeRoundedRectForBoxShape(), but
1663         because getRoundedBorderFor() always returned a reference, and
1664         because the default for the next argument was true, there was no
1665         actual change in behavior from this bug.
1666
1667         No new tests since there is no change in behavior.
1668
1669         * rendering/shapes/BoxShape.cpp:
1670         (WebCore::computeRoundedRectForBoxShape): Remove RenderView*
1671         arguments from calls to getRoundedBorderFor().
1672
1673 2014-09-05  Tim Horton  <timothy_horton@apple.com>
1674
1675         [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
1676         https://bugs.webkit.org/show_bug.cgi?id=136594
1677         rdar://problem/17457013
1678
1679         Reviewed by Simon Fraser.
1680
1681         * platform/graphics/cg/PDFDocumentImage.cpp:
1682         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
1683         Disable the optimization on iOS, because bug 136593 rears its head
1684         most often on iOS because it is more common to have contexts that always
1685         use low-quality image interpolation on that platform.
1686
1687 2014-09-05  Tim Horton  <timothy_horton@apple.com>
1688
1689         Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
1690         https://bugs.webkit.org/show_bug.cgi?id=136590
1691         <rdar://problem/18234000>
1692
1693         Reviewed by Simon Fraser.
1694
1695         * page/FrameView.cpp:
1696         (WebCore::FrameView::setTransparent):
1697         Avoid scheduling a compositing layer update if the RenderView isn't the
1698         one associated with this FrameView. This can happen during a navigation,
1699         before the new Document (and RenderView) is swapped in. This is particularly
1700         bad in the case of setTransparent because it is called from Frame::createView,
1701         which is right in the middle of that transition window. If we let the compositing
1702         layer update go ahead, it can end up detaching the new Document's layer tree,
1703         and we have no mechanism that would cause it to reattach.
1704
1705 2014-09-05  Enrica Casucci  <enrica@apple.com>
1706
1707         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1708         https://bugs.webkit.org/show_bug.cgi?id=136474
1709
1710         Reviewed by Benjamin Poulain.
1711
1712         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1713         and removes the assumption that EAffinity values match NSSelectionAffinity
1714         values. It also removes the includes in TextAffinity.h, creating the need to
1715         include explicitly the files when necessary. It also removes the unnecessary
1716         use of platform specific types, replacing them with WebCore types.
1717
1718         * editing/TextAffinity.h:
1719         (kit): Deleted.
1720         (core): Deleted.
1721         * editing/cocoa/HTMLConverter.mm:
1722         * page/mac/WebCoreFrameView.h:
1723         * platform/ios/ScrollViewIOS.mm:
1724         (WebCore::ScrollView::platformSetScrollPosition):
1725         (WebCore::ScrollView::platformSetScrollOrigin):
1726         * platform/ios/wak/WAKScrollView.mm:
1727         (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
1728         (-[WAKScrollView scrollOrigin]):
1729
1730 2014-09-05  Jer Noble  <jer.noble@apple.com>
1731
1732         Unreviewed GTK build fix; include StringPrintStream to pull in toString().
1733
1734         * html/HTMLMediaElement.h:
1735
1736 2014-09-05  Brady Eidson  <beidson@apple.com>
1737
1738         Allow pages with unload handlers in the page cache
1739         <rdar://problem/11084669> and https://bugs.webkit.org/show_bug.cgi?id=136535
1740
1741         Reviewed by Oliver Hunt.
1742
1743         This will match what iOS has been doing for some time.
1744
1745         Updated tests for new behavior.
1746
1747         * history/PageCache.cpp:
1748         (WebCore::logCanCacheFrameDecision):
1749         (WebCore::PageCache::canCachePageContainingThisFrame):
1750
1751 2014-09-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1752
1753         [SOUP] Implement ResourceResponse::platformSuggestedFilename() when USE(SOUP) is enabled.
1754         https://bugs.webkit.org/show_bug.cgi?id=136562
1755
1756         Reviewed by Martin Robinson.
1757
1758         No new tests, this makes existing tests pass.
1759
1760         * platform/network/soup/ResourceResponseSoup.cpp:
1761         (WebCore::ResourceResponse::platformSuggestedFilename):
1762         Implement ResourceResponse::platformSuggestedFilename() for SOUP after r173272, r173301 and r173305.
1763
1764 2014-09-05  peavo@outlook.com  <peavo@outlook.com>
1765
1766         [Curl] Compile error.
1767         https://bugs.webkit.org/show_bug.cgi?id=136574
1768
1769         Reviewed by Alex Christensen.
1770
1771         The ResourceResponse::setSuggestedFilename method is no longer available.
1772
1773         * platform/network/curl/CurlCacheEntry.cpp:
1774         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
1775         * platform/network/curl/CurlDownload.cpp:
1776         (WebCore::CurlDownload::didReceiveHeader):
1777         * platform/network/curl/MultipartHandle.cpp:
1778         (WebCore::MultipartHandle::didReceiveResponse):
1779         * platform/network/curl/ResourceHandleManager.cpp:
1780         (WebCore::headerCallback):
1781         * platform/network/curl/ResourceResponse.h:
1782         (WebCore::ResourceResponse::platformSuggestedFilename):
1783
1784 2014-09-05  Benjamin Poulain  <benjamin@webkit.org>
1785
1786         Update the current matching of :read-only and :read-write to the latest spec
1787         https://bugs.webkit.org/show_bug.cgi?id=136566
1788
1789         Reviewed by Antti Koivisto.
1790
1791         WebKit's implementation of :read-only and :read-write dated from 2008 and
1792         it was based on the web form spec (http://www.w3.org/TR/web-forms-2/).
1793         That spec is very dead now.
1794
1795         There are new definitions of :read-only and :read-write in three specs:
1796         -the HTML living spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selector-read-only
1797         -Selectors level 4: http://dev.w3.org/csswg/selectors4/#rw-pseudos
1798         -CSS 3 UI: http://www.w3.org/TR/css3-ui/
1799
1800         All the definitions say about the same thing. The definitions of Selector Level 4 and
1801         CSS 3 UI are very vague and poorly worded. I used the HTML when something was ambiguous.
1802
1803         In the new definitions, :read-only and :read-write are opposite. It is no longer possible to
1804         match both selector simultaneously for the same element.
1805         Consequently, I got rid of Element:matchesReadOnlyPseudoClass(). Matching :read-only is now equivalent
1806         to :not(:read-write).
1807
1808         The existing definition of :read-write was matching the spec so I could reuse that.
1809
1810         There is one more part to the new spec that is not addressed here: the pseudo class :read-write should
1811         now also match arbitrary editable HTMLElement (e.g. an element with contenteditable). This will be fixed
1812         in a follow up.
1813
1814         Tests: fast/css/read-only-read-write-input-basics.html
1815                fast/css/read-only-read-write-textarea-basics.html
1816                fast/selectors/read-only-read-write-input-basics.html
1817                fast/selectors/read-only-read-write-input-in-fieldset.html
1818                fast/selectors/read-only-read-write-textarea-basics.html
1819                fast/selectors/read-only-read-write-textarea-in-fieldset.html
1820
1821         * css/SelectorCheckerTestFunctions.h:
1822         (WebCore::matchesReadOnlyPseudoClass):
1823         * dom/Element.cpp:
1824         (WebCore::Element::matchesReadOnlyPseudoClass): Deleted.
1825         * dom/Element.h:
1826         * html/HTMLInputElement.cpp:
1827         (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): Deleted.
1828         * html/HTMLInputElement.h:
1829         * html/HTMLTextAreaElement.cpp:
1830         (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): Deleted.
1831         * html/HTMLTextAreaElement.h:
1832         * html/shadow/SliderThumbElement.cpp:
1833         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass): Deleted.
1834         * html/shadow/SliderThumbElement.h:
1835         * html/shadow/SpinButtonElement.cpp:
1836         (WebCore::SpinButtonElement::matchesReadOnlyPseudoClass): Deleted.
1837         * html/shadow/SpinButtonElement.h:
1838         * rendering/RenderTheme.cpp:
1839         (WebCore::RenderTheme::isReadOnlyControl):
1840
1841 2014-09-05  Andreas Kling  <akling@apple.com>
1842
1843         CTTE: SVGResourcesCache should only allow RenderElements.
1844         <https://webkit.org/b/136578>
1845
1846         Only RenderElement subclasses can use SVG resources.
1847         Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.
1848
1849         Reviewed by Antti Koivisto.
1850
1851         * rendering/svg/RenderSVGContainer.cpp:
1852         (WebCore::RenderSVGContainer::selfWillPaint):
1853         * rendering/svg/RenderSVGImage.cpp:
1854         (WebCore::RenderSVGImage::imageChanged):
1855         * rendering/svg/RenderSVGResource.cpp:
1856         (WebCore::requestPaintingResource):
1857         (WebCore::removeFromCacheAndInvalidateDependencies):
1858         * rendering/svg/RenderSVGResourceClipper.cpp:
1859         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1860         * rendering/svg/RenderSVGRoot.cpp:
1861         (WebCore::RenderSVGRoot::paintReplaced):
1862         * rendering/svg/RenderSVGShape.cpp:
1863         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
1864         (WebCore::RenderSVGShape::markerRect):
1865         (WebCore::RenderSVGShape::drawMarkers):
1866         * rendering/svg/SVGRenderSupport.cpp:
1867         (WebCore::invalidateResourcesOfChildren):
1868         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
1869         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
1870         (WebCore::SVGRenderSupport::pointInClippingArea):
1871         * rendering/svg/SVGRenderingContext.cpp:
1872         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1873         * rendering/svg/SVGResourcesCache.cpp:
1874         (WebCore::resourcesCacheFromRenderer):
1875         (WebCore::SVGResourcesCache::cachedResourcesForRenderer):
1876         (WebCore::SVGResourcesCache::clientLayoutChanged):
1877         (WebCore::SVGResourcesCache::clientDestroyed):
1878         (WebCore::SVGResourcesCache::resourceDestroyed):
1879         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
1880         * rendering/svg/SVGResourcesCache.h:
1881         * rendering/svg/SVGResourcesCycleSolver.cpp:
1882         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
1883
1884 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
1885
1886         IDB version changed events should have a valid eventType()
1887         https://bugs.webkit.org/show_bug.cgi?id=136583
1888
1889         Reviewed by Brady Eidson.
1890
1891         IDBDatabase::dispatchEvent() asserts that the event type is versionchangeEvent,
1892         but the version changed event created with an empty event type. Correct this.
1893
1894         * Modules/indexeddb/IDBDatabase.cpp:
1895         (WebCore::IDBDatabase::onVersionChange):
1896
1897 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
1898
1899         Remove some PLATFORM(IOS) code in Color.h/cpp
1900         https://bugs.webkit.org/show_bug.cgi?id=136582
1901
1902         Reviewed by Dan Bates.
1903
1904         Remove Color::tap which is unused, and remove createCGColorWithDeviceWhite()
1905         which was only called in one file in WebKit.
1906
1907         * WebCore.exp.in:
1908         * platform/graphics/Color.h:
1909         * platform/graphics/cg/ColorCG.cpp:
1910         (WebCore::createCGColorWithDeviceWhite): Deleted.
1911
1912 2014-09-05  Beth Dakin  <bdakin@apple.com>
1913
1914         ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not 
1915         actually scrollable
1916         https://bugs.webkit.org/show_bug.cgi?id=136558
1917
1918         Reviewed by Simon Fraser.
1919
1920         This patch requires adding a new virtual function to ScrollableArea called 
1921         isScrollableOrRubberbandable(). Unfortunately, there is already a virtual function 
1922         of that name that exists on RenderLayerModelObject, which is only problematic 
1923         because RenderListBox inherits from both RenderLayerModelObject and 
1924         ScrollableArea. This patch resolves that conflict in the simplest way, by re-
1925         naming the RenderLayerModelObject version of the function to 
1926         isScrollableOrRubberbandableBox(). It’s a little unfortunate, but simpler than the 
1927         other solutions I came up with.
1928
1929         New ScrollableArea virtual function.
1930         * page/FrameView.cpp:
1931         (WebCore::FrameView::isScrollableOrRubberbandable):
1932         * page/FrameView.h:
1933
1934         The point of the whole patch! Return early if you can’t scroll or rubber band.
1935         * platform/ScrollableArea.cpp:
1936         (WebCore::ScrollableArea::handleWheelEvent):
1937
1938         New ScrollableArea virtual function.
1939         * platform/ScrollableArea.h:
1940         * platform/win/PopupMenuWin.h:
1941
1942         Re-name.
1943         * rendering/RenderBox.cpp:
1944         (WebCore::RenderBox::isScrollableOrRubberbandableBox):
1945         (WebCore::RenderBox::isScrollableOrRubberbandable): Deleted.
1946         * rendering/RenderBox.h:
1947
1948         Implement new ScrollableArea virtual function, and adapt to the re-name.
1949         * rendering/RenderLayer.cpp:
1950         (WebCore::RenderLayer::isScrollableOrRubberbandable):
1951         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
1952         * rendering/RenderLayer.h:
1953
1954         Re-name.
1955         * rendering/RenderLayerModelObject.h:
1956         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandableBox):
1957         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable): Deleted.
1958
1959         Implement ScrollableArea virtual function.
1960         * rendering/RenderListBox.cpp:
1961         (WebCore::RenderListBox::isScrollableOrRubberbandable):
1962         * rendering/RenderListBox.h:
1963
1964         Re-name.
1965         * rendering/RenderView.cpp:
1966         (WebCore::RenderView::isScrollableOrRubberbandableBox):
1967         (WebCore::RenderView::isScrollableOrRubberbandable): Deleted.
1968         * rendering/RenderView.h:
1969
1970 2014-06-06  Jer Noble  <jer.noble@apple.com>
1971
1972         Refactoring: make MediaTime the primary time type for audiovisual times.
1973         https://bugs.webkit.org/show_bug.cgi?id=133579
1974
1975         Reviewed by Eric Carlson.
1976
1977         In order to limit the number of floating-point rounding errors for media systems which
1978         can make use of rational time objects.
1979
1980         Add some convenience methods to convert between QTTime and MediaTime.
1981         * platform/graphics/mac/MediaTimeQTKit.h: Added.
1982         * platform/graphics/mac/MediaTimeQTKit.mm: Added.
1983         (WebCore::toMediaTime):
1984         (WebCore::toQTTime):
1985
1986         Rename MediaTimeMac -> MediaTimeAVFoundation:
1987         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
1988         (WebCore::toMediaTime):
1989         (WebCore::toCMTime):
1990         * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.
1991
1992         Use MediaTime instead of double:
1993         * Modules/mediasource/MediaSource.cpp:
1994         (WebCore::MediaSource::duration):
1995         (WebCore::MediaSource::currentTime):
1996         (WebCore::MediaSource::buffered):
1997         (WebCore::MediaSource::setDuration):
1998         (WebCore::MediaSource::activeRanges):
1999         * Modules/mediasource/MediaSource.h:
2000         * Modules/mediasource/SourceBuffer.cpp:
2001         (WebCore::SourceBuffer::remove):
2002         (WebCore::SourceBuffer::removeCodedFrames):
2003         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2004         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2005         (WebCore::SourceBuffer::hasCurrentTime):
2006         (WebCore::SourceBuffer::hasFutureTime):
2007         (WebCore::SourceBuffer::canPlayThrough):
2008         * WebCore.xcodeproj/project.pbxproj:
2009         * bindings/js/JSDataCueCustom.cpp:
2010         (WebCore::JSDataCueConstructor::constructJSDataCue):
2011         * html/HTMLMediaElement.cpp:
2012         (WebCore::HTMLMediaElement::HTMLMediaElement):
2013         (WebCore::HTMLMediaElement::parseAttribute):
2014         * html/HTMLMediaElement.h:
2015         (WebCore::ValueToString<MediaTime>::string):
2016         * html/MediaFragmentURIParser.cpp:
2017         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
2018         (WebCore::MediaFragmentURIParser::startTime):
2019         (WebCore::MediaFragmentURIParser::endTime):
2020         (WebCore::MediaFragmentURIParser::parseTimeFragment):
2021         (WebCore::MediaFragmentURIParser::parseNPTFragment):
2022         (WebCore::MediaFragmentURIParser::parseNPTTime):
2023         (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
2024         * html/MediaFragmentURIParser.h:
2025         * html/TimeRanges.h:
2026         (WebCore::TimeRanges::ranges):
2027         * html/track/DataCue.cpp:
2028         (WebCore::DataCue::DataCue):
2029         * html/track/DataCue.h:
2030         (WebCore::DataCue::create):
2031         * html/track/InbandDataTextTrack.cpp:
2032         (WebCore::InbandDataTextTrack::addDataCue):
2033         (WebCore::InbandDataTextTrack::updateDataCue):
2034         (WebCore::InbandDataTextTrack::removeDataCue):
2035         * html/track/InbandDataTextTrack.h:
2036         * html/track/InbandGenericTextTrack.cpp:
2037         (WebCore::InbandGenericTextTrack::updateCueFromCueData):
2038         (WebCore::InbandGenericTextTrack::addGenericCue):
2039         (WebCore::InbandGenericTextTrack::removeGenericCue):
2040         * html/track/InbandTextTrack.cpp:
2041         (WebCore::InbandTextTrack::startTimeVariance):
2042         * html/track/InbandTextTrack.h:
2043         * html/track/InbandWebVTTTextTrack.cpp:
2044         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
2045         * html/track/TextTrack.cpp:
2046         (WebCore::TextTrack::addCue):
2047         (WebCore::TextTrack::hasCue):
2048         * html/track/TextTrack.h:
2049         (WebCore::TextTrack::startTimeVariance):
2050         * html/track/TextTrackCue.cpp:
2051         (WebCore::TextTrackCue::create):
2052         (WebCore::TextTrackCue::TextTrackCue):
2053         (WebCore::TextTrackCue::setStartTime):
2054         (WebCore::TextTrackCue::setEndTime):
2055         (WebCore::TextTrackCue::hasEquivalentStartTime):
2056         * html/track/TextTrackCue.h:
2057         (WebCore::TextTrackCue::startTime):
2058         (WebCore::TextTrackCue::endTime):
2059         * html/track/TextTrackCueGeneric.cpp:
2060         (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
2061         * html/track/TextTrackCueGeneric.h:
2062         * html/track/TextTrackCueList.cpp:
2063         (WebCore::TextTrackCueList::add):
2064         * html/track/VTTCue.cpp:
2065         (WebCore::VTTCue::VTTCue):
2066         (WebCore::VTTCue::markFutureAndPastNodes):
2067         (WebCore::VTTCue::updateDisplayTree):
2068         * html/track/VTTCue.h:
2069         (WebCore::VTTCue::create):
2070         * html/track/WebVTTParser.cpp:
2071         (WebCore::WebVTTParser::WebVTTParser):
2072         (WebCore::WebVTTParser::resetCueValues):
2073         (WebCore::WebVTTParser::collectTimeStamp):
2074         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
2075         * html/track/WebVTTParser.h:
2076         (WebCore::WebVTTCueData::startTime):
2077         (WebCore::WebVTTCueData::setStartTime):
2078         (WebCore::WebVTTCueData::endTime):
2079         (WebCore::WebVTTCueData::setEndTime):
2080         (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
2081         * platform/graphics/InbandTextTrackPrivateClient.h:
2082         (WebCore::GenericCueData::startTime):
2083         (WebCore::GenericCueData::setStartTime):
2084         (WebCore::GenericCueData::endTime):
2085         (WebCore::GenericCueData::setEndTime):
2086         (WebCore::GenericCueData::GenericCueData):
2087         * platform/graphics/MediaPlayer.cpp:
2088         (WebCore::MediaPlayer::duration):
2089         (WebCore::MediaPlayer::startTime):
2090         (WebCore::MediaPlayer::initialTime):
2091         (WebCore::MediaPlayer::currentTime):
2092         (WebCore::MediaPlayer::seekWithTolerance):
2093         (WebCore::MediaPlayer::seek):
2094         (WebCore::MediaPlayer::maxTimeSeekable):
2095         (WebCore::MediaPlayer::minTimeSeekable):
2096         (WebCore::MediaPlayer::mediaTimeForTimeValue):
2097         (WebCore::MediaPlayer::totalFrameDelay):
2098         * platform/graphics/MediaPlayer.h:
2099         * platform/graphics/MediaPlayerPrivate.h:
2100         (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
2101         (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
2102         (WebCore::MediaPlayerPrivateInterface::seek):
2103         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
2104         (WebCore::MediaPlayerPrivateInterface::startTime):
2105         (WebCore::MediaPlayerPrivateInterface::initialTime):
2106         (WebCore::MediaPlayerPrivateInterface::seekable):
2107         (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
2108         (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
2109         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
2110         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
2111         (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
2112         (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
2113         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
2114         * platform/graphics/MediaSourcePrivateClient.h:
2115         * platform/graphics/TrackPrivateBase.h:
2116         (WebCore::TrackPrivateBase::startTimeVariance):
2117         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2118         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
2119         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
2120         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2121         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2122         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
2123         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
2124         (WebCore::IncompleteMetaDataCue::startTime):
2125         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2126         (WebCore::InbandTextTrackPrivateAVF::processCue):
2127         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
2128         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
2129         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2130         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2131         (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
2132         (WebCore::MediaPlayerPrivateAVFoundation::seek):
2133         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
2134         (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
2135         (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
2136         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
2137         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
2138         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
2139         (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
2140         (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
2141         (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
2142         (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
2143         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
2144         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
2145         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
2146         (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
2147         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
2148         (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
2149         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2150         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
2151         (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
2152         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2153         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
2154         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
2155         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
2156         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
2157         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
2158         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
2159         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
2160         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
2161         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
2162         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
2163         (WebCore::AVFWrapper::seekToTime): Deleted.
2164         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
2165         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
2166         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
2167         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
2168         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
2169         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
2170         (WebCore::AVFWrapper::seekToTime): Deleted.
2171         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
2172         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
2173         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2174         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2175         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2176         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2177         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2178         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
2179         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
2180         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
2181         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
2182         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
2183         (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
2184         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
2185         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2186         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
2187         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2188         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
2189         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
2190         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2191         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2192         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
2193         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
2194         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
2195         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
2196         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
2197         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
2198         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
2199         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
2200         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
2201         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
2202         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
2203         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
2204         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
2205         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
2206         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
2207         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2208         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2209         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
2210         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2211         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
2212         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2213         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
2214         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
2215         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
2216         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
2217         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2218         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2219         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2220         (WebCore::maxValueForTimeRanges):
2221         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
2222         (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
2223         (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
2224         (WebCore::MediaPlayerPrivateQTKit::seek):
2225         (WebCore::MediaPlayerPrivateQTKit::doSeek):
2226         (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
2227         (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
2228         (WebCore::MediaPlayerPrivateQTKit::seeking):
2229         (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
2230         (WebCore::MediaPlayerPrivateQTKit::buffered):
2231         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
2232         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
2233         (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
2234         (WebCore::MediaPlayerPrivateQTKit::updateStates):
2235         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2236         (WebCore::MediaPlayerPrivateQTKit::didEnd):
2237         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
2238         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
2239         (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
2240         (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
2241         (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
2242         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
2243         (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
2244         (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
2245         * platform/mac/PlatformClockCM.mm:
2246         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2247         (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
2248         (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
2249         (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
2250         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
2251         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
2252         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
2253         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
2254         (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
2255         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2256         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2257         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
2258         * platform/mock/mediasource/MockMediaSourcePrivate.h:
2259         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2260         (WebCore::MockSourceBufferPrivate::enqueueSample):
2261
2262 2014-09-05  Antti Koivisto  <antti@apple.com>
2263
2264         REGRESSION(r173272): Two blob tests failing on WK1
2265         https://bugs.webkit.org/show_bug.cgi?id=136573
2266
2267         Reviewed by Alexey Proskuryakov.
2268
2269         http/tests/fileapi/blob-url-in-subframe.html
2270         http/tests/security/mixedContent/blob-url-in-iframe.html
2271
2272         * platform/network/BlobResourceHandle.cpp:
2273         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
2274
2275             No need to set this twice.
2276
2277         * platform/network/mac/ResourceResponseMac.mm:
2278         (WebCore::ResourceResponse::initNSURLResponse):
2279
2280             Also test that it is an HTTP URL before using NSHTTPURLResponse. Blobs create non-HTTP URLs with status codes.
2281             Pass the accidentally lost expected content length.
2282
2283 2014-09-05  Zalan Bujtas  <zalan@apple.com>
2284
2285         Move computeInlinePreferredLogicalWidths() from RenderBlock to RenderBlockFlow
2286         https://bugs.webkit.org/show_bug.cgi?id=136461
2287
2288         Reviewed by Darin Adler.
2289
2290         This patch enables us to go from const_cast<RenderBlockFlow*>(this)->computeInlinePreferredLogicalWidths()
2291         to computeInlinePreferredLogicalWidths().
2292
2293         Covered by existing tests.
2294
2295         * rendering/RenderBlock.cpp:
2296         (WebCore::InlineMinMaxIterator::endOfInline): Deleted.
2297         (WebCore::InlineMinMaxIterator::next): Deleted.
2298         (WebCore::getBPMWidth): Deleted.
2299         (WebCore::getBorderPaddingMargin): Deleted.
2300         (WebCore::stripTrailingSpace): Deleted.
2301         (WebCore::preferredWidth): Deleted.
2302         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): Deleted.
2303         * rendering/RenderBlock.h:
2304         * rendering/RenderBlockFlow.cpp:
2305         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
2306         (WebCore::InlineMinMaxIterator::initial): The (parent == current) condition was used as 'initial' state before.
2307         and in order to make computeInlinePreferredLogicalWidths const, InlineMinMaxIterator() needs to take const RenderObject*.
2308         (WebCore::InlineMinMaxIterator::next):
2309         (WebCore::getBPMWidth):
2310         (WebCore::getBorderPaddingMargin):
2311         (WebCore::stripTrailingSpace):
2312         (WebCore::preferredWidth):
2313         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
2314         * rendering/RenderBlockFlow.h:
2315
2316 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2317
2318         Unreviewed, build fix for EFL and GTK ports since r173272.
2319
2320         * platform/network/soup/ResourceResponseSoup.cpp:
2321         (WebCore::ResourceResponse::updateFromSoupMessageHeaders):
2322
2323 2014-09-04  Pratik Solanki  <psolanki@apple.com>
2324
2325         Unreviewed. Speculative build fix. Add platformSuggestedFilename() to all the ResourceResponse header files.
2326
2327         * platform/network/curl/ResourceResponse.h:
2328         (WebCore::ResourceResponse::platformSuggestedFilename):
2329         * platform/network/soup/ResourceResponse.h:
2330         * platform/network/win/ResourceResponse.h:
2331         (WebCore::ResourceResponse::platformSuggestedFilename):
2332
2333 2014-09-04  Pratik Solanki  <psolanki@apple.com>
2334
2335         Unreviewed. Another speculative build fix after r173272. Add a stub implementation for
2336         ResourceResponse::platformSuggestedFilename(). Filed bug 136562 for proper fix.
2337
2338         * platform/network/soup/ResourceResponseSoup.cpp:
2339         (ResourceResponse::platformSuggestedFilename):
2340
2341 2014-09-04  Pratik Solanki  <psolanki@apple.com>
2342
2343         Unreviewed. Speculative EFL and GTK build fix after r173272. Remove the filename argument
2344         from the various ResourceResponse constructors.
2345
2346         * platform/network/curl/ResourceResponse.h:
2347         (WebCore::ResourceResponse::ResourceResponse):
2348         * platform/network/soup/ResourceResponse.h:
2349         (WebCore::ResourceResponse::ResourceResponse):
2350         * platform/network/win/ResourceResponse.h:
2351         (WebCore::ResourceResponse::ResourceResponse):
2352
2353 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
2354
2355         border-radius should not force layer backing store
2356         https://bugs.webkit.org/show_bug.cgi?id=136555
2357
2358         Reviewed by Dean Jackson.
2359         
2360         Border-radius is not a reason to allocate backing store; it's not relevant unless
2361         we also have a border or background, and hasBoxDecorations() already checks for that.
2362         
2363         With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
2364         a background), but it doesn't check for outlines, so do that in addition.
2365
2366         Test: compositing/backing/border-radius-no-backing.html
2367
2368         * rendering/RenderLayer.cpp:
2369         (WebCore::RenderLayer::calculateClipRects):
2370
2371 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
2372
2373         CSS filter on a compositing layer should not cause unncessary backing store allocation
2374         https://bugs.webkit.org/show_bug.cgi?id=136557
2375
2376         Reviewed by Dean Jackson.
2377         
2378         Remove the style.hasFilter() check from hasBoxDecorations(), since filters aren't
2379         a box decoration. This allows creation of simple container layers with composited filters.
2380
2381         Test: compositing/backing/filter-no-backing.html
2382
2383         * rendering/RenderLayer.cpp:
2384         (WebCore::RenderLayer::calculateClipRects):
2385
2386 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
2387
2388         Improve the logic for compositing backing store avoidance
2389         https://bugs.webkit.org/show_bug.cgi?id=136556
2390
2391         Reviewed by Dean Jackson.
2392         
2393         Avoid backing store allocation in more cases by improving the logic that detects
2394         whether a RenderLayer has any painted, non-layer descendent renderers.
2395         
2396         Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
2397         and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
2398         for renderers that paint anything. Any renderer with box decorations paints;
2399         replaced elements paint, and non-whitespace text nodes paint. We can avoid
2400         making backing store when whitespace nodes are present only when user-select is none,
2401         since we have to ensure that there's backing store to paint the selection into.
2402
2403         Tests: compositing/backing/inline-block-no-backing.html
2404                compositing/backing/whitespace-nodes-no-backing.html
2405
2406         * rendering/RenderLayer.cpp:
2407         (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
2408         (WebCore::RenderLayer::hasBoxDecorationsOrBackground):
2409         (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
2410         rather than isReplaced(), since the latter includes inline-blocks.
2411         * rendering/RenderLayerBacking.cpp:
2412         (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
2413         logic in the root layer, since it always wants backing store.
2414         (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
2415         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
2416         inline-block, so use isRenderReplaced() instead.
2417
2418 2014-09-04  Daniel Bates  <dabates@apple.com>
2419
2420         [iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173258>
2421         (https://bugs.webkit.org/show_bug.cgi?id=136494)
2422
2423         Use ENABLE_TOUCH_EVENT instead of ENABLE(TOUCH_EVENT) as the latter isn't available
2424         to some clients of this private header.
2425
2426         * platform/ios/wak/WAKResponder.h:
2427
2428 2014-09-04  Roger Fong  <roger_fong@apple.com>
2429
2430         Increase number of maximum active WebGL contexts.
2431         https://bugs.webkit.org/show_bug.cgi?id=136551.
2432         <rdar://problem/18236425>
2433
2434         Reviewed by Brent Fulgham.
2435
2436         Test covered by Khronos conformance test:
2437         webgl/1.0.2/conformance/context/context-creation-and-destruction.html
2438
2439         * platform/graphics/mac/GraphicsContext3DMac.mm:
2440
2441 2014-09-04  Roger Fong  <roger_fong@apple.com>
2442
2443         Clicking on a select element should never hide the popup menu.
2444         https://bugs.webkit.org/show_bug.cgi?id=136548.
2445         <rdar://problem/10215926>
2446
2447         Reviewed by Simon Fraser.
2448
2449         * html/HTMLSelectElement.cpp:
2450         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2451         Never call hidePopup as a result of a click on a select element.
2452         The only way you can properly hide a popup is to click again or lose focus on the popup itself.
2453
2454 2014-09-04  Enrica Casucci  <enrica@apple.com>
2455
2456         Remove PLATFORM(IOS) from WebCore/editing (Part 2).
2457         https://bugs.webkit.org/show_bug.cgi?id=136474
2458
2459         Reviewed by Tim Horton.
2460
2461         Removing some more PLATFORM(IOS) from the editing code.
2462         Most of these changes are fixes that were made for IOS but never merged
2463         to OpenSource.
2464
2465         * editing/ApplyStyleCommand.cpp:
2466         (WebCore::ApplyStyleCommand::applyBlockStyle):
2467         * editing/ReplaceSelectionCommand.cpp:
2468         (WebCore::ReplaceSelectionCommand::doApply):
2469         * editing/VisibleSelection.cpp:
2470         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
2471         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
2472         * editing/VisibleUnits.cpp:
2473         (WebCore::startOfDocument):
2474         (WebCore::endOfDocument):
2475         * editing/ios/EditorIOS.mm: No need for platform guard, this file is not built for Mac.
2476
2477 2014-09-03  Andy Estes  <aestes@apple.com>
2478
2479         [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
2480         https://bugs.webkit.org/show_bug.cgi?id=136521
2481
2482         Reviewed by Anders Carlsson.
2483
2484         * platform/ios/wak/WebCoreThread.h: Stopped defining WEBCORE_EXPORT.
2485
2486 2014-09-03  David Hyatt  <hyatt@apple.com>
2487
2488         Initial letters should clear one another.
2489         https://bugs.webkit.org/show_bug.cgi?id=136514
2490
2491         Reviewed by Simon Fraser.
2492
2493         Added fast/css-generated-content/initial-letter-clearance.html.
2494
2495         * rendering/RenderBlockFlow.cpp:
2496         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2497         Compute the required clearance and add it both to the block's logical height
2498         and to the logical top offset of the float.
2499
2500         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
2501         * rendering/RenderBlockFlow.h:
2502         A new method for determining the lowest floating initial letter.
2503
2504 2014-09-04  Joseph Pecoraro  <pecoraro@apple.com>
2505
2506         Use WTFString::find(char) in more places
2507         https://bugs.webkit.org/show_bug.cgi?id=136541
2508
2509         Reviewed by Daniel Bates.
2510
2511         * Modules/plugins/YouTubePluginReplacement.cpp:
2512         (WebCore::queryKeysAndValues):
2513         * html/HTMLEmbedElement.cpp:
2514         (WebCore::HTMLEmbedElement::parseAttribute):
2515         * html/HTMLObjectElement.cpp:
2516         (WebCore::HTMLObjectElement::parametersForPlugin):
2517         * html/parser/XSSAuditor.cpp:
2518         (WebCore::XSSAuditor::decodedSnippetForAttribute):
2519         * page/UserContentURLPattern.cpp:
2520         (WebCore::UserContentURLPattern::parse):
2521
2522 2014-09-04  Antti Koivisto  <antti@apple.com>
2523
2524         Try to fix iOS build.
2525
2526         * loader/FrameLoader.cpp:
2527         (WebCore::FrameLoader::initForSynthesizedDocument):
2528
2529 2014-09-04  Maciej Stachowiak  <mjs@apple.com>
2530
2531         Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
2532         https://bugs.webkit.org/show_bug.cgi?id=136527
2533
2534         Reviewed by Alexey Proskuryakov.
2535
2536         * WebCore.exp.in:
2537         * WebCore.order:
2538         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2539         * platform/mac/WebCoreSystemInterface.h:
2540         * platform/mac/WebCoreSystemInterface.mm:
2541
2542 2014-09-04  Beth Dakin  <bdakin@apple.com>
2543
2544         REGRESSION (r172832): Poor 2-finger scrolling performance at theverge.com articles 
2545         (all tiles repaint)
2546         https://bugs.webkit.org/show_bug.cgi?id=136433
2547         -and corresponding-
2548         rdar://problem/18193942
2549
2550         Reviewed by Tim Horton.
2551
2552         We should ensure that we are only setting scroll elasticity for layers that return 
2553         true for scrollsOverflow(). When overflow:scroll is set on the root element, we 
2554         wound up setting the ScrollElasticity for the root, which messed up with the 
2555         special way that the root is meant to scroll. Even though overflow:scroll has been 
2556         set on the root, scrollsOverflow() is still false because we knew not to set 
2557         hasOverflowClip() since it’s the root, which is why this check works.  
2558         * rendering/RenderLayer.cpp:
2559         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2560         (WebCore::RenderLayer::setHasVerticalScrollbar):
2561
2562         Really, we should have never even called RenderLayer::setHasVerticalScrollbar or 
2563         RenderLayer::setHasHorizontalScrollbar since it’s wrong to be creating a scrollbar 
2564         on RenderLayer for the root. We should make sure, in addition to the other 
2565         requirements consulted, that the renderer has an overflow clip before we create 
2566         the scrollbars.
2567         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
2568
2569 2014-09-04  Antti Koivisto  <antti@apple.com>
2570
2571         Remove ResourceResponse::m_suggestedFilename
2572         https://bugs.webkit.org/show_bug.cgi?id=136534
2573
2574         Reviewed by Alexey Proskuryakov.
2575
2576         This will simplify things.
2577
2578         * WebCore.exp.in:
2579         * loader/DocumentLoader.cpp:
2580         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
2581         (WebCore::DocumentLoader::maybeLoadEmpty):
2582         * loader/FrameLoader.cpp:
2583         (WebCore::FrameLoader::willLoadMediaElementURL):
2584         * loader/appcache/ApplicationCacheStorage.cpp:
2585         (WebCore::ApplicationCacheStorage::loadCache):
2586         * loader/archive/ArchiveResource.cpp:
2587         (WebCore::ArchiveResource::create):
2588         * platform/network/BlobResourceHandle.cpp:
2589         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
2590         (WebCore::BlobResourceHandle::notifyResponseOnError):
2591         * platform/network/ResourceResponseBase.cpp:
2592         (WebCore::ResourceResponseBase::ResourceResponseBase):
2593         (WebCore::ResourceResponseBase::adopt):
2594         (WebCore::ResourceResponseBase::copyData):
2595         (WebCore::ResourceResponseBase::suggestedFilename):
2596         (WebCore::ResourceResponseBase::httpStatusText):
2597         (WebCore::ResourceResponseBase::setHTTPStatusText):
2598         (WebCore::ResourceResponseBase::httpHeaderField):
2599         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2600         (WebCore::ResourceResponseBase::addHTTPHeaderField):
2601         (WebCore::ResourceResponseBase::httpHeaderFields):
2602         (WebCore::ResourceResponseBase::isAttachment):
2603         (WebCore::ResourceResponseBase::wasCached):
2604         (WebCore::ResourceResponseBase::connectionReused):
2605         (WebCore::ResourceResponseBase::setConnectionReused):
2606         (WebCore::ResourceResponseBase::connectionID):
2607         (WebCore::ResourceResponseBase::setConnectionID):
2608
2609             Remove AllFields initialization. It was only used to get m_suggestedFilename.
2610             Rename CommonAndUncommonFields to AllFields
2611
2612         (WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.
2613
2614             No more setter.
2615
2616         * platform/network/ResourceResponseBase.h:
2617         (WebCore::ResourceResponseBase::platformSuggestedFileName):
2618
2619             Get the suggested filename from the platform class on-demand.
2620
2621         * platform/network/cf/ResourceResponse.h:
2622         (WebCore::ResourceResponse::ResourceResponse):
2623
2624             Remove never-used file name constructor parameter.
2625
2626         * platform/network/cf/ResourceResponseCFNet.cpp:
2627         (WebCore::ResourceResponse::platformLazyInit):
2628         * platform/network/mac/ResourceResponseMac.mm:
2629         (WebCore::ResourceResponse::initNSURLResponse):
2630
2631             Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).
2632
2633         (WebCore::ResourceResponse::platformLazyInit):
2634
2635             Don't pull the suggested filename anymore.
2636
2637         (WebCore::ResourceResponse::platformSuggestedFilename):
2638
2639             Get the suggested name from the (possibly synthetic) NSURLRequest.
2640
2641 2014-09-04  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2642
2643         Remove CSS_FILTERS flag
2644         https://bugs.webkit.org/show_bug.cgi?id=136529
2645
2646         Reviewed by Dirk Schulze.
2647
2648         No new tests, no behaviour changed.
2649
2650         * Configurations/FeatureDefines.xcconfig:
2651         * DerivedSources.cpp:
2652         * WebCore.exp.in:
2653         * bindings/js/JSCSSValueCustom.cpp:
2654         (WebCore::toJS):
2655         * bindings/objc/DOMCSS.mm:
2656         (kitClass):
2657         * css/CSSComputedStyleDeclaration.cpp:
2658         (WebCore::ComputedStyleExtractor::valueForFilter):
2659         (WebCore::isLayoutDependent):
2660         (WebCore::ComputedStyleExtractor::propertyValue):
2661         * css/CSSComputedStyleDeclaration.h:
2662         * css/CSSFilterImageValue.cpp:
2663         * css/CSSFilterImageValue.h:
2664         * css/CSSImageGeneratorValue.cpp:
2665         (WebCore::CSSImageGeneratorValue::image):
2666         (WebCore::CSSImageGeneratorValue::isFixedSize):
2667         (WebCore::CSSImageGeneratorValue::fixedSize):
2668         (WebCore::CSSImageGeneratorValue::isPending):
2669         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
2670         (WebCore::CSSImageGeneratorValue::loadSubimages):
2671         * css/CSSParser.cpp:
2672         (WebCore::CSSParser::parseValue):
2673         (WebCore::CSSParser::parseGeneratedImage):
2674         (WebCore::CSSParser::parseFilterImage):
2675         (WebCore::CSSParser::parseFilter):
2676         * css/CSSParser.h:
2677         * css/CSSPropertyNames.in:
2678         * css/CSSValue.cpp:
2679         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
2680         (WebCore::CSSValue::equals):
2681         (WebCore::CSSValue::cssText):
2682         (WebCore::CSSValue::destroy):
2683         (WebCore::CSSValue::cloneForCSSOM):
2684         * css/CSSValue.h:
2685         * css/StyleResolver.cpp:
2686         (WebCore::StyleResolver::State::clear):
2687         (WebCore::StyleResolver::applyProperty):
2688         (WebCore::StyleResolver::generatedOrPendingFromValue):
2689         (WebCore::StyleResolver::loadPendingResources):
2690         * css/StyleResolver.h:
2691         * css/WebKitCSSFilterValue.cpp:
2692         * css/WebKitCSSFilterValue.h:
2693         * css/WebKitCSSFilterValue.idl:
2694         * loader/cache/CachedSVGDocumentReference.cpp:
2695         * loader/cache/CachedSVGDocumentReference.h:
2696         * page/FrameView.cpp:
2697         (WebCore::FrameView::scrollContentsFastPath):
2698         * page/animation/AnimationBase.cpp:
2699         (WebCore::AnimationBase::AnimationBase):
2700         * page/animation/AnimationBase.h:
2701         * page/animation/CSSPropertyAnimation.cpp:
2702         (WebCore::blendFilter):
2703         (WebCore::blendFunc):
2704         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2705         * page/animation/ImplicitAnimation.cpp:
2706         (WebCore::ImplicitAnimation::reset):
2707         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists):
2708         * page/animation/ImplicitAnimation.h:
2709         * page/animation/KeyframeAnimation.cpp:
2710         (WebCore::KeyframeAnimation::KeyframeAnimation):
2711         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
2712         * page/animation/KeyframeAnimation.h:
2713         * platform/graphics/GraphicsLayer.cpp:
2714         (WebCore::GraphicsLayer::validateFilterOperations):
2715         * platform/graphics/GraphicsLayer.h:
2716         * platform/graphics/GraphicsLayerAnimation.cpp:
2717         (WebCore::applyFilterAnimation):
2718         (WebCore::GraphicsLayerAnimation::applyInternal):
2719         * platform/graphics/GraphicsLayerAnimation.h:
2720         * platform/graphics/IntRectExtent.h:
2721         * platform/graphics/ca/GraphicsLayerCA.cpp:
2722         (WebCore::propertyIdToString):
2723         (WebCore::supportsAcceleratedFilterAnimations):
2724         (WebCore::GraphicsLayerCA::filtersCanBeComposited):
2725         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2726         (WebCore::GraphicsLayerCA::setFilters):
2727         (WebCore::GraphicsLayerCA::addAnimation):
2728         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2729         (WebCore::GraphicsLayerCA::updateFilters):
2730         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2731         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2732         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
2733         * platform/graphics/ca/GraphicsLayerCA.h:
2734         * platform/graphics/ca/PlatformCAAnimation.h:
2735         * platform/graphics/ca/PlatformCAFilters.h:
2736         * platform/graphics/ca/PlatformCALayer.h:
2737         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2738         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2739         (PlatformCAAnimationMac::setFromValue):
2740         (PlatformCAAnimationMac::setToValue):
2741         (PlatformCAAnimationMac::setValues):
2742         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2743         (PlatformCAFilters::animatedFilterPropertyName):
2744         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2745         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2746         (PlatformCALayerMac::clone):
2747         (PlatformCALayerMac::filtersCanBeComposited):
2748         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2749         (PlatformCAAnimationWin::setFromValue):
2750         (PlatformCAAnimationWin::setToValue):
2751         (PlatformCAAnimationWin::setValues):
2752         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
2753         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
2754         (PlatformCAFilters::animatedFilterPropertyName):
2755         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2756         (PlatformCALayerWin::clone):
2757         * platform/graphics/ca/win/PlatformCALayerWin.h:
2758         * platform/graphics/filters/FilterOperation.cpp:
2759         * platform/graphics/filters/FilterOperation.h:
2760         * platform/graphics/filters/FilterOperations.cpp:
2761         * platform/graphics/filters/FilterOperations.h:
2762         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2763         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
2764         (WebCore::GraphicsLayerTextureMapper::setFilters):
2765         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2766         * platform/graphics/texmap/TextureMapper.h:
2767         * platform/graphics/texmap/TextureMapperGL.cpp:
2768         (WebCore::TextureMapperGLData::TextureMapperGLData):
2769         (WebCore::prepareFilterProgram):
2770         (WebCore::TextureMapperGL::drawTexture):
2771         (WebCore::BitmapTextureGL::applyFilters):
2772         * platform/graphics/texmap/TextureMapperGL.h:
2773         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2774         (WebCore::BitmapTextureImageBuffer::applyFilters):
2775         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2776         * platform/graphics/texmap/TextureMapperLayer.cpp:
2777         (WebCore::TextureMapperLayer::setAnimatedFilters):
2778         (WebCore::TextureMapperLayer::computeOverlapRegions):
2779         (WebCore::TextureMapperLayer::paintIntoSurface):
2780         (WebCore::TextureMapperLayer::setFilters):
2781         (WebCore::TextureMapperLayer::syncAnimations):
2782         * platform/graphics/texmap/TextureMapperLayer.h:
2783         (WebCore::TextureMapperLayer::hasFilters):
2784         * platform/graphics/texmap/TextureMapperShaderProgram.h:
2785         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2786         (WebCore::CoordinatedGraphicsLayer::didChangeFilters):
2787         (WebCore::CoordinatedGraphicsLayer::setFilters):
2788         (WebCore::CoordinatedGraphicsLayer::syncFilters):
2789         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2790         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2791         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2792         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
2793         (WebCore::CoordinatedGraphicsScene::setLayerState):
2794         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2795         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2796         * rendering/FilterEffectRenderer.cpp:
2797         * rendering/FilterEffectRenderer.h:
2798         * rendering/RenderElement.cpp:
2799         (WebCore::RenderElement::adjustStyleDifference):
2800         * rendering/RenderElement.h:
2801         (WebCore::RenderElement::hasFilter): Deleted.
2802         * rendering/RenderLayer.cpp:
2803         (WebCore::RenderLayer::RenderLayer):
2804         (WebCore::RenderLayer::~RenderLayer):
2805         (WebCore::transparencyClipBox):
2806         (WebCore::RenderLayer::paintLayerContents):
2807         (WebCore::RenderLayer::calculateClipRects):
2808         * rendering/RenderLayer.h:
2809         * rendering/RenderLayerBacking.cpp:
2810         (WebCore::RenderLayerBacking::RenderLayerBacking):
2811         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2812         (WebCore::RenderLayerBacking::updateFilters):
2813         (WebCore::RenderLayerBacking::updateGeometry):
2814         (WebCore::RenderLayerBacking::startAnimation):
2815         (WebCore::RenderLayerBacking::startTransition):
2816         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2817         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2818         * rendering/RenderLayerBacking.h:
2819         * rendering/RenderLayerCompositor.cpp:
2820         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2821         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
2822         * rendering/RenderLayerFilterInfo.cpp:
2823         * rendering/RenderLayerFilterInfo.h:
2824         * rendering/RenderLayerModelObject.cpp:
2825         (WebCore::RenderLayerModelObject::styleWillChange):
2826         * rendering/RenderObject.cpp:
2827         (WebCore::RenderObject::containerForRepaint):
2828         (WebCore::RenderObject::repaintUsingContainer):
2829         * rendering/RenderView.cpp:
2830         (WebCore::RenderView::RenderView):
2831         * rendering/RenderView.h:
2832         * rendering/style/RenderStyle.cpp:
2833         (WebCore::RenderStyle::changeRequiresLayout):
2834         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2835         * rendering/style/RenderStyle.h:
2836         * rendering/style/StyleFilterData.cpp:
2837         * rendering/style/StyleFilterData.h:
2838         * rendering/style/StyleRareNonInheritedData.cpp:
2839         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2840         (WebCore::StyleRareNonInheritedData::operator==):
2841         (WebCore::StyleRareNonInheritedData::hasFilters):
2842         * rendering/style/StyleRareNonInheritedData.h:
2843         * rendering/svg/RenderSVGResourceContainer.cpp:
2844         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
2845
2846 2014-09-04  Pratik Solanki  <psolanki@apple.com>
2847
2848         Remove iOS specific disk image cache
2849         https://bugs.webkit.org/show_bug.cgi?id=136517
2850
2851         Reviewed by Antti Koivisto.
2852
2853         Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
2854         this now since we don't enable it in WebKit2 on iOS.
2855
2856         * WebCore.exp.in:
2857         * WebCore.xcodeproj/project.pbxproj:
2858         * loader/ResourceBuffer.cpp:
2859         (WebCore::ResourceBuffer::isUsingDiskImageCache): Deleted.
2860         * loader/ResourceBuffer.h:
2861         * loader/cache/CachedImage.cpp:
2862         (WebCore::CachedImage::canUseDiskImageCache): Deleted.
2863         (WebCore::CachedImage::useDiskImageCache): Deleted.
2864         * loader/cache/CachedImage.h:
2865         * loader/cache/CachedResource.cpp:
2866         (WebCore::CachedResource::isUsingDiskImageCache): Deleted.
2867         * loader/cache/CachedResource.h:
2868         (WebCore::CachedResource::canUseDiskImageCache): Deleted.
2869         (WebCore::CachedResource::useDiskImageCache): Deleted.
2870         * loader/cache/MemoryCache.cpp:
2871         (WebCore::MemoryCache::TypeStatistic::addResource):
2872         (WebCore::MemoryCache::dumpStats):
2873         (WebCore::MemoryCache::dumpLRULists):
2874         (WebCore::MemoryCache::flushCachedImagesToDisk): Deleted.
2875         * loader/cache/MemoryCache.h:
2876         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2877         * loader/ios/DiskImageCacheClientIOS.h: Removed.
2878         * loader/ios/DiskImageCacheIOS.h: Removed.
2879         * loader/ios/DiskImageCacheIOS.mm: Removed.
2880         * platform/Logging.h:
2881         * platform/SharedBuffer.cpp:
2882         (WebCore::SharedBuffer::SharedBuffer):
2883         (WebCore::SharedBuffer::~SharedBuffer):
2884         (WebCore::SharedBuffer::data):
2885         (WebCore::SharedBuffer::append):
2886         (WebCore::SharedBuffer::buffer):
2887         (WebCore::SharedBuffer::getSomeData):
2888         (WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Deleted.
2889         (WebCore::SharedBuffer::allowToBeMemoryMapped): Deleted.
2890         (WebCore::SharedBuffer::failedMemoryMap): Deleted.
2891         (WebCore::SharedBuffer::markAsMemoryMapped): Deleted.
2892         (WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Deleted.
2893         (WebCore::SharedBuffer::memoryMappedNotificationCallback): Deleted.
2894         (WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Deleted.
2895         * platform/SharedBuffer.h:
2896         (WebCore::SharedBuffer::isMemoryMapped): Deleted.
2897         * platform/cf/SharedBufferCF.cpp:
2898         (WebCore::SharedBuffer::SharedBuffer):
2899         * platform/mac/SharedBufferMac.mm:
2900         (-[WebCoreSharedBufferData length]):
2901         (-[WebCoreSharedBufferData bytes]):
2902         (WebCore::SharedBuffer::createCFData):
2903         (-[WebCoreSharedBufferData initWithMemoryMappedSharedBuffer:]): Deleted.
2904
2905 2014-09-04  Brian J. Burg  <burg@cs.washington.edu>
2906
2907         LegacyProfiler: ProfileNodes should be used more like structs
2908         https://bugs.webkit.org/show_bug.cgi?id=136381
2909
2910         Reviewed by Timothy Hatcher.
2911
2912         * inspector/ScriptProfileNode.idl: Remove an unused property.
2913
2914 2014-09-04  Renato Nagy  <rnagy@inf.u-szeged.hu>
2915
2916         Remove Qt cruft: MIMESniffing.cpp and MIMESniffing.h
2917         https://bugs.webkit.org/show_bug.cgi?id=136528
2918
2919         Reviewed by Alexey Proskuryakov.
2920
2921         * platform/network/MIMESniffing.cpp: Removed.
2922         * platform/network/MIMESniffing.h: Removed.
2923
2924 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2925
2926         Introduce CSS_BASIC_SHAPES_TYPE_CASTS, and use it
2927         https://bugs.webkit.org/show_bug.cgi?id=136403
2928
2929         Reviewed by Daniel Bates.
2930
2931         toCSSBasicShapeFoo() will help to detect wrong type casting. So this patch generates it, and use it
2932         instead of static_cast<const CSSBasicShapeFoo*>().
2933
2934         No new tests no behavior changes.
2935
2936         * css/BasicShapeFunctions.cpp:
2937         (WebCore::basicShapeForValue):
2938         * css/CSSBasicShapes.cpp:
2939         (WebCore::CSSBasicShapeCircle::equals):
2940         (WebCore::CSSBasicShapeEllipse::equals):
2941         (WebCore::CSSBasicShapePolygon::equals):
2942         (WebCore::CSSBasicShapeInset::equals):
2943         * css/CSSBasicShapes.h:
2944
2945 2014-09-04  Daniel Bates  <dabates@apple.com>
2946
2947         [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
2948         https://bugs.webkit.org/show_bug.cgi?id=136494
2949
2950         Reviewed by Andy Estes.
2951
2952         * WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
2953         the script Tools/Scripts/sort-export-file.
2954         * bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
2955         * page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
2956         code is specific to the iOS touch machinery.
2957         * page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. 
2958         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
2959         * platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
2960         * platform/ios/ScrollAnimatorIOS.mm:
2961         (WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
2962         * platform/ios/wak/WAKResponder.h: Ditto.
2963         * rendering/RenderLayer.cpp:
2964         (WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
2965         (WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
2966         code is specific to the iOS touch machinery.
2967         * rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.
2968
2969 2014-09-04  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2970
2971         REGRESSION(r173240) [GTK] Debug build broken.
2972
2973         Unreviewed build fix after r173240.
2974
2975         * dom/EventListenerMap.h: Add missing include.
2976
2977 2014-09-04  Dan Bernstein  <mitz@apple.com>
2978
2979         Get rid of HIGH_DPI_CANVAS leftovers
2980         https://bugs.webkit.org/show_bug.cgi?id=136491
2981
2982         Reviewed by Benjamin Poulain.
2983
2984         * html/HTMLCanvasElement.cpp:
2985         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Removed m_deviceScaleFactor initializer.
2986         (WebCore::HTMLCanvasElement::reset): Removed checking if the scale factor has changed and
2987         updating m_deviceScaleFactor.
2988         (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed scaling by the device scale
2989         factor.
2990         (WebCore::HTMLCanvasElement::convertDeviceToLogical): Ditto.
2991         (WebCore::HTMLCanvasElement::createImageBuffer): Replaced m_deviceScaleFactor with a literal
2992         1.
2993         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Deleted.
2994         * html/HTMLCanvasElement.h: Removed m_deviceScaleFactor member variable and its getter.
2995
2996         * html/canvas/CanvasRenderingContext2D.cpp:
2997         (WebCore::CanvasRenderingContext2D::putImageData): Removed scaling by the device scale
2998         factor.
2999         * html/canvas/CanvasRenderingContext2D.h:
3000         (WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Changed to return 1.
3001
3002         * html/canvas/WebGLRenderingContext.cpp:
3003         (WebCore::WebGLRenderingContext::texImage2D): Replaced deviceScaleFactor() with 1.
3004         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
3005
3006 2014-09-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3007
3008         XMLHttpRequest always defaults Content-Type to application/xml, while it should depend on data type
3009         https://bugs.webkit.org/show_bug.cgi?id=11049
3010
3011         Reviewed by Darin Adler.
3012
3013         Updated default mime type when sending text (changed from application/xml to text/plain;charset=UTF-8)
3014         Updated default mime type when sending document (set to application/xml;charset=UTF-8 for XML documents and text/html;charset=UTF-8 for HTML documents)
3015
3016         Test: http/tests/xmlhttprequest/post-content-type-document.html
3017
3018         * xml/XMLHttpRequest.cpp:
3019         (WebCore::XMLHttpRequest::send): updating default Content-Type valuess.
3020
3021 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
3022
3023         Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
3024         https://bugs.webkit.org/show_bug.cgi?id=136476
3025
3026         Reviewed by Timothy Hatcher.
3027
3028         No new tests. No behavior changed.
3029
3030         * CMakeLists.txt:
3031         * WebCore.exp.in:
3032         * WebCore.order:
3033         * WebCore.vcxproj/WebCore.vcxproj:
3034         * WebCore.vcxproj/WebCore.vcxproj.filters:
3035         * WebCore.xcodeproj/project.pbxproj:
3036         * bindings/js/JSCustomXPathNSResolver.cpp:
3037         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3038         * bindings/js/ScriptCachedFrameData.cpp:
3039         (WebCore::ScriptCachedFrameData::restore):
3040         * bindings/js/ScriptController.cpp:
3041         (WebCore::ScriptController::clearWindowShell):
3042         (WebCore::ScriptController::initScript):
3043         * css/CSSParser.cpp:
3044         (WebCore::CSSParser::logError):
3045         * dom/Document.cpp:
3046         (WebCore::Document::addConsoleMessage):
3047         (WebCore::Document::addMessage):
3048         * inspector/PageDebuggerAgent.cpp:
3049         (WebCore::PageDebuggerAgent::muteConsole):
3050         (WebCore::PageDebuggerAgent::unmuteConsole):
3051         (WebCore::PageDebuggerAgent::breakpointActionLog):
3052         * inspector/PageRuntimeAgent.cpp:
3053         (WebCore::PageRuntimeAgent::muteConsole):
3054         (WebCore::PageRuntimeAgent::unmuteConsole):
3055         * page/DOMWindow.cpp:
3056         (WebCore::DOMWindow::console):
3057         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
3058         (WebCore::DOMWindow::close):
3059         (WebCore::DOMWindow::printErrorMessage):
3060         (WebCore::DOMWindow::pageConsole): Deleted.
3061         * page/DOMWindow.h:
3062         * page/Page.cpp:
3063         (WebCore::Page::Page):
3064         * page/Page.h:
3065         * page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
3066         * page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
3067         * testing/Internals.cpp:
3068         (WebCore::Internals::consoleProfiles):
3069         * testing/Internals.h:
3070         * xml/XSLStyleSheetLibxslt.cpp:
3071         (WebCore::XSLStyleSheet::parseString):
3072         * xml/XSLTProcessorLibxslt.cpp:
3073         (WebCore::XSLTProcessor::parseErrorFunc):
3074         (WebCore::docLoaderFunc):
3075
3076 2014-09-03  Maciej Stachowiak  <mjs@apple.com>
3077
3078         Fix a few leftovers from removing MIME-related WKSI usage
3079         https://bugs.webkit.org/show_bug.cgi?id=136513
3080
3081         Reviewed by Alexey Proskuryakov.
3082
3083         * WebCore.exp.in:
3084         * WebCore.order:
3085         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3086         * platform/mac/WebCoreSystemInterface.mm:
3087
3088 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
3089
3090         Text caret changes to color of text in Mail and Notes
3091         https://bugs.webkit.org/show_bug.cgi?id=135904
3092
3093         Reviewed by Simon Fraser.
3094
3095         Consult with the background color of spans inside editable divs to determine what color
3096         the caret should be.
3097
3098         Test: editing/caret/color-span-inside-editable.html
3099
3100         * editing/FrameSelection.cpp:
3101         (WebCore::CaretBase::paintCaret):
3102
3103 2014-09-03  Tim Horton  <timothy_horton@apple.com>
3104
3105         Fix the iOS build after r173230
3106
3107         * WebCore.exp.in:
3108
3109 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
3110
3111         Remove unnecessary function from TextPainter
3112         https://bugs.webkit.org/show_bug.cgi?id=136497
3113
3114         Reviewed by Simon Fraser.
3115
3116         Function is never called.
3117
3118         No new tests because there is no behavior change.
3119
3120         * rendering/TextPainter.cpp:
3121         (WebCore::TextPainter::paintTextInContext): Deleted.
3122         * rendering/TextPainter.h:
3123
3124 2014-09-03  Anders Carlsson  <andersca@apple.com>
3125
3126         Don't use DEPRECATED_DEFINE_STATIC_LOCAL for mutexes
3127         https://bugs.webkit.org/show_bug.cgi?id=136510
3128
3129         Reviewed by Andreas Kling.
3130
3131         Mutexes are intended to be used from multiple threads, and DEPRECATED_DEFINE_STATIC_LOCAL is not thread safe.
3132
3133         * bindings/objc/DOMInternal.mm:
3134         (wrapperCacheLock):
3135         (getDOMWrapper):
3136         (addDOMWrapper):
3137         (removeDOMWrapper):
3138         Use LazyNeverDestroyed + std::call_once, and switch the mutex over to an std::mutex.
3139
3140         * dom/EventListenerMap.cpp:
3141         (WebCore::EventListenerMap::assertNoActiveIterators):
3142         (WebCore::EventListenerIterator::EventListenerIterator):
3143         (WebCore::EventListenerIterator::~EventListenerIterator):
3144         (WebCore::activeIteratorCountMutex):
3145         (WebCore::EventListenerMap::EventListenerMap): Deleted.
3146         * dom/EventListenerMap.h:
3147         Use an std::atomic<int> instead of a mutex here.
3148
3149 2014-09-03  Enrica Casucci  <enrica@apple.com>
3150
3151         Remove PLATFORM(IOS) from WebCore/editing (Part 1).
3152         https://bugs.webkit.org/show_bug.cgi?id=136474
3153
3154         Reviewed by Tim Horton.
3155
3156         This is the first part of the work to remove PLATFORM(IOS) everywhere
3157         in the editing code.
3158
3159         * dom/Range.cpp:
3160         (WebCore::Range::create): Adding create function that takes VisiblePosition.
3161         * dom/Range.h:
3162         * editing/CompositeEditCommand.cpp:
3163         (WebCore::CompositeEditCommand::apply):
3164         (WebCore::CompositeEditCommand::inputText):
3165         * editing/CompositeEditCommand.h:
3166         * editing/DeleteButton.h: No need for the platform guard since it is already under
3167         DELETION_UI
3168         * editing/DeleteButtonController.cpp:
3169         (WebCore::DeleteButtonController::enable):
3170         (WebCore::DeleteButtonController::disable):
3171         * editing/EditAction.h:
3172         * editing/EditCommand.h:
3173         (WebCore::EditCommand::isInsertTextCommand):
3174         * editing/Editor.cpp:
3175         (WebCore::ClearTextCommand::CreateAndApply):
3176         * editing/Editor.h:
3177         * editing/EditorCommand.cpp:
3178         (WebCore::executeClearText):
3179         (WebCore::enabledCopy):
3180         (WebCore::enabledCut):
3181         (WebCore::enabledClearText):
3182         (WebCore::createCommandMap):
3183         * editing/FrameSelection.cpp:
3184         (WebCore::FrameSelection::modifyExtendingRight):
3185         (WebCore::FrameSelection::modifyExtendingForward):
3186         (WebCore::FrameSelection::modifyMovingRight):
3187         (WebCore::FrameSelection::modifyMovingForward):
3188         (WebCore::FrameSelection::modifyExtendingLeft):
3189         (WebCore::FrameSelection::modifyExtendingBackward):
3190         (WebCore::FrameSelection::modifyMovingLeft):
3191         (WebCore::FrameSelection::modifyMovingBackward):
3192         * editing/InsertTextCommand.h:
3193         * editing/TextCheckingHelper.cpp:
3194         * editing/TextGranularity.h:
3195         * editing/VisiblePosition.h:
3196         (WebCore::operator>=):
3197         * editing/VisibleSelection.cpp:
3198         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
3199         * editing/VisibleUnits.cpp:
3200         * editing/VisibleUnits.h:
3201
3202 2014-09-03  Anders Carlsson  <andersca@apple.com>
3203
3204         Get rid of some uses of OwnPtr
3205         https://bugs.webkit.org/show_bug.cgi?id=136503
3206
3207         Reviewed by Sam Weinig.
3208
3209         * dom/ElementRareData.cpp:
3210         * dom/ElementRareData.h:
3211         (WebCore::ElementRareData::create): Deleted.
3212         * dom/MutationObserverRegistration.cpp:
3213         (WebCore::MutationObserverRegistration::create): Deleted.
3214         * dom/MutationObserverRegistration.h:
3215         * dom/Node.cpp:
3216         (WebCore::Node::materializeRareData):
3217         (WebCore::Node::didMoveToNewDocument):
3218         (WebCore::eventTargetDataMap):
3219         (WebCore::Node::eventTargetData):
3220         (WebCore::Node::ensureEventTargetData):
3221         (WebCore::Node::mutationObserverRegistry):
3222         (WebCore::Node::registerMutationObserver):
3223         (WebCore::Node::unregisterMutationObserver):
3224         (WebCore::Node::notifyMutationObserversNodeWillDetach):
3225         * dom/Node.h:
3226         * dom/NodeRareData.h:
3227         (WebCore::NodeListsNodeData::NodeListsNodeData):
3228         (WebCore::NodeRareData::NodeRareData):
3229         (WebCore::NodeRareData::clearNodeLists):
3230         (WebCore::NodeRareData::ensureNodeLists):
3231         (WebCore::NodeRareData::ensureMutationObserverData):
3232         (WebCore::NodeListsNodeData::create): Deleted.
3233         (WebCore::NodeMutationObserverData::create): Deleted.
3234         (WebCore::NodeRareData::create): Deleted.
3235
3236 2014-09-02  Maciej Stachowiak  <mjs@apple.com>
3237
3238         Clean up naming for and slightly refactor legacy video fullscreen support
3239         https://bugs.webkit.org/show_bug.cgi?id=136446
3240
3241         Reviewed by Jer Noble.
3242
3243         Key changes:
3244         supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
3245         enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
3246         exitFullscreenForNode(Node*) --> exitVideoFullscreen()
3247         
3248         The old versions had unnecessary parameters, did not clearly distinguish their purpose
3249         from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
3250         Also changed many other places to use HTMLVideoElement* instead of Node* or 
3251         HTMLMediaElement* when they were in fact only used for video elements and would only
3252         work for such.
3253
3254         The implications of this include a bunch of renaming in some iOS fullscreen code.
3255
3256         * html/HTMLMediaElement.cpp:
3257         (WebCore::HTMLMediaElement::HTMLMediaElement): Rename m_isFullscreen flag to 
3258         m_isInVideoFullscreen, since it only covers the case of legacy video fullscreen,
3259         not element fullscreen.
3260         (WebCore::HTMLMediaElement::stop): ditto
3261         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): ditto
3262         (WebCore::HTMLMediaElement::isFullscreen): ditto
3263         (WebCore::HTMLMediaElement::enterFullscreen): Rename m_isFullscreen flag to
3264         m_isInVideoFullscreen. Hoist video element check here from all supportsFullscrenForNode
3265         clients. Adjust for relevant ChromeClient refactorings.
3266         (WebCore::HTMLMediaElement::enterFullscreen): ditto above
3267         * html/HTMLMediaElement.h:
3268         * html/HTMLVideoElement.cpp:
3269         (WebCore::HTMLVideoElement::supportsFullscreen): Adjust for relevant ChromeClient 
3270         refactorings.
3271         * page/ChromeClient.h:
3272         (WebCore::ChromeClient::supportsVideoFullscreen): Renamed from 
3273         supportsFullscreenForNode, and removed Node* parameter.
3274         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): Renamed from
3275         enterFulscreenForNode and changed Node* parameter to HTMLVideoElement*.
3276         (WebCore::ChromeClient::exitVideoFullscreen): Renamed from 
3277         exitFullscreenForNode, and removed Node* parameter.
3278         * platform/ios/WebVideoFullscreenControllerAVKit.h:
3279         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3280         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement;
3281         return a video element and not just a media element.
3282         (-[WebVideoFullscreenController dealloc]): Renamed _mediaElement data member
3283         to _videoElement and changed type accordingly.
3284         (-[WebVideoFullscreenController setVideoElement:]): Renamed from setMediaElement:
3285         and adjust parameter type accordingly.
3286         (-[WebVideoFullscreenController enterFullscreen:]): Video elements, not media
3287         elements.
3288         (-[WebVideoFullscreenController exitFullscreen]): ditto
3289         (-[WebVideoFullscreenController didCleanupFullscreen]): ditto
3290         * platform/ios/WebVideoFullscreenInterface.h:
3291         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove gratuitous HTMLMEdiaElement.h include
3292         and fix declarations accordingly.
3293         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include WTFString.h
3294         * platform/ios/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h.
3295         * platform/ios/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm.
3296         (WebVideoFullscreenModelVideoElement) Renamed from WebVideoFullscreenModelMediaElement
3297         (WebVideoFullscreenModelVideoElement::setVideoElement): Renamed from setMediaElement and
3298         change param type accordingly. Also no need to check for actual videoness of the element.
3299         (WebVideoFullscreenModelVideoElement::updateForEventName): Rename data member from m_mediaElement
3300         to m_videoElement and change type accordingly.
3301         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): ditto
3302         (WebVideoFullscreenModelVideoElement::play): ditto
3303         (WebVideoFullscreenModelVideoElement::pause): ditto
3304         (WebVideoFullscreenModelVideoElement::togglePlayState): ditto
3305         (WebVideoFullscreenModelVideoElement::beginScrubbing): ditto
3306         (WebVideoFullscreenModelVideoElement::endScrubbing): ditto
3307         (WebVideoFullscreenModelVideoElement::seekToTime): ditto
3308         (WebVideoFullscreenModelVideoElement::fastSeek): ditto
3309         (WebVideoFullscreenModelVideoElement::beginScanningForward): ditto
3310         (WebVideoFullscreenModelVideoElement::beginScanningBackward): ditto
3311         (WebVideoFullscreenModelVideoElement::endScanning): ditto
3312         (WebVideoFullscreenModelVideoElement::requestExitFullscreen): ditto
3313         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): ditto
3314         (WebVideoFullscreenModelVideoElement::setVideoLayerGravity): ditto
3315         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): ditto
3316         * platform/mac/WebVideoFullscreenController.h:
3317         * platform/mac/WebVideoFullscreenController.mm:
3318         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement
3319         and update return type accordingly.
3320         (-[WebVideoFullscreenController setVideoElement:]): Renamed from 
3321         setMediaElement and update return type accordingly.
3322         (-[WebVideoFullscreenController videoElementRect]): Renamed
3323         from mediaElementRect.
3324         (-[WebVideoFullscreenController enterFullscreen:]): Update for
3325         rename.
3326         (-[WebVideoFullscreenController exitFullscreen]): ditto
3327         (-[WebVideoFullscreenController updatePowerAssertions]): Rename
3328         member from _mediaElement to _videoElement
3329         (-[WebVideoFullscreenController _requestExit]): ditto
3330         * WebCore.exp.in: Adjust for function and class renames.
3331         * WebCore.xcodeproj/project.pbxproj: Adjust for file renames.
3332
3333 2014-09-03  Benjamin Poulain  <benjamin@webkit.org>
3334
3335         Fix style invalidation of elements with multiple siblings dependencies
3336         https://bugs.webkit.org/show_bug.cgi?id=136472
3337
3338         Reviewed by Andreas Kling.
3339
3340         Previously, style invalidation of siblings was driven by a pair of flags:
3341         -ChildrenAffectedByDirectAdjacentRules.
3342         -ChildrenAffectedByForwardPositionalRules.
3343
3344         When ChildrenAffectedByDirectAdjacentRules was set, the element after an element
3345         with "needsStyleRecalc" was also recomputed. While this work for pair of elements:
3346             a + b
3347         It does not work for more than that. For example, with
3348             a.propery + b + c
3349         When the state of <a> changes, the style of <b> was updated, which is useless. The style
3350         of <c> was untouched, which is incorrect.
3351
3352         When ChildrenAffectedByForwardPositionalRules, all elements after one with "needsStyleRecalc"
3353         were invalidated. While more correct, it caused avalanche of style recalc and was not a very
3354         useful "optimization".
3355
3356  
3357         To fix the correctness issues (e.g. "a + b + c"), I could have gone two ways:
3358         1) Invalidate the parent of a, b, c. The children would always get a correct style
3359            when their parent's style would be resolved.
3360         2) Create invalidation relations to enforce that the right siblings are invalidated.
3361
3362         I have decided for a weak version of (2). The reason is that most DOM trees are very
3363         shallow while being very wide. Invalidating the parent generally causes massive style
3364         recalculation.
3365
3366         To keep things simple for now, there is no explicit dependency list between siblings.
3367         Instead, each element has a pair of flag:
3368         1) The element's style depends on the state of a previous sibling.
3369         2) The element's state affects following siblings.
3370
3371         With the notation "<-" for (1), "->" for (2), the selector "a + b + c" create this kind
3372         of marking:
3373             a  +  b  +  c
3374             ->    ->
3375                        <-
3376
3377         When <a> is invalidated, the style resolver will go through the chain of dependent elements
3378         and invalidate any element that can be affected by a prior invalidation, here <c>.
3379
3380         Overlaps are possible. For example with the two selector, "a + b + c", "b ~ d"
3381         the marking would be
3382             a  +  b  +  c  +  d
3383             ->    ->    ->
3384                        <-    <-
3385
3386         A change in <a> would invalidate both <c> and <d>. This is overkill, but the end result
3387         is correct and it is a net improvement over the previous flags.
3388
3389
3390         As usual, the CSS JIT makes an effort at compile time to reduce tree marking. SelectorChecker
3391         marks everything as usual.
3392
3393         Tests: fast/css/direct-adjacent-style-update-optimization.html
3394                fast/css/indirect-adjacent-style-update-optimization.html
3395                fast/css/non-matching-adjacent-style-update.html
3396                fast/selectors/first-of-type-direct-adjacent-style-update.html
3397                fast/selectors/first-of-type-sibling-style-update.html
3398                fast/selectors/id-direct-adjacent-style-update.html
3399                fast/selectors/id-sibling-style-update.html
3400                fast/selectors/nth-child-as-first-simple-selector-style-update.html
3401                fast/selectors/nth-child-direct-adjacent-style-update.html
3402                fast/selectors/nth-child-style-update.html
3403
3404         * css/SelectorChecker.cpp:
3405         (WebCore::isFirstOfType):
3406         (WebCore::countElementsBefore):
3407         (WebCore::countElementsOfTypeBefore):
3408         Counting selectors are not unlike adjacent combinators, they are handled the exact same way.
3409         For example a :nth-child(4) would generate somewhat similar marking as
3410             :first-child + * + * + *
3411
3412         Everything prior to the element with the counter affects the style of the element.
3413
3414         (WebCore::hasScrollbarPseudoElement):
3415         The assertion was incorrect. You can get an scrollbar pseudo ID on an element without scrollbar.
3416         It will never match, but such case is possible.
3417
3418         (WebCore::SelectorChecker::matchRecursively):
3419         (WebCore::SelectorChecker::checkOne):
3420         * css/StyleResolver.cpp:
3421         (WebCore::StyleResolver::canShareStyleWithElement):
3422         Previously, any subtree affected by sibling selectors were unshareable. That was done by checking
3423         for Element::hasFlagsSetDuringStylingOfChildren().
3424
3425         Now that sibling relation are local, they no longer prevent sharing of all children. Instead, we can
3426         test locally for subgroup with sibling relations.
3427
3428         * cssjit/SelectorCompiler.cpp:
3429         (WebCore::SelectorCompiler::isAdjacentRelation):
3430         (WebCore::SelectorCompiler::shouldMarkStyleIsAffectedByPreviousSibling):
3431         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
3432         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
3433         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
3434         (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle):
3435         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3436         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): Deleted.
3437         * dom/Document.cpp:
3438         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
3439         * dom/Element.cpp:
3440         (WebCore::checkForSiblingStyleChanges):
3441         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
3442         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
3443         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules): Deleted.
3444         * dom/Element.h:
3445         (WebCore::Element::affectsNextSiblingElementStyle):
3446         (WebCore::Element::setAffectsNextSiblingElementStyle):
3447         (WebCore::Element::setStyleIsAffectedByPreviousSibling):
3448         (WebCore::Element::childrenAffectedByPositionalRules): Deleted.
3449         (WebCore::Element::childrenAffectedByDirectAdjacentRules): Deleted.
3450         (WebCore::Element::childrenAffectedByForwardPositionalRules): Deleted.
3451         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
3452         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
3453         * dom/ElementRareData.h:
3454         (WebCore::ElementRareData::ElementRareData):
3455         (WebCore::ElementRareData::resetDynamicRestyleObservations):
3456         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules): Deleted.
3457         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
3458         * dom/Node.h:
3459         (WebCore::Node::styleIsAffectedByPreviousSibling):
3460         (WebCore::Node::flagAffectsNextSiblingElementStyle):
3461         (WebCore::Node::flagStyleIsAffectedByPreviousSibling):
3462         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag): Deleted.
3463         * html/HTMLElement.h:
3464         (WebCore::HTMLElement::isHTMLUnknownElement):
3465         * html/HTMLUnknownElement.h:
3466         * style/StyleResolveTree.cpp:
3467         (WebCore::Style::resetStyleForNonRenderedDescendants):
3468         (WebCore::Style::resolveTree):
3469
3470 2014-09-03  Simon Fraser  <simon.fraser@apple.com>
3471
3472         Dump SimpleLineLayout info in showRenderTree() output
3473         https://bugs.webkit.org/show_bug.cgi?id=136489
3474
3475         Reviewed by Zalan Bujtas.
3476         
3477         Include info about SimpleLineLayout to showRenderTree() output.
3478         
3479         Also show RenderText length, and truncate the RenderText contents
3480         to 80 chars (since the string is replicated in inline boxes or simple line layout output).
3481
3482         * rendering/RenderBlockFlow.cpp:
3483         (WebCore::RenderBlockFlow::showLineTreeAndMark):
3484         * rendering/RenderObject.cpp:
3485         (WebCore::RenderObject::showRenderObject):
3486         * rendering/SimpleLineLayoutFunctions.cpp:
3487         (WebCore::SimpleLineLayout::printPrefix):
3488         (WebCore::SimpleLineLayout::showLineTreeForFlow):
3489         * rendering/SimpleLineLayoutFunctions.h:
3490
3491 2014-09-03  Tim Horton  <timothy_horton@apple.com>
3492
3493         iOS build fix after r173217 
3494
3495         * platform/graphics/ios/FontServicesIOS.h:
3496         (WebCore::FontServicesIOS::capHeight):
3497         * platform/graphics/ios/FontServicesIOS.mm:
3498         (WebCore::FontServicesIOS::FontServicesIOS):
3499         This fixes the build, but I don't know if it's completely correct.
3500
3501 2014-09-03  Anders Carlsson  <andersca@apple.com>
3502
3503         Get rid of DOMImplementationFront
3504         https://bugs.webkit.org/show_bug.cgi?id=136495
3505
3506         Reviewed by Andreas Kling.
3507
3508         DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
3509         on Mac this is no longer an issue.
3510
3511         * WebCore.xcodeproj/project.pbxproj:
3512         * bindings/objc/DOMImplementationFront.cpp: Removed.
3513         * bindings/objc/DOMImplementationFront.h: Removed.
3514         Remove files.
3515
3516         * bindings/objc/DOMUtility.mm:
3517         (JSC::createDOMWrapper):
3518         Remove call to implementationFront.
3519
3520         * bindings/scripts/CodeGeneratorObjC.pm:
3521         (GetImplClassName):
3522         Remove DOMImplementation special case
3523
3524         (AddIncludesForType):
3525         Ditto.
3526
3527         (GenerateHeader):
3528         Use the class header name in the #import in the internal header.
3529
3530         (GenerateImplementation):
3531         Remove DOMImplementation special case.
3532
3533 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
3534
3535         [Win] Improper release of unretained AVCFAssetResourceLoaderRef
3536         https://bugs.webkit.org/show_bug.cgi?id=136493
3537         <rdar://problem/18112559>
3538
3539         Reviewed by Eric Carlson.
3540
3541         Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
3542         RetainPtr. We don't hold onto this value or want to control its lifetime; we just
3543         want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.
3544
3545         Use of the RetainPtr created a double-release and crash.
3546
3547         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3548         (WebCore::AVFWrapper::createAssetForURL): 
3549
3550 2014-09-03  David Hyatt  <hyatt@apple.com>
3551
3552         Add support for the initial-letter CSS property to first-letter
3553         https://bugs.webkit.org/show_bug.cgi?id=136484
3554
3555         Reviewed by Dean Jackson.
3556         
3557         New tests in fast/css-generated-content/initial-letter-*.html
3558
3559         This patch add support for the CSS initial-letter property, enabling
3560         better drop caps support in WebKit. Letters size to a specified number of
3561         paragraph lines, and align to the cap-height of the first line and the baseline
3562         of the last line.
3563
3564         * css/CSSComputedStyleDeclaration.cpp:
3565         (WebCore::ComputedStyleExtractor::propertyValue):
3566         Add -webkit-initial-letter to the list.
3567
3568         * css/CSSLineBoxContainValue.cpp:
3569         (WebCore::CSSLineBoxContainValue::customCSSText):
3570         * css/CSSLineBoxContainValue.h:
3571         Add support for a new value of line-box-contain, initial-letter, that causes
3572         lines to use cap-height above the baseline and the glyph bounds below the
3573         baseline.
3574
3575         * css/CSSParser.cpp:
3576         (WebCore::CSSParser::parseValue):
3577         Add support for parsing of initial-letter.
3578
3579         (WebCore::CSSParser::parseLineBoxContain):
3580         Add the new line-box-contain value for first-letters with initial-letter set.
3581
3582         * css/CSSPropertyNames.in:
3583         Add the new initial-letter property.
3584
3585         * css/CSSValueKeywords.in:
3586         Add the new initial-letter line-box-contain value.
3587
3588         * css/StyleResolver.cpp:
3589         (WebCore::StyleResolver::applyProperty):
3590         Map initial-letter into the RenderStyle.
3591
3592         * platform/graphics/FontMetrics.h:
3593         (WebCore::FontMetrics::hasCapHeight):
3594         (WebCore::FontMetrics::floatCapHeight):
3595         (WebCore::FontMetrics::setCapHeight):
3596         (WebCore::FontMetrics::capHeight):
3597         * platform/graphics/ios/SimpleFontDataIOS.mm:
3598         (WebCore::SimpleFontData::platformInit):
3599         * platform/graphics/mac/SimpleFontDataMac.mm:
3600         (WebCore::SimpleFontData::platformInit):
3601         Add support for cap-height to the font system. iOS and Mac have been patched.
3602         Other platforms will need to add support for cap-height to get this feature.
3603         hasCapHeight() will return false for unsupported platforms for graceful
3604         degradation.
3605
3606         * rendering/RenderBlock.cpp:
3607         (WebCore::styleForFirstLetter):
3608         Modified to check for initialLetterDrop/Height and to adjust the style
3609         accordingly (e.g., to apply float when needed).
3610
3611         * rendering/RenderBlockFlow.cpp:
3612         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3613         Code to adjust the float's position and margin to do cap-height alignment
3614         and sunken letters.
3615
3616         * rendering/RenderBlockFlow.h:
3617         Remove the const from computeLogicalLocationForFloat, since the margin of the
3618         float can now be modified dynamically for sunken first-letters.
3619
3620         * rendering/RootInlineBox.cpp:
3621         (WebCore::RootInlineBox::ascentAndDescentForBox):
3622         Add support for initial-letter line-box-contain value.
3623
3624         * rendering/RootInlineBox.h:
3625         Add the includeInitialLetterForBox method to support the new line-box-contain value.
3626
3627         * rendering/style/RenderStyle.cpp:
3628         (WebCore::RenderStyle::changeRequiresLayout):
3629         * rendering/style/RenderStyle.h:
3630         * rendering/style/StyleRareNonInheritedData.cpp:
3631         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3632         (WebCore::StyleRareNonInheritedData::operator==):
3633         * rendering/style/StyleRareNonInheritedData.h:
3634         Normal maintenance stuff for addition of a new CSS property (making sure it is diffed
3635         properly for layout changes and copied on assignment, etc.)
3636
3637 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
3638
3639         [Win] Prevent double-release on AVCFURLAssetRef
3640         https://bugs.webkit.org/show_bug.cgi?id=136492
3641         <rdar://problem/18206746>
3642
3643         Reviewed by Eric Carlson.
3644
3645         The AVFWrapper::setAsset method needs to retain the passed argument, since it
3646         originates from AVCFPlayerItemGetAsset, which does not increment the
3647         reference count of its return value as expected by Cocoa Get/Create/Copy
3648         semantics.
3649
3650         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3651         (WebCore::AVFWrapper::setAsset): Retain the passed argument.
3652
3653 2014-09-03  Dan Bernstein  <mitz@apple.com>
3654
3655         Get rid of HIGH_DPI_CANVAS leftovers
3656         https://bugs.webkit.org/show_bug.cgi?id=136491
3657
3658         Reviewed by Benjamin Poulain.
3659
3660         * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
3661         and removed it from FEATURE_DEFINES.
3662         * html/HTMLCanvasElement.cpp:
3663         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Removed #if ENABLE(HIGH_DPI_CANVAS)
3664         code.
3665
3666 2014-09-03  Joseph Pecoraro  <pecoraro@apple.com>
3667
3668         Use StringBuilder append(char) and appendLiteral in more places
3669         https://bugs.webkit.org/show_bug.cgi?id=136470
3670
3671         Reviewed by Andreas Kling.
3672
3673         * Modules/indexeddb/IDBKeyData.cpp:
3674         (WebCore::IDBKeyData::loggingString):
3675         * Modules/websockets/WebSocket.cpp:
3676         (WebCore::encodeProtocolString):
3677         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
3678         (WebCore::WebSocketExtensionDispatcher::createHeaderValue):
3679         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
3680         * Modules/websockets/WebSocketHandshake.cpp:
3681         (WebCore::WebSocketHandshake::clientLocation):
3682         (WebCore::WebSocketHandshake::clientHandshakeMessage):
3683         * css/CSSCalculationValue.cpp:
3684         (WebCore::buildCssText):
3685         * css/CSSComputedStyleDeclaration.cpp:
3686         (WebCore::CSSComputedStyleDeclaration::cssText):
3687         * css/CSSMediaRule.cpp:
3688         (WebCore::CSSMediaRule::cssText):
3689         * css/CSSSelectorList.cpp:
3690         (WebCore::CSSSelectorList::selectorsText):
3691         * css/CSSSupportsRule.cpp:
3692         (WebCore::CSSSupportsRule::cssText):
3693         * css/MediaQuery.cpp:
3694         (WebCore::MediaQuery::serialize):
3695         * editing/MarkupAccumulator.cpp:
3696         (WebCore::MarkupAccumulator::generateUniquePrefix):
3697         * editing/markup.cpp:
3698         (WebCore::urlToMarkup):
3699         * fileapi/FileReaderLoader.cpp:
3700         (WebCore::FileReaderLoader::convertToDataURL):
3701         * html/EmailInputType.cpp:
3702         (WebCore::EmailInputType::sanitizeValue):
3703         * html/FormController.cpp:
3704         (WebCore::recordFormStructure):
3705         * html/parser/XSSAuditorDelegate.cpp:
3706         (WebCore::buildConsoleError):
3707         * html/track/WebVTTParser.cpp:
3708         (WebCore::WebVTTParser::collectCueText):
3709         * mathml/MathMLMencloseElement.cpp:
3710         (WebCore::MathMLMencloseElement::longDivLeftPadding):
3711         * page/PageSerializer.cpp:
3712         (WebCore::SerializerMarkupAccumulator::appendElement):
3713         * page/SecurityOrigin.cpp:
3714         (WebCore::SecurityOrigin::toRawString):
3715         * page/scrolling/ScrollingCoordinator.cpp:
3716         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
3717         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3718         (WebCore::logThreadedScrollingMode):
3719         * platform/PODInterval.h:
3720         (WebCore::PODInterval::toString):
3721         * platform/PODRedBlackTree.h:
3722         (WebCore::PODRedBlackTree::dumpFromNode):
3723         * platform/UUID.cpp:
3724         (WebCore::createCanonicalUUIDString):
3725         * platform/network/ProxyServer.cpp:
3726         (WebCore::appendProxyServerString):
3727         (WebCore::toString):
3728         * platform/text/DateTimeFormat.cpp:
3729         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
3730         * platform/text/PlatformLocale.cpp:
3731         (WebCore::DateTimeStringBuilder::zeroPadString):
3732         (WebCore::Locale::convertFromLocalizedNumber):
3733         * platform/text/TextStream.cpp:
3734         (WebCore::TextStream::operator<<):
3735         * rendering/RenderListMarker.cpp:
3736         (WebCore::listMarkerText):
3737         * testing/Internals.cpp:
3738         (WebCore::Internals::parserMetaData):
3739         (WebCore::Internals::getCurrentCursorInfo):
3740
3741 2014-09-03  Bear Travis  <betravis@adobe.com>
3742
3743         [CSS Font Loading] Enable Page Caching
3744         https://bugs.webkit.org/show_bug.cgi?id=136044
3745
3746         Reviewed by Andreas Kling.
3747
3748         Modifying FontLoader to track fonts loaded via the loadFont
3749         method as well as via CSS rules. Fonts loaded via loadFont are
3750         tracked in m_numLoadingFromJS, while fonts loaded via CSS rules
3751         are tracked in m_numLoadingFromCSS. The page is cacheable when no
3752         fonts are currently loading.
3753
3754         Added fast/css/fontloader-page-cache.html
3755
3756         * css/FontLoader.cpp:
3757         (WebCore::LoadFontCallback::create): Modified to take and store
3758         the number of fonts it will be loading.
3759         (WebCore::LoadFontCallback::createFromParams): Ditto.
3760         (WebCore::LoadFontCallback::familyCount): Getter for number of
3761         fonts loaded via this callback.
3762         (WebCore::LoadFontCallback::LoadFontCallback):
3763         (WebCore::LoadFontCallback::notifyLoaded): Callback the FontLoader
3764         to let it update its count when all the fonts have finished loading.
3765         (WebCore::FontLoader::loadFontDone): Ditto.
3766         (WebCore::FontLoader::FontLoader):
3767         (WebCore::FontLoader::beginFontLoading): Track the number of fonts
3768         loading.
3769         (WebCore::FontLoader::fontLoaded): Ditto.
3770         (WebCore::FontLoader::loadError): Ditto.
3771         (WebCore::FontLoader::loadFont):
3772         * css/FontLoader.h:
3773         (WebCore::FontLoader::loading):
3774
3775 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
3776
3777         Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3778         https://bugs.webkit.org/show_bug.cgi?id=136402
3779
3780         Reviewed by Andreas Kling.
3781
3782         When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
3783         Updating the fire/repeat interval on TimerBase requires a delta, but in
3784         DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
3785         timers we can get the current interval to calculate the delta by calling repeatInterval(),
3786         but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
3787         that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
3788         not the actual interval). The way this currently works is that when the minimum interval
3789         changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
3790         timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
3791         based on what the interval would have been.
3792
3793         We can simplify & unify with the code to throttle interval timers when the nesting
3794         threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
3795         using this to compute the delta in all cases.
3796
3797         * dom/ScriptExecutionContext.cpp:
3798         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
3799             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3800         * page/DOMTimer.cpp:
3801         (WebCore::DOMTimer::DOMTimer):
3802             initialize m_currentTimerInterval
3803         (WebCore::DOMTimer::fired):
3804             - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
3805         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3806             - compute delta based on m_currentTimerInterval
3807         (WebCore::DOMTimer::intervalClampedToMinimum):
3808             - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
3809               as its inputs, so remove arguments.
3810         (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
3811             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3812         * page/DOMTimer.h:
3813             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval
3814
3815 2014-09-03  Daniel Bates  <dabates@apple.com>
3816
3817         [XSLT] Make WebKit build when XSLT is disabled
3818         https://bugs.webkit.org/show_bug.cgi?id=136471
3819
3820         Reviewed by Simon Fraser.
3821
3822         Fixes a Clang compiler warning that file-static function WebCore::hasNoStyleInformation is unused.
3823         This function is only called from ENABLE(XSLT)-guarded code. So, add a ENABLE(XSLT)-guard around
3824         WebCore::hasNoStyleInformation().
3825
3826         * xml/parser/XMLDocumentParserLibxml2.cpp:
3827         (WebCore::hasNoStyleInformation):
3828
3829 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
3830
3831         LegacyProfiler: remove redundant ProfileNode members and other cleanup
3832         https://bugs.webkit.org/show_bug.cgi?id=136380
3833
3834         Reviewed by Timothy Hatcher.
3835
3836         Remove Profile.idleTime, rename head to rootNode, and remove ProfileNode members.
3837
3838         Covered by existing tests.
3839
3840         * inspector/ScriptProfile.idl:
3841         * inspector/ScriptProfileNode.idl:
3842         * inspector/TimelineRecordFactory.cpp:
3843
3844 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
3845
3846         Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
3847         https://bugs.webkit.org/show_bug.cgi?id=136462
3848
3849         Reviewed by Timothy Hatcher.
3850
3851         It's not used by the frontend anymore.
3852
3853         No new tests, no behavior changed.
3854
3855         * CMakeLists.txt:
3856         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
3857         * WebCore.order:
3858         * WebCore.vcxproj/WebCore.vcxproj:
3859         * WebCore.vcxproj/WebCore.vcxproj.filters:
3860         * WebCore.xcodeproj/project.pbxproj:
3861         * inspector/InspectorAllInOne.cpp:
3862         * inspector/InspectorController.cpp:
3863         (WebCore::InspectorController::InspectorController):
3864         * inspector/InspectorController.h:
3865         * inspector/InspectorInstrumentation.cpp:
3866         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3867         * inspector/InstrumentingAgents.cpp:
3868         (WebCore::InstrumentingAgents::InstrumentingAgents):
3869         (WebCore::InstrumentingAgents::reset):
3870         * inspector/InstrumentingAgents.h:
3871         (WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
3872         (WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.
3873         * inspector/PageProfilerAgent.cpp: Removed.
3874         * inspector/PageProfilerAgent.h: Removed.
3875         * inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.
3876         (WebCore::buildInspectorObject):
3877         (WebCore::buildProfileInspectorObject):
3878         (WebCore::TimelineRecordFactory::appendProfile):
3879         * inspector/WebProfilerAgent.cpp: Removed.
3880         * inspector/WebProfilerAgent.h: Removed.
3881         * inspector/WorkerInspectorController.cpp:
3882         (WebCore::WorkerInspectorController::WorkerInspectorController):
3883         * inspector/WorkerProfilerAgent.cpp: Removed.
3884         * inspector/WorkerProfilerAgent.h: Removed.
3885         * inspector/protocol/Timeline.json:
3886
3887 2014-09-02  Jer Noble  <jer.noble@apple.com>
3888
3889         [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
3890         https://bugs.webkit.org/show_bug.cgi?id=136016
3891
3892         Reviewed by Eric Carlson.
3893
3894         The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
3895         of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
3896         one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
3897         it would be better if a given MediaKeys could create a session without actually being connected to a
3898         HTMLMediaElement (yet).
3899
3900         To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
3901         is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
3902         in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.
3903
3904         Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
3905         to support adding the session to the HTMLMediaElement after the session has been created.
3906
3907         Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
3908         enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.
3909
3910         * Modules/encryptedmedia/CDM.cpp:
3911         (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
3912         (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
3913         * Modules/encryptedmedia/MediaKeySession.h:
3914         * Modules/encryptedmedia/MediaKeys.cpp:
3915         (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
3916         * WebCore.xcodeproj/project.pbxproj:
3917         * platform/graphics/CDMSession.h:
3918         (WebCore::CDMSession::type): Added.
3919         * platform/graphics/MediaPlayer.cpp:
3920         (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
3921         * platform/graphics/MediaPlayer.h:
3922         * platform/graphics/MediaPlayerPrivate.h:
3923         (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
3924         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
3925         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
3926         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
3927         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
3928         (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
3929         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
3930         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
3931         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
3932         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
3933         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
3934         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
3935         (WebCore::CDMSessionAVFoundationObjC::type): Added.
3936         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3937         (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
3938         (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
3939         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3940         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
3941         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
3942         (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
3943         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
3944         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
3945         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3946         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3947         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3948         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
3949         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
3950         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
3951         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3952         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3953
3954 2014-09-02  Daniel Bates  <dabates@apple.com>
3955
3956         [Win] Attempt to fix the Windows build after <http://trac.webkit.org/changeset/173192>
3957         (https://bugs.webkit.org/show_bug.cgi?id=136467)
3958
3959         Declare ResourceHandleClient::connectionProperties() when building for iOS or when USE(CFNETWORK).
3960
3961         * platform/network/ResourceHandleClient.h:
3962
3963 2014-09-02  Daniel Bates  <dabates@apple.com>
3964
3965         [iOS] Support using Foundation networking code
3966         https://bugs.webkit.org/show_bug.cgi?id=136467
3967
3968         Reviewed by Pratik Solanki.
3969
3970         We should support building iOS WebKit with the Foundation networking code
3971         (i.e. !USE(CFNETWORK)).
3972
3973         Additionally, disable USE(CFNETWORK) and use the Foundation networking code
3974         by default when building iOS WebKit without the Apple Internal SDK.
3975
3976         * Configurations/WebCore.xcconfig: Remove file WebCoreURLResponse.mm from the list of excluded files
3977         so that we compile an implementation for function WebCore::synthesizeRedirectResponseIfNecessary when
3978         building without USE(CFNETWORK).
3979         * WebCore.exp.in: Add symbols for WebCore::synthesizeRedirectResponseIfNecessary() and WebCore::ResourceHandleClient::willCacheResponseAsync().
3980         * WebCore.xcodeproj/project.pbxproj: Add new files CFNetworkConnectionCacheSPI.h and CFURLRequestSPI.h.
3981         Also move group platform/spi such that it appears in alphabetical order in the platform group.
3982         * platform/cf/URLCF.cpp: Remove unnecessary header <CoreFoundation/CFPriv.h>.
3983         * platform/network/ResourceHandle.h: Declare iOS-specific variant of ResourceHandle::createNSURLConnection().
3984         * platform/network/ResourceHandleClient.h: Always include header <wtf/RetainPtr.h> when building for iOS.
3985         (WebCore::ResourceHandleClient::connectionProperties): Add PLATFORM(IOS)-guard around declaration.
3986         * platform/network/cf/ResourceRequestCFNet.cpp: Substitute header CFNetworkConnectionCacheSPI.h for
3987         <CFNetwork/CFNetworkConnectionCachePriv.h>.
3988         * platform/network/mac/CredentialStorageMac.mm:
3989         (WebCore::CredentialStorage::saveToPersistentStorage): Use Credential::nsCredential() and ProtectionSpace::nsSpace()
3990         instead of WebCore::mac(const {Credential, ProtectionSpace}&) as the latter were removed in <http://trac.webkit.org/changeset/171801>
3991         and <http://trac.webkit.org/changeset/171540>, respectively.
3992         * platform/network/mac/ResourceErrorMac.mm: Add USE(CFNETWORK)-guard around <CFNetwork/CFSocketStreamPriv.h>.
3993         * platform/network/mac/ResourceHandleMac.mm: Substitute header CFURLRequestSPI.h for <CFNetwork/CFURLRequest.h>.
3994         (WebCore::ResourceHandle::start): Modified to use ResourceHandle::makeDelegate() instead of d->m_proxy, which 
3995         was removed in <http://trac.webkit.org/changeset/147476>.
3996         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
3997         * platform/network/mac/WebCoreURLResponse.mm:
3998         (WebCore::synthesizeRedirectResponseIfNecessary): Add !USE(CFNETWORK)- and PLATFORM(IOS)- guards.
3999         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Added.
4000         * platform/spi/cf/CFURLRequestSPI.h: Added.
4001
4002 2014-09-02  Myles C. Maxfield  <mmaxfield@apple.com>
4003
4004         Use references in public EventSender functions
4005         https://bugs.webkit.org/show_bug.cgi?id=136463