Add the default video poster if it doesn't exist in video tag
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-13  Tao Bai  <michaelbai@chromium.org>
2
3         Add the default video poster if it doesn't exist in video tag
4         https://bugs.webkit.org/show_bug.cgi?id=110263
5
6         Reviewed by Eric Carlson.
7
8         Tests: media/video-default-poster.html
9                media/video-no-default-poster.html
10
11         The Android web view application could provide the default poster
12         for a video that doesn't have the poster attribute.
13
14         To provide the default poster, the application must set defaultVideoPosterURL
15         setting and return the image in the response of that URL.
16
17         The way to do this would be:
18
19         A) Replace the Element::imageSourceAttributeName function with an
20            Element::imageSourceURL function that returns the imageSourceURL as a
21            const AtomicString&. The body will be the same as before, it will just also
22            include a call to getAttribute. Also will need to revise the four classes
23            that override that function.
24
25         B) Add a new HTMLVideoElement::posterImageURL function that implements the
26            default poster URL logic.
27
28         C) Update the four functions that get the poster attribute to handle poster
29            loading and display to call posterImageURL.
30
31            1) HTMLVideoElement::imageSourceURL.
32            2) HTMLVideoElement::setDisplayMode.
33            3) HTMLVideoElement::updateDisplayState.
34            4) HTMLMediaElement::getPluginProxyParams. Will need to cast to
35               HTMLVideoElement after checking isVideo.
36
37         * dom/Element.cpp:
38         (WebCore::Element::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
39         * dom/Element.h: Replace imageSourceAttributeName() with imageSourceURL()
40         * html/HTMLEmbedElement.cpp:
41         (WebCore::HTMLEmbedElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
42         * html/HTMLEmbedElement.h: Replace imageSourceAttributeName() with imageSourceURL()
43         * html/HTMLMediaElement.cpp:
44         (WebCore::HTMLMediaElement::getPluginProxyParams): Change to use posterImageURL
45         * html/HTMLObjectElement.cpp:
46         (WebCore::HTMLObjectElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
47         * html/HTMLObjectElement.h: Replace imageSourceAttributeName with imageSourceURL
48         * html/HTMLVideoElement.cpp:
49         (WebCore::HTMLVideoElement::HTMLVideoElement): set m_defaultPosterURL if there is such settings
50         (WebCore::HTMLVideoElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
51         (WebCore::HTMLVideoElement::setDisplayMode): Use imageSourceURL()
52         (WebCore::HTMLVideoElement::updateDisplayState): Use imageSourceURL()
53         (WebCore::HTMLVideoElement::posterImageURL): Return image source's KURL
54         * html/HTMLVideoElement.h: Replace imageSourceAttributeName() with imageSourceURL() and add m_defaultPosterURL
55         * loader/ImageLoader.cpp:
56         (WebCore::ImageLoader::updateFromElement): Use imageSourceURL()
57         * page/Settings.in: Add defaultVideoPosterURL setting.
58         * platform/chromium/PasteboardChromium.cpp:
59         (WebCore::Pasteboard::writeImage): use imageSourceURL()
60         * platform/gtk/PasteboardGtk.cpp:
61         (WebCore::getURLForImageNode): use imageSourceURL()
62         * rendering/HitTestResult.cpp:
63         (WebCore::HitTestResult::absoluteImageURL): use imageSourceURL()
64         * svg/SVGImageElement.cpp:
65         (WebCore::SVGImageElement::imageSourceURL): Replace imageSourceAttributeName() with imageSourceURL()
66         * svg/SVGImageElement.h: Replace imageSourceAttributeName() with imageSourceURL()
67         * testing/InternalSettings.cpp:
68         (WebCore::InternalSettings::Backup::Backup): support backup defaultVideoPosterURL.
69         (WebCore::InternalSettings::Backup::restoreTo): support restore defaultVideoPosterURL.
70         (WebCore::InternalSettings::setDefaultVideoPosterURL): set defaultVideoPosterURL.
71         * testing/InternalSettings.h:
72         (Backup): support backup defaultVideoPosterURL.
73         (InternalSettings): Add setDefaultVidoePosterURL method.
74         * testing/InternalSettings.idl: Add setDefaultVideoPosterURL for test purpose.
75         * testing/Internals.cpp:
76         (WebCore::Internals::getImageSourceURL): Add getImageSourceURL method.
77         * testing/Internals.h: Add getImageSourceURL method.
78         * testing/Internals.idl: Add getImageSourceURL method.
79
80 2013-03-13  Abhishek Arya  <inferno@chromium.org>
81
82         Replace static_casts with to* functions for document types.
83         https://bugs.webkit.org/show_bug.cgi?id=112225
84
85         Reviewed by Ryosuke Niwa.
86
87         to* helper functions are preferred over static_cast calls since they
88         help to catch bad casts easily on the testing infrastructure.
89
90         * Modules/geolocation/Geolocation.cpp:
91         (WebCore::Geolocation::document):
92         ....lot of files.
93
94 2013-03-13  Liam Quinn  <lquinn@blackberry.com>
95
96         Handle XHTML entities in XHTML Mobile Profile 1.1 and 1.2. We previously only handled them in XHTML Mobile Profile 1.0.
97         https://bugs.webkit.org/show_bug.cgi?id=112174
98         RIM PR 309038
99
100         Reviewed by Rob Buis.
101         Internally reviewed by Leo Yang.
102
103         Check for the 1.1 and 1.2 doctypes alongside the 1.0 doctype.
104
105         Tests: fast/doctypes/xhtml-with-xhtmlmp11-doctype.xhtml
106                fast/doctypes/xhtml-with-xhtmlmp12-doctype.xhtml
107
108         * xml/parser/XMLDocumentParserLibxml2.cpp:
109         (WebCore::externalSubsetHandler):
110         * xml/parser/XMLDocumentParserQt.cpp:
111         (WebCore::XMLDocumentParser::parseDtd):
112
113 2013-03-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
114
115         [EFL] Better error handling in NetworkStateNotifierEfl
116         https://bugs.webkit.org/show_bug.cgi?id=112184
117
118         Reviewed by Kenneth Rohde Christiansen.
119
120         Improve error handling in for system calls in NetworkStateNotifierEfl.
121         - EINTR errors are now properly handled for close() and recv() syscalls
122         - recv() errors are now correctly detected, for e.g. if the socket was
123         closed unexpectedly.
124         - Make sure m_fdHandler is reset when the callback returns
125         ECORE_CALLBACK_CANCEL to avoid double free in destructor. m_fdHandler
126         gets destroyed when the callback returns ECORE_CALLBACK_CANCEL.
127         - Keep netlink socket file descriptor as a class member so that we can
128         close() it in the class destructor, even if m_fdHandler has already
129         been destroyed.
130
131         No new tests, no behavior change for layout tests.
132
133         * platform/network/NetworkStateNotifier.h:
134         (NetworkStateNotifier):
135         * platform/network/efl/NetworkStateNotifierEfl.cpp:
136         (WebCore::NetworkStateNotifier::readSocketCallback):
137         (WebCore::NetworkStateNotifier::~NetworkStateNotifier):
138         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
139
140 2013-03-13  Tony Chang  <tony@chromium.org>
141
142         Regression(r143542): -webkit-align-items: center with overflow: auto/scroll has extra bottom padding
143         https://bugs.webkit.org/show_bug.cgi?id=112047
144
145         Reviewed by Ojan Vafai.
146
147         Add a new pass for computing the client bottom edge that runs after we've repositioned children
148         due to wrap-reverse, flex-end or vertical centering.
149
150         Test: css3/flexbox/negative-overflow.html
151
152         * rendering/RenderFlexibleBox.cpp:
153         (WebCore::RenderFlexibleBox::layoutBlock): Remove the code to use clientLogicalBottom() that was computed before
154         repositioning. The repositioning can change the edge.
155         (WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning): Compute the new bottom based on the final position
156         of flex items.
157         * rendering/RenderFlexibleBox.h:
158         (RenderFlexibleBox):
159
160 2013-03-13  Nate Chapin  <japhet@chromium.org>
161
162         REGRESSION(r137607): Redirecting a post to a get then reloading triggers resubmit warning
163         https://bugs.webkit.org/show_bug.cgi?id=112194
164
165         Reviewed by Alexey Proskuryakov.
166
167         Test: http/tests/navigation/post-redirect-get-reload.php
168
169         * loader/SubresourceLoader.cpp:
170         (WebCore::SubresourceLoader::willSendRequest): Matching urls aren't a reliable way of checking whether
171             we are in a redirect. Check redirectResponse.isNull() instead.
172         * testing/Internals.cpp:
173         (WebCore::Internals::forceReload): Expose a means of forcing a reload like one a user generates for testing.
174             Note that testRunner.queueReload() does this, but is not supported after the initial load completes,
175             which makes it unsuitable for this case.
176         * testing/Internals.h:
177         * testing/Internals.idl:
178
179 2013-03-13  Nate Chapin  <japhet@chromium.org>
180
181         Merge MainResourceLoader's didFinishLoading and dataReceived into DocumentLoader
182         https://bugs.webkit.org/show_bug.cgi?id=109952
183
184         Reviewed by Antti Koivisto.
185
186         No new tests, refactor only.
187
188         * loader/DocumentLoader.cpp:
189         (WebCore::DocumentLoader::DocumentLoader):
190         (WebCore::DocumentLoader::finishedLoading):
191         (WebCore::DocumentLoader::responseReceived):
192         (WebCore::DocumentLoader::receivedData):
193         (WebCore::DocumentLoader::maybeLoadEmpty):
194         * loader/DocumentLoader.h:
195         * loader/MainResourceLoader.cpp:
196         (WebCore::MainResourceLoader::responseReceived): Move content filtering to
197             DocumentLoader.
198         (WebCore::MainResourceLoader::dataReceived): Mostly moved to DocumentLoader.
199         (WebCore::MainResourceLoader::didFinishLoading): Mostly moved to DocumentLoader.
200         * loader/MainResourceLoader.h: Expose some variables that haven't been moved
201             to DocumentLoader yet.
202
203 2013-03-13  Andrei Bucur  <abucur@adobe.com>
204
205         [CSS Regions] Break after doesn't work correctly with auto-height regions
206         https://bugs.webkit.org/show_bug.cgi?id=112241
207
208         Reviewed by David Hyatt.
209
210         The change correctly returns the break position during the normal layout phase for
211         auto-height regions. The problem doesn't exist during the constrained layout phase
212         so it only affects the size of the auto-height regions by incorrectly positioning
213         the content inside the flow.
214
215         Test: fast/regions/autoheight-break-after.html
216
217         * rendering/RenderBlock.cpp:
218         (WebCore::RenderBlock::applyAfterBreak): Include the margin offset in the returned break position.
219
220 2013-03-12  Andrey Kosyakov  <caseq@chromium.org>
221
222         Web Inspector: coalesce repeating timeline records
223         https://bugs.webkit.org/show_bug.cgi?id=112168
224
225         Reviewed by Vsevolod Vlasov.
226
227         - coalesce repeating top-level timeline events;
228         - drive-by: only show categories that actually took time in aggregated stats;
229
230         * English.lproj/localizedStrings.js:
231         * inspector/front-end/TimelineFrameController.js:
232         (WebInspector.TimelineFrameController.prototype._innerAddRecord):
233         * inspector/front-end/TimelinePanel.js:
234         (WebInspector.TimelinePanel.prototype._highlightRect):
235         (WebInspector.TimelineCalculator.prototype.computeBarGraphPercentages):
236         * inspector/front-end/TimelinePresentationModel.js:
237         (WebInspector.TimelinePresentationModel.prototype.reset):
238         (WebInspector.TimelinePresentationModel.prototype._innerAddRecord):
239         (WebInspector.TimelinePresentationModel.prototype._updateAncestorStats):
240         (WebInspector.TimelinePresentationModel.prototype._findCoalescedParent):
241         (WebInspector.TimelinePresentationModel.prototype._replaceWithCoalescedRecord):
242         (WebInspector.TimelinePresentationModel.Record):
243         (WebInspector.TimelinePresentationModel.adoptRecord):
244         (WebInspector.TimelinePresentationModel.insertRetrospectiveRecord):
245         (WebInspector.TimelinePresentationModel.Record.prototype.get selfTime):
246         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
247         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
248         (WebInspector.TimelinePresentationModel.Record.prototype.calculateAggregatedStats):
249
250 2013-03-13  Philip Rogers  <pdr@google.com>
251
252         Fix body background image geometry calculation
253         https://bugs.webkit.org/show_bug.cgi?id=112226
254
255         Reviewed by Stephen Chenney.
256
257         Images that depend on a container size require a call to set the container size before
258         rendering, and a call to look up the correct image during painting.
259
260         The body's renderer is special in that it may not be the renderer that actually paints its
261         background. This patch fixes a bug where the correct RenderObject was used for looking up
262         the image, but not for setting the container size. This fixes SVG background images on body.
263
264         Test: svg/as-background-image/svg-as-background-body.html
265
266         * rendering/RenderBoxModelObject.cpp:
267         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
268         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
269
270             This change introduces clientForBackgroundImage in the background geometry calculation.
271             This is very similar to how the client is looked up in paintFillLayerExtended.
272
273         * rendering/RenderBoxModelObject.h:
274
275             The new signature for calculateBackgroundImageGeometry now mirrors
276             paintFillLayerExtended, containing a parameter for the correct background renderer.
277
278         (RenderBoxModelObject):
279
280 2013-03-13  Andrey Lushnikov  <lushnikov@chromium.org>
281
282         Web Inspector: [CodeMirror] Handle "enter" key in {|} situation
283         https://bugs.webkit.org/show_bug.cgi?id=112153
284
285         Reviewed by Vsevolod Vlasov.
286
287         Add a keymap to handle "Enter" key and override it in case of {|}
288         situation.
289
290         No new tests.
291
292         * inspector/front-end/CodeMirrorTextEditor.js:
293         (WebInspector.CodeMirrorTextEditor):
294         (WebInspector.CodeMirrorTextEditor.BlockIndentController):
295         (WebInspector.CodeMirrorTextEditor.BlockIndentController.prototype.Enter):
296
297 2013-03-13  Andrey Lushnikov  <lushnikov@chromium.org>
298
299         Web Inspector: [CodeMirror] bug with LineWidgets
300         https://bugs.webkit.org/show_bug.cgi?id=111978
301
302         Reviewed by Vsevolod Vlasov.
303
304         Implement CodeMirrorTextEditor.beginUpdates and
305         CodeMirrorTextEditor.endUpdates and surround decoration creation
306         with the beginUpdates/endUpdates calls.
307
308         No new tests.
309
310         * inspector/front-end/CodeMirrorTextEditor.js:
311         (WebInspector.CodeMirrorTextEditor):
312         (WebInspector.CodeMirrorTextEditor.prototype.beginUpdates):
313         (WebInspector.CodeMirrorTextEditor.prototype.endUpdates):
314         * inspector/front-end/SourceFrame.js:
315         (WebInspector.SourceFrame.prototype.addMessageToSource):
316
317 2013-03-13  Pavel Feldman  <pfeldman@chromium.org>
318
319         Web Inspector: get rid of hiddenPanels filter
320         https://bugs.webkit.org/show_bug.cgi?id=112252
321
322         Reviewed by Vsevolod Vlasov.
323
324         * WebCore.order:
325         * inspector/InspectorFrontendClient.h:
326         (InspectorFrontendClient):
327         * inspector/InspectorFrontendHost.cpp:
328         * inspector/InspectorFrontendHost.h:
329         (InspectorFrontendHost):
330         * inspector/InspectorFrontendHost.idl:
331         * inspector/front-end/InspectorFrontendHostStub.js:
332         * inspector/front-end/externs.js:
333         * inspector/front-end/inspector.js:
334         (WebInspector._panelDescriptors):
335         * testing/Internals.cpp:
336
337 2013-03-13  Pavel Feldman  <pfeldman@chromium.org>
338
339         Web Inspector: convert workers inspection into capability
340         https://bugs.webkit.org/show_bug.cgi?id=112251
341
342         Reviewed by Vsevolod Vlasov.
343
344         It should be up to backend
345
346         * inspector/Inspector.json:
347         * inspector/InspectorFrontendClient.h:
348         (InspectorFrontendClient):
349         * inspector/InspectorFrontendClientLocal.h:
350         * inspector/InspectorFrontendHost.cpp:
351         * inspector/InspectorFrontendHost.h:
352         (InspectorFrontendHost):
353         * inspector/InspectorFrontendHost.idl:
354         * inspector/InspectorWorkerAgent.cpp:
355         (WebCore::InspectorWorkerAgent::canInspectWorkers):
356         (WebCore):
357         * inspector/InspectorWorkerAgent.h:
358         (InspectorWorkerAgent):
359         * inspector/front-end/InspectorFrontendHostStub.js:
360         * inspector/front-end/Settings.js:
361         * inspector/front-end/externs.js:
362         * inspector/front-end/inspector.js:
363         (WebInspector.doLoadedDone):
364
365 2013-03-13  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
366
367         [EFL] Start using evas object directly in Widget class
368         https://bugs.webkit.org/show_bug.cgi?id=111858
369
370         Reviewed by Antonio Gomes.
371
372         Based on a patch by Kenneth Rohde Christiansen.
373
374         EFL Widget class should use evas object pointer directly rather
375         than WidgetPrivate* m_data as platformWidget() is a Mac specific
376         implementation detail that they are moving away from with WebKit2.
377
378         This patch brings: firstly better compliance with other ports,
379         secondly it makes code cleaner.
380
381         Besides, the evasObject is only directly used in the ScrollbarEfl
382         subclass of Widget and not in Widget or ScrollView or any other subclass,
383         thus the evas_object code has now been concentrated in ScrollbarEfl.
384
385         No new tests as there are no behavioral changes.
386
387         * page/efl/EventHandlerEfl.cpp:
388         * platform/Widget.h:
389         (Widget):
390         (WebCore::Widget::evasObject):
391         * platform/efl/ScrollbarEfl.cpp:
392         (ScrollbarEfl::~ScrollbarEfl):
393         (scrollbarEflEdjeMessage):
394         (ScrollbarEfl::show):
395         (ScrollbarEfl::hide):
396         (ScrollbarEfl::setParent):
397         (ScrollbarEfl::updateThumbPositionAndProportion):
398         (ScrollbarEfl::frameRectsChanged):
399         * platform/efl/ScrollbarEfl.h:
400         (ScrollbarEfl):
401         * platform/efl/WidgetEfl.cpp:
402         (WebCore::Widget::Widget):
403         (WebCore::Widget::~Widget):
404         (WebCore::Widget::frameRectsChanged):
405         (WebCore::Widget::show):
406         (WebCore::Widget::hide):
407         (WebCore::Widget::setEvasObject):
408         * plugins/efl/PluginViewEfl.cpp:
409         (WebCore::PluginView::platformGetValue):
410
411 2013-03-13  Andrey Lushnikov  <lushnikov@chromium.org>
412
413         Web Inspector: [CodeMirror] token highlight still has some problems
414         https://bugs.webkit.org/show_bug.cgi?id=112173
415
416         Reviewed by Vsevolod Vlasov.
417
418         Use pseudo elements with borders to draw token highlight.
419
420         No new tests.
421
422         * inspector/front-end/cm/cmdevtools.css:
423         (.cm-token-highlight):
424         (.cm-token-highlight:before):
425         (.cm-line-with-selection .cm-column-with-selection:before):
426
427 2013-03-13  Alberto Garcia  <agarcia@igalia.com>
428
429         [BlackBerry] SimpleFontData: remove duplicate code
430         https://bugs.webkit.org/show_bug.cgi?id=112149
431
432         Reviewed by Carlos Garcia Campos.
433
434         smallCapsFontData() and emphasisMarkFontData() were moved from
435         platform specific files into platform/graphics/SimpleFontData.cpp
436         in r133362, so the BlackBerry port no longer needs its own
437         implementation.
438
439         * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
440
441 2013-03-13  Ilya Tikhonovsky  <loislo@chromium.org>
442
443         Web Inspector: throw an exception if the requested lazy loaded script does not exist.
444         https://bugs.webkit.org/show_bug.cgi?id=112237
445
446         Reviewed by Pavel Feldman.
447
448         * inspector/front-end/utilities.js:
449
450 2013-03-13  Mike West  <mkwst@chromium.org>
451
452         Pass the XSSAuditor's report URL to the XSSAuditorDelegate on the main thread.
453         https://bugs.webkit.org/show_bug.cgi?id=112179
454
455         Reviewed by Adam Barth.
456
457         Rather than relying on XSSInfo objects to move the XSSAuditor's report
458         URL into the XSSAuditorDelegate for reporting, we should be able to grab
459         the URL directly from XSSAuditor before it moves off the main thread,
460         and store it on the delegate.
461
462         This will enable us to drop the report URL properties from both
463         XSSAuditor and XSSInfo. Oh, happy day!
464
465         * html/parser/BackgroundHTMLParser.cpp:
466         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
467             We no longer need to check whether XSSInfo objects are thread safe,
468             as we've dropped the only problematic bit.
469         * html/parser/HTMLDocumentParser.cpp:
470         (WebCore::HTMLDocumentParser::pumpTokenizer):
471         (WebCore::HTMLDocumentParser::startBackgroundParser):
472         * html/parser/XSSAuditor.cpp:
473         (WebCore::XSSAuditor::init):
474             When initializing the XSSAuditor, pass in an XSSAuditorDelegate*
475             and assign the report URL directly onto that object.
476         (WebCore::XSSAuditor::filterToken):
477             Drop the report URL parameter from XSSInfo objects we create in the
478             Auditor, as they're now handled directly from the delegate.
479         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
480             Drop the report URL property from XSSAuditor's threadsafeness check,
481             as properties that do not exist are automatically thread-safe.
482         * html/parser/XSSAuditorDelegate.cpp:
483         (WebCore::XSSAuditorDelegate::didBlockScript):
484             Use the delegate's own report URL rather than the XSSInfo objects'.
485         * html/parser/XSSAuditorDelegate.h:
486         (WebCore::XSSInfo::create):
487         (WebCore::XSSInfo::XSSInfo):
488             Drop the report URL property from XSSInfo.
489         (WebCore::XSSAuditorDelegate::setReportURL):
490         (XSSAuditorDelegate):
491             Provide a public API for setting a delegate's report URL.
492
493 2013-03-13  Mike West  <mkwst@chromium.org>
494
495         Unsafe JavaScript attempt errors are ludicrously verbose and annoying
496         https://bugs.webkit.org/show_bug.cgi?id=112042
497
498         Reviewed by Timothy Hatcher.
499
500         This patch attempts to make the most common case of error message less
501         ludicrous by adjusting it to include only an origin as opposed to full
502         URLs for the active and target frames. It now reads: "Blocked a frame
503         with origin 'http://127.0.0.1:8000' from accessing a frame with origin
504         'http://localhost:8000'. Protocols, domains, and ports must match."
505
506         In the interest of keeping the patch size down, I'll follow up on the
507         other cases (sandboxed access, 'document.domain' mismatches, etc) in
508         future patches.
509
510         * page/DOMWindow.cpp:
511         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
512
513 2013-03-13  Takashi Sakamoto  <tasak@google.com>
514
515         Implement :scope for element.querySelector[All]()
516         https://bugs.webkit.org/show_bug.cgi?id=81069
517
518         Reviewed by Dimitri Glazkov.
519
520         Implemented :scope for element.querySelector[All]().
521         Reuse scope in SelectorCheckingContext and added a new value to
522         enum BehaviorAtBoundary.
523         :scope spec is http://dev.w3.org/csswg/selectors4/#scope-pseudo.
524
525         Test: fast/selectors/querySelector-scope.html
526
527         * css/CSSSelector.cpp:
528         (WebCore::CSSSelector::pseudoId):
529         (WebCore::nameToPseudoTypeMap):
530         (WebCore::CSSSelector::extractPseudoType):
531         Added :scope pseudo type.
532         * css/CSSSelector.h:
533         * css/SelectorChecker.cpp:
534         (WebCore::SelectorChecker::match):
535         (WebCore::SelectorChecker::checkOne):
536         Added PseudoScope case and modified "scope" meaning when
537         behaviorAtBoundary is equal to StaysWithinTreeScope.
538         If so, "scope" is just a contextual reference node.
539         * css/SelectorChecker.h:
540         * dom/SelectorQuery.cpp:
541         (WebCore::SelectorDataList::selectorMatches):
542         (WebCore::SelectorDataList::matches):
543         (WebCore::SelectorDataList::execute):
544         Use rootNode as a contextual reference node.
545         * dom/SelectorQuery.h:
546         (SelectorDataList):
547
548 2013-03-13  Alberto Garcia  <agarcia@igalia.com>
549
550         [BlackBerry] FontPlatformData: remove TextOrientation parameter
551         https://bugs.webkit.org/show_bug.cgi?id=112135
552
553         Reviewed by Rob Buis.
554
555         This doesn't exist since r136520.
556
557         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
558         (WebCore::FontCache::createFontPlatformData):
559         * platform/graphics/blackberry/FontCustomPlatformData.h:
560         (FontCustomPlatformData):
561         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
562         (WebCore::FontCustomPlatformData::fontPlatformData):
563         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
564         (WebCore::FontPlatformData::FontPlatformData):
565         (WebCore::FontPlatformData::applyState):
566         * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
567         (WebCore::SimpleFontData::createScaledFontData):
568
569 2013-03-12  Antti Koivisto  <antti@apple.com>
570
571         Basic child obscuration test for backgrounds
572         https://bugs.webkit.org/show_bug.cgi?id=111701
573
574         Reviewed by Simon Fraser.
575         
576         Test: fast/repaint/obscured-background-no-repaint.html
577
578         We can easily detect some simple cases where a background image is fully obscured by an opaque child.
579         
580         This avoids unncessary painting and image decoding. It is especially helpful for cases like about.com home
581         page where a fully obscured 'loading' spinner keeps triggering frequent complex repaints (gif animations
582         progress by getting painted and stop if they are not).
583         
584         This could be made way more sophisticated. The checking could also be done per-layout rather per-paint.
585         Even this simple approach gets hit surprisingly often in real world sites.
586
587         * rendering/RenderBox.cpp:
588         (WebCore::RenderBox::backgroundIsObscured):
589         
590             Before painting background test if any single child renderer fully obscures it.
591
592         (WebCore::RenderBox::backgroundIsOpaqueInRect):
593         * rendering/RenderBox.h:
594
595 2013-03-12  Hayato Ito  <hayato@chromium.org>
596
597         [Crash] Touch Events retargeting causes crashes on chrome on android.
598         https://bugs.webkit.org/show_bug.cgi?id=112210
599
600         Reviewed by Dimitri Glazkov.
601
602         Added null-check for TouchEvent's touches(), targetTouches() and changedTouches().
603
604         No new tests - no new functionality.
605
606         * dom/EventRetargeter.cpp:
607         (WebCore::EventRetargeter::adjustForTouchEvent):
608         (WebCore::EventRetargeter::adjustTouchList):
609         * dom/EventRetargeter.h:
610
611 2013-03-12  Geoffrey Garen  <ggaren@apple.com>
612
613         Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
614
615         * platform/RunLoopTimer.h: Removed.
616
617 2013-03-12  Huang Dongsung  <luxtella@company100.net>
618
619         Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer().
620         https://bugs.webkit.org/show_bug.cgi?id=111835
621
622         Reviewed by Luiz Agostini.
623
624         This patch removes CoordinatedGraphicsLayer::setRootLayer() because
625         CoordinatedGraphicsScene already knows which layer is root.
626
627         No new tests, no behavior change.
628
629         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
630         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
631         (CoordinatedGraphicsLayer):
632         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
633         (WebCore::CoordinatedGraphicsScene::setLayerState):
634         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
635         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
636
637 2013-03-12  Jun Jiang  <jun.a.jiang@intel.com>
638
639         Enable GPU-GPU texture copy in texImage2D() for HTMLVideoElement if hardware accelerated video decode is in use
640         https://bugs.webkit.org/show_bug.cgi?id=111126
641
642         Reviewed by Kenneth Russell.
643
644         In texImage2D() for HTMLVideoElement in WebGL, it is possible to do a GPU-GPU texture copy instead of CPU readback
645         and upload when videoFrame is in the form of textures. Each platform port needs to implement the interface
646         copyVideoTextureToPlatformTexture() defined in MediaPlayer.h to make it work.
647  
648         Already covered by current tests.
649
650         * html/HTMLVideoElement.cpp:
651         (WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture):
652         * html/HTMLVideoElement.h:
653         (HTMLVideoElement):
654         * html/canvas/WebGLRenderingContext.cpp:
655         (WebCore::WebGLRenderingContext::videoFrameToImage): Move some security check to upper level.
656         (WebCore::WebGLRenderingContext::texImage2D): Add the fast GPU-GPU textures copy path for HTMLVideoElement and some security check.
657         (WebCore::WebGLRenderingContext::texSubImage2D): Add some security check.
658         * html/canvas/WebGLTexture.cpp:
659         (WebCore::WebGLTexture::isValid): Added to check if the texture is defined at the given level.
660         * html/canvas/WebGLTexture.h:
661         (WebGLTexture):
662         * platform/graphics/MediaPlayer.cpp:
663         (WebCore::MediaPlayer::copyVideoTextureToPlatformTexture): Added to do the GPU-GPU textures copy.
664         * platform/graphics/MediaPlayer.h:
665         (MediaPlayer):
666         * platform/graphics/MediaPlayerPrivate.h:
667         (WebCore::MediaPlayerPrivateInterface::copyVideoTextureToPlatformTexture):
668
669 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
670
671         Unreviewed, rolling out r145280.
672         http://trac.webkit.org/changeset/145280
673         https://bugs.webkit.org/show_bug.cgi?id=112217
674
675         This patch broke chromium WebGL conformance tests (Requested
676         by shawnsingh on #webkit).
677
678         * platform/graphics/gpu/DrawingBuffer.cpp:
679         (WebCore::DrawingBuffer::reset):
680         * platform/graphics/gpu/DrawingBuffer.h:
681         (DrawingBuffer):
682
683 2013-03-12  Dean Jackson  <dino@apple.com>
684
685         Don't send events to plugins that are being snapshotted
686         https://bugs.webkit.org/show_bug.cgi?id=112215
687         <rdar://problem/13386224>
688
689         Reviewed by Tim Horton.
690
691         If a plugin is in the process of being snapshotted, do not forward it
692         any events. This avoids the case where we can accidentally capture some
693         custom mouse pointers, as well as trigger a plugin menu.
694
695         The next step will be to detect if the event should stop the snapshotting
696         (restart the plugin).
697
698         * html/HTMLPlugInElement.cpp:
699         (WebCore::HTMLPlugInElement::defaultEventHandler): Return early if the plugin is snapshotting.
700
701 2013-03-12  Tim Horton  <timothy_horton@apple.com>
702
703         Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
704
705         * WebCore.vcproj/WebCore.vcproj:
706         * WebCore.vcxproj/WebCore.vcxproj:
707         * WebCore.vcxproj/WebCore.vcxproj.filters:
708
709 2013-03-12  James Robinson  <jamesr@chromium.org>
710
711         Fix Gamepad::axes and Gamepad::buttons to avoid calling std::copy(..., ..., 0)
712         https://bugs.webkit.org/show_bug.cgi?id=89510
713
714         Reviewed by Kenneth Russell.
715
716         WTF::Vector::begin() returns 0 when the vector has length zero. On windows, the debug implementation of
717         std::copy() is unhappy with 0 as a third parameter even when the first and second parameters are equal.
718
719         Covered by gamepad/gamepad-polling-access.html
720
721         * Modules/gamepad/Gamepad.cpp:
722         (WebCore::Gamepad::axes):
723         (WebCore::Gamepad::buttons):
724
725 2013-03-12  Elliott Sprehn  <esprehn@chromium.org>
726
727         Remove TextIterator.cpp's isAllCollapsibleWhitespace
728         https://bugs.webkit.org/show_bug.cgi?id=112200
729
730         Reviewed by Ryosuke Niwa.
731
732         Remove isAllCollapsibleWhitespace since nothing uses it.
733
734         * editing/TextIterator.cpp: Remove isAllCollapsibleWhitespace.
735
736 2013-03-12  Bear Travis  <betravis@adobe.com>
737
738         [css exclusions] Move ExclusionShapeInsideInfo into RenderBlockRareData
739         https://bugs.webkit.org/show_bug.cgi?id=110995
740
741         Reviewed by Julien Chaffraix.
742
743         This patch moves ExclusionShapeInsideInfo into the RenderBlockRareData struct,
744         which enables us to move away from the global ExclusionShapeInsideInfo map.
745         Some additional refactoring was done to remove ExclusionShapeInsideInfo's
746         dependency on InlineIterator, which depended on RenderBlock. This work required
747         adding a new LineSegmentIterator struct.
748
749         Refactoring, no new tests.
750
751         * rendering/ExclusionShapeInsideInfo.cpp:
752         (WebCore):
753         (WebCore::LineSegmentRange::LineSegmentRange): Moving the InlineIterator
754         constructor to the .cpp file, as InlineIterator is now forward declared in
755         the .h file.
756         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Moving isEnabledFor to
757         the .cpp file, as RenderBlock is now forward declared in the .h file.
758         * rendering/ExclusionShapeInsideInfo.h:
759         (WebCore):
760         (LineSegmentIterator): A simple struct for containing segment positions for
761         layout.
762         (WebCore::LineSegmentIterator::LineSegmentIterator): Constructor.
763         (LineSegmentRange): Transitioning to store LineSegmentIterator.
764         (WebCore::LineSegmentRange::LineSegmentRange): Ditto.
765         (ExclusionShapeInsideInfo):
766         * rendering/RenderBlock.cpp:
767         (WebCore::RenderBlock::willBeDestroyed): Destroying a block will now destroy
768         its ExclusionShapeInsideInfo, so there is no need to remove it from the map.
769         (WebCore):
770         (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Use
771         the RenderBlockRareData struct rather than the global map.
772         * rendering/RenderBlock.h:
773         (WebCore):
774         (WebCore::RenderBlock::ensureExclusionShapeInsideInfo): Ensure an info struct
775         is present if the shape-inside style is set.
776         (WebCore::RenderBlock::exclusionShapeInsideInfo): Look up the info struct for
777         the current block.
778         (WebCore::RenderBlock::setExclusionShapeInsideInfo): Update the info struct
779         for the current block.
780         (RenderBlockRareData): Add the ExclusionShapeInsideInfo member. Move the struct
781         declaration to be public, so that the OwnPtr reference can properly delete it.
782         * rendering/RenderBlockLineLayout.cpp:
783         (WebCore::constructBidiRunsForLine): Construct the appropriate offsets during
784         layout based on the stored LineSegmentIterators.
785
786 2013-03-12  James Robinson  <jamesr@chromium.org>
787
788         Build fix for r145592 - update gyp files to refer to new file locations.
789
790         * WebCore.gypi:
791
792 2013-03-12  Benjamin Poulain  <bpoulain@apple.com>
793
794         Add a single character cache to WidthCache
795         https://bugs.webkit.org/show_bug.cgi?id=112084
796
797         Reviewed by Geoffrey Garen.
798
799         More than half of the values stored in WidthCache are values
800         for a single character.
801
802         Previously, we were creating a new SmallStringKey for each one of
803         them, causing a lot of extra memory operations even for the simple
804         cases.
805
806         This patch adds a second map, m_singleCharMap, to simplify the
807         computation for the common case of a single char TextRun.
808
809         * platform/graphics/WidthCache.h:
810         (WebCore::WidthCache::clear):
811         (WidthCache):
812         (WebCore::WidthCache::addSlowCase):
813
814 2013-03-12  Philip Rogers  <pdr@google.com>
815
816         Replace static_casts for SVG transformable and locatable elements
817         https://bugs.webkit.org/show_bug.cgi?id=111651
818
819         Reviewed by Abhishek Arya.
820
821         toSVGStyledTransformableElement and toSVGStyledLocatableElement are preferred over
822         static_casts because bad casts can be caught on our testing infrastructure. This patch
823         replaces all static_casts for SVGStyledTransformableElement and SVGStyledLocatableElement
824         with toSVGStyledTransformableElement and toSVGStyledLocatableElement, respectively.
825
826         No new tests as this is covered with existing tests.
827
828         * rendering/svg/RenderSVGResourceClipper.cpp:
829         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
830         * rendering/svg/RenderSVGResourceContainer.cpp:
831         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
832         * rendering/svg/RenderSVGShape.cpp:
833         (WebCore::RenderSVGShape::updateShapeFromElement):
834         (WebCore::RenderSVGShape::layout):
835         (WebCore::RenderSVGShape::nonScalingStrokeTransform):
836         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
837         * rendering/svg/RenderSVGTransformableContainer.cpp:
838         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
839         * svg/SVGAnimatedLength.cpp:
840         (WebCore::SVGAnimatedLengthAnimator::calculateDistance):
841
842             This was an unnecessary cast and has been removed.
843
844         * svg/SVGElement.cpp:
845         (WebCore::SVGElement::getBoundingBox):
846         * svg/SVGLocatable.cpp:
847         (WebCore::SVGLocatable::getTransformToElement):
848         * svg/SVGStyledLocatableElement.h:
849         (WebCore):
850         (WebCore::toSVGStyledLocatableElement):
851         * svg/SVGStyledTransformableElement.h:
852         (WebCore):
853         (WebCore::toSVGStyledTransformableElement):
854
855             It makes the code cleaner to pass Node* in here, rather than converting the Node*
856             to an SVGElement* before calling this function. The same was not necessary for
857             SVGStyledLocatable.
858
859         * svg/SVGSVGElement.h:
860         (WebCore):
861         (WebCore::toSVGSVGElement):
862
863             This code has been cleaned up. During the review of this patch, a similar cleanup
864             was done in toSVGStyledTransformableElement.
865
866         * svg/SVGUseElement.cpp:
867         (WebCore::SVGUseElement::toClipPath):
868
869 2013-03-12  Abhishek Arya  <inferno@chromium.org>
870
871         Replace static_casts with to* helper functions.
872         https://bugs.webkit.org/show_bug.cgi?id=112164
873
874         Reviewed by Philip Rogers.
875
876         to* helper functions are preferred over static_cast calls since they
877         help to catch bad casts easily on the testing infrastructure.
878
879         * css/ElementRuleCollector.cpp:
880         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
881         * platform/gtk/PasteboardGtk.cpp:
882         (WebCore::getURLForImageNode):
883         (WebCore::Pasteboard::writeImage):
884         * platform/gtk/RenderThemeGtk.cpp:
885         (WebCore::getMediaElementFromRenderObject):
886         * platform/qt/RenderThemeQtMobile.cpp:
887         (WebCore::RenderThemeQtMobile::checkMultiple):
888         * rendering/HitTestResult.cpp:
889         (WebCore::HitTestResult::title):
890         (WebCore::HitTestResult::absoluteImageURL):
891         (WebCore::HitTestResult::absolutePDFURL):
892         * rendering/RenderLayer.cpp:
893         (WebCore::RenderLayer::resize):
894         (WebCore::RenderLayer::hitTest):
895         * rendering/RenderMenuList.cpp:
896         (WebCore::RenderMenuList::valueChanged):
897         * rendering/RenderObject.cpp:
898         (WebCore::RenderObject::addPDFURLRect):
899         * rendering/RenderPart.cpp:
900         (WebCore::RenderPart::requiresAcceleratedCompositing):
901         * rendering/RenderRegion.cpp:
902         (WebCore::RenderRegion::checkRegionStyle):
903         * rendering/RenderTableCell.cpp:
904         (WebCore::RenderTableCell::computePreferredLogicalWidths):
905         * rendering/RenderTheme.cpp:
906         (WebCore::RenderTheme::isEnabled):
907         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
908         (WebCore::RenderTheme::isHovered):
909         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
910         (WebCore::RenderTheme::paintSliderTicks):
911         * rendering/RenderThemeWinCE.cpp:
912         (WebCore::mediaElementParent):
913         * rendering/RenderTreeAsText.cpp:
914         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
915         (WebCore::RenderTreeAsText::writeRenderObject):
916         (WebCore::writeRenderRegionList):
917         * rendering/svg/SVGRenderTreeAsText.cpp:
918         (WebCore::writeSVGResourceContainer):
919
920 2013-03-12  Geoffrey Garen  <ggaren@apple.com>
921
922         Moved RunLoopTimer and SchedulePair to WTF
923         https://bugs.webkit.org/show_bug.cgi?id=112171
924
925         Reviewed by Oliver Hunt.
926
927         This will allow us to use timers in lower level primitives without
928         duplicating all the code.
929
930         * WebCore.exp.in:
931         * WebCore.xcodeproj/project.pbxproj:
932         * loader/DocumentLoader.h:
933         (WTF):
934         (WebCore):
935         (DocumentLoader):
936         * loader/MainResourceLoader.h:
937         * page/Page.h:
938         * platform/AutodrainedPool.h: Removed.
939         * platform/cf/RunLoopTimerCF.cpp: Removed.
940         * platform/cf/SchedulePair.cpp: Removed.
941         * platform/cf/SchedulePair.h: Removed.
942         * platform/mac/AutodrainedPool.mm: Removed.
943         * platform/mac/SchedulePairMac.mm: Removed.
944         * platform/network/NetworkingContext.h:
945         * platform/network/ResourceHandle.h:
946         (WTF):
947         (WebCore):
948         (ResourceHandle):
949         * platform/network/cf/FormDataStreamCFNet.cpp:
950         * platform/network/mac/ResourceHandleMac.mm:
951
952 2013-03-12  Christian Biesinger  <cbiesinger@chromium.org>
953
954         Mac: Incorrect rendering of <audio> controls
955         https://bugs.webkit.org/show_bug.cgi?id=110913
956
957         Reviewed by Tony Chang.
958
959         Covered by existing tests under media/.
960
961         * css/mediaControls.css:
962         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
963         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
964         The timeline container and the timeline need min-width: 0 so that they can shrink if needed.
965         * css/mediaControlsQuickTime.css:
966         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
967         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
968         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
969         The timeline container also needs flex-start to ensure that it never overlaps
970         the play/rewind buttons. The current-time and remaining-time displays need min-width: 0 so that the hack
971         in RenderMediaControls.cpp works correctly - otherwise, RenderFlexibleBox tries to use the preferred width
972         of the time displays, which is wrong when they try to hide themselves.
973
974 2013-03-12  Alexey Proskuryakov  <ap@apple.com>
975
976         Improve logging in ResourceHandleMac.mm
977         https://bugs.webkit.org/show_bug.cgi?id=112185
978
979         Reviewed by Brady Eidson.
980
981         * platform/network/mac/ResourceHandleMac.mm:
982         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Removed an obsolete #if.
983         (WebCore::ResourceHandle::receivedCredential):
984         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
985         (WebCore::ResourceHandle::receivedCancellation):
986         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]): Added a FIXME.
987         (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
988
989         * platform/network/mac/ResourceResponseMac.mm: Removed an unneeded include.
990
991 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
992
993         Unreviewed, rolling out r145554.
994         http://trac.webkit.org/changeset/145554
995         https://bugs.webkit.org/show_bug.cgi?id=112182
996
997         Breaks several extension browser tests (see bug for details)
998         (Requested by jamesr on #webkit).
999
1000         * bindings/scripts/CodeGeneratorV8.pm:
1001         (GenerateHeader):
1002         (GenerateDomainSafeFunctionGetter):
1003         (GenerateImplementation):
1004         (CreateCustomSignature):
1005         * bindings/scripts/test/V8/V8Float64Array.cpp:
1006         (WebCore::ConfigureV8Float64ArrayTemplate):
1007         (WebCore::V8Float64Array::GetTemplate):
1008         (WebCore::V8Float64Array::HasInstance):
1009         * bindings/scripts/test/V8/V8Float64Array.h:
1010         (V8Float64Array):
1011         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1012         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1013         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
1014         (WebCore::V8TestActiveDOMObject::GetTemplate):
1015         (WebCore::V8TestActiveDOMObject::HasInstance):
1016         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1017         (V8TestActiveDOMObject):
1018         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1019         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1020         (WebCore::V8TestCustomNamedGetter::HasInstance):
1021         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1022         (V8TestCustomNamedGetter):
1023         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1024         (WebCore::V8TestEventConstructor::GetTemplate):
1025         (WebCore::V8TestEventConstructor::HasInstance):
1026         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1027         (V8TestEventConstructor):
1028         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1029         (WebCore::ConfigureV8TestEventTargetTemplate):
1030         (WebCore::V8TestEventTarget::GetTemplate):
1031         (WebCore::V8TestEventTarget::HasInstance):
1032         * bindings/scripts/test/V8/V8TestEventTarget.h:
1033         (V8TestEventTarget):
1034         * bindings/scripts/test/V8/V8TestException.cpp:
1035         (WebCore::V8TestException::GetTemplate):
1036         (WebCore::V8TestException::HasInstance):
1037         * bindings/scripts/test/V8/V8TestException.h:
1038         (V8TestException):
1039         * bindings/scripts/test/V8/V8TestInterface.cpp:
1040         (WebCore::ConfigureV8TestInterfaceTemplate):
1041         (WebCore::V8TestInterface::GetTemplate):
1042         (WebCore::V8TestInterface::HasInstance):
1043         * bindings/scripts/test/V8/V8TestInterface.h:
1044         (V8TestInterface):
1045         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1046         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1047         (WebCore::V8TestMediaQueryListListener::HasInstance):
1048         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1049         (V8TestMediaQueryListListener):
1050         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1051         (WebCore::V8TestNamedConstructor::GetTemplate):
1052         (WebCore::V8TestNamedConstructor::HasInstance):
1053         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1054         (V8TestNamedConstructor):
1055         * bindings/scripts/test/V8/V8TestNode.cpp:
1056         (WebCore::V8TestNode::GetTemplate):
1057         (WebCore::V8TestNode::HasInstance):
1058         * bindings/scripts/test/V8/V8TestNode.h:
1059         (V8TestNode):
1060         * bindings/scripts/test/V8/V8TestObj.cpp:
1061         (WebCore::ConfigureV8TestObjTemplate):
1062         (WebCore::V8TestObj::GetTemplate):
1063         (WebCore::V8TestObj::HasInstance):
1064         * bindings/scripts/test/V8/V8TestObj.h:
1065         (V8TestObj):
1066         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1067         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1068         (WebCore::V8TestOverloadedConstructors::HasInstance):
1069         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1070         (V8TestOverloadedConstructors):
1071         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1072         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1073         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
1074         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1075         (V8TestSerializedScriptValueInterface):
1076         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1077         (WebCore::ConfigureV8TestTypedefsTemplate):
1078         (WebCore::V8TestTypedefs::GetTemplate):
1079         (WebCore::V8TestTypedefs::HasInstance):
1080         * bindings/scripts/test/V8/V8TestTypedefs.h:
1081         (V8TestTypedefs):
1082         * bindings/v8/V8AdaptorFunction.cpp:
1083         (WebCore::V8AdaptorFunction::getTemplate):
1084         * bindings/v8/V8GCController.cpp:
1085         * bindings/v8/V8PerIsolateData.cpp:
1086         (WebCore::V8PerIsolateData::reportMemoryUsage):
1087         (WebCore::V8PerIsolateData::privateTemplate):
1088         (WebCore::V8PerIsolateData::rawTemplate):
1089         (WebCore::V8PerIsolateData::hasInstance):
1090         * bindings/v8/V8PerIsolateData.h:
1091         (WebCore::V8PerIsolateData::rawTemplateMap):
1092         (WebCore::V8PerIsolateData::templateMap):
1093         (V8PerIsolateData):
1094         * bindings/v8/WrapperTypeInfo.h:
1095         * bindings/v8/custom/V8LocationCustom.cpp:
1096         (WebCore::V8Location::reloadAttrGetterCustom):
1097         (WebCore::V8Location::replaceAttrGetterCustom):
1098         (WebCore::V8Location::assignAttrGetterCustom):
1099         * bindings/v8/custom/V8NodeListCustom.cpp:
1100         (WebCore::V8NodeList::opaqueRootForGC):
1101
1102 2013-03-12  Gavin Peters  <gavinp@chromium.org>
1103
1104         [chromium] Use lipo(1) rather than file(1) to list library architectures.
1105         https://bugs.webkit.org/show_bug.cgi?id=111147
1106
1107         Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
1108         the architecture list of a library with an invocation of lipo(1), which should be more
1109         stable.
1110
1111         Reviewed by Nico Weber.
1112
1113         No new tests, since adjust_visibility.sh doesn't have a test.
1114
1115         * WebCore.gyp/mac/adjust_visibility.sh:
1116
1117 2013-03-12  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
1118
1119         Webkit unable to show gifs with applcation extension string shorter than 11 bytes
1120         https://bugs.webkit.org/show_bug.cgi?id=110620
1121
1122         Reviewed by Laszlo Gombos.
1123
1124         Use actual block size for gifs application extension string even if it is below 11 bytes 
1125         to be able to decode this kind of gifs.
1126
1127         Test: fast/images/gif-short-app-extension-string.html
1128
1129         * platform/image-decoders/gif/GIFImageReader.cpp:
1130         (GIFImageReader::decodeInternal):
1131
1132 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1133
1134         Unreviewed, rolling out r145277.
1135         http://trac.webkit.org/changeset/145277
1136         https://bugs.webkit.org/show_bug.cgi?id=112170
1137
1138         chromium-gpu and android testers are seeing failures/crashes
1139         relating to this code (Requested by eseidel on #webkit).
1140
1141         * html/parser/BackgroundHTMLInputStream.cpp:
1142         (WebCore::BackgroundHTMLInputStream::rewindTo):
1143         * html/parser/BackgroundHTMLInputStream.h:
1144         (BackgroundHTMLInputStream):
1145         (Checkpoint):
1146         * html/parser/BackgroundHTMLParser.cpp:
1147         * html/parser/BackgroundHTMLParser.h:
1148         (BackgroundHTMLParser):
1149         * html/parser/HTMLDocumentParser.cpp:
1150         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1151
1152 2013-03-12  Simon Fraser  <simon.fraser@apple.com>
1153
1154         Keep track of the number of GraphicsLayers with tiled backing in RenderLayerCompositor
1155         https://bugs.webkit.org/show_bug.cgi?id=112083
1156
1157         Reviewed by Dean Jackson.
1158
1159         Have RenderLayerCompositor keep track of how many of its GraphicsLayers use TiledBacking.
1160         This is useful for platforms to decide whether it's necessary to force GraphicsLayer flushes
1161         to update the visibleRect of those TiledBackings.
1162         
1163         GraphicsLayers are always created without TiledBacking. There are two
1164         ways the count can change:
1165         1. A GraphicsLayerCA toggles into or out of tiled mode. It notifies its
1166            client via a new tiledBackingUsageChanged() callback on GraphicsLayerClient.
1167         2. A tiled GraphicsLayerCA is destroyed. Added a new bottleneck function to
1168            RenderLayerBacking::willDestroyLayer() that is called everywhere we destroy layers.
1169            
1170         The main page TiledBacking is not counted as part of this.
1171         
1172         Also renamed uses of "tiledLayer" to "tiledBacking" in GraphicsLayer[CA].
1173     
1174         * platform/graphics/GraphicsLayer.cpp:
1175         (WebCore::GraphicsLayer::GraphicsLayer):
1176         (WebCore::GraphicsLayer::getDebugBorderInfo):
1177         (WebCore::GraphicsLayer::dumpProperties):
1178         * platform/graphics/GraphicsLayer.h:
1179         (WebCore::GraphicsLayer::usingTiledBacking):
1180         * platform/graphics/GraphicsLayerClient.h:
1181         (WebCore::GraphicsLayerClient::tiledBackingUsageChanged):
1182         * platform/graphics/ca/GraphicsLayerCA.cpp:
1183         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1184         (WebCore::GraphicsLayerCA::updateGeometry):
1185         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
1186         (WebCore::GraphicsLayerCA::updateContentsScale):
1187         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1188         * rendering/RenderLayerBacking.cpp:
1189         (WebCore::RenderLayerBacking::willDestroyLayer):
1190         (WebCore::RenderLayerBacking::tiledBackingUsageChanged):
1191         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
1192         (WebCore::RenderLayerBacking::updateClippingLayers):
1193         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
1194         (WebCore::RenderLayerBacking::updateForegroundLayer):
1195         (WebCore::RenderLayerBacking::updateBackgroundLayer):
1196         (WebCore::RenderLayerBacking::updateMaskLayer):
1197         (WebCore::RenderLayerBacking::updateScrollingLayers):
1198         (WebCore::RenderLayerBacking::compositingLayerType):
1199         * rendering/RenderLayerBacking.h:
1200         * rendering/RenderLayerCompositor.cpp:
1201         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1202         (WebCore::RenderLayerCompositor::layerTiledBackingUsageChanged):
1203         * rendering/RenderLayerCompositor.h:
1204         (WebCore::RenderLayerCompositor::haveNonMainLayersWithTiledBacking):
1205
1206 2013-03-12  Abhishek Arya  <inferno@chromium.org>
1207
1208         Replace static_casts with to* functions.
1209         https://bugs.webkit.org/show_bug.cgi?id=112072
1210
1211         Reviewed by Philip Rogers.
1212
1213         to* functions are preferred over static_cast calls since they
1214         help to catch bad casts easily on the testing infrastructure.
1215
1216         * accessibility/AccessibilityMenuList.cpp:
1217         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
1218         * bindings/objc/DOM.mm:
1219         (kitClass):
1220         * bindings/v8/V8LazyEventListener.cpp:
1221         (WebCore::V8LazyEventListener::prepareListenerObject):
1222         * css/SelectorChecker.cpp:
1223         (WebCore::SelectorChecker::checkOne):
1224         * editing/ApplyStyleCommand.cpp:
1225         (WebCore::isLegacyAppleStyleSpan):
1226         (WebCore::isEmptyFontTag):
1227         (WebCore::ApplyStyleCommand::applyBlockStyle):
1228         * editing/FormatBlockCommand.cpp:
1229         (WebCore::isElementForFormatBlock):
1230         * editing/ReplaceSelectionCommand.cpp:
1231         (WebCore::isMailPasteAsQuotationNode):
1232         (WebCore::haveSameTagName):
1233         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1234         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1235         * history/CachedPage.cpp:
1236         (WebCore::CachedPage::restore):
1237         * html/ColorInputType.cpp:
1238         (WebCore::ColorInputType::suggestions):
1239         * html/HTMLTableRowsCollection.cpp:
1240         (WebCore::isInHead):
1241         (WebCore::isInBody):
1242         (WebCore::isInFoot):
1243         * inspector/DOMPatchSupport.cpp:
1244         (WebCore::DOMPatchSupport::innerPatchNode):
1245         * page/PageSerializer.cpp:
1246         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
1247         * plugins/PluginView.cpp:
1248         (WebCore::PluginView::getValue):
1249         * rendering/RenderEmbeddedObject.cpp:
1250         (WebCore::RenderEmbeddedObject::paintContents):
1251         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1252         * rendering/RenderLayer.cpp:
1253         (WebCore::RenderLayer::name):
1254         * rendering/RenderMedia.cpp:
1255         (WebCore::RenderMedia::mediaElement):
1256         * rendering/RenderSearchField.cpp:
1257         (WebCore::RenderSearchField::autosaveName):
1258         * rendering/RenderTextControl.cpp:
1259         (WebCore::RenderTextControl::textFormControlElement):
1260         (WebCore::updateUserModifyProperty):
1261         * rendering/mathml/RenderMathMLFenced.cpp:
1262         (WebCore::RenderMathMLFenced::updateFromElement):
1263         * rendering/mathml/RenderMathMLFraction.cpp:
1264         (WebCore::RenderMathMLFraction::updateFromElement):
1265         * xml/parser/XMLDocumentParserLibxml2.cpp:
1266         (WebCore::XMLDocumentParser::XMLDocumentParser):
1267         (WebCore::XMLDocumentParser::endElementNs):
1268
1269 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
1270
1271         [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles
1272         https://bugs.webkit.org/show_bug.cgi?id=112163
1273
1274         Reviewed by Martin Robinson.
1275
1276         No new tests - no new functionality, merely a cleanup.
1277
1278         * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for
1279         references to HILDON_CPPFLAGS and HILDON_CFLAGS.
1280
1281 2013-03-12  Pavel Feldman  <pfeldman@chromium.org>
1282
1283         Not reviewed: removing GtkVersioning from chromium targets.
1284
1285         * WebCore.gypi:
1286
1287 2013-03-12  Marja Hölttä  <marja@chromium.org>
1288
1289         [V8] Store main world and non-main world templates separately.
1290         https://bugs.webkit.org/show_bug.cgi?id=111724
1291
1292         Reviewed by Jochen Eisinger.
1293
1294         This is needed for generating specialized bindings for the main
1295         world (bug 110874).
1296
1297         No new tests (updated existing bindings tests).
1298
1299         * bindings/scripts/CodeGeneratorV8.pm:
1300         (GenerateHeader):
1301         (GenerateDomainSafeFunctionGetter):
1302         (GenerateImplementation):
1303         (CreateCustomSignature):
1304         * bindings/scripts/test/V8/V8Float64Array.cpp:
1305         (WebCore::ConfigureV8Float64ArrayTemplate):
1306         (WebCore::V8Float64Array::GetTemplate):
1307         (WebCore::V8Float64Array::HasInstance):
1308         * bindings/scripts/test/V8/V8Float64Array.h:
1309         (V8Float64Array):
1310         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1311         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1312         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
1313         (WebCore::V8TestActiveDOMObject::GetTemplate):
1314         (WebCore::V8TestActiveDOMObject::HasInstance):
1315         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1316         (V8TestActiveDOMObject):
1317         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1318         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1319         (WebCore::V8TestCustomNamedGetter::HasInstance):
1320         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1321         (V8TestCustomNamedGetter):
1322         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1323         (WebCore::V8TestEventConstructor::GetTemplate):
1324         (WebCore::V8TestEventConstructor::HasInstance):
1325         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1326         (V8TestEventConstructor):
1327         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1328         (WebCore::ConfigureV8TestEventTargetTemplate):
1329         (WebCore::V8TestEventTarget::GetTemplate):
1330         (WebCore::V8TestEventTarget::HasInstance):
1331         * bindings/scripts/test/V8/V8TestEventTarget.h:
1332         (V8TestEventTarget):
1333         * bindings/scripts/test/V8/V8TestException.cpp:
1334         (WebCore::V8TestException::GetTemplate):
1335         (WebCore::V8TestException::HasInstance):
1336         * bindings/scripts/test/V8/V8TestException.h:
1337         (V8TestException):
1338         * bindings/scripts/test/V8/V8TestInterface.cpp:
1339         (WebCore::ConfigureV8TestInterfaceTemplate):
1340         (WebCore::V8TestInterface::GetTemplate):
1341         (WebCore::V8TestInterface::HasInstance):
1342         * bindings/scripts/test/V8/V8TestInterface.h:
1343         (V8TestInterface):
1344         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1345         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1346         (WebCore::V8TestMediaQueryListListener::HasInstance):
1347         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1348         (V8TestMediaQueryListListener):
1349         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1350         (WebCore::V8TestNamedConstructor::GetTemplate):
1351         (WebCore::V8TestNamedConstructor::HasInstance):
1352         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1353         (V8TestNamedConstructor):
1354         * bindings/scripts/test/V8/V8TestNode.cpp:
1355         (WebCore::V8TestNode::GetTemplate):
1356         (WebCore::V8TestNode::HasInstance):
1357         * bindings/scripts/test/V8/V8TestNode.h:
1358         (V8TestNode):
1359         * bindings/scripts/test/V8/V8TestObj.cpp:
1360         (WebCore::ConfigureV8TestObjTemplate):
1361         (WebCore::V8TestObj::GetTemplate):
1362         (WebCore::V8TestObj::HasInstance):
1363         * bindings/scripts/test/V8/V8TestObj.h:
1364         (V8TestObj):
1365         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1366         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1367         (WebCore::V8TestOverloadedConstructors::HasInstance):
1368         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1369         (V8TestOverloadedConstructors):
1370         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1371         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1372         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
1373         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1374         (V8TestSerializedScriptValueInterface):
1375         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1376         (WebCore::ConfigureV8TestTypedefsTemplate):
1377         (WebCore::V8TestTypedefs::GetTemplate):
1378         (WebCore::V8TestTypedefs::HasInstance):
1379         * bindings/scripts/test/V8/V8TestTypedefs.h:
1380         (V8TestTypedefs):
1381         * bindings/v8/V8AdaptorFunction.cpp:
1382         (WebCore::V8AdaptorFunction::getTemplate):
1383         * bindings/v8/V8GCController.cpp:
1384         * bindings/v8/V8PerIsolateData.cpp:
1385         (WebCore::V8PerIsolateData::reportMemoryUsage):
1386         (WebCore::V8PerIsolateData::privateTemplate):
1387         (WebCore::V8PerIsolateData::rawTemplate):
1388         (WebCore::V8PerIsolateData::hasInstance):
1389         * bindings/v8/V8PerIsolateData.h:
1390         (WebCore::V8PerIsolateData::rawTemplateMap):
1391         (V8PerIsolateData):
1392         (WebCore::V8PerIsolateData::templateMap):
1393         * bindings/v8/WrapperTypeInfo.h:
1394         * bindings/v8/custom/V8LocationCustom.cpp:
1395         (WebCore::V8Location::reloadAttrGetterCustom):
1396         (WebCore::V8Location::replaceAttrGetterCustom):
1397         (WebCore::V8Location::assignAttrGetterCustom):
1398
1399 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
1400
1401         [GTK] Set up the libPlatformGtk.la library
1402         https://bugs.webkit.org/show_bug.cgi?id=111738
1403
1404         Reviewed by Martin Robinson.
1405
1406         No new tests - no new functionality.
1407
1408         * GNUmakefile.am: Reference platformgtk_cppflags, platformgtk_sources variables along with webcoregtk_cppflags, webcoregtk_sources variables.
1409         * GNUmakefile.list.am: Removing GtkVersioning.c and GtkVersioning.h from the sources list, these files have been moved under Source/Platform.
1410         * bindings/gobject/GNUmakefile.am: Ditto on the platformgtk_* variables.
1411
1412 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1413
1414         [BlackBerry] Image,ImageBuffer: add missing parameters to methods
1415         https://bugs.webkit.org/show_bug.cgi?id=112148
1416
1417         Reviewed by Rob Buis.
1418
1419         BitmapImage::draw(), Image::drawPattern() and ImageBuffer::draw()
1420         have a BlendMode parameter since r137011.
1421
1422         ImageBuffer::copyImage() has a ScaleBehavior parameter since r134100.
1423
1424         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1425         (WebCore::BitmapImage::draw):
1426         (WebCore::Image::drawPattern):
1427         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
1428         (WebCore::ImageBuffer::copyImage):
1429         (WebCore::ImageBuffer::draw):
1430
1431 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1432
1433         [BlackBerry] MediaPlayerPrivate: fix call to MediaStreamDescriptor::label()
1434         https://bugs.webkit.org/show_bug.cgi?id=112140
1435
1436         Reviewed by Rob Buis.
1437
1438         MediaStreamDescriptor::id() was renamed to MediaStreamDescriptor::label() in r139352.
1439
1440         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1441         (WebCore::toWebMediaStreamDescriptor):
1442
1443 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
1444
1445         Web Inspector: [REGRESSION] StepInto (F11) and StepOut (Shift-F11) shortcuts toggle Inspector window full-screen state
1446         https://bugs.webkit.org/show_bug.cgi?id=112113
1447
1448         Reviewed by Alexander Pavlov.
1449
1450         Updated handlers missed in first patch. Added JSDocs to all handlers.
1451
1452         * inspector/front-end/Panel.js: Fixed JSDocs.
1453         * inspector/front-end/CallStackSidebarPane.js:
1454         Added return values. Added JSDocs.
1455         * inspector/front-end/ScriptsPanel.js: Ditto.
1456         * inspector/front-end/GoToLineDialog.js: Added JSDocs.
1457         * inspector/front-end/TimelinePanel.js: Ditto.
1458
1459 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1460
1461         [BlackBerry] DisplayRefreshMonitor: rename m_timestamp back to m_monotonicAnimationStartTime
1462         https://bugs.webkit.org/show_bug.cgi?id=112139
1463
1464         Reviewed by Rob Buis.
1465
1466         This changed in r131131, but it was accidentally renamed back in r144465.
1467
1468         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
1469         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1470
1471 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1472
1473         [BlackBerry] FontPlatformData: HarfBuzz renaming
1474         https://bugs.webkit.org/show_bug.cgi?id=112142
1475
1476         Reviewed by Rob Buis.
1477
1478         When the old HarfBuzz code was removed in r141291,
1479         HarfBuzzNGFace.h was renamed to HarfBuzzFace.h and m_harfbuzzFace
1480         was renamed to m_harfBuzzFace.
1481
1482         These changes need to be reflected in the BlackBerry port.
1483
1484         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
1485         (WebCore::FontPlatformData::FontPlatformData):
1486         (WebCore::FontPlatformData::platformDataInit):
1487         (WebCore::FontPlatformData::platformDataAssign):
1488         (WebCore::FontPlatformData::harfBuzzFace):
1489
1490 2013-03-12  Alberto Garcia  <agarcia@igalia.com>
1491
1492         [BlackBerry] FontCacheBlackBerry: return PassRefPtr<SimpleFontData>
1493         https://bugs.webkit.org/show_bug.cgi?id=112022
1494
1495         Reviewed by Rob Buis.
1496
1497         FontData functions return PassRefPtr since r130160.
1498
1499         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1500         (WebCore::FontCache::getFontDataForCharacters):
1501         (WebCore::FontCache::getSimilarFontPlatformData):
1502         (WebCore::FontCache::getLastResortFallbackFont):
1503         * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
1504         (WebCore::SimpleFontData::createScaledFontData):
1505
1506 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1507
1508         Web Inspector: Fix checkContentUpdated behavior in UISourceCode.
1509         https://bugs.webkit.org/show_bug.cgi?id=112037
1510
1511         Reviewed by Alexander Pavlov.
1512
1513         UISourceCode.checkContentUpdated now saves last updated content that was loaded and rejected
1514         by user on the per-file basis (only the last one was saved currently).
1515
1516         * inspector/front-end/FileSystemProjectDelegate.js:
1517         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1518         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1519         (WebInspector.FileSystemProjectDelegate.prototype.canSetFileContent):
1520         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
1521         * inspector/front-end/SimpleWorkspaceProvider.js:
1522         (WebInspector.SimpleProjectDelegate.prototype.canSetFileContent):
1523         * inspector/front-end/UISourceCode.js:
1524         (WebInspector.UISourceCode.prototype.checkContentUpdated.contentLoaded):
1525         (WebInspector.UISourceCode.prototype.checkContentUpdated):
1526         (WebInspector.UISourceCode.prototype._commitContent):
1527         (WebInspector.UISourceCode.prototype.addRevision):
1528         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
1529         * inspector/front-end/Workspace.js:
1530         (WebInspector.ProjectDelegate.prototype.canSetFileContent):
1531         (WebInspector.Project.prototype.canSetFileContent):
1532
1533 2013-03-12  Tomas Popela  <tpopela@redhat.com>
1534
1535         [Gtk] NBSP are not replaced when using X clipboard
1536         https://bugs.webkit.org/show_bug.cgi?id=112118
1537
1538         Reviewed by Martin Robinson.
1539
1540         We're not replacing nbsp with spaces when using X clipboard
1541         (Shift+Insert or middle mouse button).
1542
1543         * platform/gtk/DataObjectGtk.cpp:
1544         (WebCore::DataObjectGtk::text):
1545
1546 2013-03-12  Florin Malita  <fmalita@chromium.org>
1547
1548         SVG Pattern pixelated on inline SVG with CSS transforms
1549         https://bugs.webkit.org/show_bug.cgi?id=111587
1550
1551         Reviewed by Dirk Schulze.
1552
1553         When calculating the resolution for resource image buffers, we need to also consider CSS
1554         transforms. This patch updates calculateTransformationToOutermostSVGCoordinateSystem()
1555         (renamed to calculateTransformationToOutermostCoordinateSystem) to include the affine
1556         component from CSS transforms by walking the parent layer tree.        
1557
1558         Test: svg/custom/resources-css-scaled.html
1559
1560         * rendering/svg/RenderSVGResourceClipper.cpp:
1561         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1562         * rendering/svg/RenderSVGResourceFilter.cpp:
1563         (WebCore::RenderSVGResourceFilter::applyResource):
1564         * rendering/svg/RenderSVGResourceGradient.cpp:
1565         (WebCore::createMaskAndSwapContextForTextGradient):
1566         (WebCore::clipToTextMask):
1567         * rendering/svg/RenderSVGResourceMasker.cpp:
1568         (WebCore::RenderSVGResourceMasker::applyResource):
1569         * rendering/svg/RenderSVGResourcePattern.cpp:
1570         (WebCore::RenderSVGResourcePattern::buildPattern):
1571         * rendering/svg/SVGRenderingContext.cpp:
1572         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
1573         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
1574         * rendering/svg/SVGRenderingContext.h:
1575         (SVGRenderingContext):
1576
1577 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
1578
1579         Web Inspector: add html canvas memory details to the native memory overview
1580         https://bugs.webkit.org/show_bug.cgi?id=112123
1581
1582         Reviewed by Alexander Pavlov.
1583
1584         Show memory occupied vby HTMLCanvasElements under Image category
1585         in the native memory overview.
1586
1587         * inspector/front-end/NativeHeapSnapshot.js:
1588         (WebInspector.NativeHeapSnapshot.prototype.images.getImageName):
1589         (WebInspector.NativeHeapSnapshot.prototype.images.getCanvasName):
1590         (WebInspector.NativeHeapSnapshot.prototype.images):
1591         (WebInspector.NativeHeapSnapshot.prototype._addNodes):
1592
1593 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1594
1595         Web Inspector: ResourceScriptFile diverged state should be correctly reset after debugger reset.
1596         https://bugs.webkit.org/show_bug.cgi?id=112036
1597
1598         Reviewed by Alexander Pavlov.
1599
1600         * inspector/front-end/ResourceScriptMapping.js:
1601         (WebInspector.ResourceScriptFile):
1602         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
1603         (WebInspector.ResourceScriptFile.prototype._maybeDirtyChanged):
1604
1605 2013-03-12  Marja Hölttä  <marja@chromium.org>
1606
1607         [V8] Move the GetRawTemplate and HasInstance logic from generated bindings to V8PerIsolateData
1608         https://bugs.webkit.org/show_bug.cgi?id=112136
1609
1610         Reviewed by Kentaro Hara.
1611
1612         When templates for main world and non-main worlds will be separated (bug
1613         111724), HasInstance logic will be a bit ugly: We cannot determine the
1614         world type on the fly, because during GC there is no entered context,
1615         and HasInstance is called during GC. So we need to check against
1616         templates from all the worlds. It's cleaner if that logic is in
1617         V8PerIsolateData.
1618
1619         No new tests (Updated existing bindings tests).
1620
1621         * bindings/scripts/CodeGeneratorV8.pm:
1622         (GenerateHeader):
1623         (GenerateDomainSafeFunctionGetter):
1624         (GenerateImplementation):
1625         (CreateCustomSignature):
1626         * bindings/scripts/test/V8/V8Float64Array.cpp:
1627         (WebCore::ConfigureV8Float64ArrayTemplate):
1628         (WebCore::V8Float64Array::GetTemplate):
1629         (WebCore::V8Float64Array::HasInstance):
1630         * bindings/scripts/test/V8/V8Float64Array.h:
1631         (V8Float64Array):
1632         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1633         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1634         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
1635         (WebCore::V8TestActiveDOMObject::GetTemplate):
1636         (WebCore::V8TestActiveDOMObject::HasInstance):
1637         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1638         (V8TestActiveDOMObject):
1639         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1640         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1641         (WebCore::V8TestCustomNamedGetter::HasInstance):
1642         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1643         (V8TestCustomNamedGetter):
1644         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1645         (WebCore::V8TestEventConstructor::GetTemplate):
1646         (WebCore::V8TestEventConstructor::HasInstance):
1647         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1648         (V8TestEventConstructor):
1649         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1650         (WebCore::ConfigureV8TestEventTargetTemplate):
1651         (WebCore::V8TestEventTarget::GetTemplate):
1652         (WebCore::V8TestEventTarget::HasInstance):
1653         * bindings/scripts/test/V8/V8TestEventTarget.h:
1654         (V8TestEventTarget):
1655         * bindings/scripts/test/V8/V8TestException.cpp:
1656         (WebCore::V8TestException::GetTemplate):
1657         (WebCore::V8TestException::HasInstance):
1658         * bindings/scripts/test/V8/V8TestException.h:
1659         (V8TestException):
1660         * bindings/scripts/test/V8/V8TestInterface.cpp:
1661         (WebCore::ConfigureV8TestInterfaceTemplate):
1662         (WebCore::V8TestInterface::GetTemplate):
1663         (WebCore::V8TestInterface::HasInstance):
1664         * bindings/scripts/test/V8/V8TestInterface.h:
1665         (V8TestInterface):
1666         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1667         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1668         (WebCore::V8TestMediaQueryListListener::HasInstance):
1669         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1670         (V8TestMediaQueryListListener):
1671         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1672         (WebCore::V8TestNamedConstructor::GetTemplate):
1673         (WebCore::V8TestNamedConstructor::HasInstance):
1674         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1675         (V8TestNamedConstructor):
1676         * bindings/scripts/test/V8/V8TestNode.cpp:
1677         (WebCore::V8TestNode::GetTemplate):
1678         (WebCore::V8TestNode::HasInstance):
1679         * bindings/scripts/test/V8/V8TestNode.h:
1680         (V8TestNode):
1681         * bindings/scripts/test/V8/V8TestObj.cpp:
1682         (WebCore::ConfigureV8TestObjTemplate):
1683         (WebCore::V8TestObj::GetTemplate):
1684         (WebCore::V8TestObj::HasInstance):
1685         * bindings/scripts/test/V8/V8TestObj.h:
1686         (V8TestObj):
1687         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1688         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1689         (WebCore::V8TestOverloadedConstructors::HasInstance):
1690         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1691         (V8TestOverloadedConstructors):
1692         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1693         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1694         (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
1695         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1696         (V8TestSerializedScriptValueInterface):
1697         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
1698         (WebCore::ConfigureV8TestTypedefsTemplate):
1699         (WebCore::V8TestTypedefs::GetTemplate):
1700         (WebCore::V8TestTypedefs::HasInstance):
1701         * bindings/scripts/test/V8/V8TestTypedefs.h:
1702         (V8TestTypedefs):
1703         * bindings/v8/V8PerIsolateData.cpp:
1704         (WebCore::V8PerIsolateData::rawTemplate):
1705         (WebCore):
1706         (WebCore::V8PerIsolateData::hasInstance):
1707         * bindings/v8/V8PerIsolateData.h:
1708         (V8PerIsolateData):
1709         * bindings/v8/custom/V8LocationCustom.cpp:
1710         (WebCore::V8Location::reloadAttrGetterCustom):
1711         (WebCore::V8Location::replaceAttrGetterCustom):
1712         (WebCore::V8Location::assignAttrGetterCustom):
1713
1714 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
1715
1716         Web Inspector: Fix JSDocs in TimelinePanel.js
1717         https://bugs.webkit.org/show_bug.cgi?id=112137
1718
1719         Reviewed by Vsevolod Vlasov.
1720
1721         Fix parameter type annotation of _loadFromFile.
1722
1723         * inspector/front-end/TimelinePanel.js: Fixed JSDoc.
1724
1725 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1726
1727         Web Inspector: Add a test for Workspace add/removeMapping methods.
1728         https://bugs.webkit.org/show_bug.cgi?id=112035
1729
1730         Reviewed by Alexander Pavlov.
1731
1732         Test: inspector/debugger/file-system-project-mapping.html
1733
1734         * inspector/front-end/ScriptsPanel.js:
1735         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
1736         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
1737         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
1738         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
1739         * inspector/front-end/Workspace.js:
1740         (WebInspector.Project.prototype._fileAdded):
1741         (WebInspector.Workspace.prototype.addMapping):
1742
1743 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1744
1745         Web Inspector: SourceFrames are leaking on reload.
1746         https://bugs.webkit.org/show_bug.cgi?id=111961
1747
1748         Reviewed by Alexander Pavlov.
1749
1750         Added dispose method on UISourceCodeFrame.
1751         Scripts panel now calls dispose when SourceFrame is removed and JavaScriptSourceFrame
1752         could remove breakpoint manager listeners in it.
1753         TabbedEditorContainer does not call viewForFile other than in appendFileTab methods to 
1754         avoid recreating SourceFrame for uiSourceCode when it was already removed.
1755
1756         Test: inspector/debugger/breakpoint-manager-listeners-count.html
1757
1758         * inspector/front-end/JavaScriptSourceFrame.js:
1759         (WebInspector.JavaScriptSourceFrame.prototype.dispose):
1760         * inspector/front-end/ScriptsPanel.js:
1761         * inspector/front-end/TabbedEditorContainer.js:
1762         (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners):
1763         (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners):
1764         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
1765         * inspector/front-end/UISourceCodeFrame.js:
1766         (WebInspector.UISourceCodeFrame.prototype.dispose):
1767
1768 2013-03-12  Alexander Pavlov  <apavlov@chromium.org>
1769
1770         Web Inspector: [Elements] Unable to undo "Edit as HTML" changes in the editor
1771         https://bugs.webkit.org/show_bug.cgi?id=112119
1772
1773         Reviewed by Vsevolod Vlasov.
1774
1775         No new tests, a UI change.
1776
1777         * inspector/front-end/ElementsPanel.js:
1778         (WebInspector.ElementsPanel.prototype.handleShortcut): Do not undo/redo DOM/CSS changes if editing DOM text.
1779         * inspector/front-end/ElementsTreeOutline.js:
1780         (WebInspector.ElementsTreeOutline.prototype.editing): Added.
1781
1782 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
1783
1784         Web Inspector: [CodeMirror] there are bugs in TokenHighlight feature
1785         https://bugs.webkit.org/show_bug.cgi?id=112039
1786
1787         Reviewed by Vsevolod Vlasov.
1788
1789         Fix token highlight in codeMirror experiment
1790         - rewrite token highlight overlay mode to highlight words, not
1791         substrings
1792         - add workaround to avoid selection of already selected word
1793
1794         No new tests.
1795
1796         * inspector/front-end/CodeMirrorTextEditor.js:
1797         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
1798         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
1799         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype.nextToken):
1800         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
1801         * inspector/front-end/cm/cmdevtools.css:
1802         (.line-with-selection .cm-column-with-selection):
1803
1804 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1805
1806         Unreviewed, rolling out r145514.
1807         http://trac.webkit.org/changeset/145514
1808         https://bugs.webkit.org/show_bug.cgi?id=112134
1809
1810         breaks Mac build (Requested by falken on #webkit).
1811
1812         * dom/Element.cpp:
1813         * dom/Element.h:
1814         * dom/EventDispatcher.cpp:
1815         (WebCore::EventDispatcher::dispatchSimulatedClick):
1816         * dom/GestureEvent.cpp:
1817         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1818         * dom/MouseEvent.cpp:
1819         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1820         * dom/Node.cpp:
1821         (WebCore):
1822         (WebCore::Node::isInert):
1823         (WebCore::Node::handleLocalEvents):
1824         (WebCore::Node::disabled):
1825         (WebCore::Node::willRespondToMouseMoveEvents):
1826         (WebCore::Node::willRespondToMouseClickEvents):
1827         (WebCore::Node::willRespondToTouchEvents):
1828         * dom/Node.h:
1829         (Node):
1830
1831 2013-03-12  Andrey Lushnikov  <lushnikov@chromium.org>
1832
1833         Web Inspector: [CodeMirror] highlight matching braces
1834         https://bugs.webkit.org/show_bug.cgi?id=112041
1835
1836         Reviewed by Vsevolod Vlasov.
1837
1838         Add "matchbrackets" add-on to CodeMirror text editor add override
1839         default styles for matched and unmatched braces.
1840
1841         No new tests.
1842
1843         * WebCore.gypi:
1844         * WebCore.vcproj/WebCore.vcproj:
1845         * WebCore.vcxproj/WebCore.vcxproj:
1846         * WebCore.vcxproj/WebCore.vcxproj.filters:
1847         * inspector/front-end/CodeMirrorTextEditor.js:
1848         (WebInspector.CodeMirrorTextEditor):
1849         * inspector/front-end/WebKit.qrc:
1850         * inspector/front-end/cm/cmdevtools.css:
1851         (.CodeMirror-matchingbracket):
1852         (.CodeMirror-nonmatchingbracket):
1853         * inspector/front-end/cm/matchbrackets.js: Added.
1854         (.):
1855
1856 2013-03-12  Matt Falkenhagen  <falken@chromium.org>
1857
1858         Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
1859         https://bugs.webkit.org/show_bug.cgi?id=112085
1860
1861         Reviewed by Hajime Morrita.
1862
1863         Node is too low a level for these methods.
1864
1865         No new tests, just refactoring.
1866
1867         * dom/Element.cpp:
1868         (WebCore::Element::disabled):
1869         (WebCore):
1870         (WebCore::Element::isInert):
1871         * dom/Element.h:
1872         (Element):
1873         * dom/EventDispatcher.cpp:
1874         (WebCore::EventDispatcher::dispatchSimulatedClick):
1875         * dom/GestureEvent.cpp:
1876         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1877         * dom/MouseEvent.cpp:
1878         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1879         * dom/Node.cpp:
1880         (WebCore::Node::handleLocalEvents):
1881         (WebCore::Node::willRespondToMouseMoveEvents):
1882         (WebCore::Node::willRespondToMouseClickEvents):
1883         (WebCore::Node::willRespondToTouchEvents):
1884         * dom/Node.h:
1885         (Node):
1886
1887 2013-03-12  Marja Hölttä  <marja@chromium.org>
1888
1889         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
1890         https://bugs.webkit.org/show_bug.cgi?id=111971
1891
1892         Reviewed by Jochen Eisinger.
1893
1894         In the future we'll create and store function templates for main world
1895         and non-main worlds separately (see bug 111724), having function
1896         templates as static variables inside functions will break the
1897         functionality.
1898
1899         No new tests (updated the bindings test expectations).
1900
1901         * bindings/scripts/CodeGeneratorV8.pm:
1902         (GenerateDomainSafeFunctionGetter):
1903         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1904         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1905         * bindings/v8/V8PerIsolateData.cpp:
1906         (WebCore::V8PerIsolateData::V8PerIsolateData):
1907         (WebCore::V8PerIsolateData::privateTemplate):
1908         (WebCore):
1909         * bindings/v8/V8PerIsolateData.h:
1910         (V8PerIsolateData):
1911         * bindings/v8/custom/V8LocationCustom.cpp:
1912         (WebCore::V8Location::reloadAttrGetterCustom):
1913         (WebCore::V8Location::replaceAttrGetterCustom):
1914         (WebCore::V8Location::assignAttrGetterCustom):
1915
1916 2013-03-12  Takashi Sakamoto  <tasak@google.com>
1917
1918         [Refactoring] Implement RuleCollector
1919         https://bugs.webkit.org/show_bug.cgi?id=109916
1920
1921         Reviewed by Antti Koivisto.
1922
1923         Implemented rule collector for an element and collector for a page.
1924         Not all members in class State are required entire while resolving
1925         a style.
1926
1927         No new tests, because just refactoring.
1928
1929         * CMakeLists.txt:
1930         * GNUmakefile.list.am:
1931         * Target.pri:
1932         * WebCore.gypi:
1933         * WebCore.xcodeproj/project.pbxproj:
1934         * css/CSSAllInOne.cpp:
1935         Added ElementRuleCollector and PageRuleCollector.
1936         * css/DocumentRuleSets.cpp:
1937         (WebCore::ShadowDistributedRules::collectMatchRequests):
1938         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
1939         removed from here.
1940         * css/DocumentRuleSets.h:
1941         (WebCore::ShadowDistributedRules::isEmpty):
1942         Added to quickly check whether there exist any ShadowDistributedRules
1943         or not.
1944         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1945         (WebCore):
1946         (WebCore::ElementRuleCollector::matchedResult):
1947         (WebCore::ElementRuleCollector::matchedRuleList):
1948         (WebCore::ElementRuleCollector::addMatchedRule):
1949         (WebCore::ElementRuleCollector::clearMatchedRules):
1950         (WebCore::ElementRuleCollector::ensureRuleList):
1951         (WebCore::ElementRuleCollector::addElementStyleProperties):
1952         (WebCore::ElementRuleCollector::collectMatchingRules):
1953         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1954         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1955         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
1956         (WebCore::ElementRuleCollector::matchHostRules):
1957         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
1958         (WebCore::ElementRuleCollector::matchAuthorRules):
1959         (WebCore::ElementRuleCollector::matchUserRules):
1960         (WebCore::ElementRuleCollector::matchUARules):
1961         (WebCore::ElementRuleCollector::ruleMatches):
1962         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1963         (WebCore::ElementRuleCollector::sortMatchedRules):
1964         (WebCore::ElementRuleCollector::matchAllRules):
1965         Moved these methods from StyleResolver to this class.
1966         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
1967         This method is used for checking whether a given element can share
1968         a cache.
1969         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
1970         (WebCore):
1971         (WebCore::ElementRuleCollector::ElementRuleCollector):
1972         Use styleResolver instance to initialize its member variables, i.e.
1973         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
1974         StyleScopedResolver.
1975         (ElementRuleCollector):
1976         (WebCore::ElementRuleCollector::setMode):
1977         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
1978         (WebCore::ElementRuleCollector::setSameOriginOnly):
1979         (WebCore::ElementRuleCollector::setRegionForStyling):
1980         Mode, SameOriginOnly, RegionForStyling are only used while collecting
1981         matched rules.
1982         (WebCore::ElementRuleCollector::setMedium):
1983         Need to know which default stylesheet should be looked up.
1984         (WebCore::ElementRuleCollector::document):
1985         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
1986         (WebCore::comparePageRules):
1987         (WebCore::PageRuleCollector::isLeftPage):
1988         (WebCore::PageRuleCollector::isFirstPage):
1989         (WebCore::PageRuleCollector::pageName):
1990         (WebCore::PageRuleCollector::matchAllPageRules):
1991         (WebCore::PageRuleCollector::matchPageRules):
1992         (WebCore::checkPageSelectorComponents):
1993         (WebCore::PageRuleCollector::matchPageRulesForList):
1994         Moved from StyleResolver.
1995         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
1996         (WebCore):
1997         (WebCore::PageRuleCollector::PageRuleCollector):
1998         (PageRuleCollector):
1999         (WebCore::PageRuleCollector::matchedResult):
2000         * css/StyleResolver.cpp:
2001         (WebCore):
2002         (WebCore::StyleResolver::State::clear):
2003         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2004         (WebCore::StyleResolver::State::initForStyleResolve):
2005         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2006         (WebCore::StyleResolver::styleForElement):
2007         (WebCore::StyleResolver::styleForKeyframe):
2008         (WebCore::StyleResolver::pseudoStyleForElement):
2009         (WebCore::StyleResolver::styleForPage):
2010         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2011         (WebCore::StyleResolver::applyMatchedProperties):
2012         * css/StyleResolver.h:
2013         (WebCore::MatchRequest::MatchRequest):
2014         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
2015         state.
2016         (MatchRequest):
2017         (WebCore::StyleResolver::selectorFilter):
2018         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
2019         (StyleResolver):
2020         (MatchResult):
2021         (WebCore::StyleResolver::State::State):
2022         To pass ASSERT in StyleResolver::applyProperties, need to keep
2023         m_regionForStyling.
2024         (State):
2025         (WebCore::StyleResolver::State::regionForStyling):
2026         (WebCore::StyleResolver::State::useSVGZoomRules):
2027         (WebCore::StyleResolver::hasSelectorForId):
2028         (WebCore):
2029         (WebCore::checkRegionSelector):
2030         * inspector/InspectorCSSAgent.cpp:
2031         (WebCore::InspectorCSSAgent::willMatchRule):
2032         Removed StyleResolver from its parameter list. Instead, added
2033         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
2034         * inspector/InspectorCSSAgent.h:
2035         (WebCore):
2036         (InspectorCSSAgent):
2037         * inspector/InspectorInstrumentation.cpp:
2038         (WebCore):
2039         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2040         * inspector/InspectorInstrumentation.h:
2041         (WebCore):
2042         (InspectorInstrumentation):
2043         (WebCore::InspectorInstrumentation::willMatchRule):
2044
2045 2013-03-12  Floris Bos  <bos@je-eigen-domein.nl>
2046
2047         [Qt] WebKit fails to compile if EGL headers are not in default INCLUDEPATH
2048         https://bugs.webkit.org/show_bug.cgi?id=111859
2049
2050         Reviewed by Jocelyn Turcotte.
2051
2052         The 3D graphics code wants to include EGL header files.
2053         But on some platforms such as the Raspberry Pi those are not in /usr/include
2054         but in another folder.
2055         Fix adds "egl" to CONFIG when OpenGL ES2 is used, so the right include
2056         paths are added.
2057
2058         * WebCore.pri:
2059
2060 2013-03-12  Mike West  <mkwst@chromium.org>
2061
2062         XSSAuditor should send only one console error when blocking a page.
2063         https://bugs.webkit.org/show_bug.cgi?id=110733
2064
2065         Reviewed by Daniel Bates.
2066
2067         Currently, we send two console errors when XSSAuditor blocks a page:
2068         "Refused to execute a JavaScript script. Source code of script found
2069         within request.\n", and "Entire page will be blocked.".
2070
2071         We should only send one message, tuning it properly for the context, and
2072         including the URL of the page effected by the XSSAuditor's work.
2073
2074         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
2075
2076         * html/parser/XSSAuditor.cpp:
2077         * html/parser/XSSAuditor.h:
2078         (WebCore::XSSAuditor::XSSAuditor):
2079             Add two booleans to track the headers used to set the XSSAuditor state.
2080         (WebCore::XSSAuditor::init):
2081         (WebCore::XSSAuditor::filterToken):
2082             Add detail about the header status to the constructed XSSInfo object.
2083         * html/parser/XSSAuditorDelegate.cpp:
2084         (WebCore::buildConsoleError):
2085             Move message construction out into a separate inlined function, as
2086             it's becoming complex.
2087         (WebCore::XSSAuditorDelegate::didBlockScript):
2088             Fold the "Entire page will be blocked" message into the main console
2089             error.
2090         * html/parser/XSSAuditorDelegate.h:
2091         (WebCore::XSSInfo::create):
2092         (WebCore::XSSInfo::XSSInfo):
2093             Add detail about header status to XSSInfo in order to correctly
2094             construct the console error.
2095
2096 2013-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2097
2098         Unreviewed, rolling out r145494.
2099         http://trac.webkit.org/changeset/145494
2100         https://bugs.webkit.org/show_bug.cgi?id=112117
2101
2102         Breaks Chromium Mac (Requested by pfeldman on #webkit).
2103
2104         * bindings/scripts/CodeGeneratorV8.pm:
2105         (GenerateDomainSafeFunctionGetter):
2106         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2107         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2108         * bindings/v8/V8PerIsolateData.cpp:
2109         (WebCore::V8PerIsolateData::V8PerIsolateData):
2110         * bindings/v8/V8PerIsolateData.h:
2111         (V8PerIsolateData):
2112         * bindings/v8/custom/V8LocationCustom.cpp:
2113         (WebCore::V8Location::reloadAttrGetterCustom):
2114         (WebCore::V8Location::replaceAttrGetterCustom):
2115         (WebCore::V8Location::assignAttrGetterCustom):
2116
2117 2013-03-12  Yury Semikhatsky  <yurys@chromium.org>
2118
2119         Web Inspector: add memory instrumentation for ImageLoader
2120         https://bugs.webkit.org/show_bug.cgi?id=112115
2121
2122         Reviewed by Alexander Pavlov.
2123
2124         Added memory instrumentation to ImageLoader. CachedImage referenced
2125         by the loader is reported as having retaining reference. This allows
2126         to see in the native memory graph CachedImages that are not reachable
2127         from MemoryCache but referenced by HTMLImageElement.
2128
2129         * loader/ImageLoader.cpp:
2130         (WebCore::ImageLoader::reportMemoryUsage):
2131         (WebCore):
2132         * loader/ImageLoader.h:
2133         (ImageLoader):
2134
2135 2013-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
2136
2137         Web Inspector: Broken shortcuts in Snippets SourceFrame
2138         https://bugs.webkit.org/show_bug.cgi?id=112038
2139
2140         Reviewed by Pavel Feldman.
2141
2142         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
2143         (WebInspector.SnippetJavaScriptSourceFrame):
2144         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
2145
2146 2013-03-12  Eugene Klyuchnikov  <eustas@chromium.org>
2147
2148         Web Inspector: [Timeline] File selector control becomes visible on "tab" navigation.
2149         https://bugs.webkit.org/show_bug.cgi?id=111710
2150
2151         Reviewed by Pavel Feldman.
2152
2153         Solution: Exclude file selector control from tab-navigation flow.
2154
2155         * inspector/front-end/FileUtils.js: Set tab-index to control.
2156         * inspector/front-end/TimelinePanel.js: Remove duplicating code.
2157         * inspector/front-end/inspector.css:
2158         (.status-bar-item): Make scroll height equal to offset height.
2159
2160 2013-03-12  Marja Hölttä  <marja@chromium.org>
2161
2162         [V8] Get rid of function-level static FunctionTemplates in generated bindings code
2163         https://bugs.webkit.org/show_bug.cgi?id=111971
2164
2165         Reviewed by Kentaro Hara.
2166
2167         In the future we'll create and store function templates for main world
2168         and non-main worlds separately (see bug 111724), having function
2169         templates as static variables inside functions will break the
2170         functionality.
2171
2172         No new tests (updated the bindings test expectations).
2173
2174         * bindings/scripts/CodeGeneratorV8.pm:
2175         (GenerateDomainSafeFunctionGetter):
2176         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2177         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
2178         * bindings/v8/V8PerIsolateData.cpp:
2179         (WebCore::V8PerIsolateData::V8PerIsolateData):
2180         (WebCore::V8PerIsolateData::privateTemplate):
2181         (WebCore):
2182         * bindings/v8/V8PerIsolateData.h:
2183         (V8PerIsolateData):
2184         * bindings/v8/custom/V8LocationCustom.cpp:
2185         (WebCore::V8Location::reloadAttrGetterCustom):
2186         (WebCore::V8Location::replaceAttrGetterCustom):
2187         (WebCore::V8Location::assignAttrGetterCustom):
2188
2189 2013-03-12  Tien-Ren Chen  <trchen@chromium.org>
2190
2191         Need to notify ScrollingCoordinator when frame scrollbars are destroyed
2192         https://bugs.webkit.org/show_bug.cgi?id=112104
2193
2194         Reviewed by James Robinson.
2195
2196         Need to notify ScrollingCoordinatorChromium whenever m_layerForHorizontalScrollbar /
2197         m_layerForVerticalScrollbar changes, for correct lifetime management.
2198
2199         No new tests. Difficult to test lifetime management internal to ScrollingCoordinatorChromium.
2200
2201         * rendering/RenderLayerCompositor.cpp:
2202         (WebCore::RenderLayerCompositor::destroyRootLayer):
2203
2204 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
2205
2206         We'll get there eventually.
2207
2208         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
2209
2210 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
2211
2212         Fumbled adding new files to the vcproj. Fixing.
2213
2214         * WebCore.vcproj/WebCore.vcproj:
2215
2216 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
2217
2218         Fix the Windows build by providing implementations of PlatformCAFilters::setFiltersOnLayer(),
2219         PlatformCAFilters::numAnimatedFilterProperties() and PlatformCAFilters::animatedFilterPropertyName(),
2220         adding PlatformCAFiltersWin.cpp to the vcproj.
2221         
2222         * WebCore.vcproj/WebCore.vcproj:
2223         * platform/graphics/ca/PlatformCAFilters.h:
2224         (PlatformCAFilters):
2225         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: Copied from Source/WebCore/platform/graphics/ca/PlatformCAFilters.h.
2226         (PlatformCAFilters::setFiltersOnLayer):
2227         (PlatformCAFilters::numAnimatedFilterProperties):
2228         (PlatformCAFilters::animatedFilterPropertyName):
2229
2230 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
2231
2232         Don't create multiple user gesture indicators when forwarding events to sub frames
2233         https://bugs.webkit.org/show_bug.cgi?id=111923
2234
2235         Reviewed by Adam Barth.
2236
2237         Ports that implement consumable user gestures depend on a single user
2238         gesture indicator being created in response to a single user gesture.
2239
2240         Test: platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html
2241
2242         * dom/UserGestureIndicator.cpp:
2243         (WebCore::isDefinite):
2244         (WebCore::UserGestureIndicator::UserGestureIndicator):
2245         (WebCore::UserGestureIndicator::processingUserGesture):
2246         * dom/UserGestureIndicator.h:
2247         * page/EventHandler.cpp:
2248         (WebCore::EventHandler::handleMousePressEvent):
2249         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2250         (WebCore::EventHandler::handleMouseReleaseEvent):
2251         (WebCore::EventHandler::keyEvent):
2252         (WebCore::EventHandler::handleTouchEvent):
2253
2254 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
2255
2256         Fix Windows build.
2257
2258         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2259
2260 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2261
2262         Unreviewed build fix after http://trac.webkit.org/changeset/145472.
2263
2264         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2265         (PlatformCAFilters::colorMatrixValueForFilter):
2266
2267 2013-03-11  Takashi Sakamoto  <tasak@google.com>
2268
2269         [CSS] shadow from radius has wrong render in webkit
2270         https://bugs.webkit.org/show_bug.cgi?id=99928
2271
2272         Reviewed by Simon Fraser.
2273
2274         No rounded cornder should be expanded in the mixed case, i.e. some
2275         corners are rounded, but others are not rounded.
2276         Need to look at each corner independently,
2277         i.e. top-left, top-right, bottom-left and bottom-right, and
2278         to expand corners whose width and height are larger than 0.
2279
2280         Test: fast/box-shadow/box-shadow-with-zero-radius.html
2281
2282         * platform/graphics/RoundedRect.cpp:
2283         (WebCore::RoundedRect::Radii::expand):
2284
2285 2013-03-11  Simon Fraser  <simon.fraser@apple.com>
2286
2287         [CA] Animations of CSS filters don't work correctly
2288         https://bugs.webkit.org/show_bug.cgi?id=111905
2289
2290         Reviewed by Dean Jackson.
2291
2292         Fix various issues with transitions of composited filters on Mac,
2293         most of which stemmed from the conversion to use CAFilter.
2294         
2295         Put the Mac CA filter-related code into a new file, PlatformCAFilters,
2296         to group code that creates filter properties into a single place.
2297         
2298         Animations of CIFilters using multiple values never worked correctly,
2299         because we would clobber all but the last property for each filter,
2300         so fix that.
2301         
2302         Changes in the moved filter code:
2303             - Made use of sepiaFullConstants in the CIFilter and CAFilter code.
2304             - For CI, return CIVectors instead of NSArrays of NSNumbers.
2305             - Fudge the inputColor for the CI grayscale filter to better match software filters.
2306             - fix some cases where the behavior was wrong in the isDefault() case.
2307
2308         * WebCore.xcodeproj/project.pbxproj: Add PlatformCAFilters.h, PlatformCAFiltersMac.mm.
2309         * platform/graphics/GraphicsLayer.cpp:
2310         (WebCore::GraphicsLayer::animationNameForTransition): This function was creating a string
2311         containing non-ASCII characters.
2312         * platform/graphics/ca/GraphicsLayerCA.cpp:
2313         (WebCore::animationIdentifier): To handle CIFilter animations, we need to tack another
2314         index onto the animation identifier, since some animations require animating multiple
2315         properties of the same CIFilter. Add "subIndex" for this.
2316         (WebCore::GraphicsLayerCA::moveOrCopyAnimations): Ditto.
2317         (WebCore::GraphicsLayerCA::updateAnimations): Ditto.
2318         (WebCore::GraphicsLayerCA::setAnimationOnLayer): Ditto.
2319         (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer): Ditto.
2320         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Ditto.
2321         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): Ditto.
2322         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Ditto.
2323         * platform/graphics/ca/GraphicsLayerCA.h: Ditto.
2324         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2325         (LayerPropertyAnimation):
2326         * platform/graphics/ca/PlatformCAAnimation.h:
2327         (PlatformCAAnimation): Functions moved.
2328         * platform/graphics/ca/PlatformCAFilters.h: Added.
2329         (PlatformCAFilters):
2330         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2331         (PlatformCAAnimation::setFromValue):
2332         (PlatformCAAnimation::setToValue):
2333         (PlatformCAAnimation::setValues):
2334         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Added.
2335         (PlatformCAFilters::filterValueForOperation):
2336         (PlatformCAFilters::colorMatrixValueForFilter):
2337         (PlatformCAFilters::numAnimatedFilterProperties):
2338         (PlatformCAFilters::animatedFilterPropertyName):
2339         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2340         (PlatformCALayer::PlatformCALayer):
2341         (PlatformCALayer::addAnimationForKey):
2342         (PlatformCALayer::setFilters):
2343         (PlatformCALayer::filtersCanBeComposited):
2344
2345 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2346
2347         Unreviewed, rolling out r145462.
2348         http://trac.webkit.org/changeset/145462
2349         https://bugs.webkit.org/show_bug.cgi?id=112097
2350
2351         Compilation failure in PluginView.cpp (Requested by jamesr_ on
2352         #webkit).
2353
2354         * accessibility/AccessibilityMenuList.cpp:
2355         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
2356         * bindings/objc/DOM.mm:
2357         (kitClass):
2358         * bindings/v8/V8LazyEventListener.cpp:
2359         (WebCore::V8LazyEventListener::prepareListenerObject):
2360         * css/SelectorChecker.cpp:
2361         (WebCore::SelectorChecker::checkOne):
2362         * editing/ApplyStyleCommand.cpp:
2363         (WebCore::isLegacyAppleStyleSpan):
2364         (WebCore::isEmptyFontTag):
2365         (WebCore::ApplyStyleCommand::applyBlockStyle):
2366         * editing/FormatBlockCommand.cpp:
2367         (WebCore::isElementForFormatBlock):
2368         * editing/ReplaceSelectionCommand.cpp:
2369         (WebCore::isMailPasteAsQuotationNode):
2370         (WebCore::haveSameTagName):
2371         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2372         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2373         * history/CachedPage.cpp:
2374         (WebCore::CachedPage::restore):
2375         * html/ColorInputType.cpp:
2376         (WebCore::ColorInputType::suggestions):
2377         * html/HTMLTableRowsCollection.cpp:
2378         (WebCore::isInHead):
2379         (WebCore::isInBody):
2380         (WebCore::isInFoot):
2381         * inspector/DOMPatchSupport.cpp:
2382         (WebCore::DOMPatchSupport::innerPatchNode):
2383         * page/PageSerializer.cpp:
2384         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
2385         * plugins/PluginView.cpp:
2386         (WebCore::PluginView::getValue):
2387         * rendering/RenderEmbeddedObject.cpp:
2388         (WebCore::RenderEmbeddedObject::paintContents):
2389         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2390         * rendering/RenderLayer.cpp:
2391         (WebCore::RenderLayer::name):
2392         * rendering/RenderMedia.cpp:
2393         (WebCore::RenderMedia::mediaElement):
2394         * rendering/RenderSearchField.cpp:
2395         (WebCore::RenderSearchField::autosaveName):
2396         * rendering/RenderTextControl.cpp:
2397         (WebCore::RenderTextControl::textFormControlElement):
2398         (WebCore::updateUserModifyProperty):
2399         * rendering/mathml/RenderMathMLFenced.cpp:
2400         (WebCore::RenderMathMLFenced::updateFromElement):
2401         * rendering/mathml/RenderMathMLFraction.cpp:
2402         (WebCore::RenderMathMLFraction::updateFromElement):
2403         * xml/parser/XMLDocumentParserLibxml2.cpp:
2404         (WebCore::XMLDocumentParser::XMLDocumentParser):
2405         (WebCore::XMLDocumentParser::endElementNs):
2406
2407 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
2408
2409         Move SharedWorkerRepository functions out of DefaultSharedWorkerRepository
2410         https://bugs.webkit.org/show_bug.cgi?id=100418
2411
2412         Reviewed by Sam Weinig.
2413
2414         * CMakeLists.txt:
2415         * GNUmakefile.list.am:
2416         * Target.pri:
2417         * WebCore.vcproj/WebCore.vcproj:
2418         * WebCore.xcodeproj/project.pbxproj:
2419         Added SharedWorkerRepository.cpp.
2420
2421         * WebCore.gyp/WebCore.gyp:
2422         * WebCore.gypi:
2423         Chromium uses WebKit/chromium/src/SharedWorkerRepository.cpp instead of
2424         WebCore/workers/DefaultSharedWorkerRepository.cpp. Not sure why it's added and
2425         then excluded, but did the same with the new SharedWorkerRepository.cpp, which
2426         just contains some code moved from that file.
2427
2428         * workers/DefaultSharedWorkerRepository.cpp:
2429         (WebCore::SharedWorkerScriptLoader::load): Removed a PLATFORM(CHROMIUM) clause,
2430         chromium doesn't compile this file.
2431         (WebCore::DefaultSharedWorkerRepository::connectToWorker): Added a FIXME about
2432         seemingly wrong code.
2433
2434         * workers/SharedWorkerRepository.cpp: Added.
2435         (WebCore::SharedWorkerRepository::isAvailable):
2436         (WebCore::SharedWorkerRepository::connect):
2437         (WebCore::SharedWorkerRepository::documentDetached):
2438         (WebCore::SharedWorkerRepository::hasSharedWorkers):
2439         Moved from DefaultSharedWorkerRepository.cpp, because this is part of SharedWorkerRepository.
2440
2441 2013-03-11  Adam Barth  <abarth@webkit.org>
2442
2443         Make BackgroundHTMLParser work with doc.writes that enter or leave foreign content
2444         https://bugs.webkit.org/show_bug.cgi?id=109764
2445
2446         Reviewed by Eric Seidel.
2447
2448         Previously, we were not reseting the state of the
2449         HTMLTreeBuilderSimulator when we failed speculative parsing. This had a
2450         number of observable consequences, including not parsing CDATA sections
2451         correctly when document.write caused us to enter foreign content.
2452
2453         Test: fast/parser/document-write-svg-cdata.html
2454
2455         * html/parser/BackgroundHTMLParser.cpp:
2456         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
2457         (WebCore::BackgroundHTMLParser::resumeFrom):
2458         (WebCore::BackgroundHTMLParser::pumpTokenizer):
2459         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
2460         * html/parser/BackgroundHTMLParser.h:
2461         (Checkpoint):
2462         (BackgroundHTMLParser):
2463         * html/parser/HTMLDocumentParser.cpp:
2464         (WebCore::HTMLDocumentParser::validateSpeculations):
2465         (WebCore::HTMLDocumentParser::didFailSpeculation):
2466         * html/parser/HTMLDocumentParser.h:
2467         (ParsedChunk):
2468         * html/parser/HTMLElementStack.h:
2469         (WebCore::HTMLElementStack::ElementRecord::namespaceURI):
2470         * html/parser/HTMLTreeBuilder.h:
2471         (WebCore::HTMLTreeBuilder::options):
2472         (WebCore::HTMLTreeBuilder::openElements):
2473         (HTMLTreeBuilder):
2474         * html/parser/HTMLTreeBuilderSimulator.cpp:
2475         (WebCore::HTMLTreeBuilderSimulator::stateFor):
2476         (WebCore):
2477         * html/parser/HTMLTreeBuilderSimulator.h:
2478         (WebCore):
2479         (WebCore::HTMLTreeBuilderSimulator::state):
2480         (WebCore::HTMLTreeBuilderSimulator::setState):
2481         (HTMLTreeBuilderSimulator):
2482
2483 2013-03-11  Abhishek Arya  <inferno@chromium.org>
2484
2485         Replace static_casts with to* functions.
2486         https://bugs.webkit.org/show_bug.cgi?id=112072
2487
2488         Reviewed by Philip Rogers.
2489
2490         to* functions are preferred over static_cast calls since they
2491         help to catch bad casts easily on the testing infrastructure.
2492
2493         * accessibility/AccessibilityMenuList.cpp:
2494         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
2495         * bindings/objc/DOM.mm:
2496         (kitClass):
2497         * bindings/v8/V8LazyEventListener.cpp:
2498         (WebCore::V8LazyEventListener::prepareListenerObject):
2499         * css/SelectorChecker.cpp:
2500         (WebCore::SelectorChecker::checkOne):
2501         * editing/ApplyStyleCommand.cpp:
2502         (WebCore::isLegacyAppleStyleSpan):
2503         (WebCore::isEmptyFontTag):
2504         (WebCore::ApplyStyleCommand::applyBlockStyle):
2505         * editing/FormatBlockCommand.cpp:
2506         (WebCore::isElementForFormatBlock):
2507         * editing/ReplaceSelectionCommand.cpp:
2508         (WebCore::isMailPasteAsQuotationNode):
2509         (WebCore::haveSameTagName):
2510         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2511         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2512         * history/CachedPage.cpp:
2513         (WebCore::CachedPage::restore):
2514         * html/ColorInputType.cpp:
2515         (WebCore::ColorInputType::suggestions):
2516         * html/HTMLTableRowsCollection.cpp:
2517         (WebCore::isInHead):
2518         (WebCore::isInBody):
2519         (WebCore::isInFoot):
2520         * inspector/DOMPatchSupport.cpp:
2521         (WebCore::DOMPatchSupport::innerPatchNode):
2522         * page/PageSerializer.cpp:
2523         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
2524         * plugins/PluginView.cpp:
2525         (WebCore::PluginView::getValue):
2526         * rendering/RenderEmbeddedObject.cpp:
2527         (WebCore::RenderEmbeddedObject::paintContents):
2528         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2529         * rendering/RenderLayer.cpp:
2530         (WebCore::RenderLayer::name):
2531         * rendering/RenderMedia.cpp:
2532         (WebCore::RenderMedia::mediaElement):
2533         * rendering/RenderSearchField.cpp:
2534         (WebCore::RenderSearchField::autosaveName):
2535         * rendering/RenderTextControl.cpp:
2536         (WebCore::RenderTextControl::textFormControlElement):
2537         (WebCore::updateUserModifyProperty):
2538         * rendering/mathml/RenderMathMLFenced.cpp:
2539         (WebCore::RenderMathMLFenced::updateFromElement):
2540         * rendering/mathml/RenderMathMLFraction.cpp:
2541         (WebCore::RenderMathMLFraction::updateFromElement):
2542         * xml/parser/XMLDocumentParserLibxml2.cpp:
2543         (WebCore::XMLDocumentParser::XMLDocumentParser):
2544         (WebCore::XMLDocumentParser::endElementNs):
2545
2546 2013-03-11  Philip Rogers  <pdr@google.com>
2547
2548         Replace static_casts for SVGSVGElement and SVGStopElement
2549         https://bugs.webkit.org/show_bug.cgi?id=111651
2550
2551         Reviewed by Stephen Chenney.
2552
2553         toSVGSVGElement and toSVGStopElement are preferred over static_casts because bad casts
2554         can be caught on our testing infrastructure. This patches replaces all static_casts for
2555         SVGSVGElement and SVGStopElement with toSVGSVGElement and toSVGStopElement, respectively.
2556
2557         Additionaly, this patch renames SVGElement::isSVG to SVGElement::isSVGSVGElement to
2558         remove ambiguity for callers who may confuse this with isSVGElement.
2559
2560         No new tests as this is covered with existing tests.
2561
2562         * rendering/svg/RenderSVGRoot.cpp:
2563         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
2564         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2565         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2566         (WebCore::RenderSVGRoot::layout):
2567         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
2568         (WebCore::RenderSVGRoot::hasRelativeDimensions):
2569         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
2570         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
2571         * rendering/svg/RenderSVGViewportContainer.cpp:
2572         (WebCore::RenderSVGViewportContainer::determineIfLayoutSizeChanged):
2573         (WebCore::RenderSVGViewportContainer::calcViewport):
2574         (WebCore::RenderSVGViewportContainer::viewportTransform):
2575         * svg/SVGDocument.cpp:
2576         (WebCore::SVGDocument::rootElement):
2577         (WebCore::SVGDocument::childShouldCreateRenderer):
2578         * svg/SVGElement.cpp:
2579         (WebCore::SVGElement::ownerSVGElement):
2580         * svg/SVGElement.h:
2581         (WebCore::SVGElement::isSVGSVGElement):
2582         * svg/SVGGradientElement.cpp:
2583         (WebCore::SVGGradientElement::buildStops):
2584         * svg/SVGLengthContext.cpp:
2585         (WebCore::SVGLengthContext::determineViewport):
2586         * svg/SVGSVGElement.h:
2587         (WebCore):
2588         (WebCore::toSVGSVGElement):
2589         * svg/SVGStopElement.h:
2590         (WebCore::toSVGStopElement):
2591         (WebCore):
2592
2593 2013-03-11  Tony Chang  <tony@chromium.org>
2594
2595         Small code cleanup in RenderFlexibleBox
2596         https://bugs.webkit.org/show_bug.cgi?id=112076
2597
2598         Reviewed by Ojan Vafai.
2599
2600         No new tests, this is a refactor and existing tests in css3/flexbox should pass.
2601
2602         * rendering/RenderFlexibleBox.cpp:
2603         (WebCore::RenderFlexibleBox::layoutBlock): Remove unused param from repositionLogicalHeightDependentFlexItems.
2604         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Remove unused param from repositionLogicalHeightDependentFlexItems.
2605         The clientLogicalBottom can't have changed in this time (the only thing we've done is align children).
2606         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Just call layout() if we marked the flexitem as needing layout.
2607         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Just call layout() if we marked the flexitem as needing layout.
2608         * rendering/RenderFlexibleBox.h:
2609         (RenderFlexibleBox): Remove unused param from repositionLogicalHeightDependentFlexItems.
2610
2611 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
2612
2613         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
2614         https://bugs.webkit.org/show_bug.cgi?id=111959
2615
2616         Reviewed by Alexey Proskuryakov.
2617
2618         The rationale is that the UserGestureIndicator will increase the number
2619         of consumable user gestures when it's invoked with what is now
2620         DefinitelyProcessingNewUserGesture.
2621
2622         In a follow-up change I will reintroduce DefinitelyProcessingUserGesture
2623         which will only increase the consumable user gesture count if we are
2624         not already processing a user gesture.
2625
2626         No new tests, no change in functionality.
2627
2628         * accessibility/AccessibilityNodeObject.cpp:
2629         (WebCore::AccessibilityNodeObject::increment):
2630         (WebCore::AccessibilityNodeObject::decrement):
2631         * accessibility/AccessibilityObject.cpp:
2632         (WebCore::AccessibilityObject::press):
2633         * bindings/ScriptControllerBase.cpp:
2634         (WebCore::ScriptController::executeScript):
2635         * bindings/js/ScriptController.cpp:
2636         (WebCore::ScriptController::executeScriptInWorld):
2637         * bindings/v8/NPV8Object.cpp:
2638         (_NPN_EvaluateHelper):
2639         * dom/UserGestureIndicator.cpp:
2640         (WebCore::isDefinite):
2641         (WebCore::UserGestureIndicator::UserGestureIndicator):
2642         (WebCore::UserGestureIndicator::processingUserGesture):
2643         * dom/UserGestureIndicator.h:
2644         * inspector/InspectorFrontendClientLocal.cpp:
2645         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2646         * inspector/InspectorFrontendHost.cpp:
2647         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
2648         * inspector/InspectorPageAgent.cpp:
2649         (WebCore::InspectorPageAgent::navigate):
2650         * loader/NavigationScheduler.cpp:
2651         (WebCore::ScheduledURLNavigation::fire):
2652         (WebCore::ScheduledURLNavigation::didStartTimer):
2653         (WebCore::ScheduledRedirect::fire):
2654         (WebCore::ScheduledRefresh::fire):
2655         (WebCore::ScheduledHistoryNavigation::fire):
2656         (WebCore::ScheduledFormSubmission::fire):
2657         (WebCore::ScheduledFormSubmission::didStartTimer):
2658         * page/EventHandler.cpp:
2659         (WebCore::EventHandler::handleMousePressEvent):
2660         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2661         (WebCore::EventHandler::handleMouseReleaseEvent):
2662         (WebCore::EventHandler::keyEvent):
2663         (WebCore::EventHandler::handleTouchEvent):
2664         * platform/chromium/PopupContainer.cpp:
2665         (WebCore::PopupContainer::handleMouseDownEvent):
2666         (WebCore::PopupContainer::handleMouseMoveEvent):
2667         (WebCore::PopupContainer::handleMouseReleaseEvent):
2668         (WebCore::PopupContainer::handleWheelEvent):
2669         (WebCore::PopupContainer::handleKeyEvent):
2670
2671 2013-03-11  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2672
2673         Ruby text is incorrectly positioned when its writing-mode is changed to vertical after layout is done
2674         https://bugs.webkit.org/show_bug.cgi?id=96592
2675
2676         Reviewed by Hajime Morrita.
2677
2678         Fixed logical left of RenderRubyText is not cleared.
2679
2680         This causes trouble when RenderRubyTest is laid out vertically after horizontally.
2681         Horizontal layout set logical top(== y).
2682         Vertical layout don't set logical left(== y).
2683         RenderRubyText::y remain old one.
2684         We clear old RenderRubyText::y at the first part of layout().
2685
2686         Test: fast/writing-mode/ruby-text-logical-left.html
2687
2688         * rendering/RenderRubyRun.cpp:
2689         (WebCore::RenderRubyRun::layout): Reset logicalLeft not to reuse old one.
2690
2691 2013-03-11  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2692
2693         [css3-text] Add partial parsing support for text-underline-position property from CSS3 Text
2694         https://bugs.webkit.org/show_bug.cgi?id=102491
2695
2696         Reviewed by Julien Chaffraix.
2697
2698         This patch extends the existing parsing to support 'auto', 'alphabetic' and 'under'. We don't fully match
2699         the specification as we don't support [ left | right ] and this is left for another implementation
2700         as the rendering will need to be added.
2701
2702         Test: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html
2703
2704         * css/CSSComputedStyleDeclaration.cpp:
2705         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2706         * css/CSSParser.cpp:
2707         (WebCore::CSSParser::parseValue):
2708         (WebCore::CSSParser::parseTextUnderlinePosition):
2709         * css/CSSParser.h:
2710         * css/CSSPrimitiveValueMappings.h:
2711         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2712         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
2713         * css/CSSProperty.cpp:
2714         (WebCore::CSSProperty::isInheritedProperty):
2715         Added parsing-related checks for text-underline-position property.
2716         * css/CSSPropertyNames.in: Added '-webkit-underline-position' property.
2717         * css/CSSValueKeywords.in:
2718         * css/SVGCSSValueKeywords.in:
2719         * css/StyleBuilder.cpp:
2720         (ApplyPropertyTextUnderlinePosition):
2721         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue):
2722         (WebCore::ApplyPropertyTextUnderlinePosition::createHandler):
2723         (WebCore::StyleBuilder::StyleBuilder):
2724         Set property handler for text-underline-position.
2725         * css/StyleResolver.cpp:
2726         (WebCore::StyleResolver::applyProperty):
2727         * rendering/style/RenderStyle.h:
2728         * rendering/style/RenderStyleConstants.h:
2729         * rendering/style/StyleRareInheritedData.cpp:
2730         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2731         (WebCore::StyleRareInheritedData::operator==):
2732         Added support for m_textUnderlinePosition on copy constructor and operator
2733         assignment functions.
2734         * rendering/style/StyleRareInheritedData.h:
2735         (StyleRareInheritedData): Added m_textUnderlinePosition here as it won't be used regularly.
2736
2737 2013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
2738
2739         Hit testing should use ancestorInThisScope to get the non-shadow ancestor
2740         https://bugs.webkit.org/show_bug.cgi?id=112068
2741
2742         Reviewed by Dimitri Glazkov.
2743
2744         Tests: media/nodesFromRect-shadowContent.html
2745
2746         * rendering/HitTestResult.cpp:
2747         (WebCore::HitTestResult::setToNonShadowAncestor):
2748         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2749         Use ancestorInThisScope which is not deprecated and which produces
2750         correct results for nested shadow trees (e.g. in case of <video>,
2751         which contains <input> elements for the controls, which themselves
2752         have shadow trees)
2753
2754 2013-03-11  Abhishek Arya  <inferno@chromium.org>
2755
2756         Replace static_cast with to* helper functions.
2757         https://bugs.webkit.org/show_bug.cgi?id=112045
2758
2759         Reviewed by Eric Seidel.
2760
2761         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2762         (WebCore::V8HTMLOptionsCollection::removeMethodCustom):
2763         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
2764         * bindings/v8/custom/V8NamedNodesCollection.cpp:
2765         (WebCore::V8NamedNodesCollection::namedItem):
2766         * bindings/v8/custom/V8NodeCustom.cpp:
2767         (WebCore::wrap):
2768         * editing/BreakBlockquoteCommand.cpp:
2769         (WebCore::BreakBlockquoteCommand::doApply):
2770         * editing/CompositeEditCommand.cpp:
2771         (WebCore::CompositeEditCommand::insertNodeAt):
2772         (WebCore::CompositeEditCommand::pushAnchorElementDown):
2773         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
2774         (WebCore::CompositeEditCommand::splitTreeToNode):
2775         * editing/InsertParagraphSeparatorCommand.cpp:
2776         (WebCore::InsertParagraphSeparatorCommand::doApply):
2777         * loader/archive/cf/LegacyWebArchive.cpp:
2778         (WebCore::LegacyWebArchive::create):
2779         * platform/chromium/PasteboardChromium.cpp:
2780         (WebCore::Pasteboard::writeImage):
2781         * platform/mac/HTMLConverter.mm:
2782         (+[WebHTMLConverter editingAttributedStringFromRange:]):
2783         * rendering/RenderLayerBacking.cpp:
2784         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2785         * rendering/RenderLayerCompositor.cpp:
2786         (WebCore::RenderLayerCompositor::frameContentsCompositor):
2787         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
2788         * rendering/RenderSnapshottedPlugIn.cpp:
2789         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
2790         * rendering/mathml/RenderMathMLOperator.cpp:
2791         (WebCore::RenderMathMLOperator::updateFromElement):
2792         * rendering/svg/RenderSVGResourceContainer.cpp:
2793         (WebCore::RenderSVGResourceContainer::idChanged):
2794
2795 2013-03-11  James Robinson  <jamesr@chromium.org>
2796
2797         [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
2798         https://bugs.webkit.org/show_bug.cgi?id=111791
2799
2800         Reviewed by Adrienne Walker.
2801
2802         Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
2803         uses it in AnimationTranslationUtil and GraphicsLayerChromium.
2804
2805         * WebCore.gypi:
2806         * platform/chromium/support/WebTransformationMatrix.cpp:
2807         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
2808         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
2809         (WebCore::toWebTransformOperations):
2810         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2811         (WebCore::GraphicsLayerChromium::updateTransform):
2812         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
2813         * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
2814         (WebCore::TransformSkMatrix44Conversions::convert):
2815         * platform/graphics/chromium/TransformSkMatrix44Conversions.h:
2816         (TransformSkMatrix44Conversions):
2817
2818 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2819
2820         Unreviewed, rolling out r145435.
2821         http://trac.webkit.org/changeset/145435
2822         https://bugs.webkit.org/show_bug.cgi?id=112082
2823
2824         Still does not compile (Requested by jamesr on #webkit).
2825
2826         * Modules/indexeddb/IDBBackingStore.cpp:
2827         (WebCore::IDBBackingStore::getObjectStores):
2828         (WebCore::IDBBackingStore::createObjectStore):
2829         (WebCore::IDBBackingStore::deleteObjectStore):
2830         (WebCore::IDBBackingStore::getRecord):
2831         (WebCore::IDBBackingStore::putRecord):
2832         (WebCore::IDBBackingStore::clearObjectStore):
2833         (WebCore::IDBBackingStore::deleteRecord):
2834         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2835         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2836         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2837         (WebCore::IDBBackingStore::getIndexes):
2838         (WebCore::IDBBackingStore::createIndex):
2839         (WebCore::IDBBackingStore::deleteIndex):
2840         (WebCore::IDBBackingStore::putIndexDataForRecord):
2841         (WebCore::IDBBackingStore::findKeyInIndex):
2842         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2843         (WebCore::IDBBackingStore::keyExistsInIndex):
2844         (WebCore::indexCursorOptions):
2845         * Modules/indexeddb/IDBBackingStore.h:
2846         (IDBBackingStore):
2847         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2848         (WebCore::DeleteIndexOperation::create):
2849         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
2850         (DeleteIndexOperation):
2851         (WebCore::IDBDatabaseBackendImpl::openInternal):
2852         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
2853         (WebCore::DeleteIndexOperation::perform):
2854         (WebCore::DeleteRangeOperation::perform):
2855         (WebCore::ClearOperation::perform):
2856         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2857         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
2858         (WebCore::IDBLevelDBCoding::KeyPrefix::encode):
2859         (WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
2860         (WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
2861         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2862         (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
2863         (WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
2864         (WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
2865         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
2866         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
2867         (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
2868         (WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
2869         (WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
2870         (WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
2871         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
2872         (WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
2873         * Modules/indexeddb/IDBLevelDBCoding.h:
2874         (IDBLevelDBCoding):
2875         (KeyPrefix):
2876         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2877         (WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):
2878
2879 2013-03-11  Alec Flett  <alecflett@chromium.org>
2880
2881         IndexedDB: Protect against key prefix overflows
2882         https://bugs.webkit.org/show_bug.cgi?id=111138
2883
2884         Reviewed by Tony Chang.
2885
2886         This reworks the boundary checking for all databaseId,
2887         objectStoreId, and indexId, including negative and
2888         zero-based ids. All entrypoints into IDBLevelDBCoding
2889         are protected with explicit checks and all internal
2890         uses of KeyPrefix are protected with ASSERTs in the
2891         various constructors.
2892
2893         Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium
2894
2895         * Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
2896         * Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.
2897
2898 2013-03-11  Philip Rogers  <pdr@google.com>
2899
2900         Replace static_cast<SVGStyledElement> with toSVGStyledElement()
2901         https://bugs.webkit.org/show_bug.cgi?id=111651
2902
2903         Reviewed by Abhishek Arya.
2904
2905         toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
2906         can be caught on our testing infrastructure. This patch replaces all
2907         static_cast<SVGStyledElement> instances with toSVGStyledElement.
2908
2909         Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
2910         remove a confusing overlap with html styled elements. This name differs slighly from the
2911         other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.
2912
2913         No new tests as this is covered with existing tests.
2914
2915         * rendering/svg/RenderSVGModelObject.cpp:
2916         (WebCore::getElementCTM):
2917         * rendering/svg/RenderSVGResourceClipper.cpp:
2918         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2919         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
2920         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2921         * rendering/svg/RenderSVGResourceMasker.cpp:
2922         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2923         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
2924         * rendering/svg/RenderSVGResourcePattern.cpp:
2925         (WebCore::RenderSVGResourcePattern::createTileImage):
2926         * rendering/svg/SVGRenderSupport.cpp:
2927         (WebCore::SVGRenderSupport::layoutChildren):
2928         * rendering/svg/SVGResources.cpp:
2929         (WebCore::registerPendingResource):
2930         * svg/SVGAnimationElement.cpp:
2931         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
2932         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
2933         (WebCore::SVGAnimationElement::adjustForInheritance):
2934         (WebCore::inheritsFromProperty):
2935         * svg/SVGElement.cpp:
2936         (WebCore::collectInstancesForSVGElement):
2937         (WebCore::SVGElement::isAnimatableAttribute):
2938         * svg/SVGElement.h:
2939         (WebCore::SVGElement::isSVGStyledElement):
2940         * svg/SVGElementInstance.cpp:
2941         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
2942         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
2943         * svg/SVGLocatable.cpp:
2944         (WebCore::SVGLocatable::computeCTM):
2945         * svg/SVGStyledElement.cpp:
2946         (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
2947         * svg/SVGStyledElement.h:
2948         (WebCore::SVGStyledElement::isSVGStyledElement):
2949         * svg/SVGUseElement.cpp:
2950         (WebCore::SVGUseElement::selfHasRelativeLengths):
2951         * svg/graphics/filters/SVGFEImage.cpp:
2952         (WebCore::FEImage::platformApplySoftware):
2953
2954 2013-03-11  Tim Horton  <timothy_horton@apple.com>
2955
2956         PDFPlugin: Make scrolling between pages in non-continuous modes work
2957         https://bugs.webkit.org/show_bug.cgi?id=111415
2958         <rdar://problem/12555320>
2959
2960         Reviewed by Alexey Proskuryakov.
2961
2962         * WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.
2963
2964 2013-03-11  Mark Lam  <mark.lam@apple.com>
2965
2966         Remove the use of the quotaMap cache in DatabaseTracker.
2967         https://bugs.webkit.org/show_bug.cgi?id=111805.
2968
2969         Reviewed by Geoffrey Garen.
2970
2971         This change is needed because using the quotaMap cache can result in
2972         an inaccurate read (in a multi-process system) on what database files
2973         are actually present on the filesystem. Instead of using the quotaMap
2974         cache, we rely on the tracker database and query it every time we need
2975         the origin/quota information.
2976
2977         No new tests.
2978
2979         * Modules/webdatabase/DatabaseTracker.cpp:
2980         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
2981         (WebCore::DatabaseTracker::hasEntryForOriginNoLock):
2982         (WebCore::DatabaseTracker::origins):
2983         (WebCore::DatabaseTracker::quotaForOriginNoLock):
2984         (WebCore::DatabaseTracker::setQuota):
2985         (WebCore::DatabaseTracker::addDatabase):
2986         (WebCore::DatabaseTracker::deleteOrigin):
2987         * Modules/webdatabase/DatabaseTracker.h:
2988
2989 2013-03-11  Morten Stenshorne  <mstensho@opera.com>
2990
2991         Don't rely on the fact that StaticPosition happens to be defined as 0
2992         https://bugs.webkit.org/show_bug.cgi?id=110123
2993
2994         Also made the expression slightly less convoluted.
2995
2996         Reviewed by Alexey Proskuryakov.
2997
2998         No new tests. This is just code cleanup.
2999
3000         * rendering/RenderObject.cpp:
3001         (WebCore::RenderObject::containingBlock):
3002
3003 2013-03-11  Adam Barth  <abarth@webkit.org>
3004
3005         Unreviewed attempt to fix build after http://trac.webkit.org/changeset/145421.
3006
3007         * html/HTMLPlugInImageElement.cpp:
3008
3009 2013-03-05  Ojan Vafai  <ojan@chromium.org>
3010
3011         Intrinsic width keyword values don't work for tables
3012         https://bugs.webkit.org/show_bug.cgi?id=111515
3013
3014         Reviewed by Julien Chaffraix.
3015
3016         Tests: fast/css-intrinsic-dimensions/css-tables.html
3017                fast/css-intrinsic-dimensions/tables.html
3018
3019         * rendering/RenderBox.cpp:
3020         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
3021         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3022         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3023         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
3024         * rendering/RenderBox.h:
3025         Pass in the border and padding as an argument since RenderTable needs
3026         to pass in a different value. Unfortunately, the math doesn't work out right
3027         in the positioned/replaced cases if we just pass 0. We need to pass in the correct
3028         border and padding and then subtract it from the result.
3029
3030         * rendering/RenderTable.cpp:
3031         (WebCore::RenderTable::updateLogicalWidth):
3032         Compute intrinsic widths as well as specified ones. Down the road
3033         we may want to consider having intrinsic width values return true for
3034         isSpecified.
3035
3036         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
3037         Compute intrinsic widths as well.
3038
3039         (WebCore::RenderTable::computeIntrinsicLogicalWidths):
3040         Implement this method so that the RenderBox::computeIntrinsicLogicalWidthUsing
3041         gets the right intrinsic values instead of the preferred values.
3042
3043         (WebCore::RenderTable::computePreferredLogicalWidths):
3044         * rendering/RenderTable.h:
3045
3046 2013-03-11  Stephen Chenney  <schenney@chromium.org>
3047
3048         HTMLInputElement can delete an ImageLoader while it's still needed
3049         https://bugs.webkit.org/show_bug.cgi?id=110621
3050
3051         Reviewed by Darin Adler.
3052
3053         ImageLoader objects may fire events for HTMLInputElements that are of
3054         type ImageInputType that own the loader. These events may cause script
3055         to run that changes the type of the input element and hence causes the
3056         ImageLoader to be deleted, while the image loader is still processing
3057         the event dispatch. Bad things ensue.
3058
3059         This change moves ownership of the ImageLoader from the ImageInputType
3060         onto the HTMLImageElement which is already protected from deletion during
3061         event processing.
3062
3063         Test: fast/forms/image/image-error-event-modifies-type-crash.html
3064
3065         * html/HTMLInputElement.cpp:
3066         (WebCore::HTMLInputElement::imageLoader): Method to return the
3067           ImageLoader, creating it if not already created.
3068         * html/HTMLInputElement.h:
3069         (WebCore::HTMLInputElement::hasImageLoader): Return true if the
3070           ImageLoader has been created.
3071         (HTMLInputElement): Define ImageLoader access methods and the OwnPtr
3072           for the HTMLImageLoader.
3073         * html/ImageInputType.cpp:
3074         (WebCore::ImageInputType::srcAttributeChanged): Use the element's ImageLoader.
3075         (WebCore::ImageInputType::attach): Use the element's ImageLoader.
3076         (WebCore::ImageInputType::willMoveToNewOwnerDocument): Use the element's ImageLoader.
3077         (WebCore::ImageInputType::height): Use the element's ImageLoader.
3078         (WebCore::ImageInputType::width): Use the element's ImageLoader.
3079         * html/ImageInputType.h:
3080         (ImageInputType): Remove the declaration of the ImageLoader.
3081
3082 2013-03-11  Alok Priyadarshi  <alokp@chromium.org>
3083
3084         Revert "Mark GraphicsLayers as opaque when possible"
3085
3086         This reverts commit 0a4d3c2d8a0373aa9e5bd9209885137a13a7f0e0.
3087
3088         REGRESSION (r143626): http://chainlove.com shows garbage tiles on Mac
3089         https://bugs.webkit.org/show_bug.cgi?id=112043
3090
3091         Unreviewed, rolling out r143626.
3092
3093         * rendering/RenderBox.cpp:
3094         * rendering/RenderBox.h:
3095         (RenderBox):
3096         * rendering/RenderBoxModelObject.h:
3097         (RenderBoxModelObject):
3098         * rendering/RenderLayer.cpp:
3099         * rendering/RenderLayer.h:
3100         (RenderLayer):
3101         * rendering/RenderLayerBacking.cpp:
3102         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3103         * rendering/RenderLayerModelObject.h:
3104         (RenderLayerModelObject):
3105
3106 2013-03-11  Dean Jackson  <dino@apple.com>
3107
3108         Plugins created during user gestures (or soon after) should not be snapshotted
3109         https://bugs.webkit.org/show_bug.cgi?id=111975
3110
3111         Reviewed by Tim Horton.
3112
3113         There are sites which create plugins in response to user actions, such as clicking
3114         on an image that is acting like a poster frame. In those cases we should never snapshot.
3115
3116         There are some other sites which also create plugins in response to user actions,
3117         but don't necessarily create the content themselves. Instead they run some script
3118         that injects an iframe, and the frame loads a plugin. In order to make sure we don't
3119         snapshot in those cases, we're adding the concept of a blessed plugin. Anything that
3120         is created soon after a *handled* user gesture is not snapshotted. To do this we
3121         mark a timestamp in the document when we've called an event listener for a user
3122         gesture. The plugin element then compares its creation time with the most recent
3123         user action time.
3124
3125         * dom/Document.cpp:
3126         (WebCore::Document::Document): Initialise new timestamp.
3127         (WebCore::Document::resetLastHandledUserGestureTimestamp): Sets the member variable
3128             to the current time.
3129         * dom/Document.h:
3130         (WebCore::Document::lastHandledUserGestureTimestamp): Getter.
3131
3132         * dom/EventTarget.cpp:
3133         (WebCore::EventTarget::fireEventListeners): If there were some event listeners and
3134             we were processing a user gesture, then reset the timestamp in the document.
3135
3136         * html/HTMLPlugInImageElement.cpp:
3137         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remember if we were created
3138             during a user gesture.
3139         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Start the plugin
3140             if we were created during a user gesture, or if we are close enough in time
3141             to a listener that fired in relation to a user gesture.
3142         * html/HTMLPlugInImageElement.h: New private member flag indicating if we were
3143             in a user gesture when constructed.
3144
3145 2013-03-11  Jeffrey Pfau  <jpfau@apple.com>
3146
3147         List cache partitions as units instead of as their contents
3148         https://bugs.webkit.org/show_bug.cgi?id=111909
3149
3150         Reviewed by Maciej Stachowiak.
3151
3152         Not possible to test with current automated test tools, must be tested manually.
3153
3154         * loader/cache/MemoryCache.cpp:
3155         (WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible
3156
3157 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
3158
3159         Chromium build fix. Forked files strike again.
3160
3161         * platform/network/chromium/ResourceHandle.cpp:
3162         (WebCore::ResourceHandle::firstRequest):
3163
3164 2013-03-11  James Robinson  <jamesr@chromium.org>
3165
3166         Fix typo from r145399. Rubber stamped by Abhishek Arya.
3167
3168         * rendering/svg/RenderSVGViewportContainer.h:
3169         (WebCore::toRenderSVGViewportContainer):
3170
3171 2013-03-11  Hans Muller  <hmuller@adobe.com>
3172
3173         [CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple boundaries
3174         https://bugs.webkit.org/show_bug.cgi?id=111766
3175
3176         Reviewed by Dirk Schulze.
3177
3178         Refactored the ExclusionPolygon class to enable adding support for shape-margin and shape-padding.
3179         Extracted a new FloatPolygon class which is now used by ExclusionPolygon to represent the shape's
3180         boundary. It will be used to add m_paddedPolygon and m_marginPolygon members to ExclusionPolygon
3181         in a subsequent patch.
3182
3183         No new tests. This is strictly a refactoring of the existing code.
3184
3185         * CMakeLists.txt:
3186         * GNUmakefile.list.am:
3187         * WebCore.gypi:
3188         * WebCore.vcproj/WebCore.vcproj:
3189         * WebCore.xcodeproj/project.pbxproj:
3190         * platform/graphics/FloatPolygon.cpp: Factored out of Source/WebCore/rendering/ExclusionPolygon.cpp.
3191         (WebCore::determinant):
3192         (WebCore::areCollinearPoints):
3193         (WebCore::areCoincidentPoints):
3194         (WebCore::isPointOnLineSegment):
3195         (WebCore::nextVertexIndex):
3196         (WebCore::FloatPolygon::FloatPolygon):
3197         (WebCore::FloatPolygon::findNextEdgeVertexIndex):
3198         (WebCore::FloatPolygon::overlappingEdges):
3199         (WebCore::leftSide):
3200         (WebCore::FloatPolygon::contains):
3201         (WebCore::VertexPair::overlapsRect):
3202         (WebCore::VertexPair::intersection):
3203         * platform/graphics/FloatPolygon.h: Factored out of Source/WebCore/rendering/ExclusionPolygon.h.
3204         (FloatPolygon):
3205         (WebCore::FloatPolygon::vertexAt):
3206         (WebCore::FloatPolygon::numberOfVertices):
3207         (WebCore::FloatPolygon::fillRule):
3208         (WebCore::FloatPolygon::edgeAt):
3209         (WebCore::FloatPolygon::numberOfEdges):
3210         (WebCore::FloatPolygon::boundingBox):
3211         (WebCore::FloatPolygon::isEmpty):
3212         (VertexPair):
3213         (WebCore::VertexPair::~VertexPair):
3214         (WebCore::VertexPair::minX):
3215         (WebCore::VertexPair::minY):
3216         (WebCore::VertexPair::maxX):
3217         (WebCore::VertexPair::maxY):
3218         (FloatPolygonEdge):
3219         (WebCore::FloatPolygonEdge::previousEdge):
3220         (WebCore::FloatPolygonEdge::nextEdge):
3221         (WebCore::FloatPolygonEdge::polygon):
3222         (WebCore::FloatPolygonEdge::vertexIndex1):
3223         (WebCore::FloatPolygonEdge::vertexIndex2):
3224         (WebCore::FloatPolygonEdge::edgeIndex):
3225         * rendering/ExclusionPolygon.cpp: Now depends on FloatPolygon.
3226         (EdgeIntersection):
3227         (WebCore::leftSide):
3228         (WebCore::computeXIntersection):
3229         (WebCore::getVertexIntersectionVertices):
3230         (WebCore::computeXIntersections):
3231         (WebCore::computeOverlappingEdgeXProjections):
3232         (WebCore::ExclusionPolygon::getExcludedIntervals):
3233         (WebCore::ExclusionPolygon::getIncludedIntervals):
3234         (WebCore::firstFitRectInPolygon):
3235         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
3236         * rendering/ExclusionPolygon.h: Now depends on FloatPolygon.
3237         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
3238         (ExclusionPolygon):
3239         (WebCore::ExclusionPolygon::ExclusionPolygon):
3240
3241 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
3242
3243         Roll out part of r144671.
3244
3245         ResourceHandle::firstRequest() should not be const(), because it returns a
3246         non-const reference.        
3247
3248         * platform/network/ResourceHandle.cpp:
3249         (WebCore::ResourceHandle::firstRequest):
3250         * platform/network/ResourceHandle.h:
3251
3252 2013-01-30  Jer Noble  <jer.noble@apple.com>
3253
3254         Mac: Cmd-w should close full screen window.
3255         https://bugs.webkit.org/show_bug.cgi?id=108406
3256
3257         Reviewed by Darin Adler.
3258
3259         Pass performClose: requests on to the owning window controller.
3260
3261         * platform/mac/WebCoreFullScreenWindow.mm:
3262         (-[WebCoreFullScreenWindow performClose:]):
3263
3264 2013-03-11  Xiyuan Xia  <xiyuan@chromium.org>
3265
3266         [Chromium] chromium/linux breaks expectation of select popup background due to bad UA css rules
3267         https://bugs.webkit.org/show_bug.cgi?id=111873
3268
3269         Reviewed by Tony Chang.
3270
3271         On linux the default <select> background color is too dark to use as the
3272         popup background color.  Last fixes:
3273         https://bugs.webkit.org/show_bug.cgi?id=54115 and
3274         https://bugs.webkit.org/show_bug.cgi?id=56023
3275         attempt to fix the problem by applying a lighter background using
3276         special <option> selector. This breaks expectations of some websites.
3277
3278         This CL reverts the bad UA css rules above and provides the lighter
3279         background color if <select> and <option> elements are using the default
3280         background.
3281
3282         No new tests, this tests <select> popups and can be verified by ManualTests/select-scroll.html.
3283
3284         * css/themeChromiumLinux.css:
3285         (select):
3286         * platform/PopupMenuStyle.h:
3287         (WebCore::PopupMenuStyle::PopupMenuStyle):
3288         (WebCore::PopupMenuStyle::backgroundColorType):
3289         (PopupMenuStyle):
3290         * platform/chromium/PopupListBox.cpp:
3291         (WebCore::PopupListBox::paintRow):
3292         * rendering/RenderMenuList.cpp:
3293         (WebCore::RenderMenuList::itemStyle):
3294         (WebCore::RenderMenuList::getItemBackgroundColor):
3295         * rendering/RenderMenuList.h:
3296         (RenderMenuList):
3297         * rendering/RenderSearchField.cpp:
3298         (WebCore::RenderSearchField::menuStyle):
3299         * rendering/RenderThemeChromiumDefault.cpp:
3300         (WebCore::RenderThemeChromiumDefault::systemColor):
3301
3302 2013-03-11  James Robinson  <jamesr@chromium.org>
3303
3304         Compile fix. Rubber-stamp by Eric Seidel.
3305
3306         * html/shadow/MediaControlElements.cpp:
3307         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3308
3309 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
3310
3311         Fix build for r145397 (part 2)
3312
3313         Unreviewed.
3314
3315         * html/track/TextTrackCue.cpp:
3316         (WebCore::TextTrackCue::getDisplayTree):
3317
3318 2013-03-11  Dima Gorbik  <dgorbik@apple.com>
3319
3320         Fix build for r145397
3321
3322         Unreviewed.
3323
3324         * html/shadow/MediaControls.cpp:
3325         (WebCore::MediaControls::createTextTrackDisplay):
3326         * html/shadow/MediaControlsChromium.cpp:
3327         (WebCore::MediaControlsChromium::createTextTrackDisplay):
3328         * html/shadow/MediaControlsGtk.cpp:
3329         (WebCore::MediaControlsGtk::createTextTrackDisplay):
3330
3331 2013-03-11  Abhishek Arya  <inferno@chromium.org>
3332
3333         Add ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
3334         https://bugs.webkit.org/show_bug.cgi?id=112060
3335
3336         Reviewed by Eric Seidel.
3337
3338         * Modules/geolocation/Geolocation.cpp:
3339         (WebCore::Geolocation::document):
3340         * accessibility/AccessibilityMenuList.h:
3341         (WebCore::toAccessibilityMenuList):
3342         * accessibility/AccessibilityNodeObject.h:
3343         (WebCore::toAccessibilityNodeObject):
3344         * accessibility/AccessibilityRenderObject.h:
3345         (WebCore::toAccessibilityRenderObject):
3346         * accessibility/AccessibilitySVGRoot.h:
3347         (WebCore::toAccessibilitySVGRoot):
3348         * accessibility/AccessibilitySpinButton.h:
3349         (WebCore::toAccessibilitySpinButton):
3350         (WebCore::toAccessibilitySpinButtonPart):
3351         * accessibility/AccessibilityTable.h:
3352         (WebCore::toAccessibilityTable):
3353         * css/StyleRule.h:
3354         (WebCore::toStyleRuleMedia):
3355         (WebCore::toStyleRuleSupports):
3356         (WebCore::toStyleRuleRegion):
3357         * dom/EventContext.h:
3358         (WebCore::toTouchEventContext):
3359         * fileapi/File.h:
3360         (WebCore::toFile):
3361         * html/HTMLElement.cpp:
3362         (WebCore::HTMLElement::insertAdjacentElement):
3363         (WebCore::contextElementForInsertion):
3364         * html/HTMLMediaElement.h:
3365         (WebCore::toMediaElement):
3366         * html/HTMLMeterElement.h:
3367         (WebCore::toHTMLMeterElement):
3368         * html/HTMLOptionElement.cpp:
3369         (WebCore::toHTMLOptionElement):
3370         * html/HTMLProgressElement.cpp:
3371         (WebCore::HTMLProgressElement::renderProgress):
3372         * html/HTMLProgressElement.h:
3373         (WebCore::toHTMLProgressElement):
3374         * html/HTMLSelectElement.h:
3375         (WebCore::toHTMLSelectElement):
3376         * html/HTMLTableCellElement.cpp:
3377         (WebCore::toHTMLTableCellElement):
3378         * html/HTMLTextFormControlElement.h:
3379         (WebCore::toHTMLTextFormControlElement):
3380         * html/PluginDocument.h:
3381         (WebCore::toPluginDocument):
3382         * html/shadow/DetailsMarkerControl.cpp:
3383         (WebCore::DetailsMarkerControl::summaryElement):
3384         * html/shadow/HTMLContentElement.h:
3385         (WebCore::toHTMLContentElement):
3386         * html/shadow/HTMLShadowElement.h:
3387         (WebCore::toHTMLShadowElement):
3388         * html/shadow/TextFieldDecorationElement.cpp:
3389         (WebCore::TextFieldDecorationElement::hostInput):
3390         * page/DOMWindow.cpp:
3391         (WebCore::DOMWindow::document):
3392         * rendering/InlineTextBox.h:
3393         (WebCore::toInlineTextBox):
3394         * rendering/RenderHTMLCanvas.h:
3395         (WebCore::toRenderHTMLCanvas):
3396         * rendering/RenderScrollbar.h:
3397         (WebCore::toRenderScrollbar):
3398         * rendering/RenderTextFragment.h:
3399         (WebCore::toRenderTextFragment):
3400         * rendering/mathml/RenderMathMLOperator.h:
3401         (WebCore::toRenderMathMLOperator):
3402         * rendering/svg/RenderSVGTextPath.h:
3403         (WebCore::toRenderSVGTextPath):
3404         * rendering/svg/RenderSVGViewportContainer.h:
3405         (WebCore::toRenderSVGViewportContainer):
3406         * svg/graphics/SVGImageChromeClient.h:
3407         (WebCore::toSVGImageChromeClient):
3408
3409 2013-03-11  Adam Barth  <abarth@webkit.org>
3410
3411         Factor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
3412         https://bugs.webkit.org/show_bug.cgi?id=112057
3413
3414         Reviewed by Eric Seidel.
3415
3416         Simulating the HTML tree builder is a separate concern from parsing on
3417         the background thread. We plan to re-use the tree builder simulator for
3418         the view-source parser, for example. Also, having the simulator as a
3419         separate object will make it easier to fix
3420         https://bugs.webkit.org/show_bug.cgi?id=109764.
3421
3422         * CMakeLists.txt:
3423         * GNUmakefile.list.am:
3424         * Target.pri:
3425         * WebCore.gypi:
3426         * WebCore.vcproj/WebCore.vcproj:
3427         * html/parser/BackgroundHTMLParser.cpp:
3428         (WebCore):
3429         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3430         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3431         * html/parser/BackgroundHTMLParser.h:
3432         (BackgroundHTMLParser):
3433
3434 2013-02-26  Dima Gorbik  <dgorbik@apple.com>
3435
3436         Not all properties apply to the '::cue' pseudo-element
3437         https://bugs.webkit.org/show_bug.cgi?id=110705
3438
3439         Reviewed by Eric Carlson.
3440
3441         Background properties are not inherited and they were not applied to right elements.
3442         Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
3443         container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
3444         Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
3445         to this container internally. m_cueContainer is removed because it is no longer needed.
3446         m_allDocumentNodes container was renamed to m_cueBackgroundBox.
3447
3448         Existing tests modified to cover this case.
3449
3450         * css/RuleSet.h:
3451         (WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
3452         * css/StyleResolver.cpp:
3453         (WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
3454         * css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
3455         (video::cue): 
3456         * html/shadow/MediaControlElements.cpp:
3457         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3458         * html/shadow/MediaControlElements.h:
3459         (MediaControlTextTrackContainerElement):
3460         * html/shadow/MediaControls.cpp:
3461         (WebCore::MediaControls::createTextTrackDisplay):
3462         * html/shadow/MediaControlsChromium.cpp:
3463         (WebCore::MediaControlsChromium::createTextTrackDisplay):
3464         * html/shadow/MediaControlsGtk.cpp:
3465         (WebCore::MediaControlsGtk::createTextTrackDisplay):