Move MemoryInfo under window.internals
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-06-05  Zan Dobersek  <zdobersek@igalia.com>
2
3         Move MemoryInfo under window.internals
4         https://bugs.webkit.org/show_bug.cgi?id=117197
5
6         Reviewed by Ryosuke Niwa.
7
8         The MemoryInfo interface is not a subject of any specification and should not be exposed
9         to the Web. It's still used by the performance tests so it is moved under the testing
10         internals, accessible through window.internals.memoryInfo.
11
12         The jsHeapSizeLimit attribute is removed from the MemoryInfo interface as that value was
13         only usable when using the V8 bindings which are not supported anymore. A small fast/harness
14         test is also provided to check that the MemoryInfo object is accessible through window.internals.
15
16         Test: fast/harness/memoryinfo-object.html
17
18         * CMakeLists.txt:
19         * DerivedSources.cpp:
20         * DerivedSources.make:
21         * DerivedSources.pri:
22         * GNUmakefile.list.am:
23         * Target.pri:
24         * UseJSC.cmake:
25         * WebCore.exp.in:
26         * WebCore.order:
27         * WebCore.vcxproj/WebCore.vcxproj:
28         * WebCore.vcxproj/WebCore.vcxproj.filters:
29         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
30         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
31         * WebCore.xcodeproj/project.pbxproj:
32         * bindings/gobject/GNUmakefile.am: Remove the GObject bindings targets for MemoryInfo.
33         * bindings/js/JSBindingsAllInOne.cpp: Remove the JSMemoryInfo.h and MemoryInfo.h inclusion.
34         * bindings/js/JSMemoryInfoCustom.cpp: Removed.
35         * bindings/js/ScriptGCEvent.cpp: Remove the ENABLE(INSPECTOR) guards.
36         (WebCore::ScriptGCEvent::getHeapSize): Remove the jsHeapSizeLimit assignment.
37         * bindings/js/ScriptGCEvent.h: Remove the ENABLE(INSPECTOR) guards.
38         (WebCore::HeapInfo::HeapInfo): Remove the jsHeapSizeLimit member.
39         * page/Console.cpp: Remove the Console::memory method.
40         * page/Console.h: Ditto.
41         * page/Console.idl: Remove the window.console.memory attribute.
42         * page/MemoryInfo.cpp: Removed.
43         * page/Performance.cpp: Remove the Performance::memory method.
44         * page/Performance.h: Ditto.
45         * page/Performance.idl: Remove the window.performance.memory attribute.
46         * testing/Internals.cpp:
47         (WebCore::Internals::memoryInfo): Return a MemoryInfo object upon invoking.
48         * testing/Internals.h: Declare the Internals::memoryInfo method.
49         * testing/Internals.idl: Expose the window.internals.memoryInfo operation.
50         * testing/MemoryInfo.h: Renamed from Source/WebCore/page/MemoryInfo.h.
51         (WebCore::MemoryInfo::create): Return a new RefPtr-wrapped MemoryInfo object.
52         (WebCore::MemoryInfo::usedJSHeapSize): Return the value of the equally-named HeapInfo member.
53         (WebCore::MemoryInfo::totalJSHeapSize): Ditto.
54         (WebCore::MemoryInfo::MemoryInfo): Acquire the current heap info upon construction.
55         * testing/MemoryInfo.idl: Renamed from Source/WebCore/page/MemoryInfo.idl.
56         The jsHeapSizeLimit attribute is removed.
57
58 2013-06-04  Peter Gal  <galpeter@inf.u-szeged.hu>
59
60         [curl] Headers should be parsed as utf8 if possible
61         https://bugs.webkit.org/show_bug.cgi?id=117196
62
63         Reviewed by Brent Fulgham.
64
65         Testcase already present: http/tests/download/literal-utf-8.html
66
67         * platform/network/curl/ResourceHandleManager.cpp:
68         (WebCore::headerCallback): Parse the header as an utf8 string if possible.
69
70 2013-06-04  Oliver Hunt  <oliver@apple.com>
71
72         Prevent throttling while resources are being loaded
73         https://bugs.webkit.org/show_bug.cgi?id=117218
74
75         Reviewed by Gavin Barraclough.
76
77         Make use of the page activity assertion infrastructure to delay
78         throttling while we are waiting on resource loads.
79
80         * loader/FrameLoader.cpp:
81         (WebCore::FrameLoader::completed):
82         (WebCore::FrameLoader::started):
83         * loader/FrameLoader.h:
84         * loader/SubresourceLoader.cpp:
85         (WebCore::SubresourceLoader::init):
86         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
87         (WebCore::SubresourceLoader::didFinishLoading):
88         (WebCore::SubresourceLoader::didFail):
89         (WebCore::SubresourceLoader::willCancel):
90         * loader/SubresourceLoader.h:
91
92 2013-06-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
93
94         Remove [NoInterfaceObject] from XPathExpression and NodeIterator
95         https://bugs.webkit.org/show_bug.cgi?id=117204
96
97         Reviewed by Alexey Proskuryakov.
98
99         Remove [NoInterfaceObject] from XPathExpression and NodeIterator to match
100         their respective specifications:
101         - http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
102         - http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator
103
104         No new tests, already covered by:
105         fast/js/global-constructors-attributes.html
106
107         * dom/NodeIterator.idl:
108         * xml/XPathExpression.idl:
109
110 2013-06-04  Chris Fleizach  <cfleizach@apple.com>
111
112         AX: MathML multiscripts not exposed in Accessibility
113         https://bugs.webkit.org/show_bug.cgi?id=115069
114
115         Unreviewed, build fix.
116
117         Remove an accessibility iOS method that was erroneously added.
118
119         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
120
121 2013-06-04  Greg Hughes  <ghughes@apple.com>
122
123         Add "VisibleOnly" key to search predicate
124         https://bugs.webkit.org/show_bug.cgi?id=115491
125
126         Reviewed by Chris Fleizach.
127
128         Added support for accessibility clients to use the search predicate to find only visible elements
129
130         * accessibility/AccessibilityObject.cpp:
131         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
132         (WebCore::AccessibilityObject::isOnscreen):
133         (WebCore):
134         * accessibility/AccessibilityObject.h:
135         (AccessibilitySearchCriteria):
136         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
137         (AccessibilityObject):
138         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
139         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
140
141 2013-06-04  Roger Fong  <roger_fong@apple.com>
142
143         Unreviewed. Rollout of r151146. Broke some tests.
144
145         * page/FrameView.cpp:
146         (WebCore::FrameView::forceLayoutForPagination):
147         * rendering/RenderBlock.cpp:
148         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
149         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
150         (WebCore::RenderBlock::layout):
151         * rendering/RenderBlock.h:
152         * rendering/RenderBox.cpp:
153         (WebCore::RenderBox::clearLayoutOverflow):
154         * rendering/RenderBox.h:
155         * rendering/RenderDeprecatedFlexibleBox.cpp:
156         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
157         * rendering/RenderGrid.cpp:
158         (WebCore::RenderGrid::layoutBlock):
159
160 2013-06-04  Noam Rosenthal  <noam@webkit.org>
161
162         Refactor the code that decides whether to enable WebGL from settings to helper functions
163         https://bugs.webkit.org/show_bug.cgi?id=117181
164
165         This removes some #ifdef crud out of the getContext() function.
166
167         Reviewed by Benjamin Poulain.
168
169         * html/HTMLCanvasElement.cpp:
170         (WebCore::requiresAcceleratedCompositingForWebGL):
171         (WebCore::shouldEnableWebGL):
172         (WebCore::HTMLCanvasElement::getContext):
173
174 2013-06-04  Thiago Santos  <thiago.sousa.santos@collabora.com>
175
176         Prevent race when pad caps is set on gstreamer player
177         https://bugs.webkit.org/show_bug.cgi?id=115355
178
179         Reviewed by Philippe Normand.
180
181         Prevent race when pad caps is set on gstreamer player and
182         Also protect internal paint buffer with a mutex.
183
184         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
185         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
186         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
187         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
188         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
189         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
190         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
191         (MediaPlayerPrivateGStreamerBase):
192
193 2013-06-04  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
194
195         [Qt] Fix a crash in QtPixmapRuntime.
196         https://bugs.webkit.org/show_bug.cgi?id=117193
197         https://bugreports.qt-project.org/browse/QTBUG-30736
198
199         Reviewed by Allan Sandfeld Jensen.
200
201         The crash could only be reproduced in release builds on Windows.
202         JSClassCreate calculates the size of JSClassDefinition.staticValues
203         and staticFunctions by iterating until an entry with a null name is found.
204
205         * bridge/qt/qt_pixmapruntime.cpp:
206         (JSC::Bindings::QtPixmapRuntime::getClassRef):
207
208 2013-06-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
209
210         Automatically generate WorkerContext constructor attributes
211         https://bugs.webkit.org/show_bug.cgi?id=117183
212
213         Reviewed by Kentaro Hara.
214
215         Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker] IDL extended attribute
216         to indicate to the bindings generator on which global context the constructor
217         attribute should be generated for interfaces without [NoInterfaceObject]:
218         - WindowOnly: only on the global Window object (default if ommitted)
219         - WorkerOnly: only on the worker context
220         - WindowAndWorker: On both the global Window object and the worker context
221
222         This covers all the current use cases.
223
224         The JSC bindings generator now automatically generates the Constructor attributes
225         on the WorkerContext for non-callback interfaces which do not have the
226         [NoInterfaceObject] extended attribute but have [GlobalContext=WorkerOnly|WindowAndWorker]
227         extended attribute.
228
229         No new tests, already covered by:
230         fast/js/global-constructors-attributes.html
231         fast/js/global-constructors-attributes-worker.html
232
233         * CMakeLists.txt:
234         * DerivedSources.make: Pass new --workerContextConstructorsFile argument to preprocess-idls.pl.
235         * DerivedSources.pri: Ditto.
236         * GNUmakefile.am: Ditto.
237         * PlatformBlackBerry.cmake: Ditto.
238         * UseJSC.cmake: Ditto.
239         * bindings/scripts/IDLAttributes.txt: Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]
240         IDL extended attribute.
241         * bindings/scripts/preprocess-idls.pl: Add support for [GlobalContext] extended attribute and
242         generate a partial interface for WorkerContext global constructors that are automatically
243         generated.
244         * dom/MessageEvent.idl: Add [GlobalContext=WindowAndWorker].
245         * fileapi/Blob.idl: Add [GlobalContext=WindowAndWorker].
246         * fileapi/FileReader.idl: Add [GlobalContext=WindowAndWorker].
247         * fileapi/FileReaderSync.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
248         as the interface should only be visible in worker environment as per the spec.
249         * html/DOMURL.idl: Add [GlobalContext=WindowAndWorker].
250         * html/canvas/ArrayBuffer.idl: Add [GlobalContext=WindowAndWorker].
251         * html/canvas/DataView.idl: Add [GlobalContext=WindowAndWorker].
252         * html/canvas/Float32Array.idl: Add [GlobalContext=WindowAndWorker].
253         * html/canvas/Float64Array.idl: Add [GlobalContext=WindowAndWorker].
254         * html/canvas/Int16Array.idl: Add [GlobalContext=WindowAndWorker].
255         * html/canvas/Int32Array.idl: Add [GlobalContext=WindowAndWorker].
256         * html/canvas/Int8Array.idl: Add [GlobalContext=WindowAndWorker].
257         * html/canvas/Uint16Array.idl: Add [GlobalContext=WindowAndWorker].
258         * html/canvas/Uint32Array.idl: Add [GlobalContext=WindowAndWorker].
259         * html/canvas/Uint8Array.idl: Add [GlobalContext=WindowAndWorker].
260         * html/canvas/Uint8ClampedArray.idl: Add [GlobalContext=WindowAndWorker].
261         * workers/WorkerContext.idl: Remove several Constructor attributes which are now automatically
262         generated.
263         * workers/WorkerLocation.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
264         as the interface should only be visible in worker environment as per the spec.
265
266 2013-06-04  Kangil Han  <kangil.han@samsung.com>
267
268         Use ASSERT_DISABLED option for assertion purpose code in InlineBox
269         https://bugs.webkit.org/show_bug.cgi?id=117146
270
271         Reviewed by Alexey Proskuryakov.
272
273         We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
274
275         * rendering/InlineBox.cpp:
276         (WebCore::InlineBox::~InlineBox):
277         (WebCore::InlineBox::destroy):
278         (WebCore::InlineBox::operator delete):
279         * rendering/InlineBox.h:
280         (WebCore::InlineBox::InlineBox):
281
282 2013-06-04  Kent Tamura  <tkent@chromium.org>
283
284         Fix an assertion failure in Range::textNodeSplit by Text::splitText
285         https://bugs.webkit.org/show_bug.cgi?id=116509
286
287         Reviewed by Ryosuke Niwa.
288
289         Range::textNodeSplit is called in Text::splitText, and it assumes the
290         next sibling node is still a Text node. A DOM mutation event handler can
291         break this assumption.
292
293         We had better postpone DOM mutation events dispatched in Node::insertBefore
294         until exiting splitText to avoid inconsistent Range state.
295
296         This imports http://src.chromium.org/viewvc/blink?view=revision&revision=150493 .
297
298         Test: fast/dom/Range/split-text-in-range.html
299
300         * dom/Text.cpp:
301         (WebCore::Text::splitText): Add EventQueueScope.
302
303 2013-06-03  Kangil Han  <kangil.han@samsung.com>
304
305         Remove unused arithmetic operation in RenderListItem
306         https://bugs.webkit.org/show_bug.cgi?id=117175
307
308         Reviewed by Brent Fulgham.
309
310         Variable 'markerLogicalLeft' is reassigned a value before the old one has been used.
311
312         * rendering/RenderListItem.cpp:
313         (WebCore::RenderListItem::positionListMarker):
314
315 2013-06-03  Roger Fong  <roger_fong@apple.com>
316
317         Unreviewed. Some AppleWin VS2010 house cleaning.
318
319         * WebCore.vcxproj/build-generated-files.sh:
320
321 2013-06-03  Roger Fong  <roger_fong@apple.com>
322
323         clearLayoutOverflow should never be called before calling layer()->updateScrollInfoAfterLayout().
324         https://bugs.webkit.org/show_bug.cgi?id=116689.
325
326         Reviewed by Ojan Vafai.
327
328         Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
329         Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic together.
330
331         Test: fast/flexbox/clear-overflow-before-scroll-update.html
332
333         * rendering/RenderBlock.cpp:
334         (WebCore::RenderBlock::layout): Remove call to clearLayoutOverflow.
335         (WebCore::RenderBlock::finishDelayUpdateScrollInfo): Add call to clearLayoutOverflow.
336         (WebCore::RenderBlock::updateScrollInfoAfterLayout): Ditto.
337         (WebCore::RenderBlock::clearLayoutOverflow): ASSERT(!gDelayUpdateScrollInfo) and move from RenderBox to RenderBlock to keep delayed scroll update logic together.
338         * rendering/RenderBlock.h:
339         (RenderBlock):
340         * rendering/RenderBox.cpp:
341         * rendering/RenderBox.h:
342         (WebCore::RenderBox::layoutOverflowRect): Remove from layoutOverflowRect.
343         (RenderBox): 
344         * rendering/RenderDeprecatedFlexibleBox.cpp:
345         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): This should call updateScrollInfoAfterLayout() intead of directly calling layer()->updateScrollInfoAfterLayout().
346         * rendering/RenderGrid.cpp:
347         (WebCore::RenderGrid::layoutBlock): Ditto.
348
349 2013-05-31  Anders Carlsson  <andersca@apple.com>
350
351         Take the normal NSView code path when drawing into an inclusive layer
352         https://bugs.webkit.org/show_bug.cgi?id=117094
353         <rdar://problem/13812355>
354
355         Reviewed by Sam Weinig.
356
357         For now, take the normal code path when drawing into an inclusive layer.
358
359         * platform/mac/WidgetMac.mm:
360         (WebCore::Widget::paint):
361
362 2013-05-31  Tiancheng Jiang  <tijiang@rim.com>
363
364         [BlackBerry] Update Button UX.
365         https://bugs.webkit.org/show_bug.cgi?id=116992
366
367         Reviewed by Rob Buis.
368
369         BlackBerry PR 342298.
370         Internally Review by Jeff Rogers.
371
372         * css/themeBlackBerry.css:
373
374 2013-05-31  David Kilzer  <ddkilzer@apple.com>
375
376         DerivedSources.make: any rules that use $(FEATURE_DEFINES) should be rebuilt when FeatureDefines.xcconfig changes
377         <http://webkit.org/b/117081>
378
379         Reviewed by Mark Rowe.
380
381         * DerivedSources.make: Add $(PLATFORM_FEATURE_DEFINES)
382         dependency for all rules that use $(FEATURE_DEFINES) to generate
383         files.
384         (PLATFORM_FEATURE_DEFINES): Set this variable to
385         Configurations/FeatureDefines.xcconfig if not already set on
386         Mac OS X.
387
388 2013-05-31  Tiancheng Jiang  <tijiang@rim.com>
389
390         Text Field UX updates.
391         https://bugs.webkit.org/show_bug.cgi?id=116996
392
393         Reviewed by Rob Buis.
394
395         BlackBerry PR 342333.
396         Internally Reviewed by Jeff Rogers.
397
398         Update disabled text field font color.
399
400         * css/themeBlackBerry.css:
401
402 2013-05-31  Dean Jackson  <dino@apple.com>
403
404         Update CheckedInt.h to latest version from Mozilla
405         https://bugs.webkit.org/show_bug.cgi?id=117009
406
407         Reviewed by Darin Adler.
408
409         Mozilla have updated their version of CheckedInt and suggested
410         we sync. Here are the improvements:
411
412         - CheckedInt now consistently rejects unsupported types. Before, you
413         could sometimes construct a CheckedInt from an unsupported type (like,
414         float) or multiply a CheckedInt by a float, and have it not caught! See
415         https://bugzilla.mozilla.org/show_bug.cgi?id=869194
416          - Fixed a possibility of undefined behavior in unary operator-. See bug
417         https://bugzilla.mozilla.org/show_bug.cgi?id=849666
418          - CheckedInt now supports the "long long" and "unsigned long long"
419         types. We don't like "long long" (and neither does the Google C++ style
420         guide!) but we had to do that because libogg exposes typedefs to those
421         types. See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=869685
422          - CheckedInt also now supports "signed char" in addition to "char" ---
423         they are not the same type! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=847521
424          - Fixed and simplified usage of CheckedInt outside of Mozilla. You'll
425         like this one! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=849667
426          - Fixed compilation with the Intel C++ compiler. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=784309
427
428         * html/canvas/CheckedInt.h: Updated.
429
430 2013-05-31  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
431
432         Make sure gstreamer source element is thread-safe
433         https://bugs.webkit.org/show_bug.cgi?id=115352
434
435         Reviewed by Philippe Normand.
436
437         GStreamer source element may be created by any gstreamer element on any thread by calling
438         gst_element_make_from_uri with the URIs handled by the source element.
439         This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
440         being created outside the main thread.
441
442         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
443         (_WebKitWebSrcPrivate):
444         (webkit_web_src_init):
445         (webKitWebSrcFinalize):
446         (webKitWebSrcSetProperty):
447         (webKitWebSrcGetProperty):
448         (webKitWebSrcStop):
449         (webKitWebSrcStart):
450         (webKitWebSrcChangeState):
451         (webKitWebSrcQueryWithParent):
452         (webKitWebSrcGetUri):
453         (webKitWebSrcSetUri):
454         (webKitWebSrcNeedDataMainCb):
455         (webKitWebSrcEnoughDataMainCb):
456         (webKitWebSrcSeekMainCb):
457         (webKitWebSrcSeekDataCb):
458         (webKitWebSrcSetMediaPlayer):
459         (StreamingClient::StreamingClient):
460         (StreamingClient::~StreamingClient):
461         (StreamingClient::didReceiveResponse):
462         (StreamingClient::didReceiveData):
463         (StreamingClient::didFinishLoading):
464         (StreamingClient::wasBlocked):
465         (StreamingClient::cannotShowURL):
466
467 2013-05-31  Sergio Villar Senin  <svillar@igalia.com>
468
469         Build fix when CSSParser debugging is enabled
470         https://bugs.webkit.org/show_bug.cgi?id=117075
471
472         Reviewed by Andreas Kling.
473
474         Build fails when enabling parser debugging by setting YYDEBUG to
475         1 because of a missing include.
476
477         * css/CSSGrammar.y.includes:
478
479 2013-05-31  Alberto Garcia  <agarcia@igalia.com>
480
481         [Soup] [Gstreamer] ASSERT in StreamingClient::getOrCreateReadBuffer
482         https://bugs.webkit.org/show_bug.cgi?id=116686
483
484         Reviewed by Carlos Garcia Campos.
485
486         We were using g_input_stream_read_async() to handle redirections
487         because of Gnome bug #691489.
488
489         This produces an unexpected read attempt which triggers an assert
490         in StreamingClient::getOrCreateReadBuffer().
491
492         Now that the Gnome bug is fixed we can replace read_async() with
493         skip_async().
494
495         * platform/network/soup/ResourceHandleSoup.cpp:
496         (WebCore::ResourceHandle::ensureReadBuffer):
497         (WebCore::redirectSkipCallback):
498         (WebCore::sendRequestCallback):
499
500 2013-05-30  Eugene Klyuchnikov  <eustas@chromium.org>
501
502         selectionStart/selectionEnd return "obsolete" values when requested during "input" event
503         https://bugs.webkit.org/show_bug.cgi?id=110742
504
505         Reviewed by Ryosuke Niwa.
506
507         This patch defers firing "webkitEditableContentChanged" until new
508         selection is applied to control. This makes selection during "input"
509         more consistent and reliable.
510
511         Background: "input" event is fired by "webkitEditableContentChanged"
512         dispatcher. But "input" is scoped event, so under some conditions its
513         dispatching may be deferred. When "input" dispatching is deferred,
514         dispatcher observes updated selectionStart and selectionEnd.
515         Otherwise values repersent state before applying editing command.
516
517         So, to make selectionStart/End to be more predictable and useful, we
518         need either always dispatch "input" before selection is updated, or
519         always dispatch "input" after selection is updated.
520
521         As it was mentioned, dispatching could be deferred by scoping. So
522         dispatching before updating selection couldn't be guaranteed.
523         Moreover, it will be hard to calculate updated selection in user
524         code. On the other side - old selection could be easily tracked.
525
526         So, it looks logically that we should guarantee dispatching "input"
527         after updating selection. There are no execution paths in
528         "webkitEditableContentChanged" dispatched that depends on current
529         selection. So it is safe to fire this event after selection is updated.
530
531         Test: editing/selection/caret-after-keypress.html
532
533         * editing/Editor.cpp:
534         Dispatch "input" event after new selection in applied.
535
536 2013-05-30  Ruth Fong  <ruth_fong@apple.com>
537
538         WebKit's Enter Full Screen for <video> elements isn't working
539         https://bugs.webkit.org/show_bug.cgi?id=117001
540
541         Reviewed by Jer Noble.
542
543         Fix workflow to allow a video to enter into full screen
544         mode from a kWKContextMenuItemTagEnterVideoFullscreen 
545         context menu item by denoting the enterFullscreenForVideo
546         call as a user gesture, so Document::requestFullScreenForElement
547         will execute correctly.
548
549         No new tests. Covered by media/context-menu-actions.html,
550         which is disabled due to bug #116651.
551
552         * rendering/HitTestResult.cpp:
553         (WebCore::HitTestResult::enterFullscreenForVideo):
554
555 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
556
557         Fix double hash lookup in RenderTableSection::paintObject loop
558         https://bugs.webkit.org/show_bug.cgi?id=117055
559
560         Reviewed by Antonio Gomes.
561
562         * rendering/RenderTableSection.cpp:
563         (WebCore::RenderTableSection::paintObject):
564
565 2013-05-31  Stephanie Lewis  <slewis@apple.com>
566
567         Update low memory handler to use new memory pressure notifications on new OS versions.
568         <rdar://problem/14027095>
569
570         Reviewed by Mark Rowe.
571
572         No change in functionality.
573
574         * WebCore.exp.in:
575         * platform/mac/MemoryPressureHandlerMac.mm:
576         (WebCore::MemoryPressureHandler::install): Call new API
577         * platform/mac/WebCoreSystemInterface.h: 
578         * platform/mac/WebCoreSystemInterface.mm:
579
580 2013-05-30  Rafael Brandao  <rafael.lobo@openbossa.org>
581
582         Fix double hash lookup in WebSocket::connect loop
583         https://bugs.webkit.org/show_bug.cgi?id=117052
584
585         Reviewed by Anders Carlsson.
586
587         * Modules/websockets/WebSocket.cpp:
588         (WebCore::WebSocket::connect):
589
590 2013-05-30  Benjamin Poulain  <bpoulain@apple.com>
591
592         Remove some 16bits conversion.
593         https://bugs.webkit.org/show_bug.cgi?id=116935
594
595         Reviewed by Darin Adler.
596
597         Merge chromium ce35a544d09e6cb907457535340eb0e9984e57b8.
598         https://chromium.googlesource.com/chromium/blink/+/ce35a544d09e6cb907457535340eb0e9984e57b8
599
600         * html/parser/InputStreamPreprocessor.h:
601         * platform/FileSystem.cpp:
602         (WebCore::encodeForFileName):
603
604 2013-05-30  Anders Carlsson  <andersca@apple.com>
605
606         REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
607         https://bugs.webkit.org/show_bug.cgi?id=117042
608         <rdar://problem/13916291>
609
610         Reviewed by Mark Rowe.
611
612         Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
613         Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
614         whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
615
616         * loader/cache/CachedScript.cpp:
617         (WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
618         * loader/cache/CachedScript.h:
619         * platform/RuntimeApplicationChecks.cpp:
620         (WebCore::applicationIsSolidStateNetworksDownloader):
621         * platform/RuntimeApplicationChecks.h:
622
623 2013-05-30  Sergio Villar Senin  <svillar@igalia.com>
624
625         Allow no space between "background-position:" dimensions
626         https://bugs.webkit.org/show_bug.cgi?id=116870
627
628         Reviewed by Darin Adler.
629
630         From Blink r149314 by <ericwilligers@chromium.org>
631
632         Specs allow no spaces between the dimensions of a
633         "background-position:" like "1px+1px", we should support
634         that.
635
636         Whitespaces are no longer early consumed, dramatically dropping
637         the shift/reduce conflicts to half. The productions unary_term,
638         calc_func_term, calc_func_expr and calc_func_paren_expr no longer
639         consume whitespaces.
640
641         * css/CSSGrammar.y.in:
642         * css/CSSParser.cpp:
643         (WebCore::CSSParser::realLex):
644
645 2013-05-30  Jer Noble  <jer.noble@apple.com>
646
647         HTMLMediaElement will not unthrottle page when playback stops for nreasons other than user-initiated pause.
648         https://bugs.webkit.org/show_bug.cgi?id=117016
649
650         Reviewed by Oliver Hunt.
651
652         Add a new class PageActivityAssertionToken to allow HTMLMediaElement to decouple
653         knowledge of and control over the lifetime of PageThrottler. The new class will
654         have weak references to and from the PageThrottler so that holders of the token
655         will not need to care if the Page or PageThrottler has been destroyed. 
656
657         HTMLMediaElement will create one of these PageActivityAssertionTokens when playback
658         begins and destroy it when playback stops for any reason, or when the element is
659         destroyed.
660
661         * html/HTMLMediaElement.cpp:
662         (WebCore::HTMLMediaElement::~HTMLMediaElement):
663         (WebCore::HTMLMediaElement::playInternal):
664         (WebCore::HTMLMediaElement::pauseInternal):
665         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
666         (WebCore::HTMLMediaElement::updatePlayState):
667         * html/HTMLMediaElement.h:
668         * page/Page.cpp:
669         (WebCore::createActivityToken): Added simple factory method.
670         * page/Page.h:
671         * page/PageActivityAssertionToken.cpp: 
672         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken): Call addActivityToken();
673         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken): Call removeActivityToken();
674         (WebCore::PageActivityAssertionToken::invalidate): Clear m_throttler.
675         * page/PageActivityAssertionToken.h:
676         * page/PageThrottler.cpp:
677         (WebCore::PageThrottler::~PageThrottler): Invalidate all outstanding tokens.
678         (WebCore::PageThrottler::addActivityToken): Bump the activity count.
679         (WebCore::PageThrottler::removeActivityToken): Lower the activity count.
680         * page/PageThrottler.h:
681
682         Add the new files to the various build systems:
683         * CMakeLists.txt:
684         * GNUmakefile.list.am:
685         * Target.pri:
686         * WebCore.vcproj/WebCore.vcproj:
687         * WebCore.vcxproj/WebCore.vcxproj:
688         * WebCore.vcxproj/WebCore.vcxproj.filters:
689         * WebCore.xcodeproj/project.pbxproj:
690
691 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
692
693         [Mac] Enable cache partitioning and the public suffix list on 10.8
694         <rdar://problem/13679019>
695
696         Rubber-stamped by David Kilzer.
697
698         * Configurations/FeatureDefines.xcconfig:
699
700 2013-05-30  Andreas Kling  <akling@apple.com>
701
702         Fix double hash lookup in DocumentEventQueue::cancelEvent().
703         <http://webkit.org/b/117031>
704
705         Reviewed by Anders Carlsson.
706
707         * dom/DocumentEventQueue.cpp:
708         (WebCore::DocumentEventQueue::cancelEvent):
709
710 2013-05-30  Andreas Kling  <akling@apple.com>
711
712         Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
713         <http://webkit.org/b/117030>
714
715         Reviewed by Anders Carlsson.
716
717         * loader/DocumentLoader.cpp:
718         (WebCore::DocumentLoader::removeSubresourceLoader):
719
720 2013-05-30  Andreas Kling  <akling@apple.com>
721
722         Fix double hash lookup in RenderView::repaintSelection() loop.
723         <http://webkit.org/b/117029>
724
725         Reviewed by Anders Carlsson.
726
727         * rendering/RenderView.cpp:
728         (WebCore::RenderView::repaintSelection):
729
730 2013-05-30  Peter Gal  <galpeter@inf.u-szeged.hu>
731
732         CURL: Incorrect stripping of query from file URL
733         https://bugs.webkit.org/show_bug.cgi?id=104307
734
735         Reviewed by Darin Adler.
736
737         Clear the query part of the file URL if there is any.
738
739         * platform/network/curl/ResourceHandleManager.cpp:
740         (WebCore::ResourceHandleManager::initializeHandle):
741
742 2013-05-30  Antti Koivisto  <antti@apple.com>
743
744         Separate generic font family settings to a class
745         https://bugs.webkit.org/show_bug.cgi?id=117027
746
747         Reviewed by Andreas Kling.
748
749         The new class is under platform/ and can be accessed by the font code directly without platform violations.
750
751         * WebCore.xcodeproj/project.pbxproj:
752         * page/Settings.cpp:
753         (WebCore::invalidateAfterGenericFamilyChange):
754         (WebCore::Settings::Settings):
755         (WebCore::Settings::~Settings):
756         (WebCore::Settings::create):
757         (WebCore::Settings::standardFontFamily):
758         (WebCore::Settings::setStandardFontFamily):
759         (WebCore::Settings::fixedFontFamily):
760         (WebCore::Settings::setFixedFontFamily):
761         (WebCore::Settings::serifFontFamily):
762         (WebCore::Settings::setSerifFontFamily):
763         (WebCore::Settings::sansSerifFontFamily):
764         (WebCore::Settings::setSansSerifFontFamily):
765         (WebCore::Settings::cursiveFontFamily):
766         (WebCore::Settings::setCursiveFontFamily):
767         (WebCore::Settings::fantasyFontFamily):
768         (WebCore::Settings::setFantasyFontFamily):
769         (WebCore::Settings::pictographFontFamily):
770         (WebCore::Settings::setPictographFontFamily):
771         * page/Settings.h:
772         * platform/graphics/FontGenericFamilies.cpp: Added.
773         (WebCore::setGenericFontFamilyForScript):
774         (WebCore::genericFontFamilyForScript):
775         (WebCore::FontGenericFamilies::FontGenericFamilies):
776         (WebCore::FontGenericFamilies::standardFontFamily):
777         (WebCore::FontGenericFamilies::fixedFontFamily):
778         (WebCore::FontGenericFamilies::serifFontFamily):
779         (WebCore::FontGenericFamilies::sansSerifFontFamily):
780         (WebCore::FontGenericFamilies::cursiveFontFamily):
781         (WebCore::FontGenericFamilies::fantasyFontFamily):
782         (WebCore::FontGenericFamilies::pictographFontFamily):
783         (WebCore::FontGenericFamilies::setStandardFontFamily):
784         (WebCore::FontGenericFamilies::setFixedFontFamily):
785         (WebCore::FontGenericFamilies::setSerifFontFamily):
786         (WebCore::FontGenericFamilies::setSansSerifFontFamily):
787         (WebCore::FontGenericFamilies::setCursiveFontFamily):
788         (WebCore::FontGenericFamilies::setFantasyFontFamily):
789         (WebCore::FontGenericFamilies::setPictographFontFamily):
790         * platform/graphics/FontGenericFamilies.h: Added.
791         (WebCore::UScriptCodeHashTraits::emptyValue):
792         (WebCore::UScriptCodeHashTraits::constructDeletedValue):
793         (WebCore::UScriptCodeHashTraits::isDeletedValue):
794         (WebCore::FontGenericFamilies::create):
795
796 2013-05-30  Andreas Kling  <akling@apple.com>
797
798         Avoid using CSSOM style declarations in HTML editing.
799         <http://webkit.org/b/117019>
800
801         Reviewed by Antti Koivisto.
802
803         Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.
804
805         * css/CSSComputedStyleDeclaration.h:
806         * css/CSSComputedStyleDeclaration.cpp:
807         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
808         (WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
809         (WebCore::ComputedStyleExtractor::propertyMatches):
810         (WebCore::ComputedStyleExtractor::copyProperties):
811         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
812
813             Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.
814
815         (WebCore::CSSComputedStyleDeclaration::copyProperties):
816
817             Reimplemented to call ComputedStyleExtractor.
818
819         * css/CSSStyleDeclaration.h:
820         * css/PropertySetCSSStyleDeclaration.h:
821         * css/PropertySetCSSStyleDeclaration.cpp:
822         (WebCore::PropertySetCSSStyleDeclaration::copyProperties):
823
824             Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
825             ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.
826
827         * css/StylePropertySet.h:
828         * css/StylePropertySet.cpp:
829         (WebCore::MutableStylePropertySet::removeEquivalentProperties):
830
831             Added an overload that takes a ComputedStyleExtractor.
832             This code should move into EditingStyle.cpp, material for a follow-up patch.
833
834         * editing/ApplyStyleCommand.cpp:
835         (WebCore::toIdentifier):
836
837             Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.
838
839         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
840         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
841         (WebCore::highestEmbeddingAncestor):
842         * editing/EditingStyle.h:
843         * editing/EditingStyle.cpp:
844         (WebCore::editingStyleFromComputedStyle):
845         (WebCore::extractPropertyValue):
846         (WebCore::identifierForStyleProperty):
847         (WebCore::textColorFromStyle):
848         (WebCore::backgroundColorFromStyle):
849         (WebCore::EditingStyle::init):
850         (WebCore::EditingStyle::removeStyleAddedByNode):
851         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
852         (WebCore::EditingStyle::triStateOfStyle):
853         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
854         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
855         (WebCore::StyleChange::StyleChange):
856         (WebCore::fontWeightIsBold):
857         (WebCore::extractPropertiesNotIn):
858         (WebCore::getPropertiesNotIn):
859
860             Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
861             Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
862             and ComputedStyleExtractor inputs.
863
864 2013-05-30  Roland Takacs  <rtakacs@inf.u-szeged.hu>
865
866         Remove "hidden"=true from Inspector.json
867         https://bugs.webkit.org/show_bug.cgi?id=114116
868
869         Reviewed by Timothy Hatcher.
870
871         Remove "hidden"=true because it's a Chromium concept.
872         Patch created by Timothy Hatcher.
873
874         * inspector/Inspector.json:
875
876 2013-05-30  Kondapally Kalyan  <kalyan.kondapally@intel.com>
877
878         [EFL][EGL] Implement TransportSurface client.
879         https://bugs.webkit.org/show_bug.cgi?id=114122
880
881         Reviewed by Kenneth Rohde Christiansen.
882
883         Covered by existing WebGL tests.
884
885         This patch implements the client support for Transport
886         Surface with EGL backend using GLES2.
887
888         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
889         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
890         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
891         * platform/graphics/surfaces/efl/GLTransportSurface.h:
892         (GLTransportSurfaceClient):
893         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
894         (WebCore::GraphicsSurfacePrivate::initializeClient):
895         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
896         (WebCore):
897         (WebCore::EGLConfigSelector::surfaceClientConfig):
898         (WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
899         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
900         (WebCore):
901         (EGLConfigSelector):
902
903         Support for retrieving valid EGLConfig on client side.
904
905         * platform/graphics/surfaces/egl/EGLHelper.cpp:
906         (WebCore):
907         (WebCore::resolveDisplay):
908         (WebCore::EGLHelper::resolveEGLBindings):
909         (WebCore::EGLHelper::createEGLImage):
910         (WebCore::EGLHelper::destroyEGLImage):
911         (WebCore::EGLHelper::imageTargetTexture2DOES):
912         * platform/graphics/surfaces/egl/EGLHelper.h:
913
914         Helper functions to create and destroy EGLImage.
915
916         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
917         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
918         (WebCore):
919         (WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
920         (WebCore::EGLXTransportSurfaceClient::destroy):
921         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
922         (WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
923         (WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
924         (WebCore::EGLTextureFromPixmap::destroy):
925         (WebCore::EGLTextureFromPixmap::isValid):
926         (WebCore::EGLTextureFromPixmap::bindTexImage):
927         (WebCore::EGLTextureFromPixmap::reBindTexImage):
928         * platform/graphics/surfaces/egl/EGLXSurface.h:
929         (EGLXTransportSurfaceClient):
930
931         TransportSurfaceClient implementation.
932
933         (WebCore):
934         * platform/graphics/surfaces/glx/GLXSurface.cpp:
935         (WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
936         * platform/graphics/surfaces/glx/GLXSurface.h:
937         (GLXTransportSurfaceClient):
938         * platform/graphics/surfaces/glx/X11Helper.cpp:
939         (WebCore::X11Helper::createOffScreenWindow):
940         (WebCore):
941         (WebCore::X11Helper::createPixmap):
942         * platform/graphics/surfaces/glx/X11Helper.h:
943         (X11Helper):
944
945 2013-05-30  Mike West  <mkwst@chromium.org>
946
947         Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
948         https://bugs.webkit.org/show_bug.cgi?id=111700
949
950         Reviewed by Darin Adler.
951
952         Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
953         patch is an attempt to do better. It additionally brings the Inspector's
954         'String.prototype.trimMiddle' method into line, as the two methods do
955         more or less the same thing.
956
957         After a bit of discussion with Maciej and Daniel Bates on IRC, I've
958         settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
959         'String.prototype.centerEllipsizedToLength(number)' respectively.
960
961         No new tests are added, as this patch shouldn't have any visible effect
962         on the web. It's strictly an internal refactoring.
963
964         * Modules/websockets/WebSocket.cpp:
965         (WebCore::WebSocket::connect):
966         (WebCore::WebSocket::send):
967         * Modules/websockets/WebSocketChannel.cpp:
968         (WebCore::WebSocketChannel::send):
969         (WebCore::WebSocketChannel::fail):
970         * bindings/ScriptControllerBase.cpp:
971         (WebCore::ScriptController::canExecuteScripts):
972         * dom/Document.cpp:
973         (WebCore::Document::processHttpEquiv):
974         * dom/ScriptElement.cpp:
975         (WebCore::ScriptElement::executeScript):
976         * html/HTMLMediaElement.cpp:
977         (WebCore::HTMLMediaElement::canPlayType):
978         (WebCore::HTMLMediaElement::isSafeToLoadURL):
979         * loader/FrameLoader.cpp:
980         (WebCore::FrameLoader::submitForm):
981         (WebCore::FrameLoader::loadFrameRequest):
982         (WebCore::FrameLoader::commitProvisionalLoad):
983         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
984         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
985         (WebCore::createWindow):
986         * loader/MainResourceLoader.cpp:
987         (WebCore::MainResourceLoader::willSendRequest):
988         (WebCore::MainResourceLoader::responseReceived):
989         * loader/MixedContentChecker.cpp:
990         (WebCore::MixedContentChecker::logWarning):
991         * loader/appcache/ApplicationCacheGroup.cpp:
992         (WebCore::ApplicationCacheGroup::didReceiveResponse):
993         (WebCore::ApplicationCacheGroup::didFail):
994         * loader/cache/CachedResourceLoader.cpp:
995         (WebCore::CachedResourceLoader::canRequest):
996         (WebCore::CachedResourceLoader::requestResource):
997         (WebCore::CachedResourceLoader::loadResource):
998         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
999         * page/ContentSecurityPolicy.cpp:
1000         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
1001         (WebCore::CSPDirectiveList::allowScriptNonce):
1002         (WebCore::CSPDirectiveList::allowPluginType):
1003         * platform/KURL.cpp:
1004         (WebCore::KURL::stringCenterEllipsizedToLength):
1005         * platform/KURL.h:
1006             Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
1007             and adjust callsites accordingly.
1008         * inspector/front-end/CallStackSidebarPane.js:
1009         (WebInspector.CallStackSidebarPane.Placard.prototype._update):
1010         * inspector/front-end/ElementsTreeOutline.js:
1011         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
1012         * inspector/front-end/HeapSnapshotGridNodes.js:
1013         (WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
1014         * inspector/front-end/Linkifier.js:
1015         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
1016         * inspector/front-end/ResourceUtils.js:
1017         (WebInspector.linkifyURLAsNode):
1018         * inspector/front-end/TabbedEditorContainer.js:
1019         (WebInspector.TabbedEditorContainer.prototype._titleForFile):
1020         * inspector/front-end/utilities.js:
1021             Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
1022             and adjust callsites accordingly.
1023
1024 2013-05-30  Antti Koivisto  <antti@apple.com>
1025
1026         Rename FontFallbackList.cpp/h to FontGlyphs.cpp/h
1027         https://bugs.webkit.org/show_bug.cgi?id=117022
1028
1029         Reviewed by Andreas Kling.
1030
1031         Rename to match the class name.
1032
1033         * CMakeLists.txt:
1034         * GNUmakefile.list.am:
1035         * Target.pri:
1036         * WebCore.vcproj/WebCore.vcproj:
1037         * WebCore.vcxproj/WebCore.vcxproj:
1038         * WebCore.vcxproj/WebCore.vcxproj.filters:
1039         * WebCore.xcodeproj/project.pbxproj:
1040         * platform/graphics/Font.h:
1041         * platform/graphics/FontCache.cpp:
1042         * platform/graphics/FontFallbackList.cpp: Removed.
1043         * platform/graphics/FontFallbackList.h: Removed.
1044         * platform/graphics/FontFastPath.cpp:
1045         * platform/graphics/FontGlyphs.cpp: Copied from Source/WebCore/platform/graphics/FontFallbackList.cpp.
1046         * platform/graphics/FontGlyphs.h: Copied from Source/WebCore/platform/graphics/FontFallbackList.h.
1047         * platform/graphics/mac/FontComplexTextMac.cpp:
1048
1049 2013-05-30  Ryosuke Niwa  <rniwa@webkit.org>
1050
1051         Get rid of Position::computedStyle
1052         https://bugs.webkit.org/show_bug.cgi?id=117024
1053
1054         Reviewed by Andreas Kling.
1055
1056         Removed the function.
1057
1058         * dom/Position.cpp:
1059         * dom/Position.h:
1060         * editing/ApplyStyleCommand.cpp:
1061         (WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): We need a position
1062         inside the dummy element since we'll get the containing element's style instead
1063         if we had the position before the dummy element.
1064         * editing/EditingStyle.cpp:
1065         (WebCore::StyleChange::StyleChange):
1066
1067 2013-05-30  Seokju Kwon  <seokju.kwon@gmail.com>
1068
1069         Remove obsolete forward declaration from InspectorFrontendHost.h
1070         https://bugs.webkit.org/show_bug.cgi?id=117017
1071
1072         Reviewed by Joseph Pecoraro.
1073
1074         Remove obsolete forward declaration and fix style issue as well.
1075
1076         No change in behavior, no new tests.
1077
1078         * inspector/InspectorFrontendHost.h:
1079         (WebCore):
1080         (InspectorFrontendHost):
1081
1082 2013-05-29  Tim Horton  <timothy_horton@apple.com>
1083
1084         Expose incrementalRenderingSuppressionTimeout via WK2
1085         https://bugs.webkit.org/show_bug.cgi?id=117015
1086         <rdar://problem/13992853>
1087
1088         Reviewed by Darin Adler.
1089
1090         * dom/Document.cpp:
1091         (WebCore::Document::setVisualUpdatesAllowed):
1092         Inform the FrameLoader that we're ready to transition the page, if
1093         nothing else already has. This will be forwarded to the FrameLoaderClient,
1094         and WebKit2's implementation will go ahead and un-freeze the layer tree,
1095         so that the incremental rendering suppression watchdog timer actually works.
1096
1097         (WebCore::Document::setVisualUpdatesAllowedByClient):
1098         Make incremental rendering suppression extension tokens play nice with the
1099         watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
1100         if either the page is in the "completed" state or the watchdog has already fired.
1101
1102         * loader/FrameLoader.cpp:
1103         * loader/FrameLoader.h:
1104         (WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
1105         Forward to the client.
1106
1107         * loader/FrameLoaderClient.h:
1108         (WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
1109
1110 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
1111
1112         ProgressEvent should not be cancelable
1113         https://bugs.webkit.org/show_bug.cgi?id=114444
1114
1115         Reviewed by Darin Adler.
1116
1117         Parameter "cancelable" in ProgressEvent is set to false, by default, as mentioned in the specification. The spec link is given below.
1118
1119         Spec: http://www.w3.org/TR/2011/CR-progress-events-20110922/#suggested-names-for-events-using-the-progressevent-interface
1120
1121         No new tests. file-reader-event-listener.html and infoOnProgressEvent-expected.txt are updated.
1122
1123         * dom/ProgressEvent.cpp:
1124         (WebCore::ProgressEvent::ProgressEvent):
1125         (WebCore):
1126
1127 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
1128
1129         Fix paint-related milestones to not fire when the layer tree is frozen
1130         https://bugs.webkit.org/show_bug.cgi?id=117012
1131
1132         Reviewed by Tim Horton.
1133
1134         In the previous code, it was possible to paint some layer and schedule
1135         the m_paintRelatedMilestonesTimer, but then the layer tree was put into
1136         a frozen state because the page redirected. However, the paint-related
1137         milestones timer would still fire. This caused woes with header/footer
1138         banners.
1139         
1140         Fix by not firing paint-related milestones if the layer tree is frozen,
1141         which we know via a new ChromeClient callback. When unfrozen, we'll
1142         paint again, and fire the timer later.
1143
1144         * page/ChromeClient.h:
1145         (WebCore::ChromeClient::layerTreeStateIsFrozen):
1146         * rendering/RenderLayerCompositor.cpp:
1147         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
1148
1149 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1150
1151         Store form control list with RefPtr
1152         https://bugs.webkit.org/show_bug.cgi?id=116910
1153
1154         Reviewed by Kent Tamura.
1155
1156         Merge https://chromium.googlesource.com/chromium/blink/+/582132773280455ead1d42b0073be37efdeaf989.
1157
1158         Unfortunately, the Blink change doesn't provide much insight as to what kind of crashes are fixed
1159         by this code change but it cleans up the way form elements with state are registered to the form
1160         controller so it seems benefitial to merge it anyway.
1161
1162         * dom/Document.cpp:
1163         (WebCore::Document::dispose):
1164         * html/FormController.cpp:
1165         (WebCore::FormController::createSavedFormStateMap):
1166         (WebCore::FormController::registerFormElementWithState):
1167         (WebCore::FormController::unregisterFormElementWithState):
1168         (WebCore):
1169         * html/FormController.h:
1170         (FormController):
1171         * html/HTMLFormControlElementWithState.cpp:
1172         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
1173         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
1174         (WebCore::HTMLFormControlElementWithState::insertedInto):
1175         (WebCore):
1176         (WebCore::HTMLFormControlElementWithState::removedFrom):
1177         * html/HTMLFormControlElementWithState.h:
1178         (HTMLFormControlElementWithState):
1179         * html/HTMLTextFormControlElement.cpp:
1180         (WebCore::HTMLTextFormControlElement::insertedInto):
1181
1182 2013-05-29  Andreas Kling  <akling@apple.com>
1183
1184         Take ComputedStyleExtractor for a spin.
1185         <http://webkit.org/b/116968>
1186
1187         Reviewed by Antti Koivisto.
1188
1189         Convert some editing and SVG code to use ComputedStyleExtractor instead of creating full
1190         blown CSSComputedStyleDeclaration objects.
1191
1192         * editing/ApplyStyleCommand.cpp:
1193         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1194         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1195         (WebCore::highestEmbeddingAncestor):
1196         (WebCore::ApplyStyleCommand::computedFontSize):
1197         * editing/EditingStyle.cpp:
1198         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1199         (WebCore::EditingStyle::textDirectionForSelection):
1200         (WebCore::getIdentifierValue):
1201         (WebCore::backgroundColorInEffect):
1202         * editing/EditingStyle.h:
1203         * svg/SVGAnimationElement.cpp:
1204         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
1205
1206 2013-05-29  Benjamin Poulain  <bpoulain@apple.com>
1207
1208         Add a special case for SelectorDataList::execute when there is only one selector
1209         https://bugs.webkit.org/show_bug.cgi?id=116891
1210
1211         Reviewed by Andreas Kling.
1212
1213         In the vast majority of cases, querySelector is called with a single selector.
1214
1215         This patch takes that input into account to improve the performance of
1216         SelectorDataList::execute(). For the case of a single selector, we avoid three
1217         branches executed for every node of the traversal.
1218
1219         This improves QuerySelector's time by 2.3%.
1220
1221         * dom/SelectorQuery.cpp:
1222         (WebCore::SelectorDataList::execute):
1223
1224 2013-05-29  Dean Jackson  <dino@apple.com>
1225
1226         -webkit-text-underline-position should not be inherited
1227         https://bugs.webkit.org/show_bug.cgi?id=116363
1228
1229         Reverting http://trac.webkit.org/changeset/150366
1230         It was an incorrect fix referring to an old specification.
1231
1232         * css/CSSProperty.cpp:
1233         (WebCore::CSSProperty::isInheritedProperty):
1234         * rendering/style/RenderStyle.h:
1235         * rendering/style/StyleRareInheritedData.cpp:
1236         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1237         (WebCore::StyleRareInheritedData::operator==):
1238         * rendering/style/StyleRareInheritedData.h:
1239         (StyleRareInheritedData):
1240         * rendering/style/StyleRareNonInheritedData.cpp:
1241         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1242         (WebCore::StyleRareNonInheritedData::operator==):
1243         * rendering/style/StyleRareNonInheritedData.h:
1244         (StyleRareNonInheritedData):
1245
1246 2013-05-29  Ryuan Choi  <ryuan.choi@samsung.com>
1247
1248         [CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
1249         https://bugs.webkit.org/show_bug.cgi?id=116899
1250
1251         Reviewed by Laszlo Gombos.
1252
1253         * CMakeLists.txt: Fixed if statement to escape when find command fails.
1254
1255 2013-05-28  Oliver Hunt  <oliver@apple.com>
1256
1257         Add more accurate activity state tracking
1258         https://bugs.webkit.org/show_bug.cgi?id=116893
1259
1260         Reviewed by Gavin Barraclough.
1261
1262         Add a hysteresis to Page activity throttling.  We do this
1263         through a PageThrottler class that now handles entering and
1264         exiting throttling state, and adds a hysteresis to we can
1265         limit the amount of on/off bouncing on the throttle.
1266
1267         Media elements now make use of this to disable timer throttling
1268         while they are playing, and plugins use it to momentarily bounce
1269         from throttled to unthrottled state.
1270
1271         * CMakeLists.txt:
1272         * GNUmakefile.list.am:
1273         * Target.pri:
1274         * WebCore.exp.in:
1275         * WebCore.vcproj/WebCore.vcproj:
1276         * WebCore.vcxproj/WebCore.vcxproj:
1277         * WebCore.vcxproj/WebCore.vcxproj.filters:
1278         * WebCore.xcodeproj/project.pbxproj:
1279         * html/HTMLMediaElement.cpp:
1280         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1281         (WebCore::HTMLMediaElement::pageThrottlerIfPossible):
1282         (WebCore):
1283         (WebCore::HTMLMediaElement::playInternal):
1284         (WebCore::HTMLMediaElement::pauseInternal):
1285         * html/HTMLMediaElement.h:
1286         (WebCore):
1287         * html/MediaController.cpp:
1288         (MediaController::unpause):
1289         * page/ChromeClient.h:
1290         (WebCore::ChromeClient::incrementActivePageCount):
1291         (WebCore::ChromeClient::decrementActivePageCount):
1292         (ChromeClient):
1293         * page/Page.cpp:
1294         (WebCore::Page::Page):
1295         (WebCore::Page::~Page):
1296         (WebCore::Page::setThrottled):
1297         * page/Page.h:
1298         (WebCore):
1299         (Page):
1300         (WebCore::Page::pageThrottler):
1301         * page/PageThrottleState.h: Added.
1302         * page/PageThrottler.cpp: Added.
1303         (WebCore):
1304         (WebCore::PageThrottler::PageThrottler):
1305         (WebCore::PageThrottler::~PageThrottler):
1306         (WebCore::PageThrottler::clearPage):
1307         (WebCore::PageThrottler::throttlePage):
1308         (WebCore::PageThrottler::unthrottlePage):
1309         (WebCore::PageThrottler::setThrottled):
1310         (WebCore::PageThrottler::preventThrottling):
1311         (WebCore::PageThrottler::allowThrottling):
1312         (WebCore::PageThrottler::stopThrottleHysteresisTimer):
1313         (WebCore::PageThrottler::reportInterestingEvent):
1314         (WebCore::PageThrottler::startThrottleHysteresisTimer):
1315         (WebCore::PageThrottler::throttleHysteresisTimerFired):
1316         * page/PageThrottler.h: Added.
1317         (WebCore):
1318         (PageThrottler):
1319         (WebCore::PageThrottler::create):
1320         (WebCore::PageThrottler::shouldThrottleAnimations):
1321         (WebCore::PageThrottler::shouldThrottleTimers):
1322
1323 2013-05-29  Kent Tamura  <tkent@chromium.org>
1324
1325         Remove leftover files for ENABLE_PAGE_POPUP and ENABLE_CALENDAR_PICKER
1326         https://bugs.webkit.org/show_bug.cgi?id=116999
1327
1328         Reviewed by Anders Carlsson.
1329
1330         * Resources/pagepopups/colorSuggestionPicker.css: Removed.
1331         * Resources/pagepopups/colorSuggestionPicker.js: Removed.
1332         * Resources/pagepopups/pickerCommon.css: Removed.
1333         * Resources/pagepopups/pickerCommon.js: Removed.
1334         * Resources/pagepopups/suggestionPicker.css: Removed.
1335         * Resources/pagepopups/suggestionPicker.js: Removed.
1336
1337 2013-05-29  Jer Noble  <jer.noble@apple.com>
1338
1339         Unreviewed build fix; remove unintentional semicolon.
1340
1341         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1342         (WebCore::AudioScheduledSourceNode::finish):
1343
1344 2013-05-29  Anders Carlsson  <andersca@apple.com>
1345
1346         Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
1347         https://bugs.webkit.org/show_bug.cgi?id=117000
1348
1349         Reviewed by Oliver Hunt.
1350
1351         * platform/PODArena.h:
1352         (WebCore::PODArena::roundUp):
1353         * platform/PODFreeListArena.h:
1354         (PODFreeListArena):
1355         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
1356         (FreeListChunk):
1357         (WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
1358         (WebCore::PODFreeListArena::FreeListChunk::allocate):
1359
1360 2013-05-29  Anders Carlsson  <andersca@apple.com>
1361
1362         Move some PODArena members to PODFreeListArena
1363         https://bugs.webkit.org/show_bug.cgi?id=116993
1364
1365         Reviewed by Sam Weinig.
1366
1367         This is more work towards merging the two classes.
1368
1369         * platform/PODArena.h:
1370         (PODArena):
1371         * platform/PODFreeListArena.h:
1372         (PODFreeListArena):
1373         (WebCore::PODFreeListArena::PODFreeListArena):
1374
1375 2013-05-29  Jer Noble  <jer.noble@apple.com>
1376
1377         [Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
1378         https://bugs.webkit.org/show_bug.cgi?id=116986
1379
1380         Reviewed by Eric Carlson.
1381
1382         Keep a count of the number of in-flight seek requests, and only issue a timeupdate
1383         (which triggers a "seeked" event) when the final seek completes.
1384
1385         Test: media/video-seek-multiple.html
1386
1387         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1388         (WebCore::MediaPlayerPrivateAVFoundation::seek):
1389         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
1390         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1391         (MediaPlayerPrivateAVFoundation):
1392
1393 2013-05-29  Anders Carlsson  <andersca@apple.com>
1394
1395         Remove unused code from PODArena
1396         https://bugs.webkit.org/show_bug.cgi?id=116990
1397
1398         Reviewed by Sam Weinig.
1399
1400         PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
1401         members protected to make it impossible to use it without subclassing.
1402
1403         PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
1404         This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
1405         this is a small step towards that goal.
1406
1407         * platform/PODArena.h:
1408
1409 2013-05-29  Darin Adler  <darin@apple.com>
1410
1411         Remove custom binding for Clipboard setDragImage function
1412         https://bugs.webkit.org/show_bug.cgi?id=116422
1413
1414         Reviewed by Sam Weinig.
1415
1416         * bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
1417
1418         * dom/Clipboard.cpp:
1419         (WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
1420         and drop clipboard. That used to be checked in the setDragImage binding.
1421         (WebCore::Clipboard::setDragImage): Added a version that takes an Element
1422         and calls through to the existing functions (in the legacy code path), or handles
1423         both the Element and HTMLImageElement not-in-document cases (in the new code path).
1424
1425         * dom/Clipboard.h: Updated for changes above.
1426
1427         * dom/Clipboard.idl: Removed [Custom] from setDragImage.
1428
1429         * page/EventHandler.cpp:
1430         (WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
1431         old setDragImageElement.
1432
1433 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
1434
1435         Cleanup AudioSourceNode.idl from WebKit build.
1436         https://bugs.webkit.org/show_bug.cgi?id=116905.
1437
1438         Reviewed by Darin Adler.
1439
1440         AudioSourceNode.idl is not part of WebAudio Specifications anymore.
1441         AudioNode is inherited directly in all the audio source nodes.
1442
1443         No new tests. Current test cases will cover all the scenarios.
1444
1445         * CMakeLists.txt:
1446         * DerivedSources.make:
1447         * DerivedSources.pri:
1448         * GNUmakefile.list.am:
1449         * Modules/webaudio/AudioBufferSourceNode.h:
1450         * Modules/webaudio/AudioBufferSourceNode.idl:
1451         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1452         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
1453         * Modules/webaudio/AudioScheduledSourceNode.h:
1454         * Modules/webaudio/AudioSourceNode.h: Removed.
1455         * Modules/webaudio/AudioSourceNode.idl: Removed.
1456         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
1457         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
1458         * Modules/webaudio/MediaElementAudioSourceNode.h:
1459         (MediaElementAudioSourceNode):
1460         * Modules/webaudio/MediaElementAudioSourceNode.idl:
1461         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
1462         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
1463         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
1464         * Modules/webaudio/MediaStreamAudioSourceNode.h:
1465         (MediaStreamAudioSourceNode):
1466         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
1467         * Modules/webaudio/OscillatorNode.h:
1468         * Modules/webaudio/OscillatorNode.idl:
1469         * Target.pri:
1470         * WebCore.xcodeproj/project.pbxproj:
1471
1472 2013-05-29  Adam Barth  <abarth@webkit.org>
1473
1474         Optimize RenderText::offsetNext for 8 bit strings
1475         https://bugs.webkit.org/show_bug.cgi?id=116877
1476
1477         Reviewed by Darin Adler.
1478
1479         Previously, this function was always upconverting strings to 16 bits in
1480         order to create a cursorMovementIterator. This patch adds a fast path
1481         for ASCII and Latin-1 strings, which don't need this complicated cursor
1482         movement logic.
1483
1484         I ran into this code because nextOffset showed up as a memory pig on a
1485         memory profile of Mobile Gmail.
1486
1487         Test: editing/selection/move-by-character-brute-force.html
1488
1489         * rendering/RenderText.cpp:
1490         (WebCore::RenderText::previousOffset):
1491         (WebCore::RenderText::nextOffset):
1492
1493 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1494
1495         [Windows] Correct copy command (form versus forms)
1496
1497         * WebCore.vcproj/copyForwardingHeaders.cmd:
1498         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1499
1500 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1501
1502         [CSS Shapes] Fix style issues in BasicShapes
1503         https://bugs.webkit.org/show_bug.cgi?id=116734
1504
1505         Reviewed by Alexandru Chiculita.
1506
1507         Fix indentation in BasicShapes.cpp, and change enums to respect the
1508         style rules CamelCase instead of HAVING_UNDERSCORES.
1509
1510         No new tests, only style changes.
1511
1512         * css/BasicShapeFunctions.cpp:
1513         (WebCore::valueForBasicShape):
1514         (WebCore::basicShapeForValue):
1515         * css/CSSBasicShapes.cpp:
1516         (WebCore::buildRectangleString):
1517         (WebCore::CSSBasicShapeRectangle::equals):
1518         (WebCore::CSSBasicShapeCircle::equals):
1519         (WebCore::CSSBasicShapeEllipse::equals):
1520         (WebCore::CSSBasicShapePolygon::equals):
1521         (WebCore::CSSBasicShapeInsetRectangle::equals):
1522         * css/CSSBasicShapes.h:
1523         (WebCore::CSSBasicShapeRectangle::type):
1524         (WebCore::CSSBasicShapeInsetRectangle::type):
1525         (WebCore::CSSBasicShapeCircle::type):
1526         (WebCore::CSSBasicShapeEllipse::type):
1527         (WebCore::CSSBasicShapePolygon::type):
1528         * rendering/ExclusionShape.cpp:
1529         (WebCore::ExclusionShape::createExclusionShape):
1530         * rendering/ExclusionShapeInsideInfo.cpp:
1531         (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
1532         * rendering/ExclusionShapeOutsideInfo.cpp:
1533         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
1534         * rendering/style/BasicShapes.cpp:
1535         (WebCore::BasicShape::canBlend):
1536         (WebCore::BasicShapeRectangle::path):
1537         (WebCore::BasicShapeCircle::path):
1538         (WebCore::BasicShapeEllipse::path):
1539         (WebCore::BasicShapeInsetRectangle::path):
1540         * rendering/style/BasicShapes.h:
1541         (WebCore::BasicShapeRectangle::type):
1542         (WebCore::BasicShapeCircle::type):
1543         (WebCore::BasicShapeEllipse::type):
1544         (WebCore::BasicShapePolygon::type):
1545         (WebCore::BasicShapeInsetRectangle::type):
1546
1547 2013-05-29  Otto Derek Cheung  <otcheung@rim.com>
1548
1549         [BlackBerry] Handle Host-Only cookies
1550         https://bugs.webkit.org/show_bug.cgi?id=116969
1551
1552         PR 338809
1553         Reviewed by Rob Buis.
1554         Internally Reviewed by Joe Mason.
1555
1556         Adding support for host-only cookies (cookies with no
1557         specified domains). These cookies should only be returned
1558         when the host matches the cookie domain exactly.
1559
1560         Tested using Opera and Browser cookie test suite. Tested
1561         that host cookies are being stored in it's own map using
1562         Web Inspector.
1563
1564         * platform/blackberry/CookieManager.cpp:
1565         (WebCore::CookieManager::getRawCookies):
1566         (WebCore::CookieManager::checkAndTreatCookie):
1567         (WebCore::CookieManager::findOrCreateCookieMap):
1568         * platform/blackberry/CookieParser.cpp:
1569         (WebCore::CookieParser::CookieParser):
1570         (WebCore::CookieParser::parseOneCookie):
1571         * platform/blackberry/ParsedCookie.h:
1572         (WebCore::ParsedCookie::isHostOnly):
1573         (ParsedCookie):
1574
1575 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1576
1577         Remove the size of DataVector in HTMLToken
1578         https://bugs.webkit.org/show_bug.cgi?id=116931
1579
1580         Reviewed by Sam Weinig.
1581
1582         Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
1583
1584         Shink HTMLToken by 1.5 kB
1585
1586         HTMLToken has an inline vector for buffering characters during tokenization. We
1587         originally picked the inline capacity of this buffer somewhat arbitrarily. This
1588         CL tunes the number based on a somewhat non-scientific browse of a number of
1589         popular web sites.
1590
1591         I (abarth) instrumented content_shell to log the length of each complete DataVector. I
1592         then browsed around a variety of web sites to collect data. The 99% percentile
1593         of DataVector lengths was just shy of 250 characters. I rounded that up to 256
1594         because powers of two are pretty. That means we'll malloc an external buffer
1595         less than 1% of the time, which seems fine.
1596
1597         * html/parser/HTMLToken.h:
1598         (HTMLToken):
1599
1600 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1601
1602         [Windows] Build correction after r150837
1603
1604         New 'forms' sub-folder of html needs to be included in
1605         copy operations.
1606
1607         * WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
1608         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
1609         'obj32' folder for build output.
1610         * WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
1611
1612 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
1613
1614         [BlackBerry] Radio Button UX updates.
1615         https://bugs.webkit.org/show_bug.cgi?id=116881
1616
1617         Reviewed by Rob Buis.
1618
1619         BlackBerry PR 342322.
1620         Internally Reviewed by Jeff Rogers.
1621         Change images.
1622
1623         * platform/blackberry/RenderThemeBlackBerry.cpp:
1624         (WebCore::RenderThemeBlackBerry::paintRadio):
1625
1626 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
1627
1628         [BlackBerry] Datetime string is not centred in form controls.
1629         https://bugs.webkit.org/show_bug.cgi?id=100760
1630
1631         Reviewed by Rob Buis.
1632
1633         BlackBerry PR 343512
1634         Internally Reviewed by Jeff Rogers.
1635
1636         Adjust margin for inner text node of datetime form controls.
1637
1638         * css/themeBlackBerry.css:
1639         (input::-webkit-date-and-time-value):
1640
1641 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
1642
1643         [Windows] Build correction after r150876
1644
1645         A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
1646         been removed, but are still referenced in the project file.
1647
1648         * WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
1649         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
1650
1651 2013-05-28  Jer Noble  <jer.noble@apple.com>
1652
1653         Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
1654         https://bugs.webkit.org/show_bug.cgi?id=116798
1655
1656         Reviewed by Eric Carlson.
1657
1658         Tests: webaudio/audiobuffersource-ended.html
1659                webaudio/oscillator-ended.html
1660
1661         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1662         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
1663         (WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
1664         (WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
1665         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
1666         (WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
1667         * Modules/webaudio/AudioScheduledSourceNode.h:
1668         (WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
1669         * Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
1670         * Modules/webaudio/OscillatorNode.idl: Ditto.
1671
1672 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1673
1674         [CSS Shapes] Support parsing inset-rectangle shapes
1675         https://bugs.webkit.org/show_bug.cgi?id=116638
1676
1677         Reviewed by Dean Jackson.
1678
1679         Add parsing for inset-rectangle. It's very similar to parsing for
1680         rectangle.
1681
1682         No new tests, updated existing tests to cover this.
1683
1684         * css/BasicShapeFunctions.cpp:
1685         (WebCore::valueForBasicShape): Add support for inset rectangles.
1686         (WebCore::basicShapeForValue): Add support for inset rectangles.
1687         * css/CSSBasicShapes.cpp:
1688         (WebCore::buildInsetRectangleString): Create an inset-rectangle css
1689             string.
1690         (WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
1691             rectangle shape to a CSS string.
1692         (WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
1693             rectangles.
1694         (WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
1695             Create an inset rectangle string, with CSS variables resolved.
1696         (WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
1697             Determine if this inset rectangle has any CSS Variable references.
1698         * css/CSSBasicShapes.h:
1699         (CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
1700             direct representation of the CSS property. All the methods below
1701             are just simple getters and setters, along with a construtor and a
1702             factory method.
1703         (WebCore::CSSBasicShapeInsetRectangle::create): 
1704         (WebCore::CSSBasicShapeInsetRectangle::top): 
1705         (WebCore::CSSBasicShapeInsetRectangle::right):
1706         (WebCore::CSSBasicShapeInsetRectangle::bottom):
1707         (WebCore::CSSBasicShapeInsetRectangle::left):
1708         (WebCore::CSSBasicShapeInsetRectangle::radiusX):
1709         (WebCore::CSSBasicShapeInsetRectangle::radiusY):
1710         (WebCore::CSSBasicShapeInsetRectangle::setTop):
1711         (WebCore::CSSBasicShapeInsetRectangle::setRight):
1712         (WebCore::CSSBasicShapeInsetRectangle::setBottom):
1713         (WebCore::CSSBasicShapeInsetRectangle::setLeft):
1714         (WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
1715         (WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
1716         (WebCore::CSSBasicShapeInsetRectangle::type):
1717         (WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
1718         (WebCore):
1719         * css/CSSParser.cpp:
1720         (WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
1721             inset-rectangle CSS property and create a
1722             CSSBasicShapeInsetRectangle.
1723         (WebCore::CSSParser::parseBasicShape): Add a call to parse
1724             inset-rectangle.
1725         * rendering/ExclusionShapeInsideInfo.cpp:
1726         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
1727             inset-rectangles, since only the parsing has been implemented so
1728             far.
1729         * rendering/ExclusionShapeOutsideInfo.cpp:
1730         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
1731             inset-rectangles, since only the parsing has been implemented so
1732             far.
1733         * rendering/style/BasicShapes.cpp:
1734         (WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
1735             inset-rectangle.
1736         (WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
1737             together at a point depending on the "progress" and return the
1738             blended rectangle.
1739         * rendering/style/BasicShapes.h:
1740         (BasicShapeInsetRectangle): Add higher level inset rectangle class.
1741             This is used outside of the CSS representation. The methods below
1742             are just simple getters and setters, along with a constructor and
1743             a factory method.
1744         (WebCore::BasicShapeInsetRectangle::create):
1745         (WebCore::BasicShapeInsetRectangle::top):
1746         (WebCore::BasicShapeInsetRectangle::right):
1747         (WebCore::BasicShapeInsetRectangle::bottom):
1748         (WebCore::BasicShapeInsetRectangle::left):
1749         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
1750         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
1751         (WebCore::BasicShapeInsetRectangle::setTop):
1752         (WebCore::BasicShapeInsetRectangle::setRight):
1753         (WebCore::BasicShapeInsetRectangle::setBottom):
1754         (WebCore::BasicShapeInsetRectangle::setLeft):
1755         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
1756         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
1757         (WebCore::BasicShapeInsetRectangle::type):
1758         (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
1759
1760 2013-05-29  Andreas Kling  <akling@apple.com>
1761
1762         Move computed style extraction out of CSSComputedStyleDeclaration.
1763         <http://webkit.org/b/116965>
1764
1765         Reviewed by Antti Koivisto.
1766
1767         Make it possible to get computed CSSValues from a Node without creating a CSSOM
1768         style declaration object.
1769
1770         The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
1771         on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
1772
1773         This is prep to enable futuristic optimizations in editing and elsewhere.
1774
1775         * css/CSSComputedStyleDeclaration.h:
1776         * css/CSSComputedStyleDeclaration.cpp:
1777         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1778
1779             Create a ComputedStyleExtractor to do the work!
1780
1781         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
1782         (WebCore::ComputedStyleExtractor::valueForFilter):
1783         (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
1784         (WebCore::ComputedStyleExtractor::valueForShadow):
1785         (WebCore::ComputedStyleExtractor::styledNode):
1786         (WebCore::ComputedStyleExtractor::propertyValue):
1787         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1788         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
1789         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1790         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1791         * css/SVGCSSComputedStyleDeclaration.cpp:
1792         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
1793         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1794
1795             Moved all of these from CSSComputedStyleDeclaration to the new class.
1796
1797         * rendering/style/RenderStyle.h:
1798         * svg/SVGPaint.h:
1799
1800             Have these two befriend ComputedStyleExtractor.
1801
1802 2013-05-29  Antti Koivisto  <antti@apple.com>
1803
1804         Another attempt to fix windows build.
1805         
1806         Not reviewed.
1807
1808         * css/CSSFontSelector.h:
1809
1810 2013-05-29  Antti Koivisto  <antti@apple.com>
1811
1812         Try to fix window build.
1813         
1814         Not reviewed.
1815
1816         * platform/graphics/FontCache.h:
1817         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
1818
1819 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
1820
1821         Fix the firing of m_paintRelatedMilestonesTimer
1822         https://bugs.webkit.org/show_bug.cgi?id=116919
1823
1824         Reviewed by Tim Horton.
1825
1826         r150671 intended to change things so that paint-related milestones
1827         only fire when painting has actually happened, so that WebKit clients
1828         are notified when we actually have bits to present.
1829         
1830         However, it made an incorrect assumption that painting would happen
1831         inside of flushCompositingState(). This is not the case; flushCompositingState()
1832         will just dirty CALayers, and later on Core Animation will ask us to paint them.
1833         
1834         This incorrect assumption meant that we would never start the
1835         m_paintRelatedMilestonesTimer, so never fire the milestones.
1836         
1837         Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
1838         paintContents call back. At this time we know we're painting, so we can both
1839         set the FrameView's last paint time, and start up the timer. We also only
1840         want to start the timer if there are pending milestones.
1841
1842         * rendering/RenderLayerBacking.cpp:
1843         (WebCore::RenderLayerBacking::paintIntoLayer):
1844         (WebCore::RenderLayerBacking::paintContents):
1845         * rendering/RenderLayerCompositor.cpp:
1846         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1847         (WebCore::RenderLayerCompositor::didPaintBacking):
1848         * rendering/RenderLayerCompositor.h:
1849         (RenderLayerCompositor):
1850
1851 2013-05-29  Antti Koivisto  <antti@apple.com>
1852
1853         Share FontGlyphs
1854         https://bugs.webkit.org/show_bug.cgi?id=116863
1855
1856         Reviewed by Anreas Kling.
1857
1858         Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs. 
1859         We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
1860         It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
1861         increases.
1862         
1863         On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
1864         from ~42% to ~55%.
1865
1866         * css/CSSFontSelector.cpp:
1867         (WebCore::CSSFontSelector::CSSFontSelector):
1868         
1869             Add unique id we can use in cache key.
1870
1871         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
1872         
1873             Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
1874
1875         (WebCore::CSSFontSelector::resolvesFamilyFor):
1876         
1877             Test if FontSelector is needed for resolving a particular FontDescription.
1878
1879         * css/CSSFontSelector.h:
1880         * page/Settings.cpp:
1881         (WebCore::setGenericFontFamilyMap):
1882         
1883             Invalidate the cache if standard font settings change.
1884
1885         * platform/graphics/Font.cpp:
1886         (FontGlyphsCacheKey):
1887         (FontGlyphsCacheEntry):
1888         (WebCore::operator==):
1889         (WebCore::fontGlyphsCache):
1890         (WebCore::invalidateFontGlyphsCache):
1891         (WebCore::makeFontSelectorFlags):
1892         (WebCore::makeFontGlyphsCacheKey):
1893         
1894             The cache key consists of
1895             
1896             - all families.
1897             - shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
1898             - font selector specific keys.
1899
1900             These guarantee the FontData will be identical.
1901
1902         (WebCore::computeFontGlyphsCacheHash):
1903         (WebCore::pruneUnreferencedFromFontGlyphsCache):
1904         
1905             Don't accumulate unused entries.
1906
1907         (WebCore::retrieveOrAddCachedFontGlyphs):
1908         (WebCore::Font::update):
1909         * platform/graphics/Font.h:
1910         * platform/graphics/FontCache.cpp:
1911         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1912         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
1913         (WebCore::FontPlatformDataCacheKey::operator==):
1914         (FontPlatformDataCacheKey):
1915         (WebCore::computeHash):
1916         (WebCore::FontCache::getCachedFontPlatformData):
1917         (WebCore::FontCache::purgeInactiveFontData):
1918         (WebCore::FontCache::invalidate):
1919         * platform/graphics/FontCache.h:
1920         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
1921         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
1922         (WebCore::FontDescriptionFontDataCacheKey::operator==):
1923         (WebCore::FontDescriptionFontDataCacheKey::operator!=):
1924         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
1925         
1926             Separate part of the key for sharing.
1927
1928         (FontDescriptionFontDataCacheKey):
1929         * platform/graphics/FontFallbackList.cpp:
1930         (WebCore::FontGlyphs::FontGlyphs):
1931         (WebCore::FontGlyphs::releaseFontData):
1932         * platform/graphics/FontFallbackList.h:
1933         (WebCore::FontGlyphs::create):
1934         (WebCore::FontGlyphs::~FontGlyphs):
1935         
1936             Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
1937
1938         * platform/graphics/FontSelector.h:
1939
1940 2013-05-29  Nico Weber  <thakis@chromium.org>
1941
1942         Remove unused file PlatformGestureEvent.cpp
1943         https://bugs.webkit.org/show_bug.cgi?id=116894
1944
1945         Reviewed by Darin Adler.
1946
1947         This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
1948         not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
1949         removed most of that code again.
1950         
1951         * platform/PlatformGestureRecognizer.cpp: Removed.
1952
1953 2013-05-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1954
1955         [texmap][GStreamer][GTK] Composited Video support
1956         https://bugs.webkit.org/show_bug.cgi?id=86410
1957
1958         Reviewed by Noam Rosenthal.
1959
1960         Enable the video accelerated compositing using the WebKit's
1961         TextureMapper.
1962
1963         This patch does not use hardware accelerated video decoding. It
1964         provides a generic path for system memory buffers.
1965
1966         This new functionality is only available when the coordinated graphics
1967         system is not used.
1968
1969         No new tests, already covered by existing tests.
1970
1971         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1972         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1973         (WebCore):
1974         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
1975         texture content with the new received video buffer.
1976         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
1977         use the accelerated compositing or the normal code path
1978         (WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
1979         compositing is used this method is halted.
1980         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
1981         a texture from the pool and draws it if it is already available.
1982         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1983         (MediaPlayerPrivateGStreamerBase):
1984         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
1985         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
1986         returns true
1987
1988 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
1989
1990         [Qt] Missing files from build after r150853
1991         https://bugs.webkit.org/show_bug.cgi?id=116932
1992
1993         Reviewed by Csaba Osztrogonác.
1994
1995         * Target.pri: Added missing include path.
1996
1997 2013-05-29  Mihai Maerean  <mmaerean@adobe.com>
1998
1999         [CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
2000         https://bugs.webkit.org/show_bug.cgi?id=113703
2001
2002         Reviewed by Darin Adler.
2003
2004         The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
2005         that is its container in the RenderObject tree.
2006
2007         Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
2008         the page.
2009
2010         Tests: fast/regions/drag-scrollbars-of-content.html
2011                fast/regions/hover-in-second-region.html
2012
2013         * rendering/RenderBox.cpp:
2014         (WebCore::RenderBox::offsetFromContainer):
2015         * rendering/RenderBoxModelObject.cpp:
2016         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2017
2018 2013-05-29  Andreas Kling  <akling@apple.com>
2019
2020         Fix dumb typo in r150879.
2021
2022         * editing/htmlediting.cpp:
2023         (WebCore::nextLeafNode):
2024
2025 2013-05-29  Andreas Kling  <akling@apple.com>
2026
2027         Move leaf Node traversal helpers to htmlediting.cpp
2028         <http://webkit.org/b/116940>
2029
2030         Reviewed by Antti Koivisto.
2031
2032         Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
2033         Fixes an 8-year old FIXME. \o/
2034
2035         * dom/Node.h:
2036         * dom/Node.cpp:
2037         * dom/Position.cpp:
2038         (WebCore::nextRenderedEditable):
2039         (WebCore::previousRenderedEditable):
2040         * editing/VisibleUnits.cpp:
2041         (WebCore::previousLeafWithSameEditability):
2042         (WebCore::nextLeafWithSameEditability):
2043         * editing/htmlediting.h:
2044         * editing/htmlediting.cpp:
2045         (WebCore::previousNodeConsideringAtomicNodes):
2046         (WebCore::nextNodeConsideringAtomicNodes):
2047         (WebCore::previousLeafNode):
2048         (WebCore::nextLeafNode):
2049
2050 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
2051
2052         [Qt] Missing files from build after r150853
2053         https://bugs.webkit.org/show_bug.cgi?id=116932
2054
2055         Reviewed by Csaba Osztrogonác.
2056
2057         * Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
2058
2059 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2060
2061         PresentationAttributeCacheCleaner::m_hitCount is never initialized
2062         https://bugs.webkit.org/show_bug.cgi?id=116946
2063
2064         Reviewed by Andreas Kling.
2065
2066         Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
2067
2068         * dom/StyledElement.cpp:
2069         (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
2070
2071 2013-05-29  Kent Tamura  <tkent@chromium.org>
2072
2073         Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
2074         https://bugs.webkit.org/show_bug.cgi?id=116796
2075
2076         Reviewed by Ryosuke Niwa.
2077
2078         This feature was used only by Chromium port.
2079
2080         * CMakeLists.txt:
2081         * GNUmakefile.list.am:
2082         * Target.pri:
2083         * WebCore.vcproj/WebCore.vcproj:
2084         * WebCore.vcxproj/WebCore.vcxproj:
2085         * WebCore.vcxproj/WebCore.vcxproj.filters:
2086         * WebCore.xcodeproj/project.pbxproj:
2087         * css/html.css:
2088         (input::-webkit-date-and-time-value):
2089         * dom/Element.cpp:
2090         * dom/Element.h:
2091         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2092         * html/BaseChooserOnlyDateAndTimeInputType.h:
2093         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
2094         * html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
2095         * html/DateInputType.cpp:
2096         * html/DateInputType.h:
2097         (DateInputType):
2098         * html/DateTimeFieldsState.cpp: Removed.
2099         * html/DateTimeFieldsState.h: Removed.
2100         * html/DateTimeInputType.cpp:
2101         * html/DateTimeInputType.h:
2102         (DateTimeInputType):
2103         * html/DateTimeLocalInputType.cpp:
2104         * html/DateTimeLocalInputType.h:
2105         (DateTimeLocalInputType):
2106         * html/HTMLInputElement.cpp:
2107         (WebCore::HTMLInputElement::HTMLInputElement):
2108         (WebCore):
2109         * html/HTMLInputElement.h:
2110         (HTMLInputElement):
2111         * html/InputType.cpp:
2112         * html/InputType.h:
2113         (InputType):
2114         * html/MonthInputType.cpp:
2115         * html/MonthInputType.h:
2116         (MonthInputType):
2117         * html/TimeInputType.cpp:
2118         * html/TimeInputType.h:
2119         (TimeInputType):
2120         * html/WeekInputType.cpp:
2121         * html/WeekInputType.h:
2122         (WeekInputType):
2123         * html/shadow/ClearButtonElement.cpp: Removed.
2124         * html/shadow/ClearButtonElement.h: Removed.
2125         * html/shadow/DateTimeEditElement.cpp: Removed.
2126         * html/shadow/DateTimeEditElement.h: Removed.
2127         * html/shadow/DateTimeFieldElement.cpp: Removed.
2128         * html/shadow/DateTimeFieldElement.h: Removed.
2129         * html/shadow/DateTimeFieldElements.cpp: Removed.
2130         * html/shadow/DateTimeFieldElements.h: Removed.
2131         * html/shadow/DateTimeNumericFieldElement.cpp: Removed.
2132         * html/shadow/DateTimeNumericFieldElement.h: Removed.
2133         * html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
2134         * html/shadow/DateTimeSymbolicFieldElement.h: Removed.
2135         * html/shadow/PickerIndicatorElement.cpp: Removed.
2136         * html/shadow/PickerIndicatorElement.h: Removed.
2137         * page/ChromeClient.h:
2138         (ChromeClient):
2139         * platform/LocalizedStrings.h:
2140         (WebCore):
2141         * platform/text/PlatformLocale.cpp:
2142         * platform/text/PlatformLocale.h:
2143         (Locale):
2144         * rendering/RenderDetailsMarker.cpp:
2145         * rendering/RenderDetailsMarker.h:
2146         * rendering/RenderObject.h:
2147         (RenderObject):
2148
2149 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2150
2151         Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
2152         https://bugs.webkit.org/show_bug.cgi?id=116914
2153
2154         Reviewed by Benjamin Poulain.
2155
2156         Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
2157
2158         * dom/Document.cpp:
2159         * dom/Document.h:
2160
2161 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
2162
2163         Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
2164         https://bugs.webkit.org/show_bug.cgi?id=116927
2165
2166         Reviewed by Andreas Kling.
2167
2168         Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
2169
2170         This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
2171         copying a hash table is at least linear with the number of elements.
2172
2173         * rendering/RenderWidget.cpp:
2174         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2175
2176 2013-05-29  Andreas Kling  <akling@apple.com>
2177
2178         Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
2179
2180         Rubber-stamped by Antti "Lucky" Koivisto.
2181
2182         * dom/Document.h:
2183         * dom/Document.cpp:
2184
2185 2013-05-28  Andreas Kling  <akling@apple.com>
2186
2187         FocusController should operate on Elements internally.
2188         <http://webkit.org/b/116781>
2189
2190         Reviewed by Antti Koivisto.
2191
2192         Switch from Node* to Element* as much as possible inside FocusController.
2193         Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
2194
2195         * page/FocusController.h:
2196         * page/FocusController.cpp:
2197         (WebCore::dispatchEventsOnWindowAndFocusedElement):
2198         (WebCore::isNonFocusableShadowHost):
2199         (WebCore::adjustedTabIndex):
2200         (WebCore::shouldVisit):
2201         (WebCore::FocusController::setFocused):
2202         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
2203         (WebCore::FocusController::advanceFocusInDocumentOrder):
2204         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2205         (WebCore::FocusController::findFocusableElementRecursively):
2206         (WebCore::FocusController::findFocusableElement):
2207         (WebCore::FocusController::nextFocusableElement):
2208         (WebCore::FocusController::previousFocusableElement):
2209         (WebCore::FocusController::setActive):
2210
2211 2013-05-29  Radu Stavila  <stavila@adobe.com>
2212
2213         [CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
2214         https://bugs.webkit.org/show_bug.cgi?id=111749
2215
2216         Reviewed by Antti Koivisto.
2217
2218         When searching for the hover ancestor and encountering a named flow thread,
2219         the search will continue with the DOM ancestor of the top-most element
2220         in the named flow thread.
2221
2222         Tests: fast/regions/hover-in-region-grandparent.html
2223                fast/regions/hover-in-region-parent-skip.html
2224                fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
2225                fast/regions/hover-on-child-in-region.html
2226                fast/regions/hover-on-child-in-region-in-region.html
2227
2228         * rendering/RenderObject.cpp:
2229         (WebCore::RenderObject::hoverAncestor):
2230         * rendering/RenderObject.h:
2231
2232 2013-05-28  Nate Chapin  <japhet@chromium.org>
2233
2234         Crash in WebCore::SubresourceLoader::releaseResources when connection fails
2235         https://bugs.webkit.org/show_bug.cgi?id=87743
2236
2237         Don't do anything complicated in SubresourceLoader::releaseResources(),
2238         just clear variables. With this patch, releaseResources() will still
2239         assert in debug builds if it is called twice, but it will safely execute
2240         in release.
2241
2242         Reviewed by Darin Adler.
2243
2244         * loader/ResourceLoader.cpp:
2245         (WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
2246             and cancel() into a helper.
2247         (WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
2248             reentrancy from within didCancel().
2249         * loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
2250         * loader/SubresourceLoader.cpp:
2251         (WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
2252             put finish() in the middle of the process.
2253         (WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
2254             in the middle of the process.
2255         (WebCore::SubresourceLoader::didCancel):
2256         (WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
2257             most importantly calling loadDone().
2258         (WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
2259         * loader/SubresourceLoader.h:
2260         (SubresourceLoader):
2261         * loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
2262             and clearLoader() (which just nulls m_loader).
2263         * loader/cache/CachedResource.h:
2264         * loader/chromium/ResourceLoaderChromium.cpp:
2265
2266 2013-05-28  Seokju Kwon  <seokju.kwon@gmail.com>
2267
2268         [GTK] Build fix after r150837
2269         https://bugs.webkit.org/show_bug.cgi?id=116904
2270
2271         Unreviewed build fix.
2272
2273         * GNUmakefile.am:
2274
2275 2013-05-28  Andy Estes  <aestes@apple.com>
2276
2277         REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
2278         https://bugs.webkit.org/show_bug.cgi?id=116906
2279         <rdar://problem/13991927>
2280
2281         Reviewed by Andreas Kling.
2282
2283         Writing a test for this is blocked on https://webkit.org/b/116199.
2284
2285         Some WebKit clients use JavaScript to preload images from disk so that
2286         subsequent loads will display immediately from the memory cache. By not
2287         caching non-HTTP sub-resources in memory, we break this common pattern.
2288         This change restricts r150169 to only apply to cached main resources.
2289         Sub-resources will again be cached indefinitely as they were prior to
2290         r150169.
2291
2292         * loader/cache/CachedResource.cpp:
2293         (WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
2294         main resource from a scheme that should not be cached indefinitely,
2295         return 0 for the freshness lifetime. For other non-HTTP cached
2296         resources, return an indefinite freshness lifetime.
2297
2298 2013-05-28  Dean Jackson  <dino@apple.com>
2299
2300         Animations do not restart after exiting page cache
2301         https://bugs.webkit.org/show_bug.cgi?id=116900
2302
2303         Reviewed by Tim Horton.
2304
2305         Animations are suspended as they enter the page cache, but
2306         were not getting correctly resumed when exiting. The cause
2307         was an error in r149576 which was checking a global flag for suspension
2308         on the AnimationController and thus not trying to resume anything.
2309
2310         Test: animations/resume-after-page-cache.html
2311
2312         * page/animation/AnimationController.cpp:
2313         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
2314         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2315
2316 2013-05-28  Chris Rogers  <crogers@google.com>
2317
2318         Support multiple HRTFDatabases for different sample-rates
2319         https://bugs.webkit.org/show_bug.cgi?id=116183
2320
2321         Reviewed by Kenneth Russell.
2322
2323         Adapted from Blink:
2324         https://codereview.chromium.org/14636011/
2325
2326         This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
2327
2328         * Modules/webaudio/AudioContext.h:
2329         (WebCore::AudioContext::hrtfDatabaseLoader):
2330         (AudioContext):
2331         * Modules/webaudio/OfflineAudioContext.cpp:
2332         (WebCore::OfflineAudioContext::create):
2333         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2334         (WebCore::OfflineAudioDestinationNode::offlineRender):
2335         * Modules/webaudio/PannerNode.cpp:
2336         (WebCore::PannerNode::initialize):
2337         (WebCore::PannerNode::setPanningModel):
2338         * platform/audio/HRTFDatabaseLoader.cpp:
2339         (WebCore):
2340         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
2341         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
2342         * platform/audio/HRTFDatabaseLoader.h:
2343         (HRTFDatabaseLoader):
2344         (WebCore::HRTFDatabaseLoader::loaderMap):
2345         * platform/audio/HRTFPanner.cpp:
2346         (WebCore::HRTFPanner::HRTFPanner):
2347         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
2348         (WebCore::HRTFPanner::pan):
2349         * platform/audio/HRTFPanner.h:
2350         (HRTFPanner):
2351         * platform/audio/Panner.cpp:
2352         (WebCore::Panner::create):
2353         * platform/audio/Panner.h:
2354         (WebCore):
2355
2356 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
2357
2358         Windows build fix.
2359
2360         * platform/cf/KURLCFNet.cpp:
2361         (WebCore::KURL::createCFURL):
2362
2363 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
2364
2365         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
2366         https://bugs.webkit.org/show_bug.cgi?id=116887
2367         <rdar://problem/12965959>
2368
2369         Reviewed by Darin Adler.
2370
2371         Test: http/tests/uri/curly-braces-escaping.html
2372
2373         The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
2374         unlike WebCore.
2375
2376         Centralized code for converting between CFURLs and strings in a place that WebKit
2377         can use directly.
2378
2379         * WebCore.exp.in:
2380         * WebCore.vcproj/WebCore.vcproj:
2381         * WebCore.vcxproj/WebCore.vcxproj:
2382         * WebCore.vcxproj/WebCore.vcxproj.filters:
2383         * WebCore.xcodeproj/project.pbxproj:
2384         Keeping things building.
2385
2386         * platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
2387         * platform/KURL.h:
2388         Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
2389         inconsistently, and now URLs use URLCharBuffer.
2390
2391         * platform/cf/CFURLExtras.cpp: Added.
2392         (WebCore::createCFURLFromBuffer):
2393         (WebCore::getURLBytes):
2394         * platform/cf/CFURLExtras.h: Added.
2395         * platform/cf/KURLCFNet.cpp:
2396         (WebCore::KURL::KURL):
2397         (WebCore::KURL::createCFURL):
2398         Extracted code for CFURL string manipulation that is not logcally part of KURL.
2399
2400         * platform/mac/KURLMac.mm:
2401         (WebCore::KURL::KURL): Use the new getURLBytes function.
2402         (WebCore::KURL::operator NSURL *): Added a comment.
2403         (WebCore::KURL::createCFURL): Added a comment, and updated for new names and
2404         signatures.
2405
2406         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
2407         Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
2408         encodings right.
2409
2410 2013-05-28  Anders Carlsson  <andersca@apple.com>
2411
2412         Create a html/forms subdirectory and move FileIconLoader there
2413         https://bugs.webkit.org/show_bug.cgi?id=116880
2414
2415         Reviewed by Jessie Berlin.
2416
2417         A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
2418         them out into a separate subdirectory, html/forms.
2419
2420         Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
2421         the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
2422
2423         * CMakeLists.txt:
2424         * GNUmakefile.list.am:
2425         * Target.pri:
2426         * WebCore.vcproj/WebCore.vcproj:
2427         * WebCore.vcxproj/WebCore.vcxproj:
2428         * WebCore.vcxproj/WebCore.vcxproj.filters:
2429         * WebCore.xcodeproj/project.pbxproj:
2430         * html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
2431         * html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
2432
2433 2013-05-28  Chris Fleizach  <cfleizach@apple.com>
2434
2435         AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
2436         https://bugs.webkit.org/show_bug.cgi?id=116756
2437
2438         Reviewed by Tim Horton.
2439
2440         If AXFocused is set to true, but the WebView is not the first responder, then the call will
2441         not do anything. This change asks the Chrome to make the WebView the first responder before
2442         trying to set focus within the page.
2443
2444         Was not able to make a test, it requires on interplay between areas outside the web view.
2445
2446         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2447         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2448
2449 2013-05-28  Jer Noble  <jer.noble@apple.com>
2450
2451         Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
2452         https://bugs.webkit.org/show_bug.cgi?id=116882
2453
2454         Reviewed by Eric Carlson.
2455
2456         Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
2457
2458         * rendering/RenderTextTrackCue.cpp:
2459         (WebCore::RenderTextTrackCue::repositionGenericCue):
2460
2461 2013-05-28  Alberto Garcia  <agarcia@igalia.com>
2462
2463         [BlackBerry] GraphicsContext: add missing definitions.
2464         https://bugs.webkit.org/show_bug.cgi?id=115515
2465
2466         Reviewed by Rob Buis.
2467
2468         * platform/graphics/GraphicsContext.h:
2469         (Graphics):
2470         Add definition for PlatformGraphicsContext.
2471         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
2472         Include RoundedRect.h
2473
2474 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
2475
2476         [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
2477         https://bugs.webkit.org/show_bug.cgi?id=116604
2478
2479         Reviewed by Carlos Garcia Campos.
2480
2481         PR 273550, 99638
2482
2483         Remove the "get" prefix from getters in the WebKit- and compositing-
2484         thread layer classes, as well as LayerRendererSurface. Clarify which
2485         geometry-related getters return normalized device coordinates by adding
2486         a comment.
2487
2488         Also remove dead code related to LayerData::m_holePunchClipRect, which
2489         was part of an eventually disabled fix for video clipping in iframes,
2490         PR 99638. Since we now use AC layers for iframes, the bug is no longer
2491         reproducible, and the dead code will never need to be enabled again.
2492
2493         No change in behavior, no new tests.
2494
2495         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
2496         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
2497         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2498         (WebCore::LayerCompositingThread::setDrawTransform):
2499         (WebCore::LayerCompositingThread::transformedHolePunchRect):
2500         (WebCore::LayerCompositingThread::drawTextures):
2501         (WebCore::LayerCompositingThread::drawSurface):
2502         * platform/graphics/blackberry/LayerCompositingThread.h:
2503         (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
2504         (LayerCompositingThread):
2505         (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
2506         (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
2507         (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
2508         * platform/graphics/blackberry/LayerData.h:
2509         (LayerData): Removed unused data member "m_holePunchClipRect"
2510         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2511         (WebCore::LayerFilterRenderer::applyActions):
2512         * platform/graphics/blackberry/LayerRenderer.cpp:
2513         (WebCore::LayerRenderer::compositeLayers):
2514         (WebCore::LayerRenderer::drawDebugBorder):
2515         (WebCore::LayerRenderer::drawHolePunchRect):
2516         (WebCore::LayerRenderer::prepareFrameRecursive):
2517         (WebCore::LayerRenderer::updateLayersRecursive):
2518         (WebCore::collect3DPreservingLayers):
2519         (WebCore::LayerRenderer::compositeLayersRecursive):
2520         * platform/graphics/blackberry/LayerRendererSurface.cpp:
2521         (WebCore::LayerRendererSurface::boundingBox):
2522         * platform/graphics/blackberry/LayerRendererSurface.h:
2523         (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
2524         * platform/graphics/blackberry/LayerWebKitThread.h:
2525         (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
2526         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
2527         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
2528         (WebCore::VideoLayerWebKitThread::boundsChanged):
2529
2530 2013-05-28  Jer Noble  <jer.noble@apple.com>
2531
2532         Made AudioNode an EventTarget
2533         https://bugs.webkit.org/show_bug.cgi?id=116871
2534
2535         Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
2536
2537         Reviewed by Darin Adler.
2538
2539         Tests: webaudio/audionode-expected.txt:
2540                webaudio/audionode.html:
2541
2542         Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
2543         all that same boilerplate from ScriptProcessorNode now that it's base class
2544         is an EventTarget.
2545
2546         * Modules/webaudio/AudioNode.cpp:
2547         (WebCore::AudioNode::interfaceName): Added boilerplate.
2548         (WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
2549         (WebCore::AudioNode::processIfNecessary): Whitespace.
2550         * Modules/webaudio/AudioNode.h:
2551         * Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
2552         * Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
2553         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
2554         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
2555         * dom/EventTarget.h: Mark AudioNode as an EventTarget.
2556         * dom/EventTargetFactory.in: Ditto.
2557
2558 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
2559
2560         [BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
2561         https://bugs.webkit.org/show_bug.cgi?id=116616
2562
2563         Reviewed by Carlos Garcia Campos.
2564
2565         The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
2566         with a different winding order than the accelerated compositing backend
2567         of the BlackBerry port. So, when we switched from Skia to this new
2568         rendering engine, we switched from glFrontFace(GL_CCW) to
2569         glFrontFace(GL_CW), and all was well when drawing display lists.
2570         However, we forgot to update the winding order of geometry generated
2571         within the accelerated compositing backend, which is used for masks and
2572         filters, so they were getting erroneously culled out when
2573         backface-visibility: hidden was applied to them. Fixed by switching the
2574         winding order of all geometry generated up here, which has the added
2575         benefit of enabling us to use TransformationMatrix::mapQuad instead of
2576         transforming point-by-point.
2577
2578         To further complicate matters, a right-side up transform is used when
2579         drawing layers into surfaces, reversing the winding order and requiring
2580         us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
2581         layers to surfaces, or the layers will get culled out inside the
2582         surface.
2583
2584         Also fix spelling error, "drawed" should be "drawn".
2585
2586         No new tests, this is only detectable by pixel tests, which the
2587         BlackBerry port currently doesn't support.
2588
2589         PR 341945.
2590
2591         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
2592         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
2593         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2594         (WebCore::LayerCompositingThread::setDrawTransform):
2595         (WebCore::getTransformedRect):
2596         (WebCore::LayerCompositingThread::drawTextures):
2597         (WebCore::LayerCompositingThread::drawSurface):
2598         * platform/graphics/blackberry/LayerCompositingThread.h:
2599         (LayerCompositingThread):
2600         (WebCore::LayerCompositingThread::origin):
2601         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2602         (WebCore):
2603         * platform/graphics/blackberry/LayerRenderer.cpp:
2604         (WebCore::LayerRenderer::compositeLayers):
2605         (WebCore):
2606         (WebCore::LayerRenderer::drawLayersOnSurfaces):
2607         * platform/graphics/blackberry/LayerRendererSurface.cpp:
2608         (WebCore::LayerRendererSurface::drawRect):
2609         (WebCore::LayerRendererSurface::transformedBounds):
2610         * platform/graphics/blackberry/LayerRendererSurface.h:
2611         (WebCore::LayerRendererSurface::origin):
2612         (LayerRendererSurface):
2613         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2614         (WebCore):
2615         (WebCore::loadBufferingImageData):
2616         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
2617
2618 2013-05-28  Andreas Kling  <akling@apple.com>
2619
2620         Move Node::dispatchChangeEvent() to HTMLFormControlElement.
2621         <http://webkit.org/b/116866>
2622
2623         Reviewed by Anders Carlsson.
2624
2625         ...and devirtualize it, since it had no overrides.
2626
2627         * dom/Node.h:
2628         * dom/Node.cpp:
2629         * html/HTMLFormControlElement.h:
2630         * html/HTMLFormControlElement.cpp:
2631         (WebCore::HTMLFormControlElement::dispatchChangeEvent):
2632         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
2633         * html/FileInputType.cpp:
2634         (WebCore::FileInputType::setFiles):
2635         * html/HTMLTextFormControlElement.cpp:
2636         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2637
2638 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2639
2640         Refactoring CSS grammar
2641         https://bugs.webkit.org/show_bug.cgi?id=116679
2642
2643         Reviewed by Andreas Kling.
2644
2645         From Blink r149948 by <serya@chromium.org>
2646
2647         Added "closing_parenthesis:" and "error_recovery:" to avoid code
2648         duplication in a couple of error recovery rules. Some other rules
2649         were also refactored which allows to reduce the the number of
2650         shift/reduce conflicts by 2.
2651
2652         No new tests required as this is just a refactoring, no new
2653         functionality added.
2654
2655         * css/CSSGrammar.y.in:
2656
2657 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2658
2659         Invalid block doesn't make declaration invalid
2660         https://bugs.webkit.org/show_bug.cgi?id=115709
2661
2662         Reviewed by Andreas Kling.
2663
2664         From Blink r149446 by <serya@chromium.org>
2665
2666         Added a new rule "declaration_recovery:" which covers any kind of
2667         "invalid_block_list maybe_space" sequence. By appending this new
2668         rule to every rule reductable to "declaration:" we can remove some
2669         redundant rules and improve error recovery of some others that
2670         were only accepting exactly one error.
2671
2672         One of the rules being removed was preventing invalid blocks in a
2673         declaration to invalidate the whole declaration. The rule was
2674         reporting the syntax error but at the same time accepting the
2675         invalid block as part of a valid declaration.
2676
2677         * css/CSSGrammar.y.in:
2678
2679 2013-05-28  Andreas Kling  <akling@apple.com>
2680
2681         Move dispatching of focus-related events from Node to Element.
2682         <http://webkit.org/b/116864>
2683
2684         Reviewed by Antti Koivisto.
2685
2686         ...and pass around pointers to Element instead of Node.
2687
2688         * dom/Node.cpp:
2689         * dom/Node.h:
2690         * dom/Element.h:
2691         * dom/Element.cpp:
2692         (WebCore::Element::dispatchFocusInEvent):
2693         (WebCore::Element::dispatchFocusOutEvent):
2694         (WebCore::Element::dispatchFocusEvent):
2695         (WebCore::Element::dispatchBlurEvent):
2696
2697             Moved here from Node.
2698
2699         * html/HTMLFormControlElement.h:
2700         * html/HTMLFormControlElement.cpp:
2701         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
2702         * html/HTMLSelectElement.h:
2703         * html/HTMLSelectElement.cpp:
2704         (WebCore::HTMLSelectElement::dispatchFocusEvent):
2705         (WebCore::HTMLSelectElement::dispatchBlurEvent):
2706         * html/HTMLTextFormControlElement.h:
2707         * html/HTMLTextFormControlElement.cpp:
2708         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
2709         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
2710
2711             Update subclass overrides and sprinkle OVERRIDE/FINAL.
2712
2713 2013-05-28  Zan Dobersek  <zdobersek@igalia.com>
2714
2715         Remove CachedResourceRequest::initiatorElement
2716         https://bugs.webkit.org/show_bug.cgi?id=116862
2717
2718         Reviewed by Andreas Kling.
2719
2720         The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
2721
2722         * loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
2723         * loader/cache/CachedResourceRequest.h:
2724         (CachedResourceRequest): Remove the initiatorElement method declaration.
2725
2726 2013-05-28  Andreas Kling  <akling@apple.com>
2727
2728         Document::setFocusedNode() should be setFocusedElement().
2729         <http://webkit.org/b/116857>
2730
2731         Reviewed by Antti Koivisto.
2732
2733         Only Elements can be focused, so tighten Document's idea of what's focused.
2734
2735         Most of this patch is just updating call sites for the new names and removing
2736         now-unnecessary isElementNode() checks and casts.
2737
2738         * WebCore.exp.in:
2739         * accessibility/AXObjectCache.cpp:
2740         (WebCore::AXObjectCache::focusedUIElementForPage):
2741         * accessibility/AccessibilityNodeObject.cpp:
2742         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2743         * accessibility/AccessibilityRenderObject.cpp:
2744         (WebCore::AccessibilityRenderObject::isFocused):
2745         (WebCore::AccessibilityRenderObject::setFocused):
2746         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2747         * bindings/objc/DOM.mm:
2748         (-[DOMElement isFocused]):
2749         * dom/Document.cpp:
2750         (WebCore::Document::dispose):
2751         (WebCore::Document::detach):
2752         (WebCore::Document::focusedNodeRemoved):
2753         (WebCore::Document::removeFocusedNodeOfSubtree):
2754         (WebCore::Document::setFocusedElement):
2755         (WebCore::Document::updateFocusAppearanceTimerFired):
2756         (WebCore::eventTargetNodeForDocument):
2757         * dom/Document.h:
2758         (Document):
2759         (WebCore::Document::focusedElement):
2760         * dom/Element.cpp:
2761         (WebCore::Element::attach):
2762         (WebCore::Element::focus):
2763         (WebCore::Element::blur):
2764         (WebCore::Element::cancelFocusAppearanceUpdate):
2765         * dom/Node.cpp:
2766         (WebCore::Node::rendererIsEditable):
2767         * dom/TreeScope.cpp:
2768         (WebCore::TreeScope::focusedElement):
2769         * dom/UserTypingGestureIndicator.cpp:
2770         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
2771         * editing/Editor.cpp:
2772         (WebCore::Editor::setBaseWritingDirection):
2773         (WebCore::Editor::setComposition):
2774         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
2775         * editing/EditorCommand.cpp:
2776         (WebCore::verticalScrollDistance):
2777         * editing/FrameSelection.cpp:
2778         (WebCore::FrameSelection::selectAll):
2779         (WebCore::FrameSelection::focusedOrActiveStateChanged):
2780         (WebCore::FrameSelection::setFocusedElementIfNeeded):
2781         (WebCore::FrameSelection::currentForm):
2782         * history/CachedPage.cpp:
2783         (WebCore::CachedPage::restore):
2784         * html/HTMLInputElement.cpp:
2785         (WebCore::HTMLInputElement::updateType):
2786         (WebCore::HTMLInputElement::attach):
2787         * html/HTMLTextAreaElement.cpp:
2788         (WebCore::HTMLTextAreaElement::setValueCommon):
2789         * html/HTMLTextFormControlElement.cpp:
2790         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
2791         (WebCore::HTMLTextFormControlElement::selectionStart):
2792         (WebCore::HTMLTextFormControlElement::selectionEnd):
2793         (WebCore::HTMLTextFormControlElement::selectionDirection):
2794         * html/RadioInputType.cpp:
2795         (WebCore::RadioInputType::handleKeydownEvent):
2796         (WebCore::RadioInputType::isKeyboardFocusable):
2797         * html/shadow/DateTimeEditElement.cpp:
2798         (WebCore::DateTimeEditElement::focusedFieldIndex):
2799         * loader/FrameLoader.cpp:
2800         (WebCore::FrameLoader::stopLoading):
2801         * page/DOMWindow.cpp:
2802         (WebCore::DOMWindow::focus):
2803         * page/EventHandler.cpp:
2804         (WebCore::EventHandler::scrollOverflow):
2805         (WebCore::EventHandler::logicalScrollOverflow):
2806         (WebCore::EventHandler::dispatchMouseEvent):
2807         (WebCore::EventHandler::sendContextMenuEventForKey):
2808         (WebCore::EventHandler::capsLockStateMayHaveChanged):
2809         * page/FocusController.cpp:
2810         (WebCore::dispatchEventsOnWindowAndFocusedNode):
2811         (WebCore::FocusController::advanceFocusInDocumentOrder):
2812         (WebCore::FocusController::setFocusedElement):
2813         (WebCore::FocusController::findFocusCandidateInContainer):
2814         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2815         (WebCore::FocusController::advanceFocusDirectionally):
2816         * page/FrameView.cpp:
2817         (WebCore::FrameView::scrollToAnchor):
2818         * plugins/PluginView.cpp:
2819         (WebCore::PluginView::focusPluginElement):
2820         * plugins/efl/PluginViewEfl.cpp:
2821         (WebCore::PluginView::setFocus):
2822         * plugins/mac/PluginViewMac.mm:
2823         (WebCore::PluginView::platformStart):
2824         * rendering/RenderImage.cpp:
2825         (WebCore::RenderImage::paintAreaElementFocusRing):
2826         * rendering/RenderListBox.cpp:
2827         (WebCore::RenderListBox::paintItemForeground):
2828         (WebCore::RenderListBox::paintItemBackground):
2829         * rendering/RenderTextControlSingleLine.cpp:
2830         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
2831         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
2832         * rendering/RenderTheme.cpp:
2833         (WebCore::RenderTheme::isFocused):
2834
2835 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
2836
2837         Web Inspector: Enable CSS logging
2838         https://bugs.webkit.org/show_bug.cgi?id=113401
2839
2840         Reviewed by Benjamin Poulain.
2841
2842         From Blink r149265 by <serya@chromium.org>
2843
2844         CSS logging was disabled in r147028 to prevent message overflow in
2845         the inspector console. This change restores it by modifying the
2846         CSS grammar in order to reduce as much consecutive errors as
2847         possible in 'declaration_list' and 'decl_list' rules.
2848
2849         This way, for rules like 'x { color: ### }' only the first '#'
2850         will be reported as error (instead of 3 identical errors).
2851
2852         The rule 'declaration' still produces multiple errors, because it
2853         does not eat as much errors as possible. So in order not to create
2854         a complex risky patch we just disable logging in the parser for
2855         that rule.
2856
2857         * css/CSSGrammar.y.in:
2858         * css/CSSParser.cpp:
2859         (WebCore::CSSParser::CSSParser):
2860         (WebCore::CSSParser::parseSheet):
2861         (WebCore::CSSParser::syntaxError):
2862         (WebCore::CSSParser::isLoggingErrors):
2863         (WebCore::CSSParser::rewriteSpecifiers):
2864         * css/CSSParser.h:
2865         (CSSParser):
2866
2867 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
2868
2869         Build fix for WinCE after r150730.
2870
2871         * platform/graphics/FontFallbackList.cpp:
2872         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2873
2874 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
2875
2876         Build fix for WinCE after r150772.
2877
2878         * platform/win/ClipboardWin.cpp:
2879         (WebCore):
2880         * platform/win/PasteboardWin.cpp:
2881         (WebCore::Pasteboard::readFilenames):
2882         (WebCore):
2883
2884 2013-05-27  Darin Adler  <darin@apple.com>
2885
2886         Fix build.
2887
2888         * html/HTMLAnchorElement.cpp:
2889         (WebCore::hasNonEmptyBox): Fix typo.
2890
2891 2013-05-27  Darin Adler  <darin@apple.com>
2892
2893         Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
2894         https://bugs.webkit.org/show_bug.cgi?id=116842
2895
2896         Reviewed by Antti Koivisto.
2897
2898         * dom/Node.cpp: Removed hasNonEmptyBoundingBox.
2899         * dom/Node.h: Ditto.
2900
2901         * html/HTMLAnchorElement.cpp:
2902         (WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
2903         added more-explicit clearer comments. No behavior change.
2904         (WebCore::hasNonEmptyBox): Added.  Has the same code that was in
2905         Node::hasNonEmptyBoundingBox with some additional comments.
2906         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
2907
2908 2013-05-27  Darin Adler  <darin@apple.com>
2909
2910         Move isBlockFlowElement and related functions out of the Node class into editing code
2911         https://bugs.webkit.org/show_bug.cgi?id=116846
2912
2913         Reviewed by Antti Koivisto.
2914
2915         * dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
2916         inSameContainingBlockFlowElement. These are all editing functions that don't
2917         belong in the Node class, and mostly-deprecated ones to boot.
2918         * dom/Node.h: Ditto.
2919
2920         * dom/Position.cpp:
2921         (WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
2922         is used only here, so put it here.
2923         (WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
2924         (WebCore::Position::leadingWhitespacePosition): Ditto.
2925
2926         * editing/InsertLineBreakCommand.cpp:
2927         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
2928         deprecatedEnclosingBlockFlowElement at its new location.
2929         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
2930
2931         * editing/InsertListCommand.cpp:
2932         (WebCore::InsertListCommand::doApplyForSingleParagraph): use
2933         isBlockFlowElement at its new location.
2934         * editing/ReplaceSelectionCommand.cpp:
2935         (WebCore::enclosingInline): Ditto.
2936
2937         * editing/VisiblePosition.cpp:
2938         (WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
2939         at its new location.
2940         (WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
2941         * editing/VisibleSelection.cpp:
2942         (WebCore::makeSearchRange): Ditto.
2943
2944         * editing/htmlediting.cpp:
2945         (WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
2946         function, but here because this is an editing function, not suitable as a Node member.
2947         (WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
2948         since the Node member function had a comment saying it was deprecated. Also changed so
2949         it tolerates a 0 for an argument, which made it easier for one caller.
2950
2951         * editing/htmlediting.h: Added the two new functions.
2952
2953 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
2954
2955         Add guard around paintForFixedRootBackground
2956         https://bugs.webkit.org/show_bug.cgi?id=116754
2957
2958         Reviewed by Simon Fraser.
2959
2960         paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
2961
2962         No new tests, no behavior change.
2963
2964         * rendering/RenderLayer.cpp:
2965         (WebCore):
2966
2967 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
2968
2969         Remove a leftover Pagepoup from PickerIndicatorElement.h
2970         https://bugs.webkit.org/show_bug.cgi?id=116801
2971
2972         Reviewed by Anders Carlsson.
2973
2974         No new tests, no behavior change.
2975
2976         * html/shadow/PickerIndicatorElement.h:
2977         (WebCore):
2978
2979 2013-05-27  Claudio Saavedra  <csaavedra@igalia.com>
2980
2981         [CSS] -webkit-var prefix is case-sensitive
2982         https://bugs.webkit.org/show_bug.cgi?id=116829
2983
2984         Reviewed by Darin Adler.
2985
2986         Tests: Added case to fast/css/variables/case-sensitive.html
2987
2988         * css/CSSParser.cpp:
2989         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
2990         IsEqualToCSSIdentifier that respects case-sensitivity.
2991         (WebCore::CSSParser::realLex): Use the above method for CSS
2992         variable declarations.
2993
2994 2013-05-27  Zalan Bujtas  <zalan@apple.com>
2995
2996         drop-shadow filter with overflow:hidden child misbehaves.
2997         https://bugs.webkit.org/show_bug.cgi?id=109783
2998
2999         Reviewed by Simon Fraser.
3000
3001         Applying CSS filters only to the scrollbar rect leaves rendering
3002         artefacts. Filters should skip such partial repaints.
3003
3004         Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
3005         initiate partial repaints.
3006
3007         * rendering/RenderLayer.cpp:
3008         (WebCore::RenderLayer::setupFilters):
3009         (WebCore::RenderLayer::paintLayerContents):
3010         * rendering/RenderLayer.h:
3011         (RenderLayer):
3012
3013 2013-05-27  Xueqing Huang  <huangxueqing@baidu.com>
3014
3015         Move Windows port off legacy clipboard.
3016         https://bugs.webkit.org/show_bug.cgi?id=116258
3017
3018         Reviewed by Darin Adler.
3019
3020         Clipboard refactor, no new tests.
3021
3022         * dom/Clipboard.h:
3023         * page/win/EventHandlerWin.cpp:
3024         (WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
3025         * platform/Pasteboard.h:
3026         (WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
3027         (WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
3028         * platform/win/ClipboardWin.cpp:
3029         (WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
3030         (WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
3031         * platform/win/ClipboardWin.h: Removed.
3032         * platform/win/EditorWin.cpp:
3033         (WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
3034         * platform/win/PasteboardWin.cpp:
3035         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
3036         (WebCore::Pasteboard::createPrivate): Ditto.
3037         (WebCore::Pasteboard::createForDragAndDrop): Ditto.
3038         (WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
3039         (WebCore::Pasteboard::Pasteboard):
3040         (WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
3041         (WebCore::Pasteboard::clear): Ditto.
3042         (WebCore::Pasteboard::hasData): Ditto.
3043         (WebCore::addMimeTypesForFormat): Ditto.
3044         (WebCore::Pasteboard::types): Ditto.
3045         (WebCore::Pasteboard::readString): Ditto.
3046         (WebCore::Pasteboard::readFilenames): Ditto.
3047         (WebCore::writeURL): Ditto.
3048         (WebCore::Pasteboard::writeString): Ditto.
3049         (WebCore::Pasteboard::setDragImage): Ditto.
3050         (WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
3051         (WebCore::Pasteboard::writeSelection):
3052         (WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
3053         (WebCore::Pasteboard::writePlainText):
3054         (WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
3055         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
3056         (WebCore::writeFileToDataObject): Ditto.
3057         (WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
3058         (WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
3059         (WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
3060         (WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
3061         (WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
3062         (WebCore::getCachedImage): Copied from ClipboardWin.cpp.
3063         (WebCore::createGlobalImageFileDescriptor): Ditto.
3064         (WebCore::createGlobalImageFileContent): Ditto.
3065         (WebCore::createGlobalHDropContent): Ditto.
3066         (WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
3067         (WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
3068
3069 2013-05-27  Tim Horton  <timothy_horton@apple.com>
3070
3071         PDFPlugin: Main-frame PDFPlugin Accessibility
3072         https://bugs.webkit.org/show_bug.cgi?id=116563
3073         <rdar://problem/13458534>
3074
3075         Reviewed by Sam Weinig.
3076
3077         * WebCore.exp.in: Export AffineTransform::mapRect.
3078
3079 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
3080
3081         Checkbox UX update.
3082         https://bugs.webkit.org/show_bug.cgi?id=116838.
3083
3084         Reviewed by Rob Buis.
3085
3086         BlackBerry PR 342302.
3087         Internally Reviewed by Jeff Rogers.
3088         Remove old background and change pressed checkmark image.
3089
3090         * platform/blackberry/RenderThemeBlackBerry.cpp:
3091         (WebCore::RenderThemeBlackBerry::paintCheckbox):
3092
3093 2013-05-27  Sam Weinig  <sam@webkit.org>
3094
3095         When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
3096         https://bugs.webkit.org/show_bug.cgi?id=116836
3097         <rdar://problem/13949905>
3098
3099         Reviewed by Simon Fraser.
3100
3101         * page/FrameView.cpp:
3102         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
3103         Don't use the light style when the background is completely transparent.
3104
3105 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
3106
3107         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
3108         https://bugs.webkit.org/show_bug.cgi?id=116210
3109
3110         Reviewed by Rob Buis.
3111
3112         Set and use the ICU_INCLUDE_DIRS variable to avoid
3113         duplicated adding of the ICU include directory.
3114
3115         * PlatformBlackBerry.cmake:
3116
3117 2013-05-27  Antti Koivisto  <antti@apple.com>
3118
3119         Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
3120         https://bugs.webkit.org/show_bug.cgi?id=116823
3121
3122         Reviewed by Andreas Kling.
3123
3124         FontGlyphs does not need to know about Font anymore.
3125
3126         * platform/graphics/Font.cpp:
3127         (WebCore::Font::Font):
3128         (WebCore::Font::operator=):
3129         * platform/graphics/Font.h:
3130         (WebCore::Font::isPlatformFont):
3131         (WebCore::Font::glyphDataAndPageForCharacter):
3132         (Font):
3133         * platform/graphics/FontCache.h:
3134         * platform/graphics/FontFallbackList.cpp:
3135         (WebCore::FontGlyphs::FontGlyphs):
3136         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
3137         * platform/graphics/FontFallbackList.h:
3138         (WebCore):
3139         (WebCore::FontGlyphs::createForPlatformFont):
3140         
3141             Tweaked the name.
3142
3143         (WebCore::FontGlyphs::isForPlatformFont):
3144         
3145             Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
3146
3147         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
3148         (WebCore::FontCache::systemFallbackForCharacters):
3149         * platform/graphics/freetype/FontCacheFreeType.cpp:
3150         (WebCore::FontCache::systemFallbackForCharacters):
3151         * platform/graphics/mac/FontCacheMac.mm:
3152         (WebCore::FontCache::systemFallbackForCharacters):
3153         * platform/graphics/qt/FontCacheQt.cpp:
3154         (WebCore::FontCache::systemFallbackForCharacters):
3155         * platform/graphics/win/FontCacheWin.cpp:
3156         (WebCore::FontCache::systemFallbackForCharacters):
3157         * platform/graphics/wince/FontCacheWinCE.cpp:
3158         (WebCore::FontCache::systemFallbackForCharacters):
3159         
3160             More descriptive name and tighter interface.
3161
3162 2013-05-27  Mihnea Ovidenie  <mihnea@adobe.com>
3163
3164         [CSSRegions] Prevent unnecessary copy of LayoutRect objects
3165         https://bugs.webkit.org/show_bug.cgi?id=116828
3166
3167         Reviewed by Andreas Kling.
3168
3169         Use const references for parameter passing.
3170         No functional change, no new tests.
3171
3172         * rendering/RenderFlowThread.cpp:
3173         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
3174         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
3175         * rendering/RenderFlowThread.h:
3176         * rendering/RenderRegion.cpp:
3177         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3178         * rendering/RenderRegion.h:
3179
3180 2013-05-27  Leo Yang  <leoyang@rim.com>
3181
3182         [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
3183         https://bugs.webkit.org/show_bug.cgi?id=116543
3184
3185         Reviewed by Rob Buis.
3186         Reviewed internally by Joe Mason.
3187
3188         It's a regression introduced by r132556.
3189         BlackBerry is doing friendly HTTP error handling: if there is no response body
3190         for an HTTP error it will display an error message made by the port. But for a
3191         XHR request, which usually does not result in displaying error messages to the
3192         end user, HTTP error code should be revealed to let the JavaScript know what
3193         the actual server error code is.
3194
3195         Covered by existing tests:
3196         ManualTests/blackberry/head-xhr-nonexistant-file.html
3197         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
3198         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
3199
3200         * platform/network/blackberry/NetworkJob.cpp:
3201         (WebCore::NetworkJob::shouldNotifyClientFailed):
3202
3203 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
3204
3205         Adjust date input width.
3206         https://bugs.webkit.org/show_bug.cgi?id=100760.
3207
3208         Reviewed by Rob Buis.
3209
3210         BlackBerry PR 343497.
3211         Internally Reviewed by Jeff Rogers.
3212
3213         Set width to auto to fit the string length.
3214
3215         * css/themeBlackBerry.css:
3216         (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
3217
3218 2013-05-27  Andreas Kling  <akling@apple.com>
3219
3220         Document::setHoveredNode() should be setHoveredElement().
3221         <http://webkit.org/b/116819>
3222
3223         Reviewed by Antti Koivisto.
3224
3225         Only Elements can be hovered, teach Document about this.
3226
3227         * dom/Document.h:
3228         * dom/Document.cpp:
3229         (WebCore::Document::dispose):
3230         (WebCore::Document::detach):
3231
3232             m_hoverNode => m_hoveredElement.
3233             Removed hoverNode() and setHoverNode() since those were only used internally.
3234
3235         (WebCore::Document::updateHoverActiveState):
3236
3237             Updated for hovered things always being Elements.
3238
3239         (WebCore::Document::hoveredElementDidDetach):
3240         * dom/Element.cpp:
3241         (WebCore::Element::detach):
3242
3243             Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
3244             following the same pattern as elementInActiveChainDidDetach().
3245
3246 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3247
3248         [Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
3249         https://bugs.webkit.org/show_bug.cgi?id=116822
3250
3251         Reviewed by Andreas Kling.
3252
3253         The input fontDescription may have more than one family defined.
3254
3255         * platform/qt/RenderThemeQStyle.cpp:
3256         (WebCore::RenderThemeQStyle::adjustButtonStyle):
3257
3258 2013-05-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3259
3260         [Qt][Win] Input events aren't mapped properly with windowless plugins.
3261         https://bugs.webkit.org/show_bug.cgi?id=116094
3262
3263         Reviewed by Tor Arne Vestbø.
3264
3265         The events are first sent properly but Flash then immediately repaints
3266         and this causes flickering painting.
3267         The issue is that Flash seems to be doing some input event tracking of
3268         its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
3269
3270         We are currently using two coordinate systems for windowless plugins on Windows with Qt:
3271         - FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
3272         - Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
3273
3274         This patch fixes the bug by mapping input events to the native window returned
3275         as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
3276         the ones used by Flash internally.
3277         With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
3278         on Windows with Qt.
3279
3280         * platform/qt/QWebPageClient.h:
3281         (QWebPageClient):
3282           Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
3283         * plugins/win/PluginViewWin.cpp:
3284         (WebCore::contentsToNativeWindow):
3285         (WebCore::PluginView::paintIntoTransformedContext):
3286         (WebCore::PluginView::handleMouseEvent):
3287
3288 2013-05-27  Antti Koivisto  <antti@apple.com>
3289
3290         Tighten FontGlyphs interfaces to take FontDescription instead of Font
3291         https://bugs.webkit.org/show_bug.cgi?id=116818
3292
3293         Reviewed by Andreas Kling.
3294
3295         This gives better understanding of what the actual inputs are.
3296
3297         * WebCore.exp.in:
3298         * platform/graphics/Font.h:
3299         (WebCore::Font::primaryFont):
3300         (WebCore::Font::fontDataAt):
3301         (WebCore::Font::isFixedPitch):
3302         * platform/graphics/FontCache.cpp:
3303         (WebCore::FontCache::getFontData):
3304         * platform/graphics/FontCache.h:
3305         * platform/graphics/FontFallbackList.cpp:
3306         (WebCore::FontGlyphs::determinePitch):
3307         (WebCore::FontGlyphs::realizeFontDataAt):
3308         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
3309         * platform/graphics/FontFallbackList.h:
3310         (WebCore::FontGlyphs::primaryFontData):
3311         (WebCore::FontGlyphs::isFixedPitch):
3312         (WebCore::FontGlyphs::primarySimpleFontData):
3313         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
3314         * platform/graphics/freetype/FontCacheFreeType.cpp:
3315         * platform/graphics/mac/FontCacheMac.mm:
3316         (WebCore::FontCache::similarFontPlatformData):
3317         
3318             Drop get* naming and make this Mac only as no other platform has it.
3319
3320         * platform/graphics/qt/FontCacheQt.cpp:
3321         * platform/graphics/win/FontCacheWin.cpp:
3322         * platform/graphics/wince/FontCacheWinCE.cpp:
3323         (WebCore):
3324
3325 2013-05-27  Andreas Kling  <akling@apple.com>
3326
3327         Strengthen typing of detaching an Element from Document's :active chain.
3328         <http://webkit.org/b/116815>
3329
3330         Reviewed by Antti Koivisto.
3331
3332         Tiny cleanup now that the :active chain can only contain elements.
3333         Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
3334
3335         * dom/Element.cpp:
3336         (WebCore::Element::detach):
3337         * dom/Document.h:
3338         * dom/Document.cpp:
3339         (WebCore::Document::elementInActiveChainDidDetach):
3340
3341             Rename, take Element*, remove silly condition that was always true.
3342
3343 2013-05-27  Andrei Bucur  <abucur@adobe.com>
3344
3345         [CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
3346         https://bugs.webkit.org/show_bug.cgi?id=116441
3347
3348         Reviewed by David Hyatt.
3349
3350         The patch changes the following things:
3351         - exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
3352         - offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
3353         currently being laid out;
3354         - removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
3355         that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
3356         function is called instead;
3357         - RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
3358         region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
3359         that can be used for all the ancestor containing blocks of the current box being laid out.
3360
3361         The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
3362         passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
3363         risky. If there is a possibility of having a different box info result for a different offset
3364         then the cache is not working correctly.
3365
3366         Tests: No function change, no tests.
3367
3368         * rendering/RenderBlock.cpp:
3369         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3370         (WebCore::RenderBlock::logicalLeftOffsetForContent):
3371         (WebCore::RenderBlock::logicalRightOffsetForContent):
3372         (WebCore::RenderBlock::getClearDelta):
3373         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
3374         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
3375         (WebCore::RenderBlock::logicalWidthChangedInRegions):
3376         * rendering/RenderBlock.h:
3377         (WebCore::RenderBlock::availableLogicalWidthForLine):
3378         (WebCore::RenderBlock::logicalRightOffsetForLine):
3379         (WebCore::RenderBlock::logicalLeftOffsetForLine):
3380         (WebCore::RenderBlock::startOffsetForLine):
3381         (WebCore::RenderBlock::endOffsetForLine):
3382         (WebCore::RenderBlock::availableLogicalWidthForContent):
3383         (WebCore::RenderBlock::startOffsetForContent):
3384         (WebCore::RenderBlock::endOffsetForContent):
3385         (WebCore::RenderBlock::logicalLeftOffsetForContent):
3386         (WebCore::RenderBlock::logicalRightOffsetForContent):
3387         * rendering/RenderBox.cpp:
3388         (WebCore::RenderBox::borderBoxRectInRegion):
3389         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
3390         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
3391         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
3392         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
3393         (WebCore::RenderBox::computeLogicalWidthInRegion):
3394         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3395         (WebCore::RenderBox::renderBoxRegionInfo):
3396         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3397         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3398         (WebCore::computeInlineStaticDistance):
3399         (WebCore::RenderBox::computePositionedLogicalWidth):
3400         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
3401         (WebCore::RenderBox::computePositionedLogicalHeight):
3402         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3403         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
3404         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
3405         (WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
3406         * rendering/RenderBox.h:
3407         * rendering/RenderFlexibleBox.cpp:
3408         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3409         * rendering/RenderFlowThread.cpp:
3410         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3411         (WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
3412         (WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
3413         (WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
3414         (WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
3415         (WebCore::RenderFlowThread::currentActiveRenderBox):
3416         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
3417         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
3418         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
3419         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3420         * rendering/RenderFlowThread.h:
3421         * rendering/RenderTable.cpp:
3422         (WebCore::RenderTable::updateLogicalWidth):
3423         * rendering/RenderView.cpp:
3424         (WebCore::RenderView::pushLayoutState):
3425         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
3426         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
3427         * rendering/RenderView.h:
3428         (WebCore::RenderView::pushLayoutState):
3429         (WebCore::RenderView::popLayoutState):
3430
3431 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3432
3433         Active DOM objects stopped twice
3434         https://bugs.webkit.org/show_bug.cgi?id=116524
3435
3436         Reviewed by Alexey Proskuryakov.
3437
3438         Only iterate over all active DOM object to stop them once.
3439
3440         To ensure later created active DOM objects are stopped,
3441         suspendActiveDOMObjectIfNeeded now also stops active DOM objects
3442         if needed. This also fixes an existing bug when active DOM
3443         objects were created after stopActiveDOMObjects had been called.
3444
3445         Two existing tests creates new active DOM objects after stopActiveDOMObjects
3446         has been called:
3447             fast/dom/xmlhttprequest-constructor-in-detached-document.html
3448             fast/dom/Window/timer-null-script-execution-context.html
3449
3450         * dom/ScriptExecutionContext.cpp:
3451         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
3452         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
3453
3454 2013-05-27  Charles Wei  <charles.wei@torchmobile.com.cn>
3455
3456         Remove redundant CachedRawResource::loader()
3457         https://bugs.webkit.org/show_bug.cgi?id=116805
3458
3459         Reviewed by Andreas Kling.
3460
3461         Just remove redundant code, no test case needed.
3462
3463         * loader/cache/CachedRawResource.cpp:
3464         * loader/cache/CachedRawResource.h:
3465
3466 2013-05-27  Andreas Kling  <akling@apple.com>
3467
3468         WinCE build TLC: Node::active() moved to Element.
3469
3470         * rendering/RenderThemeWinCE.cpp:
3471         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3472
3473 2013-05-26  Jaehun Lim  <ljaehun.lim@samsung.com>
3474
3475         CSSParser::parseImageResolution doesn't need a parameter.
3476         https://bugs.webkit.org/show_bug.cgi?id=116755
3477
3478         Reviewed by Darin Adler.
3479
3480         parseImageResolution() can get CSSPraserValueList from m_valueList directly.
3481
3482         No new tests, no behavior change.
3483
3484         * css/CSSParser.cpp:
3485         (WebCore::CSSParser::parseImageResolution):
3486         * css/CSSParser.h:
3487
3488 2013-05-26  Andreas Kling  <akling@apple.com>
3489
3490         Turn TreeScope::focusedNode() into focusedElement().
3491         <http://webkit.org/b/116802>
3492
3493         Reviewed by Darin Adler.
3494
3495         For the hundredth time, only Elements can be focused!