After copy and paste, cursor may appear to be above the bottom of content
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-21  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         After copy and paste, cursor may appear to be above the bottom of content
4         https://bugs.webkit.org/show_bug.cgi?id=129167
5
6         Reviewed by Ryosuke Niwa.
7
8         Adding a clear:both to the end of content.
9
10         I can't handle the case of the cursor appearing above the bottom of
11         absolutely positioned divs (of the case of floats inside absolutely
12         positioned divs) because you can't know where the bottom of a div
13         will end up being rendered (it is affected by things like browser
14         window width and text size settings). Therefore, the only case I
15         can handle is the case where there is a floating div in the same
16         level as the document itself.
17
18         Test: editing/pasteboard/copy-paste-inserts-clearing-div.html
19
20         * editing/EditingStyle.cpp:
21         (WebCore::EditingStyle::isFloating):
22         * editing/EditingStyle.h:
23         * editing/markup.cpp:
24         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
25         (WebCore::StyledMarkupAccumulator::appendElement):
26         (WebCore::createMarkupInternal):
27
28 2014-02-21  Dean Jackson  <dino@apple.com>
29
30         [iOS Media] Wireless target UI
31         https://bugs.webkit.org/show_bug.cgi?id=129189
32         <rdar://problem/15349928>
33         <rdar://problem/16100060>
34
35         Reviewed by Eric Carlson.
36
37         Implement a prototype UI for wireless playback targets. The UI
38         doesn't currently work, but can be simulated via a class variable
39         in ControllerIOS.
40
41         * Modules/mediacontrols/mediaControlsiOS.css:
42         (audio::-webkit-media-controls-panel button): Reset the default style of
43         button elements, to avoid getting a border.
44         (audio::-webkit-media-controls-wireless-playback-status): Holds the UI showing
45         the user that the media is playing on another target.
46         (audio::-webkit-media-controls-wireless-playback-status.hidden):
47         (audio::-webkit-media-controls-wireless-playback-picker-button): The button to
48         trigger selection of targets.
49         (audio::-webkit-media-controls-wireless-playback-picker-button.active):
50         (audio::-webkit-media-controls-panel): This needs to be position absolute for
51         the wireless playback status to fill the viewport.
52         * Modules/mediacontrols/mediaControlsiOS.js:
53         (ControllerIOS): Check for targets.
54         (ControllerIOS.prototype.addVideoListeners):
55         (ControllerIOS.prototype.removeVideoListeners):
56         (ControllerIOS.prototype.UIString): New method to return localized strings (with
57         a FIXME).
58         (ControllerIOS.prototype.shouldHaveAnyUI): Needs to display if there is a wireless
59         target.
60         (ControllerIOS.prototype.currentPlaybackTargetIsWireless):
61         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Create the status content,
62         replacing the device name if it is available.
63         (ControllerIOS.prototype.updateWirelessTargetAvailable):
64         (ControllerIOS.prototype.createControls):
65         (ControllerIOS.prototype.configureInlineControls):
66         (ControllerIOS.prototype.handleWirelessPlaybackChange):
67         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
68         (ControllerIOS.prototype.handleWirelessPickerButtonClicked):
69
70 2014-02-21  Jer Noble  <jer.noble@apple.com>
71
72         Make a generic CDMPrivateMediaPlayer and move its CDMSession into platform/.
73         https://bugs.webkit.org/show_bug.cgi?id=129164
74
75         Reviewed by Eric Carlson.
76
77         Move the session created by CDMPrivateAVFoundation into platform, and rename
78         CDMPrivateAVFoundation to CDMPrivateMediaPlayer. Future media engines who want
79         to support a keysystem from within the media engine can create their own
80         CDMSession as part of the MediaPlayerPrivate interface.
81
82         * Modules/encryptedmedia/CDM.cpp:
83         (WebCore::installedCDMFactories):
84         (WebCore::CDM::createSession):
85         * Modules/encryptedmedia/CDM.h:
86         * Modules/encryptedmedia/CDMPrivate.h:
87         * Modules/encryptedmedia/MediaKeySession.cpp:
88         * Modules/encryptedmedia/MediaKeySession.h:
89         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Removed.
90         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.cpp.
91         (WebCore::CDMPrivateMediaPlayer::supportsKeySystem):
92         (WebCore::CDMPrivateMediaPlayer::supportsKeySystemAndMimeType):
93         (WebCore::CDMPrivateMediaPlayer::supportsMIMEType):
94         (WebCore::CDMPrivateMediaPlayer::createSession):
95         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.h.
96         (WebCore::CDMPrivateMediaPlayer::create):
97         (WebCore::CDMPrivateMediaPlayer::~CDMPrivateMediaPlayer):
98         (WebCore::CDMPrivateMediaPlayer::cdm):
99         (WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
100         * WebCore.xcodeproj/project.pbxproj:
101         * platform/graphics/CDMSession.h: Extracted from CDMPrivateAVFoundation.h.
102         (WebCore::CDMSessionClient::~CDMSessionClient):
103         (WebCore::CDMSession::CDMSession):
104         (WebCore::CDMSession::~CDMSession):
105         * platform/graphics/MediaPlayer.cpp:
106         (WebCore::MediaPlayer::createSession):
107         * platform/graphics/MediaPlayer.h:
108         * platform/graphics/MediaPlayerPrivate.h:
109         (WebCore::MediaPlayerPrivateInterface::createSession):
110         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.h.
111         (WebCore::CDMSessionAVFoundationObjC::~CDMSessionAVFoundationObjC):
112         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateAVFoundation.mm.
113         (WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
114         (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
115         (WebCore::CDMSessionAVFoundationObjC::releaseKeys):
116         (WebCore::CDMSessionAVFoundationObjC::update):
117         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
118         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
119         (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
120         * testing/MockCDM.cpp:
121         (WebCore::MockCDMSession::setClient):
122         (WebCore::MockCDM::createSession):
123         * testing/MockCDM.h:
124
125 2014-02-21  Jer Noble  <jer.noble@apple.com>
126
127         Add a supportsKeySystem media engine factory parameter.
128         https://bugs.webkit.org/show_bug.cgi?id=129161
129
130         Reviewed by Eric Carlson.
131
132         Add a new parameter to the MediaPlayerFactory to allow registered media
133         engines to be queried for keySystem support:
134         * platform/graphics/MediaPlayer.cpp:
135         (WebCore::MediaPlayerFactory::MediaPlayerFactory):
136         (WebCore::MediaPlayer::supportsKeySystem):
137         * platform/graphics/MediaPlayer.h:
138
139         Support this new field in MediaPlayerPrivateAVFoundationObjC:
140         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
141         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
142         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
143         (WebCore::keySystemIsSupported):
144         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
145         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
146
147         Add an empty field for SupportsKeySystem to the remaining media engines:
148         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
149         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
150         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
151         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
152         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
153         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
154         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
155         (WebCore::MediaPlayerPrivateIOS::registerMediaEngine):
156         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
157         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
158         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
159         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine):
160         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
161         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
162
163 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
164
165         Fix WebCore's internals after r164505
166
167         * testing/Internals.cpp:
168         (WebCore::Internals::findEditingDeleteButton): The call became ambiguous after r164505.
169
170 2014-02-21  Joseph Pecoraro  <pecoraro@apple.com>
171
172         Web Inspector: JSContext inspection should report exceptions in the console
173         https://bugs.webkit.org/show_bug.cgi?id=128776
174
175         Reviewed by Timothy Hatcher.
176
177         Include some clean up of ConsoleMessage and ScriptCallStack construction.
178
179         Covered by existing tests.
180
181         * bindings/js/JSDOMBinding.cpp:
182         (WebCore::reportException):
183         Simplify code now that createStackTraceFromException handles it.
184
185         * page/ContentSecurityPolicy.cpp:
186         (WebCore::gatherSecurityPolicyViolationEventData):
187         (WebCore::ContentSecurityPolicy::reportViolation):
188         ScriptCallStack can give us the first non-native callframe.
189
190         * inspector/InspectorResourceAgent.cpp:
191         (WebCore::InspectorResourceAgent::buildInitiatorObject):
192         * inspector/PageDebuggerAgent.cpp:
193         (WebCore::PageDebuggerAgent::breakpointActionLog):
194         * inspector/TimelineRecordFactory.cpp:
195         (WebCore::TimelineRecordFactory::createGenericRecord):
196         * page/Console.cpp:
197         (WebCore::internalAddMessage):
198         (WebCore::Console::profile):
199         (WebCore::Console::profileEnd):
200         (WebCore::Console::timeEnd):
201         * page/ContentSecurityPolicy.cpp:
202         (WebCore::gatherSecurityPolicyViolationEventData):
203         (WebCore::ContentSecurityPolicy::reportViolation):
204         * page/DOMWindow.cpp:
205         (WebCore::DOMWindow::postMessage):
206
207 2014-02-21  Benjamin Poulain  <benjamin@webkit.org>
208
209         jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
210         https://bugs.webkit.org/show_bug.cgi?id=128893
211
212         Reviewed by Darin Adler.
213
214         The declaration of TreeScope::getElementById() was taking an AtomicString as the parameter.
215         Because of this, all the call sites manipulating String were creating and keeping alive an AtomicString
216         to make the call.
217
218         This had two negative consequences:
219         -The call sites were ref-ing the ID's atomic string for no reason.
220         -When there is no ID associated with the input string, an atomic string was created for the sole
221          purpose of failing the query. Since IDs are stored as AtomicString, if there is not an existing
222          AtomicString for the input, there is no reason to query anything.
223
224         * WebCore.exp.in:
225         * bindings/js/JSDOMBinding.cpp:
226         (WebCore::findAtomicString): Update this after the rename.
227
228         * bindings/scripts/CodeGeneratorObjC.pm:
229         (GenerateImplementation):
230         * bindings/scripts/IDLAttributes.txt:
231         Now that there are two overloads for TreeScope::getElementById(), the conversion from NSString*
232         is ambiguous. I add the keyword ObjCExplicitAtomicString to force an explicit conversion to AtomicString.
233
234         * dom/Document.idl:
235         * dom/TreeScope.cpp:
236         (WebCore::TreeScope::getElementById):
237         When getting an AtomicString, the case of a empty string is not important, use isNull() instead.
238         When getting a String, get the corresponding AtomicString if any and use that for getting the element.
239
240         * dom/TreeScope.h:
241         * html/FTPDirectoryDocument.cpp:
242         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
243         Solve the ambiguous call.
244
245         * svg/SVGAElement.cpp:
246         (WebCore::SVGAElement::defaultEventHandler):
247         This is a wonderful candidate for substringSharingImpl. The substring does not survive the call since
248         the new getElementById never create any AtomicString.
249
250         * svg/SVGSVGElement.cpp:
251         (WebCore::SVGSVGElement::getElementById):
252         It looks like there are opportunities to get faster here, Ryosuke should have a look.
253
254         * svg/SVGSVGElement.h:
255         * xml/XMLTreeViewer.cpp:
256         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
257         Unrelated cleanup: noStyleMessage was useless.
258
259 2014-02-21  Daniel Bates  <dabates@apple.com>
260
261         COL element in table has 0 for offsetWidth
262         https://bugs.webkit.org/show_bug.cgi?id=15277
263
264         Reviewed by David Hyatt.
265
266         Implements offset{Left, Top, Width, Height} for table columns and column groups
267         per section Extensions to the HTMLElement Interface of the CSSOM View spec,
268         <http://www.w3.org/TR/cssom-view/#extensions-to-the-htmlelement-interface> (Draft 17 December 2013).
269
270         For now, we fail almost all of the offset{Height, Top} sub-tests in the included test
271         for the separate border model as we need to fix <https://bugs.webkit.org/show_bug.cgi?id=128988>.
272
273         Test: fast/table/col-and-colgroup-offsets.html
274
275         * rendering/RenderTable.cpp:
276         (WebCore::RenderTable::RenderTable): Initialize cached column offset top and offset height.
277         We cache these offsets since they are the same for all columns in the table.
278         (WebCore::RenderTable::invalidateCachedColumns): Clear cached effective column index map.
279         (WebCore::RenderTable::invalidateCachedColumnOffsets): Added.
280         (WebCore::RenderTable::layout): Invalidate cached column offsets as the location or height
281         of one or more sections may have changed.
282         (WebCore::RenderTable::updateColumnCache): Modified to build effective column index map.
283         (WebCore::RenderTable::effectiveIndexOfColumn): Added.
284         (WebCore::RenderTable::offsetTopForColumn): Added.
285         (WebCore::RenderTable::offsetLeftForColumn): Added.
286         (WebCore::RenderTable::offsetWidthForColumn): Added.
287         (WebCore::RenderTable::offsetHeightForColumn): Added.
288         * rendering/RenderTable.h: Make isTableColumnGroupWithColumnChildren() const.
289         * rendering/RenderTableCol.cpp:
290         (WebCore::RenderTableCol::offsetLeft): Added; turns around and calls RenderTable::offsetLeftForColumn().
291         (WebCore::RenderTableCol::offsetTop): Added; turns around and calls RenderTable::offsetTopForColumn().
292         (WebCore::RenderTableCol::offsetWidth): Added; turns around and calls RenderTable::offsetWidthForColumn().
293         (WebCore::RenderTableCol::offsetHeight): Added; turns around and calls RenderTable::offsetHeightForColumn().
294         * rendering/RenderTableCol.h:
295
296 2014-02-21  Enrica Casucci  <enrica@apple.com>
297
298         Build fix for iOS after r164498.
299
300         Unreviewed.
301
302         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
303         (WebCore::MediaPlayerPrivateIOS::buffered):
304
305 2014-02-21  Ryosuke Niwa  <rniwa@webkit.org>
306
307         Disallow the use of -webkit-user-modify on shadow pseudo elements
308         https://bugs.webkit.org/show_bug.cgi?id=129144
309
310         Reviewed by Geoffrey Garen.
311
312         Completely disallow -webkit-user-modify on user agent (builtin) pseudo elements.
313
314         We've already had rules to do this in html.css but just hard code it into the engine
315         in order to eliminate the all uses of -webkit-user-modify in html.css.
316
317         * css/StyleResolver.cpp:
318         (WebCore::StyleResolver::adjustRenderStyle):
319         * css/html.css:
320         (input::-webkit-textfield-decoration-container):
321         (input::-webkit-clear-button):
322         (input[type="search"]::-webkit-search-cancel-button):
323         (input[type="search"]::-webkit-search-decoration):
324         (input[type="search"]::-webkit-search-results-decoration):
325         (input[type="search"]::-webkit-search-results-button):
326         (input::-webkit-inner-spin-button):
327         (input::-webkit-input-speech-button):
328         (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
329         (input[type="file"]::-webkit-file-upload-button):
330         (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
331         (input[type="range"]::-webkit-slider-runnable-track):
332         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
333         (input[type="color"]::-webkit-color-swatch-wrapper):
334         (input[type="color"]::-webkit-color-swatch):
335         (::-webkit-validation-bubble):
336         (::-webkit-validation-bubble-message):
337         (::-webkit-validation-bubble-text-block):
338         (::-webkit-validation-bubble-heading):
339         (::-webkit-validation-bubble-arrow):
340         (::-webkit-validation-bubble-arrow-clipper):
341         (meter::-webkit-meter-inner-element):
342         (meter::-webkit-meter-bar):
343         (meter::-webkit-meter-optimum-value):
344         (meter::-webkit-meter-suboptimum-value):
345         (meter::-webkit-meter-even-less-good-value):
346         (progress::-webkit-progress-inner-element):
347         (progress::-webkit-progress-bar):
348         (progress::-webkit-progress-value):
349
350 2014-02-21  Eric Carlson  <eric.carlson@apple.com>
351
352         Fix TimeRanges layering violations
353         https://bugs.webkit.org/show_bug.cgi?id=128717
354
355         Reviewed by Jer Noble.
356
357         No new tests, no functionality changed.
358
359         * CMakeLists.txt:
360         * GNUmakefile.list.am: Add PlatformTimeRanges.
361
362         * Modules/mediasource/MediaSource.cpp:
363         (WebCore::MediaSource::buffered): TimeRanges -> PlatformTimeRanges.
364         * Modules/mediasource/MediaSource.h:
365
366         * Modules/mediasource/SourceBuffer.cpp:
367         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): TimeRanges* -> TimeRanges&.
368
369         * WebCore.exp.in: Update for signature changes.
370
371         * WebCore.vcxproj/WebCore.vcxproj:
372         * WebCore.vcxproj/WebCore.vcxproj.filters:
373         * WebCore.xcodeproj/project.pbxproj: Add PlatformTimeRanges.
374
375         * html/HTMLMediaElement.cpp:
376         (WebCore::HTMLMediaElement::percentLoaded): Create TimeRanges from PlatformTimeRanges.
377         (WebCore::HTMLMediaElement::buffered): Ditto.
378         (WebCore::HTMLMediaElement::seekable): Ditto.
379
380         * html/MediaController.cpp:
381         (MediaController::buffered): TimeRanges* -> TimeRanges&.
382         (MediaController::seekable): Ditto.
383         (MediaController::played): Ditto.
384
385         Move all of the logic into PlatformTimeRanges. Change API to take TimeRanges& instead of TimeRanges*.
386         * html/TimeRanges.cpp:
387         (WebCore::TimeRanges::create): Move to .cpp from .h.
388         (WebCore::TimeRanges::TimeRanges): Initialize the PlatformTimeRanges member variable.
389         (WebCore::TimeRanges::start): Passthrough to PlatformTimeRanges.
390         (WebCore::TimeRanges::end): Ditto.
391         (WebCore::TimeRanges::invert): Ditto.
392         (WebCore::TimeRanges::copy): Ditto.
393         (WebCore::TimeRanges::intersectWith): Ditto.
394         (WebCore::TimeRanges::unionWith): Ditto.
395         (WebCore::TimeRanges::length): Ditto.
396         (WebCore::TimeRanges::add): Ditto.
397         (WebCore::TimeRanges::contain): Ditto.
398         (WebCore::TimeRanges::find): Ditto.
399         (WebCore::TimeRanges::nearest): Ditto.
400         (WebCore::TimeRanges::totalDuration): Ditto.
401         * html/TimeRanges.h:
402
403         * platform/graphics/MediaPlayer.cpp:
404         (WebCore::NullMediaPlayerPrivate::buffered): TimeRanges -> PlatformTimeRanges.
405         (WebCore::MediaPlayer::buffered): Ditto.
406         (WebCore::MediaPlayer::seekable): Ditto.
407         * platform/graphics/MediaPlayer.h:
408         * platform/graphics/MediaPlayerPrivate.h:
409
410         * platform/graphics/MediaSourcePrivateClient.h:
411
412         * platform/graphics/PlatformTimeRanges.cpp: Added.
413         * platform/graphics/PlatformTimeRanges.h: Added.
414
415         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
416         (WebCore::MediaPlayerPrivateAVFoundation::buffered): TimeRanges -> PlatformTimeRanges.
417         (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Drive-by fix to log
418             FunctionType notifications. ASSERT when passed an unknown notification.
419
420         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
421         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
422         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):  TimeRanges -> PlatformTimeRanges.
423         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
424         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
425         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
426         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Ditto.
427         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges): Ditto.
428
429         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
430         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
431         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable): Ditto.
432         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
433
434         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
435         (WebCore::MediaPlayerPrivateGStreamer::buffered): Ditto.
436         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
437
438         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
439         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
440         (WebCore::MediaPlayerPrivateIOS::buffered): Ditto.
441
442         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
443         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
444         (WebCore::MediaPlayerPrivateQTKit::buffered): Ditto.
445
446         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
447         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::buffered): Ditto.
448         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
449
450         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
451
452         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
453         (WebCore::MockMediaPlayerMediaSource::buffered): Ditto.
454         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
455         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
456
457 2014-02-21  Enrica Casucci  <enrica@apple.com>
458
459         Support WebSelections in WK2 on iOS.
460         https://bugs.webkit.org/show_bug.cgi?id=127015
461         <rdar://problem/15211964>
462
463         Reviewed by Benjamin Poulain.
464
465         Adding some exports.
466
467         * WebCore.exp.in:
468
469 2014-02-21  Benjamin Poulain  <bpoulain@apple.com>
470
471         'mouseenter' mouse compat event not fired when listeners for touch events
472         https://bugs.webkit.org/show_bug.cgi?id=128534
473
474         Reviewed by Andreas Kling.
475
476         The code dispatching mouseenter and mouseleave events was making the assumption that
477         only mouse move would cause Document::updateHoverActiveState.
478
479         This is not true in some cases. In the case of this bug, the first touch handler sets
480         the hover state. From there, the code handling enter/leave is in an inconsistent state.
481
482         This patch changes the delivery of mouse enter/leave events to be done through the regular
483         processing of mouse events. The update is done with the mouseover and mouseout events.
484
485         * dom/Document.cpp:
486         (WebCore::Document::prepareMouseEvent):
487         (WebCore::Document::updateHoverActiveState):
488         * dom/Document.h:
489         * page/EventHandler.cpp:
490         (WebCore::nearestCommonHoverAncestor):
491         (WebCore::hierarchyHasCapturingEventListeners):
492         (WebCore::EventHandler::updateMouseEventTargetNode):
493
494 2014-02-21  Jon Honeycutt  <jhoneycutt@apple.com>
495
496         Crash reloading page with position: fixed content
497         https://bugs.webkit.org/show_bug.cgi?id=129119
498         <rdar://problem/16127090>
499
500         Reviewed by Brent Fulgham.
501
502         Test: platform/mac-wk2/tiled-drawing/crash-reloading-with-position-fixed-content.html
503
504         * page/scrolling/ScrollingTree.cpp:
505         (WebCore::ScrollingTree::removeDestroyedNodes):
506         Check the node's ID against the latched node's ID before the node is
507         removed from the tree.
508
509 2014-02-21  Joseph Pecoraro  <pecoraro@apple.com>
510
511         Revert r164486, causing a number of test failures.
512
513         Unreviewed rollout.
514
515 2014-02-21  David Kilzer  <ddkilzer@apple.com>
516
517         StyleResolver::loadPendingImage() should take a reference to StylePendingImage
518         <http://webkit.org/b/129021>
519
520         Reviewed by Brent Fulgham.
521
522         * css/StyleResolver.cpp:
523         (WebCore::StyleResolver::loadPendingImage): Change pendingImage
524         parameter to a reference.
525         (WebCore::StyleResolver::loadPendingShapeImage): Update to use
526         references.
527         (WebCore::StyleResolver::loadPendingImages): Ditto.
528         * css/StyleResolver.h:
529         (WebCore::StyleResolver::loadPendingImage): Change pendingImage
530         parameter to a reference.
531
532 2014-02-21  Joseph Pecoraro  <pecoraro@apple.com>
533
534         Web Inspector: JSContext inspection should report exceptions in the console
535         https://bugs.webkit.org/show_bug.cgi?id=128776
536
537         Reviewed by Timothy Hatcher.
538
539         Include some clean up of ConsoleMessage and ScriptCallStack construction.
540
541         Covered by existing tests.
542
543         * bindings/js/JSDOMBinding.cpp:
544         (WebCore::reportException):
545         Simplify code now that createStackTraceFromException handles it.
546
547         * page/ContentSecurityPolicy.cpp:
548         (WebCore::gatherSecurityPolicyViolationEventData):
549         (WebCore::ContentSecurityPolicy::reportViolation):
550         ScriptCallStack can give us the first non-native callframe.
551
552         * inspector/InspectorResourceAgent.cpp:
553         (WebCore::InspectorResourceAgent::buildInitiatorObject):
554         * inspector/PageDebuggerAgent.cpp:
555         (WebCore::PageDebuggerAgent::breakpointActionLog):
556         * inspector/TimelineRecordFactory.cpp:
557         (WebCore::TimelineRecordFactory::createGenericRecord):
558         * page/Console.cpp:
559         (WebCore::internalAddMessage):
560         (WebCore::Console::profile):
561         (WebCore::Console::profileEnd):
562         (WebCore::Console::timeEnd):
563         * page/ContentSecurityPolicy.cpp:
564         (WebCore::gatherSecurityPolicyViolationEventData):
565         (WebCore::ContentSecurityPolicy::reportViolation):
566         * page/DOMWindow.cpp:
567         (WebCore::DOMWindow::postMessage):
568
569 2014-02-21  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
570
571         Fixing the !ENABLE(SVG_FONTS) build
572         https://bugs.webkit.org/show_bug.cgi?id=129150
573
574         Reviewed by Anders Carlsson.
575
576         No new tests required.
577
578         * svg/SVGAltGlyphElement.cpp:
579         * svg/SVGAltGlyphElement.h:
580         * svg/svgtags.in:
581
582 2014-02-21  Radu Stavila  <stavila@adobe.com>
583
584         [CSS Regions] Use the named-flow-specific object RenderNamedFlowFragment instead of the generic RenderRegion whenever possible
585         https://bugs.webkit.org/show_bug.cgi?id=128599
586
587         Reviewed by Andrei Bucur.
588
589         Use the named flow specific RenderNamedFlowFragment instead of the generic RenderRegion, whenever possible.
590         Move named flow specific methods from RenderRegion to RenderNamedFlowFragment.
591
592         No new tests required.
593
594         * dom/Element.cpp:
595         (WebCore::Element::renderNamedFlowFragment):
596         (WebCore::Element::webkitRegionOverset):
597         (WebCore::Element::webkitGetRegionFlowRanges):
598         * dom/Element.h:
599         * inspector/InspectorCSSAgent.cpp:
600         (WebCore::InspectorCSSAgent::buildArrayForRegions):
601         * rendering/PaintInfo.h:
602         (WebCore::PaintInfo::PaintInfo):
603         * rendering/RenderBlock.cpp:
604         (WebCore::RenderBlock::paint):
605         (WebCore::RenderBlock::paintObject):
606         * rendering/RenderBox.cpp:
607         (WebCore::RenderBox::paintBoxDecorations):
608         (WebCore::RenderBox::pushContentsClip):
609         (WebCore::RenderBox::layoutOverflowRectForPropagation):
610         * rendering/RenderBox.h:
611         * rendering/RenderBoxModelObject.cpp:
612         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
613         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
614         * rendering/RenderBoxModelObject.h:
615         * rendering/RenderInline.h:
616         * rendering/RenderLayer.cpp:
617         (WebCore::RenderLayer::paint):
618         (WebCore::RenderLayer::paintLayer):
619         (WebCore::RenderLayer::paintLayerContents):
620         (WebCore::RenderLayer::paintLayerByApplyingTransform):
621         (WebCore::RenderLayer::updatePaintingInfoForFragments):
622         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
623         (WebCore::RenderLayer::paintBackgroundForFragments):
624         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
625         (WebCore::RenderLayer::paintOutlineForFragments):
626         (WebCore::RenderLayer::paintMaskForFragments):
627         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
628         (WebCore::RenderLayer::calculateClipRects):
629         * rendering/RenderLayer.h:
630         * rendering/RenderNamedFlowFragment.cpp:
631         (WebCore::RenderNamedFlowFragment::getRanges):
632         * rendering/RenderNamedFlowFragment.h:
633         * rendering/RenderNamedFlowThread.cpp:
634         (WebCore::RenderNamedFlowThread::updateWritingMode):
635         (WebCore::compareRenderNamedFlowFragments):
636         (WebCore::addFragmentToList):
637         (WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):
638         (WebCore::RenderNamedFlowThread::addRegionToThread):
639         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
640         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
641         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
642         (WebCore::RenderNamedFlowThread::getRanges):
643         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
644         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
645         * rendering/RenderNamedFlowThread.h:
646         * rendering/RenderRegion.cpp:
647         * rendering/RenderRegion.h:
648         * rendering/RenderReplaced.cpp:
649         (WebCore::RenderReplaced::shouldPaint):
650         * rendering/RenderReplica.cpp:
651         (WebCore::RenderReplica::paint):
652         * rendering/RootInlineBox.cpp:
653         (WebCore::RootInlineBox::paint):
654         * rendering/svg/RenderSVGRoot.cpp:
655         (WebCore::RenderSVGRoot::paintReplaced):
656
657 2014-02-21  Andrei Bucur  <abucur@adobe.com>
658
659         [CSS Regions] Regions don't paint correctly in new-multicol elements
660         https://bugs.webkit.org/show_bug.cgi?id=120711
661
662         Reviewed by David Hyatt.
663
664         This patch implements basic support for regions inside multi-column elements.
665         Currently, the painting and hit-testing logic of CSS Regions is not aware of
666         enclosing multi-column elements. The change is integrated at a layer level by
667         making use of the pre-computed layer fragments during the painting and hit-testing
668         phases for regions.
669
670         There are limitations such that self painting layers found inside the named flow
671         thread layer will not be correctly processed because they don't go through the
672         layer fragment collection step. This is not trivial to implement because the enclosing
673         pagination layer provided by the multi-column element is not visibile from inside
674         the named flow thread layer and they reside in different coordinate systems.
675
676         A side effect of this patch is the fix of regions incorrect clipping in certain
677         cases (when both a region and its container clip their overflow, the region's
678         content is visible outside the container).
679
680         Tests: fast/regions/region-clipping.html
681                fast/regions/regions-in-multicol-bt.html
682                fast/regions/regions-in-multicol-hover-overflow.html
683                fast/regions/regions-in-multicol-hover.html
684                fast/regions/regions-in-multicol-lr.html
685                fast/regions/regions-in-multicol-rl.html
686                fast/regions/regions-in-multicol.html
687
688         * rendering/RenderLayer.cpp:
689         (WebCore::RenderLayer::paintLayerContents):
690         (WebCore::RenderLayer::hitTestLayer):
691         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
692         (WebCore::RenderLayer::hitTestFlowThreadIfRegionForFragments):
693         * rendering/RenderLayer.h:
694
695 2014-02-21  Mihai Tica  <mitica@adobe.com>
696
697         [CSS Blending] Refactor -webkit-blend-mode to -webkit-mix-blend-mode
698         https://bugs.webkit.org/show_bug.cgi?id=128805
699
700         Reviewed by Dean Jackson.
701
702         The spec defines the mix-blend-mode property. This means that the
703         prefixed version should be -webkit-mix-blend-mode, instead of
704         -webkit-blend-mode.
705
706         * css/CSSComputedStyleDeclaration.cpp:
707         (WebCore::ComputedStyleExtractor::propertyValue):
708         * css/CSSParser.cpp:
709         (WebCore::isValidKeywordPropertyAndValue):
710         (WebCore::isKeywordPropertyID):
711         (WebCore::CSSParser::parseValue):
712         * css/CSSPropertyNames.in:
713         * css/DeprecatedStyleBuilder.cpp:
714         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
715
716 2014-02-21  Ryosuke Niwa  <rniwa@webkit.org>
717
718         Bindings tests rebaseline after r164473.
719
720         * bindings/scripts/test/ObjC/DOMTestObj.mm:
721         (-[DOMTestObj mutablePoint]):
722         (-[DOMTestObj immutablePoint]):
723         (-[DOMTestObj mutablePointFunction]):
724         (-[DOMTestObj immutablePointFunction]):
725         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
726         (-[DOMTestTypedefs immutablePointFunction]):
727
728 2014-02-21  Tim Horton  <timothy_horton@apple.com>
729
730         Remove removed symbol from exports list.
731
732         * WebCore.exp.in:
733
734 2014-02-20  ChangSeok Oh  <changseok.oh@collabora.com>
735
736         Rename EXT_draw_buffers to WEBGL_draw_buffers
737         https://bugs.webkit.org/show_bug.cgi?id=128894
738
739         Reviewed by Dean Jackson.
740
741         I noticed the related spec has changed. Accordingly chromium also changed its implementation
742         to meet the spec. So here I'd like to apply it to webkit as well.
743
744         Merged from Blink (patch by bajones):
745         https://src.chromium.org/viewvc/blink?revision=152065&view=revision
746
747         Test: fast/canvas/webgl/webgl-draw-buffers.html
748
749         * CMakeLists.txt:
750         * DerivedSources.cpp:
751         * DerivedSources.make:
752         * GNUmakefile.list.am:
753         * WebCore.vcxproj/WebCore.vcxproj:
754         * WebCore.vcxproj/WebCore.vcxproj.filters:
755         * WebCore.xcodeproj/project.pbxproj:
756         * bindings/js/JSWebGLRenderingContextCustom.cpp:
757         (WebCore::toJS):
758         * html/canvas/EXTDrawBuffers.idl: Removed.
759         * html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
760         (WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
761         (WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
762         (WebCore::WebGLDrawBuffers::getName):
763         (WebCore::WebGLDrawBuffers::create):
764         (WebCore::WebGLDrawBuffers::supported):
765         (WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
766         (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
767         * html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
768         * html/canvas/WebGLDrawBuffers.idl: Added.
769         * html/canvas/WebGLExtension.h:
770         * html/canvas/WebGLFramebuffer.cpp:
771         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
772         * html/canvas/WebGLRenderingContext.cpp:
773         (WebCore::WebGLRenderingContext::getExtension):
774         (WebCore::WebGLRenderingContext::getParameter):
775         (WebCore::WebGLRenderingContext::getSupportedExtensions):
776         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
777         (WebCore::WebGLRenderingContext::supportsDrawBuffers):
778         * html/canvas/WebGLRenderingContext.h:
779
780 2014-02-20  Ryosuke Niwa  <rniwa@webkit.org>
781
782         m_ancestorDisabledState should never be unknown
783         https://bugs.webkit.org/show_bug.cgi?id=129084
784
785         Reviewed by Benjamin Poulain.
786
787         In order to resolve the bug 129035, a text form control elements needs to synchronously change
788         its inner text element's editability by setting or unsetting contenteditable content attribute.
789         Before this patch, we could not do this because editability of a text form control dependent on
790         its disabled-ness which was only computed lazily via updateAncestorDisabledState().
791
792         This patch makes HTMLFieldSetElement and HTMLFormControlElement update this state synchronously.
793         To avoid O(k) DOM traversal, where k is the depth of the tree, in insertedInto and removedFrom of
794         HTMLFormControlElement on most pages, a new document-level flag, m_disabledFieldsetElementsCount,
795         has been added to indicate whether the document contains any disabled fieldset or not.
796
797         Also renamed the misleadingly named disabledAttributeChanged to disabledStateChanged, and added
798         new function of the same name (disabledAttributeChanged) to be used by HTMLFieldSetElement
799         for keeping the document-level flag up-to-date upon disabled attribute changes.
800
801         Tests: fast/forms/fieldset/fieldset-disabled-2.html
802
803         * dom/Document.cpp:
804         (WebCore::Document::Document): Initializes newly added m_disabledFieldsetElementsCount.
805         (WebCore::Document::~Document): Assert that we've done house keeping right.
806         * dom/Document.h:
807         (WebCore::Document::hasDisabledFieldsetElement): Added.
808         (WebCore::Document::addDisabledFieldsetElement): Added.
809         (WebCore::Document::removeDisabledFieldsetElement): Added.
810
811         * html/HTMLFieldSetElement.cpp:
812         (WebCore::HTMLFieldSetElement::~HTMLFieldSetElement): Removes itself from the owner document.
813
814         (WebCore::updateFromControlElementsAncestorDisabledStateUnder): Added. Updates startNode and
815         its descendants' ancestor disabled flag. We don't update controls under another disabled
816         fieldset element since disabled-ness of those controls aren't affected by startNode.
817
818         (WebCore::HTMLFieldSetElement::disabledAttributeChanged): Call addDisabledFieldsetElement and
819         removeDisabledFieldsetElement to update the owner document's flag.
820
821         (WebCore::HTMLFieldSetElement::disabledStateChanged): Renamed from disabledAttributeChanged. 
822         Enable form control elements under the first legend element and disable or enable other
823         descendent form controls in accordance with the presence of disabled content attribute.
824
825         (WebCore::HTMLFieldSetElement::childrenChanged): Update disabled-ness of form controls under
826         child legend elements because controls aren't disabled in the first legend element, and adding
827         or removing child elements may have changed the first legend element.
828
829         (WebCore::HTMLFieldSetElement::didMoveToNewDocument): Update the flag on the owner document.
830         * html/HTMLFieldSetElement.h:
831
832         * html/HTMLFormControlElement.cpp:
833         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
834         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor): Returns boolean instead of
835         updating m_ancestorDisabledState internally. Also renamed from updateAncestorDisabledState.
836
837         (WebCore::HTMLFormControlElement::setAncestorDisabled): Replaced ancestorDisabledStateWasChanged.
838         This function updates m_disabledByAncestorFieldset and calls disabledAttributeChanged as needed.
839
840         (WebCore::HTMLFormControlElement::disabledAttributeChanged): Added. Calls disabledStateChanged.
841         (WebCore::HTMLFormControlElement::disabledStateChanged): Renamed from disabledAttributeChanged.
842
843         (WebCore::HTMLFormControlElement::insertedInto): Update m_disabledByAncestorFieldset if there is
844         a possibility (i.e. the document contains any disabled fieldset element) that this form control
845         is inserted under a disabled fieldset element.
846
847         (WebCore::HTMLFormControlElement::removedFrom): If this form control element is not disabled by
848         a fieldset ancestor, then there is nothing to do. If it is, then check to see if the element is
849         still disabled now that we've lost some ancestors.
850
851         (WebCore::HTMLFormControlElement::isDisabledFormControl): No longer updates m_ancestorDisabledState
852         lazily since m_disabledByAncestorFieldset is never ambiguous now.
853
854         * html/HTMLFormControlElement.h:
855         (WebCore::HTMLFormControlElement::disabledByAncestorFieldset): Added.
856
857 2014-02-20  Zalan Bujtas  <zalan@apple.com>
858
859         Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
860         https://bugs.webkit.org/show_bug.cgi?id=129137
861
862         Reviewed by Simon Fraser.
863
864         No change in behavior.
865
866         * editing/DeleteButtonController.cpp:
867         (WebCore::DeleteButtonController::createDeletionUI):
868         * page/Page.cpp:
869         * page/Page.h:
870         * platform/graphics/GraphicsContext.cpp:
871         (WebCore::GraphicsContext::GraphicsContext):
872         * platform/graphics/GraphicsContext.h:
873         * platform/graphics/cg/GraphicsContextCG.cpp:
874         (WebCore::GraphicsContext::platformInit):
875         * rendering/RenderBoxModelObject.cpp:
876         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
877         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
878         * rendering/RenderImage.cpp:
879         (WebCore::RenderImage::imageSizeForError):
880         (WebCore::RenderImage::paintReplaced):
881         * rendering/RenderLayer.cpp:
882         (WebCore::RenderLayer::drawPlatformResizerImage):
883         * rendering/RenderObject.cpp:
884         (WebCore::RenderObject::drawLineForBoxSide):
885         * rendering/RenderThemeMac.mm:
886         (WebCore::RenderThemeMac::paintProgressBar):
887         * rendering/svg/SVGRenderingContext.cpp:
888         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
889
890 2014-02-20  David Kilzer  <ddkilzer@apple.com>
891
892         Stop generating Objective-C bindings for the SVG DOM
893         <http://webkit.org/b/129107>
894
895         Reviewed by Timothy Hatcher.
896
897         Bug 114076 stopped compiling the Objective-C bindings for the
898         SVG DOM, but we continued to generate the header and source
899         files after that landed in r147822.  This patch also stops
900         generating the unused header and source files.
901
902         * DerivedSources.make:
903         - Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
904           SVG_BINDING_IDLS so that they may operated on separately.
905         - Define BINDING_IDLS again as the full list of IDL files.
906         - Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
907           bindings are still generated for all IDL files.
908         - Add OBJC_DOM_CLASSES so that Objective-C bindings are only
909           generated for non-SVG IDL files.
910
911         * bindings/scripts/CodeGeneratorObjC.pm:
912         (GetBaseClass):
913         (GetPropertyAttributes):
914         (AddIncludesForType):
915         (GenerateHeader):
916         (GenerateImplementation):
917         - Remove support for SVG classes.
918
919 2014-02-20  Simon Fraser  <simon.fraser@apple.com>
920
921         RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
922         https://bugs.webkit.org/show_bug.cgi?id=129075
923
924         Reviewed by Dean Jackson.
925
926         updateShapeOutsideInfoAfterStyleChange() showed up on profiles in content
927         with no shapes. Avoid calling this if no style has shapeOutside().
928
929         * rendering/RenderBox.cpp:
930         (WebCore::RenderBox::styleDidChange):
931
932 2014-02-20  ChangSeok Oh  <changseok.oh@collabora.com>
933
934         Remove unused chromium stuff in Extensions3D
935         https://bugs.webkit.org/show_bug.cgi?id=129086
936
937         Reviewed by Anders Carlsson.
938
939         Remove GL_CHROMIUM_copy_texture and GL_CHROMIUM_flipy interfaces since they are used nowhere.
940
941         No new tests since no functionality changed.
942
943         * platform/graphics/Extensions3D.h:
944         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
945         * platform/graphics/opengl/Extensions3DOpenGL.h:
946         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
947         * platform/graphics/opengl/Extensions3DOpenGLES.h:
948
949 2014-02-20  Joseph Pecoraro  <pecoraro@apple.com>
950
951         [iOS] Assert / crash trying to draw empty checked input
952         https://bugs.webkit.org/show_bug.cgi?id=129138
953
954         Reviewed by Simon Fraser.
955
956         Test: fast/forms/checkbox-empty-size.html
957
958         * rendering/RenderThemeIOS.mm:
959         (WebCore::shortened):
960         Avoid a divide by 0, but checking for the condition upfront.
961
962 2014-02-20  Benjamin Poulain  <bpoulain@apple.com>
963
964         Start fixing the view states driven by the WKScrollView
965         https://bugs.webkit.org/show_bug.cgi?id=129140
966
967         Reviewed by Tim Horton and Simon Fraser.
968
969         * platform/graphics/ca/mac/TileController.mm:
970         (WebCore::TileController::scaledExposedRect):
971         That comment was more confusing than helping. FrameView-relative coordinates should not need
972         scaling.
973
974 2014-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
975
976         Start to use std::unique_ptr for DragImageLoader
977         https://bugs.webkit.org/show_bug.cgi?id=129078
978
979         Reviewed by Ryosuke Niwa.
980
981         As a step to use std::unique_ptr, this patch replace uses of OwnPtr and PassOwnPtr
982         in the DragImageLoader class with std::unique_ptr. Besides DragImageLoader is set to
983         non-copyable class.
984
985         * dom/Clipboard.cpp:
986         (WebCore::Clipboard::setDragImage):
987         * dom/Clipboard.h:
988
989 2014-02-20  Brady Eidson  <beidson@apple.com>
990
991         Move the image controls setting to Settings.in
992         https://bugs.webkit.org/show_bug.cgi?id=129126
993
994         Reviewed by Tim Horton.
995
996         * page/Settings.cpp:
997         (WebCore::Settings::Settings):
998         * page/Settings.h:
999         * page/Settings.in:
1000
1001 2014-02-20  Brady Eidson  <beidson@apple.com>
1002
1003         Add very basic image control rendering
1004         https://bugs.webkit.org/show_bug.cgi?id=129080
1005
1006         Reviewed by Tim Horton.
1007
1008         Test: fast/images/image-controls-basic.html
1009
1010         This patch is groundwork that adds a very basic image control that can render on top of images.
1011
1012         * dom/Node.h:
1013         (WebCore::Node:: isImageControlsRootElement): Returns false, unless you are an ImageControls object.
1014         * html/HTMLAttributeNames.in:
1015
1016         Teach HTMLImageElement how to understand an experimental attribute to install controls,
1017         how to actually build the DOM to attach to the shadow root, how to tear that DOM down,
1018         and how to make sure that Renderers are created for that DOM:
1019         * html/HTMLImageElement.cpp:
1020         (WebCore::HTMLImageElement::HTMLImageElement):
1021         (WebCore::HTMLImageElement::parseAttribute):
1022         (WebCore::HTMLImageElement::didAttachRenderers):
1023         (WebCore::HTMLImageElement::updateImageControls):
1024         (WebCore::HTMLImageElement::createImageControls):
1025         (WebCore::HTMLImageElement::destroyImageControls):
1026         (WebCore::HTMLImageElement::hasImageControls):
1027         (WebCore::HTMLImageElement::childShouldCreateRenderer):
1028         * html/HTMLImageElement.h:
1029         (WebCore::HTMLImageElement::hasShadowControls): For RenderImage to query when it is constructed. 
1030
1031         Add a generic, platform independent ImageControls root element that does nothing:
1032         * html/shadow/ImageControlsRootElement.cpp: Added.
1033         (WebCore::ImageControlsRootElement::maybeCreate):
1034         (WebCore::ImageControlsRootElement::ImageControlsRootElement):
1035         (WebCore::ImageControlsRootElement::~ImageControlsRootElement):
1036         * html/shadow/ImageControlsRootElement.h: Added.
1037
1038         Add a Mac-specific ImageControls root element that renders a 20x20 red box (for now):
1039         * html/shadow/mac/ImageControlsRootElementMac.cpp: Added.
1040         (WebCore::ImageControlsRootElementMac::ImageControlsRootElementMac):
1041         (WebCore::ImageControlsRootElementMac::~ImageControlsRootElementMac):
1042         (WebCore::ImageControlsRootElement::maybeCreate):
1043         (WebCore::ImageControlsRootElementMac::maybeCreate):
1044         * html/shadow/mac/ImageControlsRootElementMac.h: Added.
1045
1046         Since much of the RenderMedia::layout() method is now required for RenderImage as well,
1047         move the logic to RenderImage. The extra work is controlled by a bool flag that will always
1048         be set for RenderMedias but will only be set for certain RenderImages:
1049         * rendering/RenderImage.cpp:
1050         (WebCore::RenderImage::RenderImage):
1051         (WebCore::RenderImage::canHaveChildren):
1052         (WebCore::RenderImage::layout):
1053         (WebCore::RenderImage::layoutShadowControls):
1054         * rendering/RenderImage.h:
1055         (WebCore::RenderImage::setHasShadowControls):
1056         (WebCore::RenderImage::shadowControlsNeedCustomLayoutMetrics):
1057
1058         * rendering/RenderMedia.cpp:
1059         (WebCore::RenderMedia::RenderMedia):
1060         * rendering/RenderMedia.h:
1061         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics):
1062
1063         * WebCore.xcodeproj/project.pbxproj:
1064
1065 == Rolled over to ChangeLog-2014-02-20 ==