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