IDB: indexeddb/mozilla/add-twice-failure.html fails
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-04  Brady Eidson  <beidson@apple.com>
2
3         IDB: indexeddb/mozilla/add-twice-failure.html fails
4         <rdar://problem/15982569> and https://bugs.webkit.org/show_bug.cgi?id=128208
5
6         Reviewed by Tim Horton.
7
8         Covered specifically by indexeddb/mozilla/add-twice-failure.html and a handful of others.
9
10         * Modules/indexeddb/IDBRequest.cpp:
11         (WebCore::IDBRequest::onError): Improve logging.
12
13         * Modules/indexeddb/IDBTransactionBackend.cpp:
14         (WebCore::IDBTransactionBackend::abort): Improve logging.
15
16         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
17         (WebCore::PutOperation::perform): Don’t abort the transaction when an error occurred.
18
19         * WebCore.exp.in:
20
21 2014-02-04  Yoav Weiss  <yoav@yoav.ws>
22
23         Use srcset's pixel density to determine intrinsic size
24         https://bugs.webkit.org/show_bug.cgi?id=123832
25
26         Reviewed by Dean Jackson.
27
28         The patch is a port of a similar Blink patch: https://codereview.chromium.org/25105004
29         According to the spec "When an img element has a current pixel density that is not 1.0,
30         the element's image data must be treated as if its resolution, in device pixels per CSS pixels,
31         was the current pixel density."
32
33         I've added that support using the following changes:
34         - bestFitSourceForImageAttributes now returns the image candidate to HTMLImageElement.
35         - HTMLImageElement passes the devicePixelRatio data to RenderImage, which stores it.
36         - Bitmap images are scaled using the devicePixelRatio at RenderImageResource's intrinsicSize() and imageSize().
37         - SVG images are scaled using the devicePixelRatio at RenderReplaced::computeAspectRatioInformationForRenderBox.
38         - Canvas support added at CanvasRenderingContext2D::size.
39
40         Tests: fast/hidpi/image-srcset-intrinsic-size.html
41                fast/hidpi/image-srcset-png-canvas.html
42                fast/hidpi/image-srcset-png.html
43                fast/hidpi/image-srcset-relative-svg-canvas-2x.html
44                fast/hidpi/image-srcset-relative-svg.html
45                fast/hidpi/image-srcset-space-left-nomodifier.html
46                fast/hidpi/image-srcset-svg-canvas-2x.html
47                fast/hidpi/image-srcset-svg-canvas.html
48                fast/hidpi/image-srcset-svg.html
49                fast/hidpi/image-srcset-svg2.html
50
51         * html/HTMLImageElement.cpp:
52         (WebCore::HTMLImageElement::HTMLImageElement):
53         (WebCore::HTMLImageElement::parseAttribute):
54         (WebCore::HTMLImageElement::createRenderer):
55         * html/HTMLImageElement.h:
56         * html/canvas/CanvasRenderingContext2D.cpp:
57         (WebCore::size):
58         (WebCore::CanvasRenderingContext2D::drawImage):
59         * html/parser/HTMLParserIdioms.cpp:
60         (WebCore::compareByScaleFactor):
61         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
62         (WebCore::bestFitSourceForImageAttributes):
63         * html/parser/HTMLParserIdioms.h:
64         (WebCore::ImageWithScale::ImageWithScale):
65         (WebCore::ImageWithScale::imageURL):
66         (WebCore::ImageWithScale::scaleFactor):
67         * html/parser/HTMLPreloadScanner.cpp:
68         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
69         * rendering/RenderImage.cpp:
70         (WebCore::RenderImage::RenderImage):
71         * rendering/RenderImage.h:
72         (WebCore::RenderImage::setImageDevicePixelRatio):
73         (WebCore::RenderImage::imageDevicePixelRatio):
74         * rendering/RenderImageResource.cpp:
75         (WebCore::RenderImageResource::imageSize):
76         (WebCore::RenderImageResource::intrinsicSize):
77         (WebCore::RenderImageResource::getImageSize):
78         * rendering/RenderImageResource.h:
79         * rendering/RenderReplaced.cpp:
80         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
81
82 2014-02-04  Geoffrey Garen  <ggaren@apple.com>
83
84         Rolled out <http://trac.webkit.org/changeset/163280>:
85
86             Push DOM attributes into the prototype chain
87             ​https://bugs.webkit.org/show_bug.cgi?id=127969
88
89         It caused performance regressions, and broken websites on iOS.
90
91         Reviewed by Geoffrey Garen.
92
93         * bindings/js/JSDOMBinding.h:
94         (WebCore::getStaticValueSlotEntryWithoutCaching):
95         * bindings/js/JSStorageCustom.cpp:
96         (WebCore::JSStorage::nameGetter):
97         (WebCore::JSStorage::deleteProperty):
98         (WebCore::JSStorage::putDelegate):
99         * bindings/scripts/CodeGeneratorJS.pm:
100         (GenerateGetOwnPropertySlotBody):
101         (InstanceOverridesGetOwnPropertySlot):
102         (PrototypeOverridesGetOwnPropertySlot):
103         (GenerateAttributesHashTable):
104         (GenerateImplementation):
105         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
106         (WebCore::jsTestActiveDOMObjectConstructor):
107         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
108         (WebCore::jsTestCustomNamedGetterConstructor):
109         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
110         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
111         (WebCore::jsTestEventConstructorConstructor):
112         * bindings/scripts/test/JS/JSTestEventConstructor.h:
113         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
114         (WebCore::jsTestEventTargetConstructor):
115         * bindings/scripts/test/JS/JSTestException.cpp:
116         (WebCore::jsTestExceptionConstructor):
117         * bindings/scripts/test/JS/JSTestException.h:
118         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
119         (WebCore::JSTestGenerateIsReachable::getOwnPropertySlot):
120         (WebCore::jsTestGenerateIsReachableConstructor):
121         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
122         * bindings/scripts/test/JS/JSTestInterface.cpp:
123         (WebCore::jsTestInterfaceConstructor):
124         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
125         (WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
126         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
127         (WebCore::jsTestMediaQueryListListenerConstructor):
128         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
129         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
130         (WebCore::jsTestNamedConstructorConstructor):
131         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
132         * bindings/scripts/test/JS/JSTestNode.cpp:
133         (WebCore::JSTestNode::getOwnPropertySlot):
134         (WebCore::jsTestNodeConstructor):
135         * bindings/scripts/test/JS/JSTestNode.h:
136         * bindings/scripts/test/JS/JSTestObj.cpp:
137         (WebCore::jsTestObjConstructor):
138         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
139         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
140         (WebCore::jsTestOverloadedConstructorsConstructor):
141         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
142         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
143         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
144         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
145         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
146         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
147         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
148         (WebCore::jsTestTypedefsConstructor):
149         * bindings/scripts/test/JS/JSattribute.cpp:
150         (WebCore::JSattribute::getOwnPropertySlot):
151         (WebCore::jsattributeConstructor):
152         * bindings/scripts/test/JS/JSattribute.h:
153         * bindings/scripts/test/JS/JSreadonly.cpp:
154         (WebCore::JSreadonly::getOwnPropertySlot):
155         (WebCore::jsreadonlyConstructor):
156         * bindings/scripts/test/JS/JSreadonly.h:
157
158 2014-02-04  Alexey Proskuryakov  <ap@apple.com>
159
160         WebCrypto HMAC verification uses a non-constant-time memcmp
161         https://bugs.webkit.org/show_bug.cgi?id=128198
162         <rdar://problem/15976961>
163
164         Reviewed by Oliver Hunt.
165
166         * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::CryptoAlgorithmHMAC::platformVerify):
167         Use a constant time memcmp.
168
169 2014-02-04  Simon Fraser  <simon.fraser@apple.com>
170
171         Add WK2 event handling path for iOS, and make Mac and iOS code more similar
172         https://bugs.webkit.org/show_bug.cgi?id=128199
173
174         Reviewed by Sam Weinig.
175
176         EventHandlerIOS need some changes for WebKit2, where we have no native
177         widget. Merge those changes from EventHandlerMac.
178         
179         Make a few drive-by changes to match EventHandlerMac behavior.
180         
181         Clean up EventHandlerMac, removing trailing whitespace and fixing
182         the odd comment.
183
184         * page/ios/EventHandlerIOS.mm:
185         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
186         (WebCore::EventHandler::passMouseDownEventToWidget):
187         (WebCore::EventHandler::passSubframeEventToSubframe):
188         (WebCore::EventHandler::passWheelEventToWidget):
189         (WebCore::EventHandler::mouseDown):
190         (WebCore::EventHandler::mouseMoved):
191         (WebCore::frameHasPlatformWidget):
192         (WebCore::EventHandler::passMousePressEventToSubframe):
193         (WebCore::EventHandler::passMouseMoveEventToSubframe):
194         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
195         * page/mac/EventHandlerMac.mm:
196         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
197         (WebCore::EventHandler::passMouseDownEventToWidget):
198         (WebCore::findViewInSubviews):
199         (WebCore::EventHandler::eventLoopHandleMouseUp):
200         (WebCore::EventHandler::passWheelEventToWidget):
201         (WebCore::EventHandler::mouseMoved):
202
203 2014-02-04  Benjamin Poulain  <bpoulain@apple.com>
204
205         [OSX] Limit progress bar's dimensions to ushort
206         https://bugs.webkit.org/show_bug.cgi?id=128019
207
208         Wordaround a crash in Quartz until <rdar://problem/15855086> is fixed.
209
210         Reviewed by Sam Weinig.
211
212         * rendering/RenderThemeMac.mm:
213         (WebCore::RenderThemeMac::progressBarRectForBounds):
214
215 2014-02-04  Anders Carlsson  <andersca@apple.com>
216
217         Rename StringImpl::getCharacters to StringImpl::characters
218         https://bugs.webkit.org/show_bug.cgi?id=128205
219
220         Reviewed by Antti Koivisto.
221
222         Update for WTF changes.
223
224         * rendering/SimpleLineLayout.cpp:
225         (WebCore::SimpleLineLayout::createTextRuns):
226
227 2014-02-04  Anders Carlsson  <andersca@apple.com>
228
229         Rename equalNonNull to equal and make it take const StringImpl& instead
230         https://bugs.webkit.org/show_bug.cgi?id=128206
231
232         Reviewed by Andreas Kling.
233
234         * html/parser/HTMLParserIdioms.cpp:
235         (WebCore::threadSafeEqual):
236         (WebCore::threadSafeMatch):
237
238 2014-02-04  Anders Carlsson  <andersca@apple.com>
239
240         Rename String::getCharacters to String::characters
241         https://bugs.webkit.org/show_bug.cgi?id=128196
242
243         Reviewed by Andreas Kling.
244
245         Update for WTF::String changes.
246
247         * dom/Document.cpp:
248         (WebCore::canonicalizedTitle):
249
250 2014-02-04  Eric Carlson  <eric.carlson@apple.com>
251
252         Fix Release build after r163390.
253
254         * platform/audio/MediaSession.cpp: Add "#if !LOG_DISABLED" around logging-only function.
255
256 2014-02-04  Eric Carlson  <eric.carlson@apple.com>
257
258         Refine MediaSession interruptions
259         https://bugs.webkit.org/show_bug.cgi?id=128125
260
261         Reviewed by Jer Noble.
262
263         Test: media/video-background-playback.html
264
265         * WebCore.exp.in: Export applicationWillEnterForeground and applicationWillEnterBackground for
266             Internals.
267
268         * html/HTMLMediaElement.cpp:
269         (WebCore::HTMLMediaElement::play): Ask the media session if playback is allowed instead of check
270             to see if it is interrupted directly.
271         (WebCore::HTMLMediaElement::pause): Ask the media session if pausing is allowed instead of check
272             to see if it is interrupted directly.
273         (WebCore::HTMLMediaElement::mediaType): Return media type based on media characteristics once
274             the information is available.
275         (WebCore::HTMLMediaElement::resumePlayback): New.
276         * html/HTMLMediaElement.h:
277
278         * html/HTMLMediaSession.cpp:
279         (WebCore::restrictionName): New, use for logging only.
280         (WebCore::HTMLMediaSession::addBehaviorRestriction): Log  restriction changes.
281         (WebCore::HTMLMediaSession::removeBehaviorRestriction): Ditto.
282         * html/HTMLMediaSession.h:
283
284         * platform/audio/MediaSession.cpp:
285         (WebCore::stateName): New, used for logging.
286         (WebCore::MediaSession::MediaSession): Don't cache client media type because it can change.
287         (WebCore::MediaSession::setState): Log state changes.
288         (WebCore::MediaSession::beginInterruption): Remember the current state in case we want to use it
289             to restore state when the interruption ends.
290         (WebCore::MediaSession::endInterruption): Resume playback if appropriate.
291         (WebCore::MediaSession::clientWillBeginPlayback): Track the client's playback state.
292         (WebCore::MediaSession::clientWillPausePlayback): Ditto.
293         (WebCore::MediaSession::mediaType): Ask client for state.
294         * platform/audio/MediaSession.h:
295
296         * platform/audio/MediaSessionManager.cpp:
297         (WebCore::MediaSessionManager::MediaSessionManager): m_interruptions -> m_interrupted.
298         (WebCore::MediaSessionManager::beginInterruption): Don't assume interruptions are always balanced.
299         (WebCore::MediaSessionManager::endInterruption): Ditto.
300         (WebCore::MediaSessionManager::addSession): 
301         (WebCore::MediaSessionManager::applicationWillEnterBackground): Interrupt client if it is not
302             allowed to play in the background.
303         (WebCore::MediaSessionManager::applicationWillEnterForeground): End client interruption if it
304             was stopped by an interruption.
305         * platform/audio/MediaSessionManager.h:
306
307         * platform/audio/ios/MediaSessionManagerIOS.h:
308         * platform/audio/ios/MediaSessionManagerIOS.mm:
309         (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS): Clear the helper callback.
310         (WebCore::MediaSessionManageriOS::resetRestrictions): Mark video as not allowed to play
311             while the application is in the background. Register for application suspend/resume
312             notifications.
313         (-[WebMediaSessionHelper clearCallback]): Set _callback to nil.
314         (-[WebMediaSessionHelper applicationWillEnterForeground:]): New, notify client of application 
315             state change.
316         (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
317
318         * platform/audio/mac/AudioDestinationMac.h: Add resumePlayback.
319
320         * testing/Internals.cpp:
321         (WebCore::Internals::applicationWillEnterForeground): New, simulate application context switch.
322         (WebCore::Internals::applicationWillEnterBackground): Ditto.
323         (WebCore::Internals::setMediaSessionRestrictions): Add "BackgroundPlaybackNotPermitted" restriction.
324         * testing/Internals.h:
325         * testing/Internals.idl:
326
327 2014-02-04  Andreas Kling  <akling@apple.com>
328
329         Remove CPP bindings generator.
330         <https://webkit.org/b/128189>
331
332         Scrub out some leftover Blackberry gunk.
333
334         Reviewed by Anders Carlsson.
335
336         * Modules/webdatabase/SQLResultSet.idl:
337         * bindings/cpp/WebDOMCString.cpp: Removed.
338         * bindings/cpp/WebDOMCString.h: Removed.
339         * bindings/cpp/WebDOMDOMWindowCustom.cpp: Removed.
340         * bindings/cpp/WebDOMEventListenerCustom.cpp: Removed.
341         * bindings/cpp/WebDOMEventTarget.cpp: Removed.
342         * bindings/cpp/WebDOMEventTarget.h: Removed.
343         * bindings/cpp/WebDOMHTMLCollectionCustom.cpp: Removed.
344         * bindings/cpp/WebDOMHTMLDocumentCustom.cpp: Removed.
345         * bindings/cpp/WebDOMHTMLOptionsCollectionCustom.cpp: Removed.
346         * bindings/cpp/WebDOMNodeCustom.cpp: Removed.
347         * bindings/cpp/WebDOMNodeFilterCustom.cpp: Removed.
348         * bindings/cpp/WebDOMObject.h: Removed.
349         * bindings/cpp/WebDOMString.cpp: Removed.
350         * bindings/cpp/WebDOMString.h: Removed.
351         * bindings/cpp/WebExceptionHandler.cpp: Removed.
352         * bindings/cpp/WebExceptionHandler.h: Removed.
353         * bindings/cpp/WebNativeEventListener.cpp: Removed.
354         * bindings/cpp/WebNativeEventListener.h: Removed.
355         * bindings/cpp/WebNativeNodeFilterCondition.cpp: Removed.
356         * bindings/cpp/WebNativeNodeFilterCondition.h: Removed.
357         * bindings/scripts/CodeGeneratorCPP.pm: Removed.
358         * bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Removed.
359         * bindings/scripts/test/CPP/CPPTestSupplemental.h: Removed.
360         * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp: Removed.
361         * bindings/scripts/test/CPP/WebDOMFloat64Array.h: Removed.
362         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp: Removed.
363         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.h: Removed.
364         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: Removed.
365         * bindings/scripts/test/CPP/WebDOMTestCallback.h: Removed.
366         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp: Removed.
367         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.h: Removed.
368         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp: Removed.
369         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.h: Removed.
370         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp: Removed.
371         * bindings/scripts/test/CPP/WebDOMTestEventTarget.h: Removed.
372         * bindings/scripts/test/CPP/WebDOMTestException.cpp: Removed.
373         * bindings/scripts/test/CPP/WebDOMTestException.h: Removed.
374         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Removed.
375         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Removed.
376         * bindings/scripts/test/CPP/WebDOMTestImplements.cpp: Removed.
377         * bindings/scripts/test/CPP/WebDOMTestImplements.h: Removed.
378         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp: Removed.
379         * bindings/scripts/test/CPP/WebDOMTestInterface.h: Removed.
380         * bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp: Removed.
381         * bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.h: Removed.
382         * bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp: Removed.
383         * bindings/scripts/test/CPP/WebDOMTestNamedConstructor.h: Removed.
384         * bindings/scripts/test/CPP/WebDOMTestNode.cpp: Removed.
385         * bindings/scripts/test/CPP/WebDOMTestNode.h: Removed.
386         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Removed.
387         * bindings/scripts/test/CPP/WebDOMTestObj.h: Removed.
388         * bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp: Removed.
389         * bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.h: Removed.
390         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp: Removed.
391         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h: Removed.
392         * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Removed.
393         * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Removed.
394         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Removed.
395         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Removed.
396         * bindings/scripts/test/CPP/WebDOMattribute.cpp: Removed.
397         * bindings/scripts/test/CPP/WebDOMattribute.h: Removed.
398         * bindings/scripts/test/CPP/WebDOMreadonly.cpp: Removed.
399         * bindings/scripts/test/CPP/WebDOMreadonly.h: Removed.
400         * css/StyleSheet.idl:
401         * dom/CustomEvent.idl:
402         * dom/Document.idl:
403         * dom/Event.idl:
404         * dom/Node.idl:
405         * dom/PopStateEvent.idl:
406         * html/HTMLCanvasElement.idl:
407         * html/HTMLInputElement.idl:
408         * html/canvas/CanvasRenderingContext2D.idl:
409         * page/DOMWindow.idl:
410         * page/Location.idl:
411         * workers/DedicatedWorkerGlobalScope.idl:
412
413 2014-02-04  Dan Bernstein  <mitz@apple.com>
414
415         iOS build fix.
416
417         * platform/graphics/cg/GraphicsContextCG.cpp:
418         (WebCore::GraphicsContext::platformInit):
419
420 2014-02-03  Zan Dobersek  <zdobersek@igalia.com>
421
422         Manage MediaQuery and MediaQueryExp classes through std::unique_ptr instead of OwnPtr
423         https://bugs.webkit.org/show_bug.cgi?id=128117
424
425         Reviewed by Darin Adler.
426
427         Replace uses of OwnPtr for the MediaQuery and MediaQueryExp classes with std::unique_ptr.
428
429         * css/CSSGrammar.y.in:
430         * css/CSSParser.cpp:
431         (WebCore::CSSParser::parseMediaQuery):
432         * css/CSSParser.h:
433         * css/MediaList.cpp:
434         (WebCore::MediaQuerySet::parse):
435         (WebCore::MediaQuerySet::add):
436         (WebCore::MediaQuerySet::remove):
437         (WebCore::MediaQuerySet::addMediaQuery):
438         (WebCore::MediaList::item):
439         (WebCore::reportMediaQueryWarningIfNeeded):
440         * css/MediaList.h:
441         (WebCore::MediaQuerySet::queryVector):
442         * css/MediaQuery.cpp:
443         (WebCore::MediaQuery::MediaQuery):
444         * css/MediaQuery.h:
445         (WebCore::MediaQuery::expressions):
446         (WebCore::MediaQuery::copy):
447         * css/MediaQueryEvaluator.cpp:
448         (WebCore::MediaQueryEvaluator::eval):
449         * css/MediaQueryExp.cpp:
450         (WebCore::MediaQueryExp::MediaQueryExp):
451         * css/MediaQueryExp.h:
452         (WebCore::MediaQueryExp::copy):
453
454 2014-02-04  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
455
456         Remove SVG_DOM_OBJC_BINDINGS after r161638.
457         https://bugs.webkit.org/show_bug.cgi?id=128182
458
459         Reviewed by Andreas Kling.
460
461         Removed ENABLE(SVG_DOM_OBJC_BINDINGS).
462
463         No tests required.
464
465         * bindings/objc/DOMUIKitExtensions.mm:
466         (-[DOMNode boundingBoxes]):
467         (-[DOMNode absoluteQuads]):
468
469 2014-02-04  Radu Stavila  <stavila@adobe.com>
470
471         REGRESSION (r159609): Images are corrupted when hovering over buttons @ github.com
472         https://bugs.webkit.org/show_bug.cgi?id=127729
473
474         Reviewed by Antti Koivisto.
475
476         When clipping a rect, the RenderLayer would not properly save the context when
477         the clipping rect is the same as the paint rect and the clipping rect
478         has radius.
479
480         Test: fast/regions/repaint/hover-border-radius.html
481
482         * rendering/RenderLayer.cpp:
483         (WebCore::RenderLayer::clipToRect):
484         (WebCore::RenderLayer::restoreClip):
485
486 2014-02-04  Ryuan Choi  <ryuan.choi@samsung.com>
487
488         [CMAKE] Remove workaround for GCC 4.6
489         https://bugs.webkit.org/show_bug.cgi?id=128176
490
491         Reviewed by Csaba Osztrogonác.
492
493         Since r162126, WebKit requires at least 4.7.
494
495         * CMakeLists.txt:
496
497 2014-02-04  Zan Dobersek  <zdobersek@igalia.com>
498
499         Manage RuleSet and RuleData classes through std::unique_ptr instead of OwnPtr
500         https://bugs.webkit.org/show_bug.cgi?id=128116
501
502         Reviewed by Darin Adler.
503
504         Replace uses of OwnPtr for the RuleSet and RuleData classes with std::unique_ptr.
505
506         * css/CSSDefaultStyleSheets.cpp:
507         (WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
508         (WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
509         (WebCore::CSSDefaultStyleSheets::viewSourceStyle):
510         * css/DocumentRuleSets.cpp:
511         (WebCore::DocumentRuleSets::initUserStyle):
512         (WebCore::makeRuleSet):
513         (WebCore::DocumentRuleSets::resetAuthorStyle):
514         * css/DocumentRuleSets.h:
515         * css/RuleSet.cpp:
516         (WebCore::RuleSet::addToRuleSet):
517         (WebCore::RuleSet::addRegionRule):
518         * css/RuleSet.h:
519         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
520
521 2014-02-04  Commit Queue  <commit-queue@webkit.org>
522
523         Unreviewed, rolling out r163376.
524         http://trac.webkit.org/changeset/163376
525         https://bugs.webkit.org/show_bug.cgi?id=128184
526
527         Unexpected test failures. (Requested by eric_carlson on
528         #webkit).
529
530         * WebCore.exp.in:
531         * html/HTMLMediaElement.cpp:
532         (WebCore::HTMLMediaElement::parseAttribute):
533         * html/HTMLMediaElement.h:
534         * html/HTMLMediaSession.cpp:
535         (WebCore::HTMLMediaSession::addBehaviorRestriction):
536         (WebCore::HTMLMediaSession::removeBehaviorRestriction):
537         (WebCore::HTMLMediaSession::clientWillBeginPlayback):
538         * html/HTMLMediaSession.h:
539         * platform/audio/MediaSession.cpp:
540         (WebCore::MediaSession::MediaSession):
541         (WebCore::MediaSession::beginInterruption):
542         (WebCore::MediaSession::endInterruption):
543         * platform/audio/MediaSession.h:
544         (WebCore::MediaSession::mediaType):
545         (WebCore::MediaSession::setState):
546         (WebCore::MediaSessionClient::beginInterruption):
547         (WebCore::MediaSessionClient::endInterruption):
548         * platform/audio/MediaSessionManager.cpp:
549         (WebCore::MediaSessionManager::MediaSessionManager):
550         (WebCore::MediaSessionManager::beginInterruption):
551         (WebCore::MediaSessionManager::endInterruption):
552         (WebCore::MediaSessionManager::addSession):
553         * platform/audio/MediaSessionManager.h:
554         * platform/audio/ios/MediaSessionManagerIOS.h:
555         (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
556         * platform/audio/ios/MediaSessionManagerIOS.mm:
557         (WebCore::MediaSessionManageriOS::resetRestrictions):
558         (-[WebMediaSessionHelper initWithCallback:]):
559         * platform/audio/mac/AudioDestinationMac.h:
560         * testing/Internals.cpp:
561         (WebCore::Internals::setMediaSessionRestrictions):
562         * testing/Internals.h:
563         * testing/Internals.idl:
564
565 2014-02-04  Eric Carlson  <eric.carlson@apple.com>
566
567         Refine MediaSession interruptions
568         https://bugs.webkit.org/show_bug.cgi?id=128125
569
570         Reviewed by Jer Noble.
571
572         Test: media/video-background-playback.html
573
574         * WebCore.exp.in: Export applicationWillEnterForeground and applicationWillEnterBackground for
575             Internals.
576
577         * html/HTMLMediaElement.cpp:
578         (WebCore::HTMLMediaElement::play): Ask the media session if playback is allowed instead of check
579             to see if it is interrupted directly.
580         (WebCore::HTMLMediaElement::pause): Ask the media session if pausing is allowed instead of check
581             to see if it is interrupted directly.
582         (WebCore::HTMLMediaElement::mediaType): Return media type based on media characteristics once
583             the information is available.
584         (WebCore::HTMLMediaElement::resumePlayback): New.
585         * html/HTMLMediaElement.h:
586
587         * html/HTMLMediaSession.cpp:
588         (WebCore::restrictionName): New, use for logging only.
589         (WebCore::HTMLMediaSession::addBehaviorRestriction): Log  restriction changes.
590         (WebCore::HTMLMediaSession::removeBehaviorRestriction): Ditto.
591         * html/HTMLMediaSession.h:
592
593         * platform/audio/MediaSession.cpp:
594         (WebCore::stateName): New, used for logging.
595         (WebCore::MediaSession::MediaSession): Don't cache client media type because it can change.
596         (WebCore::MediaSession::setState): Log state changes.
597         (WebCore::MediaSession::beginInterruption): Remember the current state in case we want to use it
598             to restore state when the interruption ends.
599         (WebCore::MediaSession::endInterruption): Resume playback if appropriate.
600         (WebCore::MediaSession::clientWillBeginPlayback): Track the client's playback state.
601         (WebCore::MediaSession::clientWillPausePlayback): Ditto.
602         (WebCore::MediaSession::mediaType): Ask client for state.
603         * platform/audio/MediaSession.h:
604
605         * platform/audio/MediaSessionManager.cpp:
606         (WebCore::MediaSessionManager::MediaSessionManager): m_interruptions -> m_interrupted.
607         (WebCore::MediaSessionManager::beginInterruption): Don't assume interruptions are always balanced.
608         (WebCore::MediaSessionManager::endInterruption): Ditto.
609         (WebCore::MediaSessionManager::addSession): 
610         (WebCore::MediaSessionManager::applicationWillEnterBackground): Interrupt client if it is not
611             allowed to play in the background.
612         (WebCore::MediaSessionManager::applicationWillEnterForeground): End client interruption if it
613             was stopped by an interruption.
614         * platform/audio/MediaSessionManager.h:
615
616         * platform/audio/ios/MediaSessionManagerIOS.h:
617         * platform/audio/ios/MediaSessionManagerIOS.mm:
618         (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS): Clear the helper callback.
619         (WebCore::MediaSessionManageriOS::resetRestrictions): Mark video as not allowed to play
620             while the application is in the background. Register for application suspend/resume
621             notifications.
622         (-[WebMediaSessionHelper clearCallback]): Set _callback to nil.
623         (-[WebMediaSessionHelper applicationWillEnterForeground:]): New, notify client of application 
624             state change.
625         (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
626
627         * platform/audio/mac/AudioDestinationMac.h: Add resumePlayback.
628
629         * testing/Internals.cpp:
630         (WebCore::Internals::applicationWillEnterForeground): New, simulate application context switch.
631         (WebCore::Internals::applicationWillEnterBackground): Ditto.
632         (WebCore::Internals::setMediaSessionRestrictions): Add "BackgroundPlaybackNotPermitted" restriction.
633         * testing/Internals.h:
634         * testing/Internals.idl:
635
636 2014-02-04  Mihai Maerean  <mmaerean@adobe.com>
637
638         [CSS Regions] Fix Assert SHOULD NEVER BE REACHED in RenderLayer::enclosingElement()
639         https://bugs.webkit.org/show_bug.cgi?id=123329
640
641         Reviewed by Mihnea Ovidenie.
642
643         The flowthread doesn't have an enclosing element, so when hitting the layer of the
644         flowthread (e.g. the descent area of the RootInlineBox for the image flowed alone
645         inside the flow thread) we're letting the hit testing continue so it will hit the region.
646
647         Tests: fast/regions/assert-hit-test-image.html
648                fast/regions/auto-size/region-same-height-as-div-with-inline-child.html
649
650         * rendering/RenderLayer.cpp:
651         (WebCore::RenderLayer::hitTestContents):
652
653 2014-02-04  Mihnea Ovidenie  <mihnea@adobe.com>
654
655         ASSERTION FAILED: !object || (object->isRenderBlock())
656         https://bugs.webkit.org/show_bug.cgi?id=127687
657
658         Reviewed by Ryosuke Niwa.
659
660         Currently, when computing the visible position for a point inside a region,
661         we transform the point into flow thread coordinates and delegate the processing
662         to the first child of the flow thread which we incorrectly assume is a block.
663         However, we can specify flow-into also on inline elements which leads to the
664         assertion.
665
666         Instead of delegating the processing to the first child when the flow thread
667         has children, delegate the computation of the visible position to the
668         flow thread and avoid any assumption about the nature of the flow thread
669         first child. If the flow thread does not have any children that should be
670         rendered by the region, let the region behave like an ordinary element
671         with no children.
672
673         Tests: fast/regions/selection/position-for-point-inline-content-node.html
674                fast/regions/selection/selection-ended-in-empty-region.html
675
676         * rendering/RenderRegion.cpp:
677         (WebCore::RenderRegion::positionForPoint):
678
679 2014-02-03  Andreas Kling  <akling@apple.com>
680
681         Remove stray vestige from ::-webkit-distributed selector.
682         <https://webkit.org/b/128154>
683
684         Reviewed by Anders Carlsson.
685
686         * css/CSSSelector.cpp:
687         (WebCore::CSSSelector::extractPseudoType):
688
689 2014-02-03  Andreas Kling  <akling@apple.com>
690
691         Remove the CSS @host rule.
692         <https://webkit.org/b/128146>
693
694         The @host rule is no longer part of the spec, and besides this code
695         was behind ENABLE(SHADOW_DOM) so nobody was building it.
696
697         Reviewed by Anders Carlsson.
698
699         * CMakeLists.txt:
700         * DerivedSources.cpp:
701         * DerivedSources.make:
702         * GNUmakefile.list.am:
703         * WebCore.vcxproj/WebCore.vcxproj:
704         * WebCore.vcxproj/WebCore.vcxproj.filters:
705         * WebCore.xcodeproj/project.pbxproj:
706         * bindings/js/JSCSSRuleCustom.cpp:
707         (WebCore::toJS):
708         * bindings/objc/DOMCSS.mm:
709         (kitClass):
710         * css/CSSAllInOne.cpp:
711         * css/CSSGrammar.y.in:
712         * css/CSSHostRule.cpp: Removed.
713         * css/CSSHostRule.h: Removed.
714         * css/CSSHostRule.idl: Removed.
715         * css/CSSParser.cpp:
716         (WebCore::CSSParser::detectDashToken):
717         (WebCore::CSSParser::detectAtToken):
718         * css/CSSParser.h:
719         * css/CSSRule.h:
720         * css/CSSRule.idl:
721         * css/InspectorCSSOMWrappers.cpp:
722         (WebCore::InspectorCSSOMWrappers::collect):
723         * css/StyleResolver.h:
724         * css/StyleRule.cpp:
725         (WebCore::StyleRuleBase::destroy):
726         (WebCore::StyleRuleBase::copy):
727         (WebCore::StyleRuleBase::createCSSOMWrapper):
728         * css/StyleRule.h:
729         * css/StyleSheetContents.cpp:
730         (WebCore::childRulesHaveFailedOrCanceledSubresources):
731         * inspector/InspectorStyleSheet.cpp:
732         (flattenSourceData):
733         (WebCore::asCSSRuleList):
734
735 2014-02-03  Zalan Bujtas  <zalan@apple.com>
736
737         Subpixel rendering: Do not query the scaling factor when the graphics context is invalid.
738         https://bugs.webkit.org/show_bug.cgi?id=128131
739
740         Reviewed by Simon Fraser.
741
742         No existing context to test it.
743
744         * platform/graphics/GraphicsContext.h:
745         * platform/graphics/cairo/GraphicsContextCairo.cpp:
746         (WebCore::GraphicsContext::platformInit):
747         * platform/graphics/cg/GraphicsContextCG.cpp:
748         (WebCore::GraphicsContext::platformInit):
749         * platform/graphics/wince/GraphicsContextWinCE.cpp:
750         (WebCore::GraphicsContext::platformInit):
751
752 2014-02-03  Hunseop Jeong  <hs85.jeong@samsung.com>
753
754         [Cairo] GraphicsContext::m_pixelSnappingFactor is uninitialized
755         https://bugs.webkit.org/show_bug.cgi?id=128102
756
757         Reviewed by Csaba Osztrogonác.
758
759         Initalize m_pixelSnappingFactor to 1
760
761         * platform/graphics/cairo/GraphicsContextCairo.cpp:
762         (WebCore::GraphicsContext::GraphicsContext): Initialized pixelSnappingFactor to 1 and 
763         fixed the coding style violation.
764
765 2014-02-03  Brian Burg  <bburg@apple.com>
766
767         Web Replay: upstream base input classes and the input cursor interface
768         https://bugs.webkit.org/show_bug.cgi?id=128110
769
770         Reviewed by Joseph Pecoraro.
771
772         Add EventLoopInput, a base class for replay inputs that are handled
773         as if they begin a new run loop. For example, navigations, user input,
774         network callbacks, and asynchronous timers are modeled by inputs which
775         derive from this base class.
776
777         Add the ability to set an InputCursor instance on a Document. This
778         is the means for connecting a replay recording to a document context.
779
780         Add forwarding headers for some fundamental replay classes.
781
782         No new tests; no new functionality is exposed.
783
784         * ForwardingHeaders/replay/EmptyInputCursor.h: Added.
785         * ForwardingHeaders/replay/InputCursor.h: Added.
786         * ForwardingHeaders/replay/NondeterministicInput.h: Added.
787         * WebCore.xcodeproj/project.pbxproj:
788         * dom/Document.cpp:
789         (WebCore::Document::Document):
790         * dom/Document.h:
791         (WebCore::Document::inputCursor):
792         (WebCore::Document::setInputCursor):
793         * replay/EventLoopInput.h: Added.
794         (WebCore::ReplayPosition::ReplayPosition):
795         (WebCore::ReplayPosition::index):
796         (WebCore::ReplayPosition::time):
797         (WebCore::EventLoopInputBase::EventLoopInputBase):
798         (WebCore::EventLoopInputBase::~EventLoopInputBase):
799         (WebCore::EventLoopInputBase::setPosition):
800         (WebCore::EventLoopInputBase::position):
801
802 2014-02-03  Jinwoo Song  <jinwoo7.song@samsung.com>
803
804         Remove unused code in CSSParser.cpp
805         https://bugs.webkit.org/show_bug.cgi?id=128135
806
807         Reviewed by Darin Adler.
808
809         * css/CSSParser.cpp:
810         (WebCore::CSSParser::parseValue):
811
812 2014-02-03  Brent Fulgham  <bfulgham@apple.com>
813
814         [Mac] WK1 Clients Only Latch on Momentum Scroll
815         https://bugs.webkit.org/show_bug.cgi?id=128133
816
817         Reviewed by Simon Fraser.
818
819         * platform/PlatformWheelEvent.h:
820         (WebCore::PlatformWheelEvent::useLatchedEventElement): Update
821         predicate to recognize the start and change phases of the wheel
822         event as latchable (not just momentum start/change).
823
824 2014-02-03  Dean Jackson  <dino@apple.com>
825
826         Feature flag for shape-inside
827         https://bugs.webkit.org/show_bug.cgi?id=128001
828
829         Reviewed by Simon Fraser.
830
831         Add CSS_SHAPE_INSIDE flag.
832
833         I wrapped everything that is specific to shape-inside in
834         this flag. It is now possible to build with CSS Shapes enabled
835         but shape-inside disabled. CSS_SHAPE_INSIDE is dependent on
836         CSS_SHAPES, so disabling the latter should also disable the former.
837
838         * Configurations/FeatureDefines.xcconfig:
839         * css/CSSComputedStyleDeclaration.cpp:
840         (WebCore::ComputedStyleExtractor::propertyValue):
841         * css/CSSParser.cpp:
842         (WebCore::CSSParser::parseValue):
843         (WebCore::CSSParser::parseShapeProperty):
844         * css/CSSPropertyNames.in:
845         * css/DeprecatedStyleBuilder.cpp:
846         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
847         * css/StyleResolver.cpp:
848         (WebCore::StyleResolver::applyProperty):
849         (WebCore::StyleResolver::loadPendingImages):
850         * page/animation/CSSPropertyAnimation.cpp:
851         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
852         * rendering/LayoutState.cpp:
853         (WebCore::LayoutState::LayoutState):
854         * rendering/LayoutState.h:
855         (WebCore::LayoutState::LayoutState):
856         * rendering/RenderBlock.cpp:
857         (WebCore::RenderBlock::styleDidChange):
858         (WebCore::RenderBlock::updateShapesBeforeBlockLayout):
859         (WebCore::RenderBlock::updateShapesAfterBlockLayout):
860         * rendering/RenderBlock.h:
861         * rendering/RenderBlockFlow.cpp:
862         (WebCore::RenderBlockFlow::layoutBlockChild):
863         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
864         * rendering/RenderBlockFlow.h:
865         * rendering/RenderBlockLineLayout.cpp:
866         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
867         (WebCore::constructBidiRunsForLine):
868         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
869         * rendering/RenderElement.cpp:
870         (WebCore::RenderElement::~RenderElement):
871         (WebCore::RenderElement::initializeStyle):
872         (WebCore::RenderElement::setStyle):
873         * rendering/RenderNamedFlowFragment.cpp:
874         (WebCore::RenderNamedFlowFragment::createStyle):
875         * rendering/RenderView.h:
876         * rendering/SimpleLineLayout.cpp:
877         (WebCore::SimpleLineLayout::canUseFor):
878         * rendering/line/BreakingContextInlineHeaders.h:
879         (WebCore::BreakingContext::handleText):
880         (WebCore::BreakingContext::handleEndOfLine):
881         * rendering/line/LineBreaker.cpp:
882         (WebCore::LineBreaker::nextLineBreak):
883         * rendering/line/LineWidth.cpp:
884         (WebCore::LineWidth::LineWidth):
885         (WebCore::LineWidth::updateAvailableWidth):
886         (WebCore::LineWidth::fitBelowFloats):
887         * rendering/line/LineWidth.h:
888         * rendering/shapes/ShapeInsideInfo.cpp:
889         * rendering/shapes/ShapeInsideInfo.h:
890         * rendering/style/RenderStyle.cpp:
891         (WebCore::RenderStyle::changeRequiresLayout):
892         * rendering/style/RenderStyle.h:
893         * rendering/style/StyleRareNonInheritedData.cpp:
894         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
895         (WebCore::StyleRareNonInheritedData::operator==):
896         * rendering/style/StyleRareNonInheritedData.h:
897
898 2014-02-03  Radu Stavila  <stavila@adobe.com>
899
900         REGRESSION (r163018): Can’t scroll in <select> lists
901         https://bugs.webkit.org/show_bug.cgi?id=128090
902
903         The regression was caused by the fact that a new method scrollWithWheelEventLocation() was added
904         to RenderBox to replace the generic scroll() method for the particular case of scrolling using 
905         the mouse wheel. This turned out to be a mistake because in the case of some elements, like select lists, 
906         the scroll method was overriden and now the incorrect method was being called.
907         The solution was to remove the new method and just add two default parameters to the generic
908         scroll method.
909
910         Reviewed by Simon Fraser.
911
912         Test: fast/scrolling/scroll-select-list.html
913
914         * page/EventHandler.cpp:
915         (WebCore::scrollNode):
916         * rendering/RenderBox.cpp:
917         (WebCore::RenderBox::scroll):
918         * rendering/RenderBox.h:
919         * rendering/RenderEmbeddedObject.cpp:
920         (WebCore::RenderEmbeddedObject::scroll):
921         * rendering/RenderEmbeddedObject.h:
922         * rendering/RenderListBox.cpp:
923         (WebCore::RenderListBox::scroll):
924         * rendering/RenderListBox.h:
925         * rendering/RenderTextControlSingleLine.cpp:
926         (WebCore::RenderTextControlSingleLine::scroll):
927         * rendering/RenderTextControlSingleLine.h:
928
929 2014-02-03  Chris Fleizach  <cfleizach@apple.com>
930
931         AX: WebKit should support @headers/@id for complex accessible web tables
932         https://bugs.webkit.org/show_bug.cgi?id=128114
933
934         Reviewed by Darin Adler.
935
936         Expose the headers attribute for table cells to accessibility.
937
938         Test: platform/mac/accessibility/table-headers-attribute.html
939
940         * accessibility/AccessibilityTableCell.cpp:
941         (WebCore::AccessibilityTableCell::columnHeaders):
942
943 2014-02-03  Andreas Kling  <akling@apple.com>
944
945         CTTE: RenderSVGGradientStop always has a SVGStopElement.
946         <https://webkit.org/b/128107>
947
948         RenderSVGGradientStop is never anonymous and always has a
949         corresponding SVGStopElement. Codify this by adding an element()
950         overload that returns an SVGStopElement&.
951
952         Also added missing overrides and made most functions private.
953
954         Reviewed by Darin Adler.
955
956         * rendering/svg/RenderSVGGradientStop.cpp:
957         (WebCore::RenderSVGGradientStop::styleDidChange):
958         (WebCore::RenderSVGGradientStop::gradientElement):
959         * rendering/svg/RenderSVGGradientStop.h:
960         * rendering/svg/SVGRenderTreeAsText.cpp:
961         (WebCore::writeSVGGradientStop):
962
963 2014-02-03  David Kilzer  <ddkilzer@apple.com>
964
965         Remove CachedImageManual class
966         <http://webkit.org/b/128043>
967
968         Reviewed by Darin Adler.
969
970         Get rid of the CachedImageManual class by inlining its
971         functionality into CachedImage.  This makes it possible to
972         de-virtual-ize isManual() (renamed to isManuallyCached()) and to
973         make CachedImage final.  The size of CachedImage does not
974         increase because we turn an existing bool into a bitfield to add
975         an m_isManuallyCached bit, and create a static CachedImageClient
976         in MemoryCache.cpp as the "fake" client to keep the manually
977         cached image alive in the cache.
978
979         * loader/cache/CachedImage.cpp:
980         (WebCore::CachedImage::CachedImage): Set m_isManuallyCached
981         bitfield.  For one overloaded constructor, move the
982         CachedImageManual code into the CachedImage constructor.
983         (WebCore::CachedImageManual::CachedImageManual): Remove.
984         (WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Move
985         method from CachedImageManual to CachedImage, and put
986         ManuallyCached behavior behind a check.
987         * loader/cache/CachedImage.h: Update includes.  Make CachedImage
988         final.  Add CachedImage::CacheBehaviorType enum when manually
989         cached images are created.  Move CachedImageManual methods into
990         CachedImage, remove addFakeClient() and removeFakeClient()
991         methods (MemoryCache methods use addClient() and removeClient()
992         with a static CachedImageClient), and remove the
993         CachedImageManual class definition.  Change
994         m_shouldPaintBrokenImage to a bitfield and add
995         m_isManuallyCached bitfield.
996
997         * loader/cache/MemoryCache.cpp:
998         (WebCore::MemoryCache::addImageToCache): Use std::unique_ptr and
999         remove useless NULL check after calling CachedImage constructor.
1000         (WebCore::MemoryCache::removeImageFromCache):
1001         - Update to use CachedImage class instead of CachedImageManual.
1002
1003 2014-02-03  Zan Dobersek  <zdobersek@igalia.com>
1004
1005         Move the webdatabase module source code to std::unique_ptr
1006         https://bugs.webkit.org/show_bug.cgi?id=127278
1007
1008         Reviewed by Antti Koivisto.
1009
1010         Replace the majority of OwnPtr uses in the webdatabase module with std::unique_ptr.
1011         The only remaining uses are due to ScriptExecutionContext::Task subclasses.
1012
1013         * Modules/webdatabase/AbstractSQLTransactionBackend.h:
1014         * Modules/webdatabase/Database.cpp:
1015         * Modules/webdatabase/DatabaseTask.h:
1016         * Modules/webdatabase/DatabaseThread.cpp:
1017         (WebCore::DatabaseThread::DatabaseThread):
1018         * Modules/webdatabase/DatabaseThread.h:
1019         * Modules/webdatabase/DatabaseTracker.cpp:
1020         (WebCore::DatabaseTracker::addOpenDatabase):
1021         * Modules/webdatabase/DatabaseTracker.h:
1022         * Modules/webdatabase/OriginLock.cpp:
1023         * Modules/webdatabase/SQLStatement.cpp:
1024         * Modules/webdatabase/SQLStatement.h:
1025         * Modules/webdatabase/SQLStatementBackend.cpp:
1026         (WebCore::SQLStatementBackend::create):
1027         (WebCore::SQLStatementBackend::SQLStatementBackend):
1028         * Modules/webdatabase/SQLStatementBackend.h:
1029         * Modules/webdatabase/SQLTransaction.cpp:
1030         (WebCore::SQLTransaction::executeSQL):
1031         * Modules/webdatabase/SQLTransactionBackend.cpp:
1032         (WebCore::SQLTransactionBackend::doCleanup):
1033         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
1034         (WebCore::SQLTransactionBackend::executeSQL):
1035         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1036         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
1037         * Modules/webdatabase/SQLTransactionBackend.h:
1038         * Modules/webdatabase/SQLTransactionBackendSync.cpp:
1039         (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
1040         (WebCore::SQLTransactionBackendSync::begin):
1041         (WebCore::SQLTransactionBackendSync::commit):
1042         (WebCore::SQLTransactionBackendSync::rollback):
1043         * Modules/webdatabase/SQLTransactionBackendSync.h:
1044
1045 2014-02-03  Andreas Kling  <akling@apple.com>
1046
1047         CTTE: Grab bag of SVGRenderTreeAsText cleanups.
1048         <https://webkit.org/b/128099>
1049
1050         Made some of the DRT SVG functions take more specific types than
1051         RenderObject. Removed some redundant casts.
1052
1053         Reviewed by Anders Carlsson.
1054
1055         * rendering/RenderTreeAsText.cpp:
1056         (WebCore::write):
1057         * rendering/svg/SVGRenderTreeAsText.h:
1058         * rendering/svg/SVGRenderTreeAsText.cpp:
1059         (WebCore::writeSVGResourceContainer):
1060         (WebCore::writeSVGContainer):
1061
1062             Make writeSVGResourceContainer() and writeSVGContainer() take the
1063             final type instead of RenderObject.
1064
1065         (WebCore::writeStyle):
1066         (WebCore::writePositionAndStyle):
1067
1068             Make these take RenderElement instead of RenderObject.
1069
1070         (WebCore::writeChildren):
1071
1072             Use child renderer iterator.
1073
1074         (WebCore::writeResources):
1075
1076             Remove unnecessary cast.
1077
1078 2014-01-25  Darin Adler  <darin@apple.com>
1079
1080         Stop using Unicode.h
1081         https://bugs.webkit.org/show_bug.cgi?id=127633
1082
1083         Reviewed by Anders Carlsson.
1084
1085         * Modules/indexeddb/IDBKeyPath.cpp:
1086         * css/CSSFontFace.h:
1087         * css/CSSOMUtils.h:
1088         * css/CSSSegmentedFontFace.h:
1089         * css/CSSUnicodeRangeValue.h:
1090         * editing/Editor.cpp:
1091         * editing/SmartReplace.h:
1092         * html/parser/HTMLTokenizer.cpp:
1093         * loader/DocumentLoader.cpp:
1094         * page/ContextMenuController.cpp:
1095         * page/Settings.h:
1096         * platform/DateComponents.h:
1097         * platform/SharedBuffer.cpp:
1098         * platform/graphics/Color.h:
1099         * platform/graphics/FontCache.h:
1100         * platform/graphics/FontData.h:
1101         * platform/graphics/FontDescription.h:
1102         * platform/graphics/FontFastPath.cpp:
1103         * platform/graphics/FontGenericFamilies.h:
1104         * platform/graphics/FontGlyphs.cpp:
1105         * platform/graphics/GlyphMetricsMap.h:
1106         * platform/graphics/GlyphPage.h:
1107         * platform/graphics/GlyphPageTreeNode.cpp:
1108         * platform/graphics/GlyphPageTreeNode.h:
1109         * platform/graphics/SVGGlyph.cpp:
1110         * platform/graphics/WidthIterator.h:
1111         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1112         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1113         * platform/graphics/mac/ComplexTextController.h:
1114         * platform/graphics/win/QTMovie.h:
1115         * platform/graphics/wince/FontWinCE.cpp:
1116         * platform/text/BidiContext.h:
1117         * platform/text/Hyphenation.h:
1118         * platform/text/LocaleToScriptMapping.h:
1119         * platform/text/TextBoundaries.cpp:
1120         * platform/text/TextBoundaries.h:
1121         * platform/text/TextBreakIterator.h:
1122         * platform/text/TextCodec.h:
1123         * platform/text/TextEncoding.h:
1124         * platform/text/TextEncodingRegistry.h:
1125         * platform/text/TextStream.h:
1126         * platform/text/icu/UTextProvider.h:
1127         * platform/text/icu/UTextProviderLatin1.h:
1128         * platform/text/icu/UTextProviderUTF16.h:
1129         * platform/text/wchar/TextBreakIteratorWchar.cpp:
1130         * platform/win/WebCoreTextRenderer.cpp:
1131         * rendering/RootInlineBox.cpp:
1132         * rendering/SimpleLineLayout.cpp:
1133         * rendering/SimpleLineLayoutFunctions.cpp:
1134         * rendering/break_lines.h:
1135         * svg/SVGFontData.cpp:
1136         Removed includes of <wtf/unicode/Unicode.h>, adding includes of
1137         ICU headers and <wtf/text/LChar.h> as needed to replace it.
1138
1139 2014-02-03  Jessie Berlin  <jberlin@apple.com>
1140
1141         Revert r163299 since it broke the ML 32-bit Release build
1142
1143         * html/HTMLAnchorElement.cpp:
1144         (WebCore::parsePortFromStringPosition):
1145         (WebCore::HTMLAnchorElement::hash):
1146         (WebCore::HTMLAnchorElement::setHash):
1147         (WebCore::HTMLAnchorElement::host):
1148         (WebCore::HTMLAnchorElement::setHost):
1149         (WebCore::HTMLAnchorElement::hostname):
1150         (WebCore::HTMLAnchorElement::setHostname):
1151         (WebCore::HTMLAnchorElement::pathname):
1152         (WebCore::HTMLAnchorElement::setPathname):
1153         (WebCore::HTMLAnchorElement::port):
1154         (WebCore::HTMLAnchorElement::setPort):
1155         (WebCore::HTMLAnchorElement::protocol):
1156         (WebCore::HTMLAnchorElement::setProtocol):
1157         (WebCore::HTMLAnchorElement::search):
1158         (WebCore::HTMLAnchorElement::origin):
1159         (WebCore::HTMLAnchorElement::setSearch):
1160         (WebCore::HTMLAnchorElement::toString):
1161         * html/HTMLAnchorElement.h:
1162         * html/HTMLAnchorElement.idl:
1163         * html/HTMLAreaElement.idl:
1164         * html/URLUtils.idl:
1165
1166 2014-02-03  Mihai Maerean  <mmaerean@adobe.com>
1167
1168         [CSS Regions] Fix selection and hover effect of content in region with overflow:hidden
1169         https://bugs.webkit.org/show_bug.cgi?id=127101
1170
1171         Reviewed by Mihnea Ovidenie.
1172
1173         RenderNamedFlowFragments are not hit candidates. The hit test algorithm will pick the
1174         parent layer, the one of the region.
1175
1176         Test: fast/regions/hover-overflow-hidden.html
1177
1178         * rendering/RenderLayer.cpp:
1179         (WebCore::isHitCandidate):
1180
1181 2014-02-02  Maciej Stachowiak  <mjs@apple.com>
1182
1183         Adopt URLUtils interface and template in HTMLAnchorElement and HTMLAreaElement
1184         https://bugs.webkit.org/show_bug.cgi?id=128067
1185
1186         Reviewed by Antti Koivisto.
1187
1188         Tests: fast/dom/HTMLAnchorElement/anchor-password.html
1189                fast/dom/HTMLAnchorElement/anchor-username.html
1190                fast/dom/HTMLAreaElement/area-password.html
1191                fast/dom/HTMLAreaElement/area-username.html
1192
1193         * html/HTMLAnchorElement.cpp:
1194         * html/HTMLAnchorElement.h:
1195         (WebCore::HTMLAnchorElement::setHref): Add version that takes
1196         (and ignores) ExceptionCode. This is needed because the URLUtil
1197         base interface is used for URL, which can throw an exception,
1198         and HTMLAnchorElement, which cannot.
1199         * html/HTMLAnchorElement.idl: implement URLUtils
1200         * html/HTMLAreaElement.idl: implement URLUtils
1201         * html/URLUtils.idl: Treat null as empty string for href
1202
1203 2014-02-03  Krzysztof Czech  <k.czech@samsung.com>
1204
1205         [ATK] Expose aria-controls through ATK_RELATION_CONTROLLER_FOR
1206         https://bugs.webkit.org/show_bug.cgi?id=127908
1207
1208         Reviewed by Chris Fleizach.
1209
1210         Based on w3c, aria-controls could be exposed through ATK_RELATION_CONTROLLER_FOR.
1211
1212         Test: accessibility/aria-controls.html
1213
1214         * accessibility/AccessibilityObject.h:
1215         (WebCore::AccessibilityObject::supportsARIAControls):
1216         (WebCore::AccessibilityObject::ariaControlsElements):
1217         * accessibility/AccessibilityRenderObject.cpp:
1218         (WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
1219         (WebCore::AccessibilityRenderObject::supportsARIAControls):
1220         (WebCore::AccessibilityRenderObject::ariaControlsElements):
1221         * accessibility/AccessibilityRenderObject.h:
1222         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1223         (setAtkRelationSetFromCoreObject):
1224
1225 2014-02-03  Andreas Kling  <akling@apple.com>
1226
1227         RenderSVGResource::removeClientFromCache() should take RenderElement&.
1228         <https://webkit.org/b/128097>
1229
1230         Text renderers never have resources associated with them.
1231         This is yet another step towards enforcing that at compile-time
1232         by making all the resource cache interfaces deal in RenderElement.
1233
1234         Also marked the RenderSVGResourceSolidColor class final.
1235
1236         Reviewed by Darin Adler.
1237
1238         * rendering/svg/RenderSVGResource.cpp:
1239         (WebCore::removeFromCacheAndInvalidateDependencies):
1240         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
1241         * rendering/svg/RenderSVGResource.h:
1242         * rendering/svg/RenderSVGResourceClipper.cpp:
1243         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
1244         * rendering/svg/RenderSVGResourceClipper.h:
1245         * rendering/svg/RenderSVGResourceFilter.cpp:
1246         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
1247         * rendering/svg/RenderSVGResourceFilter.h:
1248         * rendering/svg/RenderSVGResourceGradient.cpp:
1249         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
1250         * rendering/svg/RenderSVGResourceGradient.h:
1251         * rendering/svg/RenderSVGResourceMarker.cpp:
1252         (WebCore::RenderSVGResourceMarker::removeClientFromCache):
1253         * rendering/svg/RenderSVGResourceMarker.h:
1254         * rendering/svg/RenderSVGResourceMasker.cpp:
1255         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
1256         * rendering/svg/RenderSVGResourceMasker.h:
1257         * rendering/svg/RenderSVGResourcePattern.cpp:
1258         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
1259         * rendering/svg/RenderSVGResourcePattern.h:
1260         * rendering/svg/RenderSVGResourceSolidColor.h:
1261         * rendering/svg/SVGRenderSupport.cpp:
1262         (WebCore::invalidateResourcesOfChildren):
1263         (WebCore::SVGRenderSupport::layoutChildren):
1264         * rendering/svg/SVGResources.cpp:
1265         (WebCore::SVGResources::removeClientFromCache):
1266         * rendering/svg/SVGResources.h:
1267
1268 2014-02-03  Dan Bernstein  <mitz@apple.com>
1269
1270         More iOS build fixing.
1271
1272         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1273         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
1274         * html/parser/HTMLTreeBuilder.cpp:
1275         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
1276         * page/ios/FrameIOS.mm:
1277         (WebCore::Frame::interpretationsForCurrentRoot):
1278
1279 2014-02-03  Darin Adler  <darin@apple.com>
1280
1281         Try to fix iOS build.
1282
1283         * html/BaseDateAndTimeInputType.cpp:
1284         (WebCore::BaseDateAndTimeInputType::parseToDateComponents):
1285         Use deprecatedCharacters.
1286
1287 2014-02-02  Darin Adler  <darin@apple.com>
1288
1289         Obey "delete this" comments, including deleting String::characters and friends
1290         https://bugs.webkit.org/show_bug.cgi?id=126865
1291
1292         Reviewed by Andreas Kling.
1293
1294         * CMakeLists.txt: Deleted HTMLParserErrorCodes.cpp.
1295         * GNUmakefile.list.am: Deleted HTMLParserErrorCodes.cpp/h, and HTMLParserQuirks.h.
1296         * WebCore.vcxproj/WebCore.vcxproj: Deleted HTMLParserErrorCodes.cpp/h.
1297         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1298         * WebCore.xcodeproj/project.pbxproj: Ditto.
1299
1300         * html/HTMLParserErrorCodes.cpp: Removed.
1301         * html/HTMLParserErrorCodes.h: Removed.
1302         * html/HTMLParserQuirks.h: Removed.
1303
1304         * rendering/RenderText.h: Deleted the characters function, leaving behind the
1305         deprecatedCharacters function.
1306
1307 2014-02-02  Brady Eidson  <beidson@apple.com>
1308
1309         IDB: Cannot open new databases with the default version
1310         https://bugs.webkit.org/show_bug.cgi?id=128096
1311
1312         Reviewed by Tim Horton.
1313
1314         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1315         (WebCore::IDBDatabaseBackend::openConnectionInternal): Update logic to handle the
1316           current version being NoIntVersion.
1317
1318         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1319         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform): Update ASSERT.
1320
1321 2014-02-02  Darin Adler  <darin@apple.com>
1322
1323         Fix context save/restore mistake spotted in SVGInlineTextBox::paintTextWithShadows
1324         https://bugs.webkit.org/show_bug.cgi?id=128095
1325
1326         Reviewed by Andreas Kling.
1327
1328         * rendering/svg/SVGInlineTextBox.cpp:
1329         (WebCore::SVGInlineTextBox::paintTextWithShadows): Move calls to GraphicsContext::restore
1330         and GraphicsContext::clearShadow before restoreGraphicsContextAfterTextPainting, since that
1331         function can swap contexts.
1332
1333 2014-02-02  Andreas Kling  <akling@apple.com>
1334
1335         Modernize RenderSVGText::locateRenderSVGTextAncestor().
1336         <https://webkit.org/b/128093>
1337
1338         Make locateRenderSVGTextAncestor() take a reference, and simplify it
1339         internally with lineageOfType.
1340
1341         Switched callers to use 'auto' for the return type so we get some
1342         devirtualization freebies.
1343
1344         Reviewed by Anders Carlsson.
1345
1346         * rendering/svg/RenderSVGInline.cpp:
1347         (WebCore::RenderSVGInline::objectBoundingBox):
1348         (WebCore::RenderSVGInline::strokeBoundingBox):
1349         (WebCore::RenderSVGInline::repaintRectInLocalCoordinates):
1350         (WebCore::RenderSVGInline::absoluteQuads):
1351         (WebCore::RenderSVGInline::addChild):
1352         (WebCore::RenderSVGInline::removeChild):
1353         * rendering/svg/RenderSVGInlineText.cpp:
1354         (WebCore::RenderSVGInlineText::setTextInternal):
1355         (WebCore::RenderSVGInlineText::styleDidChange):
1356         * rendering/svg/RenderSVGResourceGradient.cpp:
1357         (WebCore::createMaskAndSwapContextForTextGradient):
1358         (WebCore::clipToTextMask):
1359         * rendering/svg/RenderSVGText.cpp:
1360         (WebCore::RenderSVGText::locateRenderSVGTextAncestor):
1361         * rendering/svg/RenderSVGText.h:
1362         (WebCore::RenderSVGText>):
1363         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1364         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
1365         * rendering/svg/SVGTextMetricsBuilder.cpp:
1366         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
1367         * svg/SVGTextPositioningElement.cpp:
1368         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
1369
1370 2014-02-02  Andreas Kling  <akling@apple.com>
1371
1372         Modernize the toRenderSVGResourceContainer() helper.
1373         <https://webkit.org/b/128091>
1374
1375         Make toRenderSVGResourceContainer() a free function like all the
1376         other casting helpers. Use references instead of pointers where
1377         applicable.
1378
1379         Reviewed by Anders Carlsson.
1380
1381         * rendering/RenderLayerFilterInfo.cpp:
1382         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
1383         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
1384         * rendering/RenderObject.cpp:
1385         * rendering/RenderObject.h:
1386         * rendering/svg/RenderSVGGradientStop.cpp:
1387         (WebCore::RenderSVGGradientStop::styleDidChange):
1388         * rendering/svg/RenderSVGResource.cpp:
1389         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
1390         * rendering/svg/RenderSVGResourceContainer.cpp:
1391         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
1392         * rendering/svg/RenderSVGResourceContainer.h:
1393         * rendering/svg/RenderSVGResourceFilter.cpp:
1394         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1395         * rendering/svg/RenderSVGResourceFilter.h:
1396         * rendering/svg/SVGRenderTreeAsText.cpp:
1397         (WebCore::writeSVGResourceContainer):
1398         * rendering/svg/SVGResourcesCycleSolver.cpp:
1399         (WebCore::SVGResourcesCycleSolver::resolveCycles):
1400         * svg/SVGElement.cpp:
1401         (WebCore::SVGElement::svgAttributeChanged):
1402
1403 2014-02-02  Andreas Kling  <akling@apple.com>
1404
1405         Minor SVGRootInlineBox cleanup.
1406         <https://webkit.org/b/128094>
1407
1408         Remove two virtual functions and sprinkle some missing overrides.
1409
1410         Reviewed by Anders Carlsson.
1411
1412         * rendering/svg/SVGRootInlineBox.h:
1413
1414 2014-01-30  Oliver Hunt  <oliver@apple.com>
1415
1416         Push DOM attributes into the prototype chain
1417         https://bugs.webkit.org/show_bug.cgi?id=127969
1418
1419         Reviewed by Mark Lam.
1420
1421         This patch does the actual work of moving dom attributes up the
1422         prototype chain. There are still a few class and edge cases
1423         where we can't do this without impacting existing behaviour,
1424         but they can be fixed separately in later patches.
1425
1426         * bindings/js/JSDOMBinding.h:
1427         (WebCore::getStaticPropertySlotEntryWithoutCaching):
1428         (WebCore::getStaticPropertySlotEntryWithoutCaching<JSDOMWrapper>):
1429         * bindings/scripts/CodeGeneratorJS.pm:
1430         (GenerateGetOwnPropertySlotBody):
1431         (HasComplexGetOwnProperty):
1432         (ConstructorShouldBeOnInstance):
1433         (AttributeShouldBeOnInstance):
1434         (InstanceAttributeCount):
1435         (PrototypeAttributeCount):
1436         (InstanceOverridesGetOwnPropertySlot):
1437         (PrototypeOverridesGetOwnPropertySlot):
1438         (GenerateAttributesHashTable):
1439         (GenerateImplementation):
1440
1441 2014-02-02  Andreas Kling  <akling@apple.com>
1442
1443         RenderSVGResourceContainer clients are always RenderElement.
1444         <https://webkit.org/b/128088>
1445
1446         All clients of RenderSVGResourceContainer are going to be RenderElement,
1447         so make the interface take RenderElement& instead of RenderObject*.
1448
1449         Also modernized the code a bit with C++11 range for loops.
1450
1451         Reviewed by Sam Weinig.
1452
1453         * rendering/svg/RenderSVGResourceContainer.cpp:
1454         (WebCore::RenderSVGResourceContainer::addClient):
1455         (WebCore::RenderSVGResourceContainer::removeClient):
1456         * rendering/svg/RenderSVGResourceContainer.h:
1457         * rendering/svg/SVGResourcesCache.cpp:
1458         (WebCore::SVGResourcesCache::addResourcesFromRenderer):
1459         (WebCore::SVGResourcesCache::removeResourcesFromRenderer):
1460
1461 2014-02-02  Zalan Bujtas  <zalan@apple.com>
1462
1463         Subpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
1464         https://bugs.webkit.org/show_bug.cgi?id=128075
1465
1466         Reviewed by Darin Adler.
1467
1468         No change in functionality.
1469
1470         * platform/LayoutUnit.h:
1471         (WebCore::roundToDevicePixel):
1472         (WebCore::floorToDevicePixel):
1473         * platform/graphics/cg/GraphicsContextCG.cpp:
1474         (WebCore::GraphicsContext::platformInit):
1475
1476 2014-02-02  Andreas Kling  <akling@apple.com>
1477
1478         SVGDocumentExtensions::resourcesCache() should return a reference.
1479         <https://webkit.org/b/128087>
1480
1481         The SVGResourcesCache is always present when the Document is using
1482         SVG extensions, so make this return a reference and propagate that
1483         knowledge to the call site.
1484
1485         This gets rid of an assertion and some rickety looking ->'s.
1486         Also converted a loop to use C++11 range for syntax.
1487
1488         Reviewed by Sam Weinig.
1489
1490         * rendering/svg/SVGResourcesCache.cpp:
1491         (WebCore::resourcesCacheFromRenderer):
1492         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
1493         (WebCore::SVGResourcesCache::clientStyleChanged):
1494         (WebCore::SVGResourcesCache::clientWasAddedToTree):
1495         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
1496         (WebCore::SVGResourcesCache::clientDestroyed):
1497         (WebCore::SVGResourcesCache::resourceDestroyed):
1498         * svg/SVGDocumentExtensions.h:
1499         (WebCore::SVGDocumentExtensions::resourcesCache):
1500
1501 2014-02-02  Andreas Kling  <akling@apple.com>
1502
1503         RenderSVGInlineText::computeNewScaledFontForStyle() should take references.
1504         <https://webkit.org/b/128086>
1505
1506         Make computeNewScaledFontForStyle() take renderer and style by reference
1507         instead of taking a pointer and asserting that it's non-null.
1508
1509         Reviewed by Darin Adler.
1510
1511         * rendering/svg/RenderSVGInlineText.cpp:
1512         (WebCore::RenderSVGInlineText::updateScaledFont):
1513         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
1514         * rendering/svg/RenderSVGInlineText.h:
1515         * rendering/svg/RenderSVGResourceClipper.cpp:
1516         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1517         * rendering/svg/RenderSVGResourceContainer.cpp:
1518         (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
1519         * rendering/svg/RenderSVGResourceFilter.cpp:
1520         (WebCore::RenderSVGResourceFilter::applyResource):
1521         * rendering/svg/RenderSVGResourceGradient.cpp:
1522         (WebCore::createMaskAndSwapContextForTextGradient):
1523         (WebCore::clipToTextMask):
1524         * rendering/svg/RenderSVGResourceMasker.cpp:
1525         (WebCore::RenderSVGResourceMasker::applyResource):
1526         * rendering/svg/RenderSVGResourcePattern.cpp:
1527         (WebCore::RenderSVGResourcePattern::buildPattern):
1528         * rendering/svg/SVGInlineTextBox.cpp:
1529         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
1530         * rendering/svg/SVGRenderingContext.cpp:
1531         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
1532         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1533         * rendering/svg/SVGRenderingContext.h:
1534
1535 2014-02-02  Darin Adler  <darin@apple.com>
1536
1537         Still more characters -> deprecatedCharacters (EWS keeps finding more)
1538         https://bugs.webkit.org/show_bug.cgi?id=128076
1539
1540         Reviewed by Andreas Kling.
1541
1542         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1543         (WebCore::HarfBuzzShaper::setFontFeatures):
1544         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
1545         Use deprecatedCharacters.
1546
1547 2014-02-02  Zalan Bujtas  <zalan@apple.com>
1548
1549         Subpixel rendering: Enable subpixel positioning/sizing/hairline border painting.
1550         https://bugs.webkit.org/show_bug.cgi?id=128009
1551
1552         Reviewed by Simon Fraser.
1553
1554         Snap and clip to device pixels when painting boxes. Enable hairline painting
1555         for solid border.
1556
1557         No existing context to test this functionality yet.
1558
1559         * rendering/RenderBoxModelObject.cpp:
1560         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1561         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1562         * rendering/RenderObject.cpp:
1563         (WebCore::RenderObject::drawLineForBoxSide):
1564         * rendering/style/RenderStyle.cpp:
1565         (WebCore::RenderStyle::getRoundedBorderFor):
1566         (WebCore::RenderStyle::getRoundedInnerBorderFor):
1567
1568 2014-02-02  Sam Weinig  <sam@webkit.org>
1569
1570         Add some missing override keywords
1571         https://bugs.webkit.org/show_bug.cgi?id=128082
1572
1573         Reviewed by Antti Koivisto.
1574
1575         * loader/DocumentThreadableLoader.h:
1576         * loader/LinkLoader.h:
1577         * loader/TextTrackLoader.h:
1578         * xml/parser/XMLDocumentParser.h:
1579
1580 2014-02-02  Brady Eidson  <beidson@apple.com>
1581
1582         IDB: Support IDBFactory.deleteDatabase()
1583         https://bugs.webkit.org/show_bug.cgi?id=128060
1584
1585         Reviewed by Filip Pizlo and Maciej Stachowiak (filesystem parts also Tim Hatcher and Simon Fraser)
1586
1587         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1588         (WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
1589
1590         * Modules/indexeddb/IDBFactory.cpp:
1591         (WebCore::IDBFactory::deleteDatabase):
1592
1593         Change factory-level deleteDatabase to take opening and main frame origins:
1594         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1595         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1596         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
1597         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1598
1599         * Modules/indexeddb/IDBServerConnection.h:
1600         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1601
1602         * WebCore.exp.in:
1603
1604 2014-02-02  Zalan Bujtas  <zalan@apple.com>
1605
1606         Subpixel rendering: Introduce device pixel snapping helper functions.
1607         https://bugs.webkit.org/show_bug.cgi?id=128049
1608
1609         Reviewed by Simon Fraser.
1610
1611         These functions help device pixel snapping during painting. They follow the logic of
1612         the corresponding pixelSnappedInt* functions.
1613
1614         No change in functionality.
1615
1616         * platform/LayoutUnit.h:
1617         (WebCore::roundToDevicePixel):
1618         (WebCore::floorToDevicePixel):
1619         (WebCore::snapSizeToPixel):
1620         (WebCore::snapSizeToDevicePixel):
1621         * platform/graphics/GraphicsContext.cpp:
1622         (WebCore::GraphicsContext::GraphicsContext):
1623         * platform/graphics/GraphicsContext.h:
1624         (WebCore::GraphicsContext::pixelSnappingFactor):
1625         * platform/graphics/LayoutRect.h:
1626         (WebCore::pixelSnappedForPainting):
1627         * platform/graphics/cg/GraphicsContextCG.cpp:
1628         (WebCore::GraphicsContext::platformInit):
1629
1630 2014-02-02  Zalan Bujtas  <zalan@apple.com>
1631
1632         Floor thickness and length after switching from int to float.
1633         https://bugs.webkit.org/show_bug.cgi?id=128071
1634
1635         Reviewed by Antti Koivisto.
1636
1637         This is a temporary solution to fix the assertion on empty line drawing until after
1638         device pixel snapping is added.
1639
1640         Covered by existing tests.
1641
1642         * rendering/RenderObject.cpp:
1643         (WebCore::RenderObject::drawLineForBoxSide):
1644
1645 2014-02-02  Antti Koivisto  <antti@apple.com>
1646
1647         Remove StyleScopeResolver
1648         https://bugs.webkit.org/show_bug.cgi?id=128069
1649
1650         Reviewed by Anders Carlsson.
1651
1652         This is dead code.
1653
1654         * CMakeLists.txt:
1655         * GNUmakefile.list.am:
1656         * WebCore.xcodeproj/project.pbxproj:
1657         * css/DocumentRuleSets.cpp:
1658         (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
1659         (WebCore::DocumentRuleSets::collectFeatures):
1660         * css/DocumentRuleSets.h:
1661         * css/ElementRuleCollector.h:
1662         (WebCore::ElementRuleCollector::ElementRuleCollector):
1663         * css/RuleSet.cpp:
1664         (WebCore::RuleSet::addChildRules):
1665         * css/StyleResolver.cpp:
1666         (WebCore::StyleResolver::pushParentElement):
1667         (WebCore::StyleResolver::popParentElement):
1668         (WebCore::StyleResolver::locateSharedStyle):
1669         (WebCore::StyleResolver::styleForElement):
1670         * css/StyleResolver.h:
1671         (WebCore::StyleResolver::document):
1672         * css/StyleScopeResolver.cpp: Removed.
1673         * css/StyleScopeResolver.h: Removed.
1674         * style/StyleResolveTree.cpp:
1675         (WebCore::Style::attachShadowRoot):
1676         (WebCore::Style::resolveShadowTree):
1677
1678 2014-02-02  Zalan Bujtas  <zalan@apple.com>
1679
1680         Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
1681         https://bugs.webkit.org/show_bug.cgi?id=128036
1682
1683         Reviewed by Darin Adler.
1684
1685         Covered by existing tests.
1686
1687         * platform/LayoutUnit.h:
1688         (WebCore::LayoutUnit::operator++):
1689         * rendering/RenderBoxModelObject.cpp:
1690         (WebCore::BorderEdge::BorderEdge):
1691         (WebCore::BorderEdge::usedWidth):
1692         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
1693         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1694         (WebCore::RenderBoxModelObject::paintBorder):
1695         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1696         (WebCore::calculateSideRectIncludingInner):
1697         * rendering/RenderObject.cpp:
1698         (WebCore::RenderObject::drawLineForBoxSide):
1699         * rendering/RenderObject.h:
1700         * rendering/style/BorderData.h:
1701         (WebCore::BorderData::borderLeftWidth):
1702         (WebCore::BorderData::borderRightWidth):
1703         (WebCore::BorderData::borderTopWidth):
1704         (WebCore::BorderData::borderBottomWidth):
1705         * rendering/style/RenderStyle.cpp:
1706         (WebCore::calcRadiiFor):
1707         (WebCore::calcConstraintScaleFor):
1708         (WebCore::RenderStyle::getRoundedInnerBorderFor):
1709         * rendering/style/RenderStyle.h:
1710
1711 2014-02-01  Hunseop Jeong  <hs85.jeong@samsung.com>
1712
1713         REGRESSION(r163234) Debug build is broken
1714         https://bugs.webkit.org/show_bug.cgi?id=128059
1715
1716         Unreviewed. Debug build is broken with INDEXED_DATABASE.
1717
1718         * Modules/indexeddb/IDBKeyData.cpp:
1719         (WebCore::IDBKeyData::loggingString): Added the default: case.
1720
1721 2014-02-01  Zalan Bujtas  <zalan@apple.com>
1722
1723         Subpixel rendering: LayoutUnit operator++ is broken.
1724         https://bugs.webkit.org/show_bug.cgi?id=128056
1725
1726         Reviewed by Darin Adler.
1727
1728         Add pre-increment operator++.
1729
1730         * platform/LayoutUnit.h:
1731         (WebCore::LayoutUnit::operator++):
1732
1733 2014-02-01  Darin Adler  <darin@apple.com>
1734
1735         More characters -> deprecatedCharacters (based on more EWS complaints)
1736         https://bugs.webkit.org/show_bug.cgi?id=128063
1737
1738         Reviewed by Anders Carlsson.
1739
1740         * editing/SmartReplace.cpp:
1741         (WebCore::addAllCodePoints):
1742         (WebCore::getSmartSet):
1743         * platform/win/WebCoreTextRenderer.cpp:
1744         (WebCore::doDrawTextAtPoint):
1745         Use deprecatedCharacters.
1746
1747 2014-02-01  Darin Adler  <darin@apple.com>
1748
1749         Use deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
1750         https://bugs.webkit.org/show_bug.cgi?id=128042
1751
1752         Reviewed by Sam Weinig.
1753
1754         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1755         (WebCore::IDBLevelDBCoding::encodeString):
1756         * platform/graphics/win/FontCacheWin.cpp:
1757         (WebCore::FontCache::systemFallbackForCharacters):
1758         (WebCore::createGDIFont):
1759         (WebCore::FontCache::getTraitsInFamily):
1760         * platform/network/DataURL.cpp:
1761         (WebCore::handleDataURL):
1762         * platform/win/BString.cpp:
1763         (WebCore::BString::BString):
1764         * platform/win/ClipboardUtilitiesWin.cpp:
1765         (WebCore::createGlobalData):
1766         * platform/win/FileSystemWin.cpp:
1767         (WebCore::pathByAppendingComponent):
1768         (WebCore::fileSystemRepresentation):
1769         * platform/win/PasteboardWin.cpp:
1770         (WebCore::filesystemPathFromUrlOrTitle):
1771         (WebCore::Pasteboard::writeURLToDataObject):
1772         (WebCore::createGlobalImageFileDescriptor):
1773         * platform/win/PopupMenuWin.cpp:
1774         (WebCore::PopupMenuWin::calculatePositionAndSize):
1775         Call deprecatedCharacters instead of characters.
1776
1777 2014-02-01  Enrica Casucci  <enrica@apple.com>
1778
1779         Add support for ActionSheets in WK2 for iOS.
1780         https://bugs.webkit.org/show_bug.cgi?id=127586
1781         <rdar://problem/15283667>
1782
1783         Reviewed by Benjamin Poulain.
1784
1785         Updates the localizable strings for action sheets.
1786
1787         * English.lproj/Localizable.strings:
1788
1789 2014-02-01  Maciej Stachowiak  <mjs@apple.com>
1790
1791         Factor URL decomposition methods (from URLUtils interface) into a base template
1792         https://bugs.webkit.org/show_bug.cgi?id=128052
1793
1794         Reviewed by Sam Weinig.
1795
1796         Refactoring only; no new tests.
1797
1798         * html/DOMURL.cpp:
1799         * html/DOMURL.h:
1800         (WebCore::DOMURL::href): Moved to header and made inline.
1801         * html/URLUtils.h: Added. 
1802         (WebCore::URLUtils::href): Downcast and call the derived class.
1803         (WebCore::URLUtils::setHref): Downcast and call the derived class.
1804         Functions below factored out from DOMURL.cpp.
1805         (WebCore::URLUtils<T>::toString):
1806         (WebCore::URLUtils<T>::origin):
1807         (WebCore::URLUtils<T>::protocol):
1808         (WebCore::URLUtils<T>::setProtocol):
1809         (WebCore::URLUtils<T>::username):
1810         (WebCore::URLUtils<T>::setUsername):
1811         (WebCore::URLUtils<T>::password):
1812         (WebCore::URLUtils<T>::setPassword):
1813         (WebCore::URLUtils<T>::host):
1814         (WebCore::parsePortFromStringPosition):
1815         (WebCore::URLUtils<T>::setHost):
1816         (WebCore::URLUtils<T>::hostname):
1817         (WebCore::URLUtils<T>::setHostname):
1818         (WebCore::URLUtils<T>::port):
1819         (WebCore::URLUtils<T>::setPort):
1820         (WebCore::URLUtils<T>::pathname):
1821         (WebCore::URLUtils<T>::setPathname):
1822         (WebCore::URLUtils<T>::search):
1823         (WebCore::URLUtils<T>::setSearch):
1824         (WebCore::URLUtils<T>::hash):
1825         (WebCore::URLUtils<T>::setHash):
1826
1827         Add mention of new header.
1828         * GNUmakefile.list.am: 
1829         * WebCore.vcxproj/WebCore.vcxproj:
1830         * WebCore.vcxproj/WebCore.vcxproj.filters:
1831         * WebCore.xcodeproj/project.pbxproj:
1832
1833 2014-02-01  Benjamin Poulain  <bpoulain@apple.com>
1834
1835         Improve the JavaScript bindings of DatasetDOMStringMap
1836         https://bugs.webkit.org/show_bug.cgi?id=127971
1837
1838         Unriewed.
1839
1840         * dom/DatasetDOMStringMap.cpp:
1841         * dom/DatasetDOMStringMap.h:
1842         Follow up for r163239. Darin pointed out the #includes are wrong.
1843
1844 2014-02-01  Brady Eidson  <beidson@apple.com>
1845
1846         IDB: Implement IDBObjectStore.delete()
1847         https://bugs.webkit.org/show_bug.cgi?id=127880
1848
1849         Reviewed by Sam Weinig.
1850
1851         * Modules/indexeddb/IDBKeyData.cpp:
1852         (WebCore::IDBKeyData::compare): Make this const.
1853         * Modules/indexeddb/IDBKeyData.h:
1854
1855         * Modules/indexeddb/IDBKeyRangeData.cpp:
1856         (WebCore::IDBKeyRangeData::isExactlyOneKey): Returns whether or not
1857           the key range is known to represent precisely one key.
1858         * Modules/indexeddb/IDBKeyRangeData.h:
1859
1860         * WebCore.exp.in:
1861
1862 2014-02-01  Anders Carlsson  <andersca@apple.com>
1863
1864         SVGTextLayoutAttributesBuilder shouldn't use RenderText::deprecatedCharacters()
1865         https://bugs.webkit.org/show_bug.cgi?id=128048
1866
1867         Reviewed by Sam Weinig.
1868
1869         Change UChar*& lastCharacter to bool& lastCharacterWasSpace since that's what the parameter was used for.
1870
1871         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1872         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
1873         Initialize lastCharacterWasSpace to true to match the previous behavior.
1874
1875         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
1876         Ditto.
1877
1878         (WebCore::processRenderSVGInlineText):
1879         Take a reference instead of a pointer, get the character using RenderText::operator[] and compute lastCharacterWasSpace.
1880
1881         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
1882         This now takes a bool reference instead.
1883
1884         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
1885
1886 2014-02-01  Brady Eidson  <beidson@apple.com>
1887
1888         IDB: Index cursor complete advance() and iterate() support
1889         <rdar://problem/15941916> and https://bugs.webkit.org/show_bug.cgi?id=127870
1890
1891         Reviewed by Dan Bernstein.
1892
1893         * Modules/indexeddb/IDBRequest.cpp:
1894         (WebCore::IDBRequest::onSuccess): Always use the value buffer for the script object.
1895
1896 2014-02-01  Alexey Proskuryakov  <ap@apple.com>
1897
1898         Update WebCrypto JWK mapping to use key_ops
1899         https://bugs.webkit.org/show_bug.cgi?id=127609
1900
1901         Reviewed by Sam Weinig.
1902
1903         Updated JWK support ot match current editor draft.
1904
1905         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1906         (WebCore::getJSArrayFromJSON): Fixed this previously untested function to actually work.
1907         (WebCore::tryJWKKeyOpsValue):
1908         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
1909         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Removed an old comment,
1910         these things are now specced.
1911         (WebCore::addToJSON): Made static functions file static, there is no reason for
1912         them to be class members.
1913         (WebCore::buildJSONForOctetSequence):
1914         (WebCore::buildJSONForRSAComponents):
1915         (WebCore::addBoolToJSON):
1916         (WebCore::addJWKAlgorithmToJSON):
1917         (WebCore::addUsagesToJSON):
1918         (WebCore::JSCryptoKeySerializationJWK::serialize):
1919         * bindings/js/JSCryptoKeySerializationJWK.h:
1920
1921         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
1922         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
1923         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
1924         Check for length, so that we don't fail silently.
1925
1926 2014-02-01  David Kilzer  <ddkilzer@apple.com>
1927
1928         Add security-checked casts for all WebCore::CachedResource subclasses
1929         <http://webkit.org/b/127988>
1930
1931         Reviewed by Darin Adler.
1932
1933         * inspector/InspectorPageAgent.cpp:
1934         (WebCore::InspectorPageAgent::cachedResourceContent):
1935         * inspector/InspectorResourceAgent.cpp:
1936         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1937         - Switch from static_cast<>() to security-checked cast.
1938
1939         * loader/cache/CachedCSSStyleSheet.h:
1940         (WebCore::toCachedCSSStyleSheet): Add.
1941         * loader/cache/CachedFont.h:
1942         (WebCore::toCachedFont): Add.
1943
1944         * loader/cache/CachedImage.h: Make CachedImageManual final.
1945
1946         * loader/cache/CachedRawResource.cpp:
1947         (WebCore::CachedRawResource::CachedRawResource): Add assert that
1948         only MainResource or RawResource types are used to construct a
1949         CachedRawResource.  This may be a security issue depending on
1950         what code exists that uses the type() value to cast to a
1951         CachedResource subclass.
1952         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
1953         Switch from static_cast<>() to toCachedRawResource().
1954
1955         * loader/cache/CachedRawResource.h:
1956         (WebCore::toCachedRawResource): Add.
1957         * loader/cache/CachedResource.h:
1958         (WebCore::CachedResource::isMainOrRawResource): Add.  A
1959         CachedRawResource could be either a MainResource or a
1960         RawResource.  Currently only used in assertions.
1961
1962         * loader/cache/CachedResourceLoader.cpp:
1963         (WebCore::CachedResourceLoader::requestFont):
1964         (WebCore::CachedResourceLoader::requestTextTrack):
1965         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1966         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1967         (WebCore::CachedResourceLoader::requestScript):
1968         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1969         (WebCore::CachedResourceLoader::requestSVGDocument):
1970         (WebCore::CachedResourceLoader::requestRawResource):
1971         (WebCore::CachedResourceLoader::requestMainResource):
1972         - Switch from static_cast<>() to security-checked cast.
1973
1974         * loader/cache/CachedSVGDocument.h:
1975         (WebCore::toCachedSVGDocument): Add.
1976         * loader/cache/CachedScript.h:
1977         (WebCore::toCachedScript): Add.
1978         * loader/cache/CachedTextTrack.h:
1979         (WebCore::toCachedTextTrack): Add.
1980         * loader/cache/CachedXSLStyleSheet.h:
1981         (WebCore::toCachedXSLStyleSheet): Add.
1982
1983 2014-02-01  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1984
1985         Unreviewed. Fixed GTK+ CMake build after r162922.
1986
1987         * PlatformGTK.cmake: Removed SoupURIUtils.cpp from the
1988         compilation.
1989
1990 2014-02-01  Benjamin Poulain  <bpoulain@apple.com>
1991
1992         Improve the JavaScript bindings of DatasetDOMStringMap
1993         https://bugs.webkit.org/show_bug.cgi?id=127971
1994
1995         Reviewed by Sam Weinig.
1996
1997         Instead of querying contains() followed by item(), just get the item
1998         at once in the custom binding.
1999
2000         Test: fast/dom/dataset-name-getter-properties.html
2001
2002         * bindings/js/JSDOMStringMapCustom.cpp:
2003         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
2004         * dom/DOMStringMap.idl:
2005         * dom/DatasetDOMStringMap.cpp:
2006         (WebCore::DatasetDOMStringMap::item):
2007         * dom/DatasetDOMStringMap.h:
2008
2009 2014-01-31  Benjamin Poulain  <bpoulain@apple.com>
2010
2011         Remove LEGACY_VIEWPORT_ADAPTION
2012         https://bugs.webkit.org/show_bug.cgi?id=128028
2013
2014         Reviewed by Anders Carlsson.
2015
2016         The code is incorrect and was only supported by Nix.
2017
2018         * dom/Document.cpp:
2019         (WebCore::Document::childrenChanged):
2020         * dom/ViewportArguments.h:
2021         * html/HTMLMetaElement.cpp:
2022         (WebCore::HTMLMetaElement::process):
2023
2024 2014-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2025
2026         Release build fix after r163234. Don't always export the symbol that doesn't exist under NDEBUG.
2027
2028         * WebCore.exp.in:
2029
2030 2014-01-31  Brady Eidson  <beidson@apple.com>
2031
2032         IDB: Index cursors use wrong deserialization for the retrieved value
2033         https://bugs.webkit.org/show_bug.cgi?id=128035
2034
2035         Reviewed by Dan Bernstein.
2036
2037         For the cursor operations, add an IDBKey value result in the callbacks.
2038         If an already deserialized IDBKey value exists it will be preferred over the serialized buffer.
2039
2040         Change some of the onSuccess() callback formats:
2041         * Modules/indexeddb/IDBCallbacks.h:
2042         * Modules/indexeddb/IDBRequest.cpp:
2043         (WebCore::IDBRequest::onSuccess): Selectively choose between the IDBKey or the SharedBuffer value
2044           when choosed what to convert to the ScriptValue.
2045         * Modules/indexeddb/IDBRequest.h:
2046
2047         Let the IDBCursorBackend hold both a value buffer and a value key:
2048         * Modules/indexeddb/IDBCursorBackend.cpp:
2049         (WebCore::IDBCursorBackend::updateCursorData):
2050         (WebCore::IDBCursorBackend::clear):
2051         * Modules/indexeddb/IDBCursorBackend.h:
2052         (WebCore::IDBCursorBackend::valueBuffer):
2053         (WebCore::IDBCursorBackend::valueKey):
2054
2055         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
2056         (WebCore::CursorAdvanceOperation::perform):
2057         (WebCore::CursorIterationOperation::perform):
2058
2059         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2060         (WebCore::OpenCursorOperation::perform):
2061
2062         * Modules/indexeddb/IDBServerConnection.h:
2063         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2064         (WebCore::IDBServerConnectionLevelDB::openCursor):
2065         (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
2066         (WebCore::IDBServerConnectionLevelDB::cursorIterate):
2067         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2068
2069         Add IDBKey/IDBKeyData debug logging utilities:
2070         * Modules/indexeddb/IDBKey.cpp:
2071         (WebCore::IDBKey::loggingString):
2072         * Modules/indexeddb/IDBKey.h:
2073         * Modules/indexeddb/IDBKeyData.cpp:
2074         (WebCore::IDBKeyData::loggingString):
2075         * Modules/indexeddb/IDBKeyData.h:
2076
2077         * WebCore.exp.in:
2078
2079 2014-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2080
2081         Debug build fix after r163232. Call hasEditableStyle() instead of isContentEditable() which
2082         can trigger a layout synchronously inside paintCaret. This matches the code before r163232.
2083
2084         * rendering/RenderBlock.cpp:
2085         (WebCore::RenderBlock::paintCaret):
2086
2087 2014-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2088
2089         Remove inline member functions of FrameSelection that access m_selection
2090         https://bugs.webkit.org/show_bug.cgi?id=127986
2091
2092         Reviewed by Enrica Casucci.
2093
2094         Removed numerous inline member functions of FrameSelection that depend on m_selection.
2095
2096         This is needed to ensure all accesses to m_selection happen through FrameSelection::selection(),
2097         which in turn, allows us to update its call sites to use either validated selection that editing
2098         and rendering code uses or invalidated selection that's exposed to JavaScript.
2099
2100         * WebCore.exp.in:
2101         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2102         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2103         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2104         * bindings/objc/DOMUIKitExtensions.mm:
2105         (-[DOMRange move:inDirection:]):
2106         (-[DOMRange extend:inDirection:]):
2107         * dom/Element.cpp:
2108         (WebCore::Element::updateFocusAppearance):
2109         * editing/Editor.cpp:
2110         (WebCore::Editor::canEdit):
2111         (WebCore::Editor::canEditRichly):
2112         (WebCore::Editor::canDHTMLCut):
2113         (WebCore::Editor::canDHTMLCopy):
2114         (WebCore::Editor::canCopy):
2115         (WebCore::Editor::canDelete):
2116         (WebCore::Editor::replaceSelectionWithFragment):
2117         (WebCore::Editor::tryDHTMLCopy):
2118         (WebCore::Editor::tryDHTMLCut):
2119         (WebCore::Editor::applyStyle):
2120         (WebCore::Editor::applyParagraphStyle):
2121         (WebCore::Editor::cut):
2122         (WebCore::Editor::copy):
2123         (WebCore::Editor::paste):
2124         (WebCore::Editor::setComposition):
2125         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
2126         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2127         (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
2128         (WebCore::Editor::markAndReplaceFor):
2129         (WebCore::Editor::getCompositionSelection):
2130         (WebCore::Editor::selectionStartHasMarkerFor):
2131         * editing/EditorCommand.cpp:
2132         (WebCore::expandSelectionToGranularity):
2133         (WebCore::enabledInRichlyEditableText):
2134         (WebCore::enabledRangeInEditableText):
2135         (WebCore::enabledRangeInRichlyEditableText):
2136         * editing/FrameSelection.cpp:
2137         (WebCore::CaretBase::updateCaretRect):
2138         (WebCore::FrameSelection::recomputeCaretRect):
2139         (WebCore::FrameSelection::selectAll):
2140         (WebCore::FrameSelection::updateAppearance):
2141         (WebCore::FrameSelection::updateSelectionCachesIfSelectionIsInsideTextFormControl):
2142         (WebCore::FrameSelection::setFocusedElementIfNeeded):
2143         (WebCore::FrameSelection::currentForm):
2144         (WebCore::FrameSelection::revealSelection):
2145         (WebCore::FrameSelection::setSelectionFromNone):
2146         * editing/FrameSelection.h:
2147         (WebCore::FrameSelection::isCaretOrRange):
2148         * editing/RemoveFormatCommand.cpp:
2149         (WebCore::RemoveFormatCommand::doApply):
2150         * editing/VisibleSelection.cpp:
2151         (WebCore::VisibleSelection::isInPasswordField):
2152         * editing/VisibleSelection.h:
2153         * editing/mac/EditorMac.mm:
2154         (WebCore::Editor::canCopyExcludingStandaloneImages):
2155         (WebCore::Editor::readSelectionFromPasteboard):
2156         * html/HTMLAnchorElement.cpp:
2157         (WebCore::HTMLAnchorElement::defaultEventHandler):
2158         (WebCore::HTMLAnchorElement::setActive):
2159         * html/HTMLTextFormControlElement.cpp:
2160         (WebCore::HTMLTextFormControlElement::computeSelectionStart):
2161         (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
2162         * page/ContextMenuController.cpp:
2163         (WebCore::ContextMenuController::contextMenuItemSelected):
2164         (WebCore::ContextMenuController::populate):
2165         * page/DragController.cpp:
2166         (WebCore::DragController::dragIsMove):
2167         (WebCore::setSelectionToDragCaret):
2168         (WebCore::DragController::concludeEditDrag):
2169         (WebCore::DragController::startDrag):
2170         * page/EventHandler.cpp:
2171         (WebCore::nodeIsNotBeingEdited):
2172         (WebCore::EventHandler::sendContextMenuEvent):
2173         (WebCore::EventHandler::sendContextMenuEventForKey):
2174         (WebCore::EventHandler::handleDrag):
2175         * page/FocusController.cpp:
2176         (WebCore::FocusController::advanceFocusInDocumentOrder):
2177         (WebCore::clearSelectionIfNeeded):
2178         * page/ios/FrameIOS.mm:
2179         (WebCore::Frame::caretRect):
2180         (WebCore::Frame::rectForScrollToVisible):
2181         (WebCore::Frame::styleAtSelectionStart):
2182         (WebCore::Frame::setRangedSelectionBaseToCurrentSelectionStart):
2183         (WebCore::Frame::setRangedSelectionBaseToCurrentSelectionEnd):
2184         (WebCore::Frame::setRangedSelectionInitialExtentToCurrentSelectionStart):
2185         (WebCore::Frame::setRangedSelectionInitialExtentToCurrentSelectionEnd):
2186         (WebCore::Frame::interpretationsForCurrentRoot):
2187         * rendering/RenderBlock.cpp:
2188         (WebCore::RenderBlock::paintCaret):
2189
2190 2014-01-31  Simon Fraser  <simon.fraser@apple.com>
2191
2192         Pass the viewport rect and scroll origin independently into the scrolling tree, and make things floats
2193         https://bugs.webkit.org/show_bug.cgi?id=128032
2194
2195         Reviewed by Tim Horton.
2196
2197         Pass the viewport rect and scroll offset independently into the ScrollingTree
2198         via the ScrollingStateScrollingNode, since on iOS the scroll offset doesn't
2199         always correspond to the viewport rect.
2200         
2201         Make the viewport rect and the scroll origin be float-based, since on
2202         Retina screens and with zooming these can both be non-integral.
2203
2204         No behavior change.
2205         
2206         * WebCore.exp.in:
2207         * page/scrolling/AsyncScrollingCoordinator.cpp:
2208         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2209         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2210         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2211         * page/scrolling/AsyncScrollingCoordinator.h:
2212         (WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
2213         * page/scrolling/ScrollingStateScrollingNode.cpp:
2214         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2215         (WebCore::ScrollingStateScrollingNode::setViewportConstrainedObjectRect):
2216         (WebCore::ScrollingStateScrollingNode::setScrollPosition):
2217         (WebCore::ScrollingStateScrollingNode::dumpProperties):
2218         * page/scrolling/ScrollingStateScrollingNode.h:
2219         * page/scrolling/ScrollingTree.cpp:
2220         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
2221         (WebCore::ScrollingTree::commitNewTreeState):
2222         (WebCore::ScrollingTree::mainFrameScrollPosition):
2223         (WebCore::ScrollingTree::setMainFrameScrollPosition):
2224         * page/scrolling/ScrollingTree.h:
2225         * page/scrolling/ScrollingTreeNode.h:
2226         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2227         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2228         * page/scrolling/ScrollingTreeScrollingNode.h:
2229         (WebCore::ScrollingTreeScrollingNode::scrollPosition):
2230         (WebCore::ScrollingTreeScrollingNode::viewportConstrainedObjectRect):
2231         * page/scrolling/ThreadedScrollingTree.cpp:
2232         (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
2233         * page/scrolling/ThreadedScrollingTree.h:
2234         * page/scrolling/ios/ScrollingTreeIOS.cpp:
2235         (WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
2236         * page/scrolling/ios/ScrollingTreeIOS.h:
2237         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2238         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2239         (WebCore::ScrollingTreeScrollingNodeIOS::scrollPosition):
2240         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPosition):
2241         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
2242         (WebCore::ScrollingTreeScrollingNodeIOS::setScrollLayerPosition):
2243         (WebCore::ScrollingTreeScrollingNodeIOS::minimumScrollPosition):
2244         (WebCore::ScrollingTreeScrollingNodeIOS::maximumScrollPosition):
2245         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2246         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2247         (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange):
2248         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2249         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2250         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
2251         (WebCore::ScrollingTreeScrollingNodeMac::absoluteScrollPosition):
2252         (WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
2253         (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
2254         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPosition):
2255         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2256         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2257         (WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
2258         (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
2259         (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
2260         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
2261         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2262         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2263         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
2264         * platform/graphics/FloatPoint.h:
2265         (WebCore::FloatPoint::shrunkTo):
2266
2267 2014-01-30  Andy Estes  <aestes@apple.com>
2268
2269         [Cocoa] Add NEFilterSource support to ContentFilterMac
2270         https://bugs.webkit.org/show_bug.cgi?id=127979
2271
2272         Reviewed by Sam Weinig.
2273
2274         Update ContentFilterMac to work with both WebFilterEvaluator and
2275         NEFilterSource, if enabled.
2276
2277         * platform/ContentFilter.h: Set HAVE_NE_FILTER_SOURCE based on platform
2278         conditionals, and forward-declare NEFilterSource.
2279         * platform/mac/ContentFilterMac.mm: Included NEFilterSource.h if the SDK
2280         has it; declared the class directly if not. Also soft-linked
2281         NetworkExtension.framework.
2282         (WebCore::ContentFilter::ContentFilter): Initialized
2283         m_neFilterSourceStatus to NEFilterSourceStatusNeedsMoreData and created
2284         m_platformContentFilter and m_neFilterSource objects if their
2285         respective filters were enabled.
2286         (WebCore::ContentFilter::isEnabled): Returned true if either filter is
2287         enabled.
2288         (WebCore::ContentFilter::addData): Added incoming data to each filter
2289         that is enabled.
2290         (WebCore::ContentFilter::finishedAddingData): Notified each enabled
2291         filter that we are finished adding data.
2292         (WebCore::ContentFilter::needsMoreData): Returned true if either filter
2293         needs more data.
2294         (WebCore::ContentFilter::didBlockData): Returned true if either filter
2295         blocked data.
2296         (WebCore::ContentFilter::getReplacementData): Returned
2297         m_replacementData. Commented that this will currently return a null
2298         string if NEFilterSource blocked the load.
2299
2300 2014-01-31  Oliver Hunt  <oliver@apple.com>
2301
2302         Rollout r163195 and related patches
2303
2304         * CMakeLists.txt:
2305         * ForwardingHeaders/runtime/JSStringInlines.h: Removed.
2306         * Modules/plugins/QuickTimePluginReplacement.cpp:
2307         * bindings/js/JSIDBAnyCustom.cpp:
2308         * bindings/js/JSIDBDatabaseCustom.cpp:
2309         * bindings/js/JSIDBObjectStoreCustom.cpp:
2310         * bindings/js/JSNodeFilterCondition.cpp:
2311
2312 2014-01-31  Simon Fraser  <simon.fraser@apple.com>
2313
2314         Even when in fixed layout mode, some platforms need to do layout after a viewport change
2315         https://bugs.webkit.org/show_bug.cgi?id=128003
2316
2317         Reviewed by Andreas Kling.
2318         
2319         Re-land 163182 with a less aggresive check in visibleContentsResized() for
2320         needing to layout.
2321
2322         iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
2323         elements relative to a variable viewport. This code assumed that fixed layout
2324         implies a fixed viewport.
2325         
2326         Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.
2327         
2328         Also removed RenderView::hasCustomFixedPosition() which is no longer used.
2329         
2330         * page/FrameView.cpp:
2331         (WebCore::FrameView::shouldLayoutAfterViewportChange):
2332         (WebCore::FrameView::visibleContentsResized):
2333         * page/FrameView.h:
2334         * rendering/RenderView.cpp:
2335         * rendering/RenderView.h:
2336
2337 2014-01-31  Alexey Proskuryakov  <ap@apple.com>
2338
2339         Expose creation and modification times for LocalStorage
2340         https://bugs.webkit.org/show_bug.cgi?id=128018
2341
2342         Reviewed by Anders Carlsson.
2343
2344         * WebCore.exp.in: Export FileSystem functions to get file times.
2345
2346 2014-01-30  Maciej Stachowiak  <mjs@apple.com>
2347
2348         Implement (most of) URL API
2349         https://bugs.webkit.org/show_bug.cgi?id=127795
2350
2351         Reviewed by Alexey Proskuryakov.
2352
2353         Tests: fast/dom/DOMURL/get-href-attribute-port.html
2354                fast/dom/DOMURL/invalid-url-getters.html
2355                fast/dom/DOMURL/set-href-attribute-hash.html
2356                fast/dom/DOMURL/set-href-attribute-host.html
2357                fast/dom/DOMURL/set-href-attribute-hostname.html
2358                fast/dom/DOMURL/set-href-attribute-pathname.html
2359                fast/dom/DOMURL/set-href-attribute-port.html
2360                fast/dom/DOMURL/set-href-attribute-protocol.html
2361                fast/dom/DOMURL/set-href-attribute-search.html
2362                fast/dom/DOMURL/set-href-attribute-whitespace.html
2363                fast/dom/DOMURL/url-constructor.html
2364                fast/dom/DOMURL/url-origin.html
2365                fast/dom/DOMURL/url-password.html
2366                fast/dom/DOMURL/url-username.html
2367
2368         * CMakeLists.txt: Update for new IDL file.
2369         * DerivedSources.make: ditto
2370         * GNUmakefile.list.am: ditto
2371         * html/DOMURL.cpp: Implement URL() constructor and instance methods; cribbed from
2372         HTMLAnchorElement mostly
2373         (WebCore::DOMURL::DOMURL):
2374         (WebCore::DOMURL::href):
2375         (WebCore::DOMURL::setHref):
2376         (WebCore::DOMURL::toString):
2377         (WebCore::DOMURL::origin):
2378         (WebCore::DOMURL::protocol):
2379         (WebCore::DOMURL::setProtocol):
2380         (WebCore::DOMURL::username):
2381         (WebCore::DOMURL::setUsername):
2382         (WebCore::DOMURL::password):
2383         (WebCore::DOMURL::setPassword):
2384         (WebCore::DOMURL::host):
2385         (WebCore::parsePortFromStringPosition):
2386         (WebCore::DOMURL::setHost):
2387         (WebCore::DOMURL::hostname):
2388         (WebCore::DOMURL::setHostname):
2389         (WebCore::DOMURL::port):
2390         (WebCore::DOMURL::setPort):
2391         (WebCore::DOMURL::pathname):
2392         (WebCore::DOMURL::setPathname):
2393         (WebCore::DOMURL::search):
2394         (WebCore::DOMURL::setSearch):
2395         (WebCore::DOMURL::hash):
2396         (WebCore::DOMURL::setHash):
2397         * html/DOMURL.h:
2398         (WebCore::DOMURL::create):
2399         * html/DOMURL.idl: Update for new methods.
2400         * html/URLUtils.idl: Added. New IDL file that contains most of the interface.
2401
2402 2014-01-31  Bem Jones-Bey  <bjonesbe@adobe.com>
2403
2404         Create clipping path from <box> value
2405         https://bugs.webkit.org/show_bug.cgi?id=126205
2406
2407         Reviewed by Dirk Schulze.
2408
2409         This implements <box> values for border, content, and padding boxes.
2410         Since margin box is not implemented as a reference box, this does not
2411         implement margin box value.
2412
2413         Tests: css3/masking/clip-path-border-box.html
2414                css3/masking/clip-path-content-box.html
2415                css3/masking/clip-path-padding-box.html
2416
2417         * rendering/ClipPathOperation.h:
2418         (WebCore::BoxClipPathOperation::pathForReferenceRect): Implement.
2419         * rendering/RenderLayer.cpp:
2420         (WebCore::computeReferenceBox): Pull out reference box calculation.
2421         (WebCore::RenderLayer::setupClipPath): Add support for <box> values.
2422         * rendering/shapes/ShapeInfo.cpp:
2423         (WebCore::ShapeInfo<RenderType>::computedShape): Add FIXME comment.
2424
2425 2014-01-29  Oliver Hunt  <oliver@apple.com>
2426
2427         Make it possible to implement JS builtins in JS
2428         https://bugs.webkit.org/show_bug.cgi?id=127887
2429
2430         Reviewed by Michael Saboff.
2431
2432         Updating for the newly required headers.
2433
2434         Test: js/regress/array-prototype-every.html
2435
2436         * ForwardingHeaders/runtime/JSStringInlines.h: Added.
2437         * Modules/plugins/QuickTimePluginReplacement.cpp:
2438         * bindings/js/JSIDBAnyCustom.cpp:
2439         * bindings/js/JSIDBDatabaseCustom.cpp:
2440         * bindings/js/JSIDBObjectStoreCustom.cpp:
2441
2442 2014-01-31  Beth Dakin  <bdakin@apple.com>
2443
2444         Build fix.
2445
2446         * rendering/RenderLayerCompositor.cpp:
2447         (WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
2448
2449 2014-01-31  Timothy Hatcher  <timothy@apple.com>
2450
2451         Properly handle cases where a profile couldn't be recorded and null is returned.
2452
2453         <rdar://problem/15957993> Crash with Inspector open at WebCore::ScriptProfile::buildInspectorObject
2454
2455         Reviewed by Joseph Pecoraro.
2456
2457         * inspector/InspectorTimelineAgent.cpp:
2458         (WebCore::InspectorTimelineAgent::didCallFunction): Null check profile.
2459         (WebCore::InspectorTimelineAgent::didEvaluateScript): Ditto.
2460
2461 2014-01-31  Beth Dakin  <bdakin@apple.com>
2462
2463         Extended background should only create margin tiles for pages with background 
2464         images
2465         https://bugs.webkit.org/show_bug.cgi?id=127876
2466         -and corresponding-
2467         <rdar://problem/15827632>
2468
2469         Reviewed by Simon Fraser.
2470
2471         Settings::backgroundShouldExtendBeyondPage() doesn't need to create margin tiles
2472         for pages with simple background colors. Instead, those pages should achieve the 
2473         same effect by setting a background color on RenderLayerCompositor's
2474         m_layerForOverhangAreas. For now, we should only create tiles when there is a 
2475         background image. We may want to extend this to other types of complicated 
2476         backgrounds in the future.
2477
2478         This patch makes callers that only care about the value of the setting always call 
2479         Settings::backgroundShouldExtendBeyondPage() rather than asking about margin 
2480         tiles. And callers that want to know about margin tiles can either keep querying 
2481         that directly or they can call FrameView::hasExtendedBackgroundRectForPainting(). 
2482         An extended background does not necessarily require an extended background rect 
2483         for painting, and this new FrameView function can make that distinction. 
2484
2485         When setBackgroundExtendsBeyondPage() is called, call RenderLayerCompositor:: 
2486         setRootExtendedBackgroundColor() with either the document background color, or an 
2487         invalid color, depending on whether you have or do not have an extended 
2488         background. Also call needsExtendedBackgroundRectForPainting() to determine if we 
2489         also need to extend the background rect, and then call 
2490         setHasExtendedBackgroundRectForPainting() with its value.
2491         * page/FrameView.cpp:
2492         (WebCore::FrameView::setBackgroundExtendsBeyondPage):
2493         (WebCore::FrameView::hasExtendedBackgroundRectForPainting):
2494
2495          Right now we only need to extend the background rect for documents with 
2496         background images on the root. This may be extended in the future.
2497         (WebCore::FrameView::needsExtendedBackgroundRectForPainting):
2498         (WebCore::FrameView::setHasExtendedBackgroundRectForPainting):
2499         (WebCore::FrameView::extendedBackgroundRectForPainting):
2500         * page/FrameView.h:
2501
2502         Expose defaultTileWidth and defaultTileHeight from TiledBacking.h so that we can 
2503         access the values from RenderLayerBacking.
2504         * platform/graphics/TiledBacking.h:
2505         * platform/graphics/ca/mac/TileController.mm:
2506
2507         hasExtendedBackgroundForPainting() is now called 
2508         hasExtendedBackgroundRectForPainting() to distinguish 
2509         the case where an extended RECT is needed.
2510         * rendering/RenderBox.cpp:
2511         (WebCore::RenderBox::repaintLayerRectsForImage):
2512         * rendering/RenderBoxModelObject.cpp:
2513         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2514
2515         Call setHasExtendedBackgroundRectForPainting() if relevant.
2516         * rendering/RenderElement.cpp:
2517         (WebCore::RenderElement::styleWillChange):
2518
2519         Don't call setTiledBackingHasMargins() right in the constructor because we only
2520         want margins if we have a background image, and we won't have that information
2521         yet.
2522         * rendering/RenderLayerBacking.cpp:
2523         (WebCore::RenderLayerBacking::RenderLayerBacking):
2524
2525         Clean up the variable name here. We are only setting margins when we need to 
2526         extend the background rect for painting. Also make us of newly-exposed 
2527         defaultTileWidth and Height.
2528         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
2529
2530         Remove RenderLayerBacking::tiledBackingHasMargin() since there aren't any more
2531         callers.
2532         * rendering/RenderLayerBacking.h:
2533         (WebCore::RenderLayerBacking::usingTiledBacking):
2534
2535         setMasksToBounds(false) based on the Setting, and not based on whether there are 
2536         tile margins.
2537         * rendering/RenderLayerCompositor.cpp:
2538         (WebCore::RenderLayerCompositor::updateBacking):
2539
2540         Return false from RenderLayerCompositor::requiresContentShadowLayer() if there is 
2541         an extended background.
2542         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
2543
2544         Setting the background color on m_layerForOverhangAreas is all we need to do to 
2545         create the extended background effect on pages that only have background colors. 
2546         (WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
2547         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2548
2549         Remove mainFrameBackingIsTiledWithMargin() since there aren't any more callers,
2550         and add setRootExtendedBackgroundColor() so that we can update the color from 
2551         RenderView.
2552         * rendering/RenderLayerCompositor.h:
2553
2554         Revert the code that was added to paint background color here, since this should 
2555         all be covered by calling RenderLayerCompositor::setExtendedBackgroundColor(). 
2556         More complicated backgrounds will run through the full background painting code.
2557         * rendering/RenderView.cpp:
2558         (WebCore::RenderView::paintBoxDecorations):
2559         (WebCore::RenderView::backgroundRect):
2560
2561 2014-01-31  Jochen Eisinger  <jochen@chromium.org>
2562
2563         Remove FrameLoader's reloadWithOverrideURL and reloadWithRequest
2564         https://bugs.webkit.org/show_bug.cgi?id=128005
2565
2566         Reviewed by Darin Adler.
2567
2568         The former was used by chromium-android to implement the "request
2569         desktop version" feature, but is no longer used. After removing it,
2570         the latter is only invoked by reload(), so we can merge the method
2571         with it.
2572
2573         No new tests, just removing dead code.
2574
2575         * loader/FrameLoader.cpp:
2576         (WebCore::FrameLoader::reload):
2577         * loader/FrameLoader.h:
2578
2579 2014-01-31  Commit Queue  <commit-queue@webkit.org>
2580
2581         Unreviewed, rolling out r163182.
2582         http://trac.webkit.org/changeset/163182
2583         https://bugs.webkit.org/show_bug.cgi?id=128012
2584
2585         Broke lots of tests (Requested by smfr on #webkit).
2586
2587         * page/FrameView.cpp:
2588         (WebCore::FrameView::visibleContentsResized):
2589         * page/FrameView.h:
2590         * rendering/RenderView.cpp:
2591         (WebCore::isFixedPositionInViewport):
2592         (WebCore::RenderView::hasCustomFixedPosition):
2593         * rendering/RenderView.h:
2594
2595 2014-01-31  Brady Eidson  <beidson@apple.com>
2596
2597         IDB: openCursor() needs to prime the cursor with first position values
2598         https://bugs.webkit.org/show_bug.cgi?id=128008
2599
2600         Reviewed by Alexey Proskuryakov.
2601
2602         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2603         (WebCore::OpenCursorOperation::perform): If the server connection returns initial keys/values
2604           for the cursor, store them.
2605
2606         * Modules/indexeddb/IDBServerConnection.h:
2607
2608         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2609         (WebCore::IDBServerConnectionLevelDB::openCursor):
2610         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2611
2612 2014-01-31  Hans Muller  <hmuller@adobe.com>
2613
2614         [CSS Shapes] Image valued shape can fail
2615         https://bugs.webkit.org/show_bug.cgi?id=127588
2616
2617         Reviewed by Dean Jackson.
2618
2619         Correct the handling of image valued shapes that extend into or beyond the
2620         margin box. This can happen when object-fit causes one dimension of the shape
2621         to be greater than the corresponding margin box dimension.
2622
2623         Made some simplifications in RasterShapeIntervals::computeShapeMarginIntervals()
2624         by making the shapeMargin parameter an int, removing some unnecessary variables.
2625
2626         Revised the RasterShapeIntervals class. It's now a just a list of size() interval-lists,
2627         with valid indices: -offset() <= y < size() - offset(), or minY() to maxY(). If margin-top
2628         and shape-margin are specified, then offset() is the larger of shape-margin and margin-top.
2629         Similarly size() is the vertical size of the margin-box or the content-box expanded by
2630         shape-margin, whichever is larger. See computeShapeMarginIntervals().
2631
2632         Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-005.html
2633                fast/shapes/shape-outside-floats/shape-outside-image-fit-006.html
2634
2635         * rendering/shapes/RasterShape.cpp:
2636         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals):
2637         (WebCore::RasterShape::marginIntervals):
2638         * rendering/shapes/RasterShape.h:
2639         (WebCore::RasterShapeIntervals::RasterShapeIntervals):
2640         (WebCore::RasterShapeIntervals::offset):
2641         (WebCore::RasterShapeIntervals::minY):
2642         (WebCore::RasterShapeIntervals::maxY):
2643         (WebCore::RasterShapeIntervals::intervalsAt):
2644         * rendering/shapes/Shape.cpp:
2645         (WebCore::Shape::createRasterShape):
2646         * rendering/shapes/Shape.h:
2647         * rendering/shapes/ShapeInfo.cpp:
2648
2649         (WebCore::getShapeImageReplacedRect):
2650         The rect that the image will be drawn into. This rect can imply image
2651         scaling and translation.
2652
2653         (WebCore::getShapeImageMarginRect):
2654         The margin rect relative too the (0,0 origin) shape content rect.
2655
2656         (WebCore::ShapeInfo<RenderType>::computedShape):
2657
2658 2014-01-31  Andreas Kling  <akling@apple.com>
2659
2660         Deduplicate Document::encoding().
2661         <https://webkit.org/b/128000>
2662
2663         Make Document::encoding() return an AtomicString so we don't duplicate
2664         the string every time it's called.
2665
2666         215 KB progression on Membuster3.
2667
2668         Reviewed by Simon Fraser.
2669
2670         * dom/Document.h:
2671         * dom/Document.cpp:
2672         (WebCore::Document::encoding):
2673
2674 2014-01-31  Simon Fraser  <simon.fraser@apple.com>
2675
2676         Even when in fixed layout mode, some platforms need to do layout after a viewport change
2677         https://bugs.webkit.org/show_bug.cgi?id=128003
2678
2679         Reviewed by Andreas Kling.
2680
2681         iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position
2682         elements relative to a variable viewport. This code assumed that fixed layout
2683         implies a fixed viewport.
2684         
2685         Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case.
2686         
2687         Also removed RenderView::hasCustomFixedPosition() which is no longer used.
2688         
2689         * page/FrameView.cpp:
2690         (WebCore::FrameView::shouldLayoutAfterViewportChange):
2691         (WebCore::FrameView::visibleContentsResized):
2692         * page/FrameView.h:
2693         * rendering/RenderView.cpp:
2694         * rendering/RenderView.h:
2695
2696 2014-01-31  Zan Dobersek  <zdobersek@igalia.com>
2697
2698         Guard GLContextEGL::platformContext() with USE(3D_GRAPHICS)
2699         https://bugs.webkit.org/show_bug.cgi?id=120214
2700
2701         Reviewed by Philippe Normand.
2702
2703         Guard the GLContextEGL::platformContext() declaration and definiton with USE(3D_GRAPHICS)
2704         since this guard is used in the GLContext class, from which the GLContextEGL class overrides
2705         this method.
2706
2707         * platform/graphics/egl/GLContextEGL.cpp:
2708         * platform/graphics/egl/GLContextEGL.h:
2709
2710 2014-01-31  Beth Dakin  <bdakin@apple.com>
2711
2712         Sideways 'wobble' when scrolling with trackpad on Mavericks
2713         https://bugs.webkit.org/show_bug.cgi?id=127521
2714         -and corresponding-
2715         <rdar://problem/14137306>
2716
2717         Reviewed by Simon Fraser.
2718
2719         This patch takes http://trac.webkit.org/changeset/154535 which introduced 
2720         filtering wheel events for overflow areas to try to make them less sensitive to X 
2721         deltas when scrolling in a primarily Y direction, and it factors that code out 
2722         into its own class, now called WheelEventDeltaTracker. So now this new class can 
2723         use the same code to filter events for WebKit2’s EventDispatcher.
2724
2725         Files for WheelEventDeltaTracker.
2726         * CMakeLists.txt:
2727         * GNUmakefile.list.am:
2728         * WebCore.vcxproj/WebCore.vcxproj:
2729         * WebCore.vcxproj/WebCore.vcxproj.filters:
2730         * WebCore.xcodeproj/project.pbxproj:
2731
2732         WK2 needs these new WheelEventDeltaTracker functions.
2733         * WebCore.exp.in:
2734
2735         Move a bunch of code over to WheelEventDeltaTracker and use
2736         m_recentWheelEventTracker to serve the same purpose.
2737         * page/EventHandler.cpp:
2738         (WebCore::EventHandler::EventHandler):
2739         (WebCore::EventHandler::handleWheelEvent):
2740         (WebCore::EventHandler::defaultWheelEventHandler):
2741         * page/EventHandler.h:
2742
2743         Allow horizontal rubber banding now that we have some event filtering in place.
2744         * page/FrameView.cpp:
2745         (WebCore::FrameView::FrameView):
2746
2747         New files. Most of this code was from EventHandler.
2748         * page/WheelEventDeltaTracker.cpp: Added.
2749         (WebCore::WheelEventDeltaTracker::WheelEventDeltaTracker):
2750         (WebCore::WheelEventDeltaTracker::~WheelEventDeltaTracker):
2751         (WebCore::WheelEventDeltaTracker::beginTrackingDeltas):
2752         (WebCore::WheelEventDeltaTracker::endTrackingDeltas):
2753         (WebCore::WheelEventDeltaTracker::recordWheelEventDelta):
2754         (WebCore::deltaIsPredominantlyVertical):
2755         (WebCore::WheelEventDeltaTracker::dominantScrollGestureDirection):
2756         * page/WheelEventDeltaTracker.h: Added.
2757         (WebCore::WheelEventDeltaTracker::isTrackingDeltas):
2758
2759         New function to clone events while zero-ing out certain deltas.
2760         * platform/PlatformWheelEvent.h:
2761         (WebCore::PlatformWheelEvent::copyIgnoringHorizontalDelta):
2762         (WebCore::PlatformWheelEvent::copyIgnoringVerticalDelta):
2763
2764 2014-01-31  Simon Fraser  <simon.fraser@apple.com>
2765
2766         Don't do logging from Range::collectSelectionRects() on iOS
2767         https://bugs.webkit.org/show_bug.cgi?id=127999
2768
2769         Reviewed by Enrica Casucci.
2770
2771         Remove some logging code that printed Range stuff in debug builds.
2772
2773         * dom/Range.cpp:
2774         (WebCore::Range::collectSelectionRects):
2775
2776 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
2777
2778         Make iOS fixed layer registration more like OS X
2779         https://bugs.webkit.org/show_bug.cgi?id=127983
2780
2781         Reviewed by Antti Koivisto.
2782
2783         Remove some #if PLATFORM(IOS) in the code related to registering
2784         viewport-constrained layers. The code behaves correctly now in WK1
2785         and WK2 based on the presence of a ScrollingCoordinator.
2786
2787         * rendering/RenderLayerCompositor.cpp:
2788         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2789         (WebCore::nearestScrollingCoordinatorAncestor):
2790         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
2791         (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):
2792
2793 2014-01-31  Commit Queue  <commit-queue@webkit.org>
2794
2795         Unreviewed, rolling out r163165.
2796         http://trac.webkit.org/changeset/163165
2797         https://bugs.webkit.org/show_bug.cgi?id=127997
2798
2799         broke 2 fast/table tests (Requested by kling on #webkit).
2800
2801         * rendering/RenderTable.cpp:
2802         (WebCore::RenderTable::updateLogicalWidth):
2803         (WebCore::RenderTable::computePreferredLogicalWidths):
2804
2805 2014-01-31  Anders Carlsson  <andersca@apple.com>
2806
2807         Don't allocate a new XMLHttpRequestStaticData every time staticData() is called
2808         https://bugs.webkit.org/show_bug.cgi?id=127996
2809
2810         Reviewed by Andreas Kling.
2811
2812         std::once_flag should be static.
2813
2814         * xml/XMLHttpRequest.cpp:
2815         (WebCore::staticData):
2816
2817 2014-01-31  Zalan Bujtas  <zalan@apple.com>
2818
2819         Subpixel rendering: Change RenderBoxModelObject's border functions' signature to support subpixel border painting.
2820         https://bugs.webkit.org/show_bug.cgi?id=127975
2821
2822         Reviewed by Simon Fraser.
2823
2824         From int to LayoutUnit.
2825
2826         Covered by existing tests. No change in functionality.
2827
2828         * platform/text/TextStream.cpp:
2829         (WebCore::TextStream::operator<<):
2830         * platform/text/TextStream.h:
2831         * rendering/RenderBoxModelObject.cpp:
2832         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2833         * rendering/RenderBoxModelObject.h:
2834         (WebCore::RenderBoxModelObject::borderTop):
2835         (WebCore::RenderBoxModelObject::borderBottom):
2836         (WebCore::RenderBoxModelObject::borderLeft):
2837         (WebCore::RenderBoxModelObject::borderRight):
2838         (WebCore::RenderBoxModelObject::borderBefore):
2839         (WebCore::RenderBoxModelObject::borderAfter):
2840         (WebCore::RenderBoxModelObject::borderStart):
2841         (WebCore::RenderBoxModelObject::borderEnd):
2842         * rendering/RenderElement.cpp:
2843         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
2844         * rendering/RenderTable.cpp:
2845         (WebCore::RenderTable::borderBefore):
2846         (WebCore::RenderTable::borderAfter):
2847         * rendering/RenderTable.h:
2848         * rendering/RenderTableCell.cpp:
2849         (WebCore::RenderTableCell::borderLeft):
2850         (WebCore::RenderTableCell::borderRight):
2851         (WebCore::RenderTableCell::borderTop):
2852         (WebCore::RenderTableCell::borderBottom):
2853         (WebCore::RenderTableCell::borderStart):
2854         (WebCore::RenderTableCell::borderEnd):
2855         (WebCore::RenderTableCell::borderBefore):
2856         (WebCore::RenderTableCell::borderAfter):
2857         * rendering/RenderTableCell.h:
2858
2859 2014-01-31  Brady Eidson  <beidson@apple.com>
2860
2861         IDB: Index writing
2862         <rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868
2863
2864         Reviewed by Anders Carlsson.
2865
2866         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2867         (WebCore::IDBDatabaseBackend::openConnectionInternal): Remove outdated comment and ASSERT.
2868
2869         * Modules/indexeddb/IDBObjectStore.cpp:
2870         (WebCore::IDBObjectStore::createIndex): Conditionalize a block of code that is LevelDB-only.
2871
2872         Remove getColumnBlob().  Nobody used it, and it was dangerous because it reset the statement:
2873         * platform/sql/SQLiteStatement.cpp:
2874         * platform/sql/SQLiteStatement.h:
2875         * WebCore.exp.in:
2876
2877 2014-01-30  László Langó  <lango@inf.u-szeged.hu>
2878
2879         [CSS Grid Layout] Do log(n) search in the named line vectors when positioning named line spans.
2880         https://bugs.webkit.org/show_bug.cgi?id=125396
2881
2882         Reviewed by Andreas Kling.
2883
2884         Implement the suggested FIXMEs and do a log search in the named line
2885         vectors. This maintains the previous (somewhat tricky) behavior by
2886         using std::lower_bound and std::upper_bound. No difference in existing
2887         performance tests, but should scale much better for big grids.
2888
2889         Backported from Blink:
2890         https://chromium.googlesource.com/chromium/blink/+/9fc477af0be708c490a6b90e65e412b0c22b161f
2891
2892         No new tests, no behavior change.
2893
2894         * rendering/RenderGrid.cpp:
2895         (WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2896         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2897
2898 2014-01-31  László Langó  <lango@inf.u-szeged.hu>
2899
2900         Fix table sizing when 'max-width' is used.
2901         https://bugs.webkit.org/show_bug.cgi?id=115156
2902
2903         Reviewed by Andreas Kling.
2904
2905         r143534 make <table> abide by 'max-width' all the time which is wrong.
2906         Per the CSS specification, a table should be wide enough to fit its
2907         content, regardless of 'max-width'.
2908
2909         r140479 fixed part of the regression from that change but made the
2910         same fatal mistake by constraining min-content to fit 'max-width'.
2911
2912         The fix is to avoid constraining min-content and ensure that the table
2913         logical width is at least its min-content size.
2914
2915         Backported from Blink:
2916         https://chromium.googlesource.com/chromium/blink/+/0bca0dec4895aeeb2054ba36316e984e4ebed06f
2917
2918         Test: fast/table/html-table-width-max-width-constrained.html
2919
2920         * rendering/RenderTable.cpp:
2921         (WebCore::RenderTable::updateLogicalWidth):
2922         (WebCore::RenderTable::computePreferredLogicalWidths):
2923
2924 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
2925
2926         Fix iOS build after r163156.
2927         
2928         Need to convert LayoutSizes to FloatSizes.
2929
2930         * bindings/objc/DOMUIKitExtensions.mm:
2931         (-[DOMNode borderRadii]):
2932
2933 2014-01-30  Zalan Bujtas  <zalan@apple.com>
2934
2935         Subpixel rendering: Change drawRect()/drawLine() signature to support subpixel rendering.
2936         https://bugs.webkit.org/show_bug.cgi?id=127961
2937
2938         Reviewed by Simon Fraser.
2939
2940         IntRect/IntPoint -> FloatRect/FloatPoint.
2941
2942         Covered by existing tests. No change in functionality.
2943
2944         * platform/graphics/GraphicsContext.h:
2945         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2946         (WebCore::GraphicsContext::drawRect):
2947         (WebCore::GraphicsContext::drawLine):
2948         * platform/graphics/cg/GraphicsContextCG.cpp:
2949         (WebCore::GraphicsContext::drawRect):
2950         (WebCore::GraphicsContext::drawLine): Keep 'distance' int for DottedStroke and DashedStroke for now.
2951         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2952         (WebCore::GraphicsContext::drawRect):
2953         (WebCore::GraphicsContext::drawLine):
2954
2955 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
2956
2957         Remove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is no longer used
2958         https://bugs.webkit.org/show_bug.cgi?id=127981
2959
2960         Reviewed by Andreas Kling.
2961
2962         setLayerIsContainerForFixedPositionLayers() was only used by Chromium and Blackberry,
2963         so remove it.
2964         
2965         This allows the removal of RenderLayerBacking::registerScrollingLayers(),
2966         moving the single useful line of code to the caller.
2967
2968         * page/scrolling/ScrollingCoordinator.h:
2969         * rendering/RenderLayerBacking.cpp:
2970         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2971         * rendering/RenderLayerBacking.h:
2972         * rendering/RenderLayerCompositor.cpp:
2973         (WebCore::RenderLayerCompositor::ensureRootLayer):
2974
2975 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
2976
2977         Some fixed position elements disappear in WK2 on iOS
2978         https://bugs.webkit.org/show_bug.cgi?id=127977
2979
2980         Reviewed by Tim Horton.
2981
2982         Use the appropriate rectangle to ensure that on iOS we don't 
2983         consider a fixed element outside the viewport when zoomed in,
2984         and therefore never make a compositing layer for it.
2985
2986         Also remove the iOS-specific code in RenderLayerCompositor::requiresCompositingForPosition(),
2987         since it's OK to use the common code. Doing so requires that we
2988         set the "acceleratedCompositingForFixedPositionEnabled" setting to true
2989         for iOS, so do so.
2990
2991         * page/Settings.cpp:
2992         * page/Settings.in:
2993         * rendering/RenderLayerCompositor.cpp:
2994         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2995
2996 2014-01-30  Zalan Bujtas  <zalan@apple.com>
2997
2998         Subpixel rendering: Make RoundedRect layout unit aware.
2999         https://bugs.webkit.org/show_bug.cgi?id=127779
3000
3001         Reviewed by Simon Fraser.
3002
3003         In order to draw hairline borders, RoundedRect needs to be
3004         LayoutUnit based.
3005
3006         No change in behavior.
3007
3008         * platform/graphics/GraphicsContext.cpp:
3009         (WebCore::GraphicsContext::fillRoundedRect):
3010         * platform/graphics/GraphicsContext.h:
3011         * platform/graphics/RoundedRect.cpp:
3012         (WebCore::RoundedRect::Radii::scale):
3013         (WebCore::RoundedRect::Radii::expand):
3014         (WebCore::RoundedRect::inflateWithRadii):
3015         (WebCore::RoundedRect::RoundedRect):
3016         (WebCore::RoundedRect::intersectsQuad):
3017         * platform/graphics/RoundedRect.h:
3018         (WebCore::RoundedRect::Radii::Radii):
3019         (WebCore::RoundedRect::Radii::setTopLeft):
3020         (WebCore::RoundedRect::Radii::setTopRight):
3021         (WebCore::RoundedRect::Radii::setBottomLeft):
3022         (WebCore::RoundedRect::Radii::setBottomRight):
3023         (WebCore::RoundedRect::Radii::topLeft):
3024         (WebCore::RoundedRect::Radii::topRight):
3025         (WebCore::RoundedRect::Radii::bottomLeft):
3026         (WebCore::RoundedRect::Radii::bottomRight):
3027         (WebCore::RoundedRect::Radii::expand):
3028         (WebCore::RoundedRect::Radii::shrink):
3029         (WebCore::RoundedRect::rect):
3030         (WebCore::RoundedRect::setRect):
3031         (WebCore::RoundedRect::move):
3032         (WebCore::RoundedRect::inflate):
3033         (WebCore::RoundedRect::expandRadii):
3034         (WebCore::RoundedRect::shrinkRadii):
3035         * platform/graphics/ShadowBlur.cpp:
3036         (WebCore::ScratchBuffer::setCachedShadowValues):
3037         (WebCore::ScratchBuffer::setCachedInsetShadowValues):
3038         (WebCore::computeSliceSizesFromRadii):
3039         (WebCore::ShadowBlur::templateSize):
3040         (WebCore::ShadowBlur::drawRectShadow):
3041         (WebCore::ShadowBlur::drawInsetShadow):
3042         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
3043         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
3044         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
3045         (WebCore::ShadowBlur::drawRectShadowWithTiling):
3046         (WebCore::ShadowBlur::drawLayerPieces):
3047         (WebCore::ShadowBlur::beginShadowLayer):
3048         * platform/graphics/ShadowBlur.h:
3049         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3050         (WebCore::GraphicsContext::clipOut):
3051         (WebCore::GraphicsContext::fillRoundedRect):
3052         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3053         * platform/graphics/cg/GraphicsContextCG.cpp:
3054         (WebCore::GraphicsContext::platformInit):
3055         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3056         (WebCore::GraphicsContext::clipOut):
3057         (WebCore::GraphicsContext::fillRoundedRect):
3058         * rendering/RenderBoxModelObject.cpp:
3059         (WebCore::RenderBoxModelObject::paintOneBorderSide):
3060         (WebCore::calculateSideRect):
3061         (WebCore::RenderBoxModelObject::paintBorderSides):
3062         (WebCore::RenderBoxModelObject::paintBorder):
3063         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
3064         (WebCore::calculateSideRectIncludingInner):
3065         (WebCore::calculateAdjustedInnerBorder):
3066         (WebCore::areaCastingShadowInHole):
3067         (WebCore::RenderBoxModelObject::paintBoxShadow):
3068         * rendering/RenderBoxModelObject.h:
3069         * rendering/RenderThemeSafari.cpp:
3070         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
3071         (WebCore::RenderThemeSafari::paintSliderTrack):
3072
3073 2014-01-30  Martin Robinson  <mrobinson@igalia.com>
3074
3075         [GTK] [CMake] Add support for building against GTK+ 2
3076         https://bugs.webkit.org/show_bug.cgi?id=127959
3077
3078         Reviewed by Anders Carlsson.
3079
3080         * PlatformGTK.cmake: Use the new API version variable and don't use GTK3 directly.
3081
3082 2014-01-30  Jessie Berlin  <jberlin@apple.com>
3083
3084         Speculative build fix.
3085
3086         * page/animation/CSSPropertyAnimation.cpp:
3087
3088 2014-01-30  Zalan Bujtas  <zalan@apple.com>
3089
3090         Subpixel rendering: Change BorderData's width from unsigned to float to enable subpixel border painting.
3091         https://bugs.webkit.org/show_bug.cgi?id=127949
3092
3093         Reviewed by Andreas Kling.
3094
3095         Covered by existing tests. No change in functionality.
3096
3097         * css/DeprecatedStyleBuilder.cpp:
3098         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3099         * page/animation/CSSPropertyAnimation.cpp:
3100         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3101         * rendering/RenderTable.cpp:
3102         (WebCore::RenderTable::calcBorderStart):
3103         (WebCore::RenderTable::calcBorderEnd):
3104         * rendering/style/BorderValue.h:
3105         (WebCore::BorderValue::BorderValue):
3106         (WebCore::BorderValue::width):
3107         * rendering/style/RenderStyle.cpp:
3108         (WebCore::RenderStyle::borderBeforeWidth):
3109         (WebCore::RenderStyle::borderAfterWidth):
3110         (WebCore::RenderStyle::borderStartWidth):
3111         (WebCore::RenderStyle::borderEndWidth):
3112         * rendering/style/RenderStyle.h:
3113
3114 2014-01-30  David Kilzer  <ddkilzer@apple.com>
3115
3116         Add security-checked cast for WebCore::CachedImage
3117         <http://webkit.org/b/127967>
3118
3119         Reviewed by Darin Adler.
3120
3121         * loader/cache/CachedImage.h:
3122         (WebCore::toCachedImage): Add.
3123         (WebCore::toCachedImageManual): Add.
3124         * loader/cache/CachedResource.h:
3125         (CACHED_RESOURCE_TYPE_CASTS): Add macro.
3126
3127         * loader/cache/CachedImage.cpp:
3128         (WebCore::CachedImage::switchClientsToRevalidatedResource):
3129         (WebCore::CachedImage::resumeAnimatingImagesForLoader):
3130         * loader/cache/CachedResourceLoader.cpp:
3131         (WebCore::CachedResourceLoader::requestImage):
3132         * loader/cache/MemoryCache.cpp:
3133         (WebCore::MemoryCache::removeImageFromCache):
3134         - Use toCachedImage() and toCachedImageManual().
3135
3136 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
3137
3138         Fixed position objects are clipped in iOS WK2
3139         https://bugs.webkit.org/show_bug.cgi?id=127974
3140
3141         Reviewed by Darin Adler.
3142         
3143         We clip compositing layers for fixed position objects to the viewport
3144         to avoid huge layers. However, because iOS changes the fixed position
3145         rect when zooming, we need a different rect for iOS.
3146         
3147         In WK1 (when we have a platformWidget), we can use
3148         visibleContentRect(ScrollableArea::LegacyIOSDocumentVisibleRect)
3149         which is effectively the whole document. However in WK2 this is
3150         the real visibleContentRect(), so there we use unscaledDocumentRect().
3151
3152         * page/FrameView.cpp:
3153         (WebCore::FrameView::viewportConstrainedExtentRect):
3154         * page/FrameView.h:
3155         * rendering/RenderLayerBacking.cpp:
3156         (WebCore::RenderLayerBacking::updateCompositedBounds):
3157
3158 2014-01-28  Timothy Hatcher  <timothy@apple.com>
3159
3160         Add column number and call timing support to LegacyProfiler.
3161
3162         https://bugs.webkit.org/show_bug.cgi?id=127764
3163
3164         Reviewed by Joseph Pecoraro.
3165
3166         * bindings/js/ScriptProfile.cpp:
3167         (WebCore::ScriptProfile::idleTime):
3168         (WebCore::buildInspectorObjectFor):
3169         (WebCore::ScriptProfile::buildInspectorObject):
3170         * bindings/js/ScriptProfile.h:
3171         * inspector/InspectorHeapProfilerAgent.cpp:
3172         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
3173         * inspector/InspectorProfilerAgent.cpp:
3174         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
3175         (WebCore::InspectorProfilerAgent::getCPUProfile):
3176         * inspector/ScriptProfileNode.idl:
3177         * inspector/TimelineRecordFactory.cpp:
3178         (WebCore::TimelineRecordFactory::appendProfile):
3179         * inspector/protocol/Profiler.json:
3180
3181 2014-01-26  Timothy Hatcher  <timothy@apple.com>
3182
3183         Include profile with FunctionCall and EvaluateScript Timeline records.
3184
3185         https://bugs.webkit.org/show_bug.cgi?id=127663
3186
3187         Reviewed by Joseph Pecoraro.
3188
3189         * bindings/js/JSCallbackData.cpp:
3190         (WebCore::JSCallbackData::invokeCallback):
3191         * bindings/js/JSEventListener.cpp:
3192         (WebCore::JSEventListener::handleEvent):
3193         * bindings/js/JSMutationCallback.cpp:
3194         (WebCore::JSMutationCallback::call):
3195         * bindings/js/ScheduledAction.cpp:
3196         (WebCore::ScheduledAction::executeFunctionInContext):
3197         * bindings/js/ScriptController.cpp:
3198         (WebCore::ScriptController::evaluateInWorld):
3199         * inspector/InspectorController.cpp:
3200         (WebCore::InspectorController::didCallInjectedScriptFunction):
3201         * inspector/InspectorController.h:
3202         * inspector/InspectorInstrumentation.cpp:
3203         (WebCore::InspectorInstrumentation::didCallFunctionImpl):
3204         (WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
3205         * inspector/InspectorInstrumentation.h:
3206         (WebCore::InspectorInstrumentation::didCallFunction):
3207         (WebCore::InspectorInstrumentation::didEvaluateScript):
3208         * inspector/InspectorTimelineAgent.cpp:
3209         (WebCore::InspectorTimelineAgent::willCallFunction):
3210         (WebCore::InspectorTimelineAgent::didCallFunction):
3211         (WebCore::InspectorTimelineAgent::willEvaluateScript):
3212         (WebCore::InspectorTimelineAgent::didEvaluateScript):
3213         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3214         * inspector/InspectorTimelineAgent.h:
3215         * inspector/TimelineRecordFactory.cpp:
3216         (WebCore::TimelineRecordFactory::appendProfile):
3217         * inspector/TimelineRecordFactory.h:
3218         * inspector/WorkerInspectorController.cpp:
3219         (WebCore::WorkerInspectorController::didCallInjectedScriptFunction):
3220         * inspector/WorkerInspectorController.h:
3221
3222 2014-01-30  Joseph Pecoraro  <pecoraro@apple.com>
3223
3224         Remove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
3225         https://bugs.webkit.org/show_bug.cgi?id=127964
3226
3227         Reviewed by Timothy Hatcher.
3228
3229         Remove empty function. It was only needed by v8 at one point.
3230
3231         * bindings/js/ScriptController.h:
3232         * bindings/js/ScriptController.cpp:
3233         Remove empty function.
3234
3235         * inspector/InspectorConsoleAgent.h:
3236         * inspector/InspectorConsoleAgent.cpp:
3237         (WebCore::InspectorConsoleAgent::enable):
3238         (WebCore::InspectorConsoleAgent::disable):
3239         Remove callers and related tracking state.
3240
3241 2014-01-30  Roger Fong  <roger_fong@apple.com>
3242
3243         WebGL load policy should be queried for the top level document.
3244         https://bugs.webkit.org/show_bug.cgi?id=127937.
3245         <rdar://problem/15950122>
3246
3247         Reviewed by Timothy Horton.
3248
3249         * html/HTMLCanvasElement.cpp:
3250         (WebCore::HTMLCanvasElement::getContext):
3251
3252 2014-01-27  Jeffrey Pfau  <jpfau@apple.com>
3253
3254         Add a method for schemes to be registered as supporting cache partitioning
3255         https://bugs.webkit.org/show_bug.cgi?id=127739
3256
3257         Reviewed by Darin Adler.
3258
3259         Currently, this assumes that schemes supporting cache partitioning
3260         also support (scheme, host) doubles for the scheme. Furthermore,
3261         the scheme is currently discarded when partitioning and is only
3262         checked to ensure that partitioning is supported for that scheme: it
3263         is assumed that all origins with the same host double should be binned
3264         together, regardless of scheme.
3265
3266         * WebCore.exp.in:
3267         * page/SecurityOrigin.cpp:
3268         (WebCore::SecurityOrigin::cachePartition):
3269         * platform/SchemeRegistry.cpp:
3270         (WebCore::CachePartitioningSchemes):
3271         (WebCore::SchemeRegistry::registerURLSchemeAsCachePartitioned):
3272         (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
3273         * platform/SchemeRegistry.h:
3274
3275 2014-01-30  Jer Noble  <jer.noble@apple.com>
3276
3277         [iOS] Convert blocks to lambdas in iOS Fullscreen code.
3278         https://bugs.webkit.org/show_bug.cgi?id=127946
3279
3280         Reviewed by Anders Carlsson.
3281
3282         Pushing a block into a std::function will eventually cause a crash, since std::function
3283         does not know about Block_copy and Block_release.
3284
3285         Lamdas can be intrinsicly converted to blocks, but not vice versa. Switch over all the
3286         blocks in the new iOS Fullscreen code to use lamdas, and use the ref-counted this object
3287         directly rather than implicitly.
3288
3289         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3290         (-[WebVideoFullscreenController exitFullscreen]):
3291         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3292         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
3293         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
3294         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
3295
3296 2014-01-30  Martin Robinson  <mrobinson@igalia.com>
3297
3298         [GTK] [CMake] Add a "make dist" target
3299         https://bugs.webkit.org/show_bug.cgi?id=116378
3300
3301         Reviewed by Gustavo Noronha Silva.
3302
3303         * CMakeLists.txt: Don't build WebKitVersion.h for WebKitGTK+. We don't use it
3304         and we don't want to distribute the dependency.
3305
3306 2014-01-30  Brady Eidson  <beidson@apple.com>
3307
3308         IDB: ObjectStore cursor advance() support
3309         <rdar://problem/15779645> and https://bugs.webkit.org/show_bug.cgi?id=127866
3310
3311         Reviewed by Sam Weinig.
3312
3313         Add IDBKeyData sorting for database collation:
3314         * Modules/indexeddb/IDBKeyData.cpp:
3315         (WebCore::IDBKeyData::compare):
3316         * Modules/indexeddb/IDBKeyData.h:
3317
3318         * WebCore.exp.in:
3319
3320         * platform/sql/SQLiteTransaction.h:
3321         (WebCore::SQLiteTransaction::database):
3322
3323 2014-01-30  David Kilzer  <ddkilzer@apple.com>
3324
3325         De-virtual-ize CachedResource::isImage()
3326         <http://webkit.org/b/127936>
3327
3328         Reviewed by Andreas Kling.
3329
3330         Also replace explicit type() checks with isImage().
3331
3332         * loader/SubresourceLoader.cpp:
3333         (WebCore::SubresourceLoader::willSendRequest): Use isImage().
3334         * loader/cache/CachedImage.h:
3335         (WebCore::CachedResource::isImage): Remove virtual override.
3336         * loader/cache/CachedResource.h:
3337         (WebCore::CachedResource::isImage): Check type() instead of
3338         defining a virtual method that returns false by default.
3339         * loader/cache/CachedResourceLoader.cpp:
3340         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred): Use isImage().
3341
3342 2014-01-30  Eric Carlson  <eric.carlson@apple.com>
3343
3344         [iOS] don't update media layers on main thread when using AVFoundation
3345         https://bugs.webkit.org/show_bug.cgi?id=127931
3346
3347         Reviewed by Simon Fraser.
3348
3349         * platform/graphics/GraphicsLayerClient.h:
3350         (WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Add mediaLayerMustBeUpdatedOnMainThread.
3351
3352         * platform/graphics/ca/GraphicsLayerCA.cpp:
3353         (WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Ask the client if graphics layers
3354             should be updated on the main thread.
3355
3356         * rendering/RenderLayerBacking.cpp:
3357         (WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): New, check settings to see
3358             if video plug-in proxy is enabled.
3359         * rendering/RenderLayerBacking.h:
3360
3361 2014-01-30  Jer Noble  <jer.noble@apple.com>
3362
3363         [MediaControls][iOS] Fix a couple of UI bugs in the iOS Media Controls
3364         https://bugs.webkit.org/show_bug.cgi?id=127929
3365
3366         Reviewed by Eric Carlson.
3367
3368         Two UI bugs in the iOS Media Controls: the text in the controls should use the apple
3369         system font rather than the webkit small control font, and the buttons in the controls
3370         are clipped due to an "off by one" error when calculating the SVG image dimensions.
3371
3372         * Modules/mediacontrols/mediaControlsiOS.css:
3373         (::-webkit-media-controls):
3374         (audio::-webkit-media-controls-play-button):
3375         (audio::-webkit-media-controls-fullscreen-button):
3376         (audio::-webkit-media-controls-time-remaining-display):
3377
3378 2014-01-30  Jeremy Jones  <jeremyj@apple.com>
3379
3380         Refactor WebVideoFullscreenController separating AVKit from MediaElement.
3381         https://bugs.webkit.org/show_bug.cgi?id=127762
3382
3383         Reviewed by Jer Noble.
3384
3385         Refactor WebVideoFullscreenControllerAVKit implementation into two abstract interfaces with concrete implementations: 
3386         WebVideoFullscreenModel, WebVideoFullscreenInterface, WebVideoFullscreenModelMediaElement, WebVideoFullscreenInterfaceAVKit.
3387
3388         * WebCore.xcodeproj/project.pbxproj:
3389         * platform/ios/WebVideoFullscreenControllerAVKit.h:
3390         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3391         (-[WebVideoFullscreenController init]):
3392         (-[WebVideoFullscreenController dealloc]):
3393         (-[WebVideoFullscreenController enterFullscreen:]):
3394         (-[WebVideoFullscreenController exitFullscreen]):
3395         * platform/ios/WebVideoFullscreenInterface.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
3396         (WebCore::WebVideoFullscreenInterface::~WebVideoFullscreenInterface):
3397         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Added.
3398         (WebCore::WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit):
3399         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Added.
3400         (NS_ENUM):
3401         (-[WebAVPlayerController init]):
3402         (-[WebAVPlayerController dealloc]):
3403         (-[WebAVPlayerController forwardingTargetForSelector:]):
3404         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
3405         (-[WebAVPlayerController play:]):
3406         (-[WebAVPlayerController pause:]):
3407         (-[WebAVPlayerController togglePlayback:]):
3408         (-[WebAVPlayerController isPlaying]):
3409         (-[WebAVPlayerController setPlaying:]):
3410         (+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
3411         (-[WebAVPlayerController seekToTime:]):
3412         (:m_videoFullscreenModel):
3413         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel):
3414         (WebVideoFullscreenInterfaceAVKit::setDuration):
3415         (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
3416         (WebVideoFullscreenInterfaceAVKit::setRate):
3417         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
3418         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
3419         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
3420         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
3421         * platform/ios/WebVideoFullscreenModel.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
3422         (WebCore::WebVideoFullscreenModel::~WebVideoFullscreenModel):
3423         * platform/ios/WebVideoFullscreenModelMediaElement.h: Copied from Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.h.
3424         (WebCore::WebVideoFullscreenModelMediaElement::~WebVideoFullscreenModelMediaElement):
3425         (WebCore::WebVideoFullscreenModelMediaElement::setWebVideoFullscreenInterface):
3426         * platform/ios/WebVideoFullscreenModelMediaElement.mm: Added.
3427         (WebVideoFullscreenModelMediaElement::setMediaElement):
3428         (WebVideoFullscreenModelMediaElement::handleEvent):
3429         (WebVideoFullscreenModelMediaElement::requestExitFullScreen):
3430         (WebVideoFullscreenModelMediaElement::play):
3431         (WebVideoFullscreenModelMediaElement::pause):
3432         (WebVideoFullscreenModelMediaElement::togglePlayState):
3433         (WebVideoFullscreenModelMediaElement::seekToTime):
3434         (WebVideoFullscreenModelMediaElement::didExitFullscreen):
3435
3436 2014-01-30  Jer Noble  <jer.noble@apple.com>
3437
3438         [MediaControls][iOS] Add a "start load" button.
3439         https://bugs.webkit.org/show_bug.cgi?id=127861
3440
3441         Reviewed by Eric Carlson.
3442
3443         Add a "start load" button which replaces the controls on platforms
3444         where inline playback is not allowed, or when playback without a
3445         user gesture is not allowed.
3446
3447         Add an accessor to MediaControlsHost to query whether inline playback is allowed.:
3448         * Modules/mediacontrols/MediaControlsHost.cpp:
3449         (WebCore::MediaControlsHost::mediaPlaybackAllowsInline):
3450         * Modules/mediacontrols/MediaControlsHost.h:
3451         * Modules/mediacontrols/MediaControlsHost.idl:
3452         * html/HTMLMediaElement.h:
3453         (WebCore::HTMLMediaElement::mediaSession):
3454
3455         Update the base controller to allow more functions to be overridden:
3456         * Modules/mediacontrols/mediaControlsApple.js:
3457         (Controller):
3458         (Controller.prototype.shouldHaveAnyUI):
3459         (Controller.prototype.updateBase):
3460         (Controller.prototype.setControlsType):
3461         (Controller.prototype.updateControls):
3462         (Controller.prototype.handleFullscreenChange):
3463
3464         Add the new button, and allow for switching between "start", "inline", and "fullscreen" controls:
3465         * Modules/mediacontrols/mediaControlsiOS.js:
3466         (ControllerIOS.prototype.addVideoListeners):
3467         (ControllerIOS.prototype.removeVideoListeners):
3468         (ControllerIOS.prototype.createBase):
3469         (ControllerIOS.prototype.shouldHaveStartPlaybackButton):
3470         (ControllerIOS.prototype.shouldHaveControls):
3471         (ControllerIOS.prototype.shouldHaveAnyUI):
3472         (ControllerIOS.prototype.createControls):
3473         (ControllerIOS.prototype.setControlsType):
3474         (ControllerIOS.prototype.addStartPlaybackControls):
3475         (ControllerIOS.prototype.removeStartPlaybackControls):
3476         (ControllerIOS.prototype.updateControls):
3477         (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart):
3478         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd):
3479         (ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel):
3480         (ControllerIOS.prototype.handleReadyStateChange):
3481
3482         Add the new art:
3483         * Modules/mediacontrols/mediaControlsiOS.css:
3484         (audio::-webkit-media-controls-start-playback-button):
3485         (audio::-webkit-media-controls-start-playback-button.failed):
3486
3487 2014-01-30  Tim Horton  <timothy_horton@apple.com>
3488
3489         WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
3490         https://bugs.webkit.org/show_bug.cgi?id=127891
3491         <rdar://problem/15931413>
3492
3493         Reviewed by Anders Carlsson.
3494
3495         * WebCore.exp.in: