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