REGRESSION (r116203): overflow sections don't have scrollbars
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-07-11  Julien Chaffraix  <jchaffraix@webkit.org>
2
3         REGRESSION (r116203): overflow sections don't have scrollbars
4         https://bugs.webkit.org/show_bug.cgi?id=90052
5
6         Reviewed by Simon Fraser.
7
8         This issue stems from RenderLayers with overlay scrollbars not being considered
9         self-painting.
10
11         After r120395 (follow-up of r116203), we ignore subtrees that have no self-painting layer for
12         painting. Normal scrollbars are painted by their renderer so they were properly painted. However
13         overlay scrollbars need to be painted by their RenderLayer as a separate phase (see bug 57057) so
14         they were not painted anymore. The fix is simple: make RenderLayer with overlay scrollbars
15         self-painting as they should have been in the first place.
16
17         Unfortunately no tests as I don't think we have a good way of testing overlay
18         scrollbars. Tested manually though on the super simple test case from the bug.
19
20         * rendering/RenderLayer.cpp:
21         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
22         Overlay scrollbars make the layer self-painting.
23
24         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
25         Added a call to updateSelfPaintingLayer.
26
27         (WebCore::RenderLayer::styleChanged):
28         Moved the call to updateSelfPaintingLayer after recomputing the scrollbars to ensure proper behavior.
29         Added a comment underlining the reason.
30
31         (WebCore::RenderLayer::updateSelfPaintingLayer):
32         Renamed as it is now called during layout too.
33
34         * rendering/RenderLayer.h:
35         (RenderLayer): Updated after updateSelfPaintingLayer rename.
36
37 2012-07-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
38
39         NodesFromRect doesn't work on SVG root elements.
40         https://bugs.webkit.org/show_bug.cgi?id=89990
41
42         Reviewed by Antonio Gomes.
43
44         Adds support for rect-based hit-testing on the SVG root element.
45         This means that while rect-based hit-testing is still not supported
46         within SVG elements, that at least it works on SVG root elements as
47         it would on any other replaced element.
48
49         Test: fast/dom/nodesFromRect-svg.html
50
51         * rendering/svg/RenderSVGRoot.cpp:
52         (WebCore::RenderSVGRoot::nodeAtPoint):
53
54 2012-07-11  Joshua Netterfield  <jnetterfield@rim.com>
55
56         [Qt] REGRESSION(r122250): It broke USE(3D_GRAPHICS)=1 and ENABLE(WEBGL)=0 builds
57         https://bugs.webkit.org/show_bug.cgi?id=90943
58
59         Reviewed by Csaba Osztrogon√°c.
60
61         Uses proper guarding in Extensions3DOpenGLCommon and Extensions3DOpenGLES as per https://bugs.webkit.org/show_bug.cgi?id=90506.
62
63         No new tests, becasue there is no new functionality.
64
65         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Use proper guarding.
66         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Use proper guarding.
67
68 2012-07-10  Pavel Feldman  <pfeldman@chromium.org>
69
70         Web Inspector: migrate from background images to CSS for statusbar rendering.
71         https://bugs.webkit.org/show_bug.cgi?id=90902
72
73         Reviewed by Vsevolod Vlasov.
74
75         This change removes statusbar* images and uses gradients and borders to re-create original inspector look.
76
77         * WebCore.gypi:
78         * inspector/front-end/Images/statusbarBackground.png: Removed.
79         * inspector/front-end/Images/statusbarBottomBackground.png: Removed.
80         * inspector/front-end/Images/statusbarButtons.png: Removed.
81         * inspector/front-end/Images/statusbarMenuButton.png: Removed.
82         * inspector/front-end/Images/statusbarMenuButtonSelected.png: Removed.
83         * inspector/front-end/StatusBarButton.js:
84         * inspector/front-end/WebKit.qrc:
85         * inspector/front-end/inspector.css:
86         (body.drawer-visible #main-status-bar):
87         (body.drawer-visible #main-status-bar::after):
88         (.status-bar-background):
89         (.status-bar > div):
90         (.glyph):
91         (button.status-bar-item):
92         (.status-bar button.status-bar-item:active):
93         (select.status-bar-item):
94         (select.status-bar-item, select.status-bar-item:hover):
95         (body.detached .alternate-status-bar-buttons-bar):
96         (.alternate-status-bar-buttons-bar):
97         (.alternate-status-bar-buttons-bar .status-bar-item):
98         (.alternate-status-bar-buttons-bar .status-bar-item.emulate-active):
99         (#drawer):
100         (body.drawer-visible #drawer-contents):
101         (#drawer-status-bar):
102         * inspector/front-end/inspector.html:
103         * inspector/front-end/scriptsPanel.css:
104         (button.status-bar-item.scripts-navigator-show-hide-button):
105         (button.status-bar-item.scripts-navigator-show-hide-button:active):
106         (button.status-bar-item.scripts-debugger-show-hide-button):
107         (button.status-bar-item.scripts-debugger-show-hide-button:active):
108
109 2012-07-11  Jason Liu  <jason.liu@torchmobile.com.cn>
110
111         [BlackBerry] crash in CookieDatabaseBackingStore.
112         https://bugs.webkit.org/show_bug.cgi?id=90270
113
114         Reviewed by George Staikos.
115
116         There is one case for this crash.
117         1. A browser crashes and locks cookies' database for a while.
118         2. Open a new browser when the old one doesn't finish crashing.
119         3. The new one writes the cookies' database and receives a SQLITE_BUSY error
120            in CookieDatabaseBackingStore's invokeOpen. So this database isn't opened.
121         4. invokeGetCookiesWithLimit returns 0.
122         5. Crash happens when using a null pointer.
123
124         Add function setBusyTimeout(1000) and a guard for cookies' pointer.
125         setBusyTimeout will call sqlite3_busy_timeout.
126
127         When the SQLite database is accessed for reading it is locked for writing
128         until the reading access is finished. Another process cannot access the database
129         while it is locked. The timeout time sets a limit while this process tries to access
130         the locked database. If the database is unlocked within the timeout time it can be
131         accessed, otherwise an access fails.
132
133         No new tests. This crash is hard to reproduce, and it happens only on our platform.
134
135         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
136         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
137
138 2012-07-11  Vsevolod Vlasov  <vsevik@chromium.org>
139
140         Web Inspector: Move revisions support to UISourceCode.
141         https://bugs.webkit.org/show_bug.cgi?id=90888
142
143         Reviewed by Pavel Feldman.
144
145         Moved revisions support to UISourceCode.
146         Revision management code is moved unchanged where possible and should be refactored later.
147
148         * inspector/front-end/CSSStyleModel.js:
149         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): revision is now added to uiSourceCode, not resource.
150         * inspector/front-end/ExtensionServer.js:
151         (WebInspector.ExtensionServer.prototype._notifyUISourceCodeContentCommitted):
152         Extension server is now listening for Workspace.UISourceCodeContentCommitted event instead of ResourceTreeModel.ResourceContentCommitted.
153         * inspector/front-end/Resource.js:
154         * inspector/front-end/ResourceTreeModel.js: ResourceTreeModel.ResourceContentCommitted renamed to Workspace.UISourceCodeContentCommitted.
155         * inspector/front-end/ResourceView.js:
156         (WebInspector.ResourceSourceFrame): ResourceSourceFrame is not update when revisions are added anymore as resource conenten is considered immutable now
157         * inspector/front-end/RevisionHistoryView.js:
158         (WebInspector.RevisionHistoryView.populateRevisions):
159         (WebInspector.RevisionHistoryView):
160         (WebInspector.RevisionHistoryView.showHistory):
161         (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem):
162         (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if):
163         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
164         (WebInspector.RevisionHistoryView.prototype._revealUISourceCode.get if):
165         (WebInspector.RevisionHistoryView.prototype._revealUISourceCode):
166         (WebInspector.RevisionHistoryView.prototype._reset):
167         * inspector/front-end/ScriptSnippetModel.js: Snippets are not loaded before ResourceTreeModel.mainFrame is available anymore.
168         (WebInspector.ScriptSnippetModel):
169         (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent):
170         * inspector/front-end/UISourceCode.js:
171         (WebInspector.UISourceCode):
172         (WebInspector.UISourceCode.prototype.requestOriginalContent):
173         (WebInspector.UISourceCode.prototype._setContent):
174         (WebInspector.UISourceCode.prototype.addRevision):
175         (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
176         (WebInspector.UISourceCode.prototype._clearRevisionHistory):
177         (WebInspector.UISourceCode.prototype.revertToOriginal):
178         (WebInspector.UISourceCode.prototype.revertAndClearHistory):
179         (WebInspector.UISourceCode.prototype.revertAndClearHistory.clearHistory):
180         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
181         (WebInspector.UISourceCode.prototype.canonicalMimeType):
182         (WebInspector.Revision):
183         (WebInspector.Revision._revisionHistoryRegistry):
184         (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist):
185         (WebInspector.Revision._ensureStaleRevisionsFileteredOut):
186         (WebInspector.Revision.prototype.get uiSourceCode):
187         (WebInspector.Revision.prototype.get timestamp):
188         (WebInspector.Revision.prototype.get content):
189         (WebInspector.Revision.prototype.revertToThis):
190         (WebInspector.Revision.prototype.contentURL):
191         (WebInspector.Revision.prototype.contentType):
192         (WebInspector.Revision.prototype.requestContent):
193         (WebInspector.Revision.prototype.searchInContent):
194         (WebInspector.Revision.prototype._persist):
195         * inspector/front-end/UserAgentSupport.js: Drive-by closure compilation fix.
196         * inspector/front-end/Workspace.js:
197         * inspector/front-end/inspector.js: ScriptSnippetModel is now created after ResourceTreeModel.
198
199 2012-07-11  MORITA Hajime  <morrita@google.com>
200
201         WebCoreSupport needs objects each of which follows major WebCore objects
202         https://bugs.webkit.org/show_bug.cgi?id=88499
203
204         Reviewed by Alexey Proskuryakov.
205
206         This change
207
208         - Makes Internals rough lifetime to follow Document.
209           Note that Internals can survive longer than Document in same case.
210           Internals::m_document is cleared when the document destruction is notified.
211         - Makes InternalSettings rough lifetime to follow the Page.
212           This is done by making InternalSettings a supplement of the page.
213           Now InternalSettings object is created per Page instead of per Frame.
214
215         Per-test setting clearance is done by newly introduced InternalSettings::Backup,
216         which recovers the modified settings and refreshes it for each time a test starts.
217
218         * WebCore.exp.in:
219         * testing/InternalSettings.cpp:
220         (WebCore::InternalSettings::Backup::Backup):
221         (WebCore):
222         (WebCore::InternalSettings::Backup::restoreTo):
223         (WebCore::InternalSettings::from):
224         (WebCore::InternalSettings::~InternalSettings):
225         (WebCore::InternalSettings::InternalSettings):
226         (WebCore::InternalSettings::reset):
227         (WebCore::InternalSettings::settings):
228         (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
229         (WebCore::InternalSettings::setFixedPositionCreatesStackingContext):
230         (WebCore::InternalSettings::allowRoundingHacks):
231         (WebCore::InternalSettings::userPreferredLanguages):
232         (WebCore::InternalSettings::setUserPreferredLanguages):
233         (WebCore::InternalSettings::setShouldDisplayTrackKind):
234         (WebCore::InternalSettings::shouldDisplayTrackKind):
235         (WebCore::InternalSettings::setPagination):
236         * testing/InternalSettings.h:
237         (Backup):
238         (InternalSettings):
239         (WebCore::InternalSettings::page):
240         * testing/InternalSettings.idl:
241         * testing/Internals.cpp:
242         (WebCore::Internals::Internals):
243         (WebCore):
244         (WebCore::Internals::contextDocument):
245         (WebCore::Internals::frame):
246         (WebCore::Internals::settings):
247         (WebCore::Internals::setPagination): Replaced as an alias.
248         (WebCore::Internals::userPreferredLanguages): Replaced as an alias.
249         (WebCore::Internals::setUserPreferredLanguages): Replaced as an alias.
250         (WebCore::Internals::setShouldDisplayTrackKind): Replaced as an alias.
251         (WebCore::Internals::shouldDisplayTrackKind): Replaced as an alias.
252         (WebCore::Internals::emitInspectorDidBeginFrame):
253         (WebCore::Internals::emitInspectorDidCancelFrame):
254         (WebCore::Internals::allowRoundingHacks): Replaced as an alias.
255         * testing/Internals.h:
256         (WebCore):
257         (Internals):
258         * testing/js/WebCoreTestSupport.cpp:
259         (WebCoreTestSupport::injectInternalsObject):
260         (WebCoreTestSupport::resetInternalsObject):
261         * testing/v8/WebCoreTestSupport.cpp:
262         (WebCoreTestSupport::injectInternalsObject):
263         (WebCoreTestSupport::resetInternalsObject):
264
265 2012-07-11  Yoshifumi Inoue  <yosin@chromium.org>
266
267         [Mac] Expose time format related functions
268         https://bugs.webkit.org/show_bug.cgi?id=90956
269
270         Reviewed by Kent Tamura.
271
272         This patch introduces localizedTimeFormatText, localizedShortTimeFormatText
273         and timeAMPMLabels for Mac within feature flag ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
274
275         See also:
276           ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965
277           Win version: https://bugs.webkit.org/show_bug.cgi?id=90236
278
279         No new tests. This patch doesn't change behavior.
280
281         * platform/text/mac/LocalizedDateMac.cpp:
282         (WebCore::localizedTimeFormatText): Added.
283         (WebCore::localizedShortTimeFormatText): Added.
284         (WebCore::timeAMPMLabels): Added.
285
286 2012-07-11  Kenichi Ishibashi  <bashi@chromium.org>
287
288         [Chromium] Adding HarfBuzz-ng for Linux
289         https://bugs.webkit.org/show_bug.cgi?id=90362
290
291         Reviewed by Tony Chang.
292
293         This patch adds harfbuzz-ng support for Chromium Linux port as a part of
294         transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng
295         callbacks by using Skia APIs. For now, the feature is enabled only when
296         WTF_USE_HARFBUZZ_NG is defined.
297
298         No new tests. No change in behavior now.
299
300         * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files.
301         * WebCore.gypi: Added HarfBuzzFaceSkia.cpp
302         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG).
303         (WebCore::Font::drawComplexText):
304         (WebCore::Font::floatWidthForComplexText):
305         (WebCore::Font::offsetForPositionForComplexText):
306         (WebCore::Font::selectionRectForComplexText):
307         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
308         (WebCore):
309         (WebCore::FontPlatformData::harfbuzzFace):
310         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
311         (FontPlatformData):
312         * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added.
313         (WebCore):
314         (WebCore::SkiaScalarToHarfbuzzPosition):
315         (WebCore::SkiaGetGlyphWidthAndExtents):
316         (WebCore::harfbuzzGetGlyph):
317         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
318         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
319         (WebCore::harfbuzzGetGlyphExtents):
320         (WebCore::harfbuzzSkiaGetFontFuncs):
321         (WebCore::harfbuzzSkiaGetTable):
322         (WebCore::destroyPaint):
323         (WebCore::HarfBuzzFace::createFace):
324         (WebCore::HarfBuzzFace::createFont):
325         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
326         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG).
327         (WebCore::substituteWithVerticalGlyphs):
328
329 2012-07-11  Taiju Tsuiki  <tzik@chromium.org>
330
331         Web Inspector: Clean up FileSystem related code
332         https://bugs.webkit.org/show_bug.cgi?id=90592
333
334         Reviewed by Vsevolod Vlasov.
335
336         Clean up FileSystem related code in Inspector as follows:
337         - Clean up layout tests and add test case for error case,
338         - Fix error handling on request,
339         - s/GetFileSystemRootTask/FileSystemRootRequest/g
340         - s/ReadDirectoryTask/DirectoryContentRequest/g
341         - s/ReadFileTask/FileContentRequest/g
342
343         Tests: http/tests/inspector/filesystem/request-directory-content.html
344                http/tests/inspector/filesystem/request-file-content.html
345                http/tests/inspector/filesystem/request-filesystem-root.html
346                http/tests/inspector/filesystem/request-metadata.html
347
348         * inspector/InspectorFileSystemAgent.cpp:
349         (WebCore):
350         (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): Add early error handling.
351         (WebCore::InspectorFileSystemAgent::requestDirectoryContent): Add early error handling.
352         (WebCore::InspectorFileSystemAgent::requestMetadata): Add early error handling.
353         (WebCore::InspectorFileSystemAgent::requestFileContent): Add early error handling.
354         * inspector/InspectorFileSystemAgent.h: Remove unused forward declaration and unused header.
355         (WebCore):
356         (InspectorFileSystemAgent):
357         * inspector/front-end/FileSystemModel.js:
358         (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted):
359         (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot): Add early error handling.
360         (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted):
361         (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent): Add early error handling.
362         (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted):
363         (WebInspector.FileSystemRequestManager.prototype.requestMetadata): Add early error handling.
364         (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted):
365         (WebInspector.FileSystemRequestManager.prototype.requestFileContent): Add early error handling.
366
367 2012-07-09  Eugene Klyuchnikov  <eustas.bug@gmail.com>
368
369         Web Inspector: Forward message loop instrumentation data to frontend.
370         https://bugs.webkit.org/show_bug.cgi?id=89584
371
372         Reviewed by Yury Semikhatsky.
373
374         Transmit collected message loop tasks to inspector frontend.
375         Now "Program" should be a top-level event on browsers that
376         support message loop instrumentation.
377         Frontend was changed so that user will not see any changes.
378
379         * inspector/InspectorTimelineAgent.cpp:
380         (TimelineRecordType):
381         Added new event type - "Program"
382         (WebCore::InspectorTimelineAgent::willProcessTask):
383         Begin "Program" event.
384         (WebCore::InspectorTimelineAgent::didProcessTask):
385         Finish "Program" event.
386         (WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
387         Do not add counters to "Program" events.
388         (WebCore):
389         (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic):
390         Renamed from "setHeapSizeStatistic"
391         * inspector/InspectorTimelineAgent.h:
392         (InspectorTimelineAgent):
393         * inspector/front-end/MemoryStatistics.js:
394         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
395         Unwraps "Program" events.
396         (WebInspector.MemoryStatistics.prototype._innerRecordAdded):
397         Renamed from "_onRecordAdded"
398         * inspector/front-end/TimelineFrameController.js:
399         (WebInspector.TimelineFrameController.prototype._addRecord):
400         Unwraps "Program" events.
401         (WebInspector.TimelineFrameController.prototype._innerAddRecord):
402         Renamed from "_addRecord"
403         * inspector/front-end/TimelineModel.js:
404         * inspector/front-end/TimelineOverviewPane.js:
405         (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord):
406         Filter out "Program" category.
407         (WebInspector.TimelineCategoryStrips.prototype.update):
408         * inspector/front-end/TimelinePanel.js:
409         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
410         Filter out "Program" category.
411         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
412         Unwraps "Program" events.
413         * inspector/front-end/TimelinePresentationModel.js:
414         (WebInspector.TimelinePresentationModel.categories):
415         Added "Program" category.
416         (WebInspector.TimelinePresentationModel.recordStyle):
417         Ditto.
418         (WebInspector.TimelinePresentationModel.prototype.addRecord):
419         Unwraps "Program" events.
420         (WebInspector.TimelinePresentationModel.prototype._addRecord):
421         Renamed from "addRecord"
422
423 2012-07-11  Kenichi Ishibashi  <bashi@chromium.org>
424
425         [Chromium] Adding HarfBuzz-ng for Linux
426         https://bugs.webkit.org/show_bug.cgi?id=90362
427
428         Reviewed by Tony Chang.
429
430         This patch adds harfbuzz-ng support for Chromium Linux port as a part of
431         transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng
432         callbacks by using Skia APIs. For now, the feature is enabled only when
433         WTF_USE_HARFBUZZ_NG is defined.
434
435         No new tests. No change in behavior now.
436
437         * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files.
438         * WebCore.gypi: Added HarfBuzzFaceSkia.cpp
439         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG).
440         (WebCore::Font::drawComplexText):
441         (WebCore::Font::floatWidthForComplexText):
442         (WebCore::Font::offsetForPositionForComplexText):
443         (WebCore::Font::selectionRectForComplexText):
444         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
445         (WebCore):
446         (WebCore::FontPlatformData::harfbuzzFace):
447         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
448         (FontPlatformData):
449         * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added.
450         (WebCore):
451         (WebCore::SkiaScalarToHarfbuzzPosition):
452         (WebCore::SkiaGetGlyphWidthAndExtents):
453         (WebCore::harfbuzzGetGlyph):
454         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
455         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
456         (WebCore::harfbuzzGetGlyphExtents):
457         (WebCore::harfbuzzSkiaGetFontFuncs):
458         (WebCore::harfbuzzSkiaGetTable):
459         (WebCore::destroyPaint):
460         (WebCore::HarfBuzzFace::createFace):
461         (WebCore::HarfBuzzFace::createFont):
462         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
463         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG).
464         (WebCore::substituteWithVerticalGlyphs):
465
466 2012-07-11  Kenneth Russell  <kbr@google.com>
467
468         compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion
469         https://bugs.webkit.org/show_bug.cgi?id=82412
470
471         Reviewed by Adrienne Walker.
472
473         When compositing premultipliedAlpha=false WebGL canvases, use a separate
474         blend function for the alpha channel to avoid writing alpha < 1. This
475         makes the behavior more consistent with all other compositing results
476         and avoids situations where the alpha channel is preserved on some
477         platforms and discarded on others.
478
479         Covered by existing tests.
480
481         * platform/graphics/chromium/LayerRendererChromium.cpp:
482         (WebCore::LayerRendererChromium::drawTextureQuad):
483             Use separate alpha blend function when compositing premultipliedAlpha=false WebGL canvases.
484
485 2012-07-10  Yoshifumi Inoue  <yosin@chromium.org>
486
487         [Chromium-Windows] Implement functions for localized time format information
488         https://bugs.webkit.org/show_bug.cgi?id=90236
489
490         Reviewed by Kent Tamura.
491
492         This patch introduces following localized time format related
493         functions:
494             - localizedTimeFormatText
495             - localizeShortTimeFormatText()
496             - timeAMPMLabels
497         for Windows in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
498
499         See also:
500           ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965
501           Mac version: https://bugs.webkit.org/show_bug.cgi?id=90237
502
503         Tests: WebKit/chromium/tests/LocalWinTest.cpp
504
505         * platform/text/LocaleWin.cpp:
506         (WebCore::mapCharacterToDateTimeFieldType): Added.
507         (WebCore::convertWindowsTimeFormatToLDML): Added.
508         (WebCore::LocaleWin::timeFormatText): Added.
509         (WebCore::LocaleWin::shortTimeFormatText): Added.
510         (WebCore::LocaleWin::timeAMPMLabels): Added.
511         * platform/text/LocaleWin.h:
512         (LocaleWin): Added time format related functions and variables.
513         * platform/text/LocalizedDateWin.cpp:
514         (WebCore::localizedTimeFormatText): Added.
515         (WebCore::localizedShortTimeFormatText):  Added.
516         (WebCore::timeAMPMLabels):  Added.
517
518 2012-07-10  Douglas Stockwell  <dstockwell@chromium.org>
519
520         Style not updated for element with display:none becoming first/last-child
521         https://bugs.webkit.org/show_bug.cgi?id=90356
522
523         Reviewed by Kent Tamura.
524
525         Always trigger style recalc when an element without a renderer becomes the first/last-child.
526
527         Tests: fast/css/first-child-display-change.html
528                fast/css/last-child-display-change.html
529
530         * dom/Element.cpp:
531         (WebCore::checkForSiblingStyleChanges):
532
533 2012-07-10  Shinya Kawanaka  <shinyak@chromium.org>
534
535         ShadowRoot should know its type in debug build.
536         https://bugs.webkit.org/show_bug.cgi?id=90933
537
538         Reviewed by Hajime Morita.
539
540         For assertion, ShadowRoot should know its type is UserAgentShadowRoot or AuthorShadowRoot.
541
542         This patch also renames ShadowRootCreationPurpose to ShadowRootType, since it is suitable
543         name for ShadowRoot to have.
544
545         No new tests, since it is used only for assertion.
546
547         * dom/Element.cpp:
548         (WebCore::Element::ensureShadowRoot):
549         * dom/ShadowRoot.cpp:
550         (WebCore::ShadowRoot::create):
551         * dom/ShadowRoot.h:
552         (ShadowRoot):
553         (WebCore::ShadowRoot::type):
554         * html/HTMLDetailsElement.cpp:
555         (WebCore::HTMLDetailsElement::createShadowSubtree):
556         * html/HTMLInputElement.cpp:
557         (WebCore::HTMLInputElement::createShadowSubtree):
558         * html/HTMLKeygenElement.cpp:
559         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
560         * html/HTMLMeterElement.cpp:
561         (WebCore::HTMLMeterElement::createShadowSubtree):
562         * html/HTMLProgressElement.cpp:
563         (WebCore::HTMLProgressElement::createShadowSubtree):
564         * html/HTMLSummaryElement.cpp:
565         (WebCore::HTMLSummaryElement::createShadowSubtree):
566         * html/HTMLTextAreaElement.cpp:
567         (WebCore::HTMLTextAreaElement::createShadowSubtree):
568         * html/InputType.cpp:
569         (WebCore::InputType::destroyShadowSubtree): Asserts that ShadowRoot type is UserAgentShadowRoot.
570         * html/shadow/TextFieldDecorationElement.cpp:
571         (WebCore::getDecorationRootAndDecoratedRoot):
572         * svg/SVGTRefElement.cpp:
573         (WebCore::SVGTRefElement::createShadowSubtree):
574
575 2012-07-10  George Staikos  <staikos@webkit.org>
576
577         Add missing binding type String for IndexedDB.
578         https://bugs.webkit.org/show_bug.cgi?id=90351
579
580         Reviewed by Nikolas Zimmermann.
581
582         No new tests because it's already covered by IDB tests.
583
584         * bindings/js/JSIDBAnyCustom.cpp:
585         (WebCore::toJS):
586
587 2012-07-10  Brian Anderson  <brianderson@chromium.org>
588
589         [chromium] Make full texture updates explicit
590         https://bugs.webkit.org/show_bug.cgi?id=90507
591
592         Reviewed by Adrienne Walker.
593
594         Covered by existing tests.
595
596         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
597         (WebCore::ScrollbarLayerChromium::updatePart):
598         * platform/graphics/chromium/TiledLayerChromium.cpp:
599         (WebCore::TiledLayerChromium::updateTiles):
600         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
601         (WebCore::CCTextureUpdater::appendFullUpdate):
602         (WebCore::CCTextureUpdater::hasMoreUpdates):
603         (WebCore::CCTextureUpdater::update):
604         (WebCore::CCTextureUpdater::clear):
605         * platform/graphics/chromium/cc/CCTextureUpdater.h:
606         (CCTextureUpdater):
607
608 2012-07-10  Shinya Kawanaka  <shinyak@chromium.org>
609
610         Crash in nextLinePosition() due to accessing a removed root line box.
611         https://bugs.webkit.org/show_bug.cgi?id=90484
612
613         Reviewed by Abhishek Arya.
614
615         When <object> element is reattached, the 'content' style is compared to the old style.
616         If it is not the same, a flag to recalc style is enabled. Because of this, the recalc style flag
617         is not cleared in updateLayoutIgnorePendingStyleSheets() in nextLinePosition(), and it causes
618         the second layout in isEditablePosition(p). Then 'RootInlineBox root' is invalidated, but
619         it's used after that.
620
621         When the content of the same <object> elements are compared, they should be the same.
622         However, operator== for ContentData is not implemented correctly (it compares a pointer instead of
623         content). So operator== does not hold for the content of the same <object> elements.
624
625         Test: editing/execCommand/crash-extend-selection-forward.html
626
627         * rendering/style/ContentData.cpp:
628         (WebCore::operator==): Compares the instance of data instead of pointer.
629
630 2012-07-10  Joshua Bell  <jsbell@chromium.org>
631
632         IndexedDB: Ensure transaction abort events are deterministic in multiprocess ports
633         https://bugs.webkit.org/show_bug.cgi?id=90412
634
635         Reviewed by Tony Chang.
636
637         In multi-process ports (e.g. Chromium), transaction aborts triggered on the front-end could 
638         be initiated while a "success" event was in-flight from the back end. This would lead to 
639         apparently flaky behavior when requests would sometimes report success and sometimes report
640         an error. Address this by having front-end triggered aborts do the abort steps immediately,
641         then send the async abort request to the back end.
642
643         No new tests - behavior in single process ports (and DRT) covered by existing
644         tests. Will enable currently disabled Chromium tests to be enabled (crbug.com/83226).
645
646         * Modules/indexeddb/IDBRequest.cpp:
647         (WebCore::IDBRequest::IDBRequest): Initialize a new m_requestAborted flag, used to prevent
648         dispatching if an in-flight request comes in after the abort.
649         (WebCore::IDBRequest::abort): Set flag to prevent double dispatching.
650         (WebCore::IDBRequest::onError): Handle aborted-then-received-event case.
651         (WebCore::IDBRequest::onSuccess): Ditto.
652         (WebCore::IDBRequest::onSuccessWithContinuation): Ditto.
653         (WebCore::IDBRequest::dispatchEvent): On uncaught error, trigger abort on transaction front-end.
654         * Modules/indexeddb/IDBRequest.h:
655         (IDBRequest):
656         * Modules/indexeddb/IDBTransaction.cpp:
657         (WebCore::IDBTransaction::abort): Do abort steps locally first, then notify back-end.
658         (WebCore::IDBTransaction::onAbort): If abort wasn't triggered locally, clean up is still necessary.
659
660 2012-07-10  Julien Chaffraix  <jchaffraix@webkit.org>
661
662         REGRESSION(r112113): absolutely positioned INPUT boxes with a table cell containing block have a 0px height
663         https://bugs.webkit.org/show_bug.cgi?id=89209
664
665         Reviewed by Ojan Vafai.
666
667         Test: fast/forms/input-in-table-cell-no-value.html
668
669         The issue comes from the layout code not properly resetting the overriden heigth between layouts.
670
671         The test case relies on a table cell as it requires a 2 pass layout. Between the 2 passes, different
672         code paths would be taken, leading to previous values being used to over-constrain the inner content.
673
674         * rendering/RenderTextControlSingleLine.cpp:
675         (WebCore::RenderTextControlSingleLine::layout):
676         Ensure consistent layout by resetting any overriden conditional height.
677
678 2012-07-10  Kevin Ellis  <kevers@chromium.org>
679
680         Input elements with type=range do not have default touch handlers.
681         https://bugs.webkit.org/show_bug.cgi?id=88807
682
683         Reviewed by Antonio Gomes.
684
685         This patch adds support for touch event handling on input elements
686         and dragging a slider with touch start and move events.  Previously,
687         manipulating a slider on a touch screen required generation of
688         synthetic mouse events.
689
690         Tests: fast/events/touch/touch-slider-no-js-touch-listener.html
691                fast/events/touch/touch-slider.html
692
693         * dom/Event.cpp:
694         (WebCore::Event::isTouchEvent):
695         (WebCore):
696         * dom/Event.h:
697         (Event):
698         * dom/Touch.cpp:
699         (WebCore::Touch::Touch):
700         * dom/Touch.h:
701         (WebCore::Touch::absoluteLocation):
702         (Touch):
703         * dom/TouchEvent.cpp:
704         (WebCore::TouchEvent::isTouchEvent):
705         (WebCore):
706         * dom/TouchEvent.h:
707         (TouchEvent):
708         * html/HTMLInputElement.cpp:
709         (WebCore::HTMLInputElement::HTMLInputElement):
710         (WebCore::HTMLInputElement::~HTMLInputElement):
711         (WebCore::HTMLInputElement::updateType):
712         (WebCore::HTMLInputElement::defaultEventHandler):
713         * html/HTMLInputElement.h:
714         (HTMLInputElement):
715         * html/InputType.cpp:
716         (WebCore):
717         (WebCore::InputType::handleTouchEvent):
718         (WebCore::InputType::hasTouchEventHandler):
719         * html/InputType.h:
720         (WebCore):
721         (ClickHandlingState):
722         (InputType):
723         * html/RangeInputType.cpp:
724         (WebCore):
725         (WebCore::RangeInputType::handleTouchEvent):
726         (WebCore::RangeInputType::hasTouchEventHandler):
727         * html/RangeInputType.h:
728         (RangeInputType):
729         * html/shadow/SliderThumbElement.h:
730         (SliderThumbElement):
731
732 2012-07-10  Pravin D  <pravind.2k4@gmail.com>
733
734         Re-factoring recalcColumn in AutoTableLayout.cpp for readability
735         https://bugs.webkit.org/show_bug.cgi?id=89636
736
737         Reviewed by Julien Chaffraix.
738
739         No test case required. Code re-factoring.
740
741         * rendering/AutoTableLayout.cpp:
742         Added a const integer place holder for 32760.
743
744         (WebCore::AutoTableLayout::recalcColumn):
745          Changes :
746          1) Moved the continue statement above the bool cellHasContent for an early return.
747          2) Replaced the constant 32760 by a placeholder.
748          3) Initialization of columnLayout max and min logical widths is made common for both cells having col span == 1 and span > 1.
749          4) Removed redundant check for cell logical width type. 
750
751 2012-07-10  Adam Barth  <abarth@webkit.org>
752
753         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
754         https://bugs.webkit.org/show_bug.cgi?id=90910
755
756         Reviewed by Eric Seidel.
757
758         We've already removed the code that implements Hixie76 WebSockets. This
759         patch just removes the WebCore::Setting that used to control which
760         WebSocket protocol version we'd use.
761
762         I've left the WebKit-layer APIs in place, but they now don't do
763         anything.  I'll remove all the Chromium callers shortly.
764
765         * page/Settings.cpp:
766         (WebCore::Settings::Settings):
767         * page/Settings.h:
768         (Settings):
769
770 2012-07-10  Philip Rogers  <pdr@google.com>
771
772         Crash due to SVG animation element not removed from target (before reset)
773         https://bugs.webkit.org/show_bug.cgi?id=90750
774
775         Reviewed by Abhishek Arya.
776
777         Previously we were not removing an animation element from
778         SVGDocumentExtensions::m_animatedElements which led to a crash.
779         This change properly removes animation elements in resetTargetElement
780         which both fixes this bug and will prevent others from hitting it in
781         the future.
782
783         Test: svg/animations/dynamic-modify-attributename-crash2.svg
784
785         * svg/SVGDocumentExtensions.cpp:
786         (WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget):
787
788         removeAllAnimationElementsFromTarget now adds all the animation elements
789         to a vector and iterates over it because the changes to resetTargetElement
790         would have caused us to modify the underlying hashset as we iterated. Note that
791         before we deleted animationElementsForTarget in removeAllAnimationElementsFromTarget
792         but that logic is now handled in removeAnimationElementFromTarget which is called
793         during resetTargetElement.
794
795         * svg/animation/SVGSMILElement.cpp:
796         (WebCore::SVGSMILElement::removedFrom):
797
798         Because of the changes in resetTargetElement, removedFrom was able to be
799         refactored. This patch changes removedFrom to call resetTargetElement rather
800         than have duplicated logic. There is a very small change in logic here:
801         animationAttributeChanged() is now called in removedFrom().
802
803         (WebCore::SVGSMILElement::resetTargetElement):
804
805         resetTargetElement now fully resets the target, including removing it from
806         m_animatedElements. This will prevent future instances of this bug.
807
808 2012-07-10  Helder Correia  <helder.correia@nokia.com>
809
810         [Qt] Repaint counter for accelerated compositing
811         https://bugs.webkit.org/show_bug.cgi?id=90116
812
813         Reviewed by Noam Rosenthal.
814
815         No new tests, just introducing a debug feature.
816
817         For this feature to be enabled, the environment variable
818         QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
819         both repaint counters and tile borders will be painted.
820
821         Important notes:
822         - Only WebKit2 is targetted for now.
823         - There is no integration with Preferences. That aproach was
824         taken initially but revealed complex and overkill for such a
825         debugging-only functionality. Thus, to disable it simply restart with
826         the environment variable unset or set to some other value.
827
828         A Qt-specific drawRepaintCounter() function was added to
829         TextureMapperGL. A QImage is used as scratch buffer to paint borders and
830         counters. It is then uploaded to a BitmapTexture acquired from the pool
831         and finally draw by TextureMapper. The actual compositing happens inside
832         LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile
833         now has a repaint counter which gets incremented in
834         LayerBackingStore::updateTile().
835
836         * platform/graphics/texmap/TextureMapper.h:
837         * platform/graphics/texmap/TextureMapperGL.cpp:
838         (WebCore):
839         (WebCore::TextureMapperGL::drawRepaintCounter):
840         * platform/graphics/texmap/TextureMapperGL.h:
841         * platform/graphics/texmap/TextureMapperImageBuffer.h:
842
843 2012-07-09  Dana Jansens  <danakj@chromium.org>
844
845         [chromium] Replace use of ManagedTexture with CCScopedTexture for impl thread and remove implTextureManager from LayerRendererChromium
846         https://bugs.webkit.org/show_bug.cgi?id=90841
847
848         Reviewed by Adrienne Walker.
849
850         Remove the TextureManager from LayerRendererChromium, which was the last
851         instance of the class in the compositor. Instead of using ManagedTexture
852         objects for RenderPass textures, use instances of CCScopedTexture, which
853         manage the lifetime of the allocated texture ids. TextureManager will be
854         removed entirely once all callers of memoryUseBytes() have been removed.
855
856         No new tests. No change in behaviour.
857
858         * platform/graphics/chromium/LayerRendererChromium.cpp:
859         (WebCore::LayerRendererChromium::LayerRendererChromium):
860         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
861         (WebCore):
862         (WebCore::LayerRendererChromium::renderPassTextureSize):
863         (WebCore::LayerRendererChromium::renderPassTextureFormat):
864         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
865         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
866         (WebCore::LayerRendererChromium::drawQuad):
867         (WebCore::applyFilters):
868         (WebCore::LayerRendererChromium::drawBackgroundFilters):
869         (WebCore::LayerRendererChromium::drawRenderPassQuad):
870         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
871         (WebCore::LayerRendererChromium::getFramebufferTexture):
872         (WebCore::LayerRendererChromium::isCurrentRenderPass):
873         (WebCore::LayerRendererChromium::useRenderPass):
874         (WebCore::LayerRendererChromium::useScopedTexture):
875         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
876         (WebCore::LayerRendererChromium::initializeSharedObjects):
877         * platform/graphics/chromium/LayerRendererChromium.h:
878         (WebCore):
879         (LayerRendererChromium):
880         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
881         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
882         (WebCore::TrackingTextureAllocator::createTexture):
883         * platform/graphics/chromium/TrackingTextureAllocator.h:
884         (WebCore::TrackingTextureAllocator::create):
885         (TrackingTextureAllocator):
886         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
887         (WebCore::CCHeadsUpDisplay::draw):
888         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
889         (WebCore):
890         (CCHeadsUpDisplay):
891         * platform/graphics/chromium/cc/CCRenderer.h:
892         (WebCore):
893         (CCRenderer):
894
895 2012-07-10  Dean Jackson  <dino@apple.com>
896
897         REGRESSION (r109610): Order of values in shorthand animation makes a difference
898         https://bugs.webkit.org/show_bug.cgi?id=84533
899         <rdar://problem/11831924>
900         <rdar://problem/11815787>
901
902         Reviewed by Simon Fraser.
903
904         A previous revision (r109610) updated the parsing of the animation shorthand
905         to make sure that animation-name wouldn't clobber other styles. The side effect
906         of this was that we'd no longer find animation-name if it wasn't first in the
907         list. This commit reverts the change and fixes it in a different way, by always
908         parsing animation-name as the last property in the shorthand. This means that
909         keywords for timing functions, fill modes and iteration will match before
910         animation name. In other words, if you want an animation called "forwards"
911         you should use the longhand property, because the shorthand will first match
912         that against animation-fill-mode.
913
914         Test: animations/animation-shorthand-name-order.html
915
916         * css/CSSParser.cpp:
917         (WebCore::CSSParser::parseAnimationShorthand): make a new array of longhand
918         properties to check for, with name as the last entry rather than the first.
919         Use this array to test the properties in the shorthand.
920
921 2012-07-10  Huang Dongsung  <luxtella@company100.net>
922
923         Fix a potential bug of BitmapImage::frameCount().
924         https://bugs.webkit.org/show_bug.cgi?id=90756
925
926         Reviewed by Simon Fraser.
927
928         If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This
929         does not mean that the frame count is actually 0. So we must set
930         m_haveFrameCount to true only when m_frameCount is not 0.
931
932         The current code is okay because BitmapImage::frameCount() is never called
933         before the decoder is initialized. However, this no longer holds true once we
934         introduce parallel image decoders.
935
936         No new tests, no behavior change.
937
938         * platform/graphics/BitmapImage.cpp:
939         (WebCore::BitmapImage::frameCount):
940
941 2012-07-10  Ojan Vafai  <ojan@chromium.org>
942
943         Build fix. Removing unused variable from http://trac.webkit.org/changeset/122264.
944         * rendering/RenderBox.cpp:
945         (WebCore::RenderBox::computeContentLogicalHeightUsing):
946
947 2012-07-10  Ryosuke Niwa  <rniwa@webkit.org>
948
949         HTMLPropertiesCollection should share more code with HTMLCollection
950         https://bugs.webkit.org/show_bug.cgi?id=90842
951
952         Reviewed by Anders Carlsson.
953
954         Got rid of HTMLPropertiesCollection::m_cache, and added m_itemRefElements, m_propertyNames, m_propertyCache,
955         m_hasPropertyNameCache, and m_hasItemRefElements to HTMLPropertiesCollection itself. These are caches specific
956         to HTMLPropertiesCollection. Note that hasNameCache has been renamed to m_hasPropertyNameCache and itemRefElementPosition
957         has been replaced by cachedElementsArrayOffset() in HTMLCollectionCacheBase (also used in HTMLFormCollection).
958
959         Also deleted all methods on m_cache except updatePropertyCache since caches can be accessed directly from
960         HTMLPropertiesCollection.
961
962         * html/HTMLCollection.cpp:
963         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
964         (WebCore::HTMLCollection::invalidateCache):
965         * html/HTMLCollection.h:
966         (HTMLCollection):
967         * html/HTMLPropertiesCollection.cpp:
968         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
969         (WebCore):
970         (WebCore::HTMLPropertiesCollection::updateRefElements):
971         (WebCore::HTMLPropertiesCollection::itemAfter):
972         (WebCore::HTMLPropertiesCollection::calcLength):
973         (WebCore::HTMLPropertiesCollection::cacheFirstItem):
974         (WebCore::HTMLPropertiesCollection::item):
975         (WebCore::HTMLPropertiesCollection::findProperties):
976         (WebCore::HTMLPropertiesCollection::updateNameCache):
977         (WebCore::HTMLPropertiesCollection::names):
978         (WebCore::HTMLPropertiesCollection::namedItem):
979         (WebCore::HTMLPropertiesCollection::hasNamedItem):
980         * html/HTMLPropertiesCollection.h:
981         (HTMLPropertiesCollection):
982         (WebCore::HTMLPropertiesCollection::clearCache):
983         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
984
985 2012-07-10  Ojan Vafai  <ojan@chromium.org>
986
987         Add support for min-height:auto and min-width:auto
988         https://bugs.webkit.org/show_bug.cgi?id=88437
989
990         Reviewed by Tony Chang.
991
992         Right now auto does the same thing as min-height/min-width:0.
993         For flex-items it should be the same as min-content (followup patch).
994         http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
995
996         Tests: fast/css/auto-min-size.html
997                fast/css/deprecated-flexbox-auto-min-size.html
998
999         * WebCore.order:
1000         * css/CSSComputedStyleDeclaration.cpp:
1001         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1002         Return 0px for the computed value of auto.
1003
1004         * css/CSSParser.cpp:
1005         (WebCore::CSSParser::validWidth):
1006         (WebCore):
1007         (WebCore::CSSParser::validHeight):
1008         (WebCore::CSSParser::parseValue):
1009         * css/CSSParser.h:
1010         (CSSParser):
1011         Restructure width/height parsing to reduce code duplication and make it easier
1012         to add auto as a valid min value.
1013
1014         * platform/efl/RenderThemeEfl.cpp:
1015         (WebCore::RenderThemeEfl::adjustSizeConstraints):
1016         This code was unnecessarily checking intrinsicOrAuto since auto was previously
1017         not an allowed value for minWidth/minHeight.
1018
1019         * rendering/RenderBox.cpp:
1020         (WebCore::RenderBox::computeLogicalWidthInRegion):
1021         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1022         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1023         (WebCore::RenderBox::computeLogicalHeight):
1024         (WebCore::RenderBox::computeLogicalHeightUsing):
1025         (WebCore::RenderBox::computeContentLogicalHeightUsing):
1026         (WebCore::RenderBox::computeReplacedLogicalWidth):
1027         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1028         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1029         (WebCore::RenderBox::computeReplacedLogicalHeight):
1030         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1031         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1032         (WebCore::RenderBox::computePositionedLogicalWidth):
1033         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1034         (WebCore::RenderBox::computePositionedLogicalHeight):
1035         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1036         Need to pass a SizeType to all these methods so that we know if the Length
1037         we're working with is a min length since auto has a different meaning now
1038         for min lengths.
1039
1040         * rendering/RenderBox.h:
1041         (RenderBox):
1042         * rendering/RenderDeprecatedFlexibleBox.cpp:
1043         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
1044         * rendering/RenderFlexibleBox.cpp:
1045         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1046         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
1047         (WebCore::RenderFlexibleBox::lineBreakLength):
1048         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1049         * rendering/RenderReplaced.cpp:
1050         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1051         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1052         * rendering/RenderScrollbarPart.cpp:
1053         (WebCore::calcScrollbarThicknessUsing):
1054         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1055         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1056         * rendering/style/RenderStyle.h:
1057         Default minHeight/minWidth to auto instead of 0px.
1058
1059 2012-07-10  Xianzhu Wang  <wangxianzhu@chromium.org>
1060
1061         [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
1062         https://bugs.webkit.org/show_bug.cgi?id=90826
1063
1064         Reviewed by Adam Barth.
1065
1066         No new tests. The change to this file is refactoring only.
1067
1068         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1069         (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike().
1070
1071 2012-07-10  Raymond Toy  <rtoy@google.com>
1072
1073         AudioFIFO not correctly wrapping the write index on push
1074         https://bugs.webkit.org/show_bug.cgi?id=90901
1075
1076         Reviewed by Chris Rogers.
1077
1078         No new tests
1079
1080         * platform/audio/AudioFIFO.cpp:
1081         (WebCore::AudioFIFO::push): Wrap the write index, not read index!
1082
1083 2012-07-10  Dana Jansens  <danakj@chromium.org>
1084
1085         [chromium] Avoid allocating render pass textures that have no content
1086         https://bugs.webkit.org/show_bug.cgi?id=90702
1087
1088         Reviewed by Adrienne Walker.
1089
1090         When OOM conditions are hit, textures are not allocated for some layers
1091         which can prevent any quads from being present for a render surface.
1092         This is used as a signal to prevent the RenderPass from allocating a
1093         texture.
1094
1095         Replace the CCLayerTreeHostImpl::removePassesWithCachedTextures() method
1096         with a general removeRenderPasses() which takes a culling control object
1097         and will remove passes based on the inputs from the control object.
1098
1099         This new method is used for the old purpose of removing passes with cached
1100         textures, as well as to remove passes that do not have any quad inputs.
1101
1102         Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
1103
1104         * platform/graphics/chromium/LayerRendererChromium.cpp:
1105         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1106         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1107         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1108         (WebCore):
1109         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1110         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1111         (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1112         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1113         (WebCore):
1114         (CullRenderPassesWithCachedTextures):
1115         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListBegin):
1116         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListEnd):
1117         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListNext):
1118         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::CullRenderPassesWithCachedTextures):
1119         (CCLayerTreeHostImpl):
1120         (CullRenderPassesWithNoQuads):
1121         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListBegin):
1122         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListEnd):
1123         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListNext):
1124
1125 2012-07-10  Joshua Netterfield  <jnetterfield@rim.com>
1126         Make GC3D and E3D more maintainable for GLES platforms
1127         https://bugs.webkit.org/show_bug.cgi?id=90567
1128
1129         Reviewed by Rob Buis.
1130
1131         This patch cleans up code for WebGL on OpenGLES platforms which use 
1132         GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although
1133         GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL,
1134         GraphicsContext3DOpenGLCommon, and  GraphicsContext3DOpenGLES, this patch
1135         is an attempt to refactor this code in a way that will help BlackBerry and
1136         other teams support WebGL on mobile platforms with as little use of
1137         "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the
1138         separation of Extensions3DOpenGL into Extensions3DOpenGLCommon,
1139         Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction
1140         of OpenGLESShims.
1141
1142         This patch is created in large part by Jonathan Feldstein.
1143
1144         No new tests: no new behaviour.
1145
1146         * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build
1147         * Target.pri: Add new Extensions3DOpenGL* to WebGL builds
1148         * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function.
1149         (WebCore):
1150         * platform/graphics/OpenGLESShims.h: Added.
1151         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible
1152         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon
1153         (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports
1154         (WebCore):
1155         (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions
1156         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon
1157         (WebCore):
1158         (Extensions3DOpenGL):
1159         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added.
1160         (WebCore):
1161         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
1162         (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon):
1163         (WebCore::Extensions3DOpenGLCommon::supports):
1164         (WebCore::Extensions3DOpenGLCommon::ensureEnabled):
1165         (WebCore::Extensions3DOpenGLCommon::isEnabled):
1166         (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB):
1167         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does.
1168         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports
1169         * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
1170         (WebCore):
1171         (Extensions3DOpenGLCommon):
1172         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added.
1173         (WebCore):
1174         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
1175         (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES):
1176         (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG):
1177         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG):
1178         (WebCore::Extensions3DOpenGLES::createVertexArrayOES):
1179         (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES):
1180         (WebCore::Extensions3DOpenGLES::isVertexArrayOES):
1181         (WebCore::Extensions3DOpenGLES::bindVertexArrayOES):
1182         (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports
1183         (WebCore::Extensions3DOpenGLES::getExtensions):
1184         * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
1185         (WebCore):
1186         (Extensions3DOpenGLES):
1187         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1188         (WebCore::GraphicsContext3D::validateAttributes):
1189         (WebCore):
1190         (WebCore::GraphicsContext3D::renderbufferStorage):
1191         (WebCore::GraphicsContext3D::texImage2D):
1192         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
1193         (WebCore::GraphicsContext3D::getExtensions):
1194         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1195         (WebCore::GraphicsContext3D::validateDepthStencil):
1196         (WebCore::GraphicsContext3D::clear):
1197         (WebCore::GraphicsContext3D::isTexture):
1198         (WebCore):
1199         (WebCore::GraphicsContext3D::lineWidth):
1200         (WebCore::GraphicsContext3D::linkProgram):
1201         (WebCore::GraphicsContext3D::pixelStorei):
1202         (WebCore::GraphicsContext3D::polygonOffset):
1203         (WebCore::GraphicsContext3D::readPixels):
1204         (WebCore::GraphicsContext3D::deleteBuffer):
1205         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1206         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1207         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
1208         (WebCore::GraphicsContext3D::validateAttributes):
1209         (WebCore):
1210         (WebCore::GraphicsContext3D::getExtensions):
1211         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
1212         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1213         (WebCore):
1214         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1215
1216 2012-07-06  David Hyatt  <hyatt@apple.com>
1217
1218         https://bugs.webkit.org/show_bug.cgi?id=90646
1219         <rdar://problem/11648478> 3-pass pagination slows down pagination
1220
1221         Improve the logical top estimate function for margin collapsing to be more accurate. In particular
1222         make the basic case of <body><p> or <body><h1> no longer be wrong. This estimate being incorrect
1223         is not a big deal most of the time, but when paginating it is a very big deal, since you have to
1224         relayout everything whenever your vertical placement is wrong.
1225
1226         Improving the estimation exposed a bug in an existing layout test. I had to clean up the buggy
1227         code written for negative margin-related float detection and fix an invalid layout test to
1228         actually be correct.
1229
1230         Reviewed by Simon Fraser.
1231
1232         * rendering/RenderBlock.cpp:
1233         (WebCore::RenderBlock::collapseMargins):
1234         (WebCore::RenderBlock::marginBeforeEstimateForChild):
1235         (WebCore):
1236         (WebCore::RenderBlock::estimateLogicalTopPosition):
1237         (WebCore::RenderBlock::marginValuesForChild):
1238         * rendering/RenderBlock.h:
1239         (RenderBlock):
1240         * rendering/RenderBox.cpp:
1241         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1242         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1243
1244 2012-07-10  Alexei Filippov  <alexeif@chromium.org>
1245
1246         Web Inspector: Count inspector memory used to traverse DOM in native memory snapshots.
1247         https://bugs.webkit.org/show_bug.cgi?id=90456
1248
1249         Inspector may take significant amount of memory when traversing DOM structure.
1250         Take it into account and report under inspector memory.
1251
1252         Reviewed by Pavel Feldman.
1253
1254         * dom/MemoryInstrumentation.h:
1255         (MemoryInstrumentation):
1256         (WebCore::MemoryInstrumentation::calculateContainerSize):
1257         (WebCore::MemoryInstrumentation::reportHashMap):
1258         (WebCore::MemoryInstrumentation::reportHashSet):
1259         (WebCore::MemoryInstrumentation::reportVector):
1260         * inspector/InspectorMemoryAgent.cpp:
1261         (MemoryBlockName):
1262         (WebCore):
1263         (WebCore::domTreeInfo):
1264         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1265
1266 2012-07-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1267
1268         [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
1269         https://bugs.webkit.org/show_bug.cgi?id=90790
1270
1271         Reviewed by Carlos Garcia Campos.
1272
1273         Fixed a memory leak in paintGdkPixbuf by adopting an allocation
1274         of GdkPixbuf.
1275
1276         No new tests. No change in behavior.
1277
1278         * platform/gtk/RenderThemeGtk.cpp:
1279         (WebCore::paintGdkPixbuf):
1280
1281 2012-07-10  Konrad Piascik  <kpiascik@rim.com>
1282
1283         Web Inspector: Geolocation override
1284         https://bugs.webkit.org/show_bug.cgi?id=89365
1285
1286         Reviewed by Yong Li.
1287
1288         Added a way to override the geoloation of a client using Web
1289         Inspector.
1290
1291         New tests added.
1292         * LayoutTests/inspector/geolocation-success.html:
1293         * LayoutTests/inspector/getlocation-error.html:
1294
1295         * Modules/geolocation/GeolocationController.cpp:
1296         (WebCore::GeolocationController::GeolocationController): Now store and
1297         save the Page in m_page.
1298         (WebCore::GeolocationController::positionChanged): Check if position
1299         is overriden in Web Inspector.
1300         * Modules/geolocation/GeolocationController.h:
1301         (GeolocationController): Add member variable m_page for Page*.
1302         * inspector/Inspector.json: Add new methods for setting and clearing
1303         the GeoloationPosition and GeolocationError objects in InspectorPageAgent.
1304         * inspector/InspectorInstrumentation.cpp:
1305         (WebCore):
1306         (WebCore::InspectorInstrumentation::checkGeolocationPositionOrErrorImpl):
1307         Add methods to check whether GeolocationPosition or GeolocationError
1308         are set in InspectorPageAgent.
1309         * inspector/InspectorInstrumentation.h:
1310         (WebCore):
1311         (InspectorInstrumentation):
1312         (WebCore::InspectorInstrumentation::checkGeolocationPositionOrError):
1313         * inspector/InspectorPageAgent.cpp:
1314         (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize new
1315         member variables of GeolocationPosition and GeolocationError.
1316         (WebCore::InspectorPageAgent::setGeolocationData): Set Position and
1317         Error data and call appropriate GeolocaitonController methods.
1318         (WebCore):
1319         (WebCore::InspectorPageAgent::clearGeolocationData):
1320         (WebCore::InspectorPageAgent::sendGeolocationError):
1321         * inspector/InspectorPageAgent.h:
1322         (WebCore::InspectorPageAgent::geolocationPosition): Getter for
1323         GeolocationPosition.
1324         (InspectorPageAgent):
1325         * inspector/front-end/Settings.js: Added new settings for
1326         GeolocationPosition and GeolocationError
1327         * inspector/front-end/SettingsScreen.js: Added new control for
1328         Geolocaiton.
1329         (WebInspector.UserAgentSettingsTab):
1330         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1331         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
1332         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
1333         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
1334         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
1335         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
1336         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
1337         * inspector/front-end/UserAgentSupport.js: New GeolocationPosition
1338         Object added along with setting helper methods.  Added new setting
1339         changed handlers for Position and Error.
1340         (WebInspector.UserAgentSupport.GeolocationPosition):
1341         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
1342         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
1343         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
1344         (WebInspector.UserAgentSupport.prototype.get _onGeolocationErrorChanged):
1345
1346 2012-07-10  Vsevolod Vlasov  <vsevik@chromium.org>
1347
1348         Web Inspector: Refactor resource revisions before moving to UISourceCode.
1349         https://bugs.webkit.org/show_bug.cgi?id=90855
1350
1351         Reviewed by Pavel Feldman.
1352
1353         Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier.
1354         Restoring revisions from local storage is separated from filtering out stale persisted revisions.
1355         Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore.
1356         Renamed localStorage field for persisting revisions: "resource-history" -> "revision-history"
1357
1358         * inspector/front-end/Resource.js:
1359         (WebInspector.Resource):
1360         (WebInspector.Resource.prototype.addRevision):
1361         (WebInspector.Resource.prototype._restoreRevisionHistory):
1362         (WebInspector.Resource.prototype._clearRevisionHistory):
1363         (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory):
1364         (WebInspector.Resource.prototype.revertAndClearHistory):
1365         (WebInspector.Revision):
1366         (WebInspector.Revision._revisionHistoryRegistry):
1367         (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist):
1368         (WebInspector.Revision._ensureStaleRevisionsFileteredOut):
1369         (WebInspector.Revision.prototype._persist):
1370         * inspector/front-end/ResourceTreeModel.js:
1371         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
1372         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1373         * inspector/front-end/RevisionHistoryView.js:
1374         * inspector/front-end/UISourceCode.js:
1375         (WebInspector.UISourceCode.prototype._revisionAdded):
1376
1377 2012-07-10  Alice Cheng  <alice_cheng@apple.com>
1378
1379         Editing: Reproducible crasher when pasting a 0x0 image into Mail
1380         https://bugs.webkit.org/show_bug.cgi?id=90640
1381         <rdar://problem/11141920>
1382
1383         Reviewed by Brady Eidson.
1384
1385         0x0 images don't get a resource representation in the WebArchive, so we need a null check
1386
1387         Test: TestWebKitAPI/Tests/mac/0.png
1388               TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm
1389
1390         * platform/mac/PasteboardMac.mm:
1391         (WebCore::documentFragmentWithImageResource):
1392
1393 2012-07-10  Nikita Vasilyev  <me@elv1s.ru>
1394
1395         Web Inspector: Make the Tab character 4 spaces width
1396         https://bugs.webkit.org/show_bug.cgi?id=90172
1397
1398         Reviewed by Pavel Feldman.
1399
1400         Do it to match most code editors' behavior.
1401
1402         * inspector/front-end/inspectorCommon.css:
1403         (body):
1404
1405 2012-07-10  Eric Seidel  <eric@webkit.org>
1406
1407         REGRESSION (r122168): Layout Test http/tests/misc/script-defer.html is failing
1408         https://bugs.webkit.org/show_bug.cgi?id=90845
1409
1410         Reviewed by Alexey Proskuryakov.
1411
1412         I was a bit overzealous in removing bool returns. This one still makes sense.
1413         This just reverts the wrong part of my previous change.
1414
1415         * html/parser/HTMLDocumentParser.cpp:
1416         (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
1417         * html/parser/HTMLScriptRunner.cpp:
1418         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1419         * html/parser/HTMLScriptRunner.h:
1420         (HTMLScriptRunner):
1421
1422 2012-07-10  Kevin Ellis  <kevers@chromium.org>
1423
1424         Input type=range issue with events not being raised when value set in js
1425         https://bugs.webkit.org/show_bug.cgi?id=84674
1426
1427         Fix dispatching of change and click events for the input slider.
1428         Prior to the fix, change events were not fired if the new value
1429         matched the value at last change notification based on expected
1430         behavior for text fields.  Clicks were not fired if the thumb
1431         element was repositioned under the cursor on mouse down.
1432
1433         Reviewed by Kent Tamura.
1434
1435         Tests: fast/events/click-range-slider.html
1436                fast/events/onchange-range-slider.html
1437
1438         * html/shadow/SliderThumbElement.cpp:
1439         (WebCore::SliderThumbElement::setPositionFromPoint):
1440         * page/EventHandler.cpp:
1441         (WebCore::EventHandler::handleMouseReleaseEvent):
1442
1443 2012-07-10  Huang Dongsung  <luxtella@company100.net>
1444
1445         Don't destroy the decoded data of an image if WebKit is about to render the image.
1446         https://bugs.webkit.org/show_bug.cgi?id=90721
1447
1448         Reviewed by Antti Koivisto.
1449
1450         When the cache capacity of the MemoryCache is exceeded, the decoded data of all
1451         the CachedImages are destroyed. Even the images inside the viewport are
1452         destroyed.  However, if the images need to be rendered again due to scoll events
1453         or animation, they must be decoded again. As an extreme case, if there is an
1454         animation with an image when MemoryCache is almost full, the image must be
1455         decoded every frame. This slows down animation and needlessly consumes CPU
1456         cycles.
1457
1458         Therefore, it is better to not destory the decoded data of an image if the image
1459         is inside the viewport because there is high chance that the image needs to be
1460         rendered again soon. This patch reduces the unnecessary repetition of image decoding
1461         on low memory, and also relieves the memory fragmentation because it avoids reallocation
1462         of image frames.
1463
1464         In addition, there is another positive side effect. Currently,
1465         CachedImageClient::willRenderImage() is used only to determine if GIF animation needs
1466         to be paused or not in CachedImage::shouldPauseAnimation(). This patch makes
1467         GIF animation outside the viewort be paused.
1468
1469         This is also a prerequisite for parallel image decoders. Because parallel image
1470         decoders decode an image asynchronously, clients cannot render the image at the time
1471         when the request is made. Clients can draw the image later after receiving image
1472         decoding complete notification. However, there is a problem because MemoryCache can
1473         destroy the decoded data before clients actually render the image. So parallel image decoders
1474         must prevent the decoded data from being destroyed if the image will be rendered
1475         soon.
1476
1477         This patch may consume a little more memory, but furtunately the peak memory usage
1478         is almost the same.
1479
1480         No new tests - no new testable functionality.
1481
1482         * loader/cache/CachedImage.cpp:
1483         (WebCore::CachedImage::likelyToBeUsedSoon):
1484         (WebCore):
1485         (WebCore::CachedImage::shouldPauseAnimation):
1486         * loader/cache/CachedImage.h:
1487         (CachedImage):
1488         * loader/cache/CachedResource.h:
1489         (CachedResource):
1490         (WebCore::CachedResource::likelyToBeUsedSoon):
1491         * loader/cache/MemoryCache.cpp:
1492         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1493         * rendering/RenderObject.cpp:
1494         (WebCore::RenderObject::willRenderImage):
1495
1496 2012-07-10  Kent Tamura  <tkent@chromium.org>
1497
1498         RTL calendar picker for <input type=date> is too narrow and clipped
1499         https://bugs.webkit.org/show_bug.cgi?id=90864
1500
1501         Reviewed by Kentaro Hara.
1502
1503         Tests: ManualTests/forms/calendar-picker.html
1504
1505         * Resources/calendarPicker.js:
1506         (fixWindowSize):
1507         Checks the left edge of elemenets in RTL.
1508         (layout): Add dir=ltr for the manual test, which re-uses the document.
1509
1510 2012-07-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1511
1512         Unreviewed, rolling out r122178.
1513         http://trac.webkit.org/changeset/122178
1514         https://bugs.webkit.org/show_bug.cgi?id=90857
1515
1516         browser tests, PrerenderBrowserTest.PrerenderFavicon and other
1517         tests, started to fail (Requested by hayato on #webkit).
1518
1519         * WebCore.exp.in:
1520         * dom/Document.cpp:
1521         (WebCore::Document::iconURLs):
1522         (WebCore::Document::addIconURL):
1523         (WebCore::Document::setUseSecureKeyboardEntryWhenActive):
1524         * dom/Document.h:
1525         (Document):
1526         * html/HTMLLinkElement.cpp:
1527         * html/HTMLLinkElement.h:
1528         (HTMLLinkElement):
1529         * testing/Internals.cpp:
1530         * testing/Internals.h:
1531         (Internals):
1532         * testing/Internals.idl:
1533
1534 2012-07-10  Adam Barth  <abarth@webkit.org>
1535
1536         LayoutTestController.dumpConfigurationForViewport should move to Internals
1537         https://bugs.webkit.org/show_bug.cgi?id=45652
1538
1539         Reviewed by Eric Seidel.
1540
1541         This patch replaces LayoutTestController.dumpConfigurationForViewport
1542         with Internals.configurationForViewport. The old
1543         dumpConfigurationForViewport function just ended up calling WebCore
1544         functions anyway, so there's no benefit in implementing the API in the
1545         LayoutTestController.
1546
1547         As a result, these tests can now run on every port.
1548
1549         * testing/Internals.cpp:
1550         (WebCore::Internals::configurationForViewport):
1551         (WebCore):
1552         * testing/Internals.h:
1553         (Internals):
1554         * testing/Internals.idl:
1555
1556 2012-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1557
1558         Unreviewed. Fix GTK+ build after r122175.
1559
1560         * platform/graphics/texmap/TextureMapperLayer.cpp: Include
1561         CString.h when using cairo.
1562
1563 2012-07-10  Yoshifumi Inoue  <yosin@chromium.org>
1564
1565         [Chromium-Mac] Form related layout tests cause timeout
1566         https://bugs.webkit.org/show_bug.cgi?id=90851
1567
1568         Reviewed by Kent Tamura.
1569
1570         This patch changed to pass a valid argument to LocaleMac
1571         constructor.
1572
1573         No new tests. No more timeout in tests listed in the bug.
1574
1575         * platform/text/mac/LocaleMac.mm:
1576         (WebCore::LocaleMac::currentLocale): Changed to pass local identifier string
1577         instead of NSLocale object.
1578
1579 2012-07-10  Yuta Kitamura  <yutak@chromium.org>
1580
1581         WebSocket: Remove hixie76 protocol implementation
1582         https://bugs.webkit.org/show_bug.cgi?id=88620
1583
1584         Reviewed by Adam Barth.
1585
1586         This change removes code that implements the old hixie-76 WebSocket protocol which
1587         isn't used anymore.
1588
1589         No new tests are added, because the code using the current protocol should not be
1590         affected. Tests for hixie-76 protocol are skipped (these tests will be removed
1591         eventually).
1592
1593         * Modules/websockets/ThreadableWebSocketChannel.h:
1594         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1595         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
1596         (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
1597         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1598         (ThreadableWebSocketChannelClientWrapper):
1599         * Modules/websockets/WebSocket.cpp:
1600         (WebCore::WebSocket::WebSocket):
1601         (WebCore::WebSocket::connect):
1602         (WebCore::WebSocket::send):
1603         (WebCore::WebSocket::protocol):
1604         (WebCore::WebSocket::extensions):
1605         (WebCore::WebSocket::binaryType):
1606         (WebCore::WebSocket::setBinaryType):
1607         (WebCore::WebSocket::didReceiveMessageError):
1608         (WebCore::WebSocket::didClose):
1609         (WebCore::WebSocket::getFramingOverhead):
1610         * Modules/websockets/WebSocket.h:
1611         * Modules/websockets/WebSocketChannel.cpp:
1612         (WebCore::WebSocketChannel::WebSocketChannel):
1613         (WebCore::WebSocketChannel::connect):
1614         (WebCore::WebSocketChannel::send):
1615         (WebCore::WebSocketChannel::fail):
1616         (WebCore::WebSocketChannel::didCloseSocketStream):
1617         (WebCore::WebSocketChannel::processBuffer):
1618         (WebCore::WebSocketChannel::startClosingHandshake):
1619         (WebCore::WebSocketChannel::enqueueTextFrame):
1620         (WebCore::WebSocketChannel::enqueueRawFrame):
1621         (WebCore::WebSocketChannel::enqueueBlobFrame):
1622         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
1623         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
1624         * Modules/websockets/WebSocketChannel.h:
1625         (WebSocketChannel):
1626         * Modules/websockets/WebSocketHandshake.cpp:
1627         (WebCore::WebSocketHandshake::WebSocketHandshake):
1628         (WebCore::WebSocketHandshake::clientHandshakeMessage):
1629         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1630         (WebCore::WebSocketHandshake::readServerHandshake):
1631         (WebCore::WebSocketHandshake::checkResponseHeaders):
1632         * Modules/websockets/WebSocketHandshake.h:
1633         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1634         (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
1635         (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
1636         (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
1637         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1638         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1639         (WorkerThreadableWebSocketChannel):
1640         (Peer):
1641         (Bridge):
1642
1643 2012-07-09  Gavin Barraclough  <barraclough@apple.com>
1644
1645         Threadsafety issues in WebScriptObject
1646         https://bugs.webkit.org/show_bug.cgi?id=90849
1647
1648         Reviewed by Filip Pizlo.
1649
1650         WebScriptObject maintains a NSMap of wrapper objects. A race condition exists
1651         between a wrapper being retrieved from the map, and being released - if the
1652         final release on an object is called between a call to getJSWrapper and the
1653         subsequent retain, we may end up with a stale object reference.
1654
1655         We can make this safe by hoisting the removal from the map from delloc up into
1656         release (if the retainCount is 1), and locking release against retrieval from
1657         the map. Since release may be called from another thread, and NSMap is not
1658         threadsafe, we'd better lock around all access to the map (this fix already
1659         necessitates get & remove to be locked, so this just adds 'add', too).
1660
1661         * bindings/objc/WebScriptObject.mm:
1662         (WebCore::createJSWrapper):
1663             - lock around getJSWrapper, retain.
1664         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
1665             - lock around addJSWrapper.
1666         (-[WebScriptObject release]):
1667             - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper.
1668         (-[WebScriptObject dealloc]):
1669             - removeJSWrapper call hoisted into release.
1670
1671 2012-07-09  Christophe Dumez  <christophe.dumez@intel.com>
1672
1673         [EFL] Battery status code needs refactoring to be reused in WebKit2
1674         https://bugs.webkit.org/show_bug.cgi?id=90760
1675
1676         Reviewed by Hajime Morita.
1677
1678         Rename BatteryClientEfl to BatteryProviderEfl and remove dependency
1679         on BatteryController by introducing the BatteryProviderEflClient
1680         interface. This will allow reusing the BatteryProviderEfl class
1681         in WebKit2.
1682
1683         No new tests. Already tested by batterystatus/*.
1684
1685         * PlatformEfl.cmake:
1686         * platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp.
1687         (WebCore):
1688         (WebCore::BatteryProviderEfl::BatteryProviderEfl):
1689         (WebCore::BatteryProviderEfl::batteryStatus):
1690         (WebCore::BatteryProviderEfl::startUpdating):
1691         (WebCore::BatteryProviderEfl::stopUpdating):
1692         (WebCore::BatteryProviderEfl::setBatteryStatus):
1693         (WebCore::BatteryProviderEfl::timerFired):
1694         (WebCore::BatteryProviderEfl::getBatteryStatus):
1695         (WebCore::BatteryProviderEfl::setBatteryClient):
1696         * platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h.
1697         (WebCore):
1698         (BatteryProviderEfl):
1699         (WebCore::BatteryProviderEfl::~BatteryProviderEfl):
1700         * platform/efl/BatteryProviderEflClient.h: Added.
1701         (WebCore):
1702         (BatteryProviderEflClient):
1703
1704 2012-07-09  Hayato Ito  <hayato@chromium.org>
1705
1706         Unreviewed gardening.
1707         Fix a wrong fix of r122194.
1708
1709         * platform/graphics/chromium/LayerRendererChromium.cpp:
1710         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
1711
1712 2012-07-09  Matt Falkenhagen  <falken@chromium.org>
1713
1714         Add ENABLE_DIALOG_ELEMENT and skeleton files
1715         https://bugs.webkit.org/show_bug.cgi?id=90521
1716
1717         Reviewed by Kent Tamura.
1718
1719         This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added.
1720         The feature is diabled by default.
1721
1722         No new tests, as there is no behavior change.
1723
1724         * CMakeLists.txt:
1725         * Configurations/FeatureDefines.xcconfig:
1726         * DerivedSources.cpp:
1727         * DerivedSources.make:
1728         * DerivedSources.pri:
1729         * Target.pri:
1730         * WebCore.gypi:
1731         * WebCore.xcodeproj/project.pbxproj:
1732         * bindings/generic/RuntimeEnabledFeatures.cpp:
1733         (WebCore):
1734         * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog.
1735         (RuntimeEnabledFeatures):
1736         (WebCore::RuntimeEnabledFeatures::dialogElementEnabled):
1737         (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled):
1738         * dom/ContextFeatures.cpp:
1739         (WebCore::ContextFeatures::dialogElementEnabled):
1740         (WebCore):
1741         * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off.
1742         * html/HTMLDialogElement.cpp: Added.
1743         (WebCore):
1744         (WebCore::HTMLDialogElement::HTMLDialogElement):
1745         (WebCore::HTMLDialogElement::create):
1746         (WebCore::HTMLDialogElement::close):
1747         (WebCore::HTMLDialogElement::show):
1748         * html/HTMLDialogElement.h: Added.
1749         (WebCore):
1750         (HTMLDialogElement):
1751         * html/HTMLDialogElement.idl: Added.
1752         * html/HTMLElementsAllInOne.cpp:
1753         * html/HTMLTagNames.in:
1754         * page/DOMWindow.idl:
1755
1756 2012-07-09  Hayato Ito  <hayato@chromium.org>
1757
1758         Unreviewed gardening.
1759         Remove an assertion starting to fail on interactive_ui_tests on Chromium OS.
1760
1761         * platform/graphics/chromium/LayerRendererChromium.cpp:
1762         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
1763
1764 2012-07-09  Hayato Ito  <hayato@chromium.org>
1765
1766         Unreviewed gardening.
1767         Build fix after r122175
1768
1769         * WebCore.gypi: Remove Source/WebCore/platform/graphics/qt/Extensions3DQt.{cpp,h}
1770
1771 2012-07-09  Kiran Muppala  <cmuppala@apple.com>
1772
1773         Improve performance of RenderInline::absoluteQuads for deeply nested inlines.
1774         https://bugs.webkit.org/show_bug.cgi?id=90715
1775
1776         Reviewed by Maciej Stachowiak.
1777
1778         No new tests: functionality unchanged.
1779
1780         * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a
1781         RenderGeometryMap and use it for subsequent mappings.
1782         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
1783         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()):
1784
1785 2012-07-09  Yoshifumi Inoue  <yosin@chromium.org>
1786
1787         [Chromium-Mac] Implement functions for localized time format information
1788         https://bugs.webkit.org/show_bug.cgi?id=90237
1789
1790         Reviewed by Kent Tamura.
1791
1792         This patch introduces following localized time format related
1793         functions:
1794           - localizeTimeFormatText()
1795           - localizeShortTimeFormatText()
1796           - timeAMPMLabels
1797         for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1798
1799         These function will be used by input type "time" with multiple input
1800         fields UI.
1801
1802         Note: ICU version of localized time format functions are implemented
1803         in https://bugs.webkit.org/show_bug.cgi?id=89965
1804
1805         Tests: WebKit/chromium/tests/LocaleMacTest.cpp
1806
1807         * platform/text/mac/LocaleMac.h:
1808         (LocaleMac): Added time format related functions and variables.
1809         * platform/text/mac/LocaleMac.mm:
1810         (WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter.
1811         (WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter.
1812         (WebCore::LocaleMac::createTimeFormatter): Added.
1813         (WebCore::LocaleMac::createShortTimeFormatter): Added.
1814         (WebCore::LocaleMac::timeFormatText): Added.
1815         (WebCore::LocaleMac::shortTimeFormatText): Added.
1816         (WebCore::LocaleMac::timeAMPMLabels): Added.
1817
1818 2012-07-09  Alexandru Chiculita  <achicu@adobe.com>
1819
1820         [CSS Shaders] The FECustomFilter is not making the GL context active
1821         https://bugs.webkit.org/show_bug.cgi?id=90840
1822
1823         Reviewed by Dean Jackson.
1824
1825         I've added a couple of makeContextCurrent() in the FECustomFilter related classes.
1826         Also, removed the assumption that GraphicsContext3D::create() never returns 0.
1827
1828         No new tests, this was crashing on existing tests.
1829
1830         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
1831         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
1832         (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram):
1833         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
1834         (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded):
1835         * platform/graphics/filters/CustomFilterMesh.cpp:
1836         (WebCore::CustomFilterMesh::CustomFilterMesh):
1837         (WebCore::CustomFilterMesh::~CustomFilterMesh):
1838         * platform/graphics/filters/FECustomFilter.cpp:
1839         (WebCore::FECustomFilter::deleteRenderBuffers):
1840         (WebCore::FECustomFilter::platformApplySoftware):
1841         (WebCore::FECustomFilter::initializeContext):
1842         * platform/graphics/filters/FECustomFilter.h:
1843         (FECustomFilter):
1844
1845 2012-07-09  Kent Tamura  <tkent@chromium.org>
1846
1847         REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden.
1848         https://bugs.webkit.org/show_bug.cgi?id=90774
1849
1850         Reviewed by Andreas Kling.
1851
1852         Test: fast/forms/hidden/change-type-to-hidden-after-updating-value.html
1853
1854         * dom/Element.cpp:
1855         (WebCore::Element::setAttributeInternal):
1856         Pass a copy of the existing Attribute object.
1857
1858 2012-07-07  Philippe Normand  <pnormand@igalia.com>
1859
1860         [GStreamer] cache video dimensions
1861         https://bugs.webkit.org/show_bug.cgi?id=90733
1862
1863         Reviewed by Martin Robinson.
1864
1865         Invalidate the cached video dimensions whenever the video-sink sink pad caps
1866         change and let ::naturalSize() lazily recalculate them.
1867
1868         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1869         (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
1870         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1871         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1872         (MediaPlayerPrivateGStreamer):
1873
1874 2012-07-09  Eric Penner  <epenner@google.com>
1875
1876         [chromium] Merge updates and idle updates into one pass
1877         https://bugs.webkit.org/show_bug.cgi?id=90324
1878
1879         Reviewed by Adrienne Walker.
1880
1881         We no longer need to do painting is passes in order
1882         to allocate memory in the right order. So this merges
1883         updates and idle updates into one pass.
1884
1885         Covered by existing unit tests (some of which are
1886         updated with this patch).
1887
1888         * platform/graphics/chromium/ContentLayerChromium.cpp:
1889         (WebCore::ContentLayerChromium::needMoreUpdates):
1890         * platform/graphics/chromium/ContentLayerChromium.h:
1891         (ContentLayerChromium):
1892         * platform/graphics/chromium/LayerChromium.h:
1893         (WebCore::LayerChromium::needMoreUpdates):
1894         * platform/graphics/chromium/TiledLayerChromium.cpp:
1895         (WebCore::TiledLayerChromium::updateTiles):
1896         (WebCore::TiledLayerChromium::updateLayerRect):
1897         * platform/graphics/chromium/TiledLayerChromium.h:
1898         (TiledLayerChromium):
1899         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1900         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1901         (WebCore::CCLayerTreeHost::compositeAndReadback):
1902         (WebCore::CCLayerTreeHost::updateLayers):
1903         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
1904         (WebCore::CCLayerTreeHost::paintLayerContents):
1905         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1906         (CCLayerTreeHost):
1907
1908 2012-07-09  Yoshifumi Inoue  <yosin@chromium.org>
1909
1910         [Platform] Introduce LocaleMac class
1911         https://bugs.webkit.org/show_bug.cgi?id=90248
1912
1913         Reviewed by Kent Tamura.
1914
1915         This patch moves implementation of localized date format related
1916         functions into LocaleMac class as of LocaleWin class for ease of
1917         maintain and using specific locale in testing rather than system
1918         default locale.
1919
1920         Tests: WebKit/chromium/tests/LocaleMacTest.cpp
1921
1922         * WebCore.gyp/WebCore.gyp: Include LocaleMac.mm
1923         * WebCore.gypi:
1924         * platform/text/mac/LocaleMac.h: Replace LocaleWin to LocaleMac.
1925         * platform/text/mac/LocaleMac.mm:
1926         (WebCore::LocaleMac::LocaleMac):
1927         (WebCore::LocaleMac::~LocaleMac):
1928         (WebCore::LocaleMac::create):
1929         (WebCore::LocaleMac::currentLocale):
1930         (WebCore::LocaleMac::createShortDateFormatter):
1931         (WebCore::LocaleMac::parseDate):
1932         (WebCore::LocaleMac::formatDate):
1933         (WebCore::LocaleMac::dateFormatText):
1934         (WebCore::LocaleMac::monthLabels):
1935         (WebCore::LocaleMac::weekDayShortLabels):
1936         (WebCore::LocaleMac::firstDayOfWeek):
1937         * platform/text/mac/LocalizedDateMac.cpp:
1938         (WebCore::parseLocalizedDate):
1939         (WebCore::formatLocalizedDate):
1940         (WebCore::localizedDateFormatText):
1941         (WebCore::monthLabels):
1942         (WebCore::weekDayShortLabels):
1943         (WebCore::firstDayOfWeek):
1944         * platform/text/mac/LocalizedDateMac.mm: Removed.
1945
1946 2012-07-09  Dana Jansens  <danakj@chromium.org>
1947
1948         [chromium] Create CCScopedTexture class for creating/freeing textures
1949         https://bugs.webkit.org/show_bug.cgi?id=89485
1950
1951         Reviewed by Adrienne Walker.
1952
1953         This class provides a standard way to create texture ids in a way that
1954         ensures they will be freed later.
1955
1956         Also includes a CCTexture base class that holds textureId, size, and
1957         format together in a struct that can be used in place of storing an
1958         unsigned textureId in other classes.
1959
1960         Unit tests: CCScopedTexureTest.NewScopedTexture
1961                     CCScopedTexureTest.CreateScopedTexture
1962                     CCScopedTexureTest.ScopedTextureIsDeleted
1963                     CCScopedTexureTest.LoseScopedTexture
1964
1965         * WebCore.gypi:
1966         * platform/graphics/chromium/cc/CCScopedTexture.cpp: Added.
1967         (WebCore):
1968         (WebCore::CCScopedTexture::CCScopedTexture):
1969         (WebCore::CCScopedTexture::~CCScopedTexture):
1970         (WebCore::CCScopedTexture::allocate):
1971         (WebCore::CCScopedTexture::free):
1972         (WebCore::CCScopedTexture::leak):
1973         * platform/graphics/chromium/cc/CCScopedTexture.h: Added.
1974         (WebCore):
1975         (CCScopedTexture):
1976         (WebCore::CCScopedTexture::create):
1977         * platform/graphics/chromium/cc/CCTexture.cpp: Added.
1978         (WebCore):
1979         (WebCore::CCTexture::setDimensions):
1980         (WebCore::CCTexture::bytes):
1981         (WebCore::CCTexture::memorySizeBytes):
1982         * platform/graphics/chromium/cc/CCTexture.h: Added.
1983         (WebCore):
1984         (CCTexture):
1985         (WebCore::CCTexture::CCTexture):
1986         (WebCore::CCTexture::id):
1987         (WebCore::CCTexture::size):
1988         (WebCore::CCTexture::format):
1989         (WebCore::CCTexture::setId):
1990
1991 2012-07-09  Joshua Bell  <jsbell@chromium.org>
1992
1993         IndexedDB: deleteDatabase fails if transaction running in other database
1994         https://bugs.webkit.org/show_bug.cgi?id=90822
1995
1996         Reviewed by Tony Chang.
1997
1998         The IDBLevelDBBackingStore was preventing a deleteDatabase() from running
1999         if any other database was running a transaction. Fix by just creating a scratch
2000         LevelDBTransaction for the delete steps.
2001
2002         Test: storage/indexeddb/deletedatabase-transaction.html
2003
2004         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2005         (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use a LevelDBTransaction
2006         directly.
2007
2008 2012-07-09  Pete Williamson  <petewil@google.com>
2009
2010         Changed the behavior of iconURLs to always recalculate the list.
2011         https://bugs.webkit.org/show_bug.cgi?id=88665
2012
2013         Reviewed by Kent Tamura..
2014
2015         As it turns out, it can contain stale URLs in the case that some script
2016         manipulates the DOM, which breaks scripts trying to reset the favicon
2017         URL. Also added a method in Internals to allow tests to get the list of
2018         icon
2019
2020         Tests: fast/dom/icon-url-change.html
2021                fast/dom/icon-url-list.html
2022
2023         * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
2024         * dom/Document.cpp:
2025         (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
2026         (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
2027         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
2028         * dom/Document.h:
2029         (Document): removed the addIconURL method which is no longer used
2030         * html/HTMLLinkElement.cpp:
2031         (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
2032         (WebCore):
2033         (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
2034         * html/HTMLLinkElement.h:
2035         (HTMLLinkElement): declared the icon type and size accessors
2036         * testing/Internals.cpp:
2037         (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
2038         (WebCore):
2039         * testing/Internals.h:
2040         (Internals): declared the method for unit testing the icon URL list
2041         * testing/Internals.idl: exported the Document::iconURLs function
2042
2043 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2044
2045         Gcc build fix after r122174.
2046
2047         * storage/StorageAreaImpl.cpp:
2048         (WebCore::StorageAreaImpl::decrementAccessCount):
2049
2050 2012-07-09  Alice Cheng  <alice_cheng@apple.com>
2051
2052         Editing: Autocorrection in blockquotes causes text to break out of quote
2053         https://bugs.webkit.org/show_bug.cgi?id=90487
2054         <rdar://problem/11769020> 
2055
2056         Reviewed by Enrica Casucci.
2057
2058         Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html
2059
2060         SpellingCorrectionCommand uses ReplaceSelectionCommand to replace the misspelled word with the auto-corrected word. Specifically, ReplaceSelectionCommand does a smart copy, where it breaks out of blockquotes. Thus, the fix is to substitute ReplaceSelectionCommand with InserTextCommand.
2061
2062         * editing/SpellingCorrectionCommand.cpp:
2063         (WebCore::SpellingCorrectionCommand::doApply):
2064
2065 2012-07-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
2066
2067         Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE()
2068         https://bugs.webkit.org/show_bug.cgi?id=90506
2069
2070         Reviewed by Martin Robinson.
2071
2072         GraphicsContext3D, ANGLEWebKitBridge and Extensions3D are now guarded with USE(3D_GRAPHICS)
2073         instead of ENABLE(WEBGL).
2074
2075         No new tests, build changes only.
2076
2077         * Target.pri:
2078             Removed references to unused files.
2079
2080         * WebCore.pri:
2081             Updated the Qt build so that the basic 3D-graphics sources can be compiled even when
2082             WebGL is disabled.
2083
2084         * platform/graphics/ANGLEWebKitBridge.cpp:
2085         * platform/graphics/GraphicsContext3D.cpp:
2086         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2087         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2088         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2089         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2090         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2091         * platform/qt/QWebPageClient.h:
2092         * platform/graphics/OpenGLShims.cpp:
2093         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2094         * platform/graphics/cairo/DrawingBufferCairo.cpp:
2095         * platform/graphics/cairo/GLContext.h:
2096         (GLContext):
2097         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2098         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
2099         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2100         * platform/graphics/clutter/DrawingBufferClutter.cpp:
2101         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
2102         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
2103         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2104         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2105         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
2106         * platform/graphics/filters/CustomFilterCompiledProgram.h:
2107         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2108         * platform/graphics/filters/CustomFilterGlobalContext.h:
2109         * platform/graphics/filters/CustomFilterMesh.cpp:
2110         * platform/graphics/filters/CustomFilterMesh.h:
2111         * platform/graphics/filters/CustomFilterProgram.cpp:
2112         (WebCore):
2113         * platform/graphics/filters/CustomFilterProgram.h:
2114         * platform/graphics/filters/FECustomFilter.cpp:
2115         * platform/graphics/filters/FECustomFilter.h:
2116         * platform/graphics/glx/GLContextGLX.cpp:
2117         (WebCore):
2118         * platform/graphics/glx/GLContextGLX.h:
2119         (GLContextGLX):
2120         * platform/graphics/gpu/DrawingBuffer.cpp:
2121         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2122         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
2123         * platform/graphics/mac/GraphicsContext3DMac.mm:
2124         * platform/graphics/qt/Extensions3DQt.cpp: Removed.
2125         * platform/graphics/qt/Extensions3DQt.h: Removed.
2126         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2127         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2128             Chaned ENABLE(WEBGL) to USE(3D_GRAPHICS)
2129
2130 2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
2131
2132         Consider closing unused localStorage database after a timeout.
2133         https://bugs.webkit.org/show_bug.cgi?id=90713
2134
2135         For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
2136         we can close the underlying sqlite database.
2137
2138         Reviewed by Brady Eidson.
2139
2140         Test: storage/domstorage/storage-close-database-on-idle.html
2141
2142         * storage/Storage.cpp:
2143         (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it.
2144         (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it.
2145         * storage/StorageArea.h:
2146         (StorageArea):
2147         * storage/StorageAreaImpl.cpp:
2148         (WebCore::StorageAreaImpl::StorageAreaImpl):
2149         (WebCore::StorageAreaImpl::incrementAccessCount):
2150         (WebCore):
2151         (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document
2152             referencing to this storageArea.
2153         (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database.
2154         * storage/StorageAreaImpl.h:
2155         (StorageAreaImpl):
2156         * storage/StorageAreaSync.cpp:
2157         (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out.
2158         * storage/StorageTracker.cpp:
2159         (WebCore):
2160         (WebCore::StorageTracker::StorageTracker):
2161         * storage/StorageTracker.h:
2162         (WebCore::StorageTracker::storageDatabaseIdleInterval):
2163         (WebCore::StorageTracker::setStorageDatabaseIdleInterval):  set the timeout value that we will wait before closing the
2164             database.  This is currently used by DumpRenderTree only.
2165         (StorageTracker):
2166
2167 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2168
2169         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string
2170         https://bugs.webkit.org/show_bug.cgi?id=90474
2171
2172         Reviewed by Tony Chang.
2173
2174         Test: storage/indexeddb/transaction-basics.html
2175
2176         * Modules/indexeddb/IDBDatabase.cpp:
2177         (WebCore::IDBDatabase::transaction):
2178         * Modules/indexeddb/IDBDatabase.idl:
2179
2180 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2181
2182         IndexedDB: Remove obsolete accessor plumbing
2183         https://bugs.webkit.org/show_bug.cgi?id=90812
2184
2185         Reviewed by Tony Chang.
2186
2187         No new tests - just deleting code.
2188
2189         * Modules/indexeddb/IDBTransaction.cpp:
2190         (WebCore::IDBTransaction::IDBTransaction): Since backend mode() is disconnected, can no
2191         longer assert that front-end/back-end modes match; not worth it to keeping the plumbing.
2192
2193 2012-07-09  Dana Jansens  <danakj@chromium.org>
2194
2195         [chromium] Remove HashMap workaround for layers with id=0 in CCDamageTracker
2196         https://bugs.webkit.org/show_bug.cgi?id=90825
2197
2198         Reviewed by Adrienne Walker.
2199
2200         Layer ids are no longer allowed to be 0, and the behaviour is guarded
2201         with asserts, so this workaround is not needed any longer.
2202
2203         * platform/graphics/chromium/cc/CCDamageTracker.h:
2204         (CCDamageTracker):
2205
2206 2012-07-09  Vincent Scheib  <scheib@chromium.org>
2207
2208         Pointer Lock requestPointerLock rejects locking an element not in a document.
2209         https://bugs.webkit.org/show_bug.cgi?id=90821
2210
2211         Reviewed by Adrienne Walker.
2212
2213         Test: pointer-lock/lock-element-not-in-dom.html
2214
2215         * page/PointerLockController.cpp:
2216         (WebCore::PointerLockController::requestPointerLock):
2217
2218 2012-07-09  Eric Seidel  <eric@webkit.org>
2219
2220         document.write of scripts that also document.write sometimes writes async
2221         https://bugs.webkit.org/show_bug.cgi?id=89102
2222
2223         Reviewed by Adam Barth.
2224
2225         When a script tag is first encountered, the TreeBuilder holds the element and returns
2226         out to the outer HTMLDocumentParser parse loop.  The HTMLDocumentParser then takes
2227         the script element and passes it to the HTMLScriptRunner for execution. However, if the
2228         script is an "external script" the HTMLScriptRunner may have to wait for that parser
2229         blocking script to load, and may store the script in its own m_parserBlockingScript member.
2230
2231         While the HTMLScriptRunner has this not-yet-loaded-script the parser is also blocked.
2232         Because the "paused" state of the parser was held as a separate bool on the TreeBuilder
2233         we'd have to be careful to update it to reflect the current state of this pending script
2234         on the HTMLScriptRunner.
2235
2236         This patch removes this separate "paused" bool and makes the HTMLDocumentParser responsible
2237         for the "paused" state of the parser through the isWaitingForScripts() function which
2238         knows how to check both the TreeBuilder and the ScriptRunner for possible parser-blocking scripts.
2239
2240         I suspect this change may actually fix a bunch of edge cases where we were not
2241         checking for the HTMLScriptRunner's parser blocking script and thus incorrectly ending
2242         the parser, or not starting the pre-load scanner, etc.
2243
2244         As part of this change I also renamed m_haveParsingBlockingScript in HTMLScriptRunner to match
2245         the naming style used elsewhere in the parser, as well as removed all the "bool" return values
2246         for these parse/execute functions as they are no longer useful (or correct). The correct way
2247         is always to check HTMLDocumentParser::isWaitingForScripts().
2248
2249         Test: fast/parser/cached-script-document-write.html
2250
2251         * html/parser/HTMLDocumentParser.cpp:
2252         (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
2253         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
2254         (WebCore::HTMLDocumentParser::canTakeNextToken):
2255         (WebCore::HTMLDocumentParser::isWaitingForScripts):
2256         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2257         (WebCore::HTMLDocumentParser::notifyFinished):
2258         (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
2259         * html/parser/HTMLScriptRunner.cpp:
2260         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
2261         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
2262         (WebCore::HTMLScriptRunner::execute):
2263         (WebCore::HTMLScriptRunner::hasParserBlockingScript):
2264         (WebCore::HTMLScriptRunner::executeParsingBlockingScripts):
2265         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
2266         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
2267         (WebCore::HTMLScriptRunner::requestParsingBlockingScript):
2268         (WebCore::HTMLScriptRunner::runScript):
2269         * html/parser/HTMLScriptRunner.h:
2270         (HTMLScriptRunner):
2271         * html/parser/HTMLTreeBuilder.cpp:
2272         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2273         (WebCore::HTMLTreeBuilder::takeScriptToProcess):
2274         (WebCore::HTMLTreeBuilder::processEndTag):
2275         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2276         * html/parser/HTMLTreeBuilder.h:
2277         (HTMLTreeBuilder):
2278         (WebCore::HTMLTreeBuilder::hasParserBlockingScript):
2279
2280 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2281
2282         Microdata tests are flaky
2283         https://bugs.webkit.org/show_bug.cgi?id=90830
2284
2285         Reviewed by Antti Koivisto.
2286
2287         The bug was caused by SpaceSplitString's not copying on write properly.
2288         Even if there was exactly one owner of the SpaceSplitString, we should still not modify
2289         m_data since m_data is associated with a particular m_keyString in sharedDataMap().
2290
2291         The only situation in which we can safely modify m_data is when m_data's m_keyString is null
2292         meaning that it had been unique'ed. Furthermore, this optimization had not been used for
2293         class lists because class list's refCount is always zero as its ref and deref are forwarded
2294         to the associated Element's ref and deref. This fix re-enables the optimization for class lists.
2295
2296         This behavior change is tested by existing microdata API tests. Without this patch,
2297         some tests such as properties-collection-add-remove-property.html fail on the first run
2298         when several tests were ran in the same WebKit instance.
2299
2300         * dom/SpaceSplitString.h:
2301         (WebCore::SpaceSplitStringData::isUnique):
2302         (WebCore::SpaceSplitString::ensureUnique):
2303
2304 2012-07-09  Dana Jansens  <danakj@chromium.org>
2305
2306         [chromium] Decouple RenderPass drawing from CCRenderSurface
2307         https://bugs.webkit.org/show_bug.cgi?id=90573
2308
2309         Reviewed by Adrienne Walker.
2310
2311         Removes the managed textures from CCRenderSurface and stores them in a
2312         HashMap in LayerRendererChromium.
2313
2314         At the start of a frame, all textures for the frame are reserved, and
2315         unneeded textures are deleted. After each quad is drawn, evicted textures
2316         (ie temporary textures used for background filters) are deleted to keep
2317         within memory limits. At the end of the frame, all surface contents
2318         textures are kept reserved and thus not deleted.
2319
2320         We add a numeric identifier to CCRenderPass which can be used to
2321         identify the pass across serialization in the future, and is used
2322         in the interface to LayerRendererChromium. Also we add to the
2323         CCRenderPass a contentsChangedSinceLastFrame() flag so that the
2324         value does not need to be retrieved from the CCRenderSurface.
2325
2326         The pointer from CCRenderPass to CCRenderSurface remains for some
2327         code in the CCLayerTreeHostImpl, and will be addressed in the future, but
2328         the pointer is no longer used at all while drawing a frame inside
2329         LayerRendererChromium.
2330
2331         Covered by existing tests, no intended change in behaviour.
2332
2333         * platform/graphics/chromium/LayerRendererChromium.cpp:
2334         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
2335         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
2336         (WebCore):
2337         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
2338         (WebCore::LayerRendererChromium::drawQuad):
2339         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2340         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2341         (WebCore::LayerRendererChromium::finishDrawingFrame):
2342         (WebCore::LayerRendererChromium::useRenderPass):
2343         (WebCore::LayerRendererChromium::initializeSharedObjects):
2344         * platform/graphics/chromium/LayerRendererChromium.h:
2345         (LayerRendererChromium):
2346         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2347         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2348         (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures):
2349         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2350         (CCLayerTreeHostImpl):
2351         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2352         (WebCore::CCRenderPass::create):
2353         (WebCore::CCRenderPass::CCRenderPass):
2354         * platform/graphics/chromium/cc/CCRenderPass.h:
2355         (CCRenderPass):
2356         (WebCore::CCRenderPass::id):
2357         (WebCore::CCRenderPass::setFramebufferOutputRect):
2358         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
2359         (WebCore::CCRenderPassDrawQuad::create):
2360         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
2361         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
2362         (CCRenderPassDrawQuad):
2363         (WebCore::CCRenderPassDrawQuad::renderPassId):
2364         (WebCore::CCRenderPassDrawQuad::contentsChangedSinceLastFrame):
2365         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2366         (WebCore::CCRenderSurface::appendQuads):
2367         * platform/graphics/chromium/cc/CCRenderSurface.h:
2368         (WebCore):
2369         (CCRenderSurface):
2370         * platform/graphics/chromium/cc/CCRenderer.h:
2371         (CCRenderer):
2372         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2373         (WebCore::CCTiledLayerImpl::pushTileProperties):
2374         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2375         (CCTiledLayerImpl):
2376
2377 2012-07-09  Adam Klein  <adamk@chromium.org>
2378
2379         Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver
2380         https://bugs.webkit.org/show_bug.cgi?id=90810
2381
2382         Reviewed by Ojan Vafai.
2383
2384         This is in preparation for removing the vendor prefix from the
2385         MutationObserver constructor on Window (currently it's called
2386         WebKitMutationObserver). Doing the WebCore-internal rename first
2387         makes that change a much smaller one, which is especially useful
2388         because there's ongoing discussion of when the prefix should be
2389         removed from the web-facing API.
2390
2391         * CMakeLists.txt:
2392         * DerivedSources.cpp:
2393         * DerivedSources.make:
2394         * GNUmakefile.list.am:
2395         * Target.pri:
2396         * UseJSC.cmake:
2397         * UseV8.cmake:
2398         * WebCore.gypi:
2399         * WebCore.vcproj/WebCore.vcproj:
2400         * WebCore.xcodeproj/project.pbxproj:
2401         * bindings/js/JSBindingsAllInOne.cpp:
2402         * bindings/js/JSMainThreadExecState.cpp:
2403         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
2404         * bindings/js/JSMutationCallbackCustom.cpp:
2405         (WebCore::JSMutationCallback::handleEvent):
2406         * bindings/js/JSMutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp.
2407         (WebCore):
2408         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
2409         * bindings/v8/V8RecursionScope.cpp:
2410         (WebCore::V8RecursionScope::didLeaveScriptContext):
2411         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2412         (WebCore::V8MutationCallback::handleEvent):
2413         * bindings/v8/custom/V8MutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp.
2414         (WebCore):
2415         (WebCore::V8MutationObserver::constructorCallback):
2416         * dom/CharacterData.cpp:
2417         * dom/ChildListMutationScope.h:
2418         (WebCore::ChildListMutationScope::ChildListMutationScope):
2419         * dom/DOMAllInOne.cpp:
2420         * dom/Document.h:
2421         (WebCore::Document::hasMutationObserversOfType):
2422         * dom/Element.cpp:
2423         * dom/MutationCallback.h:
2424         (WebCore):
2425         (MutationCallback):
2426         * dom/MutationCallback.idl:
2427         * dom/MutationObserver.cpp: Renamed from Source/WebCore/dom/WebKitMutationObserver.cpp.
2428         (WebCore):
2429         (WebCore::MutationObserver::ObserverLessThan::operator()):
2430         (WebCore::MutationObserver::create):
2431         (WebCore::MutationObserver::MutationObserver):
2432         (WebCore::MutationObserver::~MutationObserver):
2433         (WebCore::MutationObserver::validateOptions):
2434         (WebCore::MutationObserver::observe):
2435         (WebCore::MutationObserver::takeRecords):
2436         (WebCore::MutationObserver::disconnect):
2437         (WebCore::MutationObserver::observationStarted):
2438         (WebCore::MutationObserver::observationEnded):
2439         (WebCore::activeMutationObservers):
2440         (WebCore::MutationObserver::enqueueMutationRecord):
2441         (WebCore::MutationObserver::setHasTransientRegistration):
2442         (WebCore::MutationObserver::deliver):
2443         (WebCore::MutationObserver::deliverAllMutations):
2444         * dom/MutationObserver.h: Renamed from Source/WebCore/dom/WebKitMutationObserver.h.
2445         (WebCore):
2446         (MutationObserver):
2447         * dom/MutationObserver.idl: Renamed from Source/WebCore/dom/WebKitMutationObserver.idl.
2448         * dom/MutationObserverInterestGroup.cpp:
2449         (WebCore::MutationObserverInterestGroup::createIfNeeded):
2450         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
2451         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
2452         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2453         * dom/MutationObserverInterestGroup.h:
2454         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
2455         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
2456         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
2457         (MutationObserverInterestGroup):
2458         * dom/MutationObserverRegistration.cpp:
2459         (WebCore::MutationObserverRegistration::create):
2460         (WebCore::MutationObserverRegistration::MutationObserverRegistration):
2461         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
2462         * dom/MutationObserverRegistration.h:
2463         (MutationObserverRegistration):
2464         (WebCore::MutationObserverRegistration::isSubtree):
2465         (WebCore::MutationObserverRegistration::observer):
2466         (WebCore::MutationObserverRegistration::deliveryOptions):
2467         (WebCore::MutationObserverRegistration::mutationTypes):
2468         * dom/Node.cpp:
2469         (WebCore::Node::collectMatchingObserversForMutation):
2470         (WebCore::Node::getRegisteredMutationObserversOfType):
2471         (WebCore::Node::registerMutationObserver):
2472         * dom/Node.h:
2473         (Node):
2474         * dom/NodeRareData.h:
2475         * page/DOMWindow.idl:
2476
2477 2012-07-09  Filip Pizlo  <fpizlo@apple.com>
2478
2479         Unreviewed, rolling out http://trac.webkit.org/changeset/122116 and http://trac.webkit.org/changeset/122119
2480
2481         * GNUmakefile.list.am:
2482         * PlatformBlackBerry.cmake:
2483         * Target.pri:
2484         * WebCore.gypi:
2485         * WebCore.xcodeproj/project.pbxproj:
2486         * platform/graphics/GraphicsContext3D.h:
2487         (WebCore):
2488         * platform/graphics/OpenGLESShims.h:
2489         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2490         (WebCore):
2491         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
2492         (WebCore):
2493         * platform/graphics/mac/GraphicsContext3DMac.mm:
2494         (WebCore):
2495         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2496         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
2497         (WebCore::Extensions3DOpenGL::supports):
2498         (WebCore):
2499         (WebCore::Extensions3DOpenGL::ensureEnabled):
2500         (WebCore::Extensions3DOpenGL::isEnabled):
2501         (WebCore::Extensions3DOpenGL::getGraphicsResetStatusARB):
2502         (WebCore::Extensions3DOpenGL::getTranslatedShaderSourceANGLE):
2503         (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
2504         * platform/graphics/opengl/Extensions3DOpenGL.h:
2505         (Extensions3DOpenGL):
2506         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2507         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2508         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2509         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2510         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2511         (WebCore):
2512         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2513         (WebCore::systemAllowsMultisamplingOnATICards):
2514         (WebCore):
2515         (WebCore::GraphicsContext3D::validateAttributes):
2516         (WebCore::GraphicsContext3D::compileShader):
2517         (WebCore::GraphicsContext3D::readPixels):
2518         (WebCore::GraphicsContext3D::releaseShaderCompiler):
2519         (WebCore::GraphicsContext3D::getExtensions):
2520         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2521         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2522         (WebCore::GraphicsContext3D::reshapeFBOs):
2523         (WebCore):
2524         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2525         (WebCore):
2526
2527 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2528
2529         Build fix after r122115 and some cleanups.
2530
2531         * html/HTMLCollection.h:
2532         (HTMLCollection):
2533         * html/HTMLElement.cpp:
2534         (WebCore::HTMLElement::properties):
2535         * html/HTMLElement.h:
2536         (HTMLElement):
2537         * html/HTMLPropertiesCollection.cpp:
2538         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2539         * html/HTMLPropertiesCollection.h:
2540         (HTMLPropertiesCollection):
2541
2542 2012-07-09  Dean Jackson  <dino@apple.com>
2543
2544         Tiled drawing means some elements can disappear behind the page
2545         https://bugs.webkit.org/show_bug.cgi?id=88906
2546
2547         Reviewed by Simon Fraser.
2548
2549         The compositing layers in the tile cache could become siblings
2550         of the compositing layers for page elements. This meant that in
2551         some 3d transforms, the elements could disappear behind the
2552         page background (which is rendered into the tile cache) or intersect
2553         with the tile cache tiles.
2554
2555         Fix this by inserting a flattening layer between the tile cache
2556         and the page, ensuring that the cache will always be rendered
2557         first. I was able to reuse the clipping layer for this, because
2558         the tile cache is attached to the RenderView, so there should never
2559         be a case where we have both a clipping layer and tiles.
2560
2561         The unfortunate part of this code is the temporary state variable
2562         that wraps the call to GraphicsLayer::create. Because that method
2563         calls back into the object, we need to make sure we don't create
2564         another tile cache.
2565
2566         Also added some obvious names to the tile cache layers to
2567         help with debugging.
2568
2569         Test: compositing/tile-cache-must-flatten.html
2570
2571         * platform/graphics/ca/mac/TileCache.mm:
2572         (WebCore::TileCache::TileCache): give the tile host layer a name.
2573         (WebCore::TileCache::createTileLayer):
2574         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2575         (WebCore): give each tile layer a name.
2576         * rendering/RenderLayerBacking.cpp:
2577         (WebCore):
2578         (WebCore::RenderLayerBacking::shouldUseTileCache): check if we're in the middle
2579         of creating the primary graphics layer before answering.
2580         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): wrap our call to
2581         createGraphicsLayer with a message to indicate we are making the layer that should
2582         get a tile cache.
2583         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
2584         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): needs to make
2585         sure the flattening layer is in the tree.
2586         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2587         (WebCore::RenderLayerBacking::updateInternalHierarchy):
2588         (WebCore::RenderLayerBacking::updateClippingLayers):
2589         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
2590         * rendering/RenderLayerBacking.h: rename m_clippingLayer to m_containmentLayer
2591         because it can now either be the clip or the tile cache flattener. Also
2592         a new state property used when creating the main graphics layer.
2593         (WebCore::RenderLayerBacking::hasClippingLayer):
2594         (WebCore::RenderLayerBacking::clippingLayer):
2595         (WebCore::RenderLayerBacking::parentForSublayers):
2596         (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer):
2597         (WebCore::RenderLayerBacking::tileCacheFlatteningLayer):
2598         (RenderLayerBacking):
2599
2600 2012-07-09  Christophe Dumez  <christophe.dumez@intel.com>
2601
2602         [EFL] Log significant Gamepad API-related events
2603         https://bugs.webkit.org/show_bug.cgi?id=90595
2604
2605         Reviewed by Antonio Gomes.
2606
2607         Log significant Gamepad API-related events in
2608         GamepadsEfl.
2609
2610         No new tests, no behavior change.
2611
2612         * platform/efl/GamepadsEfl.cpp:
2613         (WebCore::GamepadDeviceEfl::deviceFile):
2614         (GamepadDeviceEfl):
2615         (WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
2616         (WebCore::GamepadDeviceEfl::readCallback):
2617         (WebCore::GamepadsEfl::registerDevice):
2618         (WebCore::GamepadsEfl::unregisterDevice):
2619
2620 2012-07-09  Simon Fraser  <simon.fraser@apple.com>
2621
2622         Reduce the amount of flashing when falling into tiled layers
2623         https://bugs.webkit.org/show_bug.cgi?id=90808
2624
2625         Reviewed by Dean Jackson.
2626
2627         Implement +prefetchedTiles so that CATiledLayer renders more
2628         tiles at a time, reducing the appearance of flashing.
2629
2630         * platform/graphics/mac/WebTiledLayer.mm:
2631         (+[WebTiledLayer prefetchedTiles]):
2632
2633 2012-07-09  Leandro Gracia Gil  <leandrogracia@chromium.org>
2634
2635         SurroundingText should not advance character iterators if they are at end.
2636         https://bugs.webkit.org/show_bug.cgi?id=90560
2637
2638         Reviewed by Ryosuke Niwa.
2639
2640         CharacterIterator and BackwardsCharacterIterator try to advance their
2641         internal TextIterator without checking if they already are at end.
2642         This can cause crashes in TextIterator::advance.
2643
2644         Test: platform/chromium/editing/surrounding-text/surrounding-text.html
2645
2646         * editing/SurroundingText.cpp:
2647         (WebCore::SurroundingText::SurroundingText):
2648         (WebCore::SurroundingText::rangeFromContentOffsets):
2649
2650 2012-07-09  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2651
2652         [EFL] [WK2] Ecore errors from ecore_evas_screen_geometry_get()
2653         https://bugs.webkit.org/show_bug.cgi?id=90609
2654
2655         Reviewed by Daniel Bates.
2656
2657         Do not call ecore_evas_screen_geometry_get() if ecoreEvas is null.
2658
2659         No new tests. This patch doesn't change behavior.
2660
2661         * platform/efl/PlatformScreenEfl.cpp:
2662         (WebCore::screenRect): Early return if Evas is null.
2663
2664 2012-07-09  Alexandru Chiculita  <achicu@adobe.com>
2665
2666         [CSS Filters] Blur filter is not repainted correctly when applied on a parent of a fixed element
2667         https://bugs.webkit.org/show_bug.cgi?id=90087
2668
2669         Reviewed by Simon Fraser.
2670
2671         Added a new method, RenderLayer::hasAncestorWithFilterOutsets, to check that there's no filter with outsets (ie. blur) 
2672         applied on top level fixed positioned elements, nor any of its parent layers. In the event of a blur filter we need to
2673         disable the fast scrolling optimization, otherwise the outsets of the filter will be carried around the page and 
2674         repainting will not work correctly.
2675
2676         Tests: css3/filters/blur-filter-page-scroll-parents.html
2677                css3/filters/blur-filter-page-scroll-self.html
2678
2679         * page/FrameView.cpp:
2680         (WebCore::FrameView::scrollContentsFastPath):
2681         * rendering/RenderLayer.cpp:
2682         (WebCore):
2683         (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
2684         * rendering/RenderLayer.h:
2685         (RenderLayer):
2686
2687 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2688
2689         IndexedDB: Empty arrays shouldn't be valid key paths
2690         https://bugs.webkit.org/show_bug.cgi?id=90798
2691
2692         Reviewed by Tony Chang.
2693
2694         Other IDB implementations already enforce this although it is not yet in 
2695         the spec (see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17657). If an
2696         empty array is passed as the key path arg to IDBDatabase.createObjectStore()
2697         or IDBObjectStore.createIndex(), a SYNTAX_ERR DOMException is now thrown.
2698
2699         Test: storage/indexeddb/keypath-arrays.html
2700               storage/indexeddb/keypath-basics.html
2701
2702         * Modules/indexeddb/IDBKeyPath.cpp:
2703         (WebCore::IDBKeyPath::isValid): Test for empty array.
2704
2705 2012-07-09  Dana Jansens  <danakj@chromium.org>
2706
2707         [chromium] Create render surfaces on main thread only for the current frame
2708         https://bugs.webkit.org/show_bug.cgi?id=89793
2709
2710         Reviewed by Adrienne Walker.
2711
2712         Previously we would create render surfaces for animating layers
2713         in the main thread since these layers might have a surface on impl,
2714         in order to assist culling. This makes it very difficult to estimate
2715         how much texture memory is needed for RenderSurfaces on the main
2716         thread, in order to keep contents+surface memory below our limit.
2717
2718         Here we stop doing this, and create RenderSurfaces on both threads
2719         under the same conditions, so main thread has surfaces only if the
2720         layers in its current frame demand them. While this may reduce
2721         paint culling within an animating subtree, this seems like an edge
2722         case and knowing the amount of surface memory needed for the frame
2723         is important.
2724
2725         Animation tests in CCLayerTreeHostCommonTest used to verify that these
2726         layers got surfaces, so now no longer do. Creation of surfaces under
2727         other conditions is covered by other CCLayerTreeHostCommonTests.
2728
2729         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2730         (WebCore::subtreeShouldRenderToSeparateSurface):
2731
2732 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2733
2734         Mac build fix after r122116.
2735
2736         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2737
2738 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2739
2740         EFL build fix after r122115.
2741
2742         * html/HTMLPropertiesCollection.cpp:
2743         (WebCore::HTMLPropertiesCollection::create):
2744
2745 2012-07-09  Joshua Netterfield  <jnetterfield@rim.com>
2746         Make GC3D and E3D more maintainable for GLES platforms
2747         https://bugs.webkit.org/show_bug.cgi?id=90567
2748
2749         Reviewed by Rob Buis.
2750
2751         This patch cleans up code for WebGL on OpenGLES platforms which use 
2752         GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although
2753         GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL,
2754         GraphicsContext3DOpenGLCommon, and  GraphicsContext3DOpenGLES, this patch
2755         is an attempt to refactor this code in a way that will help BlackBerry and
2756         other teams support WebGL on mobile platforms with as little use of
2757         "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the
2758         separation of Extensions3DOpenGL into Extensions3DOpenGLCommon,
2759         Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction
2760         of OpenGLESShims.
2761
2762         This patch is created in large part by Jonathan Feldstein.
2763
2764         No new tests: no new behaviour.
2765
2766         * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build
2767         * Target.pri: Add new Extensions3DOpenGL* to WebGL builds
2768         * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function.
2769         (WebCore):
2770         * platform/graphics/OpenGLESShims.h: Added.
2771         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible
2772         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon
2773         (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports
2774         (WebCore):
2775         (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions
2776         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon
2777         (WebCore):
2778         (Extensions3DOpenGL):
2779         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added.
2780         (WebCore):
2781         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
2782         (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon):
2783         (WebCore::Extensions3DOpenGLCommon::supports):
2784         (WebCore::Extensions3DOpenGLCommon::ensureEnabled):
2785         (WebCore::Extensions3DOpenGLCommon::isEnabled):
2786         (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB):
2787         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does.
2788         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports
2789         * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
2790         (WebCore):
2791         (Extensions3DOpenGLCommon):
2792         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added.
2793         (WebCore):
2794         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
2795         (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES):
2796         (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG):
2797         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG):
2798         (WebCore::Extensions3DOpenGLES::createVertexArrayOES):
2799         (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES):
2800         (WebCore::Extensions3DOpenGLES::isVertexArrayOES):
2801         (WebCore::Extensions3DOpenGLES::bindVertexArrayOES):
2802         (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports
2803         (WebCore::Extensions3DOpenGLES::getExtensions):
2804         * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
2805         (WebCore):
2806         (Extensions3DOpenGLES):
2807         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2808         (WebCore::GraphicsContext3D::validateAttributes):
2809         (WebCore):
2810         (WebCore::GraphicsContext3D::renderbufferStorage):
2811         (WebCore::GraphicsContext3D::texImage2D):
2812         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
2813         (WebCore::GraphicsContext3D::getExtensions):
2814         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2815         (WebCore::GraphicsContext3D::validateDepthStencil):
2816         (WebCore::GraphicsContext3D::clear):
2817         (WebCore::GraphicsContext3D::isTexture):
2818         (WebCore):
2819         (WebCore::GraphicsContext3D::lineWidth):
2820         (WebCore::GraphicsContext3D::linkProgram):
2821         (WebCore::GraphicsContext3D::pixelStorei):
2822         (WebCore::GraphicsContext3D::polygonOffset):
2823         (WebCore::GraphicsContext3D::readPixels):
2824         (WebCore::GraphicsContext3D::deleteBuffer):
2825         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2826         (WebCore::GraphicsContext3D::releaseShaderCompiler):
2827         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2828         (WebCore::GraphicsContext3D::validateAttributes):
2829         (WebCore):
2830         (WebCore::GraphicsContext3D::getExtensions):
2831         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
2832         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2833         (WebCore):
2834         (WebCore::GraphicsContext3D::releaseShaderCompiler):
2835
2836 2012-07-02  Ryosuke Niwa  <rniwa@webkit.org>
2837
2838         Make HTMLCollection RefCounted
2839         https://bugs.webkit.org/show_bug.cgi?id=90414
2840
2841         Reviewed by Sam Weinig.
2842
2843         Make HTMLCollection ref counted and stop forwarding ref and deref to its owner (m_base)
2844         so as to align its life time management to that of DynamicNodeList.
2845
2846         After this patch, each HTMLCollection is owned by JSC/V8 and m_cachedCollections in ElementRareData
2847         and m_collection in Document merely hold raw pointers for the caching purpose. These raw pointers
2848         are cleared when each HTMLCollection is destructed via corresponding removeCachedHTMLCollection's.
2849
2850         In the destructor of HTMLCollection, we use the CollectionType to decide whether base() is an element
2851         or an document, and call the appropriate removeCachedHTMLCollection except for WindowNamedItems and
2852         DocumentNamedItems. For those two types, we need to know the atomic string name associated with
2853         the collection just like many DynamicNodeList to remove the cache, so we let HTMLNameCollection
2854         directly call removeWindowNamedItemCache and removeDocumentNamedItemCache. We'll cleanup this mess in
2855         a follow up patch using a nice class hierarchy and virtual destructors.
2856
2857         * accessibility/AccessibilityRenderObject.cpp:
2858         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2859         * bindings/js/JSDOMWindowCustom.cpp:
2860         (WebCore::namedItemGetter):
2861         * bindings/js/JSHTMLDocumentCustom.cpp:
2862         (WebCore::JSHTMLDocument::nameGetter):
2863         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2864         (WebCore::V8DOMWindow::namedPropertyGetter):
2865         * dom/Document.cpp:
2866         (WebCore::Document::Document):
2867         (WebCore::Document::openSearchDescriptionURL):
2868         (WebCore):
2869         (WebCore::Document::cachedCollection):
2870         (WebCore::Document::removeCachedHTMLCollection):
2871         (WebCore::Document::images):
2872         (WebCore::Document::applets):
2873         (WebCore::Document::embeds):
2874         (WebCore::Document::plugins):
2875         (WebCore::Document::objects):
2876         (WebCore::Document::scripts):
2877         (WebCore::Document::links):
2878         (WebCore::Document::forms):
2879         (WebCore::Document::anchors):
2880         (WebCore::Document::all):
2881         (WebCore::Document::windowNamedItems):
2882         (WebCore::Document::documentNamedItems):
2883         (WebCore::Document::removeWindowNamedItemCache):
2884         (WebCore::Document::removeDocumentNamedItemCache):
2885         * dom/Document.h:
2886         (Document):
2887         * dom/Element.cpp:
2888         (WebCore::Element::ensureCachedHTMLCollection):
2889         (WebCore::ElementRareData::ensureCachedHTMLCollection):
2890         (WebCore::Element::removeCachedHTMLCollection):
2891         (WebCore):
2892         * dom/Element.h:
2893         (Element):
2894         * dom/ElementRareData.h:
2895         (ElementRareData):
2896         (WebCore::ElementRareData::cachedHTMLCollection):
2897         (WebCore::ElementRareData::removeCachedHTMLCollection):
2898         * html/CollectionType.h:
2899         (WebCore): Since WindowNamedItems is not a part of UnnamedDocumentCachedType, we shouldn't addd 1.
2900         (WebCore::isUnnamedDocumentCachedType):
2901         (WebCore::isNodeCollectionType):
2902         * html/HTMLAllCollection.cpp:
2903         (WebCore::HTMLAllCollection::create):
2904         * html/HTMLAllCollection.h:
2905         (HTMLAllCollection):
2906         * html/HTMLCollection.cpp:
2907         (WebCore::HTMLCollection::create):
2908         (WebCore::HTMLCollection::~HTMLCollection):
2909         (WebCore::HTMLCollection::itemAfter):
2910         * html/HTMLCollection.h:
2911         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
2912         (HTMLCollection):
2913         (WebCore::HTMLCollection::base):
2914         * html/HTMLDataListElement.cpp:
2915         (WebCore::HTMLDataListElement::options):
2916         * html/HTMLDataListElement.h:
2917         (HTMLDataListElement):
2918         * html/HTMLElement.cpp:
2919         (WebCore::HTMLElement::children):
2920         (WebCore::HTMLElement::properties):
2921         * html/HTMLElement.h:
2922         (HTMLElement):
2923         * html/HTMLFieldSetElement.cpp:
2924         (WebCore::HTMLFieldSetElement::elements):
2925         * html/HTMLFieldSetElement.h:
2926         (HTMLFieldSetElement):
2927         * html/HTMLFormCollection.cpp:
2928         (WebCore::HTMLFormCollection::create):
2929         * html/HTMLFormCollection.h:
2930         (HTMLFormCollection):
2931         * html/HTMLFormElement.cpp:
2932         (WebCore::HTMLFormElement::elements):
2933         * html/HTMLFormElement.h:
2934         (HTMLFormElement):
2935         * html/HTMLMapElement.cpp:
2936         (WebCore::HTMLMapElement::imageElement):
2937         (WebCore::HTMLMapElement::areas):
2938         * html/HTMLMapElement.h:
2939         (HTMLMapElement):
2940         * html/HTMLNameCollection.cpp:
2941         (WebCore::HTMLNameCollection::HTMLNameCollection):
2942         (WebCore::HTMLNameCollection::~HTMLNameCollection):
2943         (WebCore):
2944         * html/HTMLNameCollection.h:
2945         (WebCore::HTMLNameCollection::create):
2946         (HTMLNameCollection):
2947         * html/HTMLOptionsCollection.cpp:
2948         (WebCore::HTMLOptionsCollection::create):
2949         * html/HTMLOptionsCollection.h:
2950         (HTMLOptionsCollection):
2951         * html/HTMLPropertiesCollection.h:
2952         (HTMLPropertiesCollection):
2953         * html/HTMLSelectElement.cpp:
2954         (WebCore::HTMLSelectElement::selectedOptions):
2955         (WebCore::HTMLSelectElement::options):
2956         * html/HTMLSelectElement.h:
2957         (HTMLSelectElement):
2958         * html/HTMLTableElement.cpp:
2959         (WebCore::HTMLTableElement::rows):
2960         (WebCore::HTMLTableElement::tBodies):
2961         * html/HTMLTableElement.h:
2962         (HTMLTableElement):
2963         * html/HTMLTableRowElement.cpp:
2964         (WebCore::HTMLTableRowElement::insertCell):
2965         (WebCore::HTMLTableRowElement::deleteCell):
2966         (WebCore::HTMLTableRowElement::cells):
2967         * html/HTMLTableRowElement.h:
2968         (HTMLTableRowElement):
2969         * html/HTMLTableRowsCollection.cpp:
2970         (WebCore::HTMLTableRowsCollection::create):
2971         * html/HTMLTableRowsCollection.h:
2972         (HTMLTableRowsCollection):
2973         * html/HTMLTableSectionElement.cpp:
2974         (WebCore::HTMLTableSectionElement::insertRow):
2975         (WebCore::HTMLTableSectionElement::deleteRow):
2976         (WebCore::HTMLTableSectionElement::rows):
2977         * html/HTMLTableSectionElement.h:
2978         (HTMLTableSectionElement):
2979
2980 2012-07-09  Pavel Feldman  <pfeldman@chromium.org>
2981
2982         Web Inspector: unindent line ending block upon { hit.
2983         https://bugs.webkit.org/show_bug.cgi?id=90795
2984
2985         Reviewed by Vsevolod Vlasov.
2986
2987         Added block-start / block-end markup into the highlighter.
2988
2989         * inspector/front-end/SourceCSSTokenizer.js:
2990         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
2991         * inspector/front-end/SourceCSSTokenizer.re2js:
2992         * inspector/front-end/SourceJavaScriptTokenizer.js:
2993         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
2994         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
2995         * inspector/front-end/TextEditor.js:
2996         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2997         (WebInspector.TextEditorMainPanel.prototype._unindentAfterBlock):
2998
2999 2012-07-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3000
3001         Unreviewed, rolling out r122107.
3002         http://trac.webkit.org/changeset/122107
3003         https://bugs.webkit.org/show_bug.cgi?id=90794
3004
3005         Build failure on Mac debug bots (Requested by falken_ on
3006         #webkit).
3007
3008         * CMakeLists.txt:
3009         * Configurations/FeatureDefines.xcconfig:
3010         * DerivedSources.cpp:
3011         * DerivedSources.make:
3012         * DerivedSources.pri:
3013         * Target.pri:
3014         * WebCore.gypi:
3015         * WebCore.xcodeproj/project.pbxproj:
3016         * bindings/generic/RuntimeEnabledFeatures.cpp:
3017         (WebCore):
3018         * bindings/generic/RuntimeEnabledFeatures.h:
3019         (RuntimeEnabledFeatures):
3020         * dom/ContextFeatures.cpp:
3021         * dom/ContextFeatures.h:
3022         * html/HTMLDialogElement.cpp: Removed.
3023         * html/HTMLDialogElement.h: Removed.
3024         * html/HTMLDialogElement.idl: Removed.
3025         * html/HTMLElementsAllInOne.cpp:
3026         * html/HTMLTagNames.in:
3027         * page/DOMWindow.idl:
3028
3029 2012-07-09  Andrei Onea  <onea@adobe.com>
3030
3031         [CSSRegions] Rename NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent
3032         https://bugs.webkit.org/show_bug.cgi?id=90759
3033
3034         Reviewed by Andreas Kling.
3035
3036         Renamed NamedFlow::getRegionsByContentNode to NamedFlow::getRegionsByContent as per CSS Regions spec:
3037         http://www.w3.org/TR/css3-regions/#dom-named-flow
3038
3039         Tests: fast/regions/get-regions-by-content-horiz-bt.html
3040                fast/regions/get-regions-by-content-horiz-tb.html
3041                fast/regions/get-regions-by-content-vert-lr.html
3042                fast/regions/get-regions-by-content-vert-rl.html
3043                fast/regions/get-regions-by-content.html
3044                fast/regions/get-regions-by-content2.html
3045
3046         * dom/WebKitNamedFlow.cpp:
3047         (WebCore::WebKitNamedFlow::getRegionsByContent):
3048         * dom/WebKitNamedFlow.h:
3049         (WebKitNamedFlow):
3050         * dom/WebKitNamedFlow.idl:
3051
3052 2012-07-09  Matt Falkenhagen  <falken@chromium.org>
3053
3054         Add ENABLE_DIALOG_ELEMENT and skeleton files
3055         https://bugs.webkit.org/show_bug.cgi?id=90521
3056
3057         Reviewed by Kent Tamura.
3058
3059         This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added.
3060         The feature is diabled by default.
3061
3062         No new tests, as there is no behavior change.
3063
3064         * CMakeLists.txt:
3065         * Configurations/FeatureDefines.xcconfig:
3066         * DerivedSources.cpp:
3067         * DerivedSources.make:
3068         * DerivedSources.pri:
3069         * Target.pri:
3070         * WebCore.gypi:
3071         * WebCore.xcodeproj/project.pbxproj:
3072         * bindings/generic/RuntimeEnabledFeatures.cpp:
3073         (WebCore):
3074         * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog.
3075         (RuntimeEnabledFeatures):
3076         (WebCore::RuntimeEnabledFeatures::dialogElementEnabled):
3077         (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled):
3078         * dom/ContextFeatures.cpp:
3079         (WebCore::ContextFeatures::dialogElementEnabled):
3080         (WebCore):
3081         * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off.
3082         * html/HTMLDialogElement.cpp: Added.
3083         (WebCore):
3084         (WebCore::HTMLDialogElement::HTMLDialogElement):
3085         (WebCore::HTMLDialogElement::create):
3086         (WebCore::HTMLDialogElement::close):
3087         (WebCore::HTMLDialogElement::show):
3088         * html/HTMLDialogElement.h: Added.
3089         (WebCore):
3090         (HTMLDialogElement):
3091         * html/HTMLDialogElement.idl: Added.
3092         * html/HTMLElementsAllInOne.cpp:
3093         * html/HTMLTagNames.in:
3094         * page/DOMWindow.idl:
3095
3096 2012-07-09  Pavel Feldman  <pfeldman@chromium.org>
3097
3098         Web Inspector: inspector does not reflect newly created text nodes from contenteditable
3099         https://bugs.webkit.org/show_bug.cgi?id=90779
3100
3101         Reviewed by Vsevolod Vlasov.
3102
3103         We need to report first text node as inserted, otherwise we fail to report character data modified on it.
3104
3105         * inspector/InspectorDOMAgent.cpp:
3106         (WebCore::InspectorDOMAgent::characterDataModified):
3107
3108 2012-07-09  Andrey Kosyakov  <caseq@chromium.org>
3109
3110         REGRESSION(r121980) Layout Test inspector/timeline/timeline-frames.html started to crash.
3111         https://bugs.webkit.org/show_bug.cgi?id=90747
3112
3113         Reviewed by Pavel Feldman.
3114
3115         - consider didCancelFrame() call normal if there is no pending frame, remove assertion;
3116         - always set empty data object for frame records;
3117
3118         * inspector/InspectorTimelineAgent.cpp:
3119         (WebCore::InspectorTimelineAgent::didCancelFrame):
3120         (WebCore::InspectorTimelineAgent::commitFrameRecord):
3121
3122 2012-07-09  Taiju Tsuiki  <tzik@chromium.org>
3123
3124         Web Inspector: Add FileContentView for FileSystemView
3125         https://bugs.webkit.org/show_bug.cgi?id=90529
3126
3127         Adding FileContentView to Inspector.
3128         This class provides preview of text files in FileSystem.
3129
3130         Reviewed by Vsevolod Vlasov.
3131
3132         * WebCore.gypi:
3133         * WebCore.vcproj/WebCore.vcproj:
3134         * inspector/compile-front-end.py:
3135         * inspector/front-end/FileContentView.js: Added.
3136         * inspector/front-end/FileSystemView.js:
3137         (WebInspector.FileSystemView.prototype.get visibleView):
3138         (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
3139         (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
3140         (WebInspector.FileSystemView.EntryTreeElement.prototype.refresh):
3141         * inspector/front-end/WebKit.qrc:
3142         * inspector/front-end/inspector.html:
3143
3144 2012-07-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3145
3146         [SOUP] Use soup_cookie_jar_is_persistent() to set whether cookie is a session one or not
3147         https://bugs.webkit.org/show_bug.cgi?id=90769
3148
3149         Reviewed by Gustavo Noronha Silva.
3150
3151         It's currently set to false, because there were no API to know
3152         whether cookies were persistent or not. Now that we bumped libsoup
3153         requirements, we can use soup_cookie_jar_is_persistent().
3154
3155         * platform/network/soup/CookieJarSoup.cpp:
3156         (WebCore::getRawCookies):
3157
3158 2012-07-09  Taiju Tsuiki  <tzik@chromium.org>
3159
3160         Web Inspector: Add text file support for FileSystemAgent::requestFileContent
3161         https://bugs.webkit.org/show_bug.cgi?id=90439
3162
3163         Reviewed by Vsevolod Vlasov.
3164
3165         * inspector/Inspector.json:
3166         * inspector/InspectorFileSystemAgent.cpp:
3167         (WebCore):
3168         (WebCore::InspectorFileSystemAgent::requestFileContent):
3169         * inspector/InspectorFileSystemAgent.h:
3170         (InspectorFileSystemAgent):
3171         * inspector/front-end/FileSystemModel.js:
3172         (WebInspector.FileSystemModel.prototype.requestFileContent):
3173         (WebInspector.FileSystemModel.File.prototype.requestFileContent):
3174         (WebInspector.FileSystemRequestManager.prototype._fileContentReceived):
3175         (WebInspector.FileSystemDispatcher.prototype.fileContentReceived):
3176
3177 2012-07-09  MORITA Hajime  <morrita@google.com>
3178
3179         [Chromium] ContextFeaturesClient::isEnabled is slow
3180         https://bugs.webkit.org/show_bug.cgi?id=90367
3181
3182         Reviewed by Kent Tamura.
3183
3184         * dom/ContextFeatures.h:
3185         (WebCore::ContextFeaturesClient::urlDidChange): Added.
3186         (WebCore::ContextFeatures::urlDidChange): Added.
3187         (WebCore):
3188         * dom/Document.cpp:
3189         (WebCore::Document::setURL): Added an urlDidChange() call.
3190
3191 2012-07-09  Andrei Onea  <onea@adobe.com>
3192
3193         [CSSRegions] Implement NamedFlow::firstEmptyRegionIndex attribute
3194         https://bugs.webkit.org/show_bug.cgi?id=90608
3195
3196         Reviewed by Andreas Kling.
3197
3198         Implemented NamedFlow::firstEmptyRegionIndex as per spec: http://www.w3.org/TR/css3-regions/#dom-named-flow
3199
3200         Test: fast/regions/webkit-named-flow-first-empty-region-index.html
3201
3202         * dom/WebKitNamedFlow.cpp:
3203         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
3204         (WebCore):
3205         * dom/WebKitNamedFlow.h:
3206         (WebKitNamedFlow):
3207         * dom/WebKitNamedFlow.idl:
3208
3209 2012-07-08  Yoshifumi Inoue  <yosin@chromium.org>
3210
3211         [Platform-Mac] Derive LocaleMac.{cpp,h} and LocalizedDateMac.cpp from LocaleWin
3212         https://bugs.webkit.org/show_bug.cgi?id=90752
3213
3214         Reviewed by Kent Tamura.
3215
3216         This patch is preparation of introducing LocaleMac class for localize date form.
3217         This patch copies LocaleWin and LocalizedDateWin.cpp as below:
3218          - LocaleMac.h from LocaleWin.h
3219          - LocaleMac.mm from LocaliedDateMac.mm
3220          - LocaliedDateMac.cpp from LocalizedDateWin.cpp
3221
3222         Due by git, diffs are appeared as new thing. I'll do svn copy at landing time.
3223
3224         No new tests. This patch doesn't change behavior.
3225
3226         * platform/text/mac/LocaleMac.h: Copied from platform/text/LocaleWin.h
3227         * platform/text/mac/LocaleMac.mm: Copied from platform/text/mac/LocalizedDateMac.mm
3228         * platform/text/mac/LocalizedDateMac.cpp: Copied from platform/text/LocalizedDateWin.cpp
3229
3230 2012-07-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3231
3232         Introduce a build flag for low quality JPEG images
3233         https://bugs.webkit.org/show_bug.cgi?id=90748
3234
3235         Reviewed by Adam Barth.
3236
3237         Introduce build options for no JPEG dithering (USE(LOW_QUALITY_IMAGE_NO_JPEG_DITHERING))
3238         and no JPEG fancy upsampling (USE(LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING)).
3239
3240         No new tests as there is no change in functionality.
3241
3242         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3243         (ditherMode):
3244         (doFancyUpsampling):
3245
3246 2012-07-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3247
3248         Unreviewed, rolling out r121968.
3249         http://trac.webkit.org/changeset/121968
3250         https://bugs.webkit.org/show_bug.cgi?id=90749
3251
3252         Caused a link error on chromium Win dbg. (Requested by hayato
3253         on #webkit).
3254
3255         * inspector/InspectorMemoryAgent.cpp:
3256         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
3257         * inspector/front-end/NativeMemorySnapshotView.js:
3258         (WebInspector.MemoryBlockViewProperties._initialize):
3259         * platform/MemoryUsageSupport.cpp:
3260         * platform/MemoryUsageSupport.h:
3261         (MemoryUsageSupport):
3262         * platform/chromium/MemoryUsageSupportChromium.cpp:
3263
3264 2012-07-08  Mary Wu  <mary.wu@torchmobile.com.cn>
3265
3266         [BlackBerry] Make setForceDownload a setter method.
3267         https://bugs.webkit.org/show_bug.cgi?id=90591
3268
3269         Reviewed by Rob Buis.
3270
3271         * platform/network/blackberry/ResourceRequest.h:
3272         (WebCore::ResourceRequest::setForceDownload):
3273
3274 2012-07-05  MORITA Hajime  <morrita@google.com>
3275
3276         Heap-use-after-free in WebCore::RenderObject::destroyAndCleanupAnonymousWrappers
3277         https://bugs.webkit.org/show_bug.cgi?id=90480
3278
3279         Reviewed by Kent Tamura.
3280
3281         If <select> has any insertion point, the attachment phase
3282         unpextedly creates a renderer for distributed node and added to
3283         the renderer of the <select>, which breaks an assumption and
3284         results the crash.
3285
3286         This change tighten the childShouldCreateRenderer() to forbid
3287         child renderers even from distributed nodes.
3288
3289         There is an exception as always: ValidationMessage can create a
3290         ShadowRoot to <select>, which generates usually-forbidden child
3291         renderers.  This change introduces HTMLFormControlElement::validationMessageContains()
3292         to let these renderers in.
3293
3294         Test: fast/dom/shadow/insertion-point-list-menu-crash.html
3295
3296         * html/HTMLFormControlElement.cpp:
3297         (WebCore::HTMLFormControlElement::validationMessageContains):
3298         (WebCore):
3299         * html/HTMLFormControlElement.h:
3300         (HTMLFormControlElement):
3301         * html/HTMLSelectElement.cpp:
3302         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
3303         * html/ValidationMessage.cpp:
3304         (WebCore::ValidationMessage::contains):
3305         (WebCore):
3306         * html/ValidationMessage.h:
3307         (WebCore):
3308         (ValidationMessage):
3309
3310 2012-07-07  Kwang Yul Seo  <skyul@company100.net>
3311
3312         Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
3313         https://bugs.webkit.org/show_bug.cgi?id=90726
3314
3315         Reviewed by Adam Barth.
3316
3317         HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently,
3318         m_lastScriptElementStartPosition is used to store the text position in
3319         "script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition
3320         later in "script" end tag. Because HTMLTreeBuilder handles one script tag at
3321         a time, we can store the text position directly to m_scriptToProcessStartPosition
3322         in "script" start tag.
3323
3324         No behavior change, so no new tests.
3325
3326         * html/parser/HTMLTreeBuilder.cpp:
3327         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3328         (WebCore::HTMLTreeBuilder::processEndTag):
3329         (WebCore::HTMLTreeBuilder::processScriptStartTag):
3330         * html/parser/HTMLTreeBuilder.h:
3331         (HTMLTreeBuilder):
3332
3333 2012-07-08  Philip Rogers  <pdr@google.com>
3334
3335         Refactor RenderSVGShape to not contain fallback code
3336         https://bugs.webkit.org/show_bug.cgi?id=90514
3337
3338         Reviewed by Nikolas Zimmermann.
3339
3340         The interaction between RenderSVGShape and {RenderSVGEllipse, RenderSVGRect}
3341         was too coupled and it was not clear when a path existed or who controlled
3342         falling back to path codepaths in RenderSVGShape.
3343
3344         This patch cleans up RenderSVGShape so that it does not track fallback state
3345         and does not have special handling for creating a shape in strokeContains. Because
3346         some functions of RenderSVGShape can be called without a path existing, each
3347         of these functions has switched to using the path() function which asserts that
3348         a path exists.
3349
3350         There is only one remaining use of hasPath() in RenderSVGShape which I plan
3351         to remove in a followup patch.
3352
3353         This patch also cleans up RenderSVGRect and RenderSVGEllipse. These classes
3354         now handle fallback tracking themselves and choose when to use their optimized
3355         strokeContains codepaths.
3356
3357         No new tests as this is just a refactoring.
3358
3359         * rendering/svg/RenderSVGEllipse.cpp:
3360         (WebCore::RenderSVGEllipse::RenderSVGEllipse):
3361         (WebCore::RenderSVGEllipse::createShape):
3362         (WebCore::RenderSVGEllipse::objectBoundingBox):
3363         (WebCore::RenderSVGEllipse::strokeBoundingBox):
3364         (WebCore::RenderSVGEllipse::fillShape):
3365         (WebCore::RenderSVGEllipse::strokeShape):
3366         (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
3367         (WebCore::RenderSVGEllipse::shapeDependentFillContains):
3368         * rendering/svg/RenderSVGEllipse.h:
3369         (WebCore::RenderSVGEllipse::isEmpty):
3370         (RenderSVGEllipse):
3371         * rendering/svg/RenderSVGRect.cpp:
3372         (WebCore::RenderSVGRect::RenderSVGRect):
3373         (WebCore::RenderSVGRect::createShape):
3374         (WebCore::RenderSVGRect::objectBoundingBox):
3375         (WebCore::RenderSVGRect::strokeBoundingBox):
3376         (WebCore::RenderSVGRect::fillShape):
3377         (WebCore::RenderSVGRect::strokeShape):
3378         (WebCore::RenderSVGRect::shapeDependentStrokeContains):
3379         (WebCore::RenderSVGRect::shapeDependentFillContains):
3380         * rendering/svg/RenderSVGRect.h:
3381         (WebCore::RenderSVGRect::isEmpty):
3382         (RenderSVGRect):
3383         * rendering/svg/RenderSVGShape.cpp:
3384         (WebCore::RenderSVGShape::RenderSVGShape):
3385         (WebCore::RenderSVGShape::createShape):
3386         (WebCore::RenderSVGShape::isEmpty):
3387         (WebCore::RenderSVGShape::objectBoundingBox):
3388         (WebCore::RenderSVGShape::shapeDependentStrokeContains):
3389         (WebCore::RenderSVGShape::shapeDependentFillContains):
3390         (WebCore::RenderSVGShape::strokeContains):
3391         (WebCore::RenderSVGShape::layout):
3392         (WebCore::RenderSVGShape::hasSmoothStroke):
3393         (WebCore):
3394         * rendering/svg/RenderSVGShape.h:
3395         (RenderSVGShape):
3396
3397 2012-07-08  Kinuko Yasuda  <kinuko@chromium.org>
3398
3399         XHR.send should support ArrayBufferView
3400         https://bugs.webkit.org/show_bug.cgi?id=90536
3401
3402         XHR.send should support ArrayBufferView according to the latest draft
3403         and also eventually deprecate ArrayBuffer.
3404         Spec: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-send
3405
3406         Reviewed by Kenneth Russell.
3407
3408         Test: http/tests/xmlhttprequest/send-array-buffer.html
3409               http/tests/xmlhttprequest/send-data-view.html
3410
3411         * bindings/js/JSXMLHttpRequestCustom.cpp:
3412         (WebCore::JSXMLHttpRequest::send):
3413         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3414         (WebCore::V8XMLHttpRequest::sendCallback):
3415         * xml/XMLHttpRequest.cpp:
3416         (WebCore):
3417         (WebCore::XMLHttpRequest::send):
3418         * xml/XMLHttpRequest.h:
3419         (XMLHttpRequest):
3420         * xml/XMLHttpRequest.idl:
3421
3422 2012-07-08  Vivek Galatage  <vivekgalatage@gmail.com>
3423
3424         Web Inspector: CodeGeneratorInspector.py should not generate statements with no effect
3425         https://bugs.webkit.org/show_bug.cgi?id=90697
3426
3427         Reviewed by Vsevolod Vlasov.
3428
3429         Fix to remove the statements with no effect. The check for errors is added only when some valid
3430         statements exist.
3431
3432         No new tests as generator related patch.
3433
3434         * inspector/CodeGeneratorInspector.py:
3435         (Generator.process_command):
3436
3437 2012-07-06  Lauro Neto  <lauro.neto@openbossa.org>
3438
3439         [Qt] Avoid deep copy of QImage in GraphicsContext3D::getImageData()
3440         https://bugs.webkit.org/show_bug.cgi?id=90705
3441
3442         Reviewed by Noam Rosenthal.
3443
3444         Use QImage.constBits() as argument to packPixels instead of bits() to avoid
3445         deep copying it.
3446
3447         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3448         (WebCore::GraphicsContext3D::getImageData):
3449
3450 2012-07-06  Andy Estes  <aestes@apple.com>
3451
3452         Fix errors reported by generate-bindings.pl after r121882.
3453
3454         * DerivedSources.make: Specify the correct path for notifications idl
3455         files now that notifications/ lives in WebCore/Modules/.
3456
3457 2012-07-06  Justin Novosad  <junov@chromium.org>
3458
3459         Drawing to accelerated 2D canvas causes compositor to recompute layer tree
3460         https://bugs.webkit.org/show_bug.cgi?id=90630
3461
3462         Reviewed by Simon Fraser.
3463
3464         No new tests: covered by existing canvas/compositing layout tests
3465
3466         Before this change, there was no distinction between canvas changes
3467         that require recomputing the compositor tree and canvas changes that
3468         only require re-display. The new CanvasPixelsChanged member of enum
3469         ContentChangeType requests re-display without re-layout.
3470
3471         * html/canvas/CanvasRenderingContext2D.cpp:
3472         (WebCore::CanvasRenderingContext2D::didDraw):
3473         * rendering/RenderBoxModelObject.h:
3474         * rendering/RenderLayerBacking.cpp:
3475         (WebCore::RenderLayerBacking::contentChanged):
3476
3477 2012-07-06  Pavel Feldman  <pfeldman@chromium.org>
3478
3479         Web Inspector: get rid of this._lastMarkedRange in TextEditor.
3480         https://bugs.webkit.org/show_bug.cgi?id=90691
3481
3482         Reviewed by Vsevolod Vlasov.
3483
3484         We don't need it, should use setSelection instead.
3485
3486         * inspector/front-end/TextEditor.js:
3487         (WebInspector.TextEditor.prototype.markAndRevealRange):
3488         (WebInspector.TextEditor.prototype._handleSelectionChange):
3489         (WebInspector.TextEditor.prototype.setSelection):
3490         (WebInspector.TextEditor.prototype._handleFocused):
3491
3492 2012-07-06  Vsevolod Vlasov  <vsevik@chromium.org>
3493
3494         Web Inspector: Snippet renaming behavior is not correct.
3495         https://bugs.webkit.org/show_bug.cgi?id=90689
3496
3497         Reviewed by Pavel Feldman.
3498
3499         Navigator overlay is now not closed when editing is canceled.
3500         Esc handler in NavigatorOverlayController is not installed as a shortcut anymore since
3501         it should not be called until all underlying DOM elements handled the key down event.