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