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