Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-29  Kent Tamura  <tkent@chromium.org>
2
3         Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
4         https://bugs.webkit.org/show_bug.cgi?id=116796
5
6         Reviewed by Ryosuke Niwa.
7
8         This feature was used only by Chromium port.
9
10         * CMakeLists.txt:
11         * GNUmakefile.list.am:
12         * Target.pri:
13         * WebCore.vcproj/WebCore.vcproj:
14         * WebCore.vcxproj/WebCore.vcxproj:
15         * WebCore.vcxproj/WebCore.vcxproj.filters:
16         * WebCore.xcodeproj/project.pbxproj:
17         * css/html.css:
18         (input::-webkit-date-and-time-value):
19         * dom/Element.cpp:
20         * dom/Element.h:
21         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
22         * html/BaseChooserOnlyDateAndTimeInputType.h:
23         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
24         * html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
25         * html/DateInputType.cpp:
26         * html/DateInputType.h:
27         (DateInputType):
28         * html/DateTimeFieldsState.cpp: Removed.
29         * html/DateTimeFieldsState.h: Removed.
30         * html/DateTimeInputType.cpp:
31         * html/DateTimeInputType.h:
32         (DateTimeInputType):
33         * html/DateTimeLocalInputType.cpp:
34         * html/DateTimeLocalInputType.h:
35         (DateTimeLocalInputType):
36         * html/HTMLInputElement.cpp:
37         (WebCore::HTMLInputElement::HTMLInputElement):
38         (WebCore):
39         * html/HTMLInputElement.h:
40         (HTMLInputElement):
41         * html/InputType.cpp:
42         * html/InputType.h:
43         (InputType):
44         * html/MonthInputType.cpp:
45         * html/MonthInputType.h:
46         (MonthInputType):
47         * html/TimeInputType.cpp:
48         * html/TimeInputType.h:
49         (TimeInputType):
50         * html/WeekInputType.cpp:
51         * html/WeekInputType.h:
52         (WeekInputType):
53         * html/shadow/ClearButtonElement.cpp: Removed.
54         * html/shadow/ClearButtonElement.h: Removed.
55         * html/shadow/DateTimeEditElement.cpp: Removed.
56         * html/shadow/DateTimeEditElement.h: Removed.
57         * html/shadow/DateTimeFieldElement.cpp: Removed.
58         * html/shadow/DateTimeFieldElement.h: Removed.
59         * html/shadow/DateTimeFieldElements.cpp: Removed.
60         * html/shadow/DateTimeFieldElements.h: Removed.
61         * html/shadow/DateTimeNumericFieldElement.cpp: Removed.
62         * html/shadow/DateTimeNumericFieldElement.h: Removed.
63         * html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
64         * html/shadow/DateTimeSymbolicFieldElement.h: Removed.
65         * html/shadow/PickerIndicatorElement.cpp: Removed.
66         * html/shadow/PickerIndicatorElement.h: Removed.
67         * page/ChromeClient.h:
68         (ChromeClient):
69         * platform/LocalizedStrings.h:
70         (WebCore):
71         * platform/text/PlatformLocale.cpp:
72         * platform/text/PlatformLocale.h:
73         (Locale):
74         * rendering/RenderDetailsMarker.cpp:
75         * rendering/RenderDetailsMarker.h:
76         * rendering/RenderObject.h:
77         (RenderObject):
78
79 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
80
81         Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
82         https://bugs.webkit.org/show_bug.cgi?id=116914
83
84         Reviewed by Benjamin Poulain.
85
86         Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
87
88         * dom/Document.cpp:
89         * dom/Document.h:
90
91 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
92
93         Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
94         https://bugs.webkit.org/show_bug.cgi?id=116927
95
96         Reviewed by Andreas Kling.
97
98         Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
99
100         This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
101         copying a hash table is at least linear with the number of elements.
102
103         * rendering/RenderWidget.cpp:
104         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
105
106 2013-05-29  Andreas Kling  <akling@apple.com>
107
108         Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
109
110         Rubber-stamped by Antti "Lucky" Koivisto.
111
112         * dom/Document.h:
113         * dom/Document.cpp:
114
115 2013-05-28  Andreas Kling  <akling@apple.com>
116
117         FocusController should operate on Elements internally.
118         <http://webkit.org/b/116781>
119
120         Reviewed by Antti Koivisto.
121
122         Switch from Node* to Element* as much as possible inside FocusController.
123         Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
124
125         * page/FocusController.h:
126         * page/FocusController.cpp:
127         (WebCore::dispatchEventsOnWindowAndFocusedElement):
128         (WebCore::isNonFocusableShadowHost):
129         (WebCore::adjustedTabIndex):
130         (WebCore::shouldVisit):
131         (WebCore::FocusController::setFocused):
132         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
133         (WebCore::FocusController::advanceFocusInDocumentOrder):
134         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
135         (WebCore::FocusController::findFocusableElementRecursively):
136         (WebCore::FocusController::findFocusableElement):
137         (WebCore::FocusController::nextFocusableElement):
138         (WebCore::FocusController::previousFocusableElement):
139         (WebCore::FocusController::setActive):
140
141 2013-05-29  Radu Stavila  <stavila@adobe.com>
142
143         [CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
144         https://bugs.webkit.org/show_bug.cgi?id=111749
145
146         Reviewed by Antti Koivisto.
147
148         When searching for the hover ancestor and encountering a named flow thread,
149         the search will continue with the DOM ancestor of the top-most element
150         in the named flow thread.
151
152         Tests: fast/regions/hover-in-region-grandparent.html
153                fast/regions/hover-in-region-parent-skip.html
154                fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
155                fast/regions/hover-on-child-in-region.html
156                fast/regions/hover-on-child-in-region-in-region.html
157
158         * rendering/RenderObject.cpp:
159         (WebCore::RenderObject::hoverAncestor):
160         * rendering/RenderObject.h:
161
162 2013-05-28  Nate Chapin  <japhet@chromium.org>
163
164         Crash in WebCore::SubresourceLoader::releaseResources when connection fails
165         https://bugs.webkit.org/show_bug.cgi?id=87743
166
167         Don't do anything complicated in SubresourceLoader::releaseResources(),
168         just clear variables. With this patch, releaseResources() will still
169         assert in debug builds if it is called twice, but it will safely execute
170         in release.
171
172         Reviewed by Darin Adler.
173
174         * loader/ResourceLoader.cpp:
175         (WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
176             and cancel() into a helper.
177         (WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
178             reentrancy from within didCancel().
179         * loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
180         * loader/SubresourceLoader.cpp:
181         (WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
182             put finish() in the middle of the process.
183         (WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
184             in the middle of the process.
185         (WebCore::SubresourceLoader::didCancel):
186         (WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
187             most importantly calling loadDone().
188         (WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
189         * loader/SubresourceLoader.h:
190         (SubresourceLoader):
191         * loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
192             and clearLoader() (which just nulls m_loader).
193         * loader/cache/CachedResource.h:
194         * loader/chromium/ResourceLoaderChromium.cpp:
195
196 2013-05-28  Seokju Kwon  <seokju.kwon@gmail.com>
197
198         [GTK] Build fix after r150837
199         https://bugs.webkit.org/show_bug.cgi?id=116904
200
201         Unreviewed build fix.
202
203         * GNUmakefile.am:
204
205 2013-05-28  Andy Estes  <aestes@apple.com>
206
207         REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
208         https://bugs.webkit.org/show_bug.cgi?id=116906
209         <rdar://problem/13991927>
210
211         Reviewed by Andreas Kling.
212
213         Writing a test for this is blocked on https://webkit.org/b/116199.
214
215         Some WebKit clients use JavaScript to preload images from disk so that
216         subsequent loads will display immediately from the memory cache. By not
217         caching non-HTTP sub-resources in memory, we break this common pattern.
218         This change restricts r150169 to only apply to cached main resources.
219         Sub-resources will again be cached indefinitely as they were prior to
220         r150169.
221
222         * loader/cache/CachedResource.cpp:
223         (WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
224         main resource from a scheme that should not be cached indefinitely,
225         return 0 for the freshness lifetime. For other non-HTTP cached
226         resources, return an indefinite freshness lifetime.
227
228 2013-05-28  Dean Jackson  <dino@apple.com>
229
230         Animations do not restart after exiting page cache
231         https://bugs.webkit.org/show_bug.cgi?id=116900
232
233         Reviewed by Tim Horton.
234
235         Animations are suspended as they enter the page cache, but
236         were not getting correctly resumed when exiting. The cause
237         was an error in r149576 which was checking a global flag for suspension
238         on the AnimationController and thus not trying to resume anything.
239
240         Test: animations/resume-after-page-cache.html
241
242         * page/animation/AnimationController.cpp:
243         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
244         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
245
246 2013-05-28  Chris Rogers  <crogers@google.com>
247
248         Support multiple HRTFDatabases for different sample-rates
249         https://bugs.webkit.org/show_bug.cgi?id=116183
250
251         Reviewed by Kenneth Russell.
252
253         Adapted from Blink:
254         https://codereview.chromium.org/14636011/
255
256         This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
257
258         * Modules/webaudio/AudioContext.h:
259         (WebCore::AudioContext::hrtfDatabaseLoader):
260         (AudioContext):
261         * Modules/webaudio/OfflineAudioContext.cpp:
262         (WebCore::OfflineAudioContext::create):
263         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
264         (WebCore::OfflineAudioDestinationNode::offlineRender):
265         * Modules/webaudio/PannerNode.cpp:
266         (WebCore::PannerNode::initialize):
267         (WebCore::PannerNode::setPanningModel):
268         * platform/audio/HRTFDatabaseLoader.cpp:
269         (WebCore):
270         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
271         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
272         * platform/audio/HRTFDatabaseLoader.h:
273         (HRTFDatabaseLoader):
274         (WebCore::HRTFDatabaseLoader::loaderMap):
275         * platform/audio/HRTFPanner.cpp:
276         (WebCore::HRTFPanner::HRTFPanner):
277         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
278         (WebCore::HRTFPanner::pan):
279         * platform/audio/HRTFPanner.h:
280         (HRTFPanner):
281         * platform/audio/Panner.cpp:
282         (WebCore::Panner::create):
283         * platform/audio/Panner.h:
284         (WebCore):
285
286 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
287
288         Windows build fix.
289
290         * platform/cf/KURLCFNet.cpp:
291         (WebCore::KURL::createCFURL):
292
293 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
294
295         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
296         https://bugs.webkit.org/show_bug.cgi?id=116887
297         <rdar://problem/12965959>
298
299         Reviewed by Darin Adler.
300
301         Test: http/tests/uri/curly-braces-escaping.html
302
303         The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
304         unlike WebCore.
305
306         Centralized code for converting between CFURLs and strings in a place that WebKit
307         can use directly.
308
309         * WebCore.exp.in:
310         * WebCore.vcproj/WebCore.vcproj:
311         * WebCore.vcxproj/WebCore.vcxproj:
312         * WebCore.vcxproj/WebCore.vcxproj.filters:
313         * WebCore.xcodeproj/project.pbxproj:
314         Keeping things building.
315
316         * platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
317         * platform/KURL.h:
318         Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
319         inconsistently, and now URLs use URLCharBuffer.
320
321         * platform/cf/CFURLExtras.cpp: Added.
322         (WebCore::createCFURLFromBuffer):
323         (WebCore::getURLBytes):
324         * platform/cf/CFURLExtras.h: Added.
325         * platform/cf/KURLCFNet.cpp:
326         (WebCore::KURL::KURL):
327         (WebCore::KURL::createCFURL):
328         Extracted code for CFURL string manipulation that is not logcally part of KURL.
329
330         * platform/mac/KURLMac.mm:
331         (WebCore::KURL::KURL): Use the new getURLBytes function.
332         (WebCore::KURL::operator NSURL *): Added a comment.
333         (WebCore::KURL::createCFURL): Added a comment, and updated for new names and
334         signatures.
335
336         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
337         Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
338         encodings right.
339
340 2013-05-28  Anders Carlsson  <andersca@apple.com>
341
342         Create a html/forms subdirectory and move FileIconLoader there
343         https://bugs.webkit.org/show_bug.cgi?id=116880
344
345         Reviewed by Jessie Berlin.
346
347         A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
348         them out into a separate subdirectory, html/forms.
349
350         Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
351         the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
352
353         * CMakeLists.txt:
354         * GNUmakefile.list.am:
355         * Target.pri:
356         * WebCore.vcproj/WebCore.vcproj:
357         * WebCore.vcxproj/WebCore.vcxproj:
358         * WebCore.vcxproj/WebCore.vcxproj.filters:
359         * WebCore.xcodeproj/project.pbxproj:
360         * html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
361         * html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
362
363 2013-05-28  Chris Fleizach  <cfleizach@apple.com>
364
365         AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
366         https://bugs.webkit.org/show_bug.cgi?id=116756
367
368         Reviewed by Tim Horton.
369
370         If AXFocused is set to true, but the WebView is not the first responder, then the call will
371         not do anything. This change asks the Chrome to make the WebView the first responder before
372         trying to set focus within the page.
373
374         Was not able to make a test, it requires on interplay between areas outside the web view.
375
376         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
377         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
378
379 2013-05-28  Jer Noble  <jer.noble@apple.com>
380
381         Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
382         https://bugs.webkit.org/show_bug.cgi?id=116882
383
384         Reviewed by Eric Carlson.
385
386         Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
387
388         * rendering/RenderTextTrackCue.cpp:
389         (WebCore::RenderTextTrackCue::repositionGenericCue):
390
391 2013-05-28  Alberto Garcia  <agarcia@igalia.com>
392
393         [BlackBerry] GraphicsContext: add missing definitions.
394         https://bugs.webkit.org/show_bug.cgi?id=115515
395
396         Reviewed by Rob Buis.
397
398         * platform/graphics/GraphicsContext.h:
399         (Graphics):
400         Add definition for PlatformGraphicsContext.
401         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
402         Include RoundedRect.h
403
404 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
405
406         [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
407         https://bugs.webkit.org/show_bug.cgi?id=116604
408
409         Reviewed by Carlos Garcia Campos.
410
411         PR 273550, 99638
412
413         Remove the "get" prefix from getters in the WebKit- and compositing-
414         thread layer classes, as well as LayerRendererSurface. Clarify which
415         geometry-related getters return normalized device coordinates by adding
416         a comment.
417
418         Also remove dead code related to LayerData::m_holePunchClipRect, which
419         was part of an eventually disabled fix for video clipping in iframes,
420         PR 99638. Since we now use AC layers for iframes, the bug is no longer
421         reproducible, and the dead code will never need to be enabled again.
422
423         No change in behavior, no new tests.
424
425         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
426         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
427         * platform/graphics/blackberry/LayerCompositingThread.cpp:
428         (WebCore::LayerCompositingThread::setDrawTransform):
429         (WebCore::LayerCompositingThread::transformedHolePunchRect):
430         (WebCore::LayerCompositingThread::drawTextures):
431         (WebCore::LayerCompositingThread::drawSurface):
432         * platform/graphics/blackberry/LayerCompositingThread.h:
433         (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
434         (LayerCompositingThread):
435         (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
436         (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
437         (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
438         * platform/graphics/blackberry/LayerData.h:
439         (LayerData): Removed unused data member "m_holePunchClipRect"
440         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
441         (WebCore::LayerFilterRenderer::applyActions):
442         * platform/graphics/blackberry/LayerRenderer.cpp:
443         (WebCore::LayerRenderer::compositeLayers):
444         (WebCore::LayerRenderer::drawDebugBorder):
445         (WebCore::LayerRenderer::drawHolePunchRect):
446         (WebCore::LayerRenderer::prepareFrameRecursive):
447         (WebCore::LayerRenderer::updateLayersRecursive):
448         (WebCore::collect3DPreservingLayers):
449         (WebCore::LayerRenderer::compositeLayersRecursive):
450         * platform/graphics/blackberry/LayerRendererSurface.cpp:
451         (WebCore::LayerRendererSurface::boundingBox):
452         * platform/graphics/blackberry/LayerRendererSurface.h:
453         (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
454         * platform/graphics/blackberry/LayerWebKitThread.h:
455         (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
456         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
457         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
458         (WebCore::VideoLayerWebKitThread::boundsChanged):
459
460 2013-05-28  Jer Noble  <jer.noble@apple.com>
461
462         Made AudioNode an EventTarget
463         https://bugs.webkit.org/show_bug.cgi?id=116871
464
465         Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
466
467         Reviewed by Darin Adler.
468
469         Tests: webaudio/audionode-expected.txt:
470                webaudio/audionode.html:
471
472         Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
473         all that same boilerplate from ScriptProcessorNode now that it's base class
474         is an EventTarget.
475
476         * Modules/webaudio/AudioNode.cpp:
477         (WebCore::AudioNode::interfaceName): Added boilerplate.
478         (WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
479         (WebCore::AudioNode::processIfNecessary): Whitespace.
480         * Modules/webaudio/AudioNode.h:
481         * Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
482         * Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
483         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
484         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
485         * dom/EventTarget.h: Mark AudioNode as an EventTarget.
486         * dom/EventTargetFactory.in: Ditto.
487
488 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
489
490         [BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
491         https://bugs.webkit.org/show_bug.cgi?id=116616
492
493         Reviewed by Carlos Garcia Campos.
494
495         The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
496         with a different winding order than the accelerated compositing backend
497         of the BlackBerry port. So, when we switched from Skia to this new
498         rendering engine, we switched from glFrontFace(GL_CCW) to
499         glFrontFace(GL_CW), and all was well when drawing display lists.
500         However, we forgot to update the winding order of geometry generated
501         within the accelerated compositing backend, which is used for masks and
502         filters, so they were getting erroneously culled out when
503         backface-visibility: hidden was applied to them. Fixed by switching the
504         winding order of all geometry generated up here, which has the added
505         benefit of enabling us to use TransformationMatrix::mapQuad instead of
506         transforming point-by-point.
507
508         To further complicate matters, a right-side up transform is used when
509         drawing layers into surfaces, reversing the winding order and requiring
510         us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
511         layers to surfaces, or the layers will get culled out inside the
512         surface.
513
514         Also fix spelling error, "drawed" should be "drawn".
515
516         No new tests, this is only detectable by pixel tests, which the
517         BlackBerry port currently doesn't support.
518
519         PR 341945.
520
521         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
522         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
523         * platform/graphics/blackberry/LayerCompositingThread.cpp:
524         (WebCore::LayerCompositingThread::setDrawTransform):
525         (WebCore::getTransformedRect):
526         (WebCore::LayerCompositingThread::drawTextures):
527         (WebCore::LayerCompositingThread::drawSurface):
528         * platform/graphics/blackberry/LayerCompositingThread.h:
529         (LayerCompositingThread):
530         (WebCore::LayerCompositingThread::origin):
531         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
532         (WebCore):
533         * platform/graphics/blackberry/LayerRenderer.cpp:
534         (WebCore::LayerRenderer::compositeLayers):
535         (WebCore):
536         (WebCore::LayerRenderer::drawLayersOnSurfaces):
537         * platform/graphics/blackberry/LayerRendererSurface.cpp:
538         (WebCore::LayerRendererSurface::drawRect):
539         (WebCore::LayerRendererSurface::transformedBounds):
540         * platform/graphics/blackberry/LayerRendererSurface.h:
541         (WebCore::LayerRendererSurface::origin):
542         (LayerRendererSurface):
543         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
544         (WebCore):
545         (WebCore::loadBufferingImageData):
546         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
547
548 2013-05-28  Andreas Kling  <akling@apple.com>
549
550         Move Node::dispatchChangeEvent() to HTMLFormControlElement.
551         <http://webkit.org/b/116866>
552
553         Reviewed by Anders Carlsson.
554
555         ...and devirtualize it, since it had no overrides.
556
557         * dom/Node.h:
558         * dom/Node.cpp:
559         * html/HTMLFormControlElement.h:
560         * html/HTMLFormControlElement.cpp:
561         (WebCore::HTMLFormControlElement::dispatchChangeEvent):
562         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
563         * html/FileInputType.cpp:
564         (WebCore::FileInputType::setFiles):
565         * html/HTMLTextFormControlElement.cpp:
566         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
567
568 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
569
570         Refactoring CSS grammar
571         https://bugs.webkit.org/show_bug.cgi?id=116679
572
573         Reviewed by Andreas Kling.
574
575         From Blink r149948 by <serya@chromium.org>
576
577         Added "closing_parenthesis:" and "error_recovery:" to avoid code
578         duplication in a couple of error recovery rules. Some other rules
579         were also refactored which allows to reduce the the number of
580         shift/reduce conflicts by 2.
581
582         No new tests required as this is just a refactoring, no new
583         functionality added.
584
585         * css/CSSGrammar.y.in:
586
587 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
588
589         Invalid block doesn't make declaration invalid
590         https://bugs.webkit.org/show_bug.cgi?id=115709
591
592         Reviewed by Andreas Kling.
593
594         From Blink r149446 by <serya@chromium.org>
595
596         Added a new rule "declaration_recovery:" which covers any kind of
597         "invalid_block_list maybe_space" sequence. By appending this new
598         rule to every rule reductable to "declaration:" we can remove some
599         redundant rules and improve error recovery of some others that
600         were only accepting exactly one error.
601
602         One of the rules being removed was preventing invalid blocks in a
603         declaration to invalidate the whole declaration. The rule was
604         reporting the syntax error but at the same time accepting the
605         invalid block as part of a valid declaration.
606
607         * css/CSSGrammar.y.in:
608
609 2013-05-28  Andreas Kling  <akling@apple.com>
610
611         Move dispatching of focus-related events from Node to Element.
612         <http://webkit.org/b/116864>
613
614         Reviewed by Antti Koivisto.
615
616         ...and pass around pointers to Element instead of Node.
617
618         * dom/Node.cpp:
619         * dom/Node.h:
620         * dom/Element.h:
621         * dom/Element.cpp:
622         (WebCore::Element::dispatchFocusInEvent):
623         (WebCore::Element::dispatchFocusOutEvent):
624         (WebCore::Element::dispatchFocusEvent):
625         (WebCore::Element::dispatchBlurEvent):
626
627             Moved here from Node.
628
629         * html/HTMLFormControlElement.h:
630         * html/HTMLFormControlElement.cpp:
631         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
632         * html/HTMLSelectElement.h:
633         * html/HTMLSelectElement.cpp:
634         (WebCore::HTMLSelectElement::dispatchFocusEvent):
635         (WebCore::HTMLSelectElement::dispatchBlurEvent):
636         * html/HTMLTextFormControlElement.h:
637         * html/HTMLTextFormControlElement.cpp:
638         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
639         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
640
641             Update subclass overrides and sprinkle OVERRIDE/FINAL.
642
643 2013-05-28  Zan Dobersek  <zdobersek@igalia.com>
644
645         Remove CachedResourceRequest::initiatorElement
646         https://bugs.webkit.org/show_bug.cgi?id=116862
647
648         Reviewed by Andreas Kling.
649
650         The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
651
652         * loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
653         * loader/cache/CachedResourceRequest.h:
654         (CachedResourceRequest): Remove the initiatorElement method declaration.
655
656 2013-05-28  Andreas Kling  <akling@apple.com>
657
658         Document::setFocusedNode() should be setFocusedElement().
659         <http://webkit.org/b/116857>
660
661         Reviewed by Antti Koivisto.
662
663         Only Elements can be focused, so tighten Document's idea of what's focused.
664
665         Most of this patch is just updating call sites for the new names and removing
666         now-unnecessary isElementNode() checks and casts.
667
668         * WebCore.exp.in:
669         * accessibility/AXObjectCache.cpp:
670         (WebCore::AXObjectCache::focusedUIElementForPage):
671         * accessibility/AccessibilityNodeObject.cpp:
672         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
673         * accessibility/AccessibilityRenderObject.cpp:
674         (WebCore::AccessibilityRenderObject::isFocused):
675         (WebCore::AccessibilityRenderObject::setFocused):
676         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
677         * bindings/objc/DOM.mm:
678         (-[DOMElement isFocused]):
679         * dom/Document.cpp:
680         (WebCore::Document::dispose):
681         (WebCore::Document::detach):
682         (WebCore::Document::focusedNodeRemoved):
683         (WebCore::Document::removeFocusedNodeOfSubtree):
684         (WebCore::Document::setFocusedElement):
685         (WebCore::Document::updateFocusAppearanceTimerFired):
686         (WebCore::eventTargetNodeForDocument):
687         * dom/Document.h:
688         (Document):
689         (WebCore::Document::focusedElement):
690         * dom/Element.cpp:
691         (WebCore::Element::attach):
692         (WebCore::Element::focus):
693         (WebCore::Element::blur):
694         (WebCore::Element::cancelFocusAppearanceUpdate):
695         * dom/Node.cpp:
696         (WebCore::Node::rendererIsEditable):
697         * dom/TreeScope.cpp:
698         (WebCore::TreeScope::focusedElement):
699         * dom/UserTypingGestureIndicator.cpp:
700         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
701         * editing/Editor.cpp:
702         (WebCore::Editor::setBaseWritingDirection):
703         (WebCore::Editor::setComposition):
704         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
705         * editing/EditorCommand.cpp:
706         (WebCore::verticalScrollDistance):
707         * editing/FrameSelection.cpp:
708         (WebCore::FrameSelection::selectAll):
709         (WebCore::FrameSelection::focusedOrActiveStateChanged):
710         (WebCore::FrameSelection::setFocusedElementIfNeeded):
711         (WebCore::FrameSelection::currentForm):
712         * history/CachedPage.cpp:
713         (WebCore::CachedPage::restore):
714         * html/HTMLInputElement.cpp:
715         (WebCore::HTMLInputElement::updateType):
716         (WebCore::HTMLInputElement::attach):
717         * html/HTMLTextAreaElement.cpp:
718         (WebCore::HTMLTextAreaElement::setValueCommon):
719         * html/HTMLTextFormControlElement.cpp:
720         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
721         (WebCore::HTMLTextFormControlElement::selectionStart):
722         (WebCore::HTMLTextFormControlElement::selectionEnd):
723         (WebCore::HTMLTextFormControlElement::selectionDirection):
724         * html/RadioInputType.cpp:
725         (WebCore::RadioInputType::handleKeydownEvent):
726         (WebCore::RadioInputType::isKeyboardFocusable):
727         * html/shadow/DateTimeEditElement.cpp:
728         (WebCore::DateTimeEditElement::focusedFieldIndex):
729         * loader/FrameLoader.cpp:
730         (WebCore::FrameLoader::stopLoading):
731         * page/DOMWindow.cpp:
732         (WebCore::DOMWindow::focus):
733         * page/EventHandler.cpp:
734         (WebCore::EventHandler::scrollOverflow):
735         (WebCore::EventHandler::logicalScrollOverflow):
736         (WebCore::EventHandler::dispatchMouseEvent):
737         (WebCore::EventHandler::sendContextMenuEventForKey):
738         (WebCore::EventHandler::capsLockStateMayHaveChanged):
739         * page/FocusController.cpp:
740         (WebCore::dispatchEventsOnWindowAndFocusedNode):
741         (WebCore::FocusController::advanceFocusInDocumentOrder):
742         (WebCore::FocusController::setFocusedElement):
743         (WebCore::FocusController::findFocusCandidateInContainer):
744         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
745         (WebCore::FocusController::advanceFocusDirectionally):
746         * page/FrameView.cpp:
747         (WebCore::FrameView::scrollToAnchor):
748         * plugins/PluginView.cpp:
749         (WebCore::PluginView::focusPluginElement):
750         * plugins/efl/PluginViewEfl.cpp:
751         (WebCore::PluginView::setFocus):
752         * plugins/mac/PluginViewMac.mm:
753         (WebCore::PluginView::platformStart):
754         * rendering/RenderImage.cpp:
755         (WebCore::RenderImage::paintAreaElementFocusRing):
756         * rendering/RenderListBox.cpp:
757         (WebCore::RenderListBox::paintItemForeground):
758         (WebCore::RenderListBox::paintItemBackground):
759         * rendering/RenderTextControlSingleLine.cpp:
760         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
761         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
762         * rendering/RenderTheme.cpp:
763         (WebCore::RenderTheme::isFocused):
764
765 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
766
767         Web Inspector: Enable CSS logging
768         https://bugs.webkit.org/show_bug.cgi?id=113401
769
770         Reviewed by Benjamin Poulain.
771
772         From Blink r149265 by <serya@chromium.org>
773
774         CSS logging was disabled in r147028 to prevent message overflow in
775         the inspector console. This change restores it by modifying the
776         CSS grammar in order to reduce as much consecutive errors as
777         possible in 'declaration_list' and 'decl_list' rules.
778
779         This way, for rules like 'x { color: ### }' only the first '#'
780         will be reported as error (instead of 3 identical errors).
781
782         The rule 'declaration' still produces multiple errors, because it
783         does not eat as much errors as possible. So in order not to create
784         a complex risky patch we just disable logging in the parser for
785         that rule.
786
787         * css/CSSGrammar.y.in:
788         * css/CSSParser.cpp:
789         (WebCore::CSSParser::CSSParser):
790         (WebCore::CSSParser::parseSheet):
791         (WebCore::CSSParser::syntaxError):
792         (WebCore::CSSParser::isLoggingErrors):
793         (WebCore::CSSParser::rewriteSpecifiers):
794         * css/CSSParser.h:
795         (CSSParser):
796
797 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
798
799         Build fix for WinCE after r150730.
800
801         * platform/graphics/FontFallbackList.cpp:
802         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
803
804 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
805
806         Build fix for WinCE after r150772.
807
808         * platform/win/ClipboardWin.cpp:
809         (WebCore):
810         * platform/win/PasteboardWin.cpp:
811         (WebCore::Pasteboard::readFilenames):
812         (WebCore):
813
814 2013-05-27  Darin Adler  <darin@apple.com>
815
816         Fix build.
817
818         * html/HTMLAnchorElement.cpp:
819         (WebCore::hasNonEmptyBox): Fix typo.
820
821 2013-05-27  Darin Adler  <darin@apple.com>
822
823         Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
824         https://bugs.webkit.org/show_bug.cgi?id=116842
825
826         Reviewed by Antti Koivisto.
827
828         * dom/Node.cpp: Removed hasNonEmptyBoundingBox.
829         * dom/Node.h: Ditto.
830
831         * html/HTMLAnchorElement.cpp:
832         (WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
833         added more-explicit clearer comments. No behavior change.
834         (WebCore::hasNonEmptyBox): Added.  Has the same code that was in
835         Node::hasNonEmptyBoundingBox with some additional comments.
836         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
837
838 2013-05-27  Darin Adler  <darin@apple.com>
839
840         Move isBlockFlowElement and related functions out of the Node class into editing code
841         https://bugs.webkit.org/show_bug.cgi?id=116846
842
843         Reviewed by Antti Koivisto.
844
845         * dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
846         inSameContainingBlockFlowElement. These are all editing functions that don't
847         belong in the Node class, and mostly-deprecated ones to boot.
848         * dom/Node.h: Ditto.
849
850         * dom/Position.cpp:
851         (WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
852         is used only here, so put it here.
853         (WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
854         (WebCore::Position::leadingWhitespacePosition): Ditto.
855
856         * editing/InsertLineBreakCommand.cpp:
857         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
858         deprecatedEnclosingBlockFlowElement at its new location.
859         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
860
861         * editing/InsertListCommand.cpp:
862         (WebCore::InsertListCommand::doApplyForSingleParagraph): use
863         isBlockFlowElement at its new location.
864         * editing/ReplaceSelectionCommand.cpp:
865         (WebCore::enclosingInline): Ditto.
866
867         * editing/VisiblePosition.cpp:
868         (WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
869         at its new location.
870         (WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
871         * editing/VisibleSelection.cpp:
872         (WebCore::makeSearchRange): Ditto.
873
874         * editing/htmlediting.cpp:
875         (WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
876         function, but here because this is an editing function, not suitable as a Node member.
877         (WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
878         since the Node member function had a comment saying it was deprecated. Also changed so
879         it tolerates a 0 for an argument, which made it easier for one caller.
880
881         * editing/htmlediting.h: Added the two new functions.
882
883 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
884
885         Add guard around paintForFixedRootBackground
886         https://bugs.webkit.org/show_bug.cgi?id=116754
887
888         Reviewed by Simon Fraser.
889
890         paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
891
892         No new tests, no behavior change.
893
894         * rendering/RenderLayer.cpp:
895         (WebCore):
896
897 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
898
899         Remove a leftover Pagepoup from PickerIndicatorElement.h
900         https://bugs.webkit.org/show_bug.cgi?id=116801
901
902         Reviewed by Anders Carlsson.
903
904         No new tests, no behavior change.
905
906         * html/shadow/PickerIndicatorElement.h:
907         (WebCore):
908
909 2013-05-27  Claudio Saavedra  <csaavedra@igalia.com>
910
911         [CSS] -webkit-var prefix is case-sensitive
912         https://bugs.webkit.org/show_bug.cgi?id=116829
913
914         Reviewed by Darin Adler.
915
916         Tests: Added case to fast/css/variables/case-sensitive.html
917
918         * css/CSSParser.cpp:
919         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
920         IsEqualToCSSIdentifier that respects case-sensitivity.
921         (WebCore::CSSParser::realLex): Use the above method for CSS
922         variable declarations.
923
924 2013-05-27  Zalan Bujtas  <zalan@apple.com>
925
926         drop-shadow filter with overflow:hidden child misbehaves.
927         https://bugs.webkit.org/show_bug.cgi?id=109783
928
929         Reviewed by Simon Fraser.
930
931         Applying CSS filters only to the scrollbar rect leaves rendering
932         artefacts. Filters should skip such partial repaints.
933
934         Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
935         initiate partial repaints.
936
937         * rendering/RenderLayer.cpp:
938         (WebCore::RenderLayer::setupFilters):
939         (WebCore::RenderLayer::paintLayerContents):
940         * rendering/RenderLayer.h:
941         (RenderLayer):
942
943 2013-05-27  Xueqing Huang  <huangxueqing@baidu.com>
944
945         Move Windows port off legacy clipboard.
946         https://bugs.webkit.org/show_bug.cgi?id=116258
947
948         Reviewed by Darin Adler.
949
950         Clipboard refactor, no new tests.
951
952         * dom/Clipboard.h:
953         * page/win/EventHandlerWin.cpp:
954         (WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
955         * platform/Pasteboard.h:
956         (WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
957         (WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
958         * platform/win/ClipboardWin.cpp:
959         (WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
960         (WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
961         * platform/win/ClipboardWin.h: Removed.
962         * platform/win/EditorWin.cpp:
963         (WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
964         * platform/win/PasteboardWin.cpp:
965         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
966         (WebCore::Pasteboard::createPrivate): Ditto.
967         (WebCore::Pasteboard::createForDragAndDrop): Ditto.
968         (WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
969         (WebCore::Pasteboard::Pasteboard):
970         (WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
971         (WebCore::Pasteboard::clear): Ditto.
972         (WebCore::Pasteboard::hasData): Ditto.
973         (WebCore::addMimeTypesForFormat): Ditto.
974         (WebCore::Pasteboard::types): Ditto.
975         (WebCore::Pasteboard::readString): Ditto.
976         (WebCore::Pasteboard::readFilenames): Ditto.
977         (WebCore::writeURL): Ditto.
978         (WebCore::Pasteboard::writeString): Ditto.
979         (WebCore::Pasteboard::setDragImage): Ditto.
980         (WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
981         (WebCore::Pasteboard::writeSelection):
982         (WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
983         (WebCore::Pasteboard::writePlainText):
984         (WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
985         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
986         (WebCore::writeFileToDataObject): Ditto.
987         (WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
988         (WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
989         (WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
990         (WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
991         (WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
992         (WebCore::getCachedImage): Copied from ClipboardWin.cpp.
993         (WebCore::createGlobalImageFileDescriptor): Ditto.
994         (WebCore::createGlobalImageFileContent): Ditto.
995         (WebCore::createGlobalHDropContent): Ditto.
996         (WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
997         (WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
998
999 2013-05-27  Tim Horton  <timothy_horton@apple.com>
1000
1001         PDFPlugin: Main-frame PDFPlugin Accessibility
1002         https://bugs.webkit.org/show_bug.cgi?id=116563
1003         <rdar://problem/13458534>
1004
1005         Reviewed by Sam Weinig.
1006
1007         * WebCore.exp.in: Export AffineTransform::mapRect.
1008
1009 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
1010
1011         Checkbox UX update.
1012         https://bugs.webkit.org/show_bug.cgi?id=116838.
1013
1014         Reviewed by Rob Buis.
1015
1016         BlackBerry PR 342302.
1017         Internally Reviewed by Jeff Rogers.
1018         Remove old background and change pressed checkmark image.
1019
1020         * platform/blackberry/RenderThemeBlackBerry.cpp:
1021         (WebCore::RenderThemeBlackBerry::paintCheckbox):
1022
1023 2013-05-27  Sam Weinig  <sam@webkit.org>
1024
1025         When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
1026         https://bugs.webkit.org/show_bug.cgi?id=116836
1027         <rdar://problem/13949905>
1028
1029         Reviewed by Simon Fraser.
1030
1031         * page/FrameView.cpp:
1032         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
1033         Don't use the light style when the background is completely transparent.
1034
1035 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
1036
1037         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
1038         https://bugs.webkit.org/show_bug.cgi?id=116210
1039
1040         Reviewed by Rob Buis.
1041
1042         Set and use the ICU_INCLUDE_DIRS variable to avoid
1043         duplicated adding of the ICU include directory.
1044
1045         * PlatformBlackBerry.cmake:
1046
1047 2013-05-27  Antti Koivisto  <antti@apple.com>
1048
1049         Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
1050         https://bugs.webkit.org/show_bug.cgi?id=116823
1051
1052         Reviewed by Andreas Kling.
1053
1054         FontGlyphs does not need to know about Font anymore.
1055
1056         * platform/graphics/Font.cpp:
1057         (WebCore::Font::Font):
1058         (WebCore::Font::operator=):
1059         * platform/graphics/Font.h:
1060         (WebCore::Font::isPlatformFont):
1061         (WebCore::Font::glyphDataAndPageForCharacter):
1062         (Font):
1063         * platform/graphics/FontCache.h:
1064         * platform/graphics/FontFallbackList.cpp:
1065         (WebCore::FontGlyphs::FontGlyphs):
1066         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1067         * platform/graphics/FontFallbackList.h:
1068         (WebCore):
1069         (WebCore::FontGlyphs::createForPlatformFont):
1070         
1071             Tweaked the name.
1072
1073         (WebCore::FontGlyphs::isForPlatformFont):
1074         
1075             Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
1076
1077         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1078         (WebCore::FontCache::systemFallbackForCharacters):
1079         * platform/graphics/freetype/FontCacheFreeType.cpp:
1080         (WebCore::FontCache::systemFallbackForCharacters):
1081         * platform/graphics/mac/FontCacheMac.mm:
1082         (WebCore::FontCache::systemFallbackForCharacters):
1083         * platform/graphics/qt/FontCacheQt.cpp:
1084         (WebCore::FontCache::systemFallbackForCharacters):
1085         * platform/graphics/win/FontCacheWin.cpp:
1086         (WebCore::FontCache::systemFallbackForCharacters):
1087         * platform/graphics/wince/FontCacheWinCE.cpp:
1088         (WebCore::FontCache::systemFallbackForCharacters):
1089         
1090             More descriptive name and tighter interface.
1091
1092 2013-05-27  Mihnea Ovidenie  <mihnea@adobe.com>
1093
1094         [CSSRegions] Prevent unnecessary copy of LayoutRect objects
1095         https://bugs.webkit.org/show_bug.cgi?id=116828
1096
1097         Reviewed by Andreas Kling.
1098
1099         Use const references for parameter passing.
1100         No functional change, no new tests.
1101
1102         * rendering/RenderFlowThread.cpp:
1103         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
1104         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
1105         * rendering/RenderFlowThread.h:
1106         * rendering/RenderRegion.cpp:
1107         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1108         * rendering/RenderRegion.h:
1109
1110 2013-05-27  Leo Yang  <leoyang@rim.com>
1111
1112         [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
1113         https://bugs.webkit.org/show_bug.cgi?id=116543
1114
1115         Reviewed by Rob Buis.
1116         Reviewed internally by Joe Mason.
1117
1118         It's a regression introduced by r132556.
1119         BlackBerry is doing friendly HTTP error handling: if there is no response body
1120         for an HTTP error it will display an error message made by the port. But for a
1121         XHR request, which usually does not result in displaying error messages to the
1122         end user, HTTP error code should be revealed to let the JavaScript know what
1123         the actual server error code is.
1124
1125         Covered by existing tests:
1126         ManualTests/blackberry/head-xhr-nonexistant-file.html
1127         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
1128         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
1129
1130         * platform/network/blackberry/NetworkJob.cpp:
1131         (WebCore::NetworkJob::shouldNotifyClientFailed):
1132
1133 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
1134
1135         Adjust date input width.
1136         https://bugs.webkit.org/show_bug.cgi?id=100760.
1137
1138         Reviewed by Rob Buis.
1139
1140         BlackBerry PR 343497.
1141         Internally Reviewed by Jeff Rogers.
1142
1143         Set width to auto to fit the string length.
1144
1145         * css/themeBlackBerry.css:
1146         (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
1147
1148 2013-05-27  Andreas Kling  <akling@apple.com>
1149
1150         Document::setHoveredNode() should be setHoveredElement().
1151         <http://webkit.org/b/116819>
1152
1153         Reviewed by Antti Koivisto.
1154
1155         Only Elements can be hovered, teach Document about this.
1156
1157         * dom/Document.h:
1158         * dom/Document.cpp:
1159         (WebCore::Document::dispose):
1160         (WebCore::Document::detach):
1161
1162             m_hoverNode => m_hoveredElement.
1163             Removed hoverNode() and setHoverNode() since those were only used internally.
1164
1165         (WebCore::Document::updateHoverActiveState):
1166
1167             Updated for hovered things always being Elements.
1168
1169         (WebCore::Document::hoveredElementDidDetach):
1170         * dom/Element.cpp:
1171         (WebCore::Element::detach):
1172
1173             Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
1174             following the same pattern as elementInActiveChainDidDetach().
1175
1176 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1177
1178         [Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
1179         https://bugs.webkit.org/show_bug.cgi?id=116822
1180
1181         Reviewed by Andreas Kling.
1182
1183         The input fontDescription may have more than one family defined.
1184
1185         * platform/qt/RenderThemeQStyle.cpp:
1186         (WebCore::RenderThemeQStyle::adjustButtonStyle):
1187
1188 2013-05-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1189
1190         [Qt][Win] Input events aren't mapped properly with windowless plugins.
1191         https://bugs.webkit.org/show_bug.cgi?id=116094
1192
1193         Reviewed by Tor Arne Vestbø.
1194
1195         The events are first sent properly but Flash then immediately repaints
1196         and this causes flickering painting.
1197         The issue is that Flash seems to be doing some input event tracking of
1198         its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
1199
1200         We are currently using two coordinate systems for windowless plugins on Windows with Qt:
1201         - FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
1202         - Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
1203
1204         This patch fixes the bug by mapping input events to the native window returned
1205         as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
1206         the ones used by Flash internally.
1207         With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
1208         on Windows with Qt.
1209
1210         * platform/qt/QWebPageClient.h:
1211         (QWebPageClient):
1212           Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
1213         * plugins/win/PluginViewWin.cpp:
1214         (WebCore::contentsToNativeWindow):
1215         (WebCore::PluginView::paintIntoTransformedContext):
1216         (WebCore::PluginView::handleMouseEvent):
1217
1218 2013-05-27  Antti Koivisto  <antti@apple.com>
1219
1220         Tighten FontGlyphs interfaces to take FontDescription instead of Font
1221         https://bugs.webkit.org/show_bug.cgi?id=116818
1222
1223         Reviewed by Andreas Kling.
1224
1225         This gives better understanding of what the actual inputs are.
1226
1227         * WebCore.exp.in:
1228         * platform/graphics/Font.h:
1229         (WebCore::Font::primaryFont):
1230         (WebCore::Font::fontDataAt):
1231         (WebCore::Font::isFixedPitch):
1232         * platform/graphics/FontCache.cpp:
1233         (WebCore::FontCache::getFontData):
1234         * platform/graphics/FontCache.h:
1235         * platform/graphics/FontFallbackList.cpp:
1236         (WebCore::FontGlyphs::determinePitch):
1237         (WebCore::FontGlyphs::realizeFontDataAt):
1238         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1239         * platform/graphics/FontFallbackList.h:
1240         (WebCore::FontGlyphs::primaryFontData):
1241         (WebCore::FontGlyphs::isFixedPitch):
1242         (WebCore::FontGlyphs::primarySimpleFontData):
1243         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1244         * platform/graphics/freetype/FontCacheFreeType.cpp:
1245         * platform/graphics/mac/FontCacheMac.mm:
1246         (WebCore::FontCache::similarFontPlatformData):
1247         
1248             Drop get* naming and make this Mac only as no other platform has it.
1249
1250         * platform/graphics/qt/FontCacheQt.cpp:
1251         * platform/graphics/win/FontCacheWin.cpp:
1252         * platform/graphics/wince/FontCacheWinCE.cpp:
1253         (WebCore):
1254
1255 2013-05-27  Andreas Kling  <akling@apple.com>
1256
1257         Strengthen typing of detaching an Element from Document's :active chain.
1258         <http://webkit.org/b/116815>
1259
1260         Reviewed by Antti Koivisto.
1261
1262         Tiny cleanup now that the :active chain can only contain elements.
1263         Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
1264
1265         * dom/Element.cpp:
1266         (WebCore::Element::detach):
1267         * dom/Document.h:
1268         * dom/Document.cpp:
1269         (WebCore::Document::elementInActiveChainDidDetach):
1270
1271             Rename, take Element*, remove silly condition that was always true.
1272
1273 2013-05-27  Andrei Bucur  <abucur@adobe.com>
1274
1275         [CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
1276         https://bugs.webkit.org/show_bug.cgi?id=116441
1277
1278         Reviewed by David Hyatt.
1279
1280         The patch changes the following things:
1281         - exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
1282         - offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
1283         currently being laid out;
1284         - removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
1285         that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
1286         function is called instead;
1287         - RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
1288         region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
1289         that can be used for all the ancestor containing blocks of the current box being laid out.
1290
1291         The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
1292         passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
1293         risky. If there is a possibility of having a different box info result for a different offset
1294         then the cache is not working correctly.
1295
1296         Tests: No function change, no tests.
1297
1298         * rendering/RenderBlock.cpp:
1299         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
1300         (WebCore::RenderBlock::logicalLeftOffsetForContent):
1301         (WebCore::RenderBlock::logicalRightOffsetForContent):
1302         (WebCore::RenderBlock::getClearDelta):
1303         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
1304         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
1305         (WebCore::RenderBlock::logicalWidthChangedInRegions):
1306         * rendering/RenderBlock.h:
1307         (WebCore::RenderBlock::availableLogicalWidthForLine):
1308         (WebCore::RenderBlock::logicalRightOffsetForLine):
1309         (WebCore::RenderBlock::logicalLeftOffsetForLine):
1310         (WebCore::RenderBlock::startOffsetForLine):
1311         (WebCore::RenderBlock::endOffsetForLine):
1312         (WebCore::RenderBlock::availableLogicalWidthForContent):
1313         (WebCore::RenderBlock::startOffsetForContent):
1314         (WebCore::RenderBlock::endOffsetForContent):
1315         (WebCore::RenderBlock::logicalLeftOffsetForContent):
1316         (WebCore::RenderBlock::logicalRightOffsetForContent):
1317         * rendering/RenderBox.cpp:
1318         (WebCore::RenderBox::borderBoxRectInRegion):
1319         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
1320         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1321         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
1322         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1323         (WebCore::RenderBox::computeLogicalWidthInRegion):
1324         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1325         (WebCore::RenderBox::renderBoxRegionInfo):
1326         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1327         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
1328         (WebCore::computeInlineStaticDistance):
1329         (WebCore::RenderBox::computePositionedLogicalWidth):
1330         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1331         (WebCore::RenderBox::computePositionedLogicalHeight):
1332         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1333         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1334         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
1335         (WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
1336         * rendering/RenderBox.h:
1337         * rendering/RenderFlexibleBox.cpp:
1338         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1339         * rendering/RenderFlowThread.cpp:
1340         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1341         (WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
1342         (WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
1343         (WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
1344         (WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
1345         (WebCore::RenderFlowThread::currentActiveRenderBox):
1346         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
1347         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
1348         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
1349         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1350         * rendering/RenderFlowThread.h:
1351         * rendering/RenderTable.cpp:
1352         (WebCore::RenderTable::updateLogicalWidth):
1353         * rendering/RenderView.cpp:
1354         (WebCore::RenderView::pushLayoutState):
1355         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1356         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
1357         * rendering/RenderView.h:
1358         (WebCore::RenderView::pushLayoutState):
1359         (WebCore::RenderView::popLayoutState):
1360
1361 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1362
1363         Active DOM objects stopped twice
1364         https://bugs.webkit.org/show_bug.cgi?id=116524
1365
1366         Reviewed by Alexey Proskuryakov.
1367
1368         Only iterate over all active DOM object to stop them once.
1369
1370         To ensure later created active DOM objects are stopped,
1371         suspendActiveDOMObjectIfNeeded now also stops active DOM objects
1372         if needed. This also fixes an existing bug when active DOM
1373         objects were created after stopActiveDOMObjects had been called.
1374
1375         Two existing tests creates new active DOM objects after stopActiveDOMObjects
1376         has been called:
1377             fast/dom/xmlhttprequest-constructor-in-detached-document.html
1378             fast/dom/Window/timer-null-script-execution-context.html
1379
1380         * dom/ScriptExecutionContext.cpp:
1381         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
1382         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
1383
1384 2013-05-27  Charles Wei  <charles.wei@torchmobile.com.cn>
1385
1386         Remove redundant CachedRawResource::loader()
1387         https://bugs.webkit.org/show_bug.cgi?id=116805
1388
1389         Reviewed by Andreas Kling.
1390
1391         Just remove redundant code, no test case needed.
1392
1393         * loader/cache/CachedRawResource.cpp:
1394         * loader/cache/CachedRawResource.h:
1395
1396 2013-05-27  Andreas Kling  <akling@apple.com>
1397
1398         WinCE build TLC: Node::active() moved to Element.
1399
1400         * rendering/RenderThemeWinCE.cpp:
1401         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
1402
1403 2013-05-26  Jaehun Lim  <ljaehun.lim@samsung.com>
1404
1405         CSSParser::parseImageResolution doesn't need a parameter.
1406         https://bugs.webkit.org/show_bug.cgi?id=116755
1407
1408         Reviewed by Darin Adler.
1409
1410         parseImageResolution() can get CSSPraserValueList from m_valueList directly.
1411
1412         No new tests, no behavior change.
1413
1414         * css/CSSParser.cpp:
1415         (WebCore::CSSParser::parseImageResolution):
1416         * css/CSSParser.h:
1417
1418 2013-05-26  Andreas Kling  <akling@apple.com>
1419
1420         Turn TreeScope::focusedNode() into focusedElement().
1421         <http://webkit.org/b/116802>
1422
1423         Reviewed by Darin Adler.
1424
1425         For the hundredth time, only Elements can be focused!
1426
1427         This change mostly reverts r121079 since that made things unnecessarily complicated
1428         just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
1429         Finding a TreeScope's focused element now does a simple walk up the parent chain instead
1430         of running the full Shadow DOM re-targeting algorithm.
1431
1432         (WebCore::TreeScope::focusedElement):
1433
1434             Simplify and return Element* instead of Node*.
1435
1436         * dom/TreeScope.h:
1437         * dom/TreeScope.cpp:
1438         (WebCore::focusedFrameOwnerElement):
1439
1440             Make this return Element* as the name already suggested.
1441
1442         * dom/Document.cpp:
1443         (WebCore::Document::removeFocusedNodeOfSubtree):
1444         * dom/Element.cpp:
1445         (WebCore::Element::blur):
1446         * dom/ShadowRoot.h:
1447         (WebCore::ShadowRoot::activeElement):
1448         * html/HTMLDocument.cpp:
1449         (WebCore::HTMLDocument::activeElement):
1450
1451             Simplified call sites that were paranoid about getting a non-Element focused node.
1452
1453 2013-05-26  Dean Jackson  <dino@apple.com>
1454
1455         Plugins with no src but valid type should not snapshot
1456         https://bugs.webkit.org/show_bug.cgi?id=116799
1457         <rdar://problem/13695911>
1458
1459         Reviewed by Simon Fraser.
1460
1461         There are a few plug-ins around that don't take any source content
1462         via the src attribute, but rather just load the binary based on the
1463         mime-type. In those cases we shouldn't snapshot until we have a
1464         mechanism to do so.
1465
1466         * html/HTMLPlugInImageElement.cpp:
1467         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
1468             Add MIMEType logging, and detect the case of no src but valid type.
1469         * html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
1470             this special case.
1471
1472 2013-05-26  Antti Koivisto  <antti@apple.com>
1473
1474         Encapsulate FontGlyphs
1475         https://bugs.webkit.org/show_bug.cgi?id=116803
1476
1477         Reviewed by Andreas Kling.
1478
1479         FontGlyphs is unfriending Font. Give it a real class interface and some actual code.
1480
1481         * platform/graphics/Font.cpp:
1482         (WebCore::Font::Font):
1483         * platform/graphics/Font.h:
1484         (WebCore::Font::glyphDataForCharacter):
1485         (WebCore::Font::glyphDataAndPageForCharacter):
1486         * platform/graphics/FontFallbackList.cpp:
1487         (WebCore::FontGlyphs::FontGlyphs):
1488         (WebCore::isInRange):
1489         (WebCore::shouldIgnoreRotation):
1490         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
1491         
1492             Helpers from FontFastPath.cpp.
1493
1494         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1495         
1496             This is the primary interface. The code moves here from FontFastPath.cpp.
1497
1498         * platform/graphics/FontFallbackList.h:
1499         (WebCore::FontGlyphs::createForPlatformData):
1500         
1501             Remove setPlatformData in favor of constructor.
1502
1503         (WebCore::FontGlyphs::primarySimpleFontData):
1504         * platform/graphics/FontFastPath.cpp:
1505         * platform/graphics/GraphicsContext.h:
1506
1507             Remove a stray function definition also called setPlatformFont().
1508
1509         * rendering/svg/SVGTextRunRenderingContext.cpp:
1510         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1511
1512 2013-05-26  Seokju Kwon  <seokju.kwon@gmail.com>
1513
1514         Remove a leftover CALENDAR_PICKER from LocaleNone.cpp
1515         https://bugs.webkit.org/show_bug.cgi?id=116800
1516
1517         Reviewed by Kent Tamura.
1518
1519         No new tests, no behavior change.
1520
1521         * platform/text/LocaleNone.cpp:
1522         (LocaleNone):
1523
1524 2013-05-26  Antti Koivisto  <antti@apple.com>
1525
1526         Rename FontFallbackList to FontGlyphs
1527         https://bugs.webkit.org/show_bug.cgi?id=116797
1528
1529         Reviewed by Andreas Kling.
1530
1531         Maybe it was a fallback list once. Nowadays its purpose is to cache realized glyphs and related data.
1532         
1533         File renaming will be done separately.
1534
1535         * WebCore.exp.in:
1536         * platform/graphics/Font.cpp:
1537         (WebCore::Font::Font):
1538         (WebCore::Font::operator=):
1539         (WebCore::Font::operator==):
1540         
1541             Refactored to early return style.
1542
1543         (WebCore::Font::update):
1544         (WebCore::Font::width):
1545         * platform/graphics/Font.h:
1546         (Font):
1547         (WebCore::Font::glyphs):
1548         (WebCore::Font::loadingCustomFonts):
1549         (WebCore::Font::primaryFont):
1550         (WebCore::Font::fontDataAt):
1551         (WebCore::Font::isFixedPitch):
1552         (WebCore::Font::fontSelector):
1553         * platform/graphics/FontCache.h:
1554         (FontCache):
1555         * platform/graphics/FontFallbackList.cpp:
1556         (WebCore::FontGlyphs::FontGlyphs):
1557         (WebCore::FontGlyphs::invalidate):
1558         (WebCore::FontGlyphs::releaseFontData):
1559         (WebCore::FontGlyphs::determinePitch):
1560         (WebCore::FontGlyphs::realizeFontDataAt):
1561         
1562             Renamed for clarity along with m_fontList -> m_realizedFontData.
1563
1564         (WebCore::FontGlyphs::setPlatformFont):
1565         * platform/graphics/FontFallbackList.h:
1566         (FontGlyphs):
1567         (WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver):
1568         (WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver):
1569         (GlyphPagesStateSaver):
1570         (WebCore::FontGlyphs::create):
1571         (WebCore::FontGlyphs::~FontGlyphs):
1572         (WebCore::FontGlyphs::primaryFontData):
1573         * platform/graphics/FontFastPath.cpp:
1574         (WebCore::Font::glyphDataAndPageForCharacter):
1575         * rendering/svg/SVGTextRunRenderingContext.cpp:
1576         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1577
1578 2013-05-26  Kent Tamura  <tkent@chromium.org>
1579
1580         Remove ENABLE_CALENDAR_PICKER
1581         https://bugs.webkit.org/show_bug.cgi?id=116795
1582
1583         Reviewed by Ryosuke Niwa.
1584
1585         This feature was used only by Chromium port.
1586
1587         * Resources/pagepopups/calendarPicker.css: Removed.
1588         * Resources/pagepopups/calendarPicker.js: Removed.
1589         * css/html.css:
1590         * platform/text/LocaleICU.cpp:
1591         (WebCore::LocaleICU::LocaleICU):
1592         (WebCore):
1593         * platform/text/LocaleICU.h:
1594         (LocaleICU):
1595         * platform/text/PlatformLocale.h:
1596         (Locale):
1597         * platform/text/mac/LocaleMac.h:
1598         (LocaleMac):
1599         * platform/text/mac/LocaleMac.mm:
1600         (WebCore::LocaleMac::monthLabels):
1601         * platform/text/win/LocaleWin.cpp:
1602         (WebCore::LocaleWin::LocaleWin):
1603         (WebCore::LocaleWin::monthLabels):
1604         * platform/text/win/LocaleWin.h:
1605         (LocaleWin):
1606
1607 2013-05-26  Andreas Kling  <akling@apple.com>
1608
1609         Move :active chain participation state from Node to Element.
1610         <http://webkit.org/b/116786>
1611
1612         Reviewed by Antti Koivisto.
1613
1614         Only Elements can be in the :active chain so move the logic there from Node.
1615
1616         * dom/Document.cpp:
1617         (WebCore::Document::updateHoverActiveState):
1618
1619             Add isElementNode() type checks when updating the :active chain.
1620
1621         * dom/Node.h:
1622         * dom/Node.cpp:
1623         (WebCore::Node::detach):
1624         * dom/Element.cpp:
1625         (WebCore::Element::detach):
1626
1627             Move the remaining logic for detaching from the UserActionElementSet to Element.
1628
1629         (WebCore::Element::isUserActionElementInActiveChain):
1630         * dom/Element.h:
1631         (WebCore::Element::inActiveChain):
1632
1633             Move all the :active chain stuff from Node to Element.
1634
1635         * dom/UserActionElementSet.cpp:
1636         (WebCore::UserActionElementSet::didDetach):
1637         * dom/UserActionElementSet.h:
1638         (WebCore::UserActionElementSet::isInActiveChain):
1639         (WebCore::UserActionElementSet::setInActiveChain):
1640
1641             UserActionElementSet now only takes Element* in its API.
1642
1643 2013-05-26  Antti Koivisto  <antti@apple.com>
1644
1645         Remove FontFamily.h/.cpp
1646         https://bugs.webkit.org/show_bug.cgi?id=116788
1647
1648         Reviewed by Anders Carlsson.
1649         
1650         Empty files.
1651
1652         * CMakeLists.txt:
1653         * GNUmakefile.list.am:
1654         * Target.pri:
1655         * WebCore.vcproj/WebCore.vcproj:
1656         * WebCore.vcxproj/WebCore.vcxproj:
1657         * WebCore.xcodeproj/project.pbxproj:
1658         * platform/graphics/FontDescription.h:
1659         * platform/graphics/FontFamily.cpp: Removed.
1660         * platform/graphics/FontFamily.h: Removed.
1661
1662 2013-05-26  Antti Koivisto  <antti@apple.com>
1663
1664         Use Vector instead of custom linked list for font families
1665         https://bugs.webkit.org/show_bug.cgi?id=116783
1666
1667         Reviewed by Andreas Kling.
1668
1669         Get rid of FontFamily and SharedFontFamily.
1670
1671         * accessibility/AccessibilityRenderObject.cpp:
1672         (WebCore::AccessibilityRenderObject::hasSameFont):
1673         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1674         (getAttributeSetForAccessibilityObject):
1675         * css/CSSComputedStyleDeclaration.cpp:
1676         (WebCore::fontFamilyFromStyle):
1677         * css/DeprecatedStyleBuilder.cpp:
1678         (WebCore::ApplyPropertyFontFamily::applyInheritValue):
1679         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
1680         (WebCore::ApplyPropertyFontFamily::applyValue):
1681         * css/StyleResolver.cpp:
1682         (WebCore::StyleResolver::styleForDocument):
1683         (WebCore::StyleResolver::initializeFontStyle):
1684         * html/canvas/CanvasRenderingContext2D.cpp:
1685         (WebCore::CanvasRenderingContext2D::font):
1686         (WebCore::CanvasRenderingContext2D::setFont):
1687         * page/PrintContext.cpp:
1688         (WebCore::PrintContext::pageProperty):
1689         * platform/efl/RenderThemeEfl.cpp:
1690         (WebCore::RenderThemeEfl::systemFont):
1691         * platform/graphics/Font.h:
1692         (WebCore::Font::firstFamily):
1693         (WebCore::Font::familyCount):
1694         (WebCore::Font::familyAt):
1695         * platform/graphics/FontCache.cpp:
1696         (WebCore::FontCache::getFontData):
1697         * platform/graphics/FontDescription.cpp:
1698         (SameSizeAsFontDescription):
1699         * platform/graphics/FontDescription.h:
1700         (WebCore::FontDescription::FontDescription):
1701         (WebCore::FontDescription::familyCount):
1702         (WebCore::FontDescription::firstFamily):
1703         (WebCore::FontDescription::familyAt):
1704         (WebCore::FontDescription::families):
1705         (WebCore::FontDescription::useFixedDefaultSize):
1706         (WebCore::FontDescription::setOneFamily):
1707         (WebCore::FontDescription::setFamilies):
1708         (WebCore::FontDescription::adoptFamilies):
1709         (WebCore::FontDescription::operator==):
1710         * platform/graphics/FontFamily.cpp:
1711         * platform/graphics/FontFamily.h:
1712         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1713         (PlatformCALayerWinInternal::displayCallback):
1714         * platform/graphics/mac/FontCacheMac.mm:
1715         (WebCore::FontCache::getSimilarFontPlatformData):
1716         * platform/graphics/qt/FontCacheQt.cpp:
1717         (WebCore::FontCache::getLastResortFallbackFont):
1718         * platform/gtk/RenderThemeGtk.cpp:
1719         (WebCore::RenderThemeGtk::systemFont):
1720         * platform/mac/ThemeMac.mm:
1721         (WebCore::ThemeMac::controlFont):
1722         * platform/qt/RenderThemeQStyle.cpp:
1723         (WebCore::RenderThemeQStyle::adjustButtonStyle):
1724         * platform/text/transcoder/FontTranscoder.cpp:
1725         (WebCore::FontTranscoder::converterType):
1726         * platform/win/DragImageWin.cpp:
1727         (WebCore::dragLabelFont):
1728         * rendering/RenderText.cpp:
1729         (WebCore::RenderText::styleDidChange):
1730         * rendering/RenderTextControl.cpp:
1731         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
1732         * rendering/RenderTextControlSingleLine.cpp:
1733         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
1734         * rendering/RenderThemeMac.mm:
1735         (WebCore::RenderThemeMac::systemFont):
1736         (WebCore::RenderThemeMac::setFontFromControlSize):
1737         * rendering/RenderThemeSafari.cpp:
1738         (WebCore::RenderThemeSafari::systemFont):
1739         (WebCore::RenderThemeSafari::setFontFromControlSize):
1740         * rendering/RenderThemeWin.cpp:
1741         (WebCore::fillFontDescription):
1742
1743 2013-05-26  Andreas Kling  <akling@apple.com>
1744
1745         Move "active" state logic from Node to Element.
1746         <http://webkit.org/b/116785>
1747
1748         Reviewed by Antti Koivisto.
1749
1750         Resolve another 7 year old FIXME by merging the "active" state logic from Node and ContainerNode
1751         and moving it all to Element instead.
1752
1753         * dom/UserActionElementSet.h:
1754         (WebCore::UserActionElementSet::isActive):
1755         (WebCore::UserActionElementSet::setActive):
1756         * dom/ContainerNode.cpp:
1757         * dom/ContainerNode.h:
1758         * dom/Node.cpp:
1759         * dom/Node.h:
1760         * dom/Element.h:
1761         (WebCore::Element::active):
1762         * dom/Element.cpp:
1763         (WebCore::Element::isUserActionElementActive):
1764         (WebCore::Element::setActive):
1765
1766             Moved here from Node/ContainerNode.
1767
1768         * accessibility/AccessibilityNodeObject.cpp:
1769         (WebCore::AccessibilityNodeObject::isPressed):
1770         * dom/Document.cpp:
1771         (WebCore::Document::setFocusedNode):
1772         (WebCore::Document::updateHoverActiveState):
1773         * rendering/RenderTheme.cpp:
1774         (WebCore::RenderTheme::isPressed):
1775         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
1776         * rendering/RenderThemeMac.mm:
1777         (WebCore::getMediaUIPartStateFlags):
1778         (WebCore::RenderThemeMac::updatePressedState):
1779         * platform/qt/RenderThemeQt.cpp:
1780         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
1781
1782             Check that the inspected Node is an Element before asking if it's active.
1783
1784         * html/HTMLAnchorElement.cpp:
1785         (WebCore::HTMLAnchorElement::setActive):
1786
1787             Call the right superclass.
1788
1789         * html/HTMLAnchorElement.h:
1790         * html/HTMLLabelElement.h:
1791         * html/shadow/MediaControlElementTypes.h:
1792
1793             Sprinkle OVERRIDE>
1794
1795 2013-05-26  Andreas Kling  <akling@apple.com>
1796
1797         Move Node::dispatchSimulatedClick() to Element.
1798         <http://webkit.org/b/116784>
1799
1800         Reviewed by Antti Koivisto.
1801
1802         Only Elements use the dispatchSimulatedClick() functionality, so move it there.
1803
1804         * dom/Node.cpp:
1805         * dom/Node.h:
1806         * dom/Element.h:
1807         * dom/Element.cpp:
1808         (WebCore::Element::dispatchSimulatedClick):
1809         * dom/EventDispatcher.h:
1810         * dom/EventDispatcher.cpp:
1811         (WebCore::EventDispatcher::dispatchSimulatedClick):
1812
1813 2013-05-26  Andreas Kling  <akling@apple.com>
1814
1815         TreeScope::rootNode() should return a ContainerNode.
1816         <http://webkit.org/b/116782>
1817
1818         Reviewed by Antti Koivisto.
1819
1820         The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
1821         This lets us take advantage of Antti's optimized traversal functions.
1822
1823         * dom/ContainerNode.h:
1824         (WebCore::Node::isTreeScope):
1825         * dom/Document.cpp:
1826         (WebCore::Document::buildAccessKeyMap):
1827         * dom/Node.cpp:
1828         (WebCore::Node::containingShadowRoot):
1829         * dom/Node.h:
1830         * dom/TreeScope.h:
1831         (WebCore::TreeScope::rootNode):
1832         (TreeScope):
1833         * page/FocusController.cpp:
1834         (WebCore::FocusNavigationScope::rootNode):
1835         (WebCore::FocusNavigationScope::owner):
1836         * page/FocusController.h:
1837         (FocusNavigationScope):
1838
1839 2013-05-26  Andreas Kling  <akling@apple.com>
1840
1841         FocusController::setFocusedNode() should be setFocusedElement().
1842         <http://webkit.org/b/116780>
1843
1844         Reviewed by Antti Koivisto.
1845
1846         Only Elements can have focus, so make the public API of FocusController take Element*.
1847
1848         * WebCore.exp.in:
1849         * page/FocusController.h:
1850         * page/FocusController.cpp:
1851         (WebCore::FocusController::setFocusedElement):
1852
1853             Out with the setFocusedNode(), in with the setFocusedElement().
1854
1855         * dom/Element.cpp:
1856         (WebCore::Element::focus):
1857         (WebCore::Element::blur):
1858         * page/EventHandler.cpp:
1859         (WebCore::EventHandler::dispatchMouseEvent):
1860         * plugins/PluginView.cpp:
1861         (WebCore::PluginView::focusPluginElement):
1862         * editing/FrameSelection.cpp:
1863         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
1864
1865             Tweak for FocusController taking Element* instead of Node*.
1866
1867         (WebCore::FrameSelection::setFocusedElementIfNeeded):
1868
1869             Renamed from setFocusedNodeIfNeeded().
1870
1871         * editing/htmlediting.h:
1872         * editing/htmlediting.cpp:
1873         (WebCore::enclosingAnchorElement):
1874
1875             Cleaned up the loop for readability and made it return an Element.
1876
1877 2013-05-26  Andreas Kling  <akling@apple.com>
1878
1879         Move some form control things from Element to HTMLFormControlElement.
1880         <http://webkit.org/b/116779>
1881
1882         Reviewed by Antti Koivisto.
1883
1884         The following methods sit better on HTMLFormControlElement than on Element:
1885
1886             - formControlType()
1887             - wasChangedSinceLastFormControlChangeEvent()
1888             - setChangedSinceLastFormControlChangeEvent()
1889             - dispatchFormControlChangeEvent()
1890
1891         Moved them, and devirtualized as much as possible.
1892
1893         * dom/Document.cpp:
1894         (WebCore::Document::setFocusedNode):
1895
1896             Check if the old focus target is an Element before (possibly) dispatching a change event.
1897
1898         * dom/Element.cpp:
1899         * dom/Element.h:
1900
1901             Removed some stub methods that were only used by HTMLFormControlElement subclasses.
1902
1903         * html/HTMLFormControlElement.cpp:
1904         * html/HTMLFormControlElement.h:
1905         (WebCore::isHTMLFormControlElement):
1906         (WebCore::toHTMLFormControlElement):
1907
1908             Add toHTMLFormControlElement() helper with ASSERT_WITH_SECURITY_IMPLICATION.
1909
1910         * html/HTMLTextFormControlElement.h:
1911
1912             Sprinkle OVERRIDE.
1913
1914 2013-05-25  Andreas Kling  <akling@apple.com>
1915
1916         Move Node::supportsFocus() to Element.
1917         <http://webkit.org/b/116778>
1918
1919         Reviewed by Antti Koivisto.
1920
1921         Node never supports focus, so move supportsFocus() to Element instead.
1922
1923         * dom/Element.h:
1924         * dom/Node.cpp:
1925         * dom/Node.h:
1926
1927             Removed Node::supportsFocus(), it always returned false anyway.
1928
1929         * accessibility/AccessibilityNodeObject.cpp:
1930         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
1931
1932             Check that the underlying Node is an Element before asking if it supports focus.
1933
1934         * html/HTMLAnchorElement.h:
1935         * html/HTMLAreaElement.h:
1936         * html/HTMLBodyElement.h:
1937         * html/HTMLElement.h:
1938         * html/HTMLFieldSetElement.h:
1939         * html/HTMLFormControlElement.h:
1940         * html/HTMLFrameElementBase.h:
1941         * html/HTMLMediaElement.h:
1942         * html/HTMLOptGroupElement.h:
1943         * html/HTMLOptionElement.h:
1944         * html/HTMLOutputElement.h:
1945         * svg/SVGAElement.h:
1946         * svg/SVGCircleElement.h:
1947         * svg/SVGEllipseElement.h:
1948         * svg/SVGGElement.h:
1949         * svg/SVGImageElement.h:
1950         * svg/SVGLineElement.h:
1951         * svg/SVGPathElement.h:
1952         * svg/SVGPolyElement.h:
1953         * svg/SVGRectElement.h:
1954         * svg/SVGSVGElement.h:
1955         * svg/SVGSwitchElement.h:
1956         * svg/SVGSymbolElement.h:
1957         * svg/SVGTextElement.h:
1958         * svg/SVGUseElement.h:
1959
1960             OVERRIDE ALL THE THINGS!
1961
1962 2013-05-25  Andreas Kling  <akling@apple.com>
1963
1964         Move Node::isFocusable() to Element.
1965         <http://webkit.org/b/116777>
1966
1967         Reviewed by Anders Carlsson.
1968
1969         Nodes cannot be focusable, so move isFocusable() from Node to Element.
1970
1971         * dom/Node.cpp:
1972         * dom/Node.h:
1973         * dom/Element.h:
1974         * dom/Element.cpp:
1975         (WebCore::Element::isFocusable):
1976
1977             Moved here from Node.
1978
1979         * dom/Document.cpp:
1980         (WebCore::Document::setFocusedNode):
1981         * accessibility/AccessibilityNodeObject.cpp:
1982         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1983
1984             Check that the underlying node is an Element before asking if it's focusable.
1985
1986         * page/FrameView.cpp:
1987         (WebCore::FrameView::scrollToAnchor):
1988
1989             Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
1990
1991         * html/HTMLAreaElement.h:
1992         * html/HTMLFormControlElement.h:
1993         * html/HTMLLabelElement.h:
1994         * html/HTMLOptionElement.h:
1995         * svg/SVGAElement.h:
1996
1997             Sprinkle OVERRIDE.
1998
1999         * html/ValidationMessage.cpp:
2000         (WebCore::ValidationMessage::setMessage):
2001
2002             Update a comment to refer to Element::isFocusable() instead of Node.
2003
2004 2013-05-25  Andreas Kling  <akling@apple.com>
2005
2006         Move Node::tabIndex() to Element.
2007         <http://webkit.org/b/116772>
2008
2009         Reviewed by Ryosuke Niwa.
2010
2011         Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
2012
2013         * dom/Element.h:
2014         * dom/Node.cpp:
2015         * dom/Node.h:
2016
2017             A Node can't have a tab index, so move tabIndex() to Element.
2018
2019         * page/FocusController.h:
2020         * page/FocusController.cpp:
2021         (WebCore::adjustedTabIndex):
2022         (WebCore::FocusController::findElementWithExactTabIndex):
2023         (WebCore::nextElementWithGreaterTabIndex):
2024         (WebCore::previousElementWithLowerTabIndex):
2025         (WebCore::FocusController::nextFocusableNode):
2026         (WebCore::FocusController::previousFocusableNode):
2027
2028             Make this code deal in Element* when doing tab index stuff. FocusController needs
2029             more Node->Element cleanup, but let's do that separately.
2030
2031         * html/HTMLAnchorElement.h:
2032         * html/HTMLElement.h:
2033         * html/HTMLFormControlElement.h:
2034
2035             Sprinkle OVERRIDE.
2036
2037 2013-05-25  Andreas Kling  <akling@apple.com>
2038
2039         Don't instantiate ChildNodeLists just to get a child count.
2040         <http://webkit.org/b/116776>
2041
2042         Reviewed by Ryosuke Niwa.
2043
2044         Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
2045
2046         * editing/ApplyStyleCommand.cpp:
2047         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2048
2049 2013-05-25  Andreas Kling  <akling@apple.com>
2050
2051         PluginDocument::pluginNode() should be pluginElement() instead.
2052         <http://webkit.org/b/116774>
2053
2054         Reviewed by Anders Carlsson.
2055
2056         Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
2057
2058         * dom/Document.cpp:
2059         (WebCore::eventTargetNodeForDocument):
2060         * html/PluginDocument.h:
2061         * html/PluginDocument.cpp:
2062         (WebCore::PluginDocumentParser::createDocumentStructure):
2063         (WebCore::PluginDocument::pluginWidget):
2064         (WebCore::PluginDocument::setPluginElement):
2065         (WebCore::PluginDocument::detach):
2066
2067 2013-05-25  Andreas Kling  <akling@apple.com>
2068
2069         Remove Document::getFocusableNodes().
2070         <http://webkit.org/b/116773>
2071
2072         Reviewed by Joseph Pecoraro.
2073
2074         This was added in r42191 and there are no remaining clients of the API.
2075
2076         * dom/Document.cpp:
2077         * dom/Document.h:
2078         * WebCore.exp.in:
2079
2080 2013-05-25  Andreas Kling  <akling@apple.com>
2081
2082         Move Node::focusDelegate() to Element.
2083         <http://webkit.org/b/116768>
2084
2085         Reviewed by Anders Carlsson.
2086
2087         Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
2088         so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
2089
2090         * dom/Node.cpp:
2091         * dom/Node.h:
2092         * dom/Element.h:
2093         * dom/Element.cpp:
2094         * html/shadow/SliderThumbElement.cpp:
2095         (WebCore::SliderThumbElement::focusDelegate):
2096         * html/shadow/SliderThumbElement.h:
2097         * rendering/RenderTheme.cpp:
2098         (WebCore::RenderTheme::isFocused):
2099         * rendering/RenderThemeMac.mm:
2100         (WebCore::RenderThemeMac::paintSliderThumb):
2101
2102 2013-05-25  Alberto Garcia  <agarcia@igalia.com>
2103
2104         Path: clean up addPathForRoundedRect()
2105         https://bugs.webkit.org/show_bug.cgi?id=116765
2106
2107         Reviewed by Andreas Kling.
2108
2109         Reorganize code that is a bit redundant.
2110
2111         No new tests, no behavior change.
2112
2113         * platform/graphics/Path.cpp:
2114         (WebCore::Path::addPathForRoundedRect):
2115
2116 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
2117
2118         Unprefix Page Visibility API
2119         https://bugs.webkit.org/show_bug.cgi?id=102340
2120
2121         Reviewed by Tim Horton.
2122         
2123         Remove prefixes from the document properties, and the visibilitychanged event.
2124         
2125         Rename the "preview" state to "unloaded". The "unloaded" state is never
2126         reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
2127         
2128         Add some comments to places where we should update the visibility state
2129         when going in and out of the page cache, but cannot safely do so yet.
2130
2131         Tested by existing Page Visibility tests.
2132
2133         * dom/Document.cpp:
2134         (WebCore::Document::pageVisibilityState):
2135         (WebCore::Document::visibilityState):
2136         (WebCore::Document::hidden):
2137         (WebCore::Document::dispatchVisibilityStateChangeEvent):
2138         * dom/Document.h:
2139         * dom/Document.idl:
2140         * dom/EventNames.h:
2141         * history/CachedFrame.cpp:
2142         (WebCore::CachedFrameBase::restore):
2143         * loader/FrameLoader.cpp:
2144         (WebCore::FrameLoader::stopLoading):
2145         * page/Page.cpp:
2146         (WebCore::Page::setVisibilityState):
2147         * page/PageVisibilityState.cpp:
2148         (WebCore::pageVisibilityStateString):
2149         * page/PageVisibilityState.h:
2150
2151 2013-05-25  Andreas Kling  <akling@apple.com>
2152
2153         Move Node::isMouseFocusable() to Element.
2154         <http://webkit.org/b/116762>
2155
2156         Reviewed by Anders Carlsson.
2157
2158         Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
2159         since Node::supportsFocus() always returns false. So move it to Element!
2160
2161         * dom/Node.h:
2162         * dom/Node.cpp:
2163         * dom/Element.h:
2164         * dom/Element.cpp:
2165         (WebCore::Element::isMouseFocusable):
2166
2167             Moved here from Node.
2168
2169         * editing/FrameSelection.cpp:
2170         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
2171         * page/EventHandler.cpp:
2172         (WebCore::EventHandler::dispatchMouseEvent):
2173
2174             Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
2175             Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
2176             Elements and thus cannot be mouse-focusable.
2177
2178         * page/TouchAdjustment.cpp:
2179         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2180
2181             Check that the Node is an Element before asking if it's mouse-focusable.
2182
2183         * html/HTMLAnchorElement.h:
2184         * html/HTMLAreaElement.h:
2185         * html/HTMLFormControlElement.h:
2186         * html/HTMLInputElement.h:
2187         * html/HTMLMediaElement.h:
2188         * html/HTMLSelectElement.h:
2189         * html/HTMLTextAreaElement.h:
2190         * html/shadow/ClearButtonElement.h:
2191         * html/shadow/TextControlInnerElements.h:
2192         * svg/SVGAElement.h:
2193         * svg/SVGStyledElement.h:
2194
2195             Sprinkle OVERRIDE.
2196
2197 2013-05-25  Andreas Kling  <akling@apple.com>
2198
2199         Move Node::isKeyboardFocusable() to Element.
2200         <http://webkit.org/b/116761>
2201
2202         Reviewed by Antti Koivisto.
2203
2204         Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
2205         and sprinkle OVERRIDE on subclass overrides.
2206         FocusController gets some temporary type checks that will go away as that code moves to dealing in
2207         Elements instead of Node.
2208
2209         * dom/Node.h:
2210         * dom/Node.cpp:
2211         * dom/Element.h:
2212         * dom/Element.cpp:
2213         (WebCore::Element::isKeyboardFocusable):
2214
2215             Move isKeyboardFocusable() from Node to Element.
2216
2217         * page/FocusController.cpp:
2218         (WebCore::isNonFocusableShadowHost):
2219         (WebCore::isFocusableShadowHost):
2220         (WebCore::shouldVisit):
2221         (WebCore::FocusController::advanceFocusInDocumentOrder):
2222
2223             Check that the inspected Node is an Element before querying isKeyboardFocusable().
2224
2225         * html/HTMLAnchorElement.h:
2226         * html/HTMLAreaElement.h:
2227         * html/HTMLFormControlElement.h:
2228         * html/HTMLFrameOwnerElement.h:
2229         * html/HTMLInputElement.h:
2230         * html/HTMLPlugInElement.h:
2231         * html/HTMLSelectElement.h:
2232         * html/HTMLTextAreaElement.h:
2233         * svg/SVGAElement.h:
2234         * svg/SVGStyledElement.h:
2235
2236             Sprinkle OVERRIDE.
2237
2238 2013-05-25  Andreas Kling  <akling@apple.com>
2239
2240         Begin moving "focus" state logic from Node to Element.
2241         <http://webkit.org/b/116760>
2242
2243         Reviewed by Antti Koivisto.
2244
2245         Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
2246         and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
2247         with setFocus(bool) and focused().
2248
2249         * dom/Node.h:
2250         * dom/ContainerNode.cpp:
2251         * dom/ContainerNode.h:
2252         * dom/Element.cpp:
2253         (WebCore::Element::isUserActionElementFocused):
2254         (WebCore::Element::setFocus):
2255         * dom/Element.h:
2256         (WebCore::Element::focused):
2257         * dom/Node.cpp:
2258
2259             Move focused() and setFocus(bool) from Node/ContainerNode to Element.
2260
2261         * dom/Document.cpp:
2262         (WebCore::Document::setFocusedNode):
2263         * page/EventHandler.cpp:
2264         (WebCore::EventHandler::dispatchMouseEvent):
2265
2266             Check if the inspected Node is an Element before asking if it's focused.
2267
2268 2013-05-25  Noam Rosenthal  <noam.rosenthal@nokia.com>
2269
2270         Direct pattern compositing breaks when no-repeat is set on a large layer
2271         https://bugs.webkit.org/show_bug.cgi?id=116140
2272
2273         Reviewed by Antti Koivisto.
2274
2275         In some cases the directly composited background color logic overrides the layer's
2276         contentsRect, which results in wrong rendering of tiled images.
2277         This patch makes sure that the background image is applied after the solid color,
2278         which ensures the correct contentsRect.
2279
2280         Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
2281
2282         * rendering/RenderLayerBacking.cpp:
2283         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
2284
2285 2013-05-24  Andreas Kling  <akling@apple.com>
2286
2287         Move "hover" state logic from Node to Element.
2288         <http://webkit.org/b/116757>
2289
2290         Reviewed by Antti Koivisto.
2291
2292         Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
2293         and moving it all to Element instead.
2294
2295         * dom/Node.cpp:
2296         (WebCore::Node::detach):
2297         * dom/Element.cpp:
2298         (WebCore::Element::detach):
2299
2300             Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
2301
2302         (WebCore::Element::isUserActionElementHovered):
2303         (WebCore::Element::setHovered):
2304         * dom/Element.h:
2305         (WebCore::Element::hovered):
2306
2307             Moved here from Node/ContainerNode.
2308
2309         * dom/UserActionElementSet.h:
2310         (WebCore::UserActionElementSet::setHovered):
2311         (WebCore::UserActionElementSet::setFlags):
2312
2313             Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
2314             of these methods eventually, so added a setFlags() helper with the tighter type.
2315
2316         * html/HTMLLabelElement.h:
2317         * html/shadow/SpinButtonElement.h:
2318
2319             Sprinkle OVERRIDE on setHovered() overrides.
2320
2321         * dom/Document.cpp:
2322         (WebCore::Document::updateHoverActiveState):
2323         * accessibility/AccessibilityNodeObject.cpp:
2324         (WebCore::AccessibilityNodeObject::isHovered):
2325         * rendering/RenderTheme.cpp:
2326         (WebCore::RenderTheme::isHovered):
2327
2328             Check if the inspected Node is an element before asking if it's hovered.
2329
2330 2013-05-25  Andreas Kling  <akling@apple.com>
2331
2332         Document::formController() should return a reference.
2333         <http://webkit.org/b/116758>
2334
2335         Reviewed by Antti Koivisto.
2336
2337         The formController() is created on demand, so return a reference instead.
2338
2339         * dom/Document.h:
2340         * dom/Document.cpp:
2341         (WebCore::Document::formController):
2342         (WebCore::Document::setStateForNewFormElements):
2343         * html/HTMLFormControlElementWithState.cpp:
2344         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
2345         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
2346         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
2347         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2348         * html/HTMLFormElement.cpp:
2349         (WebCore::HTMLFormElement::~HTMLFormElement):
2350         (WebCore::HTMLFormElement::finishParsingChildren):
2351         * html/HTMLInputElement.cpp:
2352         (WebCore::HTMLInputElement::~HTMLInputElement):
2353         (WebCore::HTMLInputElement::didMoveToNewDocument):
2354         (WebCore::HTMLInputElement::checkedRadioButtons):
2355
2356 2013-05-25  Sergio Villar Senin  <svillar@igalia.com>
2357
2358         Reducing CSS code duplication in declaration list error recovery
2359         https://bugs.webkit.org/show_bug.cgi?id=115157
2360
2361         Reviewed by Andreas Kling.
2362
2363         From Blink r148974 by <serya@chromium.org>
2364
2365         Refactor "invalid_block_list error | /* empty */" in a new
2366         decl_list_recovery rule that allows to remove 4 redundant rules.
2367
2368         No new test required as we're just refactoring code, no new behaviour.
2369
2370         * css/CSSGrammar.y.in:
2371
2372 2013-05-24  Ryosuke Niwa  <rniwa@webkit.org>
2373
2374         Build fix after r150664.
2375
2376         * bindings/scripts/test/JS/JSTestObj.cpp:
2377         (WebCore):
2378
2379 2013-05-24  Sergio Villar Senin  <svillar@igalia.com>
2380
2381         Fixing invalid block recovery in some declaration list.
2382         https://bugs.webkit.org/show_bug.cgi?id=115159
2383
2384         Reviewed by Darin Adler.
2385
2386         From Blink r148889 by <serya@chromium.org>
2387
2388         Improves the detection of some invalid block declarations inside a
2389         declaration list. This allows the parser not to completely discard
2390         a whole declaration list that contains an invalid block. In
2391         particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
2392         new test added by this change.
2393
2394         Test: fast/css/parsing-invalid-block-recovery.html
2395
2396         * css/CSSGrammar.y.in:
2397
2398
2399 2013-05-24  Beth Dakin  <bdakin@apple.com>
2400
2401         DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
2402         https://bugs.webkit.org/show_bug.cgi?id=116749
2403         -and corresponding-
2404         <rdar://problem/13886753>
2405
2406         Reviewed by Simon Fraser.
2407
2408         Only start m_paintRelatedMilestonesTimer if we have actually painted.
2409         * rendering/RenderLayerCompositor.cpp:
2410         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2411
2412 2013-05-24  Anders Carlsson  <andersca@apple.com>
2413
2414         Fix Windows build.
2415
2416         * WebCore.vcproj/WebCore.vcproj:
2417         * WebCore.vcxproj/WebCore.vcxproj:
2418         * WebCore.vcxproj/WebCore.vcxproj.filters:
2419
2420 2013-05-24  Tim Horton  <timothy_horton@apple.com>
2421
2422         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
2423         https://bugs.webkit.org/show_bug.cgi?id=116744
2424         <rdar://problem/13973514>
2425
2426         Reviewed by Simon Fraser.
2427
2428         * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
2429         * page/FrameView.cpp:
2430         (WebCore::FrameView::setIsInWindow):
2431         (WebCore::FrameView::resumeAnimatingImages):
2432         Factor the code to restart animated images out of frameView::setIsInWindow.
2433
2434         * page/FrameView.h:
2435         (FrameView):
2436
2437 2013-05-24  Anders Carlsson  <andersca@apple.com>
2438
2439         Move history property list writer to WebKit
2440         https://bugs.webkit.org/show_bug.cgi?id=116746
2441
2442         Reviewed by Tim Horton.
2443
2444         Remove files from the Xcode project and remove symbols that now live in WebKit.
2445
2446         * WebCore.exp.in:
2447         * WebCore.xcodeproj/project.pbxproj:
2448
2449 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2450
2451         Global constructors exposed in worker environment have wrong attributes
2452         https://bugs.webkit.org/show_bug.cgi?id=116708
2453
2454         Reviewed by Geoffrey Garen.
2455
2456         Fix JSC bindings generator so that Global constructors exposed in worker environment
2457         have the following attributes:
2458         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
2459
2460         This is now consistent with global constructors on DOMWindow and with the Web IDL
2461         specification:
2462         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
2463
2464         Test: fast/js/global-constructors-attributes-worker.html
2465
2466         * bindings/scripts/CodeGeneratorJS.pm:
2467         (GenerateAttributesHashTable):
2468
2469 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2470
2471         Remove custom code for webkitAudioContext global constructor getter
2472         https://bugs.webkit.org/show_bug.cgi?id=116530
2473
2474         Reviewed by Geoffrey Garen.
2475
2476         Get rid of custom code for webkitAudioContext global constructor getter. The
2477         global DOMWindow attribute is now automatically generated by leveraging support
2478         for [EnabledAtRuntime] extended attribute and the existing methods in
2479         RuntimeEnabledFeatures class.
2480
2481         No new tests, no behavior change.
2482
2483         * GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
2484         * Modules/webaudio/AudioContext.idl:
2485         Remove [NoInterfaceObject] extended attribute so that the global constructor is
2486         automatically generated instead of automatically added. Add [EnabledAtRuntime]
2487         extended attribute since this global constructor can be disabled at runtime and
2488         so that we can getter rid of the [CustomGetter] for the corresponding global
2489         constructor. Use [InterfaceName] extended attribute so that the interface name
2490         matches the global constructor on DOMWindow (webkitAudioContext).
2491
2492         * Target.pri: Remove JSDOMWindowWebAudioCustom.*.
2493         * UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
2494         * WebCore.exp.in: Export additional symbol.
2495         * WebCore.order: Export additional symbol.
2496         * WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
2497         * WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
2498         * WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
2499         * WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
2500         * bindings/generic/RuntimeEnabledFeatures.h:
2501         (WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
2502         * bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
2503         * bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
2504         the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
2505         bindings generator now.
2506         * page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
2507         generated.
2508         * page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
2509         in RuntimeEnabledFeatures now.
2510
2511 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
2512
2513         [AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
2514         https://bugs.webkit.org/show_bug.cgi?id=116712
2515
2516         Reviewed by Andreas Kling.
2517
2518         renderView is used when ACCELERATED_COMPOSITING is enabled.
2519         So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
2520
2521         No new tests, no behavior change.
2522
2523         * page/FrameView.cpp:
2524         (WebCore::FrameView::setFrameRect):
2525
2526 2013-05-24  Thomas Deniau  <deniau@apple.com>
2527
2528         Add more lines to the context during Dictionary lookups
2529         https://bugs.webkit.org/show_bug.cgi?id=115256
2530
2531         Reviewed by Ryosuke Niwa.
2532
2533         No new tests - no new functionality.
2534
2535         * WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
2536         to call previousLinePosition(), nextLinePosition(), startOfLine() and
2537         endOfLine() in WebPageMac.mm when determining the context while looking
2538         up a dictionary definition. These symbols used to be exported for iOS
2539         only, export them on the desktop too.
2540
2541 2013-05-24  Anders Carlsson  <andersca@apple.com>
2542
2543         Remove PagePopup code
2544         https://bugs.webkit.org/show_bug.cgi?id=116732
2545
2546         Reviewed by Andreas Kling.
2547
2548         Remove all page popup code.
2549
2550         * GNUmakefile.list.am:
2551         * WebCore.xcodeproj/project.pbxproj:
2552         * dom/ContextFeatures.cpp:
2553         * dom/ContextFeatures.h:
2554         * loader/EmptyClients.h:
2555         * page/ChromeClient.h:
2556         * page/DOMWindowPagePopup.cpp: Removed.
2557         * page/DOMWindowPagePopup.h: Removed.
2558         * page/DOMWindowPagePopup.idl: Removed.
2559         * page/PagePopup.h: Removed.
2560         * page/PagePopupClient.cpp: Removed.
2561         * page/PagePopupClient.h: Removed.
2562         * page/PagePopupController.cpp: Removed.
2563         * page/PagePopupController.h: Removed.
2564         * page/PagePopupController.idl: Removed.
2565         * page/PagePopupDriver.h: Removed.
2566         * testing/Internals.cpp:
2567         (WebCore::Internals::resetToConsistentState):
2568         (WebCore):
2569         * testing/Internals.h:
2570         (WebCore):
2571         (Internals):
2572         * testing/Internals.idl:
2573         * testing/MockPagePopupDriver.cpp: Removed.
2574         * testing/MockPagePopupDriver.h: Removed.
2575
2576 2013-05-24  Jer Noble  <jer.noble@apple.com>
2577
2578         Mac: Set the default audio buffer size to a large value for <video> elements.
2579         https://bugs.webkit.org/show_bug.cgi?id=116342
2580
2581         Reviewed by Eric Carlson.
2582         Roll-in rubber stamped by Eric Carlson.
2583
2584         To enable power savings by waking up the audio hardware less often, set the
2585         requested buffer frame size to a large value, such as 4096. Since this results
2586         in approximately 100ms worth of buffer, set the buffer size to a much lower
2587         value when playing WebAudio, which is much more sensitive to latency than video
2588         or audio elements.
2589
2590         Introduce a new class, AudioSessionManager, as well as a helper class,
2591         AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
2592         nodes will create and retain a token, and release the token in their destructor.
2593         This allows the AudioSessionManager to track how many of what type of audio-
2594         generating objects are in existence.
2595
2596         This requires implementing AudioSession for Mac platforms. Move the implementation
2597         for retrieving the hardware sample rate and setting the buffer duration into
2598         AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
2599
2600         Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
2601         as the callers really want to specify a buffer size, not a buffer duration. On iOS,
2602         where the available API requires a duration, perform the conversion from duration to
2603         size on behalf of the caller.
2604
2605         However, since the original version of this patch caused media test
2606         failures on the Mac ML and Lion bots, only enable the buffer size
2607         change for OS X > ML.
2608
2609         * html/HTMLMediaElement.h:  Add a AudioSessionManagerToken member.
2610         * html/HTMLMediaElement.cpp:
2611         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
2612         * platform/audio/AudioSession.cpp:
2613         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
2614         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
2615         * platform/audio/AudioSession.h:
2616         * platform/audio/AudioSessionManager.cpp:
2617         (AudioSessionManagerToken::create): Simple factory method.
2618         (AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
2619         (AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
2620         (AudioSessionManager::sharedManager): Simple singleton method.
2621         (AudioSessionManager::AudioSessionManager): Simple constructor.
2622         (AudioSessionManager::has): Return whether the type is present.
2623         (AudioSessionManager::incrementCount): Increment, then call updateSessionState()
2624         (AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
2625         (AudioSessionManager::updateSessionState): Stub, does nothing.
2626         * platform/audio/AudioSessionManager.h:
2627         * platform/audio/ios/AudioDestinationIOS.cpp:
2628         (WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
2629         * platform/audio/ios/AudioSessionIOS.mm:
2630         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
2631         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
2632         * platform/audio/mac/AudioDestinationMac.cpp:
2633         (WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
2634         (WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
2635         (WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
2636         * platform/audio/mac/AudioDestinationMac.h:
2637         * platform/audio/mac/AudioSessionMac.cpp: Added.
2638         (WebCore::defaultDevice): Added, returns the default audio device.
2639         (WebCore::AudioSession::AudioSession): Simple constructor.
2640         (WebCore::AudioSession::~AudioSession): Simple destructor.
2641         (WebCore::AudioSession::category): Stub, unimplemented.
2642         (WebCore::AudioSession::setCategory): Ditto.
2643         (WebCore::AudioSession::categoryOverride): Ditto.
2644         (WebCore::AudioSession::setCategoryOverride): Ditto.
2645         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
2646         (WebCore::AudioSession::setActive): Ditto.
2647         (WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
2648         (WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
2649         (WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
2650         * platform/audio/mac/AudioSessionManagerMac.cpp:
2651         (AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
2652         * WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
2653
2654 2013-05-24  Alberto Garcia  <agarcia@igalia.com>
2655
2656         Path: upstream the missing bits from the BlackBerry port
2657         https://bugs.webkit.org/show_bug.cgi?id=116658
2658
2659         Reviewed by Xan Lopez.
2660
2661         PathBlackBerry was upstreamed a while ago (r144612) but a few bits
2662         were missing from the cross-platform code.
2663
2664         * platform/graphics/Path.cpp:
2665         (WebCore::Path::addPathForRoundedRect):
2666         * platform/graphics/Path.h:
2667         (Graphics):
2668         (Path):
2669
2670 2013-05-24  Noam Rosenthal  <noam@webkit.org>
2671
2672         WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
2673         https://bugs.webkit.org/show_bug.cgi?id=115135
2674
2675         Reviewed by Antti Koivisto.
2676
2677         Issue is invoked when there is a visibility:hidden layer with a non-compositable
2678         background image (e.g. a radial gradient).
2679         The layer is treated as a no-contents layer because of its visibility, however
2680         updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
2681         with direct background-image compositing.
2682
2683         Fixed by returning early from updating directly composited contents for layers
2684         with hidden contents.
2685
2686         Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
2687
2688         * rendering/RenderLayerBacking.cpp:
2689         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
2690         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2691         (WebCore::RenderLayerBacking::paintsChildren):
2692         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2693
2694 2013-05-24  Robert Hogan  <robert@webkit.org>
2695
2696         Refactor shouldAddBorderPaddingMargin()
2697         https://bugs.webkit.org/show_bug.cgi?id=98803
2698
2699         Reviewed by Ryosuke Niwa.
2700
2701         Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
2702         for the sake of concision.
2703
2704         No new tests, refactoring.
2705
2706         * rendering/RenderBlockLineLayout.cpp:
2707         (WebCore::shouldAddBorderPaddingMargin):
2708         (WebCore::inlineLogicalWidth):
2709
2710 2013-05-24  Xiaobo Wang  <xiaobwang@blackberry.com>
2711
2712         [BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
2713         https://bugs.webkit.org/show_bug.cgi?id=116654
2714
2715         Reviewed by Carlos Garcia Campos.
2716
2717         PR 331552.
2718         Internally reviewed and amended by Arvid Nilsson.
2719
2720         No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
2721         The instance of GraphicsContext3D has already been destroyed but
2722         WebGLLayerWebKitThread is not aware of that. This is because compositor
2723         layer of the WebGL graphics context was referenced outside the context.
2724         So when destructing GraphicsContext3D the compositing layer was not
2725         destructed.
2726         Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
2727         after releasing the compositor layer, so that it won't be de-referenced
2728         again later.
2729
2730         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2731         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2732         * platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
2733         (WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
2734         (WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
2735         (WebCore):
2736         * platform/graphics/blackberry/WebGLLayerWebKitThread.h:
2737         (WebGLLayerWebKitThread):
2738
2739 2013-05-24  Andreas Kling  <akling@apple.com>
2740
2741         Typing in Safari's unified field causes unnecessary web content repaints.
2742         <http://webkit.org/b/116703>
2743
2744         Reviewed by Andy Estes.
2745
2746         Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
2747         a string occurs in the page, but doesn't try to mark the occurrences.
2748         This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
2749         location bar without causing tile repaints.
2750
2751         * WebCore.exp.in:
2752         * page/Page.h:
2753         * page/Page.cpp:
2754         (WebCore::Page::findMatchesForText):
2755         (WebCore::Page::markAllMatchesForText):
2756         (WebCore::Page::countFindMatches):
2757
2758             Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
2759             matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
2760
2761 2013-05-23  Beth Dakin  <bdakin@apple.com>
2762
2763         https://bugs.webkit.org/show_bug.cgi?id=116702
2764         REGRESSION (r150399): Scrollbar missing for all overflow scroll
2765         -and corresponding-
2766         <rdar://problem/13963712>
2767
2768         Reviewed by Simon Fraser.
2769
2770         This was a silly copy-paste error.
2771         * rendering/RenderLayer.cpp:
2772         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
2773
2774 2013-05-23  peavo@outlook.com  <peavo@outlook.com>
2775
2776         [WinCairo] Build fails to link.
2777         https://bugs.webkit.org/show_bug.cgi?id=116671
2778
2779         Reviewed by Brent Fulgham.
2780
2781         * page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
2782
2783 2013-05-23  Roger Fong  <roger_fong@apple.com>
2784
2785         Unreviewed. Modify WebCore for AppleWin 2010 production build.
2786
2787         * WebCore.vcxproj/WebCoreGenerated.make:
2788         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2789         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2790
2791 2013-05-23  Yongjun Zhang  <yongjun_zhang@apple.com>
2792
2793         We need to clear main resource when detaching DocumentLoader from the frame.
2794         https://bugs.webkit.org/show_bug.cgi?id=116680
2795
2796         Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
2797         in stopLoading().  There is possibility that main resource not being cleared, and this could cause crash later
2798         since docLoader could still receive resource callbacks.  To avoid that, we can remove docLoader from main resource's
2799         client set in detachFromFrame.
2800
2801         Reviewed by Brady Eidson.
2802
2803         No new tests, this doesn't happen on OS X.
2804
2805         * loader/DocumentLoader.cpp:
2806         (WebCore::DocumentLoader::detachFromFrame):
2807         (WebCore::DocumentLoader::clearMainResource):
2808         * loader/cache/CachedResource.h: make hasClient accessible publicly.
2809         (WebCore::CachedResource::hasClient):
2810         (CachedResource):
2811
2812 2013-05-23  Mihai Maerean  <mmaerean@adobe.com>
2813
2814         assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
2815         https://bugs.webkit.org/show_bug.cgi?id=116614
2816
2817         Reviewed by David Hyatt.
2818
2819         Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
2820         the only child has column-span:all.
2821
2822         Test: fast/multicol/newmulticol/direct-child-column-span-all.html
2823
2824         * rendering/RenderBlock.cpp:
2825         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2826
2827 2013-05-23  Anders Carlsson  <andersca@apple.com>
2828
2829         Crash in convertMainResourceLoadToDownload when downloading file by option-return
2830         https://bugs.webkit.org/show_bug.cgi?id=116451
2831
2832         Reviewed by Andreas Kling.
2833
2834         Handle MainResourceLoader being null here which will happen when loading a cached main resource.
2835
2836         * loader/DocumentLoader.cpp:
2837         (WebCore::DocumentLoader::continueAfterContentPolicy):
2838
2839 2013-05-23  Benjamin Poulain  <bpoulain@apple.com>
2840
2841         KURL::createCFURL() should return a RetainPtr<CFURLRef>
2842         https://bugs.webkit.org/show_bug.cgi?id=116644
2843
2844         Reviewed by Andreas Kling.
2845
2846         For consistency with the other createCFType() APIs in WebKit, KURL should
2847         return a RetainPtr<> instead of raw +1 CFURLRef.
2848
2849         No leak were discovered while making this change.
2850
2851         * platform/KURL.h:
2852         * platform/cf/KURLCFNet.cpp:
2853         (WebCore):
2854         (WebCore::createCFURLFromBuffer):
2855         (WebCore::KURL::createCFURL):
2856         (WebCore::KURL::fileSystemPath):
2857         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2858         (WebCore::AVFWrapper::createAssetForURL):
2859         * platform/graphics/cg/GraphicsContextCG.cpp:
2860         (WebCore::GraphicsContext::setURLForRect):
2861         * platform/mac/KURLMac.mm:
2862         (WebCore):
2863         (WebCore::KURL::operator NSURL *):
2864         (WebCore::KURL::createCFURL):
2865         * platform/network/cf/CookieJarCFNet.cpp:
2866         (WebCore::setCookiesFromDOM):
2867         (WebCore::cookiesForDOM):
2868         (WebCore::cookieRequestHeaderFieldValue):
2869         (WebCore::getRawCookies):
2870         (WebCore::deleteCookie):
2871         * platform/network/cf/DNSCFNet.cpp:
2872         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
2873         * platform/network/cf/ProxyServerCFNet.cpp:
2874         (WebCore::addProxyServersForURL):
2875         * platform/network/cf/ResourceRequestCFNet.cpp:
2876         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2877         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2878         * platform/network/cf/ResourceResponseCFNet.cpp:
2879         (WebCore::ResourceResponse::cfURLResponse):
2880         * platform/network/cf/SocketStreamHandleCFNet.cpp:
2881         (WebCore::SocketStreamHandle::SocketStreamHandle):
2882
2883 2013-05-18  Robert Hogan  <robert@webkit.org>
2884
2885         The ellipsis in a text overflow should not avoid floats
2886         https://bugs.webkit.org/show_bug.cgi?id=115746
2887
2888         Reviewed by David Hyatt.
2889
2890         When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
2891         That is to say, if there is a float in the box we overflow we should let our no-wrap text,
2892         including the ellipsis, render inside the float just as we would if overflow was hidden but
2893         a text-overflow rendering had not been specified.
2894
2895         Test: fast/css/text-overflow-ellipsis-behind-floats.html
2896
2897         * rendering/RenderBlockLineLayout.cpp:
2898         (WebCore::RenderBlock::checkLinesForTextOverflow):
2899
2900 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2901
2902         Unreviewed, rolling out r150586.
2903         http://trac.webkit.org/changeset/150586
2904         https://bugs.webkit.org/show_bug.cgi?id=116660
2905
2906         Those constructors should be exposed on the WorkerContext, not
2907         the DOMWindow
2908
2909         * fileapi/FileReaderSync.idl:
2910         * workers/WorkerLocation.idl:
2911
2912 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2913
2914         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
2915         https://bugs.webkit.org/show_bug.cgi?id=116660
2916
2917         Reviewed by Kentaro Hara.
2918
2919         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
2920         respective specifications:
2921         - http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
2922         - http://dev.w3.org/html5/workers/#workerlocation
2923
2924         No new tests, covered by existing tests.
2925
2926         * fileapi/FileReaderSync.idl:
2927         * workers/WorkerLocation.idl:
2928
2929 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2930
2931         Remove special case for MessagePortArray from bindings generator
2932         https://bugs.webkit.org/show_bug.cgi?id=116653
2933
2934         Reviewed by Kentaro Hara.
2935
2936         Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
2937         is not defined on IDL side. This allows us to remove the special case for
2938         MessagePortArray from the bindings generator.
2939
2940         No new tests, no behavior change.
2941
2942         * bindings/js/JSMessageEventCustom.cpp:
2943         (WebCore::JSMessageEvent::data):
2944         * bindings/scripts/CodeGeneratorJS.pm:
2945         (NativeToJSValue): Remove special case for MessagePortArray.
2946         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
2947         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
2948         (WebDOMTestSerializedScriptValueInterface):
2949         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
2950         (webkit_dom_test_serialized_script_value_interface_get_property):
2951         (webkit_dom_test_serialized_script_value_interface_class_init):
2952         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2953         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2954         (WebCore::jsTestSerializedScriptValueInterfacePorts):
2955         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2956         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
2957         * bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
2958         by MessagePort[].
2959         * dom/MessageEvent.h:
2960         (WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
2961         as the array on JavaScript side is not nullable.
2962         * dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
2963
2964 2013-05-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2965
2966         [EFL] Back, Forward and Stop should be hidden in context menu
2967         https://bugs.webkit.org/show_bug.cgi?id=116615
2968
2969         Reviewed by Christophe Dumez.
2970
2971         Context menu items: Back, Forward, Stop, Reload, should be shown only when
2972         they are able to perform action.
2973
2974         No new tests - no new functionality.
2975
2976         * page/ContextMenuController.cpp:
2977         (WebCore::ContextMenuController::populate):
2978
2979 2013-05-22  Dean Jackson  <dino@apple.com>
2980
2981         Rolling out r150555. It borked about 30 media tests.
2982
2983         * WebCore.xcodeproj/project.pbxproj:
2984         * html/HTMLMediaElement.cpp:
2985         (WebCore::HTMLMediaElement::HTMLMediaElement):
2986         * html/HTMLMediaElement.h:
2987         * platform/audio/AudioSession.cpp:
2988         (WebCore):
2989         (WebCore::AudioSession::AudioSession):
2990         (WebCore::AudioSession::preferredBufferDuration):
2991         (WebCore::AudioSession::setPreferredBufferDuration):
2992         * platform/audio/AudioSession.h:
2993         * platform/audio/AudioSessionListener.h:
2994         (AudioSessionListener):
2995         * platform/audio/AudioSessionManager.cpp: Removed.
2996         * platform/audio/AudioSessionManager.h: Removed.
2997         * platform/audio/ios/AudioDestinationIOS.cpp:
2998         (WebCore::AudioDestinationIOS::configure):
2999         * platform/audio/ios/AudioSessionIOS.mm:
3000         (WebCore::AudioSession::preferredBufferDuration):
3001         (WebCore::AudioSession::setPreferredBufferDuration):
3002         * platform/audio/mac/AudioDestinationMac.cpp:
3003         (WebCore::AudioDestination::hardwareSampleRate):
3004         (WebCore::AudioDestinationMac::AudioDestinationMac):
3005         (WebCore::AudioDestinationMac::configure):
3006         * platform/audio/mac/AudioDestinationMac.h:
3007         (AudioDestinationMac):
3008         * platform/audio/mac/AudioSessionMac.cpp: Removed.
3009         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
3010
3011 2013-05-20  Jeffrey Pfau  <jpfau@apple.com>
3012
3013         Active DOM object resumption should match reason for suspending
3014         https://bugs.webkit.org/show_bug.cgi?id=116476
3015
3016         Add a reason to the arguments for resuming active DOM object and
3017         scheduled tasks and ensure that it matches the suspend reason before
3018         actually resuming the objects.
3019
3020         Reviewed by Joseph Pecoraro.
3021
3022         No new tests, no change in functionality.
3023
3024         * bindings/js/PageScriptDebugServer.cpp:
3025         (WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
3026         * dom/Document.cpp:
3027         (WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
3028         (WebCore::Document::resumeScheduledTasks): Check for matching resume reason
3029         * dom/Document.h:
3030         (Document):
3031         * dom/ScriptExecutionContext.cpp:
3032         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
3033         * dom/ScriptExecutionContext.h:
3034         (ScriptExecutionContext):
3035         (WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
3036         * history/CachedFrame.cpp:
3037         (WebCore::CachedFrameBase::restore): Add matching resume reason
3038         * page/Frame.cpp:
3039         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
3040         * page/PageGroupLoadDeferrer.cpp:
3041         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
3042
3043 2013-05-22  Dean Jackson  <dino@apple.com>
3044
3045         Don't snapshot plugins that can't be snapshotted
3046         https://bugs.webkit.org/show_bug.cgi?id=116490
3047
3048         Reviewed by Tim Horton.
3049
3050         Some plugins, such as QuickTime, don't support snapshotting. We're
3051         planning on another way to capture snapshots, but in the meantime make
3052         sure that they don't fail to initialise because they were told to
3053         not use accelerated rendering.
3054
3055         * WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
3056         * html/HTMLPlugInImageElement.cpp:
3057         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
3058         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
3059         * html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
3060         * rendering/RenderSnapshottedPlugIn.cpp:
3061         (WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
3062
3063 2013-05-22  Max Vujovic  <mvujovic@adobe.com>
3064
3065         [CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
3066         https://bugs.webkit.org/show_bug.cgi?id=116464
3067
3068         Reviewed by Alexandru Chiculita.
3069
3070         If the renderer is not a RenderBox, we just use a zero size to compute the transform,
3071         like in CSSComputedStyleDeclaration::computedTransform.
3072
3073         Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
3074
3075         * css/CSSComputedStyleDeclaration.cpp:
3076         (WebCore::valueForCustomFilterTransformParameter):
3077
3078 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3079
3080         Fix assertion in the getComputedStyle-background-shorthand.html test
3081         https://bugs.webkit.org/show_bug.cgi?id=116639
3082
3083         Reviewed by Ryosuke Niwa.
3084
3085         getComputedStyle-background-shorthand.html was asserting under the newly added
3086         code in willBeRemovedFromTree(). The assertion was caused by too many calls to
3087         FrameView::removeSlowRepaintObject(), which happened because we called it for
3088         RenderTexts, which share style with their parent renderer.
3089         
3090         RenderText overrides styleWillChange() to do nothing, so we never
3091         call add/removeSlowRepaintObject() for them. Thus we should also skip this
3092         work in willBeRemovedFromTree() for RenderTexts.
3093
3094         * rendering/RenderObject.cpp:
3095         (WebCore::RenderObject::willBeRemovedFromTree):
3096
3097 2013-05-22  Bem Jones-Bey  <bjonesbe@adobe.com>
3098
3099         Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
3100         https://bugs.webkit.org/show_bug.cgi?id=116626
3101
3102         Reviewed by David Hyatt.
3103
3104         This is a port of a Blink bug fix by Emil Eklund.
3105
3106         Account for saturated estimated position in RenderBlock::layoutBlockChild.
3107
3108         If the estimated top position is saturated the comparison with oldLogicalTop
3109         might yield a false negative as adding and removing margins, borders etc from
3110         a saturated number might yield incorrect results. If this is the case always
3111         mark for layout.
3112
3113         Minimal test case impractical. See bug for raw fuzzer test case.
3114
3115         * platform/LayoutUnit.h:
3116         (WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
3117             a number might be saturated.
3118         * rendering/RenderBlock.cpp:
3119         (WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
3120             to be saturated and if so mark for layout.
3121
3122 2013-05-22  Benjamin Poulain  <benjamin@webkit.org>
3123
3124         Remove CSSPropertySourceData emptyCSSPropertySourceData
3125         https://bugs.webkit.org/show_bug.cgi?id=116517
3126
3127         Reviewed by Darin Adler.
3128
3129         This was added for chromium and does not seem to be used
3130         anywhere anymore.
3131
3132         * css/CSSParser.cpp:
3133         (WebCore::CSSParser::CSSParser):
3134         * css/CSSPropertySourceData.cpp:
3135         * css/CSSPropertySourceData.h:
3136
3137 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
3138
3139         Buildfix for !ENABLE(FULLSCREEN_API) platforms.
3140
3141         Rubber-stamped by Ryosuke Niwa.
3142
3143         * rendering/RenderInline.cpp: Missing #if guard added.
3144         (WebCore::RenderInline::splitInlines):
3145
3146 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
3147
3148         Fix a typo in 150469.
3149
3150         * editing/Editor.cpp:
3151         (WebCore::dispatchEditableContentChangedEvents):
3152
3153 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
3154
3155         REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
3156         https://bugs.webkit.org/show_bug.cgi?id=110622
3157
3158         Reviewed by David Hyatt.
3159
3160         Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
3161
3162         Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
3163         since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
3164         inline splitting to be aware of RenderFullScreen.
3165
3166         Test: fullscreen/full-screen-inline-split-crash.html
3167
3168         * rendering/RenderInline.cpp:
3169         (WebCore::RenderInline::splitInlines):
3170
3171 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3172
3173         Fix issues with focus rings on search fields
3174         https://bugs.webkit.org/show_bug.cgi?id=116591
3175
3176         Reviewed by Darin Adler.
3177         
3178         On a future OS, the rect returned by _focusRingVisibleRect should
3179         be in the coordinate system of the that NSView, not the base
3180         coordinate system, so fix the code that sets and reads the global
3181         focusRingClipRect variable accordingly.
3182
3183         * platform/graphics/mac/WebLayer.mm:
3184         (drawLayerContents):
3185         * platform/mac/ThemeMac.mm:
3186         (-[WebCoreFlippedView _focusRingVisibleRect]):
3187
3188 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3189
3190         New Flickr doesn't get fast scrolling but should
3191         https://bugs.webkit.org/show_bug.cgi?id=116514
3192
3193         Reviewed by Darin Adler.
3194         
3195         RenderObject increments and decrements a counter of slow repaint objects on
3196         FrameView when it sees style changes related to background-attachment:fixed.
3197         However, it omitted to decrement the count when a renderer with a fixed background
3198         was destroyed.
3199         
3200         This caused Flickr to never fall into fast scrolling mode, since it toggled
3201         display:none on an element with a fixed background during loading, then removed
3202         the fixed background.
3203         
3204         Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
3205
3206         Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
3207                platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
3208                platform/mac-wk2/tiled-drawing/slow-scrolling.html
3209
3210         * rendering/RenderObject.cpp:
3211         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
3212         (WebCore::RenderObject::styleWillChange):
3213         (WebCore::RenderObject::willBeRemovedFromTree):
3214
3215 2013-05-22  Robert Hogan  <robert@webkit.org>
3216
3217         Need to Remove Anonymous Wrappers When All Children Become Inline
3218         https://bugs.webkit.org/show_bug.cgi?id=115687
3219
3220         Reviewed by David Hyatt.
3221
3222         Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
3223         when a block becoming float or positioned removes the need for them.
3224
3225         Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
3226
3227         * rendering/RenderBlock.h:
3228         (RenderBlock):
3229         * rendering/RenderObject.cpp:
3230         (WebCore):
3231         (WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
3232         (WebCore::RenderObject::styleWillChange):
3233         (WebCore::RenderObject::styleDidChange):
3234         * rendering/RenderObject.h:
3235         (RenderObject):
3236
3237 2013-05-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3238
3239         [css] Update ETextDecorations enum to TextDecorations
3240         https://bugs.webkit.org/show_bug.cgi?id=116581
3241
3242         Reviewed by Andreas Kling.
3243
3244         Currently, ETextDecorations enum uses a C-like coding style for its
3245         enumeration values, as well as a 'E' prefix that surely had some meaning
3246         in the past, but not nowadays.
3247
3248         No behavior changes, covered by existing tests.
3249
3250         * accessibility/AccessibilityRenderObject.cpp:
3251         (WebCore::AccessibilityRenderObject::hasPlainText):
3252         (WebCore::AccessibilityRenderObject::hasUnderline):
3253         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3254         (getAttributeSetForAccessibilityObject):
3255         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3256         (AXAttributeStringSetStyle):
3257         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3258         (AXAttributeStringSetStyle):
3259         * css/CSSComputedStyleDeclaration.cpp:
3260         (WebCore::renderTextDecorationFlagsToCSSValue):
3261         * css/CSSPrimitiveValueMappings.h:
3262         (WebCore::CSSPrimitiveValue::operator TextDecoration):
3263         * css/DeprecatedStyleBuilder.cpp:
3264         (WebCore::ApplyPropertyTextDecoration::applyValue):
3265         (WebCore::ApplyPropertyTextDecoration::createHandler):
3266         * editing/mac/EditorMac.mm:
3267         (WebCore::Editor::fontAttributesForSelectionStart):
3268         * platform/mac/HTMLConverter.mm:
3269         (+[WebHTMLConverter editingAttributedStringFromRange:]):
3270         * rendering/InlineTextBox.cpp:
3271         (WebCore::InlineTextBox::paint):
3272         (WebCore::InlineTextBox::paintDecoration):
3273         * rendering/InlineTextBox.h:
3274         * rendering/RenderObject.cpp:
3275         (WebCore::RenderObject::getTextDecorationColors):
3276         * rendering/style/RenderStyle.h:
3277         * rendering/style/RenderStyleConstants.h:
3278         (WebCore::operator|):
3279         (WebCore::operator|=):
3280         * rendering/style/StyleVisualData.h:
3281         (StyleVisualData):
3282         * rendering/svg/SVGInlineTextBox.cpp:
3283         (WebCore::SVGInlineTextBox::paint):
3284         (WebCore::positionOffsetForDecoration):
3285         (WebCore::thicknessForDecoration):
3286         (WebCore::findRenderObjectDefininingTextDecoration):
3287         (WebCore::SVGInlineTextBox::paintDecoration):
3288         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
3289         * rendering/svg/SVGInlineTextBox.h:
3290
3291 2013-05-22  Lori Anderson  <lori@rkymtnhi.com>
3292
3293         [GStreamer] Allow multiple log levels in media player
3294         https://bugs.webkit.org/show_bug.cgi?id=116618
3295
3296         Reviewed by Philippe Normand.
3297
3298         No new tests, just changing logging.
3299
3300         * platform/graphics/gstreamer/GStreamerUtilities.h:
3301         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3302         (WebCore::MediaPlayerPrivateGStreamer::load):
3303         (WebCore::MediaPlayerPrivateGStreamer::pause):
3304         (WebCore::MediaPlayerPrivateGStreamer::seek):
3305         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3306         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3307
3308 2013-05-22  Beth Dakin  <bdakin@apple.com>
3309
3310         The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
3311         https://bugs.webkit.org/show_bug.cgi?id=116623
3312
3313         Reviewed by Geoffrey Garen.
3314
3315         Make sure we have actually achieved some milestones before calling didLayout().
3316         * page/FrameView.cpp:
3317         (WebCore::FrameView::performPostLayoutTasks):
3318
3319 2013-05-22  Mario Sanchez Prada  <mario.prada@samsung.com>
3320
3321         [GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
3322         https://bugs.webkit.org/show_bug.cgi?id=114870
3323
3324         Reviewed by Martin Robinson.
3325
3326         Re-implement this functions without using GailTextUtil nor Pango.
3327
3328         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3329         (webkitAccessibleTextGetChar): New function.
3330         (webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
3331
3332 2013-05-22  Antoine Quint  <graouts@apple.com>
3333
3334         [Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
3335         https://bugs.webkit.org/show_bug.cgi?id=116605
3336
3337         Reviewed by Eric Carlson.
3338
3339         Ensure that rtl languages are properly recognized by the captions menu such that text
3340         layout and alignment is natural.
3341
3342         * css/mediaControls.css:
3343         (::-webkit-media-controls):
3344         Remove the forced "direction: ltr" property which was forcing all layout to be
3345         left-to-right.
3346
3347         * css/mediaControlsQuickTime.css:
3348         (video::-webkit-media-controls-closed-captions-track-list):
3349         Remove the forced "text-align: left" property which was forcing all caption
3350         titles to be left-aligned.
3351
3352         (video::-webkit-media-controls-closed-captions-track-list h3):
3353         Use "-webkit-margin-start" instead of "padding-left" to position the heading
3354         such that it adds the margin on the left for ltr languages and on the right
3355         for rtl languages.
3356
3357         (video::-webkit-media-controls-closed-captions-track-list li):
3358         Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
3359         to position itself relative to the caption title rather than the list element.
3360
3361         (video::-webkit-media-controls-closed-captions-track-list li.selected::before):
3362         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
3363         Make the checkmarks a ::before pseudo-class rather than a background-image such that
3364         we may control its positioning using the internationlization-friendly "-webkit-margin-start"
3365         property.
3366
3367         * html/shadow/MediaControlElements.cpp:
3368         (WebCore::MediaControlClosedCaptionsContainerElement::create):
3369         Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
3370         means that the first string displayed within the captions container, currently the
3371         "Subtitles" <h3> element, defines the direction for the whole container. It is therefore
3372         crucial that this string is properly localized in rtl languages as falling back to
3373         english would mean the entire caption container is using ltr.
3374
3375 2013-05-22  Hugo Parente Lima  <hugo.lima@openbossa.org>
3376
3377         WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
3378         https://bugs.webkit.org/show_bug.cgi?id=116340
3379
3380         Reviewed by Christophe Dumez.
3381
3382         No new tests, just a simple build fix.
3383
3384         * inspector/InspectorDOMStorageAgent.cpp:
3385         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
3386         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
3387
3388 2013-05-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3389
3390         Have IDL interface names match their global constructor
3391         https://bugs.webkit.org/show_bug.cgi?id=116520
3392
3393         Reviewed by Kentaro Hara.
3394
3395         Have IDL interface names match their global constructor name on DOMWindow.idl
3396         using [InterfaceName] extended attribute. This affects in particular webkit
3397         prefixed constructors. This is mandated by Web IDL specification:
3398         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
3399
3400         As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
3401         for those interfaces and have their global constructors automatically generated
3402         by the bindings generator.
3403
3404         No new tests, no behavior change for layout tests.
3405
3406         * Modules/mediasource/MediaSource.idl:
3407         * Modules/mediasource/SourceBuffer.idl:
3408         * Modules/mediasource/SourceBufferList.idl:
3409         * Modules/mediastream/MediaStream.idl:
3410         * Modules/mediastream/RTCPeerConnection.idl:
3411         * Modules/speech/SpeechGrammar.idl:
3412         * Modules/speech/SpeechGrammarList.idl:
3413         * Modules/speech/SpeechRecognition.idl:
3414         * Modules/speech/SpeechRecognitionError.idl:
3415         * Modules/speech/SpeechRecognitionEvent.idl:
3416         * Modules/webaudio/OfflineAudioContext.idl:
3417         * Modules/webaudio/PannerNode.idl:
3418         * dom/ShadowRoot.idl:
3419         * page/DOMWindow.idl:
3420
3421 2013-05-21  Mihai Tica  <mitica@adobe.com>
3422         
3423         Update the background blending implementation to match the changes done
3424         in the spec. This implies that background color blending is removed and
3425         the background layers won't blend with the content behind the element
3426         any more.
3427         https://bugs.webkit.org/show_bug.cgi?id=116212
3428
3429         Reviewed by Dean Jackson.
3430
3431         * rendering/RenderBox.cpp:
3432         (WebCore::RenderBox::paintFillLayers):
3433         * rendering/RenderBoxModelObject.cpp:
3434         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3435
3436 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
3437
3438         Use-after-free in DOMSelection::containsNode
3439         https://bugs.webkit.org/show_bug.cgi?id=116468
3440
3441         Reviewed by Andreas Kling.
3442
3443         Retain the node pointer. Also bail out early if the node was not in the document
3444         since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
3445
3446         Test: editing/selection/contains-node-crash.html
3447
3448         * page/DOMSelection.cpp:
3449         (WebCore::DOMSelection::containsNode):
3450         * page/DOMSelection.h:
3451         (DOMSelection):
3452
3453 2013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
3454
3455         Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
3456         https://bugs.webkit.org/show_bug.cgi?id=116569
3457
3458         Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
3459
3460         Reviewed by Timothy Hatcher.
3461
3462         Test: inspector/load-resource-synchronously-utf8.html
3463
3464         * inspector/InspectorFrontendHost.cpp:
3465         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
3466
3467 2013-05-21  Andy Estes  <aestes@apple.com>
3468
3469         Allow session storage for third-party origins even if third-party data access is blocked.
3470         https://bugs.webkit.org/show_bug.cgi?id=116532
3471
3472         Reviewed by Anders Carlsson.
3473
3474         In http://trac.webkit.org/changeset/149326 we relaxed our policy for
3475         localStorage when third-party data blocking is enabled to create a
3476         transient, session-scoped storage area for the third-party origin
3477         instead of throwing an exception. Since this gives essentially the same
3478         behavior as sessionStorage, we might as well also allow sessionStorage
3479         for third-party origins.
3480
3481         Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
3482
3483         * WebCore.exp.in: Updated the symbol for
3484         SecurityOrigin::canAccessStorage.
3485         * page/DOMWindow.cpp:
3486         (WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
3487         rather than canAccessLocalStorage().
3488         * page/SecurityOrigin.cpp:
3489         (WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
3490         indicating if access should be allowed from third-party origins.
3491         * page/SecurityOrigin.h:
3492         (WebCore::SecurityOrigin::canAccessSessionStorage): Called
3493         canAccessStorage() with AlwaysAllowFromThirdParty.
3494         (SecurityOrigin):
3495
3496 2013-05-21  Hugo Parente Lima  <hugo.lima@openbossa.org>
3497
3498         [EFL] Add missing #if guards on drag support methods
3499         https://bugs.webkit.org/show_bug.cgi?id=116574
3500
3501         Reviewed by Christophe Dumez.
3502
3503         * platform/efl/PasteboardEfl.cpp:
3504         (WebCore):
3505
3506 2013-05-21  Antti Koivisto  <antti@apple.com>
3507
3508         Remove stub HTMLContentElement
3509         https://bugs.webkit.org/show_bug.cgi?id=116580
3510
3511         Reviewed by Andreas Kling.
3512
3513         Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
3514
3515         * html/HTMLDetailsElement.cpp:
3516         (WebCore::DetailsContentElement::DetailsContentElement):