Don't subtract too much from nonSilentFramesToProcess
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-25  Raymond Toy  <rtoy@google.com>
2
3         Don't subtract too much from nonSilentFramesToProcess
4         https://bugs.webkit.org/show_bug.cgi?id=107966
5
6         Reviewed by Kenneth Russell.
7
8         No new tests.
9
10         * Modules/webaudio/AudioScheduledSourceNode.cpp:
11         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
12
13 2013-01-25  Roger Fong  <roger_fong@apple.com>
14
15         Unreviewed. Windows build fix by Dean.
16
17         * css/plugIns.css:
18         (object):
19
20 2013-01-25  Dima Gorbik  <dgorbik@apple.com>
21
22         Support language WebVTT Nodes
23         https://bugs.webkit.org/show_bug.cgi?id=107907
24
25         Reviewed by Eric Carlson.
26
27         Language stack and WebVTT language nodes are added as 
28         required by specs.
29
30         Test: media/track/track-css-matching-lang.html
31
32         * html/track/TextTrackCue.cpp:
33         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): WebVTT language nodes should be
34         spans in DOM and the lang attribute should be set for all nodes if applicable.
35         * html/track/TextTrackCue.h:
36         (WebCore::TextTrackCue::langElementTagName):
37         (TextTrackCue):
38         (WebCore::TextTrackCue::langAttributeName):
39         * html/track/WebVTTParser.cpp:
40         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): clear the language stack in case
41         we use the same parser object for multiple cues that have incorrect syntax.
42         (WebCore::isLangToken):
43         (WebCore):
44         (WebCore::WebVTTParser::constructTreeFromToken): parse lang WebVTT objects.
45         * html/track/WebVTTParser.h:
46         (WebVTTParser):
47
48 2013-01-25  Andy Estes  <aestes@apple.com>
49
50         Wrap content filtering code in an object
51         https://bugs.webkit.org/show_bug.cgi?id=107914
52
53         Reviewed by Alexey Proskuryakov.
54
55         Content filtering code currently requires explicit and somewhat complex
56         lifetime management of the WebFilterEvaluator object for correct
57         behavior. Simplify this by wrapping WebFilterEvaluator in an object and
58         have MainResourceLoader implicitly manage its lifetime by holding it in
59         an OwnPtr.
60
61         This change has benefits other than the simplified lifetime management.
62         It removes direct calls into WebKitSystemInterface from the loader, and
63         it allows us to keep a strong reference to the replacement data
64         returned from wkFilterAddData() and wkFilterDataComplete() rather than
65         relying on it being autoreleased.
66
67         * WebCore.exp.in: Updated to match changes in WebCoreSystemInterface.
68         * WebCore.xcodeproj/project.pbxproj: Added new files.
69         * loader/MainResourceLoader.cpp:
70         (WebCore::MainResourceLoader::MainResourceLoader): Removed unneeded initialization.
71         (WebCore::MainResourceLoader::~MainResourceLoader): Removed an unneeded ASSERT().
72         (WebCore::MainResourceLoader::cancel): Removed unneeded wkFilterRelease().
73         (WebCore::MainResourceLoader::responseReceived): Created a
74         ContentFilter object rather than calling wkFilterCreateInstance().
75         (WebCore::MainResourceLoader::dataReceived): Rewrote content filtering
76         logic in terms of the wrapper object. Removed any explicit lifetime
77         management.
78         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
79         (WebCore::MainResourceLoader::notifyFinished): Removed unneeded wkFilterRelease().
80         * loader/MainResourceLoader.h:
81         * platform/ContentFilter.h: Added.
82         * platform/mac/ContentFilterMac.mm: Added.
83         (WebCore::ContentFilter::create):
84         (WebCore::ContentFilter::ContentFilter):
85         (WebCore::ContentFilter::isEnabled): Returned the result of wkFilterIsManagedSession().
86         (WebCore::ContentFilter::addData): Called wkFilterAddData() and stored
87         the resulting NSData in m_replacementData.
88         (WebCore::ContentFilter::finishedAddingData): Called wkFilterDataComplete()
89         and stored the resulting NSData in m_replacementData.
90         (WebCore::ContentFilter::needsMoreData): Returned the result of wkFilterIsBuffering().
91         (WebCore::ContentFilter::didBlockData): Returned the result of wkFilterWasBlocked().
92         (WebCore::ContentFilter::getReplacementData): Returned the data stored in m_replacementData.
93         * platform/mac/WebCoreSystemInterface.h: Updated to reflect changes in WKSI.
94         * platform/mac/WebCoreSystemInterface.mm: Ditto.
95
96         * WebCore.exp.in:
97         * WebCore.xcodeproj/project.pbxproj:
98         * loader/MainResourceLoader.cpp:
99         (WebCore::MainResourceLoader::MainResourceLoader):
100         (WebCore::MainResourceLoader::~MainResourceLoader):
101         (WebCore::MainResourceLoader::cancel):
102         (WebCore::MainResourceLoader::responseReceived):
103         (WebCore::MainResourceLoader::dataReceived):
104         (WebCore::MainResourceLoader::didFinishLoading):
105         (WebCore::MainResourceLoader::notifyFinished):
106         * loader/MainResourceLoader.h:
107         (MainResourceLoader):
108         * platform/ContentFilter.h: Added.
109         (WebCore):
110         (ContentFilter):
111         * platform/mac/ContentFilterMac.mm: Added.
112         (WebCore):
113         (WebCore::ContentFilter::create):
114         (WebCore::ContentFilter::ContentFilter):
115         (WebCore::ContentFilter::isEnabled):
116         (WebCore::ContentFilter::addData):
117         (WebCore::ContentFilter::finishedAddingData):
118         (WebCore::ContentFilter::needsMoreData):
119         (WebCore::ContentFilter::didBlockData):
120         (WebCore::ContentFilter::getReplacementData):
121         * platform/mac/WebCoreSystemInterface.h:
122         * platform/mac/WebCoreSystemInterface.mm:
123
124 2013-01-25  Simon Fraser  <simon.fraser@apple.com>
125
126         When the FrameView has a non-opaque background color, make sure the TileCache tiles are not opaque
127         https://bugs.webkit.org/show_bug.cgi?id=107989
128
129         Reviewed by Dean Jackson.
130
131         If a WKView was told to draw a transparent background, make sure that we
132         set the TileCache tiles to be non-opaque.
133
134         * rendering/RenderLayerBacking.cpp:
135         (WebCore::RenderLayerBacking::updateRootLayerConfiguration):
136
137 2013-01-25  Alexandre Elias  <aelias@chromium.org>
138
139         Call FrameView::contentsResized() when setting fixed layout size
140         https://bugs.webkit.org/show_bug.cgi?id=107922
141
142         Reviewed by James Robinson.
143
144         In fixed layout mode, we should be calling contentsResized() when the
145         fixed layout size is changed; on the other hand, we don't need to layout
146         when the visible contents size changes.
147
148         This fixes test WebFrameTest::FixedLayoutInitializeAtMinimumPageScale.
149
150         * page/FrameView.cpp:
151         (WebCore::FrameView::visibleContentsResized):
152         * platform/ScrollView.cpp:
153         (WebCore::ScrollView::setFixedLayoutSize):
154         (WebCore::ScrollView::setUseFixedLayout):
155
156 2013-01-25  Tony Gentilcore  <tonyg@chromium.org>
157
158         Fix an ASSERT in BackgroundHTMLParser::appendPartial
159         https://bugs.webkit.org/show_bug.cgi?id=107983
160
161         Reviewed by Eric Seidel.
162
163         The complier may create a temporary for the isolatedCopy of the source string. This could cause the refCount of the
164         StringImpl to be greater than one when appendPartial is invoked on the background thread.
165         This patch ensures the temporary is gone by that time which fixes the ASSERT in numerous layout tests.
166
167         No new tests because covered by existing tests.
168
169         * html/parser/HTMLDocumentParser.cpp:
170         (WebCore::HTMLDocumentParser::append):
171
172 2013-01-25  Dean Jackson  <dino@apple.com>
173
174         Add a user agent stylesheet for plugins
175         https://bugs.webkit.org/show_bug.cgi?id=107890
176
177         Reviewed by Alexey Proskuryakov.
178
179         As a step along the way to providing a Shadow DOM for plug-in elements, add a
180         User Agent stylesheet that is loaded when an embed or object element is
181         in the document. At the moment the stylesheet is empty.
182
183         The stylesheet can be overridden by the RenderTheme or the ChromeClient, allowing
184         ports to provide a custom appearance. This involved hooking up some virtual methods
185         on ChromeClient, the stubs of which are already implemented in WK2.
186         As a drive-by, since snapshotted plugins will need some localization I've also
187         exposed the ChromeClient methods to get text labels.
188
189         * CMakeLists.txt: Add plugIns.css.
190         * DerivedSources.make: Ditto.
191         * DerivedSources.pri: Ditto.
192         * GNUmakefile.am: Ditto.
193         * WebCore.gyp/WebCore.gyp: Ditto.
194         * WebCore.vcproj/WebCore.vcproj: Ditto.
195         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
196         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
197         * WebCore.xcodeproj/project.pbxproj: Ditoo.
198         * css/StyleResolver.cpp:
199         (WebCore::ensureDefaultStyleSheetsForElement): Load and inject new plugInsStyleSheet if there is an object or embed element.
200         * css/plugIns.css: Added. Empty for now.
201         * page/ChromeClient.h: New methods for querying the client.
202         (WebCore::ChromeClient::plugInStartLabelTitle):
203         (WebCore::ChromeClient::plugInStartLabelSubtitle):
204         (WebCore::ChromeClient::plugInExtraStyleSheet):
205         * rendering/RenderTheme.h:
206         (WebCore::RenderTheme::extraPlugInsStyleSheet): Allow the theme to provide an extra stylesheet.
207
208 2013-01-25  Eric Carlson  <eric.carlson@apple.com>
209
210         Adding a text track should not make controls visible
211         https://bugs.webkit.org/show_bug.cgi?id=107956
212
213         Reviewed by Dean Jackson.
214
215         Test: media/media-captions-no-controls.html
216
217         * html/HTMLMediaElement.cpp:
218         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Call updateTextTrackDisplay.
219         (WebCore::HTMLMediaElement::updateTextTrackDisplay): New, call mediaControls->updateTextTrackDisplay()
220             if we have controls.
221         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Call updateTextTrackDisplay.
222         (WebCore::HTMLMediaElement::createMediaControls): Hide controls if they should not be 
223             visible. Minor drive by cleanup.
224         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Drive by cleanup, pull the three lines
225             from updateClosedCaptionsControls inline and delete it because this was the only caller.
226         * html/HTMLMediaElement.h:
227
228 2013-01-25  Elliott Sprehn  <esprehn@chromium.org>
229
230         Consider all ancestors not just parentElement when disconnecting frames
231         https://bugs.webkit.org/show_bug.cgi?id=107769
232
233         Reviewed by Eric Seidel.
234
235         Previous we only used the parentElement of the frame owner to decide if
236         we should disconnect the frame, but this means if you reparent a subtree
237         that contains multiple frames from inside an unload handler we'll disconnect
238         the subframes even though they're now in a different part of the document.
239
240         We can fix this by using containsIncludingShadowDOM, and also simplify the
241         code by removing ChildFrameDisconnector::Target.
242
243         Test: fast/frames/unload-reparent-sibling-frame.html
244
245         * dom/ContainerNodeAlgorithms.cpp:
246         * dom/ContainerNodeAlgorithms.h:
247         (ChildFrameDisconnector):
248         (ChildFrameDisconnector::Target): Removed.
249         (WebCore::ChildFrameDisconnector::collectFrameOwners):
250         (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):
251
252 2013-01-25  Tony Chang  <tony@chromium.org>
253
254         Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated
255         https://bugs.webkit.org/show_bug.cgi?id=104997
256
257         Reviewed by Ojan Vafai.
258
259         Original patch by Kent Tamura:
260         When padding or border is updated for a parent block with
261         box-sizing:border-box and width, the width of its child block was not
262         updated.
263
264         The change is to look at border width specifically, not all changes to the border style
265         since changes to border color should not trigger a relayout.
266
267         Tests: fast/css/box-sizing-border-box-dynamic-padding-border-update.html
268                fast/forms/border-color-relayout.html
269                fast/forms/text/text-padding-dynamic-change.html
270
271         * rendering/RenderBox.cpp:
272         (WebCore::borderWidthChanged): Helper method to compare border widths.
273         (WebCore::RenderBox::styleDidChange):
274         If box-sizing of the old style and/or the new style is border-box and
275         padding or border is changed, apply setChildNeedsLayout(true) for child
276         boxes.
277
278 2013-01-25  Arnaud Renevier  <a.renevier@sisa.samsung.com>
279
280         Move WebGLErrorsToConsole page setting to window.internals.settings
281         https://bugs.webkit.org/show_bug.cgi?id=107218
282
283         Reviewed by Kenneth Russell.
284
285         Define webGLErrorsToConsoleEnabled as true by default. Also,
286         WebGLRenderingContext::m_synthesizedErrorsToConsole is true by default
287         and can be disabled by settings.
288
289         Add a ConsoleDisplayPreference parameter to synthesizeGLError
290         (defaults to DisplayInConsole). When called with DontDisplayInConsole,
291         an error message will not be displayed (even if
292         m_synthesizedErrorsToConsole is true).
293
294         Call synthesizeGLError with DontDisplayInConsole in case of synthetic
295         context lost.
296
297         No new tests: covered by existing tests.
298
299         * html/canvas/WebGLRenderingContext.cpp:
300         (WebCore):
301         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
302         (WebCore::WebGLRenderingContext::setupFlags):
303         (WebCore::WebGLRenderingContext::validateRenderingState):
304         (WebCore::WebGLRenderingContext::loseContextImpl):
305         (WebCore::WebGLRenderingContext::synthesizeGLError):
306         * html/canvas/WebGLRenderingContext.h:
307         * page/Settings.in:
308
309 2013-01-25  Alec Flett  <alecflett@chromium.org>
310
311         IndexedDB: Move TaskType enum to IDBDatabaseBackendInterface
312         https://bugs.webkit.org/show_bug.cgi?id=107960
313
314         Reviewed by Tony Chang.
315
316         The IDBTransactionBackendInterface class is going away,
317         this is an easy search-and-replace patch to keep these
318         changes out of more complex patches.
319
320         No new tests, just part of a refactor.
321
322         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
323         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
324         * Modules/indexeddb/IDBCursorBackendImpl.h:
325         (WebCore::IDBCursorBackendImpl::create):
326         (IDBCursorBackendImpl):
327         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
328         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
329         (WebCore::OpenCursorOperation::perform):
330         * Modules/indexeddb/IDBObjectStore.cpp:
331         (WebCore::IDBObjectStore::createIndex):
332         (WebCore::IDBObjectStore::openCursor):
333         * Modules/indexeddb/IDBObjectStore.h:
334         (WebCore::IDBObjectStore::openCursor):
335         (IDBObjectStore):
336         * Modules/indexeddb/IDBOpenDBRequest.cpp:
337         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
338         * Modules/indexeddb/IDBRequest.cpp:
339         (WebCore::IDBRequest::create):
340         (WebCore::IDBRequest::IDBRequest):
341         * Modules/indexeddb/IDBRequest.h:
342         (IDBRequest):
343         (WebCore::IDBRequest::taskType):
344         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
345         (WebCore::IDBTransactionBackendImpl::scheduleTask):
346         * Modules/indexeddb/IDBTransactionBackendImpl.h:
347         (WebCore::IDBTransactionBackendImpl::scheduleTask):
348         (IDBTransactionBackendImpl):
349         * Modules/indexeddb/IDBTransactionBackendInterface.h:
350
351 2013-01-25  Abhishek Arya  <inferno@chromium.org>
352
353         Regression(r139836): Crash in WTF::equalIgnoringCase
354         https://bugs.webkit.org/show_bug.cgi?id=107703
355
356         Reviewed by Eric Seidel.
357
358         Check |a| is a CSS_IDENT before considering it a string and
359         calling equalIgnoringCase on it. To avoid future mistakes like
360         this, add a function override for equalIgnoringCase that takes
361         CSSParserValue as a parameter and ASSERTs if that CSSParserValue
362         is not a CSS_STRING/CSS_IDENT.       
363
364         Test: fast/gradients/parse-radial-gradient-crash.html
365
366         * css/CSSParser.cpp:
367         (WebCore):
368         (WebCore::equalIgnoringCase):
369         (WebCore::CSSParser::parseAnimationName):
370         (WebCore::CSSParser::parseAnimationProperty):
371         (WebCore::CSSParser::parseDashboardRegions):
372         (WebCore::parseDeprecatedGradientPoint):
373         (WebCore::CSSParser::parseDeprecatedGradient):
374         (WebCore::CSSParser::parseLinearGradient):
375         (WebCore::CSSParser::parseRadialGradient):
376
377 2013-01-25  Chang Shu  <cshu@webkit.org>
378
379         Build broken when svg is disabled.
380         https://bugs.webkit.org/show_bug.cgi?id=92393.
381
382         Unreviewed build fix.
383
384         * css/StyleResolver.cpp:
385         (WebCore::StyleResolver::applyProperty):
386         * rendering/FilterEffectRenderer.cpp:
387         (WebCore::FilterEffectRenderer::buildReferenceFilter):
388
389 2013-01-25  Tony Gentilcore  <tonyg@chromium.org>
390
391         Abort parsing when pending location change for threaded HTML parser
392         https://bugs.webkit.org/show_bug.cgi?id=107876
393
394         Reviewed by Eric Seidel.
395
396         The main thread parser does this in canTakeNextToken. Adding this check to the threaded parser causes us to pass
397         fast/loader/location-change-aborts-parsing.html.
398
399         No new tests because covered by existing tests.
400
401         * html/parser/HTMLDocumentParser.cpp:
402         (WebCore::HTMLDocumentParser::processTokensFromBackgroundParser):
403
404 2013-01-25  Mike West  <mkwst@chromium.org>
405
406         ScriptController::executeIfJavaScriptURL incorrectly checks viewsource mode.
407         incorrectly blocks execution based on the frame's viewsource state.
408         https://bugs.webkit.org/show_bug.cgi?id=101683
409
410         Reviewed by Adam Barth.
411
412         ScriptController::executeIfJavaScriptURL currently checks whether the
413         frame in which a 'javascript:' URL might be executed is in viewsource
414         mode. This incorrectly handles the case where the viewsource attribute
415         is added after a document loads: the _frame_ is in viewsource mode, the
416         _document_ is not. The latter should control execution, not the former.
417
418         This patch drops the inViewSourceMode check from executeIfJavaScriptURL
419         entirely, as the document's viewsource state is checked in
420         canExecuteScripts, which is already called when the 'javascript:' URL is
421         passed to executeScript. The checks should remain centralized there.
422
423         Test: http/tests/security/view-source-javascript-url-in-document.html
424
425         * bindings/ScriptControllerBase.cpp:
426         (WebCore::ScriptController::executeIfJavaScriptURL):
427             Drop the incorrect check against the Frame's viewsource mode. The
428             correct check against the Document's viewsource mode is performed
429             in canExecuteScripts (which is called via executeScript).
430
431 2013-01-25  Gustavo Noronha Silva  <gns@gnome.org>
432
433         [Soup] Streamline cancellation and client checks
434         https://bugs.webkit.org/show_bug.cgi?id=107808
435
436         Reviewed by Martin Robinson.
437
438         Covered by existing tests.
439
440         * platform/network/ResourceHandle.h:
441         (ResourceHandle):
442         * platform/network/soup/ResourceHandleSoup.cpp:
443         (WebCore::ResourceHandle::cancelledOrClientless): new method to check for cancellation and lack of client.
444         (WebCore):
445         (WebCore::gotHeadersCallback): use the new method.
446         (WebCore::restartedCallback): ditto.
447         (WebCore::redirectCloseCallback): ditto.
448         (WebCore::redirectSkipCallback): ditto.
449         (WebCore::wroteBodyDataCallback): ditto.
450         (WebCore::nextMultipartResponsePartCallback): ditto.
451         (WebCore::sendRequestCallback): ditto.
452         (WebCore::networkEventCallback): ditto.
453         (WebCore::ResourceHandle::platformSetDefersLoading): ditto.
454         (WebCore::readCallback): ditto.
455
456 2013-01-25  Victor Carbune  <vcarbune@chromium.org>
457
458         Heap-use-after-free in WebCore::TextTrackCue::isActive
459         https://bugs.webkit.org/show_bug.cgi?id=104594
460
461         Reviewed by Eric Carlson.
462
463         Test: media/track/track-remove-active-cue-crash.html
464
465         * html/HTMLMediaElement.cpp:
466         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
467         (WebCore::HTMLMediaElement::textTrackAddCue):
468         (WebCore::HTMLMediaElement::textTrackRemoveCue): Remove the cue
469         from the active cue set as well.
470         * html/HTMLMediaElement.h:
471         (WebCore):
472
473 2013-01-25  Mike West  <mkwst@chromium.org>
474
475         Web Inspector: Cleanup console.* API MessageSource/Levels.
476         https://bugs.webkit.org/show_bug.cgi?id=107946
477
478         Reviewed by Pavel Feldman.
479
480         This patch does some light cleanup on sources and levels of console.*
481         messages as part of a broader effort to offer better filtering options
482         in the console. Specifically:
483
484         -   console.timeEnd and console.count now come from
485             ConsoleAPIMessageSource.
486         -   console.count is now DebugMessageLevel (to match console.timeEnd).
487         -   console.profile and console.profileEnd now comr from
488             ConsoleAPIMessageSource, and are DebugMessageLevel.
489
490         * inspector/InspectorConsoleAgent.cpp:
491         (WebCore::InspectorConsoleAgent::stopTiming):
492         (WebCore::InspectorConsoleAgent::count):
493         * inspector/InspectorProfilerAgent.cpp:
494         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
495         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
496
497 2013-01-25  Andrey Lushnikov  <lushnikov@chromium.org>
498
499         Web Inspector: highlight occurences of word in DefaultTextEditor
500         https://bugs.webkit.org/show_bug.cgi?id=105523
501
502         Reviewed by Pavel Feldman.
503
504         Highlight occurrences of selected word in DefaultTextEditor by the means of new highlight regex API.
505
506         Test: inspector/editor/text-editor-highlight-token.html
507
508         * inspector/front-end/DefaultTextEditor.js:
509         (WebInspector.TextEditorMainPanel):
510         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
511         (WebInspector.TextEditorMainPanel.TokenHighlighter): Added.
512         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype.handleSelectionChange):
513         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._regexString):
514         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._highlight):
515         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._removeHighlight):
516         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
517         * inspector/front-end/textEditor.css:
518         (.text-editor-token-highlight):
519
520 2013-01-25  Alexander Paschenko  <alexander.pashenko@lge.com>
521
522         [TexMap] Flickering after transitions on Apple HTML5 demo
523         https://bugs.webkit.org/show_bug.cgi?id=102501
524
525         Reviewed by Noam Rosenthal.
526
527         The problem is caused by inconsistent state of TextureMapperLayer's transformation matrix
528         and opacity data during and after the end of animation.
529         This patch solves the problem by introducing three additional private flags
530         to TextureMapperLayer:
531         m_shouldUpdateCurrentTransformFromGraphicsLayer,
532         m_shouldUpdateCurrentOpacityFromGraphicsLayer, and
533         m_shouldUpdateCurrentFiltersFromGraphicsLayer.
534         The latter has been introduced in order to avoid similar future problems
535         with m_currentFilters.
536         On these flags' basis, TextureMapperLayer is able to decide whether to update
537         its inner state or not.
538         These flags themselves are set based on GraphicsLayerTextureMapper's changeMask
539         which indicates what details of the state have been changed since the last sync.
540
541         No new tests - this doesn't expose any testable surface.
542         Eyes-only check has been made to ensure that the problem is gone now.
543
544         * platform/graphics/texmap/TextureMapperLayer.cpp:
545         (WebCore::TextureMapperLayer::setAnimatedTransform):
546         sets m_shouldUpdateCurrentTransformFromGraphicsLayer to false and
547         updates m_currentTransform based on the updated state from GraphicsLayerAnimation.
548         (WebCore):
549         (WebCore::TextureMapperLayer::setAnimatedOpacity):
550         sets m_shouldUpdateCurrentOpacityFromGraphicsLayer to false and
551         updates m_currentOpacity based on the updated state from GraphicsLayerAnimation.
552         (WebCore::TextureMapperLayer::setAnimatedFilters):
553         sets m_shouldUpdateCurrentFiltersFromGraphicsLayer to false and
554         updates m_currentFilters based on the updated state from GraphicsLayerAnimation.
555         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
556         sets m_shouldUpdateCurrent* flags based on GLTM's changeMask. Also illegal modification
557         of m_currentTransform that caused flickering has been removed from this method.
558         (WebCore::TextureMapperLayer::syncAnimations): updates m_currentTransform and/or
559         m_currentOpacity and/or m_currentFilters if corresponding flags allow to do so.
560         * platform/graphics/texmap/TextureMapperLayer.h:
561         (WebCore::TextureMapperLayer::TextureMapperLayer): aforementioned flags
562         get initialized in ctor.
563         (TextureMapperLayer): aforementioned flags are declared in the class.
564
565
566 2013-01-25  Marja Hölttä  <marja@chromium.org>
567
568         Refactor InspectorMemoryAgent: memory data as a map.
569
570         https://bugs.webkit.org/show_bug.cgi?id=107938
571
572         Reviewed by Yury Semikhatsky.
573
574         No new tests (no functional changes, only refactoring).
575
576         * inspector/InspectorController.cpp:
577         (WebCore::InspectorController::InspectorController):
578         (WebCore::InspectorController::getProcessMemoryDistribution):
579         (WebCore):
580         * inspector/InspectorController.h:
581         (WebCore):
582         (InspectorController):
583         * inspector/InspectorMemoryAgent.cpp:
584         (WebCore::addPlatformComponentsInfo):
585         (WebCore):
586         (WebCore::addMemoryInstrumentationDebugData):
587         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
588         (WebCore::InspectorMemoryAgent::reportMemoryUsage):
589         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionAsMap):
590         * inspector/InspectorMemoryAgent.h:
591         (InspectorMemoryAgent):
592
593 2013-01-25  Huang Dongsung  <luxtella@company100.net>
594
595         [Texmap] Refactor code related to debug border and repaint count.
596         https://bugs.webkit.org/show_bug.cgi?id=105787
597
598         Reviewed by Noam Rosenthal.
599
600         Currently, TextureMapperBackingStore, CoordinatedBackingStore and
601         GraphicsLayerTextureMapper have duplicated code to draw debug border or
602         repaint count. This patch refactors that all platform layers draw debug
603         border and repaint count in the consistent way:
604         TextureMapper::drawBorder() and TextureMapper::drawRepaintCounter().
605
606         There are three big changes:
607         1. TextureMapperLayer has the debug visuals like GraphicsLayer.
608         Both debug border and repaint count are called as the debug visuals.
609         2. We use the same color and width to Mac port because we get that info using
610         GraphicsLayer::updateDebugIndicators().
611         3. Draw borders for background color, backing store and contents layer,
612         while drawing repaint count only for backing store.
613
614         No new tests. This functionality is for debugging, so we cannot test using DRT.
615
616         * platform/graphics/cairo/GraphicsContext3DPrivate.h:
617         * platform/graphics/qt/GraphicsContext3DQt.cpp:
618         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
619         (WebCore::GraphicsLayerTextureMapper::setShowDebugBorder):
620         (WebCore):
621         (WebCore::GraphicsLayerTextureMapper::setShowRepaintCounter):
622         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
623         (WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCountIfNeeded):
624         (WebCore::GraphicsLayerTextureMapper::setDebugBorder):
625         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
626         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
627         (WebCore::GraphicsLayerTextureMapper::setRepaintCount):
628         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
629         (GraphicsLayerTextureMapper):
630         (WebCore::GraphicsLayerTextureMapper::debugBorderColor):
631         (WebCore::GraphicsLayerTextureMapper::debugBorderWidth):
632         * platform/graphics/texmap/TextureMapper.h:
633         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
634         (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
635         (WebCore):
636         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
637         (WebCore::TextureMapperTiledBackingStore::drawBorder):
638             Override TextureMapperPlatformLayer::drawBorder() to draw the border
639             for each tile.
640         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
641         * platform/graphics/texmap/TextureMapperBackingStore.h:
642         (WebCore::TextureMapperBackingStore::drawRepaintCounter):
643         (TextureMapperBackingStore):
644         (TextureMapperTiledBackingStore):
645         * platform/graphics/texmap/TextureMapperGL.cpp:
646         (WebCore::TextureMapperGL::drawRepaintCounter):
647         * platform/graphics/texmap/TextureMapperGL.h:
648         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
649         (WebCore::TextureMapperImageBuffer::drawBorder):
650         (WebCore):
651         (WebCore::TextureMapperImageBuffer::drawRepaintCounter):
652         * platform/graphics/texmap/TextureMapperImageBuffer.h:
653         (TextureMapperImageBuffer):
654         * platform/graphics/texmap/TextureMapperLayer.cpp:
655         (WebCore::TextureMapperLayer::paintSelf):
656         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
657         * platform/graphics/texmap/TextureMapperLayer.h:
658         (State):
659         (WebCore::TextureMapperLayer::State::State):
660         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
661         (WebCore::TextureMapperPlatformLayer::drawBorder):
662
663 2013-01-24  Patrick Gansterer  <paroga@webkit.org>
664
665         Build fix for !ENABLE(DRAG_SUPPORT) after r140286.
666
667         * page/AutoscrollController.cpp:
668         (WebCore::AutoscrollController::autoscrollTimerFired):
669
670 2013-01-25  Ken Kania  <kkania@chromium.org>
671
672         Web Inspector: Move dispatchMouseEvent optional params after x,y
673         https://bugs.webkit.org/show_bug.cgi?id=107828
674
675         Reviewed by Pavel Feldman.
676
677         No new tests, as this just rearranges the order of arguments to make
678         JSCompiler happy. The params were rearranged in r140649 to match
679         dispatchKeyEvent's params.
680
681         * inspector/Inspector.json:
682         * inspector/InspectorInputAgent.cpp:
683         (WebCore::InspectorInputAgent::dispatchMouseEvent):
684         * inspector/InspectorInputAgent.h:
685         (InspectorInputAgent):
686
687 2013-01-25  Alexander Pavlov  <apavlov@chromium.org>
688
689         Web Inspector: [Styles] Editing a property value containing a trimmed data: URL breaks the style
690         https://bugs.webkit.org/show_bug.cgi?id=107936
691
692         Reviewed by Yury Semikhatsky.
693
694         Restore the original CSS property value before editing.
695
696         Test: inspector/styles/edit-value-with-trimmed-url.html
697
698         * inspector/front-end/StylesSidebarPane.js:
699
700 2013-01-25  Eugene Klyuchnikov  <eustas@chromium.org>
701
702         Web Inspector: [Network] Use DataGrid column alignment instead of custom styling.
703         https://bugs.webkit.org/show_bug.cgi?id=107935
704
705         Reviewed by Pavel Feldman.
706
707         On Network Panel column alignment is specified both in
708         column descriptors and in CSS stylesheet.
709
710         Only one alignment specifier should last.
711
712         * inspector/front-end/DataGrid.js:
713         (WebInspector.DataGridNode.prototype.createTD): Extracted common code.
714         (WebInspector.DataGridNode.prototype.createCell): Use "createTD". 
715         * inspector/front-end/NetworkPanel.js:
716         (WebInspector.NetworkDataGridNode.prototype._createDivInTD): Ditto.
717         * inspector/front-end/networkLogView.css: Remove exheberant rules.
718         * inspector/front-end/networkPanel.css: Fix whitespaces.
719
720 2013-01-25  Sergey Ryazanov  <serya@chromium.org>
721
722         Web Inspector: Add explanation for Console object expansion behaviour
723         https://bugs.webkit.org/show_bug.cgi?id=107793
724
725         Reviewed by Pavel Feldman.
726
727         * English.lproj/localizedStrings.js:
728         * inspector/front-end/ConsoleMessage.js:
729         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArrayOrObject):
730         * inspector/front-end/inspector.css:
731         (.object-info-state-note):
732         (.object-info-state-note::before):
733         (.object-info-state-note:hover):
734         (.section.expanded .object-info-state-note):
735         (.section.expanded .properties, .event-bar.expanded .event-properties):
736         (.pane.expanded .properties, .event-bar .event-properties):
737
738 2013-01-25  Claudio Saavedra  <csaavedra@igalia.com>
739
740         Missing files in GNUmakefile.list.am for Notifications support
741         https://bugs.webkit.org/show_bug.cgi?id=107934
742
743         Reviewed by Philippe Normand.
744
745         * GNUmakefile.list.am: Add DOMWindowNotifications.idl and
746         WorkerContextNotifications.idl to dom_binding_idls and
747         JSNotificationCustom.{cpp,h} to webcore_sources, since without
748         this the Notifications will be broken.
749
750 2013-01-25  Andrey Lushnikov  <lushnikov@chromium.org>
751
752         Web Inspector: implement search for workspace sources
753         https://bugs.webkit.org/show_bug.cgi?id=107814
754
755         Reviewed by Pavel Feldman.
756
757         Implement generic WebInspector.ContentProvider.performSearchInContent method and use it in both
758         StaticContentProvider and fileSystemWorkspaceProvider.
759
760         No new tests.
761
762         * inspector/front-end/ContentProvider.js:
763         (WebInspector.ContentProvider.performSearchInContent): Added.
764         * inspector/front-end/ContentProviders.js:
765         (WebInspector.StaticContentProvider.prototype.):
766         (WebInspector.StaticContentProvider.prototype.searchInContent):
767         * inspector/front-end/FileSystemWorkspaceProvider.js:
768         (WebInspector.FileSystemWorkspaceProvider.prototype.contentCallback):
769         (WebInspector.FileSystemWorkspaceProvider.prototype.searchInFileContent):
770
771 2013-01-25  Elliott Sprehn  <esprehn@gmail.com>
772
773         Assert the connectedSubframeCount is consistent and fix over counting
774         https://bugs.webkit.org/show_bug.cgi?id=107302
775
776         Reviewed by Alexey Proskuryakov.
777
778         Add a debug assertion that walks the subtree during frame disconnection
779         and manually counts the number of connected subframes to assert that the
780         value from Node::connectedSubframeCount() is the same as if we traversed
781         through the tree.
782
783         In fixing the places where this assertion failed I made document destruction
784         faster by not walking the entire document looking for frames if the entire
785         frame tree has been destroyed by way of FrameLoader::detachChildren().
786         I had inadvertently introduced this improvement in r133933, but then I
787         regressed it in r140090 when we switched to counting because I didn't
788         realize we destroy the frame tree separate of frame disconnection on
789         document unload so all frames could have been destroyed but the counts
790         left on the ancestors.
791
792         I also fixed another overcounting case where the adoption agency algorithm
793         may call ContainerNode::takeAllChildrenFrom() which in turn calls
794         ContainerNode::removeAllChildren() and could have left a connected subframe
795         count on the node even though all the frames had been removed.
796
797         This assertion did not uncover any cases of undercounting the number of
798         frames.
799
800         This also fixes a rare edge case where removeChild of an iframe that
801         was already being unloaded would not unload the frame until the top level
802         unload was done, and a reparenting of the iframe would not cause it to load.
803
804         Test: fast/frames/reparent-in-unload-contentdocument.html
805
806         * dom/ContainerNode.cpp:
807         (WebCore::ContainerNode::removeAllChildren):
808         (WebCore::ContainerNode::parserInsertBefore):
809         (WebCore::ContainerNode::parserRemoveChild):
810         (WebCore::ContainerNode::parserAppendChild):
811         * dom/ContainerNodeAlgorithms.cpp:
812         (WebCore):
813         (WebCore::assertConnectedSubframeCountIsConsistent):
814         * dom/ContainerNodeAlgorithms.h:
815         (WebCore):
816         (WebCore::ChildFrameDisconnector::disconnect):
817         * dom/Node.cpp:
818         (WebCore::Node::updateAncestorConnectedSubframeCountForRemoval):
819         (WebCore):
820         (WebCore::Node::updateAncestorConnectedSubframeCountForInsertion):
821         * dom/Node.h:
822         (Node):
823         * html/HTMLFrameOwnerElement.cpp:
824         (WebCore::HTMLFrameOwnerElement::clearContentFrame):
825         (WebCore):
826         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
827         * html/HTMLFrameOwnerElement.h:
828         (HTMLFrameOwnerElement):
829
830 2013-01-25  Pavel Feldman  <pfeldman@chromium.org>
831
832         Web Inspector: inspector slows down pages with many anonymous scripts.
833         https://bugs.webkit.org/show_bug.cgi?id=107928
834
835         Reviewed by Alexander Pavlov.
836
837         The problem was that workspace code introduced n^2 complexity for unique URI calculation.
838
839         * inspector/front-end/SimpleWorkspaceProvider.js:
840         (WebInspector.SimpleWorkspaceProvider):
841         (WebInspector.SimpleWorkspaceProvider.prototype.uniqueURI):
842
843 2013-01-25  Jussi Kukkonen  <jussi.kukkonen@intel.com>
844
845         [CMake][EFL] Build ThirdParty/leveldb when IndexedDB is enabled
846         https://bugs.webkit.org/show_bug.cgi?id=106443
847
848         Reviewed by Laszlo Gombos.
849
850         LevelDB is now included in ThirdParty. Use it when IndexDB is
851         enabled for EFL.
852
853         * CMakeLists.txt:
854         Build ThirdParty/leveldb when WTF_USE_LEVELDB is set
855
856 2013-01-25  Kent Tamura  <tkent@chromium.org>
857
858         INPUT_MULTIPLE_FIELDS_UI: Inconsistent value of aria-valuetext attribute
859         https://bugs.webkit.org/show_bug.cgi?id=107897
860
861         Reviewed by Kentaro Hara.
862
863         aria-valuetext and aria-valuenow attributes had inconsistent values in
864         a case of initial empty state and a case that a user clears a field.
865
866         - aria-valuetext attribute should have "blank" message in the initial
867           empty state.
868         - aria-valuenow attribute should be removed in the cleared empty state.
869
870         Also, we have a bug that aira-valuenow had a symbolic value such as "AM"
871         "January". It should always have a numeric value according to the
872         specification.
873         http://www.w3.org/TR/wai-aria/states_and_properties#aria-valuenow
874
875         No new tests. Updates fast/forms/*-multiple-fields/*-multiple-fields-ax-aria-attributes.html.
876
877         * html/shadow/DateTimeFieldElement.cpp:
878         (WebCore::DateTimeFieldElement::DateTimeFieldElement):
879         Set "blank" message to aria-valuetext attribute.
880         (WebCore::DateTimeFieldElement::updateVisibleValue):
881         aria-valuenow attribute should be a numeric value. Apply String::number
882         to the return value of valueForARIAValueNow.
883         Remove aria-valuenow attribute if nothing is selected.
884         (WebCore::DateTimeFieldElement::valueForARIAValueNow):
885         Added.
886         * html/shadow/DateTimeFieldElement.h:
887         (DateTimeFieldElement): Declare valueForARIAValueNow.
888
889         * html/shadow/DateTimeSymbolicFieldElement.cpp:
890         (WebCore::DateTimeSymbolicFieldElement::valueForARIAValueNow):
891         Added. Returns 1 + internal selection index.
892         For example, the function returns 1 for January.
893         * html/shadow/DateTimeSymbolicFieldElement.h:
894         (DateTimeSymbolicFieldElement): Declare valueForARIAValueNow.
895
896 2013-01-24  Hans Wennborg  <hans@chromium.org>
897
898         Disable Clang's -Wreturn-type-c-linkage for Source/WebCore/bindings/v8/
899         https://bugs.webkit.org/show_bug.cgi?id=107845
900
901         Reviewed by Adam Barth.
902
903         A recent version of Clang started warning about code in
904         Source/WebCore/bindings/v8/npruntime.cpp.
905
906         In this case it is warning about an 'extern "c"' function returning a
907         non-POD type. But because the function has internal linkage, the
908         warning doesn't really apply.
909
910         This change suppresses the warning in the meantime.
911
912         Tested by building with Clang r172454.
913
914         * WebCore.gyp/WebCore.gyp:
915
916 2013-01-25  Eberhard Graether  <egraether@google.com>
917
918         Web Inspector: add checkbox for continuous painting to the inspector's settings
919         https://bugs.webkit.org/show_bug.cgi?id=107352
920
921         Reviewed by Pavel Feldman.
922
923         This change adds a checkbox to activate continuous painting to the WebInspector's
924         rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The
925         setting is visible if InspectorClient::canContinuouslyPaint() returns true.
926
927         No new tests.
928
929         * English.lproj/localizedStrings.js:
930         * inspector/Inspector.json:
931         * inspector/InspectorClient.h:
932         (WebCore::InspectorClient::canContinuouslyPaint):
933         (WebCore::InspectorClient::setContinuousPaintingEnabled):
934         (InspectorClient):
935         * inspector/InspectorPageAgent.cpp:
936         (PageAgentState):
937         (WebCore::InspectorPageAgent::restore):
938         (WebCore::InspectorPageAgent::disable):
939         (WebCore::InspectorPageAgent::canContinuouslyPaint):
940         (WebCore):
941         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
942         * inspector/InspectorPageAgent.h:
943         * inspector/front-end/Settings.js:
944         * inspector/front-end/SettingsScreen.js:
945         (WebInspector.GenericSettingsTab):
946         (WebInspector.GenericSettingsTab.prototype.get _continuousPaintingChanged):
947         * inspector/front-end/inspector.js:
948         (WebInspector.doLoadedDone):
949
950 2013-01-25  Dominic Mazzoni  <dmazzoni@google.com>
951
952         REGRESSION (r140658): Multiple accessibility failures on GTK
953         https://bugs.webkit.org/show_bug.cgi?id=107832
954
955         Reviewed by Chris Fleizach.
956
957         In the ATK accessibility implementation, attachWrapper
958         might create a different object depending on the role of
959         the WebCore AccessibilityObject, whereas on other platforms
960         attachWrapper doesn't care. Calling init before attachWrapper
961         solves the problem.
962
963         Re-enables 7 skipped tests.
964
965         * accessibility/AXObjectCache.cpp:
966         (WebCore::AXObjectCache::getOrCreate):
967
968 2013-01-24  Kent Tamura  <tkent@chromium.org>
969
970         INPUT_MULTIPLE_FIELDS_UI: Refactoring: Remove confusing minimum() and maximum() of DateTimeSymbolicFieldElement
971         https://bugs.webkit.org/show_bug.cgi?id=107918
972
973         Reviewed by Kentaro Hara.
974
975         DateTimeSymbolicFieldElement::minimum() and maximum() are very
976         confusing. They don't return minimum/maximum value of 0-based symbol
977         index though valueAsInteger is 0-based. These functions are used only
978         for ARIA attributes in DateTimeFieldElement::initialize().
979
980         - Remove DateTimeFieldElement::minimum() and maximum(), and pass
981         minimum/maximum values for ARIA attributes as function arguments.
982         - DateTimeNumericFieldElement::maximum() is now non-virtual.
983           It is called by subclasses.
984
985         No new tests. This should not change any behavior.
986
987         * html/shadow/DateTimeFieldElement.cpp:
988         (WebCore::DateTimeFieldElement::initialize):
989         Add axMimimum/axMaximum arguments. Don't use minimum() and maximum().
990         * html/shadow/DateTimeFieldElement.h:
991         (DateTimeFieldElement): Ditto.
992         * html/shadow/DateTimeNumericFieldElement.cpp:
993         (WebCore::DateTimeNumericFieldElement::initialize):
994         Pass m_range.minimum and maximum to DateTimeFieldElement::initialize().
995         * html/shadow/DateTimeNumericFieldElement.h:
996         (DateTimeNumericFieldElement):
997         - Add initialize()
998         - Make maximum() non-virtual
999         - Remove minimum().
1000         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1001         (WebCore::DateTimeSymbolicFieldElement::initialize):
1002         Pass m_minimumIndex + 1 and m_maximumIndex + 1 to
1003         DateTimeFieldElement::initialize().
1004         * html/shadow/DateTimeSymbolicFieldElement.h:
1005         (DateTimeSymbolicFieldElement):
1006         Add initialize() and remove minimum() and maximum().
1007
1008 2013-01-24  Kent Tamura  <tkent@chromium.org>
1009
1010         INPUT_MULTIPLE_FIELDS_UI: Refactoring: Remove unused DateTimeHourFieldElement::valueAsInteger
1011         https://bugs.webkit.org/show_bug.cgi?id=107915
1012
1013         Reviewed by Kentaro Hara.
1014
1015         DateTimeHourFieldElement::valueAsInteger is never called. Remove it and
1016         make valueAsInteger non-public.
1017
1018         No new tests. This shouldn't change any behavior.
1019
1020         * html/shadow/DateTimeFieldElement.h:
1021         (DateTimeFieldElement): Make valueAsInteger protected.
1022         * html/shadow/DateTimeFieldElements.cpp:
1023         Remove DateTimeHourFieldElement::valueAsInteger.
1024         (WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState):
1025         Remove unnecessary DateTimeNumericFieldElement:: prefix.
1026         * html/shadow/DateTimeFieldElements.h:
1027         (DateTimeHourFieldElement): Remove valueAsInteger.
1028         * html/shadow/DateTimeNumericFieldElement.h:
1029         (DateTimeNumericFieldElement):
1030         Make valueAsInteger FINAL.
1031
1032 2013-01-24  Hajime Morrita  <morrita@google.com>
1033
1034         Refactoring: The name ContainerNode::removeChildren and ContainerNde::removeAllChilren() is confusing
1035         https://bugs.webkit.org/show_bug.cgi?id=107640
1036
1037         Reviewed by Eric Seidel.
1038
1039         This change renames unsafe removeAllChilren() function to
1040         removeDetachedChildren() and move it to protected visibility.
1041
1042         In theory, the removed nodes should be detached() before. But some
1043         tests violates that assumption. It should be fixed.
1044
1045         No new tests. No behavior change.
1046
1047         * dom/ContainerNode.cpp:
1048         (WebCore::ContainerNode::removeDetachedChildren):
1049         (WebCore::ContainerNode::takeAllChildrenFrom):
1050         (WebCore::ContainerNode::~ContainerNode):
1051         * dom/ContainerNode.h:
1052         (ContainerNode):
1053         * dom/ContainerNodeAlgorithms.h:
1054         (WebCore::removeDetachedChildrenInContainer):
1055         (WebCore):
1056         * dom/Document.cpp:
1057         (WebCore::Document::removedLastRef):
1058         * dom/ShadowRoot.cpp:
1059         (WebCore::ShadowRoot::~ShadowRoot):
1060         * svg/SVGElementInstance.cpp:
1061         (WebCore::SVGElementInstance::detach):
1062         * svg/SVGElementInstance.h:
1063         (SVGElementInstance):
1064
1065 2013-01-24  Keishi Hattori  <keishi@webkit.org>
1066
1067         Adjust design of the Calendar Picker
1068         https://bugs.webkit.org/show_bug.cgi?id=107507
1069
1070         Reviewed by Kent Tamura.
1071
1072         Covered by existing calendar picker appearance tests.
1073
1074         * Resources/pagepopups/calendarPicker.css:
1075         (body): Use bigger font.
1076         (.calendar-picker):
1077         (.month-selector):
1078         (.month-selector svg):
1079         (.month-selector-popup-contents):
1080         (.year-month-button-left .year-month-button):
1081         (.year-month-button-right .year-month-button):
1082         (.days-area-container):
1083         (.days-area):
1084         (.day-label):
1085         (.day):
1086         (.available):
1087         (.month-mode .day):
1088         (.today-clear-area .today-button):
1089         * Resources/pagepopups/calendarPicker.js:
1090         (CalendarPicker.prototype.fixWindowSize): Calculate the width of today-clear-area too.
1091         (YearMonthController.prototype.attachTo):
1092         (YearMonthController.prototype._attachLeftButtonsTo): Use svg icons inside buttons.
1093         (YearMonthController.prototype._attachRightButtonsTo): Use svg icons inside buttons.
1094         (YearMonthController.prototype.setMonth):
1095         (YearMonthController.prototype._handleButtonClick):
1096         * Resources/pagepopups/calendarPickerMac.css: Removed.
1097         * Resources/pagepopups/chromium/calendarPickerChromium.css: Added.
1098         (.year-month-button):
1099         (.days-area-container:focus):
1100         * Resources/pagepopups/chromium/pickerCommonChromium.css: Added. Use Chrome-style buttons.
1101         (button):
1102         (:enabled:hover:-webkit-any(button, input[type='button'])):
1103         (:enabled:active:-webkit-any(button, input[type='button'])):
1104         (:disabled:-webkit-any(button, input[type='button'])):
1105         (:enabled:focus:-webkit-any(button, input[type='button'])):
1106         * WebCore.gyp/WebCore.gyp: Include pickerCommonChromium.css and calendarPickerChromium.css.
1107         * rendering/RenderTheme.cpp: Remove extraCalendarPickerStyleSheet
1108         * rendering/RenderTheme.h: Ditto.
1109         * rendering/RenderThemeChromiumMac.h: Ditto.
1110         * rendering/RenderThemeChromiumMac.mm: Ditto.
1111         (WebCore):
1112
1113 2013-01-24  Kentaro Hara  <haraken@chromium.org>
1114
1115         Unreviewed build fix.
1116
1117         * page/History.h:
1118         (WebCore):
1119
1120 2013-01-24  Beth Dakin  <bdakin@apple.com>
1121
1122         Fixed elements sometimes marked out-of-view if you have rubber-banded too far, 
1123         affects flickr.com
1124         https://bugs.webkit.org/show_bug.cgi?id=107882
1125         -and corresponding-
1126         <rdar://problem/13065897>
1127
1128         Reviewed by Simon Fraser.
1129
1130         It is possible to rubber band so far that our fixed object appears to be outside 
1131         of the visibleContentArea(). We should use the 
1132         viewportConstrainedVisibleContentRect() since that is what fixed objects are 
1133         positioned based on anyway. 
1134
1135         * rendering/RenderLayerCompositor.cpp:
1136         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1137
1138 2013-01-24  Kentaro Hara  <haraken@chromium.org>
1139
1140         Unreviewed build fix.
1141
1142         * bindings/js/JSHistoryCustom.cpp:
1143         (WebCore::JSHistory::state):
1144
1145 2013-01-24  Julien Brianceau  <jbrianceau@nds.com>
1146
1147         NPN_InitializeVariantWithStringCopy is wrong for platforms returning NULL from malloc(0)
1148         https://bugs.webkit.org/show_bug.cgi?id=96272
1149
1150         Reviewed by Alexey Proskuryakov.
1151
1152         No new tests. This is platform dependent.
1153
1154         * bridge/npruntime.cpp:
1155         (NPN_InitializeVariantWithStringCopy):
1156
1157 2013-01-24  Christian Biesinger  <cbiesinger@chromium.org>
1158
1159         resize property doesn't work on iframes
1160         https://bugs.webkit.org/show_bug.cgi?id=9221
1161
1162         Reviewed by Eric Seidel.
1163
1164         Test: fast/css/resize-corner-tracking-transformed-iframe.html
1165         and fast/css/resize-corner-tracking.html
1166
1167         * rendering/RenderIFrame.cpp:
1168         (WebCore::RenderIFrame::requiresLayer):
1169         (WebCore):
1170         * rendering/RenderIFrame.h:
1171         <iframe>s need a layer to be resizable, so make requiresLayer return
1172         true if the css property is set.
1173
1174         * rendering/RenderLayer.cpp:
1175         (WebCore::RenderLayer::canResize):
1176         (WebCore):
1177         (WebCore::RenderLayer::resize):
1178         (WebCore::RenderLayer::positionOverflowControls):
1179         (WebCore::RenderLayer::isPointInResizeControl):
1180         (WebCore::RenderLayer::hitTestOverflowControls):
1181         (WebCore::RenderLayer::hitTestLayer):
1182         * rendering/RenderLayer.h:
1183         (RenderLayer):
1184         Add a new canResize() function and use it instead of hasOverflowClip()
1185         to check whether resizing should be allowed (there's still the
1186         additional check of style()->resize() != RESIZE_NONE, of course)
1187
1188         Make hitTestLayer return |this| when the point is inside the
1189         resizer rectangle.
1190
1191         * rendering/RenderWidget.cpp:
1192         (WebCore::RenderWidget::paint):
1193         Call layer()->paintResizer() to actually paint the resizer.
1194
1195 2013-01-24  Kentaro Hara  <haraken@chromium.org>
1196
1197         Regression(r107058): Use-after-free in SerializedScriptValue::deserialize
1198         https://bugs.webkit.org/show_bug.cgi?id=107792
1199
1200         Reviewed by Abhishek Arya.
1201
1202         Imagine the following call path:
1203
1204         (1) history.state is accessed.
1205         (2) V8History::stateAccessorGetter() calls History::state(), which calls
1206         HistoryItem::stateObject().
1207         (3) HistoryItem holds m_stateObject as RefPtr<SerializedScriptValue>,
1208         but HistoryItem::stateObject() returns SerializedScriptValue*.
1209         (4) V8History::stateAccessorGetter calls SerializedScriptValue::deserialize()
1210         for the SerializedScriptValue* obtained in (3).
1211         (5) SerializedScriptValue::deserialize() can call history.replaceState()
1212         in its deserialization process (See the test case in the Chromium bug).
1213         (6) history.replaceState() replaces HistoryItem::m_stateObject.
1214         This replacement destructs the original HistoryItem::m_stateObject.
1215         (7) The current deserialization process can crash due to the premature destruction.
1216
1217         To avoid the problem, we have to pass PassRefPtr<SerializedScriptValue> around
1218         instead of SerializedScriptValue*.
1219
1220         Test: fast/history/replacestate-nocrash.html
1221
1222         * bindings/v8/custom/V8HistoryCustom.cpp:
1223         (WebCore::V8History::stateAccessorGetter):
1224         * history/HistoryItem.h:
1225         (WebCore):
1226         (WebCore::HistoryItem::stateObject):
1227         * loader/FrameLoader.cpp:
1228         (WebCore::FrameLoader::loadInSameDocument):
1229         * loader/FrameLoader.h:
1230         * page/History.cpp:
1231         (WebCore::History::state):
1232         (WebCore::History::stateInternal):
1233         * page/History.h:
1234         (History):
1235
1236 2013-01-24  Beth Dakin  <bdakin@apple.com>
1237
1238         Some formerly-fixed objects scroll as if they are still fixed
1239         https://bugs.webkit.org/show_bug.cgi?id=107869
1240
1241         Reviewed by Simon Fraser.
1242
1243         Removing nodes need to mark m_hasChangedProperties on the state tree, otherwise 
1244         they will not be committed to the scrolling tree until something else changes, 
1245         which could actually take a while. During the delay, the scrolling tree will 
1246         continue to move around the formerly-fixed object as long as it still has a layer.
1247         * page/scrolling/ScrollingStateTree.cpp:
1248         (WebCore::ScrollingStateTree::didRemoveNode):
1249
1250 2013-01-24  Arko Saha  <arko@motorola.com>
1251
1252         Microdata: itemtype attribute must update correctly on adding or removing tokens
1253         https://bugs.webkit.org/show_bug.cgi?id=106616
1254
1255         Reviewed by Ryosuke Niwa.
1256
1257         Added a new class MicroDataAttributeTokenList, it overrides setValue() method of
1258         DOMSettableTokenList. setValue() is responsible to set the new attribute value for
1259         a given element.
1260
1261         Tests: fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
1262                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
1263                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
1264
1265         * CMakeLists.txt:
1266         * GNUmakefile.list.am:
1267         * Target.pri:
1268         * WebCore.gypi:
1269         * WebCore.vcproj/WebCore.vcproj:
1270         * WebCore.xcodeproj/project.pbxproj:
1271         * dom/Node.cpp:
1272         (WebCore::Node::itemProp):
1273         (WebCore::Node::setItemProp):
1274         (WebCore::Node::itemRef):
1275         (WebCore::Node::setItemRef):
1276         (WebCore::Node::itemType):
1277         (WebCore::Node::setItemType):
1278         * dom/NodeRareData.h:
1279         (WebCore::NodeMicroDataTokenLists::itemProp):
1280         (WebCore::NodeMicroDataTokenLists::itemRef):
1281         (WebCore::NodeMicroDataTokenLists::itemType):
1282         (NodeMicroDataTokenLists):
1283         * html/DOMSettableTokenList.h: Made the constructor as protected, so that we can
1284         override setValue() method.
1285         (DOMSettableTokenList):
1286         * html/MicroDataAttributeTokenList.cpp: Added.
1287         (WebCore):
1288         (WebCore::MicroDataAttributeTokenList::MicroDataAttributeTokenList):
1289         (WebCore::MicroDataAttributeTokenList::setValueInternal):
1290         (WebCore::MicroDataAttributeTokenList::setValue): It calls
1291         DOMSettableTokenList::setValue to set internal tokens and value.
1292         * html/MicroDataAttributeTokenList.h: Added.
1293         (WebCore):
1294         (MicroDataAttributeTokenList):
1295         (WebCore::MicroDataAttributeTokenList::create):
1296
1297 2013-01-24  Joshua Bell  <jsbell@chromium.org>
1298
1299         IndexedDB: Remove IDBUpgradeNeededEvent, merge with IDBVersionChangeEvent
1300         https://bugs.webkit.org/show_bug.cgi?id=107754
1301
1302         Reviewed by Tony Chang.
1303
1304         The IndexedDB spec calls deleteDatabase() to fire a "blocked" event with the
1305         IDBVersionChangeEvent interface which we were doing, but with an older interface - just
1306         a "version" property. We were already firing an event on "versionchange" with the new
1307         "oldVersion" and "newVersion" properties, but with an IDBUpgradeNeededEvent interface that
1308         doesn't exist in the spec. This patch merges the event types to match the spec, including
1309         that the newVersion property is null when deleting.
1310
1311         Test: storage/indexeddb/events.html
1312               storage/indexeddb/deletedatabase-*.html
1313
1314         * CMakeLists.txt: Remove references to deleted files.
1315         * GNUmakefile.list.am: Ditto.
1316         * Modules/indexeddb/IDBDatabase.cpp:
1317         (WebCore::IDBDatabase::onVersionChange): Generate IDBVersionChangeEvent.
1318         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1319         (WebCore::IDBOpenDBRequest::onBlocked): Ditto.
1320         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Ditto.
1321         * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Removed.
1322         * Modules/indexeddb/IDBUpgradeNeededEvent.h: Removed.
1323         * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Removed.
1324         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1325         (WebCore::IDBVersionChangeEvent::create): Take IDBAny's as old/new versions
1326         may be integers, strings (for legacy databases), or null (when deleting).
1327         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
1328         * Modules/indexeddb/IDBVersionChangeEvent.h:
1329         (IDBVersionChangeEvent): Remove version property.
1330         (WebCore::IDBVersionChangeEvent::oldVersion): Added new property.
1331         (WebCore::IDBVersionChangeEvent::newVersion): Added new property.
1332         * Modules/indexeddb/IDBVersionChangeEvent.idl: Updated properties.
1333         * WebCore.gypi: Remove references to deleted files.
1334         * dom/EventNames.in: Ditto.
1335
1336 2013-01-24  Pratik Solanki  <psolanki@apple.com>
1337
1338         CertificateChain functions in ResourceResponse should be inside proper ifdefs
1339         https://bugs.webkit.org/show_bug.cgi?id=107865
1340
1341         Reviewed by Brady Eidson.
1342
1343         Move ResourceResponse::setCertificateChain() and ResourceResponse::certificateChain()
1344         be under the same ifdefs that they are declared in.
1345
1346         No new tests because no change in functionality.
1347
1348         * platform/network/mac/ResourceResponseMac.mm:
1349
1350 2013-01-24  Leo Yang  <leoyang@rim.com>
1351
1352         [BlackBerry] Display HTML5 Appcache manifest
1353         https://bugs.webkit.org/show_bug.cgi?id=107858
1354
1355         Reviewed by Yong Li.
1356         Reviewed internally by Jeff Rogers.
1357
1358         MIME alias no new tests.
1359
1360         * platform/MIMETypeRegistry.cpp:
1361         (WebCore::mimeTypeAssociationMap):
1362
1363 2013-01-24  Mike West  <mkwst@chromium.org>
1364
1365         Web Inspector: "XHR loaded!" messages should be DebugMessageLevel.
1366         https://bugs.webkit.org/show_bug.cgi?id=107817
1367
1368         Reviewed by Pavel Feldman.
1369
1370         The 'XHR finished loading:' message is currently sent at
1371         LogMessageLevel. Upon reflection, the only messages that should be
1372         sent at that level are messages the developer generates herself via
1373         'console.*' calls. This message is better categorized as 'debug'.
1374
1375         * inspector/InspectorConsoleAgent.cpp:
1376         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
1377             Change the message to DebugMessageLevel.
1378
1379 2013-01-24  James Robinson  <jamesr@chromium.org>
1380
1381         REGRESSION(140571): Crash in ScrollingCoordinator::mainThreadScrollingReasons during Frame::createView
1382         https://bugs.webkit.org/show_bug.cgi?id=107868
1383
1384         Reviewed by Beth Dakin.
1385
1386         When using fixed layout mode, it's possible to update the scrollbar state of the main FrameView before
1387         it's set on the main frame, which can lead to calling in to ScrollingCoordinator to compute main thread
1388         scrolling regions when m_page->mainFrame()->view() is 0. In this case, we don't have any main
1389         thread scrolling reasons and should just return 0.
1390
1391         * page/scrolling/ScrollingCoordinator.cpp:
1392         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
1393
1394 2013-01-24  Martin Robinson  <mrobinson@igalia.com>
1395
1396         Abstract the logic for appending a UChar32 onto StringBuilder
1397         https://bugs.webkit.org/show_bug.cgi?id=107505
1398
1399         Reviewed by Darin Adler.
1400
1401         * css/CSSOMUtils.cpp:
1402         (WebCore::serializeCharacter): Use the new StringBuilder append.
1403         (WebCore::serializeIdentifier): Ditto.
1404         (WebCore::serializeString): Ditto.
1405         * html/parser/HTMLEntityParser.cpp:
1406         (WebCore::HTMLEntityParser::consumeNamedEntity): Ditto.
1407         * svg/SVGFontData.cpp:
1408         (WebCore::SVGFontData::createStringWithMirroredCharacters): Ditto.
1409         * xml/parser/CharacterReferenceParserInlines.h:
1410         (WebCore::consumeCharacterReference): Ditto.
1411         * xml/parser/XMLCharacterReferenceParser.cpp: Remove an older helper
1412         superseded by StringBuilder::append.
1413
1414 2013-01-24  Kentaro Hara  <haraken@chromium.org>
1415
1416         [V8] Pass an Isolate to GetTemplate() in v8/*.cpp
1417         https://bugs.webkit.org/show_bug.cgi?id=107789
1418
1419         Reviewed by Adam Barth.
1420
1421         No tests. No change in behavior.
1422
1423         * bindings/v8/Dictionary.cpp:
1424         (WebCore::Dictionary::get):
1425         * bindings/v8/PageScriptDebugServer.cpp:
1426         (WebCore::retrieveFrameWithGlobalObjectCheck):
1427         * bindings/v8/V8Binding.cpp:
1428         (WebCore::toDOMWindow):
1429         (WebCore::toScriptExecutionContext):
1430         * bindings/v8/V8DOMWindowShell.cpp:
1431         (WebCore::V8DOMWindowShell::clearForNavigation):
1432         * bindings/v8/V8Initializer.cpp:
1433         (WebCore::findFrame):
1434         (WebCore::failedAccessCheckCallbackInMainThread):
1435         * bindings/v8/WorkerScriptController.cpp:
1436         (WebCore::WorkerScriptController::controllerForContext):
1437         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1438         (WebCore::V8DOMWindow::eventAccessorGetter):
1439         (WebCore::V8DOMWindow::eventAccessorSetter):
1440         (WebCore::V8DOMWindow::toStringCallback):
1441         (WebCore::toV8):
1442         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1443         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1444         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1445         (WebCore::createInjectedScriptHostV8Wrapper):
1446         (WebCore::InjectedScriptManager::createInjectedScript):
1447         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
1448         * bindings/v8/custom/V8LocationCustom.cpp:
1449         (WebCore::V8Location::reloadAccessorGetter):
1450         (WebCore::V8Location::replaceAccessorGetter):
1451         (WebCore::V8Location::assignAccessorGetter):
1452         * bindings/v8/custom/V8MessageEventCustom.cpp:
1453         (WebCore::V8MessageEvent::initMessageEventCallback):
1454
1455 2013-01-24  Emil A Eklund  <eae@chromium.org>
1456
1457         [svg] Remove unnecessary rounding in SVGRootInlineBox::layoutRootBox
1458         https://bugs.webkit.org/show_bug.cgi?id=107771
1459
1460         Reviewed by Levi Weintraub.
1461         
1462         SVGRootInlineBox::layoutRootBox rounds the location and size of
1463         the container to the nearest enclosing integer values. Now that
1464         layout uses subpixel positioning this is no longer needed and
1465         results in undesirable rounding. For high-dpi screens in
1466         particular this is especially noticeable as it is rounded to
1467         "pixels" which can map to two our more device pixels.
1468
1469         Test: svg/text/text-rect-precision.html
1470
1471         * rendering/svg/SVGRootInlineBox.cpp:
1472         (WebCore::SVGRootInlineBox::layoutRootBox):
1473         Change from enclosingIntRect to enclosingLayoutRect to align to
1474         the closest containing LayoutRect now that layout is done using
1475         subpixel precision.
1476
1477 2013-01-24  Philip Rogers  <pdr@google.com>
1478
1479         Preserve container size requests across image loads
1480         https://bugs.webkit.org/show_bug.cgi?id=106733
1481
1482         Reviewed by Tim Horton.
1483
1484         Some images, such as SVG with relative dimensions, depend on the renderer's container size.
1485         r137981 introduced the ability to store pending container size requests that are made
1486         after the image element lays out but before the image loads. Before this patch, cached
1487         images could discard these pending container size requests during cache revalidation.
1488
1489         During a cached image load, two CachedImages exist: the image in cache and a new CachedImage
1490         that will be used if the cache is stale. Pending container size requests are stored
1491         on the second cached image which is discarded if a 304 not modified response is received.
1492
1493         This patch modifies the switchClientsToRevalidatedResource logic to maintain pending
1494         container size requests. This fixes a bug where cached SVG images would be sized
1495         incorrectly.
1496
1497         Test: http/tests/svg/cached-image-sizing.html
1498
1499         * loader/cache/CachedImage.cpp:
1500         (WebCore::CachedImage::switchClientsToRevalidatedResource):
1501
1502             In this virtual call we special-case images with pending size requests and
1503             transfer these requests to the revalidating resource. Note that all container size
1504             requests received before revalidation will be pending because the image has not loaded.
1505             Therefore, there is no risk of discarding non-pending container size requests.
1506
1507         (WebCore):
1508         * loader/cache/CachedImage.h:
1509         (CachedImage):
1510         * loader/cache/CachedResource.h:
1511         (CachedResource):
1512
1513 2013-01-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1514
1515         Unreviewed, rolling out r140296.
1516         http://trac.webkit.org/changeset/140296
1517         https://bugs.webkit.org/show_bug.cgi?id=107857
1518
1519         Cause several regresssions (Requested by smfr on #webkit).
1520
1521         * rendering/RenderBox.cpp:
1522         (WebCore::RenderBox::styleDidChange):
1523
1524 2013-01-24  Mark Hahnenberg  <mhahnenberg@apple.com>
1525
1526         Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
1527         https://bugs.webkit.org/show_bug.cgi?id=107327
1528
1529         Reviewed by Filip Pizlo.
1530
1531         No new tests.
1532
1533         We're renaming these two files, so we have to replace the names everywhere.
1534
1535         * ForwardingHeaders/runtime/JSCJSValue.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSValue.h.
1536         * ForwardingHeaders/runtime/JSValue.h: Removed.
1537         * WebCore.vcproj/WebCore.vcproj:
1538         * bindings/js/JSArrayBufferViewHelper.h:
1539         * bindings/js/JSCustomXPathNSResolver.h:
1540         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1541         * bindings/js/JSIntentConstructor.cpp:
1542         * bindings/js/JSMessagePortCustom.h:
1543         * bindings/js/JSNodeFilterCondition.h:
1544         * bindings/js/JavaScriptCallFrame.cpp:
1545         * bindings/js/ScriptCallStackFactory.cpp:
1546         * bindings/js/ScriptValue.h:
1547         * bindings/js/SerializedScriptValue.h:
1548         * bindings/objc/WebScriptObjectPrivate.h:
1549         * bridge/c/c_utility.h:
1550         * bridge/testbindings.cpp:
1551         * bridge/testbindings.mm:
1552         * bridge/testqtbindings.cpp:
1553         * plugins/PluginView.cpp:
1554         * plugins/blackberry/PluginViewBlackBerry.cpp:
1555         * plugins/gtk/PluginViewGtk.cpp:
1556         * plugins/mac/PluginViewMac.mm:
1557         * plugins/qt/PluginViewQt.cpp:
1558         * plugins/win/PluginViewWin.cpp:
1559
1560 2013-01-24  Jer Noble  <jer.noble@apple.com>
1561
1562         Unreviewed build fix for Mac/Lion.
1563
1564         Protect Lion from the absence of VideoToolbox.h by wrapping in #if
1565         guards.
1566
1567         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1568
1569 2013-01-24  Anders Carlsson  <andersca@apple.com>
1570
1571         Add stubbed out StorageNamespaceProxy class
1572         https://bugs.webkit.org/show_bug.cgi?id=107846
1573
1574         Reviewed by Sam Weinig.
1575
1576         Make StorageNamespace.h and StorageArea.h private headers.
1577
1578         * WebCore.xcodeproj/project.pbxproj:
1579
1580 2013-01-24  Tony Chang  <tony@chromium.org>
1581
1582         Remove document as a parameter from a few internals methods
1583         https://bugs.webkit.org/show_bug.cgi?id=107757
1584
1585         Reviewed by Hajime Morita.
1586
1587         Remove document as a parameter since there's already one associated with internals.
1588
1589         No new tests, this refactors some testing code and is covered by
1590         exisiting tests.
1591
1592         * testing/Internals.cpp:
1593         (WebCore::Internals::isPreloaded):
1594         (WebCore::Internals::createContentElement):
1595         (WebCore::Internals::absoluteCaretBounds):
1596         * testing/Internals.h:
1597         (Internals):
1598         * testing/Internals.idl:
1599
1600 2013-01-24  Mike West  <mkwst@chromium.org>
1601
1602         Web Inspector: 'console.debug' should generate messages at DebugMessageLevel.
1603         https://bugs.webkit.org/show_bug.cgi?id=107816
1604
1605         Reviewed by Pavel Feldman.
1606
1607         'console.debug' is currently aliased to 'console.log'. Since we now
1608         render debug-level messages differently to log messages, we should use
1609         the proper message level for 'console.debug'.
1610
1611         * page/Console.cpp:
1612         (WebCore::Console::debug):
1613             Replace the alias to 'console.log' with message creation at
1614             DebugMessageLevel.
1615
1616 2013-01-24  Dima Gorbik  <dgorbik@apple.com>
1617
1618         Implement :past pseudo class for the WebVTT ::cue pseudo element
1619         https://bugs.webkit.org/show_bug.cgi?id=105482
1620
1621         Reviewed by Eric Carlson.
1622
1623         It is good to have a designated pseudo class for this, though same could
1624         be achieved by using a combination of ::cue and ::cue(:future).
1625         Tests also check that nested timestamps work properly.
1626
1627         Test: media/track/track-css-matching-timestamps.html
1628
1629         * css/CSSSelector.cpp:
1630         (WebCore::CSSSelector::pseudoId):
1631         (WebCore::nameToPseudoTypeMap):
1632         (WebCore::CSSSelector::extractPseudoType):
1633         * css/CSSSelector.h:
1634         * css/SelectorChecker.cpp:
1635         (WebCore::SelectorChecker::checkOne):
1636
1637 2013-01-23  Jer Noble  <jer.noble@apple.com>
1638
1639         Mac: Avoid using k32BGRAPixelFormat on certain platforms.
1640         https://bugs.webkit.org/show_bug.cgi?id=107732
1641
1642         Reviewed by Eric Carlson.
1643
1644         Using a AVPlayerItemVideoOutput to generate ARGB pixel buffers is a potential performance
1645         hit, as the AVPlayerItemVideoOutput will send YUV buffers through a VTPixeBufferTransferSession
1646         to convert them to ARGB regardless of whether or not a given buffer will be used. Instead,
1647         ask the AVPlayerItemVideoOutput for pixel buffers in the decoder's native pixel format and use
1648         the VTPixelBufferTransferSession to convert to ARGB only those pixel buffers which were actually
1649         requested.
1650
1651         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1652         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1653         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Ask for the decoder's native
1654             pixel format.
1655         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Lazily create a VTPixelTransferSession
1656             and convert output pixel buffers to k32BGRAPixelFormat.
1657
1658 2013-01-24  Christian Biesinger  <cbiesinger@chromium.org>
1659
1660         Convert RenderFullScreen to use the non-deprecated flexbox
1661         https://bugs.webkit.org/show_bug.cgi?id=107746
1662
1663         Reviewed by Ojan Vafai.
1664
1665         Tests: covered by existing tests in fullscreen/.
1666
1667         * rendering/RenderFullScreen.h:
1668         * rendering/RenderFullScreen.cpp:
1669         (RenderFullScreen::RenderFullScreen):
1670         (RenderFullScreen::willBeDestroyed):
1671         Inherit from RenderFlexibleBox
1672
1673         (createFullScreenStyle):
1674         Use the new-style CSS properties (justify-content, etc)
1675
1676         * css/fullscreen.css:
1677         (video:-webkit-full-screen, audio:-webkit-full-screen):
1678         * css/fullscreenQuickTime.css:
1679         (video:-webkit-full-screen::-webkit-media-controls-panel):
1680         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
1681         (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
1682         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
1683         * css/mediaControlsBlackBerryFullscreen.css:
1684         (video:-webkit-full-screen::-webkit-media-controls-panel):
1685         (video:-webkit-full-screen::-webkit-media-controls-button-group-container):
1686         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
1687         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-play-button):
1688         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
1689         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
1690         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
1691         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline):
1692         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-fullscreen-button):
1693         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-divider):
1694         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
1695         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container):
1696         (video:-webkit-full-screen::-webkit-media-controls-play-button-container):
1697         (video:-webkit-full-screen::-webkit-media-controls-placeholder):
1698         * css/mediaControlsQtFullscreen.css:
1699         (video::-webkit-media-controls-panel):
1700         (video::-webkit-media-controls-play-button):
1701         Update fullscreen-related CSS to use the new flexbox
1702
1703 2013-01-23  Jer Noble  <jer.noble@apple.com>
1704
1705         Mac: Video appears in wrong place during pinch operations
1706         https://bugs.webkit.org/show_bug.cgi?id=107730
1707
1708         Reviewed by Eric Carlson.
1709
1710         Send the correct input and output rects, post translation and scaling,
1711         to the CIContext for drawing.
1712
1713         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1714         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1715
1716 2013-01-24  Max Vujovic  <mvujovic@adobe.com>
1717
1718         [CSS Filters] CSS opacity property clips filter outsets
1719         https://bugs.webkit.org/show_bug.cgi?id=106549
1720
1721         Reviewed by Dirk Schulze.
1722
1723         Expand the transparencyClipBox for filter outsets and pass the filter output rect instead of
1724         the input rect to beginTransparencyLayers for clipping. Details below.
1725
1726         Test: css3/filters/css-opacity-with-drop-shadow.html
1727
1728         * rendering/RenderLayer.cpp:
1729         (WebCore):
1730         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1731             Replace filter outset calcuation with a call to expandRectForFilterOutsets.
1732         (WebCore::expandRectForFilterOutsets):
1733             New method to factor out repeated filter outset calculation code.
1734         (WebCore::transparencyClipBox):
1735             After expanding the clip rect for descendants and reflection, expand it for filter
1736             outsets, so they don't get clipped when we begin a transparency layer.
1737         (WebCore::RenderLayer::paintLayerContents):
1738             Pass paintingInfo.paintDirtyRect instead of localPaintingInfo.paintDirtyRect to
1739             beginTransparencyLayers for clipping. localPaintingInfo.paintDirtyRect (aka the filter
1740             input rect) does not contain filter outsets, so they would get clipped. Now, we pass
1741             paintingInfo.paintDirtyRect (the filter output rect), which includes the filter outsets.
1742         (WebCore::RenderLayer::calculateLayerBounds):
1743             Replace filter outset calcuation with a call to expandRectForFilterOutsets.
1744         * rendering/RenderLayer.h:
1745         (RenderLayer):
1746
1747 2013-01-24  Ryosuke Niwa  <rniwa@webkit.org>
1748
1749         Fix a typo after r139838.
1750
1751         * dom/NodeRareData.h:
1752         (NodeRareData):
1753
1754 2013-01-24  Ryosuke Niwa  <rniwa@webkit.org>
1755
1756         Abandoned Memory: SVGFontElement and Corresponding SVGDocument Never Deconstructed
1757         https://bugs.webkit.org/show_bug.cgi?id=66438
1758
1759         Reviewed by Dirk Schulze.
1760
1761         The memory leak was caused by SVGFontFaceElement storing its own parent in a RefPtr.
1762
1763         Fixed the bug by storing a raw pointer instead, and clearing the pointer in removedFrom
1764         when the node detached from the document. Also added several sanity check assertions.
1765
1766         * svg/SVGFontFaceElement.cpp:
1767         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1768         (WebCore::SVGFontFaceElement::associatedFontElement):
1769         (WebCore::SVGFontFaceElement::rebuildFontFace):
1770         (WebCore::SVGFontFaceElement::insertedInto):
1771         (WebCore::SVGFontFaceElement::removedFrom):
1772         * svg/SVGFontFaceElement.h:
1773         (SVGFontFaceElement):
1774
1775 2013-01-22  Robert Hogan  <robert@webkit.org>
1776
1777         Inline Containing Only Collapsed Whitespace Not Getting a Linebox
1778         https://bugs.webkit.org/show_bug.cgi?id=31397
1779
1780         Reviewed by David Hyatt.
1781
1782         Treat inlines containing only collapsed whitespace as empty. This allows them
1783         to get a linebox.
1784
1785         Test: fast/inline/inline-containing-collapsed-whitespace-treated-as-empty.html
1786
1787         * dom/Position.cpp:
1788         (WebCore::boundingBoxLogicalHeight):
1789         (WebCore):
1790         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1791         * rendering/InlineIterator.h:
1792         (WebCore::isEmptyInline):
1793         (WebCore):
1794         (WebCore::bidiNextShared):
1795         (WebCore::bidiFirstSkippingEmptyInlines):
1796         * rendering/RenderBlockLineLayout.cpp:
1797         (WebCore::alwaysRequiresLineBox):
1798         (WebCore::requiresLineBox):
1799         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1800         * rendering/RenderText.cpp:
1801         * rendering/RenderText.h:
1802         (RenderText):
1803
1804 2013-01-24  Andrey Lushnikov  <lushnikov@chromium.org>
1805
1806         Web Inspector: expand more chunks in DTE
1807         https://bugs.webkit.org/show_bug.cgi?id=107698
1808
1809         Reviewed by Pavel Feldman.
1810
1811         Mock DefaultTextEditor visible area as if it is slightly larger than real one and
1812         do all chunk expandings and repaints based on this new area.
1813
1814         No new tests: no change in behaviour.
1815
1816         * inspector/front-end/DefaultTextEditor.js:
1817         (WebInspector.TextEditorChunkedPanel.prototype.findVisibleChunks):
1818
1819 2013-01-24  Victor Jaquez  <vjaquez@igalia.com>
1820
1821         [GStreamer] Implement setPreservesPitch()
1822         https://bugs.webkit.org/show_bug.cgi?id=31155
1823
1824         Enables audio pitch preservation by using the scaletempo GStreamer
1825         element when required by the MediaPlayer.
1826
1827         Reviewed by Philippe Normand.
1828
1829         No new tests, but a layout test shall be implemented at some point
1830         using WebAudio API.
1831
1832         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1833         (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
1834         (WebCore):
1835         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1836         (MediaPlayerPrivateGStreamer):
1837
1838 2013-01-24  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
1839
1840         Removing deleted files from WebCore/Target.pri after r140399.
1841         https://bugs.webkit.org/show_bug.cgi?id=107815
1842
1843         Reviewed by Csaba Osztrogonác.
1844
1845         * Target.pri:
1846
1847 2013-01-24  Martin Robinson  <mrobinson@igalia.com>
1848
1849         Try to fix the Qt Windows build
1850
1851         * xml/parser/XMLDocumentParserQt.cpp:
1852         (WebCore::decodeNamedEntity): Use a reinterpret_cast to const QChar* like StringQt.cpp.
1853
1854 2013-01-24  Andrey Adaikin  <aandrey@chromium.org>
1855
1856         Web Inspector: [Canvas] REGRESSION: stack traces in the replay log are gone
1857         https://bugs.webkit.org/show_bug.cgi?id=107805
1858
1859         Reviewed by Pavel Feldman.
1860
1861         The V8's Error.prepareStackTrace is now called from the Error.captureStackTrace
1862         function instead of the "stack" getter function.
1863
1864         Test: inspector/profiler/canvas2d/canvas-stack-trace.html
1865
1866         * inspector/InjectedScriptCanvasModuleSource.js:
1867         (.):
1868
1869 2013-01-23  Andrey Adaikin  <aandrey@chromium.org>
1870
1871         Web Inspector: [Canvas] UI: add a selector to capture a single canvas frame vs consecutive frames
1872         https://bugs.webkit.org/show_bug.cgi?id=107688
1873
1874         Reviewed by Pavel Feldman.
1875
1876         Allow capturing several canvas frames in a row.
1877
1878         * English.lproj/localizedStrings.js:
1879         * inspector/InjectedScriptCanvasModule.cpp:
1880         (WebCore::InjectedScriptCanvasModule::traceLog):
1881         * inspector/InjectedScriptCanvasModule.h:
1882         (InjectedScriptCanvasModule):
1883         * inspector/InjectedScriptCanvasModuleSource.js:
1884         (.):
1885         * inspector/Inspector.json:
1886         * inspector/InspectorCanvasAgent.cpp:
1887         (WebCore::InspectorCanvasAgent::getTraceLog):
1888         * inspector/InspectorCanvasAgent.h:
1889         (InspectorCanvasAgent):
1890         * inspector/front-end/CanvasProfileView.js:
1891         (WebInspector.CanvasProfileView):
1892         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
1893         (WebInspector.CanvasProfileView.prototype._requestTraceLog):
1894         (WebInspector.CanvasProfileType):
1895         (WebInspector.CanvasProfileType.prototype.get statusBarItems):
1896         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
1897         (WebInspector.CanvasProfileType.prototype.buttonClicked):
1898         (WebInspector.CanvasProfileType.prototype._runSingleFrameCapturing):
1899         (WebInspector.CanvasProfileType.prototype._startFrameCapturing):
1900         (WebInspector.CanvasProfileType.prototype._stopFrameCapturing.didStopCapturing):
1901         (WebInspector.CanvasProfileType.prototype._stopFrameCapturing):
1902         (WebInspector.CanvasProfileType.prototype._didStartCapturingFrame):
1903         (WebInspector.CanvasProfileType.prototype.setRecordingProfile):
1904         (WebInspector.CanvasProfileType.prototype._isSingleFrameMode):
1905         (WebInspector.CanvasProfileHeader):
1906         (WebInspector.CanvasProfileHeader.prototype._updateCapturingStatus):
1907         (WebInspector.CanvasProfileHeader.prototype._requestCapturingStatus):
1908         * inspector/front-end/ProfileLauncherView.js:
1909         (WebInspector.ProfileLauncherView):
1910         * inspector/front-end/ProfilesPanel.js:
1911         (WebInspector.ProfileType.prototype.get statusBarItems):
1912         (WebInspector.ProfilesPanel):
1913         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
1914         (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
1915         (WebInspector.ProfilesPanel.prototype._reset):
1916         (WebInspector.ProfilesPanel.prototype._showLauncherView):
1917         (WebInspector.ProfilesPanel.prototype.showProfile):
1918         (WebInspector.ProfilesPanel.prototype._updateInterface):
1919         (WebInspector.ProfilesPanel.prototype._resize):
1920
1921 2013-01-24  Andreas Kling  <akling@apple.com>
1922
1923         Add CSSSelectorList::isValid().
1924         <http://webkit.org/b/107809>
1925
1926         Reviewed by Antti Koivisto.
1927
1928         Add an isValid() method to CSSSelectorList and use that where applicable instead of checking
1929         if first() is a null pointer.
1930
1931         * css/CSSPageRule.cpp:
1932         (WebCore::CSSPageRule::setSelectorText):
1933         * css/CSSSelectorList.cpp:
1934         * css/CSSSelectorList.h:
1935         (WebCore::CSSSelectorList::isValid):
1936         (WebCore::CSSSelectorList::first):
1937         (CSSSelectorList):
1938         * css/CSSStyleRule.cpp:
1939         (WebCore::CSSStyleRule::setSelectorText):
1940         * html/shadow/HTMLContentElement.cpp:
1941         (WebCore::HTMLContentElement::validateSelect):
1942         * inspector/InspectorStyleSheet.cpp:
1943         (WebCore::checkStyleRuleSelector):
1944
1945 2013-01-24  Kai Koehne  <kai.koehne@digia.com>
1946
1947         [Qt] Webkit debug build links against release binaries of ANGLE libEGL, libGLESv2
1948         https://bugs.webkit.org/show_bug.cgi?id=106217
1949
1950         Reviewed by Jocelyn Turcotte.
1951
1952         Use libEGLd, libEGLSv2d if qtbase was compiled with ANGLE.
1953
1954         * WebCore.pri: Mirror logic of qtbase\mkspecs\features\win32\opengl.prf
1955
1956 2013-01-24  Sergio Villar Senin  <svillar@igalia.com>
1957
1958         [GTK] Unreviewed build fix.
1959
1960         Do not include the header file WebKitDOMPerformanceEntryList.h in
1961         the build sources because we do not want the DOM bindings
1962         generator to include it in webkitdomdefes.h twice.
1963
1964         * bindings/gobject/GNUmakefile.am:
1965
1966 2013-01-24  Julien BRIANCEAU   <jbrianceau@nds.com>
1967
1968         Fix Qt build (KO since r140610), typo error for QString::fromUtf16 function.
1969         https://bugs.webkit.org/show_bug.cgi?id=107803
1970
1971         Reviewed by Andreas Kling.
1972
1973         * xml/parser/XMLDocumentParserQt.cpp:
1974         (WebCore::decodeNamedEntity):
1975
1976 2013-01-24  Pavel Feldman  <pfeldman@chromium.org>
1977
1978         Web Inspector: breakpoints are not restored upon reload for scripts with script mapping.
1979         https://bugs.webkit.org/show_bug.cgi?id=107799
1980
1981         The problem is that source mapping is set after UISourceCode gets into the workspace.
1982         Breakpoint manager will now only restore breakpoints upon setting the source maps.
1983
1984         Reviewed by Alexander Pavlov.
1985
1986         * inspector/front-end/BreakpointManager.js:
1987         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
1988         (WebInspector.BreakpointManager.prototype._uiSourceCodeMappingChanged):
1989         * inspector/front-end/CompilerScriptMapping.js:
1990         (WebInspector.CompilerScriptMapping.prototype.get addScript.get this):
1991         (WebInspector.CompilerScriptMapping.prototype.get addScript):
1992
1993 2013-01-24  Kent Tamura  <tkent@chromium.org>
1994
1995         Refactoring: Use AtomicString for an InputType::create argument
1996         https://bugs.webkit.org/show_bug.cgi?id=107791
1997
1998         Reviewed by Kentaro Hara.
1999
2000         A string passed to InputType::create is a 'type' attribute value, which
2001         is an AtomicString. Also, InputTypeFactoryMap is created with members of
2002         InputTypeName, which are AtomicStrings. We had better use AtomicStrings
2003         for them.
2004
2005         No new tests. This is just a refactoring.
2006
2007         * html/InputType.cpp:
2008         Change the key type of InputTypeFactoryMap from String to AtomicString.
2009         (WebCore::InputType::create):
2010         Change an argument type from const String& to const AtomicString&.
2011         * html/InputType.h:
2012         (InputType): Ditto.
2013
2014 2013-01-24  Kentaro Hara  <haraken@chromium.org>
2015
2016         Unreviewed. Build fix.
2017
2018         * bindings/v8/V8DOMWrapper.cpp:
2019         (WebCore::V8DOMWrapper::isDOMWrapper):
2020
2021 2013-01-24  Andreas Kling  <akling@apple.com>
2022
2023         AX: Fix the debug build after r140658. (Constructor initializer order.)
2024
2025         * accessibility/AccessibilityNodeObject.cpp:
2026         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
2027
2028 2013-01-24  Hajime Morrita  <morrita@google.com>
2029
2030         There are a few of wrong removeAllChildren() call
2031         https://bugs.webkit.org/show_bug.cgi?id=107790
2032
2033         Reviewed by Ryosuke Niwa.
2034
2035         removeAllChildren() is designed for trashing deleting children out.
2036         It doesn't detach() children and could have possible leak.
2037         This change replaces such removeAllChildren() usage with safer removeChildren().
2038
2039         No new tests. Covered by existing tests.
2040
2041         * html/HTMLInputElement.cpp:
2042         (WebCore::HTMLInputElement::parseAttribute):
2043         * html/InputType.cpp:
2044         (WebCore::InputType::destroyShadowSubtree):
2045         * html/ValidationMessage.cpp:
2046         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
2047         * html/parser/HTMLTreeBuilder.cpp:
2048         (WebCore::HTMLTreeBuilder::processEndTag):
2049
2050 2013-01-24  Dominic Mazzoni  <dmazzoni@google.com>
2051
2052         AX: should init an AXObject only after AXObjectCache has added it
2053         https://bugs.webkit.org/show_bug.cgi?id=107533
2054
2055         Reviewed by Chris Fleizach.
2056
2057         Initialize each AXObject after the AXObjectCache has
2058         finished adding it to its hash maps, so that it's
2059         impossible for initialization of an AXObject to result in
2060         exploring the tree and creating another AXObject instance
2061         that points to the same renderer / node.
2062
2063         Test: accessibility/duplicate-axrenderobject-crash.html
2064
2065         * accessibility/AXObjectCache.cpp:
2066         (WebCore::AXObjectCache::getOrCreate):
2067         * accessibility/AccessibilityARIAGrid.cpp:
2068         (WebCore::AccessibilityARIAGrid::create):
2069         * accessibility/AccessibilityARIAGridCell.cpp:
2070         (WebCore::AccessibilityARIAGridCell::create):
2071         * accessibility/AccessibilityARIAGridRow.cpp:
2072         (WebCore::AccessibilityARIAGridRow::create):
2073         * accessibility/AccessibilityList.cpp:
2074         (WebCore::AccessibilityList::create):
2075         * accessibility/AccessibilityListBox.cpp:
2076         (WebCore::AccessibilityListBox::create):
2077         * accessibility/AccessibilityMediaControls.cpp:
2078         (WebCore::AccessibilityMediaControl::create):
2079         (WebCore::AccessibilityMediaControlsContainer::create):
2080         (WebCore::AccessibilityMediaTimeline::create):
2081         (WebCore::AccessibilityMediaTimeDisplay::create):
2082         * accessibility/AccessibilityMenuList.cpp:
2083         (WebCore::AccessibilityMenuList::create):
2084         * accessibility/AccessibilityNodeObject.cpp:
2085         (WebCore::AccessibilityNodeObject::create):
2086         * accessibility/AccessibilityObject.h:
2087         (WebCore::AccessibilityObject::init):
2088         (AccessibilityObject):
2089         * accessibility/AccessibilityProgressIndicator.cpp:
2090         (WebCore::AccessibilityProgressIndicator::create):
2091         * accessibility/AccessibilityRenderObject.cpp:
2092         (WebCore::AccessibilityRenderObject::create):
2093         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2094             assert that the object has been initialized
2095         * accessibility/AccessibilitySVGRoot.cpp:
2096         (WebCore::AccessibilitySVGRoot::create):
2097         * accessibility/AccessibilitySlider.cpp:
2098         (WebCore::AccessibilitySlider::create):
2099         * accessibility/AccessibilityTable.cpp:
2100         (WebCore::AccessibilityTable::create):
2101         * accessibility/AccessibilityTableCell.cpp:
2102         (WebCore::AccessibilityTableCell::create):
2103         * accessibility/AccessibilityTableRow.cpp:
2104         (WebCore::AccessibilityTableRow::create):
2105
2106 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2107
2108         Implement MouseEvent constructor
2109         https://bugs.webkit.org/show_bug.cgi?id=107630
2110
2111         Reviewed by Adam Barth.
2112
2113         Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
2114
2115         The MouseEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR flag.
2116         This significantly simplifies JavaScript code to construct a MouseEvent.
2117
2118         Before:
2119           event = document.createEvent("MouseEvents");
2120           event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
2121
2122         After:
2123           event = new MouseEvent("click");
2124
2125         Test: fast/events/constructors/mouse-event-constructor.html
2126
2127         * bindings/scripts/CodeGenerator.pm:
2128         (IsSubType):
2129         (IsInheritExtendedAttribute):
2130         * bindings/scripts/CodeGeneratorV8.pm:
2131         (GenerateHeader):
2132         (GenerateNamedConstructorCallback):
2133         (GenerateImplementation):
2134         * bindings/scripts/test/V8/V8Float64Array.cpp:
2135         (WebCore):
2136         (WebCore::V8Float64Array::createWrapper):
2137         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2138         (WebCore):
2139         (WebCore::V8TestActiveDOMObject::createWrapper):
2140         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2141         (WebCore):
2142         (WebCore::V8TestCustomNamedGetter::createWrapper):
2143         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2144         (WebCore):
2145         (WebCore::V8TestEventConstructor::createWrapper):
2146         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2147         (WebCore):
2148         (WebCore::V8TestEventTarget::toEventTarget):
2149         (WebCore::V8TestEventTarget::createWrapper):
2150         * bindings/scripts/test/V8/V8TestEventTarget.h:
2151         (V8TestEventTarget):
2152         * bindings/scripts/test/V8/V8TestException.cpp:
2153         (WebCore):
2154         (WebCore::V8TestException::createWrapper):
2155         * bindings/scripts/test/V8/V8TestInterface.cpp:
2156         (WebCore):
2157         (WebCore::V8TestInterface::toActiveDOMObject):
2158         (WebCore::V8TestInterface::createWrapper):
2159         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2160         (WebCore):
2161         (WebCore::V8TestMediaQueryListListener::createWrapper):
2162         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2163         (WebCore):
2164         (WebCore::V8TestNamedConstructor::toActiveDOMObject):
2165         (WebCore::V8TestNamedConstructor::createWrapper):
2166         * bindings/scripts/test/V8/V8TestNode.cpp:
2167         (WebCore):
2168         (WebCore::V8TestNode::toEventTarget):
2169         (WebCore::V8TestNode::createWrapper):
2170         * bindings/scripts/test/V8/V8TestNode.h:
2171         (V8TestNode):
2172         * bindings/scripts/test/V8/V8TestObj.cpp:
2173         (WebCore):
2174         (WebCore::V8TestObj::createWrapper):
2175         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2176         (WebCore):
2177         (WebCore::V8TestOverloadedConstructors::createWrapper):
2178         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2179         (WebCore):
2180         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
2181         * bindings/v8/Dictionary.cpp:
2182         (WebCore::Dictionary::get):
2183         (WebCore):
2184         * bindings/v8/Dictionary.h:
2185         (Dictionary):
2186         * bindings/v8/NPV8Object.cpp:
2187         (WebCore::npObjectTypeInfo):
2188         * bindings/v8/V8DOMWrapper.cpp:
2189         (WebCore::V8DOMWrapper::isDOMWrapper):
2190         (WebCore):
2191         * bindings/v8/V8DOMWrapper.h:
2192         (V8DOMWrapper):
2193         * bindings/v8/WrapperTypeInfo.h:
2194         (WebCore):
2195         (WebCore::WrapperTypeInfo::toEventTarget):
2196         (WrapperTypeInfo):
2197         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2198         (WebCore):
2199         * dom/MouseEvent.cpp:
2200         (WebCore::MouseEventInit::MouseEventInit):
2201         (WebCore):
2202         (WebCore::MouseEvent::create):
2203         (WebCore::MouseEvent::MouseEvent):
2204         * dom/MouseEvent.h:
2205         (MouseEventInit):
2206         (WebCore):
2207         (MouseEvent):
2208         (WebCore::MouseEvent::create):
2209         (WebCore::MouseEvent::button):
2210         (WebCore::MouseEvent::buttonDown):
2211         (WebCore::MouseEvent::relatedTarget):
2212         (WebCore::MouseEvent::setRelatedTarget):
2213         (WebCore::MouseEvent::clipboard):
2214         (WebCore::MouseEvent::dataTransfer):
2215         * dom/MouseEvent.idl:
2216
2217 2013-01-23  Kent Tamura  <tkent@chromium.org>
2218
2219         Add form-related instrumentations, and support 33+ features in FeatureObserver
2220         https://bugs.webkit.org/show_bug.cgi?id=107770
2221
2222         Reviewed by Kentaro Hara.
2223
2224         No new tests. This doesn't make behavior changes.
2225
2226         * page/FeatureObserver.h:
2227         - Add form-related features.
2228         - Add a Document* version of observe().
2229         - Use BitVector to represent features to support 33+ features.
2230         (WebCore::FeatureObserver::didObserve):
2231         (FeatureObserver):
2232         * page/FeatureObserver.cpp:
2233         (WebCore::FeatureObserver::FeatureObserver):
2234         (WebCore::FeatureObserver::~FeatureObserver):
2235         (WebCore::FeatureObserver::observe):
2236
2237         * html/ColorInputType.cpp:
2238         (WebCore::ColorInputType::create): Calls FeatureObserver::observe.
2239         * html/DateInputType.cpp:
2240         (WebCore::DateInputType::create): Ditto.
2241         * html/DateTimeInputType.cpp:
2242         (WebCore::DateTimeInputType::create): Ditto.
2243         * html/DateTimeLocalInputType.cpp:
2244         (WebCore::DateTimeLocalInputType::create): Ditto.
2245         * html/EmailInputType.cpp:
2246         (WebCore::EmailInputType::create): Ditto.
2247         * html/HTMLDataListElement.cpp:
2248         (WebCore::HTMLDataListElement::create): Ditto.
2249         * html/HTMLFormControlElement.cpp:
2250         (WebCore::HTMLFormControlElement::parseAttribute): Ditto.
2251         * html/HTMLInputElement.cpp:
2252         (WebCore::HTMLInputElement::parseAttribute): Ditto.
2253         * html/HTMLTextFormControlElement.cpp:
2254         (WebCore::HTMLTextFormControlElement::parseAttribute): Ditto.
2255         * html/InputType.cpp:
2256         (WebCore::InputType::create):
2257         Record type=datetime and type=week even if these types are not enabled.
2258         * html/MonthInputType.cpp:
2259         (WebCore::MonthInputType::create): Calls FeatureObserver::observe.
2260         * html/NumberInputType.cpp:
2261         (WebCore::NumberInputType::create): Ditto.
2262         * html/RangeInputType.cpp:
2263         (WebCore::RangeInputType::create): Ditto.
2264         * html/SearchInputType.cpp:
2265         (WebCore::SearchInputType::create): Ditto.
2266         * html/TelephoneInputType.cpp:
2267         (WebCore::TelephoneInputType::create): Ditto.
2268         * html/TimeInputType.cpp:
2269         (WebCore::TimeInputType::create): Ditto.
2270         * html/URLInputType.cpp:
2271         (WebCore::URLInputType::create): Ditto.
2272         * html/WeekInputType.cpp:
2273         (WebCore::WeekInputType::create): Ditto.
2274
2275 2013-01-23  Ken Kania  <kkania@chromium.org>
2276
2277         [Inspector] Add events for tracking page loads and scheduled navigations.
2278         https://bugs.webkit.org/show_bug.cgi?id=104168
2279
2280         Reviewed by Pavel Feldman.
2281
2282         These events are needed for clients who need to be aware of when a page is
2283         navigating or about to navigate. Some clients may wish to prevent interaction
2284         with the page during this time. Two of the new events track loading start and
2285         stop, as measured by the ProgressTracker. The other two events track when a
2286         page has a new scheduled navigation and when it no longer has a scheduled
2287         navigation. These latter two events won't allow the client to determine if
2288         a load is going to happen in all circumstances, but is sufficient for many cases.
2289         Make sure we hold a reference to the frame in NavigationScheduler::timerFired
2290         in case the redirect causes the frame to be detached.
2291
2292         Also, minor update to InspectorInputAgent::dispatchMouseEvent to reorder params
2293         to match dispatchKeyEvent.
2294
2295         Tests: inspector-protocol/page/frameScheduledNavigation.html
2296                inspector-protocol/page/frameStartedLoading.html
2297
2298         * inspector/Inspector.json:
2299         * inspector/InspectorInputAgent.cpp:
2300         (WebCore::InspectorInputAgent::dispatchMouseEvent):
2301         * inspector/InspectorInputAgent.h:
2302         (InspectorInputAgent):
2303         * inspector/InspectorInstrumentation.cpp:
2304         (WebCore):
2305         (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
2306         (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl):
2307         (WebCore::InspectorInstrumentation::frameScheduledNavigationImpl):
2308         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigationImpl):
2309         * inspector/InspectorInstrumentation.h:
2310         (InspectorInstrumentation):
2311         (WebCore::InspectorInstrumentation::frameStartedLoading):
2312         (WebCore):
2313         (WebCore::InspectorInstrumentation::frameStoppedLoading):
2314         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
2315         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
2316         * inspector/InspectorPageAgent.cpp:
2317         (WebCore::InspectorPageAgent::frameStartedLoading):
2318         (WebCore):
2319         (WebCore::InspectorPageAgent::frameStoppedLoading):
2320         (WebCore::InspectorPageAgent::frameScheduledNavigation):
2321         (WebCore::InspectorPageAgent::frameClearedScheduledNavigation):
2322         * inspector/InspectorPageAgent.h:
2323         * inspector/front-end/ResourceTreeModel.js:
2324         (WebInspector.PageDispatcher.prototype.frameDetached):
2325         (WebInspector.PageDispatcher.prototype.frameStartedLoading):
2326         (WebInspector.PageDispatcher.prototype.frameStoppedLoading):
2327         (WebInspector.PageDispatcher.prototype.frameScheduledNavigation):
2328         (WebInspector.PageDispatcher.prototype.frameClearedScheduledNavigation):
2329         * loader/NavigationScheduler.cpp:
2330         (WebCore::NavigationScheduler::clear):
2331         (WebCore::NavigationScheduler::timerFired):
2332         (WebCore::NavigationScheduler::startTimer):
2333         (WebCore::NavigationScheduler::cancel):
2334         * loader/ProgressTracker.cpp:
2335         (WebCore::ProgressTracker::progressStarted):
2336         (WebCore::ProgressTracker::finalProgressComplete):
2337
2338 2013-01-23  Simon Fraser  <simon.fraser@apple.com>
2339
2340         Avoid creating background layers on pages with a fixed background, but no image
2341         https://bugs.webkit.org/show_bug.cgi?id=107783
2342         <rdar://problem/13074450>
2343
2344         Reviewed by Beth Dakin.
2345         
2346         http://www.nme.com has background-attachment: fixed on the <body>, but
2347         not background image. In that case there's no point making a layer
2348         for the fixed root background.
2349
2350         Test: platform/mac/tiled-drawing/fixed-background/fixed-background-no-image.html
2351
2352         * rendering/style/RenderStyle.cpp:
2353         (WebCore::allLayersAreFixed): Check to see if we have an image, as well
2354         as fixed attachment.
2355
2356 2013-01-23  Wei Jia  <wjia@chromium.org>
2357
2358         Enable autoplay when <video>'s src is from media stream
2359         https://bugs.webkit.org/show_bug.cgi?id=105224
2360
2361         Reviewed by Eric Carlson.
2362
2363         Enable autoplay when <video>'s src is from media stream. This would avoid requesting multiple gestures when <video> is used for WebRTC.
2364         The test is done by modifying platform/chromium/media/video-capture-preview.html.
2365
2366         * html/HTMLMediaElement.cpp:
2367         (WebCore::HTMLMediaElement::loadResource):
2368
2369 2013-01-23  Roger Fong  <roger_fong@apple.com>
2370
2371         Remove ForwardingHeaders/wtf from WebCore.
2372         https://bugs.webkit.org/show_bug.cgi?id=107723
2373
2374         The folders are empty, nothings actually being copied over anymore from the ForwardingHeaders/wtf folder.
2375
2376         Reviewed by Benjamin Poulain.
2377
2378         * ForwardingHeaders/wtf: Removed.
2379         * ForwardingHeaders/wtf/dtoa: Removed.
2380         * ForwardingHeaders/wtf/text: Removed.
2381         * ForwardingHeaders/wtf/unicode: Removed.
2382         * ForwardingHeaders/wtf/unicode/icu: Removed.
2383         * ForwardingHeaders/wtf/unicode/wince: Removed.
2384         * ForwardingHeaders/wtf/url: Removed.
2385         * WebCore.vcproj/copyForwardingHeaders.cmd:
2386
2387 2013-01-23  Hayato Ito  <hayato@chromium.org>
2388
2389         Group parameters (firstRuleIndex and lastRuleIndex) into a parameter object, RuleRange.
2390         https://bugs.webkit.org/show_bug.cgi?id=107095
2391
2392         Reviewed by Darin Adler.
2393
2394         This is a continued effort after r139817.
2395
2396         Factoring, no change in behavior.
2397
2398         * css/StyleResolver.cpp:
2399         (WebCore::StyleResolver::collectMatchingRules):
2400         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2401         (WebCore::StyleResolver::matchScopedAuthorRules):
2402         (WebCore::StyleResolver::matchHostRules):
2403         (WebCore::StyleResolver::matchAuthorRules):
2404         (WebCore::StyleResolver::matchUserRules):
2405         (WebCore::StyleResolver::matchUARules):
2406         (WebCore::StyleResolver::collectMatchingRulesForList):
2407         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2408         * css/StyleResolver.h:
2409         (WebCore::StyleResolver::RuleRange::RuleRange):
2410         (RuleRange): Newly introduced to group parameters.
2411         (StyleResolver):
2412         (WebCore::StyleResolver::MatchRanges::UARuleRange):
2413         (WebCore::StyleResolver::MatchRanges::authorRuleRange):
2414         (WebCore::StyleResolver::MatchRanges::userRuleRange):
2415
2416 2013-01-23  Luke Macpherson   <macpherson@chromium.org>
2417
2418         Support variables inside -webkit-box-reflect CSS property.
2419         https://bugs.webkit.org/show_bug.cgi?id=106856
2420
2421         Reviewed by Tony Chang.
2422
2423         The primary change is to make the direction parameter a CSSPrimitiveValue style ident,
2424         so that it can also be a variable reference.
2425
2426         Covered by existing LayoutTests/compositing/reflections/ tests.
2427         Added Test: fast/css/variables/var-inside-box-reflect.html
2428
2429         * css/CSSComputedStyleDeclaration.cpp:
2430         (WebCore::valueForReflection):
2431         * css/CSSParser.cpp:
2432         (WebCore::CSSParser::parseReflect):
2433         * css/CSSPrimitiveValueMappings.h:
2434         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2435         (WebCore):
2436         (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
2437         (WebCore::CSSPrimitiveValue::convertToLength):
2438         * css/CSSReflectValue.cpp:
2439         (WebCore::CSSReflectValue::customCssText):
2440         Use String addition operator instead of StringBuilder.
2441         (WebCore):
2442         (WebCore::CSSReflectValue::customSerializeResolvingVariables):
2443         Use String addition operator instead of StringBuilder.
2444         * css/CSSReflectValue.h:
2445         (WebCore::CSSReflectValue::create):
2446         (WebCore::CSSReflectValue::direction):
2447         (CSSReflectValue):
2448         (WebCore::CSSReflectValue::CSSReflectValue):
2449         * css/CSSValue.cpp:
2450         (WebCore::CSSValue::serializeResolvingVariables):
2451         * css/StyleResolver.cpp:
2452         (WebCore::hasVariableReference):
2453         (WebCore::StyleResolver::applyProperty):
2454
2455 2013-01-23  Abhishek Arya  <inferno@chromium.org>
2456
2457         Add ASSERT_WITH_SECURITY_IMPLICATION to detect bad casts in rendering
2458         https://bugs.webkit.org/show_bug.cgi?id=107743
2459
2460         Reviewed by Eric Seidel.
2461
2462         * rendering/InlineFlowBox.h:
2463         (WebCore::toInlineFlowBox):
2464         * rendering/RenderBR.h:
2465         (WebCore::toRenderBR):
2466         * rendering/RenderBlock.h:
2467         (WebCore::toRenderBlock):
2468         * rendering/RenderBox.h:
2469         (WebCore::toRenderBox):
2470         * rendering/RenderBoxModelObject.h:
2471         (WebCore::toRenderBoxModelObject):
2472         * rendering/RenderButton.h:
2473         (WebCore::toRenderButton):
2474         * rendering/RenderCombineText.h:
2475         (WebCore::toRenderCombineText):
2476         * rendering/RenderCounter.h:
2477         (WebCore::toRenderCounter):
2478         * rendering/RenderDetailsMarker.h:
2479         (WebCore::toRenderDetailsMarker):
2480         * rendering/RenderEmbeddedObject.h:
2481         (WebCore::toRenderEmbeddedObject):
2482         * rendering/RenderFieldset.h:
2483         (WebCore::toRenderFieldset):
2484         * rendering/RenderFileUploadControl.h:
2485         (WebCore::toRenderFileUploadControl):
2486         * rendering/RenderFlowThread.h:
2487         (WebCore::toRenderFlowThread):
2488         * rendering/RenderFrame.h:
2489         (WebCore::toRenderFrame):
2490         * rendering/RenderFrameSet.h:
2491         (WebCore::toRenderFrameSet):
2492         * rendering/RenderFullScreen.h:
2493         (WebCore::toRenderFullScreen):
2494         * rendering/RenderIFrame.h:
2495         (WebCore::toRenderIFrame):
2496         * rendering/RenderImage.h:
2497         (WebCore::toRenderImage):
2498         * rendering/RenderInline.h:
2499         (WebCore::toRenderInline):
2500         * rendering/RenderLayerModelObject.h:
2501         (WebCore::toRenderLayerModelObject):
2502         * rendering/RenderListBox.h:
2503         (WebCore::toRenderListBox):
2504         * rendering/RenderListItem.h:
2505         (WebCore::toRenderListItem):
2506         * rendering/RenderListMarker.h:
2507         (WebCore::toRenderListMarker):
2508         * rendering/RenderMedia.h:
2509         (WebCore::toRenderMedia):
2510         * rendering/RenderMenuList.h:
2511         (WebCore::toRenderMenuList):
2512         * rendering/RenderMeter.h:
2513         (WebCore::toRenderMeter):
2514         * rendering/RenderMultiColumnBlock.h:
2515         (WebCore::toRenderMultiColumnBlock):
2516         * rendering/RenderMultiColumnSet.h:
2517         (WebCore::toRenderMultiColumnSet):
2518         * rendering/RenderNamedFlowThread.h:
2519         (WebCore::toRenderNamedFlowThread):
2520         * rendering/RenderPart.h:
2521         (WebCore::toRenderPart):
2522         * rendering/RenderProgress.h:
2523         (WebCore::toRenderProgress):
2524         * rendering/RenderQuote.h:
2525         (WebCore::toRenderQuote):
2526         * rendering/RenderRegion.h:
2527         (WebCore::toRenderRegion):
2528         * rendering/RenderRubyRun.h:
2529         (WebCore::toRenderRubyRun):
2530         * rendering/RenderScrollbarPart.h:
2531         (WebCore::toRenderScrollbarPart):
2532         * rendering/RenderSearchField.h:
2533         (WebCore::toRenderSearchField):
2534         * rendering/RenderSlider.h:
2535         (WebCore::toRenderSlider):
2536         * rendering/RenderSnapshottedPlugIn.h:
2537         (WebCore::toRenderSnapshottedPlugIn):
2538         * rendering/RenderTable.h:
2539         (WebCore::toRenderTable):
2540         * rendering/RenderTableCaption.h:
2541         (WebCore::toRenderTableCaption):
2542         * rendering/RenderTableCell.h:
2543         (WebCore::toRenderTableCell):
2544         * rendering/RenderTableCol.h:
2545         (WebCore::toRenderTableCol):
2546         * rendering/RenderTableRow.h:
2547         (WebCore::toRenderTableRow):
2548         * rendering/RenderTableSection.h:
2549         (WebCore::toRenderTableSection):
2550         * rendering/RenderText.h:
2551         (WebCore::toRenderText):
2552         * rendering/RenderTextControl.h:
2553         (WebCore::toRenderTextControl):
2554         * rendering/RenderTextControlMultiLine.h:
2555         (WebCore::toRenderTextControlMultiLine):
2556         * rendering/RenderTextControlSingleLine.h:
2557         (WebCore::toRenderTextControlSingleLine):
2558         * rendering/RenderVideo.h:
2559         (WebCore::toRenderVideo):
2560         * rendering/RenderView.h:
2561         (WebCore::toRenderView):
2562         * rendering/RenderWidget.h:
2563         (WebCore::toRenderWidget):
2564         * rendering/mathml/RenderMathMLBlock.h:
2565         (WebCore::toRenderMathMLBlock):
2566         * rendering/svg/RenderSVGContainer.h:
2567         (WebCore::toRenderSVGContainer):
2568         * rendering/svg/RenderSVGGradientStop.h:
2569         (WebCore::toRenderSVGGradientStop):
2570         * rendering/svg/RenderSVGImage.h:
2571         (WebCore::toRenderSVGImage):
2572         * rendering/svg/RenderSVGInlineText.h:
2573         (WebCore::toRenderSVGInlineText):
2574         * rendering/svg/RenderSVGRoot.h:
2575         (WebCore::toRenderSVGRoot):
2576         * rendering/svg/RenderSVGShape.h:
2577         (WebCore::toRenderSVGShape):
2578         * rendering/svg/RenderSVGText.h:
2579         (WebCore::toRenderSVGText):
2580
2581 2013-01-23  Elliott Sprehn  <esprehn@gmail.com>
2582
2583         Don't allocate rare data on every Element on removal
2584         https://bugs.webkit.org/show_bug.cgi?id=107756
2585
2586         Reviewed by Eric Seidel.
2587
2588         We should not allocate an ElementRareData for every element
2589         in Element::removedFrom. Previously calls to setIsInTopLayer
2590         would unconditionally call ensureElementRareData(), and this was
2591         called from Element::removedFrom meaning removing an element
2592         made the entire subtree suddenly balloon to huge in size as each
2593         one got an ElementRareData.
2594
2595         This is a regression from my patch on Bug 103912 where I removed a check
2596         that avoided this allocation.
2597
2598         No new tests needed, covered by existing tests.
2599
2600         * dom/Element.cpp:
2601         (WebCore::Element::setIsInTopLayer):
2602
2603 2013-01-23  Adam Barth  <abarth@webkit.org>
2604
2605         BackgroundHTMLParser should use more const references to avoid copy constructors
2606         https://bugs.webkit.org/show_bug.cgi?id=107763
2607
2608         Reviewed by Tony Gentilcore.
2609
2610         I doubt this optimization is visible anywhere, but it's just a nit.
2611
2612         * html/parser/BackgroundHTMLParser.cpp:
2613         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
2614         (WebCore::BackgroundHTMLParser::createPartial):
2615         * html/parser/BackgroundHTMLParser.h:
2616         (WebCore::BackgroundHTMLParser::create):
2617         (BackgroundHTMLParser):
2618
2619 2013-01-23  Abhishek Arya  <inferno@chromium.org>
2620
2621         Add support for ASSERT_WITH_SECURITY_IMPLICATION.
2622         https://bugs.webkit.org/show_bug.cgi?id=107699
2623
2624         Reviewed by Eric Seidel.
2625
2626         * dom/ContainerNode.cpp:
2627         (WebCore::ContainerNode::parserInsertBefore): Use ASSERT_WITH_SECURITY_IMPLICATION
2628         for document confusion ASSERT(document() == newChild->document())
2629         (WebCore::ContainerNode::parserAppendChild): same.
2630
2631 2013-01-23  Ian Vollick  <vollick@chromium.org>
2632
2633         Unreviewed build fix.
2634
2635         * rendering/RenderLayer.cpp:
2636         (WebCore::RenderLayer::rebuildZOrderLists):
2637
2638 2013-01-23  Rafael Weinstein  <rafaelw@chromium.org>
2639
2640         Template element should parse in XHTML just as it does in HTML
2641         https://bugs.webkit.org/show_bug.cgi?id=106491
2642
2643         Reviewed by Ryosuke Niwa.
2644
2645         https://dvcs.w3.org/hg/webcomponents/raw-file/f33622c39c5e/spec/templates/index.html#parsing-xhtml-documents.
2646         https://dvcs.w3.org/hg/webcomponents/raw-file/f33622c39c5e/spec/templates/index.html#serializing-xhtml-documents.
2647
2648         This patch modifies the XML parser in two ways: (1) when nodes are created, their owner document is
2649         the owner document of the current node, rather than the containing document, and (2) when an HTMLTemplateElement
2650         is encountered, its content document fragment is pushed onto the stack, rather than the element itself, so that children
2651         are appended to the template content. Also, because XSLT operates on the serialized input document, transforms consider
2652         template contents to be descendants.
2653
2654         Tests: fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization.xml
2655                fast/xpath/xpath-template-element.html
2656                fast/xsl/xslt-processor-template.html
2657                fast/xsl/xslt-xhtml-template.xml
2658
2659         * xml/parser/XMLDocumentParser.cpp:
2660         (WebCore::XMLDocumentParser::enterText):
2661         * xml/parser/XMLDocumentParserLibxml2.cpp:
2662         (WebCore::XMLDocumentParser::startElementNs):
2663         (WebCore::XMLDocumentParser::processingInstruction):
2664         (WebCore::XMLDocumentParser::cdataBlock):
2665         (WebCore::XMLDocumentParser::comment):
2666
2667 2013-01-23  Tony Gentilcore  <tonyg@chromium.org>
2668
2669         Teach threaded HTML parser to update InspectorInstrumentation when writing HTML
2670         https://bugs.webkit.org/show_bug.cgi?id=107755
2671
2672         Reviewed by Eric Seidel.
2673
2674         The current length is unused, so it doesn't cause any noticeable behavior difference to not pass it here.
2675
2676         No new tests because covered by existing tests.
2677
2678         * html/parser/HTMLDocumentParser.cpp:
2679         (WebCore::HTMLDocumentParser::processTokensFromBackgroundParser):
2680
2681 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2682
2683         [V8] Make an Isolate parameter mandatory in NativeToJS()
2684         https://bugs.webkit.org/show_bug.cgi?id=107663
2685
2686         Reviewed by Adam Barth.
2687
2688         No tests. No change in behavior.
2689
2690         * bindings/scripts/CodeGeneratorV8.pm:
2691         (GenerateCallbackImplementation):
2692         (NativeToJSValue):
2693         * bindings/scripts/test/V8/V8TestCallback.cpp:
2694         (WebCore::V8TestCallback::callbackWithClass1Param):
2695         (WebCore::V8TestCallback::callbackWithClass2Param):
2696         (WebCore::V8TestCallback::callbackWithStringList):
2697         (WebCore::V8TestCallback::callbackWithBoolean):
2698         (WebCore::V8TestCallback::callbackRequiresThisToPass):
2699
2700 2013-01-23  Stephanie Lewis  <slewis@apple.com>
2701
2702         Add ordering for WebCore __DATA.
2703         https://bugs.webkit.org/show_bug.cgi?id=107765
2704         <rdar://problem/13019603>
2705
2706         Rubber stamped by Oliver Hunt.
2707
2708         No Change in functionality.
2709
2710         * WebCore.order:
2711
2712 2013-01-23  Benjamin Poulain  <bpoulain@apple.com>
2713
2714         RenderProgress does not repaint on value change
2715         https://bugs.webkit.org/show_bug.cgi?id=106977
2716
2717         Reviewed by Joseph Pecoraro.
2718
2719         No test because the ouput depends on the code of RenderTheme, and
2720         we use the platform theme for testing.
2721
2722         * rendering/RenderProgress.cpp:
2723         (WebCore::RenderProgress::updateFromElement):
2724         (WebCore::RenderProgress::updateAnimationState):
2725         Previously, repaint() was only called on two occasions:
2726         -On animationTimerFired().
2727         -In response to updateFromElement() if and only if the RenderTheme start/stop an
2728          animation previously stopped/running.
2729
2730         When changing the value of HTMLProgressElement, no repaint was called until
2731         the next timer fired for the animation.
2732         This is a problem if:
2733         -The animation of RenderTheme is slow.
2734         -If there is no animation (the element is never updated in that case).
2735
2736 2013-01-23  Ian Vollick  <vollick@chromium.org>
2737
2738         Introduce the "stacking container" concept.
2739         https://bugs.webkit.org/show_bug.cgi?id=107734
2740
2741         Reviewed by Simon Fraser.
2742
2743         A stacking container is treated just like a stacking context. That
2744         is, it has z-order lists, it and its descendants are stacked as a
2745         unit, and when the RenderLayerCompositor does its overlap testing,
2746         the composited regions for all layer lists take effect only once the
2747         stacking container is done being processed.
2748
2749         This patch also adds the function RenderLayer::isStackingContainer().
2750         Currently, this is equivalent to RenderLayer::isStackingContext(),
2751         but in future, the definition of stacking container will be broadened
2752         to encompass more than just stacking contexts.
2753
2754         Other than the addition of this extra function, the patch is mostly
2755         comprised of name changes. Any code that used to refer to the
2756         stacking context concept, but didn't necessarily require a stacking
2757         context in the strict, CSS-sense, was switched to refer to stacking
2758         container. No functionality was changed.
2759
2760         No new tests, no change in functionality.
2761
2762         * inspector/InspectorLayerTreeAgent.cpp:
2763         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2764         * rendering/RenderLayer.cpp:
2765         (WebCore::RenderLayer::RenderLayer):
2766         (WebCore):
2767         (WebCore::RenderLayer::updatePagination):
2768         (WebCore::RenderLayer::canBeStackingContainer):
2769         (WebCore::RenderLayer::setHasVisibleContent):
2770         (WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
2771         (WebCore::RenderLayer::stackingContainer):
2772         (WebCore::compositingContainer):
2773         (WebCore::expandClipRectForDescendantsAndReflection):
2774         (WebCore::RenderLayer::addChild):
2775         (WebCore::RenderLayer::removeChild):
2776         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
2777         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
2778         (WebCore::RenderLayer::paintPaginatedChildLayer):
2779         (WebCore::RenderLayer::hitTestPaginatedChildLayer):
2780         (WebCore::RenderLayer::calculateLayerBounds):
2781         (WebCore::RenderLayer::dirtyZOrderLists):
2782         (WebCore::RenderLayer::dirtyStackingContainerZOrderLists):
2783         (WebCore::RenderLayer::collectLayers):
2784         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
2785         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
2786         (WebCore::RenderLayer::styleChanged):
2787         * rendering/RenderLayer.h:
2788         (RenderLayer):
2789         (WebCore::RenderLayer::isStackingContainer):
2790         (WebCore::RenderLayer::posZOrderList):
2791         (WebCore::RenderLayer::negZOrderList):
2792         (WebCore::RenderLayer::isDirtyStackingContainer):
2793         (WebCore::RenderLayer::clearZOrderLists):
2794         (WebCore::RenderLayer::updateZOrderLists):
2795         * rendering/RenderLayerBacking.cpp:
2796         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2797         (WebCore::RenderLayerBacking::compositingOpacity):
2798         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2799         * rendering/RenderLayerCompositor.cpp:
2800         (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer):
2801         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2802         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2803         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2804         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2805         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2806         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2807         (WebCore::RenderLayerCompositor::layerHas3DContent):
2808         (WebCore::isRootmostFixedOrStickyLayer):
2809
2810 2013-01-23  Simon Fraser  <simon.fraser@apple.com>
2811
2812         Have scrollperf logging log information about wheel event handlers
2813         https://bugs.webkit.org/show_bug.cgi?id=107761
2814         <rdar://problem/12281015>
2815
2816         Reviewed by Tim Horton.
2817
2818         Log when the wheel event handler count of a ScrollingTreeScrollingNodeMac changes.
2819
2820         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2821         (WebCore::ScrollingTreeScrollingNodeMac::update):
2822         (WebCore::logWheelEventHandlerCountChanged):
2823
2824 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2825
2826         [V8] Add an optional Isolate parameter to GetTemplate() and GetRawTemplate()
2827         https://bugs.webkit.org/show_bug.cgi?id=107679
2828
2829         Reviewed by Adam Barth.
2830
2831         It is important to pass an Isolate to GetTemplate() and GetRawTemplate().
2832         To proceed the work incrementally, this patch adds an optional Isolate parameter
2833         to GetTemplate() and GetRawTemplate(). Once all call sites are updated, the
2834         Isolate parameter will be made mandatory.
2835
2836         No tests. No change in behavior.
2837
2838         * bindings/scripts/CodeGeneratorV8.pm:
2839         (GenerateHeader):
2840         (GenerateNamedConstructorCallback):
2841         (GenerateImplementation):
2842         * bindings/scripts/test/V8/V8Float64Array.cpp:
2843         (WebCore::V8Float64Array::GetRawTemplate):
2844         (WebCore::V8Float64Array::GetTemplate):
2845         * bindings/scripts/test/V8/V8Float64Array.h:
2846         (V8Float64Array):
2847         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2848         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
2849         (WebCore::V8TestActiveDOMObject::GetTemplate):
2850         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2851         (V8TestActiveDOMObject):
2852         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2853         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
2854         (WebCore::V8TestCustomNamedGetter::GetTemplate):
2855         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2856         (V8TestCustomNamedGetter):
2857         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2858         (WebCore::V8TestEventConstructor::GetRawTemplate):
2859         (WebCore::V8TestEventConstructor::GetTemplate):
2860         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2861         (V8TestEventConstructor):
2862         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2863         (WebCore::V8TestEventTarget::GetRawTemplate):
2864         (WebCore::V8TestEventTarget::GetTemplate):
2865         * bindings/scripts/test/V8/V8TestEventTarget.h:
2866         (V8TestEventTarget):
2867         * bindings/scripts/test/V8/V8TestException.cpp:
2868         (WebCore::V8TestException::GetRawTemplate):
2869         (WebCore::V8TestException::GetTemplate):
2870         * bindings/scripts/test/V8/V8TestException.h:
2871         (V8TestException):
2872         * bindings/scripts/test/V8/V8TestInterface.cpp:
2873         (WebCore::V8TestInterface::GetRawTemplate):
2874         (WebCore::V8TestInterface::GetTemplate):
2875         * bindings/scripts/test/V8/V8TestInterface.h:
2876         (V8TestInterface):
2877         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2878         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
2879         (WebCore::V8TestMediaQueryListListener::GetTemplate):
2880         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2881         (V8TestMediaQueryListListener):
2882         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2883         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
2884         (WebCore::V8TestNamedConstructor::GetRawTemplate):
2885         (WebCore::V8TestNamedConstructor::GetTemplate):
2886         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2887         (V8TestNamedConstructorConstructor):
2888         (V8TestNamedConstructor):
2889         * bindings/scripts/test/V8/V8TestNode.cpp:
2890         (WebCore::V8TestNode::GetRawTemplate):
2891         (WebCore::V8TestNode::GetTemplate):
2892         * bindings/scripts/test/V8/V8TestNode.h:
2893         (V8TestNode):
2894         * bindings/scripts/test/V8/V8TestObj.cpp:
2895         (WebCore::V8TestObj::GetRawTemplate):
2896         (WebCore::V8TestObj::GetTemplate):
2897         * bindings/scripts/test/V8/V8TestObj.h:
2898         (V8TestObj):
2899         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2900         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
2901         (WebCore::V8TestOverloadedConstructors::GetTemplate):
2902         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
2903         (V8TestOverloadedConstructors):
2904         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2905         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
2906         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
2907         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2908         (V8TestSerializedScriptValueInterface):
2909         * bindings/v8/WrapperTypeInfo.h:
2910         (WebCore):
2911         (WebCore::WrapperTypeInfo::getTemplate):
2912         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2913         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2914         * bindings/v8/custom/V8HTMLImageElementConstructor.h:
2915         (V8HTMLImageElementConstructor):
2916
2917 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2918
2919         [V8] Move V8DOMWrapper::getEventListener() to V8EventListerList
2920         https://bugs.webkit.org/show_bug.cgi?id=107683
2921
2922         Reviewed by Adam Barth.
2923
2924         No tests. No change in behavior.
2925
2926         * bindings/scripts/CodeGeneratorV8.pm:
2927         (GenerateNormalAttrSetter):
2928         (GenerateEventListenerCallback):
2929         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2930         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
2931         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
2932         * bindings/scripts/test/V8/V8TestObj.cpp:
2933         (WebCore::TestObjV8Internal::addEventListenerCallback):
2934         (WebCore::TestObjV8Internal::removeEventListenerCallback):
2935         * bindings/v8/V8DOMWrapper.cpp:
2936         * bindings/v8/V8DOMWrapper.h:
2937         (V8DOMWrapper):
2938         * bindings/v8/V8EventListenerList.cpp:
2939         (WebCore::V8EventListenerList::getEventListener):
2940         (WebCore):
2941         * bindings/v8/V8EventListenerList.h:
2942         (WebCore):
2943         (V8EventListenerList):
2944         (WebCore::V8EventListenerList::findWrapper):
2945         (WebCore::V8EventListenerList::clearWrapper):
2946         (WebCore::V8EventListenerList::doFindWrapper):
2947         (WebCore::V8EventListenerList::getHiddenProperty):
2948         (WebCore::V8EventListenerList::findOrCreateWrapper):
2949         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2950         (WebCore::V8DOMWindow::addEventListenerCallback):
2951         (WebCore::V8DOMWindow::removeEventListenerCallback):
2952
2953 2013-01-23  Dominic Mazzoni  <dmazzoni@google.com>
2954
2955         AX: AXObjectCache should be initialized with topDocument
2956         https://bugs.webkit.org/show_bug.cgi?id=107638
2957
2958         Reviewed by Chris Fleizach.
2959
2960         Initialize AXObjectCache with the top document, not the
2961         document that axObjectCache happened to be called on, which
2962         could be an iframe. Having an AXObjectCache with the wrong
2963         document could cause a heap-use-after-free in
2964         notificationPostTimerFired if the inner document was deleted
2965         while notifications were pending.
2966
2967         * dom/Document.cpp:
2968         (WebCore::Document::axObjectCache):
2969
2970 2012-12-12  Ryosuke Niwa  <rniwa@webkit.org>
2971
2972         REGRESSION: WebKit does not render selection in non-first ruby text nodes.
2973         https://bugs.webkit.org/show_bug.cgi?id=92818
2974
2975         Reviewed by Levi Weintraub.
2976
2977         The patch is based on the one submitted by Sukolsak Sakshuwong.
2978
2979         The bug was caused by the fact isSelectionRoot was returning false on RenderRubyRun even though
2980         it doesn't lay down its children in block direction.
2981
2982         The selection painting code assumes that all blocks in each selection root are laid down in
2983         the containing block direction. In particular, InlineTextBox::paintSelection calls
2984         RootInlineBox::selectionTopAdjustedForPrecedingBlock in order to determine the end of the previous
2985         line, which in turn calls blockBeforeWithinSelectionRoot. blockBeforeWithinSelectionRoot goes
2986         through block nodes that appears before "this" block, and selectionTopAdjustedForPrecedingBlock
2987         assumes that to compute the end of the previous line.
2988
2989         Now suppose we have markup such as <ruby>Ichi<rt>One</rt></ruby><ruby>Ni<rt>Two</rt></ruby>. When
2990         selectionTopAdjustedForPrecedingBlock is called on the line box generated for "Two", it tries to
2991         determine the bottom of the inline box above that of "Two", which blockBeforeWithinSelectionRoot
2992         determines to be that of "One". At this point, everything goes wrong and the selection height is
2993         computed to be 0.
2994
2995         The fix to this problem is to allow RenderRubyRun to be a selection root. Since RenderRubyRun is
2996         already an inline-block, it suffices to bypass the !nonPseudoNode() check. In fact, there is no
2997         need to check this condition anymore as far as I can tell. The check was added in
2998         http://trac.webkit.org/changeset/12986 but all tests added by this change set as well as the rest
2999         of layout tests pass without this condition.
3000
3001         Test: fast/ruby/select-ruby.html
3002
3003         * rendering/RenderBlock.cpp:
3004         (WebCore::RenderBlock::isSelectionRoot):
3005
3006 2013-01-23  Kentaro Hara  <haraken@chromium.org>
3007
3008         [V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
3009         https://bugs.webkit.org/show_bug.cgi?id=107674
3010
3011         Reviewed by Adam Barth.
3012
3013         No tests. No change in behavior.
3014
3015         * bindings/v8/JavaScriptCallFrame.cpp:
3016         (WebCore::JavaScriptCallFrame::evaluate):
3017         * bindings/v8/NPV8Object.cpp:
3018         (_NPN_Enumerate):
3019         * bindings/v8/PageScriptDebugServer.cpp:
3020         (WebCore::PageScriptDebugServer::addListener):
3021         * bindings/v8/ScriptController.cpp:
3022         (WebCore::ScriptController::bindToWindowObject):
3023         (WebCore::ScriptController::disableEval):
3024         * bindings/v8/ScriptDebugServer.cpp:
3025         (WebCore::ScriptDebugServer::setBreakpoint):
3026         (WebCore::ScriptDebugServer::removeBreakpoint):
3027         (WebCore::ScriptDebugServer::setScriptSource):
3028         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
3029         (WebCore::ScriptDebugServer::compileScript):
3030         * bindings/v8/ScriptFunctionCall.cpp:
3031         (WebCore::ScriptCallArgumentHandler::appendArgument):
3032         (WebCore::ScriptFunctionCall::call):
3033         (WebCore::ScriptFunctionCall::construct):
3034         * bindings/v8/ScriptProfiler.cpp:
3035         (WebCore::ScriptProfiler::start):
3036         (WebCore::ScriptProfiler::stop):
3037         * bindings/v8/V8DOMWindowShell.cpp:
3038         (WebCore::V8DOMWindowShell::initializeIfNeeded):
3039         (WebCore::V8DOMWindowShell::namedItemAdded):
3040         (WebCore::V8DOMWindowShell::namedItemRemoved):
3041         * bindings/v8/V8LazyEventListener.cpp:
3042         (WebCore::V8LazyEventListener::prepareListenerObject):
3043         * bindings/v8/V8MutationCallback.cpp:
3044         (WebCore::V8MutationCallback::handleEvent):
3045         * bindings/v8/WorkerScriptController.cpp:
3046         (WebCore::WorkerScriptController::evaluate):
3047         * bindings/v8/WorkerScriptDebugServer.cpp:
3048         (WebCore::WorkerScriptDebugServer::addListener):
3049         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3050         (WebCore::InjectedScriptManager::createInjectedScript):
3051
3052 2013-01-23  Martin Robinson  <mrobinson@igalia.com>
3053
3054         WebKit should support decoding multi-byte entities in XML content
3055         https://bugs.webkit.org/show_bug.cgi?id=107459
3056
3057         Reviewed by Adam Barth.
3058
3059         Test: fast/parser/entities-in-xhtml.xhtml
3060
3061         * html/parser/HTMLEntityParser.cpp:
3062         (WebCore::appendUChar32ToUCharArray): Added this helper function. Later patches
3063         may try to move this code to somewhere that it can be shared more easily.
3064         (WebCore::decodeNamedEntityToUCharArray): Modify this function to work on a UChar
3065         array four elements long, so that multi-byte and multi-character entities can be resolved.
3066         * html/parser/HTMLEntityParser.h: Updated function declaratoin.
3067         * xml/parser/XMLDocumentParserLibxml2.cpp:
3068         (WebCore): Modify the statically allocated entity string memory area to accommodate
3069         up to two UTF-8 characters. Each UTF-8 character can be 4 bytes, so this brings the
3070         total size to 9 bytes.
3071         (WebCore::getXHTMLEntity): Use the new entity decoding API.
3072         * xml/parser/XMLDocumentParserQt.cpp:
3073         (WebCore::EntityResolver::resolveUndeclaredEntity): Ditto.
3074         (WebCore::XMLDocumentParser::parse): Ditto.
3075
3076 2013-01-23  Eric Seidel  <eric@webkit.org>
3077
3078         Stop the background-parser during HTMLDocumentParser::detatch to prevent crashes/asserts
3079         https://bugs.webkit.org/show_bug.cgi?id=107751
3080
3081         Reviewed by Tony Gentilcore.
3082
3083         This appears to fix the 2 intermitent crashers we were seeing while
3084         running fast/parser.  And definitely fixes 8 ASSERTs seen using a Debug build.
3085
3086         * html/parser/HTMLDocumentParser.cpp:
3087         (WebCore::HTMLDocumentParser::detach):
3088
3089 2013-01-23  Hans Muller  <hmuller@adobe.com>
3090
3091         [CSS Exclusions] Add support for computing first included interval position for polygons
3092         https://bugs.webkit.org/show_bug.cgi?id=103429
3093
3094         Reviewed by Dirk Schulze.
3095
3096         Added support for computing the "first fit" location, i.e. the logical shape-inside
3097         location where a line's layout begins. The algorithm for doing so is described here:
3098         http://hansmuller-webkit.blogspot.com/2012/08/revised-algorithm-for-finding-first.html.
3099
3100         Tests: fast/exclusions/shape-inside/shape-inside-first-fit-001.html
3101                fast/exclusions/shape-inside/shape-inside-first-fit-002.html
3102                fast/exclusions/shape-inside/shape-inside-first-fit-003.html
3103
3104         * platform/graphics/FloatSize.h:
3105         (WebCore::operator*): Scale a FloatSize. This simplified the final expression in VertexPair::intersection().
3106         * rendering/ExclusionPolygon.cpp:
3107         (WebCore::isPointOnLineSegment): Returns true if the specified point is collinear and within the line segement's bounds.
3108         (WebCore::leftSide): Return a value > 0 if point is on the left side of the line segment, < 0 if it's on the right, 0 if it's collinear.
3109         (WebCore::ExclusionPolygon::contains): Return true if the point is within the polygon or on an edge.
3110         (WebCore::VertexPair::overlapsRect): Returns true if the line segment from vertex1 to vertex2 overlaps the specified FloatRect.
3111         (WebCore::VertexPair::intersection): Finds the intersection of a pair of line segments defined by VertexPairs.
3112         (WebCore::ExclusionPolygon::firstFitRectInPolygon): Returns true if none of the polygon's edges, except the two used
3113             to define by the offset edges, overlap the FloatRect.
3114         (WebCore::aboveOrToTheLeft): Defines the top/left preference for "first fit" locations.
3115         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Replaced the stub implementation of this method.
3116         * rendering/ExclusionPolygon.h:
3117         (ExclusionPolygon): Added declarations noted above.
3118         (VertexPair): Abstract class that defines a pair of FloatPoints.
3119         (OffsetPolygonEdge): Represents an edge that's horizontally offset from a polygon edge.
3120         (WebCore::OffsetPolygonEdge::edgeIndex): The ExclusionPolygon edge index used to define this OffsetEdge.
3121
3122 2013-01-23  Dirk Schulze  <dschulze@adobe.com>
3123
3124         Implement Canvas Path object
3125         https://bugs.webkit.org/show_bug.cgi?id=97333
3126
3127         Reviewed by Dean Jackson.
3128
3129         The Canvas part of the WHATWG specification defines a Path object. This Path object
3130         shares several path segment functions (path methods) with the CanvasRenderingContext2D
3131         interface. This patch introduces the Path object and shares the path segment functions
3132         in the class CanvasPathMethods.
3133         This patch does just implement the basic path functions that have a general agreement on
3134         the WHAT WG and W3C mailing lists.
3135         This feature is behind a flag and won't be activated by default.
3136
3137         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects
3138
3139         Test: fast/canvas/canvas-path-object.html
3140
3141         * CMakeLists.txt: Add DOMPath and CanvasPathMedthods to build system.
3142         * DerivedSources.cpp: Ditto.
3143         * DerivedSources.make: Ditto.
3144         * DerivedSources.pri: Ditto.
3145         * GNUmakefile.list.am: Ditto.
3146         * Target.pri: Ditto.
3147         * WebCore.gypi: Ditto.
3148         * WebCore.vcproj/WebCore.vcproj: Ditto.
3149         * WebCore.xcodeproj/project.pbxproj: Ditto.
3150         * html/canvas/CanvasPathMethods.cpp: Added.
3151         (WebCore): This class shares the path segment functions (moveTo, lineTo, ...) between
3152             DOMPath (the Path object) and CanvasRenderingContext2D.
3153         (WebCore::CanvasPathMethods::closePath):
3154         (WebCore::CanvasPathMethods::moveTo):
3155         (WebCore::CanvasPathMethods::lineTo):
3156         (WebCore::CanvasPathMethods::quadraticCurveTo):
3157         (WebCore::CanvasPathMethods::bezierCurveTo):
3158         (WebCore::CanvasPathMethods::arcTo):
3159         (WebCore::CanvasPathMethods::arc):
3160         (WebCore::CanvasPathMethods::rect):
3161         * html/canvas/CanvasPathMethods.h: Added.
3162         (WebCore):
3163         (CanvasPathMethods):
3164         (WebCore::CanvasPathMethods::~CanvasPathMethods):
3165         (WebCore::CanvasPathMethods::transformIsInvertible):
3166         (WebCore::CanvasPathMethods::CanvasPathMethods):
3167         * html/canvas/CanvasRenderingContext2D.cpp:
3168         * html/canvas/CanvasRenderingContext2D.h: Remove the path segment functions here.
3169         (CanvasRenderingContext2D):
3170         (WebCore::CanvasRenderingContext2D::transformIsInvertible): This checks if the CTM
3171             of the context is still invertible. Drawing should stop if it is not.
3172         * html/canvas/CanvasRenderingContext2D.idl:
3173         * html/canvas/DOMPath.h: Added.
3174         (WebCore):
3175         (DOMPath):
3176         (WebCore::DOMPath::create):
3177         (WebCore::DOMPath::~DOMPath):
3178         (WebCore::DOMPath::DOMPath):
3179         * html/canvas/DOMPath.idl: Added.
3180         * page/DOMWindow.idl: Added CTOR for Path.
3181
3182 2013-01-23  Joshua Bell  <jsbell@chromium.org>
3183
3184         IndexedDB: Remove IDBVersionChangeRequest
3185         https://bugs.webkit.org/show_bug.cgi?id=107711
3186
3187         Reviewed by Tony Chang.
3188
3189         When the setVersion() API was removed from the Indexed DB spec the IDBVersionChangeRequest
3190         interface was replaced with IDBOpenDBRequest. We switched over for open(), this completes
3191         the work by switching over for deleteDatabase() and removing the old code. (On the Event
3192         side we still need to combine IDBVersionChangeEvent and IDBUpgradeNeededEvent.)
3193
3194         Test: storage/indexeddb/intversion-long-queue.html
3195               storage/indexeddb/intversion-upgrades.html
3196
3197         * CMakeLists.txt: Remove references to deleted code.
3198         * DerivedSources.make: Ditto.
3199         * GNUmakefile.list.am: Ditto.
3200         * Modules/indexeddb/IDBCallbacks.h: Remove unused onBlocked() overload.
3201         * Modules/indexeddb/IDBDatabase.cpp: Remove references to deleted code.
3202         * Modules/indexeddb/IDBDatabase.h: Ditto.
3203         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3204         (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Fire onBlocked with current version.
3205         * Modules/indexeddb/IDBFactory.cpp:
3206         (WebCore::IDBFactory::openInternal): Don't need to specify source.
3207         (WebCore::IDBFactory::deleteDatabase): Use an IDBOpenDBRequest.
3208         * Modules/indexeddb/IDBFactory.h: Change return type of deleteDatabase()
3209         * Modules/indexeddb/IDBFactory.idl: Ditto.
3210         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3211         (WebCore::IDBOpenDBRequest::create): Always use a null source.
3212         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): Pass null source to base class.
3213         (WebCore::IDBOpenDBRequest::dispatchEvent): Don't assume result is a database in existing
3214         special case.
3215         * Modules/indexeddb/IDBOpenDBRequest.h: Don't need a source argument (always null).
3216         * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
3217         * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
3218         * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
3219         * WebCore.gypi: Remove references to deleted code.
3220         * WebCore.xcodeproj/project.pbxproj: Remove references to deleted code.
3221         * dom/EventTarget.h: Remove references to deleted code.
3222         * dom/EventTargetFactory.in: Ditto.
3223
3224 2013-01-23  Scott Graham  <scottmg@chromium.org>
3225
3226         [Chromium] Fix inclusion of pch .cpp in webcore_platform and webcore_rendering
3227         https://bugs.webkit.org/show_bug.cgi?id=107700
3228
3229         Reviewed by Dirk Pranke.
3230
3231         No new tests, Chromium should link on VS 2012.
3232
3233         * WebCore.gyp/WebCore.gyp:
3234
3235 2013-01-23  Jun Jiang  <jun.a.jiang@intel.com>
3236
3237         Avoid unnecessary format conversion for tex{Sub}Image2D() for ImageData of WebGL
3238         https://bugs.webkit.org/show_bug.cgi?id=107532
3239
3240         Reviewed by Kenneth Russell.
3241
3242         This patch removes the unnecessary format conversion in tex{Sub}Image2D() for ImageData in WebGL to improve performance.
3243
3244         Already covered by current tests.
3245
3246         * html/canvas/WebGLRenderingContext.cpp:
3247         (WebCore):
3248         (WebCore::WebGLRenderingContext::texImage2D):
3249         (WebCore::WebGLRenderingContext::texSubImage2D):
3250
3251 2013-01-23  Xianzhu Wang  <wangxianzhu@chromium.org>
3252
3253         Should update compositing state when an out-of-view fixed position element becomes in-view
3254         https://bugs.webkit.org/show_bug.cgi?id=107410
3255
3256         Reviewed by Simon Fraser.
3257
3258         When a non-compositing page contains some not-composited fixed position element because of bounds out-of-view, when the element changes position and RenderLayerCompositor::updateCompositingLayers() is called, the function may return early because of "if (!m_reevaluateCompositingAfterLayout && !m_compositing)" without updating the compositing layers.
3259
3260         Set m_reevaluateCompositingAfterLayout when a fixed position element is not composited because of bounds out-of-view.
3261
3262         Test: compositing/layer-creation/fixed-position-change-out-of-view-in-view.html
3263
3264         * rendering/RenderLayerCompositor.cpp:
3265         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3266
3267 2013-01-23  Tony Chang  <tony@chromium.org>
3268
3269         Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
3270
3271         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
3272         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
3273
3274 2013-01-23  Adam Barth  <abarth@webkit.org>
3275
3276         BackgroundHTMLParser::sendTokensToMainThread should use bind
3277         https://bugs.webkit.org/show_bug.cgi?id=107637
3278
3279         Reviewed by Eric Seidel.
3280
3281         This patch replaces our hand-written implementation of bind for
3282         didReceiveTokensFromBackgroundParser with bind from Functional.h. To
3283         use the generic version of bind, we need to switch to using WeakPtr to
3284         hold a reference to the main thread parser in the BackgroundHTMLParser.
3285
3286         * html/parser/BackgroundHTMLParser.cpp:
3287         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3288         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
3289         (WebCore::BackgroundHTMLParser::createPartial):
3290         * html/parser/BackgroundHTMLParser.h:
3291         (WebCore::BackgroundHTMLParser::create):
3292         (BackgroundHTMLParser):
3293         (ParserMap):
3294         * html/parser/HTMLDocumentParser.cpp:
3295         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3296         (WebCore::HTMLDocumentParser::startBackgroundParser):
3297         (WebCore::HTMLDocumentParser::stopBackgroundParser):
3298         * html/parser/HTMLDocumentParser.h:
3299         (HTMLDocumentParser):
3300
3301 2013-01-23  Roger Fong  <roger_fong@apple.com>
3302
3303         Unreviewed. Cleanup VS2010 WebCore project. 
3304         Lots of files that no longer exist in solution.
3305
3306         * WebCore.vcxproj/WebCore.vcxproj:
3307         * WebCore.vcxproj/WebCore.vcxproj.filters:
3308
3309 2013-01-23  Julien Chaffraix  <jchaffraix@webkit.org>
3310
3311         [CSS Grid Layout] Add support for max-content
3312         https://bugs.webkit.org/show_bug.cgi?id=107604
3313
3314         Reviewed by Tony Chang.
3315
3316         Tests: fast/css-grid-layout/minmax-max-content-resolution-columns.html
3317                fast/css-grid-layout/minmax-max-content-resolution-rows.html
3318
3319         This change implements max-content on top of the infrastructure introduced as part
3320         of implementing min-content (bug 106474). No effort was made to share code, which
3321         is what was done for min-content. The sharing will occur in follow-up refactoring(s)
3322         to benefit from the extra testing but also the extra code to make the direction more
3323         obvious.
3324
3325         * rendering/RenderGrid.cpp:
3326         (WebCore::RenderGrid::maxContentForChild):
3327         Added this helper, similar to minContentForChild.
3328
3329         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3330         Patched the function to handle max-content per the specification's algorithm.
3331
3332         * rendering/RenderGrid.h:
3333         Added maxContentForChild.
3334
3335 2013-01-23  Mark Lam  <mark.lam@apple.com>
3336
3337         Assert that Supplementable objects is only used in their creator thread.
3338         https://bugs.webkit.org/show_bug.cgi?id=107717.
3339
3340         Reviewed by Adam Barth.
3341
3342         No new tests.
3343
3344         * platform/Supplementable.h:
3345         (WebCore):
3346         (WebCore::Supplementable::provideSupplement):
3347         (WebCore::Supplementable::removeSupplement):
3348         (WebCore::Supplementable::requireSupplement):
3349         (Supplementable):
3350         (WebCore::Supplementable::Supplementable):
3351
3352 2013-01-23  Tony Chang  <tony@chromium.org>
3353
3354         Incorrect scrollable height during simplified layout
3355         https://bugs.webkit.org/show_bug.cgi?id=107193
3356
3357         Reviewed by David Hyatt.
3358
3359         When computing overflow we need the height of the block before
3360         it was clamped (i.e., before updateLogicalHeight() has been called).
3361
3362         During simplified layout, we don't have this information and we were
3363         using the clamped height by mistake. To fix this, we now store the
3364         pre-clamped height on RenderOverflow so we can properly compute
3365         overflow.
3366
3367         Test: fast/overflow/height-during-simplified-layout.html
3368
3369         * rendering/RenderBlock.cpp:
3370         (WebCore::RenderBlock::computeOverflow): Save the height if we have overflow.
3371         (WebCore::RenderBlock::simplifiedLayout): If we have overflow, use the height that we saved
3372         in computeOverflow.
3373         * rendering/RenderOverflow.h:
3374         (WebCore::RenderOverflow::layoutClientAfterEdge):
3375         (WebCore::RenderOverflow::setLayoutClientAfterEdge):
3376         (RenderOverflow): Add a member variable to save the height.
3377
3378 2013-01-23  Tom Sepez  <tsepez@chromium.org>
3379
3380         [chromium] harden ScriptWrappable::m_wrapper against tampering
3381         https://bugs.webkit.org/show_bug.cgi?id=107318
3382
3383         Reviewed by Adam Barth.
3384
3385         Patch is correct if existing tests past without crashing.
3386
3387         * bindings/v8/ScriptWrappable.h:
3388         (WebCore::ScriptWrappable::ScriptWrappable):
3389         (WebCore::ScriptWrappable::wrapper):
3390         (WebCore::ScriptWrappable::setWrapper):
3391         (WebCore::ScriptWrappable::clearWrapper):
3392         (WebCore::ScriptWrappable::disposeWrapper):
3393         (WebCore::ScriptWrappable::reportMemoryUsage):
3394         (ScriptWrappable):
3395         (WebCore::ScriptWrappable::maskOrUnmaskPointer):
3396
3397 2013-01-22  Roger Fong  <roger_fong@apple.com>
3398
3399         WebCore property sheets, modified build scripts, and project files for compiling in VS2010.
3400         https://bugs.webkit.org/show_bug.cgi?id=106988
3401
3402         Reviewed by Brent Fulgham.
3403
3404         * WebCore.vcproj/WebCore.sln:
3405         * WebCore.vcxproj: Added.
3406         * WebCore.vcxproj/MigrateScripts: Added.
3407         * WebCore.vcxproj/QTMovieWin: Added.
3408         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Added.
3409         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Added.
3410         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.user: Added.
3411         * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: Added.
3412         * WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props: Added.
3413         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: Added.
3414         * WebCore.vcxproj/WebCore.vcxproj: Added.
3415         * WebCore.vcxproj/WebCore.vcxproj.filters: Added.
3416         * WebCore.vcxproj/WebCore.vcxproj.user: Added.
3417         * WebCore.vcxproj/WebCoreCFNetwork.props: Added.
3418         * WebCore.vcxproj/WebCoreCG.props: Added.
3419         * WebCore.vcxproj/WebCoreCommon.props: Added.
3420         * WebCore.vcxproj/WebCoreDebug.props: Added.
3421         * WebCore.vcxproj/WebCoreGenerated.make: Added.
3422         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Added.
3423         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Added.
3424         * WebCore.vcxproj/WebCoreGenerated.vcxproj.user: Added.
3425         * WebCore.vcxproj/WebCoreGeneratedCommon.props: Added.
3426         * WebCore.vcxproj/WebCoreGeneratedDebug.props: Added.
3427         * WebCore.vcxproj/WebCoreGeneratedRelease.props: Added.
3428         * WebCore.vcxproj/WebCoreMediaQT.props: Added.
3429         * WebCore.vcxproj/WebCorePostBuild.cmd: Added.
3430         * WebCore.vcxproj/WebCorePreBuild.cmd: Added.
3431         * WebCore.vcxproj/WebCorePreLink.cmd: Added.
3432         * WebCore.vcxproj/WebCorePthreads.props: Added.
3433         * WebCore.vcxproj/WebCoreQuartzCore.props: Added.
3434         * WebCore.vcxproj/WebCoreRelease.props: Added.
3435         * WebCore.vcxproj/build-generated-files.sh: Added.
3436         * WebCore.vcxproj/copyForwardingHeaders.cmd: Added.
3437         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Added.
3438         * WebCore.vcxproj/migrate-scripts.sh: Added.
3439         * WebCore.vcxproj/xcopy.excludes: Added.
3440         * WebCorePrefix.h:
3441         * config.h:
3442
3443 2013-01-23  Eric Seidel  <eric@webkit.org>
3444
3445         HTMLCompactToken needs to include the forceQuirks bool from HTMLToken
3446         https://bugs.webkit.org/show_bug.cgi?id=107713
3447
3448         Reviewed by Tony Gentilcore.
3449
3450         Before we were only getting "quirks mode" when the system/public identifiers
3451         were known quirks identifiers.  Now we'll correctly get quirks mode for any
3452         parse error during DOCTYPE parsing.
3453         This passes a bunch more tests.
3454
3455         * html/parser/CompactHTMLToken.cpp:
3456         (WebCore::CompactHTMLToken::CompactHTMLToken):
3457         * html/parser/CompactHTMLToken.h:
3458         (WebCore::CompactHTMLToken::doctypeForcesQuirks):
3459         (CompactHTMLToken):
3460         * html/parser/HTMLToken.h:
3461         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3462
3463 2013-01-23  Brady Eidson  <beidson@apple.com>
3464
3465         Recursion handling cancelled authentication challenges in NetworkProcess