56deecc84720048ea38a6f9c016de7434b68c84b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
2
3         REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
4         https://bugs.webkit.org/show_bug.cgi?id=110622
5
6         Reviewed by David Hyatt.
7
8         Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
9
10         Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
11         since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
12         inline splitting to be aware of RenderFullScreen.
13
14         Test: fullscreen/full-screen-inline-split-crash.html
15
16         * rendering/RenderInline.cpp:
17         (WebCore::RenderInline::splitInlines):
18
19 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
20
21         Fix issues with focus rings on search fields
22         https://bugs.webkit.org/show_bug.cgi?id=116591
23
24         Reviewed by Darin Adler.
25         
26         On a future OS, the rect returned by _focusRingVisibleRect should
27         be in the coordinate system of the that NSView, not the base
28         coordinate system, so fix the code that sets and reads the global
29         focusRingClipRect variable accordingly.
30
31         * platform/graphics/mac/WebLayer.mm:
32         (drawLayerContents):
33         * platform/mac/ThemeMac.mm:
34         (-[WebCoreFlippedView _focusRingVisibleRect]):
35
36 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
37
38         New Flickr doesn't get fast scrolling but should
39         https://bugs.webkit.org/show_bug.cgi?id=116514
40
41         Reviewed by Darin Adler.
42         
43         RenderObject increments and decrements a counter of slow repaint objects on
44         FrameView when it sees style changes related to background-attachment:fixed.
45         However, it omitted to decrement the count when a renderer with a fixed background
46         was destroyed.
47         
48         This caused Flickr to never fall into fast scrolling mode, since it toggled
49         display:none on an element with a fixed background during loading, then removed
50         the fixed background.
51         
52         Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
53
54         Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
55                platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
56                platform/mac-wk2/tiled-drawing/slow-scrolling.html
57
58         * rendering/RenderObject.cpp:
59         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
60         (WebCore::RenderObject::styleWillChange):
61         (WebCore::RenderObject::willBeRemovedFromTree):
62
63 2013-05-22  Robert Hogan  <robert@webkit.org>
64
65         Need to Remove Anonymous Wrappers When All Children Become Inline
66         https://bugs.webkit.org/show_bug.cgi?id=115687
67
68         Reviewed by David Hyatt.
69
70         Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
71         when a block becoming float or positioned removes the need for them.
72
73         Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
74
75         * rendering/RenderBlock.h:
76         (RenderBlock):
77         * rendering/RenderObject.cpp:
78         (WebCore):
79         (WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
80         (WebCore::RenderObject::styleWillChange):
81         (WebCore::RenderObject::styleDidChange):
82         * rendering/RenderObject.h:
83         (RenderObject):
84
85 2013-05-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
86
87         [css] Update ETextDecorations enum to TextDecorations
88         https://bugs.webkit.org/show_bug.cgi?id=116581
89
90         Reviewed by Andreas Kling.
91
92         Currently, ETextDecorations enum uses a C-like coding style for its
93         enumeration values, as well as a 'E' prefix that surely had some meaning
94         in the past, but not nowadays.
95
96         No behavior changes, covered by existing tests.
97
98         * accessibility/AccessibilityRenderObject.cpp:
99         (WebCore::AccessibilityRenderObject::hasPlainText):
100         (WebCore::AccessibilityRenderObject::hasUnderline):
101         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
102         (getAttributeSetForAccessibilityObject):
103         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
104         (AXAttributeStringSetStyle):
105         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
106         (AXAttributeStringSetStyle):
107         * css/CSSComputedStyleDeclaration.cpp:
108         (WebCore::renderTextDecorationFlagsToCSSValue):
109         * css/CSSPrimitiveValueMappings.h:
110         (WebCore::CSSPrimitiveValue::operator TextDecoration):
111         * css/DeprecatedStyleBuilder.cpp:
112         (WebCore::ApplyPropertyTextDecoration::applyValue):
113         (WebCore::ApplyPropertyTextDecoration::createHandler):
114         * editing/mac/EditorMac.mm:
115         (WebCore::Editor::fontAttributesForSelectionStart):
116         * platform/mac/HTMLConverter.mm:
117         (+[WebHTMLConverter editingAttributedStringFromRange:]):
118         * rendering/InlineTextBox.cpp:
119         (WebCore::InlineTextBox::paint):
120         (WebCore::InlineTextBox::paintDecoration):
121         * rendering/InlineTextBox.h:
122         * rendering/RenderObject.cpp:
123         (WebCore::RenderObject::getTextDecorationColors):
124         * rendering/style/RenderStyle.h:
125         * rendering/style/RenderStyleConstants.h:
126         (WebCore::operator|):
127         (WebCore::operator|=):
128         * rendering/style/StyleVisualData.h:
129         (StyleVisualData):
130         * rendering/svg/SVGInlineTextBox.cpp:
131         (WebCore::SVGInlineTextBox::paint):
132         (WebCore::positionOffsetForDecoration):
133         (WebCore::thicknessForDecoration):
134         (WebCore::findRenderObjectDefininingTextDecoration):
135         (WebCore::SVGInlineTextBox::paintDecoration):
136         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
137         * rendering/svg/SVGInlineTextBox.h:
138
139 2013-05-22  Lori Anderson  <lori@rkymtnhi.com>
140
141         [GStreamer] Allow multiple log levels in media player
142         https://bugs.webkit.org/show_bug.cgi?id=116618
143
144         Reviewed by Philippe Normand.
145
146         No new tests, just changing logging.
147
148         * platform/graphics/gstreamer/GStreamerUtilities.h:
149         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
150         (WebCore::MediaPlayerPrivateGStreamer::load):
151         (WebCore::MediaPlayerPrivateGStreamer::pause):
152         (WebCore::MediaPlayerPrivateGStreamer::seek):
153         (WebCore::MediaPlayerPrivateGStreamer::setRate):
154         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
155
156 2013-05-22  Beth Dakin  <bdakin@apple.com>
157
158         The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
159         https://bugs.webkit.org/show_bug.cgi?id=116623
160
161         Reviewed by Geoffrey Garen.
162
163         Make sure we have actually achieved some milestones before calling didLayout().
164         * page/FrameView.cpp:
165         (WebCore::FrameView::performPostLayoutTasks):
166
167 2013-05-22  Mario Sanchez Prada  <mario.prada@samsung.com>
168
169         [GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
170         https://bugs.webkit.org/show_bug.cgi?id=114870
171
172         Reviewed by Martin Robinson.
173
174         Re-implement this functions without using GailTextUtil nor Pango.
175
176         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
177         (webkitAccessibleTextGetChar): New function.
178         (webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
179
180 2013-05-22  Antoine Quint  <graouts@apple.com>
181
182         [Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
183         https://bugs.webkit.org/show_bug.cgi?id=116605
184
185         Reviewed by Eric Carlson.
186
187         Ensure that rtl languages are properly recognized by the captions menu such that text
188         layout and alignment is natural.
189
190         * css/mediaControls.css:
191         (::-webkit-media-controls):
192         Remove the forced "direction: ltr" property which was forcing all layout to be
193         left-to-right.
194
195         * css/mediaControlsQuickTime.css:
196         (video::-webkit-media-controls-closed-captions-track-list):
197         Remove the forced "text-align: left" property which was forcing all caption
198         titles to be left-aligned.
199
200         (video::-webkit-media-controls-closed-captions-track-list h3):
201         Use "-webkit-margin-start" instead of "padding-left" to position the heading
202         such that it adds the margin on the left for ltr languages and on the right
203         for rtl languages.
204
205         (video::-webkit-media-controls-closed-captions-track-list li):
206         Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
207         to position itself relative to the caption title rather than the list element.
208
209         (video::-webkit-media-controls-closed-captions-track-list li.selected::before):
210         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
211         Make the checkmarks a ::before pseudo-class rather than a background-image such that
212         we may control its positioning using the internationlization-friendly "-webkit-margin-start"
213         property.
214
215         * html/shadow/MediaControlElements.cpp:
216         (WebCore::MediaControlClosedCaptionsContainerElement::create):
217         Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
218         means that the first string displayed within the captions container, currently the
219         "Subtitles" <h3> element, defines the direction for the whole container. It is therefore
220         crucial that this string is properly localized in rtl languages as falling back to
221         english would mean the entire caption container is using ltr.
222
223 2013-05-22  Hugo Parente Lima  <hugo.lima@openbossa.org>
224
225         WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
226         https://bugs.webkit.org/show_bug.cgi?id=116340
227
228         Reviewed by Christophe Dumez.
229
230         No new tests, just a simple build fix.
231
232         * inspector/InspectorDOMStorageAgent.cpp:
233         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
234         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
235
236 2013-05-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
237
238         Have IDL interface names match their global constructor
239         https://bugs.webkit.org/show_bug.cgi?id=116520
240
241         Reviewed by Kentaro Hara.
242
243         Have IDL interface names match their global constructor name on DOMWindow.idl
244         using [InterfaceName] extended attribute. This affects in particular webkit
245         prefixed constructors. This is mandated by Web IDL specification:
246         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
247
248         As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
249         for those interfaces and have their global constructors automatically generated
250         by the bindings generator.
251
252         No new tests, no behavior change for layout tests.
253
254         * Modules/mediasource/MediaSource.idl:
255         * Modules/mediasource/SourceBuffer.idl:
256         * Modules/mediasource/SourceBufferList.idl:
257         * Modules/mediastream/MediaStream.idl:
258         * Modules/mediastream/RTCPeerConnection.idl:
259         * Modules/speech/SpeechGrammar.idl:
260         * Modules/speech/SpeechGrammarList.idl:
261         * Modules/speech/SpeechRecognition.idl:
262         * Modules/speech/SpeechRecognitionError.idl:
263         * Modules/speech/SpeechRecognitionEvent.idl:
264         * Modules/webaudio/OfflineAudioContext.idl:
265         * Modules/webaudio/PannerNode.idl:
266         * dom/ShadowRoot.idl:
267         * page/DOMWindow.idl:
268
269 2013-05-21  Mihai Tica  <mitica@adobe.com>
270         
271         Update the background blending implementation to match the changes done
272         in the spec. This implies that background color blending is removed and
273         the background layers won't blend with the content behind the element
274         any more.
275         https://bugs.webkit.org/show_bug.cgi?id=116212
276
277         Reviewed by Dean Jackson.
278
279         * rendering/RenderBox.cpp:
280         (WebCore::RenderBox::paintFillLayers):
281         * rendering/RenderBoxModelObject.cpp:
282         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
283
284 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
285
286         Use-after-free in DOMSelection::containsNode
287         https://bugs.webkit.org/show_bug.cgi?id=116468
288
289         Reviewed by Andreas Kling.
290
291         Retain the node pointer. Also bail out early if the node was not in the document
292         since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
293
294         Test: editing/selection/contains-node-crash.html
295
296         * page/DOMSelection.cpp:
297         (WebCore::DOMSelection::containsNode):
298         * page/DOMSelection.h:
299         (DOMSelection):
300
301 2013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
302
303         Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
304         https://bugs.webkit.org/show_bug.cgi?id=116569
305
306         Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
307
308         Reviewed by Timothy Hatcher.
309
310         Test: inspector/load-resource-synchronously-utf8.html
311
312         * inspector/InspectorFrontendHost.cpp:
313         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
314
315 2013-05-21  Andy Estes  <aestes@apple.com>
316
317         Allow session storage for third-party origins even if third-party data access is blocked.
318         https://bugs.webkit.org/show_bug.cgi?id=116532
319
320         Reviewed by Anders Carlsson.
321
322         In http://trac.webkit.org/changeset/149326 we relaxed our policy for
323         localStorage when third-party data blocking is enabled to create a
324         transient, session-scoped storage area for the third-party origin
325         instead of throwing an exception. Since this gives essentially the same
326         behavior as sessionStorage, we might as well also allow sessionStorage
327         for third-party origins.
328
329         Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
330
331         * WebCore.exp.in: Updated the symbol for
332         SecurityOrigin::canAccessStorage.
333         * page/DOMWindow.cpp:
334         (WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
335         rather than canAccessLocalStorage().
336         * page/SecurityOrigin.cpp:
337         (WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
338         indicating if access should be allowed from third-party origins.
339         * page/SecurityOrigin.h:
340         (WebCore::SecurityOrigin::canAccessSessionStorage): Called
341         canAccessStorage() with AlwaysAllowFromThirdParty.
342         (SecurityOrigin):
343
344 2013-05-21  Hugo Parente Lima  <hugo.lima@openbossa.org>
345
346         [EFL] Add missing #if guards on drag support methods
347         https://bugs.webkit.org/show_bug.cgi?id=116574
348
349         Reviewed by Christophe Dumez.
350
351         * platform/efl/PasteboardEfl.cpp:
352         (WebCore):
353
354 2013-05-21  Antti Koivisto  <antti@apple.com>
355
356         Remove stub HTMLContentElement
357         https://bugs.webkit.org/show_bug.cgi?id=116580
358
359         Reviewed by Andreas Kling.
360
361         Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
362
363         * html/HTMLDetailsElement.cpp:
364         (WebCore::DetailsContentElement::DetailsContentElement):
365         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
366         * html/HTMLSummaryElement.cpp:
367         (WebCore::SummaryContentElement::SummaryContentElement):
368         * html/shadow/HTMLContentElement.cpp:
369         (WebCore::HTMLContentElement::contentTagName):
370         * html/shadow/HTMLContentElement.h:
371         (WebCore::isHTMLContentElement):
372         * html/shadow/InsertionPoint.cpp:
373         (WebCore::InsertionPoint::setResetStyleInheritance):
374         * html/shadow/InsertionPoint.h:
375         
376             Also remove some leftover selector code.
377
378         (WebCore::InsertionPoint::insertionPointType):
379
380 2013-05-21  Andreas Kling  <akling@apple.com>
381
382         Robustify repaint of previous caret node when moving FrameSelection.
383         <http://webkit.org/b/116558>
384
385         Reviewed by Ryosuke Niwa.
386
387         As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.
388
389         * editing/FrameSelection.cpp:
390         (WebCore::FrameSelection::recomputeCaretRect):
391
392 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
393
394         Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
395         the split text nodes no longer exist right next to each other.
396
397         * editing/InsertParagraphSeparatorCommand.cpp:
398         (WebCore::InsertParagraphSeparatorCommand::doApply):
399
400 2013-05-21  Antti Koivisto  <antti@apple.com>
401
402         Remove ScopeContentDistribution
403         https://bugs.webkit.org/show_bug.cgi?id=116576
404
405         Reviewed by Andreas Kling.
406
407         With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.
408
409         * dom/ShadowRoot.cpp:
410         (WebCore):
411         * dom/ShadowRoot.h:
412         (WebCore):
413         * html/shadow/ContentDistributor.cpp:
414         (WebCore::ContentDistributor::ContentDistributor):
415         (WebCore):
416         (WebCore::ContentDistributor::~ContentDistributor):
417         (WebCore::ContentDistributor::invalidateInsertionPointList):
418         (WebCore::ContentDistributor::ensureInsertionPointList):
419         (WebCore::ContentDistributor::distribute):
420         (WebCore::ContentDistributor::invalidate):
421         * html/shadow/ContentDistributor.h:
422         (WebCore):
423         (ContentDistributor):
424         * html/shadow/InsertionPoint.cpp:
425         (WebCore::InsertionPoint::InsertionPoint):
426         (WebCore::InsertionPoint::insertedInto):
427         (WebCore::InsertionPoint::removedFrom):
428         
429             Simplify insertion point list invalidation.
430
431         * html/shadow/InsertionPoint.h:
432
433 2013-05-21  Zoltan Horvath  <zoltan@webkit.org>
434
435         [CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
436         https://bugs.webkit.org/show_bug.cgi?id=115001
437
438         Reviewed by David Hyatt.
439
440         In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
441         when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
442         positioned shape-insides and overflow.
443
444         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
445                fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html
446
447         * rendering/RenderBlockLineLayout.cpp:
448         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
449         line segments for the overflow.
450         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
451         in two places.
452
453 2013-05-21  Commit Queue  <commit-queue@webkit.org>
454
455         Unreviewed, rolling out r150425.
456         http://trac.webkit.org/changeset/150425
457         https://bugs.webkit.org/show_bug.cgi?id=116573
458
459         Not the right fix for WebKit2 (Requested by rniwa on #webkit).
460
461         * testing/Internals.cpp:
462         (WebCore::Internals::resetToConsistentState):
463
464 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
465
466         dispatchEvent call can execute javascript and blow away endRoot from underneath
467         https://bugs.webkit.org/show_bug.cgi?id=116483
468
469         Reviewed by Andreas Kling.
470         
471         Merge https://chromium.googlesource.com/chromium/blink/+/798cba0af9b2aff21e475e2e08ea3ca5e97dfc2c.
472
473         Test: editing/undo/undo-after-event-edited.html
474
475         * editing/Editor.cpp:
476         (WebCore::dispatchEditableContentChangedEvents):
477
478 2013-05-21  Antti Koivisto  <antti@apple.com>
479
480         Remove ContentDistribution
481         https://bugs.webkit.org/show_bug.cgi?id=116527
482
483         Reviewed by Andreas Kling.
484
485         Resolving distribution on traversal is simpler.
486
487         * WebCore.exp.in:
488         * dom/ComposedShadowTreeWalker.cpp:
489         (WebCore::ComposedShadowTreeWalker::traverseNode):
490         (WebCore::ComposedShadowTreeWalker::traverseDistributedNodes):
491         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
492         * html/HTMLDetailsElement.cpp:
493         * html/shadow/ContentDistributor.cpp:
494         (WebCore::ContentDistributor::distributeSelectionsTo):
495         * html/shadow/ContentDistributor.h:
496         * html/shadow/HTMLContentElement.idl:
497         
498             Remove getDistributedNodes().
499
500         * html/shadow/InsertionPoint.cpp:
501         (WebCore::InsertionPoint::InsertionPoint):
502         (WebCore::InsertionPoint::attach):
503         (WebCore::InsertionPoint::detach):
504         (WebCore):
505         (WebCore::InsertionPoint::firstDistributed):
506         (WebCore::InsertionPoint::lastDistributed):
507         (WebCore::InsertionPoint::nextDistributedTo):
508         (WebCore::InsertionPoint::previousDistributedTo):
509         
510             Rename for clarity.
511
512         * html/shadow/InsertionPoint.h:
513         (WebCore::InsertionPoint::hasDistribution):
514         (WebCore::InsertionPoint::setHasDistribution):
515         (WebCore::InsertionPoint::clearDistribution):
516         (WebCore::InsertionPoint::matchTypeFor):
517         (InsertionPoint):
518
519 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
520
521         [GTK] [CMake] Add support for building WebKit2
522         https://bugs.webkit.org/show_bug.cgi?id=116372
523
524         Reviewed by Gustavo Noronha Silva.
525
526         * PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
527
528 2013-05-21  Jer Noble  <jer.noble@apple.com>
529
530         REGRESSION(r101810): Media controls status text missing for live-stream videos.
531         https://bugs.webkit.org/show_bug.cgi?id=116547
532
533         Reviewed by Eric Carlson.
534
535         Un-reverse the logic in loadedMetadata() so that the status text isn't
536         hidden (when it should be shown) for live-stream videos.
537
538         * html/shadow/MediaControlsApple.cpp:
539         (WebCore::MediaControlsApple::loadedMetadata):
540
541 2013-05-21  Jer Noble  <jer.noble@apple.com>
542
543         Implement overlap-avoidance for in-band text track cues.
544         https://bugs.webkit.org/show_bug.cgi?id=116540
545
546         Reviewed by Eric Carlson.
547
548         In-band (or Generic) cues need special casing for certain features
549         present in in-band tracks, like paint-on and roll-up modes. To avoid
550         the problem of overlap avoidance forcing a caption meant to appear
551         below a cue to appear above it when a larger font size is selected,
552         impose an additional sort ordering for "generic cues". Instead of
553         cues being ordered by the order they appear in the track, "generic
554         cues" further sorted by their position within the video area, such
555         that cues at the bottom of the video area appear first, and later
556         cues are pushed up to avoid them, preserving the desired apparent
557         ordering.
558
559         * html/HTMLMediaElement.cpp:
560         (WebCore::compareCueInterval): Added; wrapper around
561             TextTrackCue::isOrderedBefore.
562         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
563             After creating the list of current cues, sort them.
564         * html/track/TextTrackCue.cpp:
565         (WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
566             from TextTrackCueList::add().
567         * html/track/TextTrackCue.h:
568         * html/track/TextTrackCueGeneric.cpp:
569         (WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
570             impose additional oredring on generic cues.
571         * html/track/TextTrackCueGeneric.h:
572         * html/track/TextTrackCueList.cpp:
573         (WebCore::TextTrackCueList::add): Moved ordering test into
574             isOrderedBefore().
575         * rendering/RenderTextTrackCue.cpp:
576         (WebCore::RenderTextTrackCue::repositionGenericCue):
577             Call repositionCueSnapToLinesNotSet() after positioning the cue.
578
579 2013-05-20  Jer Noble  <jer.noble@apple.com>
580
581         Implement overlap avoidance for cues with snap-to-lines flag not set
582         https://bugs.webkit.org/show_bug.cgi?id=84296
583
584         Reviewed by Eric Carlson.
585
586         Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
587
588         Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
589
590         * rendering/RenderTextTrackCue.cpp:
591         (WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
592         (WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
593         (WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
594         (WebCore::RenderTextTrackCue::overlappingObject): Ditto.
595         (WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
596         (WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
597         (WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
598             cue to just above or below that object and try again.
599         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
600         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
601         * rendering/RenderTextTrackCue.h:
602
603 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
604
605         Remove GraphicsLayerClient::contentsVisible()
606         https://bugs.webkit.org/show_bug.cgi?id=116523
607
608         Reviewed by Darin Adler.
609
610         This is dead code from the BlackBerry port.
611
612         * platform/graphics/GraphicsLayerClient.h:
613         * rendering/RenderLayerBacking.cpp:
614
615 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
616
617         PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
618         https://bugs.webkit.org/show_bug.cgi?id=116453
619
620         Reviewed by Alexey Proskuryakov.
621
622         * loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
623         to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
624         does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
625         platforms) so there's no reason to additionally condition the header include with building on
626         non-Qt platforms.
627
628 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
629
630         Add BlackBerry definition of NativeImagePtr
631         https://bugs.webkit.org/show_bug.cgi?id=116526
632
633         Reviewed by Darin Adler.
634
635         * platform/graphics/NativeImagePtr.h:
636         (Graphics):
637         (WebCore):
638
639 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
640
641         [BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
642         https://bugs.webkit.org/show_bug.cgi?id=116529
643
644         Reviewed by Andreas Kling.
645
646         This cannot be converted to a PassRefPtr and breaks the build.
647
648         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
649         (WebCore::FontCache::getFontDataForCharacters):
650
651 2013-05-21  Iago Toral Quiroga  <itoral@igalia.com>
652
653         [GTK] Always use EGL to create the GL context when running on Wayland
654         https://bugs.webkit.org/show_bug.cgi?id=115721
655
656         Reviewed by Martin Robinson.
657
658         * platform/graphics/cairo/GLContext.cpp:
659         (WebCore::GLContext::createContextForWindow):
660         (WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
661         instead of GLX when running on Wayland and make createOffScreenContext reuse the code
662         in createContextWindow.
663
664 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
665
666         Add FloatRect::normalized() for BlackBerry
667         https://bugs.webkit.org/show_bug.cgi?id=116531
668
669         Reviewed by Carlos Garcia Campos.
670
671         This was added to FloatRectBlackBerry.cpp in r111072 when the
672         graphics platform code was upstreamed, but this change was
673         missing.
674
675         * platform/graphics/FloatRect.h:
676         (FloatRect):
677
678 2013-05-21  Balazs Kelemen  <kbalazs@webkit.org>
679
680         [GStreamer] cleanup duration query
681         https://bugs.webkit.org/show_bug.cgi?id=116228
682
683         Reviewed by Philippe Normand.
684
685         Covered by existing tests.
686
687         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
688         (WebCore::MediaPlayerPrivateGStreamer::duration):
689         We can also cache the duration here if the query succeeds.
690         (MediaPlayerPrivateGStreamer::updateStates):
691         Don't query when we are in GST_STATE_READY state because it never succeeds.
692         Do it instead when we reached a stable state.
693         (MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
694         cached. Recaching is not necessary and now we call it a lot of times.
695         Only look into the state if the query failed.
696         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
697         (MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
698         able to cache it in duration(). Internal cached values is one of
699         the sensible uses of mutable.
700
701 2013-05-21  Patrick Gansterer  <paroga@webkit.org>
702
703         Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
704
705         * rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
706
707 2013-05-20  Antti Koivisto  <antti@apple.com>
708
709         Simplify Shadow DOM distribution code
710         https://bugs.webkit.org/show_bug.cgi?id=116454
711
712         Reviewed by Andreas Kling.
713         
714         Remove code supporting nested insertion points and distributing to multiple insertion points.
715     
716         * html/HTMLDetailsElement.cpp:
717         (DetailsContentElement):
718         
719             Make distribution to <details> and <summary> mutually exclusive.
720
721         * html/shadow/ContentDistributor.cpp:
722         (WebCore):
723         (WebCore::ContentDistributor::distribute):
724         (WebCore::ContentDistributor::invalidate):
725         (WebCore::ContentDistributor::distributeSelectionsTo):
726         * html/shadow/ContentDistributor.h:
727         * html/shadow/InsertionPoint.cpp:
728         (WebCore::resolveReprojection):
729
730 2013-05-21  Mihnea Ovidenie  <mihnea@adobe.com>
731
732         [CSSRegions] Constrain auto-height region computation in a different way
733         https://bugs.webkit.org/show_bug.cgi?id=116310
734
735         Reviewed by Alexandru Chiculita.
736
737         After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
738         instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
739         Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
740
741         * rendering/RenderFlowThread.cpp:
742         (WebCore::RenderFlowThread::addForcedRegionBreak):
743
744 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
745
746         REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
747         https://bugs.webkit.org/show_bug.cgi?id=116516
748
749         Reviewed by Antti Koivisto.
750
751         The bug was caused by DRT not resetting various auto correction states.
752         Do that in Internals::resetToConsistentState.
753
754         * testing/Internals.cpp:
755         (WebCore::Internals::resetToConsistentState):
756
757 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
758
759         [GTK] Fix concatenations of string literals that are not C++11-compliant
760         https://bugs.webkit.org/show_bug.cgi?id=116449
761
762         Reviewed by Martin Robinson.
763
764         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
765         is simply a matter of separating the string and the string literal that are being concatenated with a space.
766
767         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
768         * platform/gtk/FileSystemGtk.cpp:
769         (WebCore::sharedResourcesPath):
770
771 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
772
773         [GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
774         https://bugs.webkit.org/show_bug.cgi?id=116442
775
776         Reviewed by Martin Robinson.
777
778         * loader/archive/ArchiveFactory.cpp:
779         (WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
780         and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
781
782 2013-05-20  Benjamin Poulain  <bpoulain@apple.com>
783
784         Minor String fixes in CSS
785         https://bugs.webkit.org/show_bug.cgi?id=116291
786
787         Reviewed by Darin Adler.
788
789         Some trival changes to make up for a bad day :)
790
791         * css/CSSImageSetValue.cpp:
792         (WebCore::CSSImageSetValue::customCssText):
793         * css/CSSImageValue.cpp:
794         (WebCore::CSSImageValue::customCssText):
795         * css/CSSImportRule.cpp:
796         (WebCore::CSSImportRule::cssText):
797         * css/CSSInheritedValue.cpp:
798         (WebCore::CSSInheritedValue::customCssText):
799         * css/CSSInitialValue.cpp:
800         (WebCore::CSSInitialValue::customCssText):
801         * css/CSSPrimitiveValue.cpp:
802         (WebCore::CSSPrimitiveValue::customCssText):
803         * css/CSSPropertySourceData.cpp:
804         (WebCore::CSSPropertySourceData::toString):
805         * css/CSSSelector.cpp:
806         (WebCore::CSSSelector::selectorText):
807         * css/CSSStyleRule.cpp:
808         (WebCore::CSSStyleRule::generateSelectorText):
809         * css/CSSStyleSheet.h:
810         (WebCore::CSSStyleSheet::type):
811         * css/CSSTimingFunctionValue.cpp:
812         (WebCore::CSSLinearTimingFunctionValue::customCssText):
813         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
814         * css/CSSValueList.cpp:
815         (WebCore::CSSValueList::customCssText):
816         (WebCore::CSSValueList::customSerializeResolvingVariables):
817         * css/MediaQueryExp.cpp:
818         (WebCore::MediaQueryExp::serialize):
819         * css/WebKitCSSFilterValue.cpp:
820         (WebCore::WebKitCSSFilterValue::customCssText):
821         * css/WebKitCSSKeyframesRule.cpp:
822         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
823         (WebCore::WebKitCSSKeyframesRule::cssText):
824         * css/WebKitCSSMatFunctionValue.cpp:
825         (WebCore::WebKitCSSMatFunctionValue::customCssText):
826         * css/WebKitCSSMixFunctionValue.cpp:
827         (WebCore::WebKitCSSMixFunctionValue::customCssText):
828
829 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
830
831         Null pointer deference in WebCore::AppendNodeCommand::create
832         https://bugs.webkit.org/show_bug.cgi?id=116479
833
834         Reviewed by Andreas Kling.
835         
836         Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
837
838         DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
839         to be the direct children of the editable root. However, these style and link elements are not necessary editable
840         and WebKit crashes when they are not.
841
842         Test: editing/deleting/delete-uneditable-style.html
843
844         * editing/DeleteSelectionCommand.cpp:
845         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
846
847 2013-05-20  Beth Dakin  <bdakin@apple.com>
848
849         Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations() 
850         is set
851         https://bugs.webkit.org/show_bug.cgi?id=116493
852         -and corresponding-
853         <rdar://problem/13912871>
854
855         Reviewed by Dean Jackson.
856
857         We need to be more aggressive with our approach since AppKit may still ask the 
858         scrollbars to paint here.
859
860         scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has 
861         been set.
862         * page/FrameView.cpp:
863         (WebCore::FrameView::scrollbarAnimationsAreSuppressed):
864         * page/FrameView.h:
865         * platform/ScrollableArea.h:
866         (WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
867         * rendering/RenderLayer.cpp:
868         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
869         * rendering/RenderLayer.h:
870         (RenderLayer):
871         * rendering/RenderListBox.cpp:
872         (WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
873         * rendering/RenderListBox.h:
874
875         Don’t allow animations if scrollbars are suppressed.
876         * platform/mac/ScrollAnimatorMac.mm:
877         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
878
879         Call cancelAnimations() to prevent a just-started animation from continuing.
880         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
881
882 2013-05-20  Andreas Kling  <akling@apple.com>
883
884         Avoid caret repaints if we're not showing carets anyway.
885         <http://webkit.org/b/116489>
886
887         Reviewed by Simon Fraser.
888
889         When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
890         before repainting the caret's previous location.
891
892         * editing/FrameSelection.cpp:
893         (WebCore::FrameSelection::recomputeCaretRect):
894
895 2013-05-20  Simon Fraser  <simon.fraser@apple.com>
896
897         position:sticky should stick for the enclosing overflow ancestor
898         https://bugs.webkit.org/show_bug.cgi?id=100054
899
900         Reviewed by Beth Dakin.
901         
902         Make position: -webkit-sticky be constrained by an enclosing ancestor
903         with non-visible overflow if there is one, rather than being constained
904         always by the viewport.
905
906         Test: fast/css/sticky/sticky-top-overflow.html
907
908         * rendering/RenderBoxModelObject.cpp:
909         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
910         viewportRect to constrainingRect, since it isn't just about the viewport any more.
911         Fix an issue where just adding stickyLocation to absContainerFrame.location() was
912         incorrect when the container is scrolled; we also have to take the scroll offset
913         into account, and that offset is stored in the layer tree.
914         (WebCore::RenderBoxModelObject::stickyPositionOffset):
915         Look for an enclosing layer with overflow clipping, and, if found, use it to
916         compute the sticky constraint rect.
917         * rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
918         to use it place of hard-to-read boolean arguments.
919         Add enclosingOverflowClipLayer(IncludeSelfOrNot).
920         (WebCore::RenderLayer::ancestorCompositingLayer):
921         * rendering/RenderLayer.cpp:
922         (WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
923         layer with overflow clip.
924         (WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
925         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
926         (WebCore::RenderLayer::enclosingFilterLayer): Ditto.
927         * rendering/RenderLayerCompositor.cpp:
928         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
929         (WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
930         and moved up so we can use it in requiresCompositingForPosition().
931         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
932         it's viewport-constrained.
933         (WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
934         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
935         one line down to just before it gets used.
936
937 2013-05-20  Jeff Rogers  <jrogers@blackberry.com>
938
939         Remove DISABLE_ROUNDED_CORNER_CLIPPING
940         https://bugs.webkit.org/show_bug.cgi?id=115531
941
942         Reviewed by Andreas Kling.
943
944         BlackBerry port is no longer using this.
945
946         * rendering/RenderLayer.cpp:
947         (WebCore::inContainingBlockChain):
948         (WebCore::RenderLayer::clipToRect):
949
950 2013-05-20  Tim Horton  <timothy_horton@apple.com>
951
952         Clients should have a way to extend rendering suppression
953         https://bugs.webkit.org/show_bug.cgi?id=116463
954         <rdar://problem/13738496>
955
956         Reviewed by Andy Estes.
957
958         * WebCore.exp.in:
959         Export FrameView::setVisualUpdatesAllowedByClient.
960
961         * dom/Document.cpp:
962         (WebCore::Document::setVisualUpdatesAllowed):
963         Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
964         setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
965         if the client is itself disabling visual updates.
966
967         (WebCore::Document::visualUpdatesSuppressionTimerFired):
968         If the watchdog fires and the client is still disabling visual
969         updates, we should not re-enable visual updates, but instead
970         wait for the client.
971
972         (WebCore::Document::setVisualUpdatesAllowedByClient):
973         Actually re-enable visual updates if we deferred the re-enabling above
974         (when the page finishes loading, but the client had them disabled).
975
976         * dom/Document.h:
977         (Document): Add setVisualUpdatesAllowedByClient.
978         * page/FrameView.cpp:
979         (WebCore::FrameView::FrameView): Visual updates are allowed by default.
980         (WebCore::FrameView::setVisualUpdatesAllowedByClient):
981         Forward through to the document, but we also need to persist the state
982         here in FrameView so that it survives through navigation.
983
984         * page/FrameView.h:
985         (WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
986         (WebCore::FrameView::visualUpdatesAllowedByClient): Added.
987         Added storage for m_visualUpdatesAllowedByClient.
988
989 2013-05-20  Hans Muller  <hmuller@adobe.com>
990
991         [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
992         https://bugs.webkit.org/show_bug.cgi?id=116349
993
994         Reviewed by Alexandru Chiculita.
995
996         Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
997         Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
998
999         The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
1000         of the style bot.
1001
1002         The existing CSS parsing tests were extended to check URI values.
1003
1004         * css/CSSComputedStyleDeclaration.cpp:
1005         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1006         * css/CSSParser.cpp:
1007         (WebCore::CSSParser::parseValue):
1008         * css/DeprecatedStyleBuilder.cpp:
1009         (WebCore::ApplyPropertyExclusionShape::applyValue):
1010         * css/StyleResolver.cpp:
1011         (WebCore::StyleResolver::loadPendingImages):
1012         * rendering/style/ExclusionShapeValue.h:
1013         (WebCore::ExclusionShapeValue::createImageValue):
1014         (ExclusionShapeValue):
1015         (WebCore::ExclusionShapeValue::image):
1016         (WebCore::ExclusionShapeValue::setImage):
1017         (WebCore::ExclusionShapeValue::ExclusionShapeValue):
1018
1019 2013-05-20  Radu Stavila  <stavila@adobe.com>
1020
1021         [CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
1022         https://bugs.webkit.org/show_bug.cgi?id=115899
1023
1024         Reviewed by David Hyatt.
1025
1026         Elements in named flows that have the body as their offsetParent, need to compute their
1027         offsetLeft and offsetTop values relative to the body.
1028
1029         Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
1030                fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
1031                fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
1032                fast/regions/offsetLeft-offsetTop-in-region-float.html
1033                fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
1034
1035         * rendering/RenderBoxModelObject.cpp:
1036         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1037         * rendering/RenderFlowThread.cpp:
1038         (WebCore):
1039         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1040         * rendering/RenderFlowThread.h:
1041
1042 2013-05-20  Zoltan Horvath  <zoltan@webkit.org>
1043
1044         [CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
1045         https://bugs.webkit.org/show_bug.cgi?id=116252
1046
1047         Reviewed by David Hyatt.
1048
1049         Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
1050         shape should be pushed after the content box (for details check out r148975), I implemented  overflowthe behavior for simple
1051         cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
1052
1053         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
1054                fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
1055
1056         * rendering/RenderBlockLineLayout.cpp:
1057         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
1058         content box. Respect existing shape-inside on region tests.
1059         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
1060         the case of regions. Respect the region's margins and paddings.
1061
1062 2013-05-20  Darin Adler  <darin@apple.com>
1063
1064         Remove custom binding for the Clipboard clearData function
1065         https://bugs.webkit.org/show_bug.cgi?id=116421
1066
1067         Reviewed by Andreas Kling.
1068
1069         * bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
1070
1071         * dom/Clipboard.idl: Removed [Custom].
1072
1073         * dom/Clipboard.cpp:
1074         (WebCore::Clipboard::clearData): Renamed from clearAllData.
1075         * dom/Clipboard.h: Rename clearAllData to clearData so we just use
1076         overloading for the one with and without a MIME type.
1077         * platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
1078         * platform/ios/ClipboardIOS.mm:
1079         (WebCore::ClipboardIOS::clearData): Ditto.
1080         * platform/qt/ClipboardQt.cpp:
1081         (WebCore::ClipboardQt::clearData). Ditto.
1082         * platform/qt/ClipboardQt.h: Ditto.
1083         * platform/win/ClipboardWin.cpp:
1084         (WebCore::ClipboardWin::clearData): Ditto.
1085         * platform/win/ClipboardWin.h: Ditto.
1086
1087 2013-05-20  Eric Carlson  <eric.carlson@apple.com>
1088
1089         [iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
1090         https://bugs.webkit.org/show_bug.cgi?id=116444
1091
1092         Reviewed by Jer Noble.
1093
1094         No new tests, covered by existing tests.
1095
1096         * html/HTMLMediaElement.cpp:
1097         (WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
1098             element is in a Document.
1099
1100 2013-05-20  Antoine Quint  <graouts@apple.com>
1101
1102         [Mac] captions menu should behave more like a menu
1103         https://bugs.webkit.org/show_bug.cgi?id=116436
1104
1105         Reviewed by Eric Carlson.
1106
1107         Let the captions menu behave more like a native Mac menu by hiding it when
1108         clicking anywhere on the page and preventing the page from scrolling when
1109         attempting to scroll the captions menu when it cannot scroll in the requested
1110         direction.
1111
1112         Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
1113
1114         * dom/EventListener.h:
1115         Add the new MediaControlsAppleEventListenerType.
1116
1117         * html/shadow/MediaControlsApple.cpp:
1118         (WebCore::MediaControlsApple::defaultEventHandler):
1119         (WebCore::MediaControlsApple::hide):
1120         (WebCore::MediaControlsApple::makeTransparent):
1121         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
1122         (WebCore::MediaControlsApple::reportedError):
1123         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
1124         Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
1125         methods to hide and show the captions menu instead of calling hide()
1126         and show() directly on m_closedCaptionsContainer.
1127
1128         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
1129         Show the m_closedCaptionsContainer and register a "mousewheel" event
1130         listener on it as well as a "click" event listener on the entire document.
1131
1132         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
1133         Hide the m_closedCaptionsContainer and remove the "mousewheel" event
1134         listener on it as well as the "click" event listener on the entire document.
1135
1136         (WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
1137         New private utility to determine whether the m_closedCaptionsContainer can scroll
1138         in the provided scroll direction.
1139
1140         (WebCore::MediaControlsApple::eventListener):
1141         Obtain the event listener used for "mousewheel" and "click" event handlers.
1142
1143         (WebCore::MediaControlsAppleEventListener::handleEvent):
1144         Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
1145         toggle the captions menu visibility and if we get a "mousewheel" event, we call into
1146         shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
1147         current scroll direction, and if not prevent the event from resulting in a scroll by
1148         calling preventDefault().
1149
1150         (WebCore::MediaControlsAppleEventListener::operator==):
1151         Required for the successful subclassing of EventListener.
1152
1153         * html/shadow/MediaControlsApple.h:
1154         (MediaControlsAppleEventListener):
1155         (WebCore::MediaControlsAppleEventListener::create):
1156         (WebCore::MediaControlsAppleEventListener::cast):
1157         (WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
1158         New subclass of EventListener required to provide a custom event listener for the
1159         "mousewheel" and "click" events registered in showClosedCaptionTrackList() and
1160         hideClosedCaptionTrackList().
1161
1162 2013-05-18  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
1163
1164         [Cairo] Canvas-shadow behavior is not being as expected
1165         https://bugs.webkit.org/show_bug.cgi?id=108897
1166
1167         Reviewed by Martin Robinson.
1168
1169         ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
1170         CairoContext-path should be empty for doing this copy. Otherwise, the 
1171         original-image area will also get filled with the shadow.
1172
1173         Test: fast/canvas/canvas-image-shadow.html
1174
1175         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1176         (WebCore::drawPathShadow):
1177
1178 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1179
1180         -webkit-text-underline-position should not be inherited
1181         https://bugs.webkit.org/show_bug.cgi?id=116363
1182
1183         Reviewed by Dean Jackson.
1184
1185         Specification says text-underline-position should not be inherited.
1186
1187         No new tests, this updates existing tests.
1188
1189         * css/CSSProperty.cpp:
1190         (WebCore::CSSProperty::isInheritedProperty): Make
1191         CSSPropertyWebkitTextUnderlinePosition return false.
1192         * rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
1193         non-inherited.
1194         * rendering/style/StyleRareInheritedData.cpp:
1195         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1196         (WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
1197         * rendering/style/StyleRareInheritedData.h:
1198         (StyleRareInheritedData):
1199         * rendering/style/StyleRareNonInheritedData.cpp:
1200         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1201         (WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
1202         * rendering/style/StyleRareNonInheritedData.h:
1203         (StyleRareNonInheritedData):
1204
1205 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1206
1207         Add compile asserts for the size of RootInlineBox and InlineTextbox
1208         https://bugs.webkit.org/show_bug.cgi?id=116337
1209
1210         Reviewed by Darin Adler.
1211
1212         Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
1213
1214         * rendering/InlineTextBox.cpp:
1215         (SameSizeAsInlineTextBox):
1216         (WebCore):
1217         * rendering/RootInlineBox.cpp:
1218         (SameSizeAsRootInlineBox):
1219         (WebCore):
1220
1221 2013-05-20  Xan Lopez  <xlopez@igalia.com>
1222
1223         [BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
1224         https://bugs.webkit.org/show_bug.cgi?id=116300
1225
1226         Reviewed by Rob Buis.
1227
1228         These are dummy implementations necessary to make WebKit link.
1229
1230         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1231         (WebCore::weekFormatInLDML):
1232         (WebCore):
1233         (WebCore::textTrackClosedCaptionsText):
1234         (WebCore::textTrackSubtitlesText):
1235         (WebCore::textTrackOffText):
1236         (WebCore::textTrackNoLabelText):
1237
1238 2013-05-19  Darin Adler  <darin@apple.com>
1239
1240         [Mac] Improve string use in PasteboardMac
1241         https://bugs.webkit.org/show_bug.cgi?id=116418
1242
1243         Reviewed by Sam Weinig.
1244
1245         Did a Ben Poulain all over this file.
1246
1247         * platform/mac/PasteboardMac.mm:
1248         (WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
1249         Prepending it to the string first just does more allocations for no good reason.
1250         (WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
1251         ASCIILiteral where appropriate.
1252         (WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
1253         (WebCore::Pasteboard::clear): Use early return instead of a nested if here.
1254         Use emptyString() instead of "".
1255         (WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
1256
1257 2013-05-19  Anders Carlsson  <andersca@apple.com>
1258
1259         Remove link prerendering code
1260         https://bugs.webkit.org/show_bug.cgi?id=116415
1261
1262         Reviewed by Darin Adler.
1263
1264         * Configurations/FeatureDefines.xcconfig:
1265         * GNUmakefile.list.am:
1266         * Target.pri:
1267         * WebCore.vcproj/WebCore.vcproj:
1268         * WebCore.vcxproj/WebCore.vcxproj:
1269         * WebCore.vcxproj/WebCore.vcxproj.filters:
1270         * WebCore.xcodeproj/project.pbxproj:
1271         * dom/Document.cpp:
1272         (WebCore::Document::Document):
1273         * dom/Document.h:
1274         (WebCore):
1275         (Document):
1276         * dom/EventNames.h:
1277         (WebCore):
1278         * html/HTMLLinkElement.cpp:
1279         * html/HTMLLinkElement.h:
1280         * html/LinkRelAttribute.cpp:
1281         (WebCore::LinkRelAttribute::LinkRelAttribute):
1282         * html/LinkRelAttribute.h:
1283         (LinkRelAttribute):
1284         * loader/LinkLoader.cpp:
1285         (WebCore::LinkLoader::~LinkLoader):
1286         (WebCore::LinkLoader::loadLink):
1287         (WebCore::LinkLoader::released):
1288         * loader/LinkLoader.h:
1289         (WebCore):
1290         (LinkLoader):
1291         * loader/LinkLoaderClient.h:
1292         (LinkLoaderClient):
1293         * loader/Prerenderer.cpp: Removed.
1294         * loader/Prerenderer.h: Removed.
1295         * loader/PrerendererClient.cpp: Removed.
1296         * loader/PrerendererClient.h: Removed.
1297         * platform/PrerenderClient.h: Removed.
1298         * platform/PrerenderHandle.h: Removed.
1299
1300 2013-05-19  Simon Fraser  <simon.fraser@apple.com>
1301
1302         Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
1303         https://bugs.webkit.org/show_bug.cgi?id=116417
1304
1305         Reviewed by Sam Weinig.
1306         
1307         PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
1308         FrameView::setNodeToDraw() has been called and is used to restrict painting to
1309         some part of the subtree, but it could easily be misinterpreted, and confused with
1310         the "rootLayer" used by RenderLayer (which is usually not the layer associated with
1311         the paintingRoot).
1312         
1313         Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
1314         purpose of this variable more obvious.
1315
1316         No behavior change.
1317
1318         * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
1319         be called setSubtreePaintRoot() or something. Not done in this patch to avoid
1320         risk; this function is exported from WebCore.
1321         * rendering/InlineFlowBox.cpp:
1322         (WebCore::InlineFlowBox::paint):
1323         * rendering/PaintInfo.h:
1324         (WebCore::PaintInfo::PaintInfo):
1325         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
1326         (WebCore::PaintInfo::shouldPaintWithinRoot):
1327         * rendering/RenderBlock.cpp:
1328         (WebCore::RenderBlock::paintContents):
1329         * rendering/RenderBox.cpp:
1330         (WebCore::RenderBox::paint):
1331         * rendering/RenderLayer.cpp:
1332         (WebCore::RenderLayer::paint):
1333         (WebCore::RenderLayer::paintOverlayScrollbars):
1334         (WebCore::RenderLayer::paintLayerContents):
1335         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1336         (WebCore::RenderLayer::paintBackgroundForFragments):
1337         (WebCore::RenderLayer::paintForegroundForFragments):
1338         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
1339         (WebCore::RenderLayer::paintOutlineForFragments):
1340         (WebCore::RenderLayer::paintMaskForFragments):
1341         * rendering/RenderLayer.h:
1342         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
1343         * rendering/RenderObject.cpp: Add a comment to recommend changing the name of
1344         paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
1345         risk; this function is exported from WebCore.
1346         * rendering/RenderSnapshottedPlugIn.cpp:
1347         (WebCore::RenderSnapshottedPlugIn::paint):
1348         * rendering/RenderTable.cpp:
1349         (WebCore::RenderTable::paintObject):
1350         * rendering/svg/RenderSVGContainer.cpp:
1351         (WebCore::RenderSVGContainer::paint):
1352
1353 2013-05-19  Darin Adler  <darin@apple.com>
1354
1355         Use Element instead of Node in DragState, also redo DragState struct
1356         https://bugs.webkit.org/show_bug.cgi?id=116411
1357
1358         Reviewed by Sam Weinig.
1359
1360         The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
1361
1362         Also, the entire drag state is about dragging, so no need for the word "drag" in the
1363         name of its members. Also, it's a struct, so the members don't need m_ prefixes.
1364
1365         * page/DragController.cpp: Removed unneeded include of Node.h since it's included by
1366         Element.h, which is also included.
1367         (WebCore::DragController::draggableElement): Renamed from Node to Element and changed
1368         the types and names of arguments accordingly. Also made this function handle a
1369         startElement of 0 so callers don't need to. Also updated for changes to DragState members.
1370         (WebCore::DragController::startDrag): Updated for changes to DragState members.
1371         Since dragSource can only be an element, was able to get rid of isElementNode checks.
1372
1373         * page/DragController.h: Fixed style of forward declarations of structs. Updated for
1374         change of draggableNode to draggableElement. Also removed declarations of nonexistent
1375         selectionDraggingRect and doDrag functions.
1376
1377         * page/DragState.h: Rewrote practically this whole header. Added an include of Element
1378         instead of Node since that's what we use now. Removed includes that are redundant.
1379         There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
1380         to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
1381         boolean is never set to a constant, so there's no need for a policy enum; it can just be
1382         a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
1383         public members and we don't use the prefix in those cases. Removed the word "drag" from the
1384         struct member names since this entire struct is about dragging and has drag in its name.
1385         Left the comments mostly intact, even though I'm not certain of their value.
1386
1387         * page/EventHandler.cpp:
1388         (WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
1389         (WebCore::EventHandler::eventMayStartDrag):
1390         Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
1391         (WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
1392         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
1393         (WebCore::EventHandler::handleWheelEvent): Added FIXME.
1394         (WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
1395         (WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
1396         code to release the clipboard object, which is needed here to avoid keeping it around in
1397         memory until the next drag.
1398         (WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
1399         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
1400         (WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
1401         (WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
1402         instead of innerNode to call draggableElement instead of draggableNode. No longer need to
1403         null check innerElement because draggableElement does that. Removed unneeded else that was
1404         setting m_dragSrc to zero since it's guaranteed to already be zero.
1405
1406 2013-05-19  Anders Carlsson  <andersca@apple.com>
1407
1408         Remove ChromeClient::webView()
1409         https://bugs.webkit.org/show_bug.cgi?id=116054
1410
1411         Reviewed by Darin Adler.
1412
1413         This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
1414         client or not. We already have a (slightly less horrible) way to do that.
1415
1416         * loader/EmptyClients.h:
1417         * page/ChromeClient.h:
1418         (ChromeClient):
1419
1420 2013-05-19  Darin Adler  <darin@apple.com>
1421
1422         Eliminate the Editor::newGeneralClipboard function
1423         https://bugs.webkit.org/show_bug.cgi?id=116410
1424
1425         Reviewed by Andreas Kling.
1426
1427         This is one of the clean-ups made possible by the changes to the DOM clipboard class.
1428         I had been waiting until all the platforms were moved over to it, but it turns out to be
1429         easy to do this now, just with #ifdefs.
1430
1431         * PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
1432
1433         * editing/Editor.cpp:
1434         (WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
1435         using the new version of the Clipboard class. Also some small style cleanup nearby.
1436
1437         * editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
1438         newGeneralClipboard.
1439
1440         * editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
1441         * platform/efl/ClipboardEfl.cpp: Ditto.
1442         * platform/gtk/ClipboardGtk.cpp: Ditto.
1443
1444 2013-05-19  Martin Robinson  <mrobinson@igalia.com>
1445
1446         GtkSelectionData length is off by one
1447         https://bugs.webkit.org/show_bug.cgi?id=113962
1448
1449         Reviewed by Anders Carlsson.
1450
1451         No new tests. Since drag data is interpreted as a null-terminated string
1452         this is difficult to test with a C program and we have no infrastructure
1453         built for using GIR tests.
1454
1455         * platform/gtk/PasteboardHelper.cpp:
1456         (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
1457         character in the paste data length, just include the string. This matches the behavior
1458         of Firefox.
1459
1460 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
1461
1462         Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
1463         https://bugs.webkit.org/show_bug.cgi?id=116406
1464
1465         Reviewed by Andreas Kling.
1466         
1467         RenderLayer::paintLayerContents() was getting polluted with code related to filters,
1468         clipping and font subpixel quantization, and hard to follow.
1469         
1470         Move three hunks of code into new functions:
1471         setupFontSubpixelQuantization() now contains the code related to whether we disable
1472         font subpixel quantization on the context.
1473         setupClipPath() now contains code related to clipping to shapes and references.
1474         setupFilters() and applyFilters() contain code related to CSS filters.
1475         
1476         As part of this, the interaction with FilterEffectRendererHelper was simplified.
1477         It was convenient for setupFilters() to return a FilterEffectRendererHelper object
1478         if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
1479         the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
1480         to make it easier to follow. FilterEffectRendererHelper no longer holds on to
1481         the old GraphicsContext.
1482
1483         No behavior change.
1484
1485         * rendering/FilterEffectRenderer.cpp:
1486         (WebCore::FilterEffectRendererHelper::filterContext):
1487         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
1488         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
1489         * rendering/FilterEffectRenderer.h:
1490         (WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
1491         (WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
1492         (FilterEffectRendererHelper):
1493         * rendering/RenderLayer.cpp:
1494         (WebCore::RenderLayer::setupFontSubpixelQuantization):
1495         (WebCore::RenderLayer::setupClipPath):
1496         (WebCore::RenderLayer::setupFilters):
1497         (WebCore::RenderLayer::applyFilters):
1498         (WebCore::RenderLayer::paintLayerContents):
1499         * rendering/RenderLayer.h:
1500
1501 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
1502
1503         Refactor RenderStyle::diff()
1504         https://bugs.webkit.org/show_bug.cgi?id=116397
1505
1506         Reviewed by Andreas Kling.
1507         
1508         RenderStyle::diff() was prone to being changed incorrectly, since there was
1509         a poorly documented ordering requirement: style changes that cause layout
1510         have to be detected before those that cause only repainting.
1511         
1512         In addition, the existing code made it impossible to separately ask whether
1513         a given style change requires a repaint, if we've already detected that it
1514         requires a positioned-movement-only layout.
1515         
1516         Fix by factoring the code into member functions that check for each type
1517         of style change.
1518         
1519         No behavior change.
1520
1521         * rendering/style/RenderStyle.cpp:
1522         (WebCore::positionChangeIsMovementOnly):
1523         (WebCore::RenderStyle::changeRequiresLayout):
1524         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
1525         (WebCore::RenderStyle::changeRequiresLayerRepaint):
1526         (WebCore::RenderStyle::changeRequiresRepaint):
1527         (WebCore::RenderStyle::changeRequiresRepaintIfText):
1528         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
1529         (WebCore::RenderStyle::diff):
1530         * rendering/style/RenderStyle.h:
1531
1532 2013-05-18  Anders Carlsson  <andersca@apple.com>
1533
1534         Simplify the StorageArea setter functions
1535         https://bugs.webkit.org/show_bug.cgi?id=116402
1536
1537         Reviewed by Sam Weinig.
1538
1539         Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
1540
1541         * inspector/InspectorDOMStorageAgent.cpp:
1542         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1543         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1544         * storage/Storage.cpp:
1545         (WebCore::Storage::setItem):
1546         (WebCore::Storage::removeItem):
1547         (WebCore::Storage::clear):
1548         * storage/StorageArea.h:
1549         (StorageArea):
1550         * storage/StorageAreaImpl.cpp:
1551         (WebCore::StorageAreaImpl::setItem):
1552         (WebCore::StorageAreaImpl::removeItem):
1553         (WebCore::StorageAreaImpl::clear):
1554         * storage/StorageAreaImpl.h:
1555         (StorageAreaImpl):
1556
1557 2013-05-18  Anders Carlsson  <andersca@apple.com>
1558
1559         Simplify StorageArea getter functions
1560         https://bugs.webkit.org/show_bug.cgi?id=116399
1561
1562         Reviewed by Sam Weinig.
1563
1564         Move the security and private browsing checks from StorageArea to Storage so we can share
1565         more code between WebKit1 and WebKit2.
1566
1567         * inspector/InspectorDOMStorageAgent.cpp:
1568         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1569         Update to new StorageArea interface. The security checks are unnecessary here anyway because
1570         InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
1571         by the frame's security origin.
1572         
1573         * storage/Storage.cpp:
1574         (WebCore::Storage::key):
1575         (WebCore::Storage::getItem):
1576         (WebCore::Storage::contains):
1577         * storage/StorageArea.h:
1578         (StorageArea):
1579         * storage/StorageAreaImpl.cpp:
1580         (WebCore::StorageAreaImpl::key):
1581         (WebCore::StorageAreaImpl::item):
1582         (WebCore::StorageAreaImpl::contains):
1583         * storage/StorageAreaImpl.h:
1584         (StorageAreaImpl):
1585
1586 2013-05-17  Simon Fraser  <simon.fraser@apple.com>
1587
1588         Garbage on page background while http://canberraballoons.com.au is loading
1589         https://bugs.webkit.org/show_bug.cgi?id=116384
1590         <rdar://problem/13930328>
1591
1592         Reviewed by Dan Bernstein.
1593
1594         This page loads a large JPEG image as the body background.
1595         ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
1596         are opaque, but this isn't true if the frame is only partially loaded.
1597         However, this would cause FillLayer::hasOpaqueImage() to report that the
1598         background image is opaque, so we'd skip painting the background color.
1599         Unpainted content in an opaque layer results in garbage.
1600         
1601         Fix by having ImageSource::frameHasAlphaAtIndex() always return true
1602         for frames that are not complete. When the image load completes, we
1603         recompute metadata and correctly determine that the frame is opaque.
1604
1605         * platform/graphics/cg/ImageSourceCG.cpp:
1606         (WebCore::ImageSource::frameHasAlphaAtIndex):
1607
1608 2013-05-18  Timothy Hatcher  <timothy@apple.com>
1609
1610         Simplify EventLoop::cycle() on Mac.
1611
1612         https://webkit.org/b/116392
1613
1614         Reviewed by Anders Carlsson.
1615
1616         * platform/mac/EventLoopMac.mm:
1617         (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
1618
1619 2013-05-18  Andreas Kling  <akling@apple.com>
1620
1621         Use CSSParserSelector::appendTagHistory() from CSS grammar.
1622         <http://webkit.org/b/116382>
1623
1624         Reviewed by Antti Koivisto.
1625
1626         CSSParserSelector already knows how to append another component to itself,
1627         no need to duplicate that logic in the grammar.
1628
1629         * css/CSSGrammar.y.in:
1630
1631 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
1632
1633         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
1634         https://bugs.webkit.org/show_bug.cgi?id=114554
1635
1636         Reviewed by Gyuyoung Kim.
1637
1638         Using variables as target names is very uncommon in CMake.
1639         The usual way to specify the name of the resulting binary
1640         is to set the OUTPUT_NAME target property.
1641
1642         * CMakeLists.txt:
1643
1644 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1645
1646         [GTK] Move GTK port off legacy clipboard
1647         https://bugs.webkit.org/show_bug.cgi?id=116221
1648
1649         Reviewed by Martin Robinson.
1650
1651         Merge clipboard methods into PasteboardGtk that now wraps a
1652         DataObjectGtk.
1653
1654         * GNUmakefile.list.am: Remove ClipboardGtk.h.
1655         * dom/Clipboard.h: Remove GTK from the list of ports using legacy
1656         clipboard.
1657         * page/gtk/EventHandlerGtk.cpp:
1658         (WebCore::EventHandler::createDraggingClipboard): Use
1659         Clipboard::createForDragAndDrop().
1660         * platform/Pasteboard.h:
1661         (Pasteboard):
1662         * platform/gtk/ClipboardGtk.cpp:
1663         (WebCore::Editor::newGeneralClipboard): Use
1664         Clipboard::createForCopyAndPaste().
1665         (WebCore::Clipboard::createDragImage):
1666         (WebCore::Clipboard::declareAndWriteDragImage):
1667         * platform/gtk/ClipboardGtk.h: Removed.
1668         * platform/gtk/DragDataGtk.cpp:
1669         * platform/gtk/PasteboardGtk.cpp:
1670         (WebCore::Pasteboard::create): Create a new Pasteboard for a given
1671         GtkClipboard or DataObjectGtk.
1672         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
1673         for the GDK_SELECTION_CLIPBOARD clipboard.
1674         (WebCore::Pasteboard::createPrivate): Create a Pasteboard without
1675         a GtkClipboard associated.
1676         (WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
1677         for drag and drop operations.
1678         (WebCore::selectionClipboard): Return a static Pasteboard for the
1679         GDK_SELECTION_CLIPBOARD clipboard.
1680         (WebCore::primaryClipboard): Return a static Pasteboard for the
1681         GDK_SELECTION_PRIMARY clipboard.
1682         (WebCore::Pasteboard::generalPasteboard): Return
1683         selectionClipboard() or primaryClipboard() depending on whether
1684         primary selection clipboard is the active one or not.
1685         (WebCore::Pasteboard::Pasteboard):
1686         (WebCore::Pasteboard::~Pasteboard):
1687         (WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
1688         (WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
1689         ClipboardGtk.cpp.
1690         (WebCore::Pasteboard::writeString): Adapted to upate the wrapped
1691         DataObjectGtk and the GtkClipboard if needed.
1692         (WebCore::Pasteboard::writeSelection): Ditto.
1693         (WebCore::Pasteboard::writePlainText): Ditto.
1694         (WebCore::Pasteboard::writeURL): Ditto.
1695         (WebCore::Pasteboard::writeImage): Ditto.
1696         (WebCore::Pasteboard::writePasteboard): Copy the wrapped
1697         DataObjectGtk from the DataObjectGtk of the given Pasteboard and
1698         upsate the GtkClipboard if needed.
1699         (WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
1700         (WebCore::Pasteboard::canSmartReplace): Check if current
1701         GtkClipboard supports smart replace.
1702         (WebCore::Pasteboard::setDragImage):
1703         (WebCore::Pasteboard::documentFragment): Adapted to use the
1704         wrapped DataObjectGtk reading from the current GtkClipboard if
1705         present.
1706         (WebCore::Pasteboard::plainText): Ditto.
1707         (WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
1708         (WebCore::Pasteboard::types): Ditto.
1709         (WebCore::Pasteboard::readString): Ditto.
1710         (WebCore::Pasteboard::readFilenames): Ditto.
1711
1712 2013-05-18  Alberto Garcia  <agarcia@igalia.com>
1713
1714         [GTK] Parallel build fails if gtk-doc is enabled
1715         https://bugs.webkit.org/show_bug.cgi?id=116227
1716
1717         Reviewed by Martin Robinson.
1718
1719         * GNUmakefile.am:
1720         Don't overwrite noinst_DATA, modify its existing value instead.
1721
1722 2013-05-17  Michelangelo De Simone  <michelangelo@webkit.org>
1723
1724         CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
1725         https://bugs.webkit.org/show_bug.cgi?id=116370
1726
1727         CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
1728
1729         Reviewed by Alexandru Chiculita.
1730
1731         No new test possible, the feature is not implemented nor exposed.
1732
1733         * css/CSSParser.cpp:
1734         (WebCore::CSSParser::parseValue):
1735
1736 2013-05-17  Timothy Hatcher  <timothy@apple.com>
1737
1738         Force the script debug server to continue when disabling the debugger.
1739
1740         There might be some cases where the debugger will stay in the nested run loop
1741         which cause weird issues.
1742
1743         Speculative fix for: https://webkit.org/b/111438
1744
1745         Reviewed by Joseph Pecoraro.
1746
1747         * inspector/InspectorDebuggerAgent.cpp:
1748         (WebCore::InspectorDebuggerAgent::disable):
1749
1750 2013-05-16  Darin Adler  <darin@apple.com>
1751
1752         [BlackBerry] Get BlackBerry port off legacy clipboard
1753         https://bugs.webkit.org/show_bug.cgi?id=116287
1754
1755         Reviewed by Rob Buis.
1756
1757         * PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
1758
1759         * dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
1760         use the legacy clipboard.
1761
1762         * editing/blackberry/EditorBlackBerry.cpp:
1763         (WebCore::Editor::newGeneralClipboard): Changed to just create a copy
1764         and paste clipboard.
1765
1766         * page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
1767         function that wasn't doing any good.
1768
1769         * platform/blackberry/ClipboardBlackBerry.cpp: Removed.
1770         * platform/blackberry/ClipboardBlackBerry.h: Removed.
1771
1772         * platform/blackberry/PasteboardBlackBerry.cpp:
1773         (WebCore::Pasteboard::createForCopyAndPaste): Added.
1774         (WebCore::Pasteboard::createPrivate): Added.
1775         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
1776         (WebCore::Pasteboard::clear): Ditto.
1777         (WebCore::Pasteboard::readString): Ditto.
1778         (WebCore::Pasteboard::writeString): Ditto.
1779         (WebCore::Pasteboard::types): Ditto.
1780         (WebCore::Pasteboard::readFilenames): Ditto.
1781
1782 2013-05-17  Andreas Kling  <akling@apple.com>
1783
1784         Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
1785         <http://webkit.org/b/116344>
1786
1787         Reviewed by Darin Adler.
1788
1789         Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
1790
1791         * rendering/style/RenderStyle.cpp:
1792         (WebCore::RenderStyle::diff):
1793         * rendering/style/StyleBackgroundData.cpp:
1794         (WebCore::StyleBackgroundData::isEquivalentForPainting):
1795         * rendering/style/StyleBackgroundData.h:
1796         (StyleBackgroundData):
1797
1798 2013-05-17  Andreas Kling  <akling@apple.com>
1799
1800         Plug leak in CSSSelectorList::deleteSelectors().
1801         <http://webkit.org/b/116371>
1802         <rdar://problem/13930698>
1803
1804         Reviewed by Ryosuke Niwa.
1805
1806         Don't forget to destroy the very last selector in the list.
1807
1808         * css/CSSSelectorList.cpp:
1809         (WebCore::CSSSelectorList::deleteSelectors):
1810
1811 2013-05-17  Anders Carlsson  <andersca@apple.com>
1812
1813         Share code between WebKit1 and WebKit2 StorageArea subclasses
1814         https://bugs.webkit.org/show_bug.cgi?id=116367
1815
1816         Reviewed by Andreas Kling.
1817
1818         * inspector/InspectorDOMStorageAgent.cpp:
1819         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1820         Remove ec parameter.
1821
1822         * inspector/InspectorDOMStorageAgent.h:
1823         Add forward declaration.
1824
1825         * page/DOMWindow.cpp:
1826         (WebCore::DOMWindow::sessionStorage):
1827         (WebCore::DOMWindow::localStorage):
1828         Storage::StorageArea returns a reference now.
1829
1830         * storage/Storage.cpp:
1831         (WebCore::Storage::length):
1832         Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
1833         Then call down to the (now simplified) StorageArea::length().
1834
1835         (WebCore::Storage::isDisabledByPrivateBrowsing):
1836         New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
1837         to make it easier to follow.
1838
1839         * storage/Storage.h:
1840         (WebCore::Storage::area):
1841         Return a reference.
1842
1843         * storage/StorageAreaImpl.cpp:
1844         (WebCore::StorageAreaImpl::storageType):
1845         Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
1846
1847         (WebCore::StorageAreaImpl::length):
1848         Remove unneeded code.
1849
1850 2013-05-17  Commit Queue  <commit-queue@webkit.org>
1851
1852         Unreviewed, rolling out r150294.
1853         http://trac.webkit.org/changeset/150294
1854         https://bugs.webkit.org/show_bug.cgi?id=116369
1855
1856         Caused 31 tests to fail (Requested by rniwa on #webkit).
1857
1858         * WebCore.exp.in:
1859         * rendering/InlineFlowBox.h:
1860         * rendering/InlineTextBox.h:
1861         (InlineTextBox):
1862         * rendering/RenderApplet.h:
1863         * rendering/RenderBR.h:
1864         * rendering/RenderBlock.h:
1865         (RenderBlock):
1866         (WebCore::RenderBlock::virtualContinuation):
1867         * rendering/RenderBox.h:
1868         (WebCore::RenderBox::borderBoundingBox):
1869         (RenderBox):
1870         (WebCore::RenderBox::marginLogicalLeft):
1871         (WebCore::RenderBox::marginLogicalRight):
1872         * rendering/RenderBoxModelObject.h:
1873         (WebCore::RenderBoxModelObject::isBoxModelObject):
1874         * rendering/RenderButton.h:
1875         * rendering/RenderCombineText.h:
1876         * rendering/RenderCounter.h:
1877         * rendering/RenderDeprecatedFlexibleBox.h:
1878         * rendering/RenderDetailsMarker.h:
1879         * rendering/RenderEmbeddedObject.h:
1880         (RenderEmbeddedObject):
1881         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
1882         (WebCore::RenderEmbeddedObject::virtualChildren):
1883         * rendering/RenderFieldset.h:
1884         * rendering/RenderFileUploadControl.h:
1885         * rendering/RenderFlexibleBox.h:
1886         * rendering/RenderFlowThread.h:
1887         * rendering/RenderFrame.h:
1888         * rendering/RenderFrameSet.h:
1889         * rendering/RenderFullScreen.cpp:
1890         * rendering/RenderFullScreen.h:
1891         * rendering/RenderGrid.h:
1892         * rendering/RenderHTMLCanvas.h:
1893         * rendering/RenderIFrame.h:
1894         * rendering/RenderImage.h:
1895         (RenderImage):
1896         (WebCore::RenderImage::isRenderImage):
1897         * rendering/RenderInline.h:
1898         (RenderInline):
1899         (WebCore::RenderInline::virtualContinuation):
1900         (WebCore::RenderInline::virtualChildren):
1901         (WebCore::RenderInline::isRenderInline):
1902         (WebCore::RenderInline::layout):
1903         (WebCore::RenderInline::requiresLayer):
1904         (WebCore::RenderInline::offsetWidth):
1905         (WebCore::RenderInline::offsetHeight):
1906         (WebCore::RenderInline::borderBoundingBox):
1907         (WebCore::RenderInline::dirtyLinesFromChangedChild):
1908         * rendering/RenderLayerModelObject.h:
1909         * rendering/RenderListBox.h:
1910         * rendering/RenderListItem.h:
1911         * rendering/RenderListMarker.h:
1912         * rendering/RenderMedia.h:
1913         (WebCore::RenderMedia::virtualChildren):
1914         (WebCore::RenderMedia::canHaveChildren):
1915         (WebCore::RenderMedia::isMedia):
1916         (WebCore::RenderMedia::isImage):
1917         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
1918         * rendering/RenderMediaControlElements.h:
1919         * rendering/RenderMenuList.h:
1920         * rendering/RenderMeter.h:
1921         * rendering/RenderMultiColumnBlock.h:
1922         * rendering/RenderMultiColumnFlowThread.h:
1923         * rendering/RenderMultiColumnSet.h:
1924         * rendering/RenderNamedFlowThread.h:
1925         * rendering/RenderPart.h:
1926         (RenderPart):
1927         (WebCore::RenderPart::isRenderPart):
1928         (WebCore::RenderPart::renderName):
1929         * rendering/RenderProgress.h:
1930         * rendering/RenderRegion.h:
1931         (WebCore::RenderRegion::isRenderRegion):
1932         * rendering/RenderRegionSet.h:
1933         * rendering/RenderReplaced.h:
1934         (RenderReplaced):
1935         (WebCore::RenderReplaced::renderName):
1936         * rendering/RenderReplica.h:
1937         * rendering/RenderRuby.h:
1938         * rendering/RenderRubyBase.h:
1939         * rendering/RenderRubyRun.h:
1940         * rendering/RenderRubyText.h:
1941         * rendering/RenderScrollbarPart.h:
1942         * rendering/RenderSearchField.h:
1943         * rendering/RenderSlider.h:
1944         * rendering/RenderSnapshottedPlugIn.h:
1945         (RenderSnapshottedPlugIn):
1946         * rendering/RenderTable.h:
1947         (RenderTable):
1948         (WebCore::RenderTable::renderName):
1949         (WebCore::RenderTable::isTable):
1950         (WebCore::RenderTable::avoidsFloats):
1951         * rendering/RenderTableCaption.h:
1952         * rendering/RenderTableCell.h:
1953         * rendering/RenderTableCol.h:
1954         * rendering/RenderTableRow.h:
1955         * rendering/RenderTableSection.h:
1956         * rendering/RenderText.h:
1957         (RenderText):
1958         (WebCore::RenderText::marginLeft):
1959         (WebCore::RenderText::marginRight):
1960         (WebCore::RenderText::styleWillChange):
1961         (WebCore::RenderText::length):
1962         (WebCore::RenderText::paint):
1963         (WebCore::RenderText::layout):
1964         * rendering/RenderTextControl.h:
1965         (RenderTextControl):
1966         (WebCore::RenderTextControl::renderName):
1967         (WebCore::RenderTextControl::isTextControl):
1968         (WebCore::RenderTextControl::avoidsFloats):
1969         * rendering/RenderTextControlMultiLine.h:
1970         * rendering/RenderTextControlSingleLine.h:
1971         (RenderTextControlSingleLine):
1972         (WebCore::RenderTextControlSingleLine::isTextField):
1973         * rendering/RenderTextFragment.h:
1974         * rendering/RenderTextTrackCue.h:
1975         * rendering/RenderVideo.h:
1976         * rendering/RenderView.h:
1977         * rendering/RenderWidget.h:
1978         (RenderWidget):
1979         (WebCore::RenderWidget::isWidget):
1980         * rendering/RenderWordBreak.h:
1981         * rendering/RootInlineBox.h:
1982         (RootInlineBox):
1983         * rendering/mathml/RenderMathMLBlock.h:
1984         * rendering/svg/RenderSVGBlock.h:
1985         (RenderSVGBlock):
1986         * rendering/svg/RenderSVGContainer.h:
1987         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
1988         (WebCore::RenderSVGContainer::virtualChildren):
1989         (WebCore::RenderSVGContainer::isSVGContainer):
1990         (WebCore::RenderSVGContainer::renderName):
1991         (RenderSVGContainer):
1992         (WebCore::RenderSVGContainer::objectBoundingBox):
1993         (WebCore::RenderSVGContainer::strokeBoundingBox):
1994         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
1995         * rendering/svg/RenderSVGEllipse.h:
1996         * rendering/svg/RenderSVGForeignObject.h:
1997         * rendering/svg/RenderSVGGradientStop.h:
1998         * rendering/svg/RenderSVGHiddenContainer.h:
1999         (WebCore::RenderSVGHiddenContainer::renderName):
2000         (RenderSVGHiddenContainer):
2001         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
2002         * rendering/svg/RenderSVGImage.h:
2003         * rendering/svg/RenderSVGInline.h:
2004         (WebCore::RenderSVGInline::renderName):
2005         (WebCore::RenderSVGInline::requiresLayer):
2006         (WebCore::RenderSVGInline::isSVGInline):
2007         (RenderSVGInline):
2008         * rendering/svg/RenderSVGInlineText.h:
2009         * rendering/svg/RenderSVGModelObject.h:
2010         (WebCore::RenderSVGModelObject::requiresLayer):
2011         (RenderSVGModelObject):
2012         * rendering/svg/RenderSVGPath.h:
2013         * rendering/svg/RenderSVGRect.h:
2014         * rendering/svg/RenderSVGResourceClipper.h:
2015         * rendering/svg/RenderSVGResourceContainer.h:
2016         (RenderSVGResourceContainer):
2017         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
2018         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
2019         * rendering/svg/RenderSVGResourceFilter.h:
2020         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2021         * rendering/svg/RenderSVGResourceGradient.h:
2022         (RenderSVGResourceGradient):
2023         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
2024         * rendering/svg/RenderSVGResourceLinearGradient.h:
2025         * rendering/svg/RenderSVGResourceMarker.h:
2026         * rendering/svg/RenderSVGResourceMasker.h:
2027         * rendering/svg/RenderSVGResourcePattern.h:
2028         * rendering/svg/RenderSVGResourceRadialGradient.h:
2029         * rendering/svg/RenderSVGRoot.h:
2030         * rendering/svg/RenderSVGShape.h:
2031         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
2032         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
2033         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
2034         (WebCore::RenderSVGShape::localToParentTransform):
2035         (WebCore::RenderSVGShape::localTransform):
2036         (WebCore::RenderSVGShape::isSVGShape):
2037         (RenderSVGShape):
2038         (WebCore::RenderSVGShape::objectBoundingBox):
2039         (WebCore::RenderSVGShape::strokeBoundingBox):
2040         * rendering/svg/RenderSVGTSpan.h:
2041         * rendering/svg/RenderSVGText.h:
2042         * rendering/svg/RenderSVGTextPath.h:
2043         * rendering/svg/RenderSVGTransformableContainer.h:
2044         * rendering/svg/RenderSVGViewportContainer.h:
2045
2046 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2047
2048         Get rid of Custom code for Audio global constructor
2049         https://bugs.webkit.org/show_bug.cgi?id=116343
2050
2051         Reviewed by Geoffrey Garen.
2052
2053         Remove custom code for Audio global constructor. It is no longer needed
2054         now that the the bindings generator no longer require custom code for
2055         named constructors and now that [EnabledAtRuntime] extended attribute is
2056         supported for global constructors.
2057
2058         HTMLAudioElement global constructors are now automatically generated.
2059
2060         No new tests, no behavior change for layout tests.
2061
2062         * bindings/js/JSDOMWindowCustom.cpp:
2063         * html/HTMLAudioElement.idl:
2064         * page/DOMWindow.idl:
2065
2066 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2067
2068         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
2069         https://bugs.webkit.org/show_bug.cgi?id=116359
2070
2071         Reviewed by Anders Carlsson.
2072
2073         This feature was already RuntimeEnabled. Call through layers to get the answer from
2074         a platform strategy.
2075
2076         * workers/DefaultSharedWorkerRepository.cpp:
2077         (WebCore::DefaultSharedWorkerRepository::isAvailable):
2078         * workers/DefaultSharedWorkerRepository.h:
2079         * workers/SharedWorkerRepository.cpp:
2080         (WebCore::SharedWorkerRepository::isAvailable):
2081         * workers/SharedWorkerStrategy.h:
2082         (WebCore::SharedWorkerStrategy::isAvailable):
2083
2084 2013-05-17  Anders Carlsson  <andersca@apple.com>
2085
2086         Move Storage member functions out of line
2087         https://bugs.webkit.org/show_bug.cgi?id=116364
2088
2089         Reviewed by Andreas Kling.
2090
2091         This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
2092         Also remove unnecessary null checks and make m_storageArea const.
2093
2094         * storage/Storage.cpp:
2095         (WebCore::Storage::length):
2096         (WebCore::Storage::key):
2097         (WebCore::Storage::getItem):
2098         (WebCore::Storage::setItem):
2099         (WebCore::Storage::removeItem):
2100         (WebCore::Storage::clear):
2101         (WebCore::Storage::contains):
2102         * storage/Storage.h:
2103         (WebCore::Storage::area):
2104
2105 2013-05-17  Beth Dakin  <bdakin@apple.com>
2106
2107         Headers and footers will sometimes disappear and re-appear during page loads
2108         https://bugs.webkit.org/show_bug.cgi?id=116336
2109         -and corresponding-
2110         <rdar://problem/13886753>
2111
2112         Reviewed by Simon Fraser.
2113
2114         This patch changes the WebCore-level API that WebKit uses to create a banner. 
2115         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
2116         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
2117         layer has been created, it will call back into WK2 via ChromeClient. This will 
2118         allow WebCore to re-create the header/footer layers as needed whenever the 
2119         FrameView/RenderLayerCompositor have been destroyed and recreated.
2120
2121         Remove references to old FrameView functions. Add references to new Page 
2122         functions.
2123         * WebCore.exp.in:
2124
2125         New ChromeClient functions will pass the new layers up to WK2.
2126         * page/ChromeClient.h:
2127         (WebCore::ChromeClient::didAddHeaderLayer):
2128         (WebCore::ChromeClient::didAddFooterLayer):
2129         (ChromeClient):
2130
2131         Remove setWantsLayerForHeader/Footer.
2132         * page/FrameView.cpp:
2133         * page/FrameView.h:
2134         (FrameView):
2135
2136         Page now caches the header and footer height. When the FrameView/RLC have been 
2137         destroyed, and the cached layer/height information on those classes has been lost, 
2138         this data on Page will persist so that we can build the layers back up.
2139         * page/Page.cpp:
2140         (WebCore::Page::Page):
2141         (WebCore::Page::addHeaderWithHeight):
2142         (WebCore::Page::addFooterWithHeight):
2143         * page/Page.h:
2144         (WebCore::Page::headerHeight):
2145         (WebCore::Page::footerHeight):
2146
2147         As soon as the root gets a backing, recreate the header and footer layers if 
2148         needed.
2149         * rendering/RenderLayerCompositor.cpp:
2150         (WebCore::RenderLayerCompositor::updateBacking):
2151
2152         Call into ChromeClient.
2153         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2154         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2155
2156 2013-05-18  Claudio Saavedra  <csaavedra@igalia.com>
2157
2158         [CSS] Minor cleanups in CSS variables handling
2159         https://bugs.webkit.org/show_bug.cgi?id=116318
2160
2161         Reviewed by Ryosuke Niwa.
2162
2163         No new tests, only a cleanup.
2164
2165         * css/CSSParser.cpp:
2166         (WebCore::CSSParserString::substring): Optimize.
2167         (WebCore::CSSParser::createPrimitiveVariableNameValue):
2168         Remove intermediate variable.
2169
2170 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2171
2172         [Mac] Add DOMWindowConstructors.idl to Xcode project file
2173         https://bugs.webkit.org/show_bug.cgi?id=116351
2174
2175         Reviewed by Anders Carlsson.
2176
2177         * WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
2178         in searches.
2179
2180 2013-05-17  Ryosuke Niwa  <rniwa@webkit.org>
2181
2182         Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
2183
2184         * dom/Element.h:
2185         (Element):
2186
2187 2013-05-17  Anders Carlsson  <andersca@apple.com>
2188
2189         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
2190         https://bugs.webkit.org/show_bug.cgi?id=116346
2191         <rdar://problem/13852829>
2192
2193         Reviewed by Andreas Kling.
2194
2195         Export the UTF8Encoding symbol.
2196
2197         * WebCore.exp.in:
2198
2199 2013-05-17  Andreas Kling  <akling@apple.com>
2200
2201         Apply FINAL to the RenderObject hierarchy.
2202         <http://webkit.org/b/115977>
2203
2204         Mostly from Blink r148795 by <cevans@chromium.org>
2205         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
2206
2207         Re-landing without devirtualization tweaks.
2208
2209         * rendering/: Beat things with the FINAL stick.
2210         * WebCore.exp.in: Export a now-needed symbol.
2211
2212 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2213
2214         Build fix.
2215
2216         * loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
2217         Frame:editor() now returns a reference.
2218
2219 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2220
2221         Get rid of [ConstructorParameters] extended attributes
2222         https://bugs.webkit.org/show_bug.cgi?id=116308
2223
2224         Reviewed by Kentaro Hara.
2225
2226         Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
2227         [CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
2228         arguments and the constructor object's "length" property is now automatically
2229         computed for custom constructors as well.
2230
2231         This is less error-prone as the value is not hardcoded, more consistent with
2232         [Constructor] extended attribute and gives more information about the custom constructor
2233         in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
2234         nice.
2235
2236         No new tests, already covered by fast/js/constructor-length.html.
2237
2238         * Modules/mediastream/MediaStream.idl:
2239         * Modules/webaudio/AudioContext.idl:
2240         * Modules/websockets/WebSocket.idl:
2241         * bindings/scripts/CodeGeneratorJS.pm:
2242         (GenerateConstructorHelperMethods):
2243         * bindings/scripts/IDLAttributes.txt:
2244         * bindings/scripts/IDLParser.pm:
2245         (applyTypedefs):
2246         (parseAttributeRest):
2247         (copyExtendedAttributes):
2248         (parseExtendedAttributeRest):
2249         (applyExtendedAttributeList):
2250         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2251         (WebCore::JSFloat64ArrayConstructor::finishCreation):
2252         * bindings/scripts/test/TestTypedArray.idl:
2253         * dom/MutationObserver.idl:
2254         * fileapi/Blob.idl:
2255         * html/DOMFormData.idl:
2256         * html/canvas/ArrayBuffer.idl:
2257         * html/canvas/DataView.idl:
2258         * page/WebKitPoint.idl:
2259         * workers/SharedWorker.idl:
2260         * workers/Worker.idl:
2261
2262 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
2263
2264         Text input is largely broken when there are subframes loading
2265         http://bugs.webkit.org/show_bug.cgi?id=59121
2266         <rdar://problem/9320468>
2267
2268         Reviewed by Darin Adler.
2269
2270         This addresses text input being abandoned when another frame in a page is navigated.
2271
2272         There are still many opportunities for improvement:
2273         - Track other cases where WebCore interferes may want to cancel input without
2274         direct user action (e.g. deleting the whole editable element on a timer).
2275         - Fix how dictionary panel and autocorrection are dismissed (they still have the
2276         same issue, and get dismissed with any frame navigation).
2277
2278         Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
2279
2280         * loader/FrameLoader.h:
2281         * loader/FrameLoader.cpp:
2282         (WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
2283         do not keep an inline session in a frame that's no longer active, as WebKit2 no
2284         longer takes care of this case (and more of the logic should be in WebCore anyway).
2285         (WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
2286         before transitioning to committed state starts. We may want to move more code here
2287         eventually, e.g. from Frame::setView.
2288
2289 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2290
2291         Get rid of [CustomGetter] for global named constructors
2292         https://bugs.webkit.org/show_bug.cgi?id=116116
2293
2294         Reviewed by Geoffrey Garen.
2295
2296         Improve the JSC bindings generator so that global named constructors no longer
2297         require a [CustomGetter] IDL extended attribute. As a consequence, attributes
2298         on the global window object can now be automatically generated for interfaces
2299         that have a [NamedConstructor], namely HTMLOptionElement.
2300
2301         The HTMLAudioElement global constructors are still manually defined because it
2302         requires custom code at the moment to check if the media player is available.
2303
2304         No new tests, no behavior change.
2305
2306         * bindings/js/JSDOMWindowCustom.cpp:
2307         * bindings/scripts/CodeGeneratorJS.pm:
2308         * bindings/scripts/preprocess-idls.pl:
2309         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2310         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2311         * html/HTMLOptionElement.idl:
2312         * page/DOMWindow.idl:
2313
2314 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
2315
2316         Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
2317         https://bugs.webkit.org/show_bug.cgi?id=116292
2318
2319         Add a newline after the expression so a single line comment doesn't
2320         erroneously comment out the closing brace of the with block.
2321
2322         Reviewed by Timothy Hatcher.
2323
2324         Test: inspector/console/console-eval-comment.html
2325
2326         * inspector/InjectedScriptSource.js:
2327
2328 2013-05-17  David Hyatt  <hyatt@apple.com>
2329
2330         fast/flexbox/auto-height-with-flex.html failing only on release builds.
2331         https://bugs.webkit.org/show_bug.cgi?id=116240
2332
2333         Reviewed by Darin Adler.
2334
2335         Fix the mainAxisContentExtent method so no overflow occurs, since it
2336         doesn't work right on release builds.
2337
2338         * rendering/RenderFlexibleBox.cpp:
2339         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
2340
2341 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2342
2343         Add [EnabledAtRuntime] extended attribute support for global constructors
2344         https://bugs.webkit.org/show_bug.cgi?id=116147
2345
2346         Reviewed by Geoffrey Garen.
2347
2348         Add [EnabledAtRuntime] extended attribute support for global constructors.
2349         This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
2350         WebSocket IDL interfaces so that their global constructors on the global
2351         Window object can now be automatically generated.
2352
2353         The behavior on JavaScript side is unchanged. We simply leverage
2354         RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
2355         attribute to generate the code for global constructors getters instead
2356         of using custom code.
2357
2358         No new tests, no behavior change for layout tests.
2359
2360         * GNUmakefile.list.am:
2361         * Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
2362         * Modules/websockets/WebSocket.idl:
2363         * Target.pri:
2364         * UseJSC.cmake:
2365         * WebCore.vcproj/WebCore.vcproj:
2366         * WebCore.vcxproj/WebCore.vcxproj:
2367         * WebCore.vcxproj/WebCore.vcxproj.filters:
2368         * WebCore.xcodeproj/project.pbxproj:
2369         * bindings/js/JSBindingsAllInOne.cpp:
2370         * bindings/js/JSDOMWindowCustom.cpp:
2371         (WebCore):
2372         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
2373         * bindings/scripts/CodeGeneratorJS.pm:
2374         (ToMethodName):
2375         (GetRuntimeEnableFunctionName):
2376         (GenerateImplementation):
2377         * bindings/scripts/IDLAttributes.txt:
2378         * page/DOMWindow.idl:
2379         * workers/SharedWorker.idl:
2380
2381 2013-05-17  Darin Adler  <darin@apple.com>
2382
2383         [EFL] Move EFL port off legacy clipboard
2384         https://bugs.webkit.org/show_bug.cgi?id=116181
2385
2386         Reviewed by Anders Carlsson.
2387
2388         * dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
2389
2390         * page/efl/EventHandlerEfl.cpp:
2391         (WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
2392
2393         * platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
2394         (WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
2395         (WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
2396         (WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
2397         (WebCore::Clipboard::items): Ditto.
2398
2399         * platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
2400         has no code in it other than notImplemented lines! I didn't add a new one.
2401         (WebCore::Pasteboard::createForCopyAndPaste): Added.
2402         (WebCore::Pasteboard::createPrivate): Added.
2403         (WebCore::Pasteboard::createForDragAndDrop): Added.
2404         (WebCore::Pasteboard::hasData): Added.
2405         (WebCore::Pasteboard::readString): Added.
2406         (WebCore::Pasteboard::writeString): Added.
2407         (WebCore::Pasteboard::types): Added.
2408         (WebCore::Pasteboard::readFilenames): Added.
2409         (WebCore::Pasteboard::setDragImage): Added.
2410         (WebCore::Pasteboard::writePasteboard): Added.
2411
2412 2013-05-17  Frédéric Wang  <fred.wang@free.fr>
2413
2414         Bad spacing inside MathML formulas when text-indent is specified
2415         https://bugs.webkit.org/show_bug.cgi?id=106600
2416
2417         Reviewed by Martin Robinson.
2418
2419         When MathML is used in a HTML page that modifies the CSS text-indent,
2420         large gaps appear inside the mathematical expressions. Resetting it to
2421         0 on the math root (as Gecko does) fixes the issue.
2422
2423         Tests: mathml/presentation/text-indent.html
2424                mathml/presentation/text-indent-expected.html
2425
2426         * css/mathml.css:
2427         (math): reset text-indent to its default value.
2428
2429 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
2430
2431         Fix code that expects Page::chrome() to return a pointer
2432         https://bugs.webkit.org/show_bug.cgi?id=116313
2433
2434         Reviewed by Darin Adler.
2435
2436         Page::chrome() returns a reference after r150214.
2437
2438         * platform/network/blackberry/NetworkManager.cpp:
2439         (WebCore::NetworkManager::startJob):
2440         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
2441         (WebCore::SocketStreamHandle::SocketStreamHandle):
2442         * testing/Internals.cpp:
2443         (WebCore::Internals::resetToConsistentState):
2444         (WebCore::Internals::setEnableMockPagePopup):
2445
2446 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
2447
2448         [BlackBerry] ImageBlackBerry: add missing BlendMode parameter
2449         https://bugs.webkit.org/show_bug.cgi?id=116316
2450
2451         Reviewed by Carlos Garcia Campos.
2452
2453         When the new BitmapImage::draw() method was added in r147110 it
2454         didn't include the BlendMode parameter, which has been there since
2455         r137011.
2456
2457         * platform/graphics/blackberry/ImageBlackBerry.cpp:
2458         (WebCore::BitmapImage::draw):
2459
2460 2013-05-16  Jer Noble  <jer.noble@apple.com>
2461
2462         Some media/track tests fail or assert on Mac
2463         https://bugs.webkit.org/show_bug.cgi?id=97132
2464
2465         Reviewed by Simon Fraser.
2466
2467         Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
2468         values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
2469         Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
2470         layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
2471         to the box exclusively.
2472
2473         Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
2474         element(), which previously returned a PassRefPtr<> instead of a plain pointer.
2475
2476         * css/mediaControls.css:
2477         (video::-webkit-media-text-track-container): Move the font size to the display selector.
2478         (video::cue): Remove the display:inline and padding:2px declarations.
2479         (video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
2480         * html/track/TextTrackCue.cpp:
2481         (WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
2482         (WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
2483         (WebCore::TextTrackCue::getDisplayTree): Ditto.
2484         (WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
2485         * html/track/TextTrackCue.h:
2486         (WebCore::TextTrackCue::element): Return a plain pointer.
2487         * html/track/TextTrackCueGeneric.cpp:
2488         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
2489         * page/CaptionUserPreferencesMac.mm:
2490         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
2491         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
2492
2493 2013-05-16  Andreas Kling  <akling@apple.com>
2494
2495         Changes in text-only properties shouldn't cause repaints unless there is actually text.
2496         <http://webkit.org/b/116250>
2497
2498         Reviewed by Antti Koivisto.
2499
2500         Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
2501         This result means that the renderer only needs to repaint if one of its immediate children contains text.
2502
2503         This lets us avoid repainting the same pixels when hovering over constructs like:
2504
2505             <style>
2506                 a { text-decoration: none; }
2507                 a:hover { text-decoration: underline; }
2508             </style>
2509             <a href="http://is.gd/andersca">
2510                 <img src="cool-hat.jpg">
2511             </a>
2512
2513         Since the change in text-decoration has no effect on the rendering of the <img> element,
2514         we'll now be smart enough to avoid repainting it.
2515
2516         * rendering/style/RenderStyleConstants.h:
2517         * rendering/style/RenderStyle.cpp:
2518         (WebCore::RenderStyle::diff):
2519
2520             Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
2521             in case a difference is found, giving precedence to StyleDifferenceRepaint.
2522
2523         * rendering/RenderObject.h:
2524         * rendering/RenderObject.cpp:
2525         (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
2526
2527             Helper to check if a RenderObject has at least one RenderText child containing more than just
2528             collapsible whitespace.
2529
2530         (WebCore::RenderObject::shouldRepaintForStyleDifference):
2531
2532             Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
2533             has an immediate text child.
2534
2535         (WebCore::RenderObject::styleWillChange):
2536         (WebCore::RenderObject::setStyle):
2537
2538             Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
2539
2540         * rendering/RenderBox.cpp:
2541         (WebCore::RenderBox::styleDidChange):
2542         * rendering/svg/SVGResourcesCache.cpp:
2543         (WebCore::SVGResourcesCache::clientStyleChanged):
2544
2545             Tweak for new StyleDifference enum value.
2546
2547         * rendering/RenderText.h:
2548         * rendering/RenderText.cpp:
2549         (WebCore::RenderText::isAllCollapsibleWhitespace):
2550
2551             Made this const.
2552
2553 2013-05-17  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2554
2555         Improve -webkit-text-underline-position memory usage.
2556         https://bugs.webkit.org/show_bug.cgi?id=116108
2557
2558         Reviewed by Benjamin Poulain.
2559
2560         Remove m_maxLogicalTop private variable from RootInlineBox to reduce
2561         the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
2562         instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
2563         the maxLogicalTop value everytime it is called. In a typical page
2564         computeMaxLogicalTop is called less than 10 times for each
2565         InlineTextBox that uses -webkit-text-underline-position. That is a small
2566         price users of -webkit-text-underline-position will pay so that
2567         everybody can benefit from the memory reduction in RootInlineBox.
2568
2569         No new tests, no change in behavior.
2570
2571         * rendering/InlineFlowBox.cpp:
2572         (WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
2573         * rendering/InlineFlowBox.h:
2574         * rendering/RootInlineBox.cpp:
2575         (WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
2576         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
2577         computeMaxLogicalTop call and obsolete comment.
2578         (WebCore):
2579         (WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
2580         returning its value.
2581         * rendering/RootInlineBox.h:
2582         (RootInlineBox):
2583
2584 2013-05-17  Alexis Menard  <alexis@webkit.org>
2585
2586         Make sure to call release() on our smart pointers when we should.
2587         https://bugs.webkit.org/show_bug.cgi?id=116307
2588
2589         Reviewed by Andreas Kling.
2590
2591         Call release() when we should call it. There is probably more occurence
2592         of this problem on the codebase but this is a first bunch of fixes.
2593
2594         No new tests : existing ones should cover.
2595
2596         * css/CSSComputedStyleDeclaration.cpp:
2597         (WebCore::valueForNinePieceImage):
2598         (WebCore::getBorderRadiusShorthandValue):
2599         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2600         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2601         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2602         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
2603         * css/CSSParser.cpp:
2604         (WebCore::CSSParser::parseBorderImage):
2605         * html/HTMLBodyElement.cpp:
2606         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
2607
2608 2013-05-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2609
2610         Make PNGImageDecoder::rowAvailable auto-vectorizable
2611         https://bugs.webkit.org/show_bug.cgi?id=116151
2612
2613         Reviewed by Benjamin Poulain.
2614
2615         Changed the main loops under PNGImageDecoder::rowAvailable so that they
2616         avoid branches and non-sequential table look ups.
2617
2618         Together with automatic vectorization by the compiler this provides around
2619         4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
2620         PNG decoding in general.
2621
2622         * platform/graphics/Color.cpp:
2623         (WebCore::premultipliedARGBFromColor):
2624         * platform/graphics/Color.h:
2625         (WebCore::fastDivideBy255):
2626         * platform/graphics/filters/FEBlend.cpp:
2627         * platform/image-decoders/png/PNGImageDecoder.cpp:
2628         (WebCore::setPixelRGB):
2629         (WebCore::setPixelRGBA):
2630         (WebCore::setPixelRGBA_Premultiplied):
2631         (WebCore::PNGImageDecoder::rowAvailable):
2632
2633 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
2634
2635         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
2636         https://bugs.webkit.org/show_bug.cgi?id=116290
2637
2638         Follow an update to the spec and support the new and old syntax.
2639
2640         Reviewed by Timothy Hatcher.
2641
2642         * inspector/ContentSearchUtils.cpp:
2643         (WebCore::ContentSearchUtils::scriptCommentPattern):
2644         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
2645         * inspector/front-end/SASSSourceMapping.js:
2646         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2647
2648 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2649
2650         Remove custom code for MessageEvent.ports getter
2651         https://bugs.webkit.org/show_bug.cgi?id=116304
2652
2653         Reviewed by Kentaro Hara.
2654
2655         Remove Custom code for the "ports" attribute getter in MessageEvent
2656         IDL interface. The JSC bindings generator already supports attributes
2657         of type MessagePortArray.
2658
2659         No new tests, already covered by existing layout tests and bindings
2660         tests.
2661
2662         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
2663         * bindings/scripts/CodeGeneratorJS.pm:
2664         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
2665         returns NULL and avoid crashing in this case.
2666         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
2667         to bindings generator tweak.
2668         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
2669         and switch to MessagePortArray type.
2670
2671 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2672
2673         Add stubs for ContextMenu and ContextMenuItem
2674         https://bugs.webkit.org/show_bug.cgi?id=116235
2675
2676         Reviewed by Antonio Gomes.
2677
2678         No new tests needed, only a refactor.
2679
2680         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
2681         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
2682         need to replicate these stubs.
2683
2684         * PlatformEfl.cmake:
2685         * Target.pri:
2686         * platform/ContextMenuNone.cpp: Added.
2687         (WebCore):
2688         (WebCore::ContextMenu::ContextMenu):
2689         (WebCore::ContextMenu::getContextMenuItems):
2690         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2691         (WebCore::ContextMenu::platformContextMenu):
2692         * platform/ContextMenuItemNone.cpp: Added.
2693         (WebCore):
2694         (WebCore::ContextMenuItem::platformContextMenuItem):
2695         * platform/efl/ContextMenuEfl.cpp: Removed.
2696         * platform/efl/ContextMenuItemEfl.cpp: Removed.
2697         * platform/qt/ContextMenuQt.cpp: Removed.
2698         * platform/qt/ContextMenuItemQt.cpp: Removed.
2699
2700 2013-05-16  Alexis Menard  <alexis@webkit.org>
2701
2702         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
2703         https://bugs.webkit.org/show_bug.cgi?id=115656
2704
2705         Reviewed by Darin Adler.
2706
2707         If we create a prefixed event to dispatch it (in the case we have only
2708         prefixed event listeners in client's code) then we need to make sure to
2709         keep it in sync with the original unprefixed event after it has been
2710         dispatched. While being dispatched the event can be modified by
2711         client's code and when propagated back to outer elements, attributes were
2712         not updated. This patch changes the old design of creating a separate event
2713         for the prefixed case and now change the type of the event (so the name) before
2714         dispatching it, keeping the attributes if changed and then rename it
2715         back to unprefixed when the dispatching is finished.
2716
2717         Tests: transitions/transition-end-event-prefixed-01.html
2718                transitions/transition-end-event-prefixed-02.html
2719                transitions/transition-end-event-prefixed-03.html
2720
2721         * dom/Event.h:
2722         (WebCore::Event::setType):
2723         * dom/EventTarget.cpp:
2724         (WebCore::EventTarget::fireEventListeners):
2725
2726 2013-05-16  Mike Fenton  <mifenton@rim.com>
2727
2728         [BlackBerry] Strip invoke URLs when writing to the clipboard.
2729         https://bugs.webkit.org/show_bug.cgi?id=116226
2730
2731         Reviewed by Rob Buis.
2732
2733         PR 333516.
2734
2735         Invoke URLs should not be included in the paste data.
2736
2737         Internally Reviewed by Gen Mak.
2738
2739         * platform/blackberry/PasteboardBlackBerry.cpp:
2740         (WebCore::Pasteboard::writeSelection):
2741
2742 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
2743
2744         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
2745         https://bugs.webkit.org/show_bug.cgi?id=116230
2746
2747         Reviewed by Chris Fleizach.
2748
2749         No new functionality, no new tests.
2750
2751         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2752         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
2753         unused parameter for all platforms except GTK.
2754
2755 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
2756
2757         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
2758         https://bugs.webkit.org/show_bug.cgi?id=115884
2759         
2760         Reviewed by Antonio Gomes.
2761
2762         Frame flattening should be applied when the frame owner is frame or iframe. But when
2763         the frame owner is object element, frame flattening prevents it from having scrollbars.
2764         In this situation, we can't scroll the html document in object element.
2765
2766         This patch adds two helper functions to verify flattening conditions.
2767         
2768         Test: fast/frames/flattening/scrolling-in-object.html
2769
2770         * page/FrameView.cpp:
2771         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
2772         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
2773         (WebCore::FrameView::avoidScrollbarCreation):
2774         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
2775         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
2776         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
2777
2778 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
2779
2780         Port functions for pathhandling to Windows CE in FileSystemWin
2781         https://bugs.webkit.org/show_bug.cgi?id=116208
2782
2783         Reviewed by Darin Adler.
2784
2785         This will allow us to remove FileSystemWinCE in a next step.
2786
2787         * platform/win/FileSystemWin.cpp:
2788         (WebCore::pathByAppendingComponent):
2789         (WebCore::pathGetFileName):
2790
2791 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2792
2793         PDFPlugins don't load when plugins are disabled, but they should
2794         https://bugs.webkit.org/show_bug.cgi?id=75790
2795         <rdar://problem/11650197>
2796
2797         Reviewed by Anders Carlsson.
2798
2799         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
2800         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
2801         functionality which happens to use the plug-in infrastructure, and which also doesn't
2802         unexpectedly disappear for users with plug-ins off.
2803
2804         * WebCore.exp.in:
2805         Export SubframeLoader::allowPlugins().
2806         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
2807
2808         * dom/DOMImplementation.cpp:
2809         (WebCore::DOMImplementation::createDocument):
2810         Load PluginData even if plug-ins are disabled, but if that is the case, only
2811         create a PluginDocument for application plug-ins.
2812
2813         * html/PluginDocument.cpp:
2814         (WebCore::PluginDocumentParser::appendBytes):
2815         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
2816         for an application plug-in.
2817
2818         * page/Page.cpp:
2819         (WebCore::Page::pluginData):
2820         Allow PluginData to be constructed even if plug-ins are disabled, as there might
2821         be application plug-ins that we want to load anyway.
2822
2823         * platform/mac/MIMETypeRegistryMac.mm:
2824         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
2825         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
2826
2827         * plugins/PluginData.cpp:
2828         (WebCore::PluginData::supportsMimeType):
2829         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
2830         whether they are looking for any plug-in, or are looking only for application plug-ins.
2831
2832         * plugins/PluginData.h:
2833         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
2834         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
2835
2836 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2837
2838         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
2839         https://bugs.webkit.org/show_bug.cgi?id=114944
2840
2841         Reviewed by Rob Buis.
2842
2843         It crashes in network platform code when trying to save an
2844         invalid URL in the disk cache. That test contains references to
2845         empty URLs like http://. Those empty URLs, are parsed as http:/ by
2846         KURL and considered valid. BlackBerry network platform uses GURL
2847         which considers those URLs invalid. We needed to check that the
2848         URLs are valid for our platform before starting the network
2849         operation.
2850
2851         Fixes a crash running test
2852         editing/execCommand/indent-paragraphs.html.
2853
2854         * platform/network/blackberry/NetworkManager.cpp:
2855         (WebCore::NetworkManager::startJob): Check if the request URL is
2856         valid from the platform point of view right after creating the
2857         platform network request and return early if the URL is invalid
2858         with StatusErrorInvalidUrl error.
2859
2860 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
2861
2862         Remove unused function safeCreateFile() from WebCore
2863         https://bugs.webkit.org/show_bug.cgi?id=116211
2864
2865         Reviewed by Anders Carlsson.
2866
2867         * platform/FileSystem.h:
2868         * platform/win/FileSystemWin.cpp:
2869
2870 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
2871
2872         [curl] MIME type should be in lowercase
2873         https://bugs.webkit.org/show_bug.cgi?id=116218
2874
2875         Reviewed by Benjamin Poulain.
2876
2877         Existing testcase: http/tests/mime/uppercase-mime-type.html
2878
2879         * platform/network/curl/ResourceHandleManager.cpp:
2880         (WebCore::headerCallback): Convert the MIME type to lowercase.
2881
2882 2013-05-16  Seokju Kwon  <seokju.kwon@gmail.com>
2883
2884         Web Inspector: Fix optional value of promptText in Inspector.json
2885         https://bugs.webkit.org/show_bug.cgi?id=116203
2886
2887         Reviewed by Joseph Pecoraro.
2888
2889         Merge from https://chromiumcodereview.appspot.com/14672031.
2890
2891         No new tests needed.
2892
2893         * inspector/Inspector.json:
2894
2895 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
2896
2897         [BlackBerry] Unable to download blob resource
2898         https://bugs.webkit.org/show_bug.cgi?id=115888
2899
2900         Reviewed by Benjamin Poulain.
2901
2902         Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
2903         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
2904
2905         * PlatformBlackBerry.cmake:
2906         * platform/network/blackberry/BlobStream.cpp: Added.
2907         (WebCore):
2908         (WebCore::BlobStream::BlobStream):
2909         (WebCore::BlobStream::~BlobStream):
2910         (WebCore::BlobStream::didReceiveData):
2911         (WebCore::BlobStream::didFinishLoading):
2912         (WebCore::BlobStream::didFail):
2913         (WebCore::BlobStream::url):
2914         (WebCore::BlobStream::mimeType):
2915         * platform/network/blackberry/BlobStream.h: Added.
2916         (WebCore):
2917         (BlobStream):
2918
2919 2013-05-16  Anders Carlsson  <andersca@apple.com>
2920
2921         Remove SystemTime header and implementations
2922         https://bugs.webkit.org/show_bug.cgi?id=116200
2923
2924         Reviewed by Alexey Proskuryakov.
2925
2926         SystemTim just had a single function that's not called anymore. Remove it.
2927
2928         * GNUmakefile.list.am:
2929         * PlatformBlackBerry.cmake:
2930         * PlatformEfl.cmake:
2931         * PlatformWinCE.cmake:
2932         * Target.pri:
2933         * WebCore.vcproj/WebCore.vcproj:
2934         * WebCore.vcxproj/WebCore.vcxproj:
2935         * WebCore.vcxproj/WebCore.vcxproj.filters:
2936         * WebCore.xcodeproj/project.pbxproj:
2937         * history/PageCache.cpp:
2938         * platform/SystemTime.h: Removed.
2939         * platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
2940         * platform/efl/SystemTimeEfl.cpp: Removed.
2941         * platform/graphics/ca/GraphicsLayerCA.cpp:
2942         * platform/mac/SystemTimeMac.cpp: Removed.
2943         * platform/qt/TemporaryLinkStubsQt.cpp:
2944         * platform/win/SystemTimeWin.cpp: Removed.
2945
2946 2013-05-16  Glenn Adams  <glenn@skynav.com>
2947
2948         [Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
2949         https://bugs.webkit.org/show_bug.cgi?id=116196
2950
2951         Reviewed by Benjamin Poulain.
2952
2953         * inspector/InspectorConsoleAgent.cpp:
2954         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2955             - Remove questionable IE7 related error filtering
2956
2957 2013-05-16  Andreas Kling  <akling@apple.com>
2958
2959         Page::chrome() should return a reference.
2960         <http://webkit.org/b/116185>
2961
2962         Reviewed by Anders Carlsson.
2963
2964         A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
2965         Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
2966
2967 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
2968
2969         Content disappears when scrolling http://www.childrenscancer.org/zach/
2970         https://bugs.webkit.org/show_bug.cgi?id=116206
2971
2972         Reviewed by Darin Adler.
2973         
2974         When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
2975         we need to repaint the primary layer, since what paints into that primary
2976         layer will change.
2977         
2978         On the page in question, we gained/lost a foreground layer when scrolling because
2979         the page popped an element into position:fixed.
2980
2981         Test: compositing/repaint/foreground-layer-change.html
2982
2983         * rendering/RenderLayerBacking.cpp:
2984         (WebCore::RenderLayerBacking::updateForegroundLayer):
2985         (WebCore::RenderLayerBacking::updateBackgroundLayer):
2986
2987 2013-05-16  Andy Estes  <aestes@apple.com>
2988
2989         Do not indefinitely cache resources from blob URLs.
2990
2991         Reviewed by Alexey Proskuryakov.
2992
2993         Alexey pointed out after I landed r150169 that blob URLs backed by
2994         files should return an error if the file changed after the URL was
2995         created. By indefinitely caching them in memory, we don't give the
2996         loader a chance to check for modification. Remove "blob" from the list
2997         of schemes that should be indefinitely cached.
2998
2999         * platform/SchemeRegistry.cpp:
3000         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
3001
3002 2013-05-16  Claudio Saavedra  <csaavedra@igalia.com>
3003
3004         [CSS] CSS Variables are case-sensitive
3005         https://bugs.webkit.org/show_bug.cgi?id=116239
3006
3007         Reviewed by Ryosuke Niwa.
3008
3009         The CSS Variables specification states that variables are
3010         case-sensitive, unlike other CSS properties.
3011
3012         Test: fast/css/variables/case-sensitive.html
3013
3014         * css/CSSParser.cpp:
3015         (WebCore::CSSParserString::substring): Replace
3016         the now unnecessary lowerSubstring() with this method.
3017         Also, since the method is only used by the CSS variables
3018         implementation, #ifdef it.
3019         (WebCore::CSSParser::createPrimitiveVariableNameValue):
3020         (WebCore::CSSParser::storeVariableDeclaration):
3021         Do not normalize variable declarations to lowercase.
3022         * css/CSSParserValues.h:
3023         (CSSParserString): Replace the lowerSubstring() declaration
3024         and wrap with #if/#endif.
3025
3026 2013-05-16  Brady Eidson  <beidson@apple.com>
3027
3028         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
3029         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
3030
3031         Reviewed by Sam Weinig.
3032
3033         Give WebKit2 the ability to not mis-cast.
3034
3035         * loader/FrameLoaderClient.h:
3036         (WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
3037           to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
3038
3039         * loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
3040
3041 2013-05-14  Martin Robinson  <mrobinson@igalia.com>
3042
3043         [GTK] Add support for building WebCore to the cmake build
3044         https://bugs.webkit.org/show_bug.cgi?id=116128
3045
3046         Reviewed by Gustavo Noronha Silva.
3047
3048         * PlatformGTK.cmake: Added.
3049         * platform/gtk/GtkVersioning.c: Include "config.h" because we removed
3050         the autotoolsconfig.h include from the header.
3051         * platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
3052         non-autotools build systems.
3053
3054 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
3055
3056         DocumentOrderedMap doesn't need to have two HashMaps
3057         https://bugs.webkit.org/show_bug.cgi?id=116167
3058
3059         Reviewed by Geoffrey Garen.
3060
3061         Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
3062         of the first element and the number of duplicates for a given name. This patch simplifies this structure
3063         by having a single hash map that contains both the pointer and the number of duplicates.
3064
3065         In addition, this patch fixes a regression introduced in r149652 that window and document name maps
3066         were not updated for some elements inside a SVG use element, and makes use of the newly added list of
3067         the matching elements in SelectorQuery.
3068
3069         * dom/DocumentOrderedMap.cpp:
3070         (WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
3071         (WebCore::DocumentOrderedMap::add): Ditto.
3072         (WebCore::DocumentOrderedMap::remove): Ditto.
3073         (WebCore::DocumentOrderedMap::get): Ditto.
3074         (WebCore::DocumentOrderedMap::getAllElementsById): Added.
3075
3076         * dom/DocumentOrderedMap.h:
3077
3078         (WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
3079         (WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
3080         (WebCore::DocumentOrderedMap::contains): Ditto.
3081         (WebCore::DocumentOrderedMap::containsMultiple): Ditto.
3082
3083         * dom/Element.cpp:
3084         (WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
3085         if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
3086         of the tree scope into the document. We were exiting early per scope != treeScope().
3087
3088         Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
3089         The former is called when this element is inserted into a new tree scope, and the latter is called when
3090         this element is inserted into a HTML document even if it had already been inside some tree scope.
3091
3092         (WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
3093         the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
3094         current tree scope.
3095         (WebCore::Element::updateName):
3096         (WebCore::Element::updateNameForTreeScope): Renamed from updateName.
3097         (WebCore::Element::updateNameForDocument): Extracted from updateName.
3098         (WebCore::Element::updateId):
3099         (WebCore::Element::updateIdForTreeScope): Renamed from updateId.
3100         (WebCore::Element::updateIdForDocument): Extracted from updateId.
3101
3102         * dom/Element.h:
3103
3104         * dom/SelectorQuery.cpp:
3105         (WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
3106         the first subselector happens to be matching an id.
3107         (WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
3108         added getAllElementsById when there are multiple matching elements for a given id.
3109
3110         * dom/SelectorQuery.h:
3111
3112         * dom/TreeScope.cpp:
3113         (WebCore::TreeScope::getAllElementsById): Added.
3114
3115         * dom/TreeScope.h:
3116
3117 2013-05-15  Darin Adler  <darin@apple.com>
3118
3119         [Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
3120         https://bugs.webkit.org/show_bug.cgi?id=116179
3121
3122         Reviewed by Andreas Kling.
3123
3124         * dom/Clipboard.cpp:
3125         (WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
3126         ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
3127         (WebCore::Clipboard::create): Ditto.
3128         (WebCore::Clipboard::createForDragAndDrop): Ditto.
3129
3130         * platform/DragData.h:
3131         (WebCore::DragData::pasteboardName): Made this const.
3132
3133         * platform/Pasteboard.h: Added new create functions, used by the clipboard
3134         create functions above.
3135
3136         * platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
3137         Clipboard.cpp file.
3138
3139         * platform/mac/PasteboardMac.mm:
3140         (WebCore::Pasteboard::createForCopyAndPaste): Added.
3141         (WebCore::Pasteboard::createPrivate): Added.
3142         (WebCore::Pasteboard::createForDragAndDrop): Added.
3143
3144 2013-05-15  Anders Carlsson  <andersca@apple.com>
3145
3146         Fix a thinko.
3147
3148         We want to invalidate the file icon loader if it exists, not create it!
3149
3150         * html/FileInputType.cpp:
3151         (WebCore::FileInputType::requestIcon):
3152
3153 2013-05-15  Darin Adler  <darin@apple.com>
3154
3155         Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
3156         https://bugs.webkit.org/show_bug.cgi?id=116176
3157
3158         Reviewed by Andreas Kling.
3159
3160         * dom/Clipboard.cpp:
3161         (WebCore::Clipboard::writeRange):
3162         (WebCore::Clipboard::writePlainText):
3163         (WebCore::Clipboard::writeURL):
3164         Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
3165         not make it obvious, these are here only for use by dragging code. Later we may
3166         refactor them away entirely, but for now it's good not to compile them in on any
3167         platform that does not support dragging.
3168
3169 2013-05-15  Andy Estes  <aestes@apple.com>
3170
3171         Resources from non-HTTP schemes should not be cached indefinitely
3172         https://bugs.webkit.org/show_bug.cgi?id=113626
3173
3174         Reviewed by Ryosuke Niwa.
3175
3176         With the exception of schemes that we know will always return the same
3177         result for a given URL, we should not indefinitely cache non-HTTP
3178         resources when their freshness cannot be verified.
3179
3180         Writing a test for this is blocked on https://webkit.org/b/116199.
3181
3182         The following two existing tests of memory cache behavior were
3183         converted to HTTP tests so that they continue to function as expected:
3184
3185         Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
3186                http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
3187
3188         * loader/cache/CachedResource.cpp:
3189         (WebCore::CachedResource::freshnessLifetime): Returned a freshness
3190         lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
3191         * platform/SchemeRegistry.cpp:
3192         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
3193         Checked whether the scheme is blob:, data:, or applewebdata:.
3194         * platform/SchemeRegistry.h:
3195
3196 2013-05-15  Tim Horton  <timothy_horton@apple.com>
3197
3198         makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
3199         https://bugs.webkit.org/show_bug.cgi?id=116198
3200         <rdar://problem/13904395>
3201
3202         Reviewed by Simon Fraser.
3203
3204         Block Objective-C exceptions in makeRGBAFromNSColor.
3205         Remove a comment saying that they're impossible.
3206
3207         Convert the incoming color to the DeviceRGB colorspace to match
3208         existing color sources. Some rare cases (attributed strings that come
3209         from PDFKit) can have DeviceGrayscale color spaces, which would
3210         previously throw an exception here.
3211
3212         * platform/graphics/mac/ColorMac.mm:
3213         (WebCore::makeRGBAFromNSColor):
3214
3215 2013-05-15  David Kilzer  <ddkilzer@apple.com>
3216
3217         BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
3218
3219         * platform/ios/ClipboardIOS.mm:
3220         (WebCore::ClipboardIOS::ClipboardIOS):
3221         (WebCore::ClipboardIOS::hasData):
3222         (WebCore::ClipboardIOS::clearData):
3223         (WebCore::ClipboardIOS::clearAllData):
3224         (WebCore::ClipboardIOS::getData):
3225         (WebCore::ClipboardIOS::setData):
3226         (WebCore::ClipboardIOS::types):
3227         (WebCore::ClipboardIOS::writeRange):
3228         * platform/ios/PasteboardIOS.mm:
3229         (WebCore::Pasteboard::getStringSelection):
3230         (WebCore::Pasteboard::writeSelection):
3231         (WebCore::Pasteboard::writePlainText):
3232         (WebCore::Pasteboard::writeImage):
3233         (WebCore::Pasteboard::plainText):
3234         (WebCore::documentFragmentWithRTF):
3235         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
3236         (WebCore::Pasteboard::documentFragment):
3237
3238 2013-05-15  Anders Carlsson  <andersca@apple.com>
3239
3240         Stop using the factory pattern in FileIconLoaderClient
3241         https://bugs.webkit.org/show_bug.cgi?id=116197
3242
3243         Reviewed by Andreas Kling.
3244
3245         Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
3246
3247         * html/FileInputType.cpp:
3248         (WebCore::FileInputType::~FileInputType):
3249         (WebCore::FileInputType::requestIcon):
3250         * html/FileInputType.h:
3251         (FileInputType):
3252         * platform/FileIconLoader.cpp:
3253         (WebCore::FileIconLoader::invalidate):
3254         * platform/FileIconLoader.h:
3255         (WebCore::FileIconLoaderClient::~FileIconLoaderClient):
3256         (FileIconLoader):
3257
3258 2013-05-15  Anders Carlsson  <andersca@apple.com>
3259
3260         Fix FileChooserClient design
3261         https://bugs.webkit.org/show_bug.cgi?id=116195
3262
3263         Reviewed by Andreas Kling.
3264
3265         FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
3266         Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
3267
3268         Fix this by making it an abstract class, and moving FileChooser into FileInputType.
3269
3270         * html/FileInputType.cpp:
3271         (WebCore::FileInputType::~FileInputType):
3272         Invalidate the file chooser.
3273
3274         (WebCore::FileInputType::handleDOMActivateEvent):
3275         Apply the file chooser settings.
3276
3277         (WebCore::FileInputType::applyFileChooserSettings):
3278         Recreate the file chooser with new settings.
3279
3280         (WebCore::FileInputType::receiveDropForDirectoryUpload):
3281         Apply the settings.
3282
3283         * platform/FileChooser.cpp:
3284         (WebCore::FileChooser::invalidate):
3285         Set m_client to null.
3286
3287         (WebCore::FileChooser::chooseFiles):
3288         Early return.
3289
3290         * platform/FileChooser.h:
3291
3292 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
3293
3294         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
3295         https://bugs.webkit.org/show_bug.cgi?id=116193
3296
3297         Reviewed by Darin Adler
3298
3299         * dom/ScriptedAnimationController.cpp:
3300         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
3301         (WebCore::ScriptedAnimationController::setThrottled):
3302         (WebCore::ScriptedAnimationController::scheduleAnimation):
3303         * dom/ScriptedAnimationController.h:
3304         (ScriptedAnimationController):
3305             - Fixes for review comments.
3306
3307 2013-05-15  Anders Carlsson  <andersca@apple.com>
3308
3309         Move HTTPRequest class to WebKit2
3310         https://bugs.webkit.org/show_bug.cgi?id=116192
3311
3312         Reviewed by Darin Adler.
3313
3314         HTTPRequest is only used by the "remote inspector" feature in WebKit2,
3315         so there's no need to have it in WebCore.
3316
3317         * CMakeLists.txt:
3318         * GNUmakefile.list.am:
3319         * Target.pri:
3320         * WebCore.vcproj/WebCore.vcproj:
3321         * WebCore.vcxproj/WebCore.vcxproj:
3322         * WebCore.vcxproj/WebCore.vcxproj.filters:
3323         * WebCore.xcodeproj/project.pbxproj:
3324
3325 2013-05-15  Oliver Hunt  <oliver@apple.com>
3326
3327         RefCountedArray needs to use vector initialisers for its backing store
3328         https://bugs.webkit.org/show_bug.cgi?id=116194
3329
3330         Reviewed by Gavin Barraclough.
3331
3332         Update to use new functions for operating on the exception stack.
3333
3334         * bindings/js/ScriptCallStackFactory.cpp:
3335         (WebCore::createScriptCallStackFromException):
3336
3337 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
3338
3339         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
3340         https://bugs.webkit.org/show_bug.cgi?id=116193
3341
3342         Reviewed by Simon Fraser.
3343
3344         * dom/ScriptedAnimationController.cpp:
3345         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
3346             - initialize m_throttled
3347         (WebCore::ScriptedAnimationController::setThrottled):
3348             - sets m_throttled, reschedule when this changes.
3349         (WebCore::ScriptedAnimationController::scheduleAnimation):
3350             - if throtled don't use a display link, and extend the timeout.
3351         * dom/ScriptedAnimationController.h:
3352         (ScriptedAnimationController):
3353             - Added m_throttled
3354
3355 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
3356
3357         Process suppression should throttle scripted animations
3358         https://bugs.webkit.org/show_bug.cgi?id=115812
3359
3360         Reviewed by Simon Fraser.
3361
3362         <rdar://problem/13799726>
3363
3364         * WebCore.exp.in:
3365             - Expose Page::setThrottled
3366         * dom/Document.cpp:
3367         (WebCore::Document::scriptedAnimationControllerSetThrottled):
3368         (WebCore):
3369         * dom/Document.h:
3370         (Document):
3371             - Forwards to ScriptedAnimationController::setThrottled
3372         * dom/ScriptedAnimationController.cpp:
3373         (WebCore::ScriptedAnimationController::setThrottled):
3374         (WebCore):
3375         * dom/ScriptedAnimationController.h:
3376             - Force use of a timer.
3377         (ScriptedAnimationController):
3378         * page/Page.cpp:
3379         (WebCore::Page::setThrottled):
3380         (WebCore):
3381         * page/Page.h:
3382         (Page):
3383             - When under throttling force the ScriptedAnimationController to use a timer.
3384
3385 2013-05-15  Igor Oliveira  <igor.o@sisa.samsung.com>
3386
3387         Implement run-in remove child cases.
3388         https://bugs.webkit.org/show_bug.cgi?id=86520
3389
3390         Move runin to original position when sibling element is destroyed.
3391
3392         Reviewed by David Hyatt.
3393
3394         Tests: fast/runin/runin-remove-child-simple.html
3395                fast/runin/runin-sibling-inline.html
3396
3397         * rendering/RenderBlock.cpp:
3398         (WebCore::RenderBlock::willBeDestroyed):
3399         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
3400             If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
3401             is being destroyed, it means that the run-in is moving to original position and
3402             we do not need to do nothing.
3403
3404 2013-05-15  Anders Carlsson  <andersca@apple.com>
3405
3406         Remove WebSocketHandshakeResponse class
3407         https://bugs.webkit.org/show_bug.cgi?id=116190
3408
3409         Reviewed by Andreas Kling.
3410
3411         Just use ResourceResponse instead of WebSocketHandshakeResponse.
3412
3413         * CMakeLists.txt:
3414         * GNUmakefile.list.am:
3415         * Modules/websockets/WebSocketHandshake.cpp:
3416         (WebCore::WebSocketHandshake::readServerHandshake):
3417         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
3418         (WebCore::WebSocketHandshake::serverSetCookie):
3419         (WebCore::WebSocketHandshake::serverSetCookie2):
3420         (WebCore::WebSocketHandshake::serverUpgrade):
3421         (WebCore::WebSocketHandshake::serverConnection):
3422         (WebCore::WebSocketHandshake::serverWebSocketAccept):
3423         (WebCore::WebSocketHandshake::serverHandshakeResponse):
3424         (WebCore::WebSocketHandshake::readHTTPHeaders):
3425         * Modules/websockets/WebSocketHandshake.h:
3426         * Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
3427         * Modules/websockets/WebSocketHandshakeResponse.h: Removed.
3428         * Target.pri:
3429         * WebCore.vcproj/WebCore.vcproj:
3430         * WebCore.vcxproj/WebCore.vcxproj:
3431         * WebCore.vcxproj/WebCore.vcxproj.filters:
3432         * WebCore.xcodeproj/project.pbxproj:
3433         * inspector/InspectorInstrumentation.cpp:
3434         (WebCore):
3435         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
3436         * inspector/InspectorInstrumentation.h:
3437         (InspectorInstrumentation):
3438         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
3439         * inspector/InspectorResourceAgent.cpp:
3440         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
3441         * inspector/InspectorResourceAgent.h:
3442         (WebCore):
3443         (InspectorResourceAgent):
3444
3445 2013-05-15  Eric Carlson  <eric.carlson@apple.com>
3446
3447         [Mac] media engine may deliver NULL in-band "cue"
3448         https://bugs.webkit.org/show_bug.cgi?id=116180
3449
3450         Reviewed by Jer Noble.
3451
3452         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3453         (WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
3454
3455 2013-05-15  Darin Adler  <darin@apple.com>
3456
3457         List platforms that still use the legacy clipboard instead of just saying "not Mac"
3458         https://bugs.webkit.org/show_bug.cgi?id=116177
3459
3460         Reviewed by Andreas Kling.
3461
3462         * dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
3463         legacy model.
3464
3465 2013-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
3466
3467         We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
3468         https://bugs.webkit.org/show_bug.cgi?id=116119
3469
3470         Reviewed by Oliver Hunt.
3471
3472         MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
3473         to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
3474         cleared when we cancel the loader.
3475
3476         No new tests needed.
3477
3478         * loader/DocumentLoader.cpp:
3479         (WebCore::DocumentLoader::~DocumentLoader):
3480         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
3481         (WebCore::DocumentLoader::cancelMainResourceLoad):
3482         (WebCore::DocumentLoader::clearMainResource):
3483         (WebCore):
3484         * loader/DocumentLoader.h: add helper method clearMainResource()
3485         (DocumentLoader):
3486
3487 2013-05-15  Joe Mason  <jmason@blackberry.com>
3488
3489         [BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
3490         https://bugs.webkit.org/show_bug.cgi?id=116164
3491
3492         Reviewed by Rob Buis.
3493
3494         Internal PR: 338490
3495         Internally Reviewed By: Lyon Chen
3496
3497         When there are multiple HTTP requests in flight with the same bad credentials (common with
3498         proxy auth if the user mistyped their password), the first 407 that's received will cause
3499         the credentials to be purged and the password dialog to open for new credentials. This means
3500         that all 407's received after this should only purge the credentials if they have not
3501         already been updated from the dialog; otherwise they will be wiping out credentials that
3502         haven't failed yet.
3503
3504         * platform/network/blackberry/NetworkJob.cpp:
3505         (WebCore::NetworkJob::sendRequestWithCredentials):
3506         (WebCore::NetworkJob::purgeCredentials):
3507
3508 2013-05-15  Chris Fleizach  <cfleizach@apple.com>
3509
3510         AX: Use caching when requesting children object on iOS
3511         https://bugs.webkit.org/show_bug.cgi?id=116112
3512
3513         Reviewed by David Kilzer.
3514
3515         Building up the children list in the AX hierarchy can be time consuming. On iOS, this
3516         is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
3517
3518         We can speed everything up if we just cache the isIgnored() attribute while building up children.
3519
3520         * accessibility/AXObjectCache.cpp:
3521         (WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
3522         (WebCore):
3523         (WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
3524         * accessibility/AXObjectCache.h:
3525         (AXAttributeCacheEnabler):
3526         (WebCore):
3527         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3528         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
3529         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
3530         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
3531         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
3532         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
3533
3534 2013-05-15  Anders Carlsson  <andersca@apple.com>
3535
3536         Remove WebSocketHandshakeRequest class
3537         https://bugs.webkit.org/show_bug.cgi?id=116178
3538
3539         Reviewed by Andreas Kling.
3540
3541         Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason 
3542         why we can't just use a ResourceRequest instead.
3543
3544         * CMakeLists.txt:
3545         * GNUmakefile.list.am:
3546         * Modules/websockets/WebSocketChannel.cpp:
3547         (WebCore::WebSocketChannel::didOpenSocketStream):
3548         * Modules/websockets/WebSocketHandshake.cpp:
3549         (WebCore::WebSocketHandshake::clientHandshakeRequest):
3550         * Modules/websockets/WebSocketHandshake.h:
3551         (WebCore):
3552         * Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
3553         * Modules/websockets/WebSocketHandshakeRequest.h: Removed.
3554         * Target.pri:
3555         * WebCore.vcproj/WebCore.vcproj:
3556         * WebCore.vcxproj/WebCore.vcxproj:
3557         * WebCore.vcxproj/WebCore.vcxproj.filters:
3558         * WebCore.xcodeproj/project.pbxproj:
3559         * inspector/InspectorInstrumentation.cpp:
3560         (WebCore):
3561         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
3562         * inspector/InspectorInstrumentation.h:
3563         (InspectorInstrumentation):
3564         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
3565         * inspector/InspectorResourceAgent.cpp:
3566         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
3567         * inspector/InspectorResourceAgent.h:
3568         (WebCore):
3569         (InspectorResourceAgent):
3570         * platform/network/HTTPRequest.cpp:
3571         (WebCore):
3572
3573 2013-05-15  Darin Adler  <darin@apple.com>
3574
3575         Try to fix iOS build.
3576
3577         * platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
3578         on iOS.
3579
3580 2013-05-13  Anders Carlsson  <andersca@apple.com>
3581
3582         Frame::editor() should return a reference
3583         https://bugs.webkit.org/show_bug.cgi?id=116037
3584
3585         Reviewed by Darin Adler.
3586
3587         A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
3588         Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
3589
3590         * accessibility/AccessibilityObject.cpp:
3591         (WebCore::AccessibilityObject::hasMisspelling):
3592         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3593         (AXAttributeStringSetSpelling):
3594         * dom/ContainerNode.cpp:
3595         (WebCore::ContainerNode::cloneChildNodes):
3596         * dom/Document.cpp:
3597         (WebCore::acceptsEditingFocus):
3598         (WebCore::Document::setFocusedNode):
3599         (WebCore::command):
3600         * editing/AlternativeTextController.cpp:
3601         (WebCore::AlternativeTextController::timerFired):
3602         (WebCore::AlternativeTextController::applyDictationAlternative):
3603         * editing/CompositeEditCommand.cpp:
3604         (WebCore::EditCommandComposition::unapply):
3605         (WebCore::EditCommandComposition::reapply):
3606         (WebCore::CompositeEditCommand::apply):
3607         (WebCore::CompositeEditCommand::moveParagraphs):
3608         * editing/DeleteButton.cpp:
3609         (WebCore::DeleteButton::defaultEventHandler):
3610         * editing/DeleteButtonController.cpp:
3611         (WebCore::DeleteButtonController::show):
3612         * editing/DeleteButtonController.h:
3613         (WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
3614         (WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
3615         * editing/DeleteSelectionCommand.cpp:
3616         (WebCore::DeleteSelectionCommand::mergeParagraphs):
3617         (WebCore::DeleteSelectionCommand::doApply):
3618         * editing/EditCommand.cpp:
3619         (WebCore::EditCommand::EditCommand):
3620         * editing/EditingStyle.cpp:
3621         (WebCore::StyleChange::StyleChange):
3622         * editing/Editor.cpp:
3623         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3624         * editing/EditorCommand.cpp:
3625         (WebCore::applyCommandToFrame):
3626         (WebCore::executeToggleStyle):
3627         (WebCore::executeApplyParagraphStyle):
3628         (WebCore::expandSelectionToGranularity):
3629         (WebCore::stateStyle):
3630         (WebCore::valueStyle):
3631         (WebCore::executeCopy):
3632         (WebCore::executeCut):
3633         (WebCore::executeDefaultParagraphSeparator):
3634         (WebCore::executeDelete):
3635         (WebCore::executeDeleteBackward):
3636         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
3637         (WebCore::executeDeleteForward):
3638         (WebCore::executeDeleteToBeginningOfLine):
3639         (WebCore::executeDeleteToBeginningOfParagraph):
3640         (WebCore::executeDeleteToEndOfLine):
3641         (WebCore::executeDeleteToEndOfParagraph):
3642         (WebCore::executeDeleteToMark):
3643         (WebCore::executeDeleteWordBackward):
3644         (WebCore::executeDeleteWordForward):
3645         (WebCore::executeFindString):
3646         (WebCore::executeForwardDelete):
3647         (WebCore::executeIgnoreSpelling):
3648         (WebCore::executeInsertNewline):
3649         (WebCore::executeMakeTextWritingDirectionLeftToRight):
3650         (WebCore::executeMakeTextWritingDirectionNatural):
3651         (WebCore::executeMakeTextWritingDirectionRightToLeft):
3652         (WebCore::executeToggleOverwrite):
3653         (WebCore::executePaste):
3654         (WebCore::executePasteGlobalSelection):
3655         (WebCore::executePasteAndMatchStyle):
3656         (WebCore::executePasteAsPlainText):
3657         (WebCore::executeRedo):
3658         (WebCore::executeRemoveFormat):
3659         (WebCore::executeSelectToMark):
3660         (WebCore::executeSetMark):
3661         (WebCore::executeStyleWithCSS):
3662         (WebCore::executeUseCSS):
3663         (WebCore::executeSwapWithMark):
3664         (WebCore::executeTakeFindStringFromSelection):
3665         (WebCore::executeTranspose):
3666         (WebCore::executeUndo):
3667         (WebCore::executeYank):
3668         (WebCore::executeYankAndSelect):
3669         (WebCore::supportedCopyCut):
3670         (WebCore::supportedPaste):
3671         (WebCore::enabledVisibleSelection):
3672         (WebCore::enabledVisibleSelectionAndMark):
3673         (WebCore::enableCaretInEditableText):
3674         (WebCore::enabledCopy):
3675         (WebCore::enabledCut):
3676         (WebCore::enabledInEditableText):
3677         (WebCore::enabledDelete):
3678         (WebCore::enabledPaste):
3679         (WebCore::enabledRedo):
3680         (WebCore::enabledTakeFindStringFromSelection):
3681         (WebCore::enabledUndo):
3682         (WebCore::stateOrderedList):
3683         (WebCore::stateStyleWithCSS):
3684         (WebCore::stateUnorderedList):
3685         (WebCore::valueDefaultParagraphSeparator):
3686         * editing/FrameSelection.cpp:
3687         (WebCore::shouldAlwaysUseDirectionalSelection):
3688         (WebCore::FrameSelection::setSelection):
3689         (WebCore::FrameSelection::nextWordPositionForPlatform):
3690         (WebCore::FrameSelection::modifyMovingRight):
3691         (WebCore::FrameSelection::modifyMovingLeft):
3692         (WebCore::FrameSelection::modify):
3693         (WebCore::shouldStopBlinkingDueToTypingCommand):
3694         (WebCore::FrameSelection::shouldDeleteSelection):
3695         (WebCore::FrameSelection::shouldChangeSelection):
3696         * editing/InsertTextCommand.cpp:
3697         (WebCore::InsertTextCommand::doApply):
3698         * editing/SpellChecker.cpp:
3699         (WebCore::SpellChecker::didCheck):
3700         * editing/SpellingCorrectionCommand.cpp:
3701         * editing/TypingCommand.cpp:
3702         (WebCore::TypingCommand::insertText):
3703         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
3704         (WebCore::TypingCommand::markMisspellingsAfterTyping):
3705         (WebCore::TypingCommand::typingAddedToOpenCommand):
3706         (WebCore::TypingCommand::deleteKeyPressed):
3707         (WebCore::TypingCommand::forwardDeleteKeyPressed):
3708         * editing/htmlediting.cpp:
3709         (WebCore::createDefaultParagraphElement):
3710         * editing/mac/EditorMac.mm:
3711         (WebCore::Editor::pasteWithPasteboard):
3712         * editing/markup.cpp:
3713         (WebCore::createMarkup):
3714         * html/HTMLInputElement.cpp:
3715         (WebCore::HTMLInputElement::endEditing):
3716         * html/HTMLTextAreaElement.cpp:
3717         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
3718         * html/TextFieldInputType.cpp:
3719         (WebCore::TextFieldInputType::handleKeydownEvent):
3720         (WebCore::TextFieldInputType::didSetValueByUserEdit):
3721         * loader/FrameLoader.cpp:
3722         (WebCore::FrameLoader::closeURL):
3723         (WebCore::FrameLoader::didOpenURL):
3724         (WebCore::FrameLoader::clear):
3725         * page/ContextMenuController.cpp:
3726         (WebCore::insertUnicodeCharacter):
3727         (WebCore::ContextMenuController::contextMenuItemSelected):
3728         (WebCore::ContextMenuController::populate):
3729         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3730         * page/DOMWindow.cpp:
3731         (WebCore::DOMWindow::find):
3732         * page/DragController.cpp:
3733         (WebCore::DragController::dispatchTextInputEventFor):
3734         (WebCore::DragController::concludeEditDrag):
3735         (WebCore::DragController::startDrag):
3736         * page/EventHandler.cpp:
3737         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
3738         (WebCore::EventHandler::handleMousePressEventSingleClick):
3739         (WebCore::EventHandler::handlePasteGlobalSelection):
3740         (WebCore::EventHandler::sendContextMenuEvent):
3741         (WebCore::EventHandler::sendContextMenuEventForKey):
3742         (WebCore::EventHandler::keyEvent):
3743         (WebCore::EventHandler::defaultKeyboardEventHandler):
3744         (WebCore::EventHandler::defaultTextInputEventHandler):
3745         (WebCore::EventHandler::defaultBackspaceEventHandler):
3746         * page/FocusController.cpp:
3747         (WebCore::relinquishesEditingFocus):
3748         * page/Frame.cpp:
3749         (WebCore::Frame::rangeForPoint):
3750         * page/Frame.h:
3751         (Frame):
3752         (WebCore::Frame::editor):
3753         * page/Page.cpp:
3754         (WebCore::Page::findString):
3755         (WebCore::Page::findStringMatchingRanges):
3756         (WebCore::Page::rangeOfString):
3757         (WebCore::Page::markAllMatchesForText):
3758         (WebCore::Page::setDeviceScaleFactor):
3759         * platform/mac/ClipboardMac.mm:
3760         (WebCore::ClipboardMac::writeRange):
3761         * platform/mac/DragDataMac.mm:
3762         (WebCore::DragData::asURL):
3763         * platform/mac/PasteboardMac.mm:
3764         (WebCore::Pasteboard::getStringSelection):
3765         (WebCore::Pasteboard::getDataSelection):
3766         (WebCore::Pasteboard::writeSelectionForTypes):
3767         (WebCore::writeURLForTypes):
3768         (WebCore::Pasteboard::plainText):
3769         (WebCore::documentFragmentWithRTF):
3770         (WebCore::Pasteboard::documentFragment):
3771         * rendering/HitTestResult.cpp:
3772         (WebCore::HitTestResult::dictationAlternatives):
3773         * rendering/InlineTextBox.cpp:
3774         (WebCore::InlineTextBox::paint):
3775         (WebCore::InlineTextBox::paintTextMatchMarker):
3776         * rendering/RenderBlock.cpp:
3777         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3778         * testing/Internals.cpp:
3779         (WebCore::spellchecker):
3780         (WebCore::Internals::resetToConsistentState):
3781         (WebCore::Internals::hasSpellingMarker):
3782         (WebCore::Internals::hasAutocorrectedMarker):
3783         (WebCore::Internals::setContinuousSpellCheckingEnabled):
3784         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
3785         (WebCore::Internals::setAutomaticLinkDetectionEnabled):
3786         (WebCore::Internals::setAutomaticDashSubstitutionEnabled):
3787         (WebCore::Internals::setAutomaticTextReplacementEnabled):
3788         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
3789         (WebCore::Internals::isOverwriteModeEnabled):
3790         (WebCore::Internals::toggleOverwriteModeEnabled):
3791         (WebCore::Internals::hasGrammarMarker):
3792
3793 2013-05-15  Darin Adler  <darin@apple.com>
3794
3795         [Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
3796         https://bugs.webkit.org/show_bug.cgi?id=116166
3797
3798         Reviewed by Anders Carlsson.
3799
3800         * WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
3801         non-iOS section, since iOS is still using the legacy version of Clipboard.
3802
3803         * dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
3804
3805 2013-05-15  Dongseong Hwang  <dongseong.hwang@intel.com>
3806
3807         Remove an overloaded strokeRect in <canvas>
3808         https://bugs.webkit.org/show_bug.cgi?id=116017
3809
3810         Reviewed by Benjamin Poulain.
3811
3812         The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
3813         remains only strokeRect with 4 arguments.
3814
3815         [1] http://www.w3.org/TR/2dcontext2/
3816
3817         Covered by existing tests: canvas/philip/tests/2d.missingargs.html
3818
3819         * html/canvas/CanvasRenderingContext2D.cpp:
3820         (WebCore::CanvasRenderingContext2D::strokeRect):
3821         * html/canvas/CanvasRenderingContext2D.h:
3822         (CanvasRenderingContext2D):
3823         * html/canvas/CanvasRenderingContext2D.idl:
3824
3825 2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3826
3827         [css3-text] text-decoration-line now accepts "blink" as valid value
3828         https://bugs.webkit.org/show_bug.cgi?id=116104
3829
3830         Reviewed by Andreas Kling.
3831
3832         As of November 13th 2012, the W3C specification has been updated to
3833         accept "blink" as a valid property value in text-decoration-line. Though
3834         accepting the value as valid, it is ignored as CSS Level 1
3835         text-decoration property currently does.
3836
3837         Updated related layout tests to reflect changes in specification.
3838
3839         * css/CSSParser.cpp:
3840         (WebCore::CSSParser::parseValue):
3841         (WebCore::CSSParser::parseTextDecoration):
3842
3843 2013-05-14  Simon Fraser  <simon.fraser@apple.com>
3844
3845         Revert http://trac.webkit.org/changeset/150047
3846         
3847         It introduced unwanted behavioral differences between
3848         Retina and non-Retina Mac hardware.
3849
3850         * platform/graphics/ca/GraphicsLayerCA.cpp:
3851         (WebCore::GraphicsLayerCA::requiresTiledLayer):
3852         (WebCore::GraphicsLayerCA::computePixelAlignment):
3853
3854 2013-05-15  Darin Adler  <darin@apple.com>
3855
3856         [Mac] Remove the ClipboardMac class and header file
3857         https://bugs.webkit.org/show_bug.cgi?id=116165
3858
3859         Reviewed by Anders Carlsson.
3860
3861         * WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
3862         * editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
3863         * page/mac/EventHandlerMac.mm: Ditto.
3864         * platform/mac/ClipboardMac.h: Removed.
3865
3866         * platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
3867         Deleted ClipboardMac constructor.
3868
3869 2013-05-15  Darin Adler  <darin@apple.com>
3870
3871         [Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
3872         https://bugs.webkit.org/show_bug.cgi?id=116163
3873
3874         Reviewed by Anders Carlsson.
3875
3876         * dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
3877
3878         * platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
3879         and it's not helpful to have the conditionals in here. It's helpful in cross-platform
3880         source files.
3881         (WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
3882         Later could refactor to have the Pasteboard creation be platform-specific, and make these
3883         functions platform-independent.
3884         (WebCore::Clipboard::createForDragAndDrop): Ditto.
3885         (WebCore::Clipboard::createForCopyAndPaste): Ditto.
3886
3887 2013-05-15  Darin Adler  <darin@apple.com>
3888
3889         [Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
3890         https://bugs.webkit.org/show_bug.cgi?id=116162
3891
3892         Reviewed by Andreas Kling.
3893
3894         * dom/Clipboard.h: Add createForCopyAndPaste function.
3895
3896         * editing/mac/EditorMac.mm:
3897         (WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
3898
3899         * platform/mac/ClipboardMac.mm:
3900         (WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
3901         Editor::newGeneralClipboard.
3902
3903 2013-05-15  Darin Adler  <darin@apple.com>
3904
3905         [Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
3906         https://bugs.webkit.org/show_bug.cgi?id=116161
3907
3908         Reviewed by Andreas Kling.
3909
3910         * dom/Clipboard.h: Added createForDragAndDrop function.
3911
3912         * page/mac/EventHandlerMac.mm:
3913         (WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
3914         instead of ClipboardMac::create.
3915
3916         * platform/mac/ClipboardMac.mm:
3917         (WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
3918         EventHandler::createDraggingClipboard function did, soon to be refactored better.
3919
3920 2013-05-15  Darin Adler  <darin@apple.com>
3921
3922         [Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
3923         https://bugs.webkit.org/show_bug.cgi?id=116159
3924
3925         Reviewed by Andreas Kling.
3926
3927         * dom/Clipboard.h:
3928         (WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
3929         object and need to get to the Pasteboard platform abstraction.
3930
3931         * editing/Editor.cpp:
3932         (WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
3933         Our long term plan is to delete writeClipboard.
3934
3935         * platform/Pasteboard.h: Added writePasteboard function.
3936         (WebCore::Pasteboard::name): Made this const.
3937
3938         * platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
3939         Deleted all the data members and the virtual destructor.
3940
3941         * platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
3942         Deleted the destructor, since it's now automatically generated. Deleted the comment
3943         on an #endif since it's only a few source lines away from the #if.
3944         (WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
3945         since they are no longer used.
3946
3947         * platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
3948         (WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
3949
3950 2013-05-15  Seokju Kwon  <seokju.kwon@gmail.com>
3951
3952         Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
3953         https://bugs.webkit.org/show_bug.cgi?id=116144
3954
3955         Reviewed by Timothy Hatcher.
3956
3957         No new tests, no behavior change.
3958
3959         * inspector/Inspector.json:
3960
3961 2013-05-15  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3962
3963         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
3964         https://bugs.webkit.org/show_bug.cgi?id=116035
3965
3966         Reviewed by Allan Sandfeld Jensen.
3967
3968         The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
3969         which expects its QNetworkAccessManager to still be alive.
3970
3971         Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
3972         instead. The QNetworkReply doesn't need to be aborted in this case anyway.
3973
3974         * platform/network/qt/QNetworkReplyHandler.cpp:
3975         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
3976         (WebCore::QNetworkReplyWrapper::release):
3977         (WebCore::QNetworkReplyWrapper::stopForwarding):
3978           Rename resetConnections to stopForwarding since not all connections are related
3979           to data forwarding to the client anymore.
3980         (WebCore::QNetworkReplyWrapper::receiveMetaData):
3981         (WebCore::QNetworkReplyWrapper::replyDestroyed):
3982         (WebCore::QNetworkReplyWrapper::didReceiveFinished):
3983         * platform/network/qt/QNetworkReplyHandler.h:
3984         (QNetworkReplyWrapper):
3985
3986 2013-05-15  Darin Adler  <darin@apple.com>
3987
3988         [Mac] Make Clipboard::declareAndWriteDragImage non-virtual
3989         https://bugs.webkit.org/show_bug.cgi?id=116156
3990
3991         Reviewed by Anders Carlsson.
3992
3993         * dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
3994
3995         * platform/Pasteboard.h:
3996         (WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
3997         pasteboard operations directly instead of through the Pasteboard class
3998         functions. Not sure if we'll need it long term or not.
3999
4000         * platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
4001
4002         * platform/mac/ClipboardMac.mm:
4003         (WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
4004         member instead of ClipboardMac.
4005
4006 2013-05-15  Peter Gal  <galpeter@inf.u-szeged.hu>
4007
4008         [curl] Remove version #if guards
4009         https://bugs.webkit.org/show_bug.cgi?id=116152
4010
4011         Reviewed by Brent Fulgham.
4012
4013         No tests required.
4014
4015         * platform/network/curl/ResourceHandleCurl.cpp:
4016         (WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
4017         * platform/network/curl/ResourceHandleManager.cpp:
4018         (WebCore::writeCallback): Ditto.
4019         (WebCore::headerCallback): Ditto.
4020         (WebCore::readCallback): Ditto.
4021         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
4022         (WebCore::ResourceHandleManager::initializeHandle): Ditto.
4023
4024 2013-05-15  David Kilzer  <ddkilzer@apple.com>
4025
4026         BUILD FIX (r150089): Make WebCoreTestShim build for iOS
4027
4028         * Configurations/WebCoreTestShim.xcconfig: Exclude
4029         WebCoreTestShimLibrary.cpp when building for iOS.
4030
4031 2013-05-15  Radu Stavila  <stavila@adobe.com>
4032
4033         [CSSRegions] Implement offsetParent for elements inside named flow
4034         https://bugs.webkit.org/show_bug.cgi?id=113276
4035
4036         In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
4037         http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes
4038
4039         As a result of this change, the DumpRenderTree tool would crash in 
4040         WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
4041         test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the 
4042         RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
4043
4044         Reviewed by Darin Adler.
4045
4046         Tests: fast/regions/offsetParent-body-in-flow-thread.html
4047                fast/regions/offsetParent-in-flow-thread.html
4048
4049         * rendering/RenderBoxModelObject.cpp:
4050         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
4051         * rendering/RenderObject.cpp:
4052         (WebCore::RenderObject::offsetParent):
4053
4054 2013-05-15  Darin Adler  <darin@apple.com>
4055
4056         [Mac] Make Clipboard::createDragImage non-virtual
4057         https://bugs.webkit.org/show_bug.cgi?id=116136
4058
4059         Reviewed by Benjamin Poulain.
4060
4061         * dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
4062
4063         * platform/mac/ClipboardMac.h: Removed frame argument from create function
4064         and constructor. Removed createDragImage and dragNSImage. Removed m_frame
4065         data member.
4066
4067         * platform/mac/ClipboardMac.mm:
4068         (WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
4069         to initialize m_frame.
4070         (WebCore::Clipboard::createDragImage): Merged the createDragImage and
4071         dragNSImage functions, since they were the same thing. Changed code to get
4072         the frame from the drag image element. Made the createDragImage function
4073         a Clipboard member instead of ClipboardMac.
4074
4075 2013-05-15  Patrick Gansterer  <paroga@webkit.org>
4076
4077         [WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
4078         https://bugs.webkit.org/show_bug.cgi?id=116137
4079
4080         Reviewed by Andreas Kling.
4081
4082         Use zero for the glyp when the fontData pointer is null.
4083         This aligns GlyphPageTreeNodeWinCE with the other implementations