2011-01-21 Dimitri Glazkov <dglazkov@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-21  Dimitri Glazkov  <dglazkov@chromium.org>
2
3         Reviewed by Darin Adler.
4
5         REGRESSION(r73618): Clicking on a search input causes a crash.
6         https://bugs.webkit.org/show_bug.cgi?id=52905
7
8         The problem is caused by TextControlInnerElement being used both as
9         shadow root and an element in a shadow subtree. The code assumed it is
10         only used as a shadow root.
11
12         Since this code is all just workaround for in-progress conversion to
13         new shadow DOM, I am just adding a check. This code will disappear
14         completely once bug 52788 is fixed.
15
16         Test: fast/dom/search-shadow-host-crash.html
17
18         * dom/Node.cpp:
19         (WebCore::Node::setShadowHost): Added an ASSERT for early detection
20             of attempting to stomp on the parentNode.
21         * rendering/TextControlInnerElements.cpp:
22         (WebCore::TextControlInnerElement::detach): Added a check to only
23             clear shadow host if we have one.
24
25 2011-01-21  Adam Roben  <aroben@apple.com>
26
27         Replace some "sync compositing state" terminology with "flush pending GraphicsLayer changes"
28
29         This seems to be the direction in which our code is moving. I chose "GraphicsLayer" as
30         opposed to just "layer" because there are cases where we flush changes to CACFLayers that
31         don't have a corresponding GraphicsLayer.
32
33         Fixes <http://webkit.org/b/52894> "Sync compositing state" terminology in
34         WKCACFLayerRenderer and friends is confusing
35
36         Reviewed by Simon Fraser.
37
38         * platform/graphics/win/WKCACFLayerRenderer.cpp:
39         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer):
40         (WebCore::WKCACFLayerRenderer::render):
41         Updated for renames.
42
43         (WebCore::WKCACFLayerRenderer::flushPendingGraphicsLayerChangesSoon): Renamed from
44         syncCompositingStateSoon, and updated for other renames.
45
46         * platform/graphics/win/WKCACFLayerRenderer.h: Renamed m_syncLayerChanges to
47         * m_shouldFlushPendingGraphicsLayerChanges.
48         (WebCore::WKCACFLayerRendererClient::flushPendingGraphicsLayerChanges): Renamed from
49         syncCompositingState.
50
51 2011-01-21  Adam Roben  <aroben@apple.com>
52
53         Clean up PlatformCAAnimationWin
54
55         Fixes <http://webkit.org/b/52904> PlatformCAAnimationWin is leaky and inefficient
56
57         Reviewed by Simon Fraser.
58
59         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
60         (toCACFFillModeType):
61         (fromCACFFillModeType):
62         (toCACFValueFunctionType):
63         (fromCACFValueFunctionType):
64         Changed to take and return CFStringRefs. There's no need to convert to WebCore::String just
65         so we can later convert back to CFStringRef.
66
67         (toCACFTimingFunction): Fixed leaks by changing this to return a RetainPtr and adopting the
68         results of CACFTimingFunctionCreate.
69         (PlatformCAAnimation::PlatformCAAnimation): Changed not to needlessly roundtrip through
70         WebCore::String. Also changed an ASSERT(0) to ASSERT_NOT_REACHED().
71
72         (PlatformCAAnimation::setFillMode):
73         (PlatformCAAnimation::setTimingFunction):
74         (PlatformCAAnimation::setValueFunction):
75         (PlatformCAAnimation::setTimingFunctions):
76         Updated for changes to the above conversion functions.
77
78 2011-01-21  Charlie Reis  <creis@chromium.org>
79
80         Reviewed by Darin Fisher.
81
82         FrameLoader::checkLoadCompleteForThisFrame uses wrong history item
83         https://bugs.webkit.org/show_bug.cgi?id=48812
84
85         Most calls to stopAllLoaders now clear the history's provisional item(s).
86         We can now avoid resetting the back/forward state if a new navigation
87         is in progress.
88
89         Test: http/tests/navigation/back-twice-without-commit.html
90         Test: http/tests/navigation/forward-and-cancel.html
91
92         * loader/FrameLoader.cpp:
93         * loader/FrameLoader.h:
94         * loader/FrameLoaderTypes.h:
95         * WebCore.exp.in: Update stopAllLoaders signature.
96
97 2011-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
98
99         Reviewed by Martin Robinson.
100
101         [GTK] Show caps lock indicator in password fields
102         https://bugs.webkit.org/show_bug.cgi?id=52878
103
104         Test: manual-tests/password-caps-lock.html
105
106         * platform/gtk/KeyEventGtk.cpp:
107         (WebCore::PlatformKeyboardEvent::currentCapsLockState): Implement
108         currentCapsLockState() using GDK API.
109         * platform/gtk/RenderThemeGtk.cpp:
110         (WebCore::RenderThemeGtk::paintCapsLockIndicator): Paint an icon
111         in the password field when the caps lock modifier is locked.
112         * platform/gtk/RenderThemeGtk.h:
113
114 2011-01-21  Pavel Podivilov  <podivilov@chromium.org>
115
116         Reviewed by Pavel Feldman.
117
118         Web Inspector: move sticky breakpoints management from InspectorController to InspectorBrowserDebuggerAgent.
119         https://bugs.webkit.org/show_bug.cgi?id=52874
120
121         This is the first step of debugger api refactoring (see bug 52879).
122         JavaScript breakpoints are still in the same list as native breakpoints and are restored by InspectorBrowserDebuggerAgent.
123         The second step will be to move sticky JavaScript breakpoints to InspectorDebuggerAgent.
124
125         * inspector/Inspector.idl:
126         * inspector/InspectorBrowserDebuggerAgent.cpp:
127         (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
128         (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
129         (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
130         (WebCore::InspectorBrowserDebuggerAgent::discardBindings):
131         (WebCore::InspectorBrowserDebuggerAgent::didInsertDOMNode):
132         (WebCore::InspectorBrowserDebuggerAgent::didRemoveDOMNode):
133         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
134         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
135         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
136         (WebCore::InspectorBrowserDebuggerAgent::hasBreakpoint):
137         (WebCore::InspectorBrowserDebuggerAgent::updateSubtreeBreakpoints):
138         * inspector/InspectorBrowserDebuggerAgent.h:
139         * inspector/InspectorController.cpp:
140         (WebCore::InspectorController::restoreInspectorStateFromCookie):
141         (WebCore::InspectorController::connectFrontend):
142         (WebCore::InspectorController::didCommitLoad):
143         (WebCore::InspectorController::enableDebugger):
144         (WebCore::InspectorController::resume):
145         (WebCore::InspectorController::inspectedURL):
146         * inspector/InspectorController.h:
147         * inspector/InspectorState.cpp:
148         (WebCore::InspectorState::InspectorState):
149         * inspector/InspectorState.h:
150         * inspector/front-end/BreakpointManager.js:
151         (WebInspector.BreakpointManager):
152         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
153
154 2011-01-21  John Knottenbelt  <jknotten@chromium.org>
155
156         Reviewed by Jeremy Orlow.
157
158         Turn off uninitialized errors for ARM linux build.
159         https://bugs.webkit.org/show_bug.cgi?id=52893
160
161         Fix ARM compiler breakage.
162
163         * WebCore.gyp/WebCore.gyp:
164
165 2011-01-21  Mikhail Naganov  <mnaganov@chromium.org>
166
167         Reviewed by Yury Semikhatsky.
168
169         Web Inspector: [Chromium] REGRESSION: Using the "Back" button
170         while profiling causes renderer crash.
171
172         https://bugs.webkit.org/show_bug.cgi?id=52808
173
174         * inspector/InspectorProfilerAgent.cpp:
175         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
176         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
177
178 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
179
180         Reviewed by Pavel Feldman.
181
182         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
183
184         There are some places in WebCore where we still using direct InspectorController calls.
185         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
186         Inspector facade for WebCore.
187
188         https://bugs.webkit.org/show_bug.cgi?id=52869
189
190         * inspector/InspectorController.cpp:
191         * inspector/InspectorController.h:
192         * inspector/InspectorInstrumentation.cpp:
193         (WebCore::InspectorInstrumentation::addProfileImpl):
194         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
195         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
196         * inspector/InspectorInstrumentation.h:
197         (WebCore::InspectorInstrumentation::addProfile):
198         (WebCore::InspectorInstrumentation::profilerEnabled):
199         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
200         * page/Console.cpp:
201         (WebCore::Console::profile):
202         (WebCore::Console::profileEnd):
203
204 2011-01-12  Pavel Podivilov  <podivilov@chromium.org>
205
206         Reviewed by Pavel Feldman.
207
208         Web Inspector: breakpoints are restored incorrectly when reverting live edit.
209         https://bugs.webkit.org/show_bug.cgi?id=52300
210
211         Fix breakpoints restoring when reverting to old revision by using text diff.
212         Move live edit logic from ScriptsPanel to DebuggerModel.
213         Eliminate unnecessary editLine delegate in TextViewer.
214
215         * inspector/front-end/DebuggerModel.js:
216         (WebInspector.DebuggerModel):
217         (WebInspector.DebuggerModel.prototype.reset):
218         (WebInspector.DebuggerModel.prototype.editScriptSource):
219         (WebInspector.DebuggerModel.prototype._updateScriptSource):
220         (WebInspector.DebuggerModel.prototype.get callFrames):
221         (WebInspector.DebuggerModel.prototype.pausedScript):
222         (WebInspector.DebuggerModel.prototype.resumedScript):
223         * inspector/front-end/Script.js:
224         (WebInspector.Script.prototype.get source):
225         * inspector/front-end/ScriptView.js:
226         (WebInspector.ScriptView):
227         * inspector/front-end/ScriptsPanel.js:
228         (WebInspector.ScriptsPanel):
229         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
230         * inspector/front-end/SourceFrame.js:
231         (WebInspector.SourceFrame):
232         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
233         (WebInspector.SourceFrame.prototype._doubleClick.didEditLine):
234         (WebInspector.SourceFrame.prototype._doubleClick):
235         * inspector/front-end/SourceView.js:
236         (WebInspector.SourceView):
237         * inspector/front-end/TextViewer.js:
238         (WebInspector.TextViewer):
239         (WebInspector.TextViewer.prototype._handleKeyDown):
240         (WebInspector.TextViewer.prototype.editLine.finishEditing):
241         (WebInspector.TextViewer.prototype.editLine):
242         (WebInspector.TextChunk.prototype._createRow):
243
244 2011-01-21  Adam Klein  <adamk@chromium.org>
245
246         Reviewed by Eric Seidel.
247
248         [chromium] Rename ChromiumBridge to PlatformBridge
249         https://bugs.webkit.org/show_bug.cgi?id=52471
250
251         No tests added as this is a rename; no change in behavior.
252
253         * WebCore.gypi:
254         * bindings/v8/V8DOMWindowShell.cpp:
255         (WebCore::reportFatalErrorInV8):
256         * page/PageGroup.cpp:
257         (WebCore::PageGroup::isLinkVisited):
258         * platform/android/PlatformBridge.h:
259         * platform/audio/chromium/AudioBusChromium.cpp:
260         (WebCore::createBusFromInMemoryAudioFile):
261         * platform/chromium/ChromiumBridge.h: Removed.
262         * platform/chromium/ChromiumDataObjectLegacy.cpp:
263         (WebCore::ChromiumDataObjectLegacy::getData):
264         * platform/chromium/DragDataChromium.cpp:
265         (WebCore::DragData::asURL):
266         * platform/chromium/FileSystemChromium.cpp:
267         (WebCore::deleteFile):
268         (WebCore::deleteEmptyDirectory):
269         (WebCore::getFileSize):
270         (WebCore::getFileModificationTime):
271         (WebCore::revealFolderInOS):
272         (WebCore::directoryName):
273         (WebCore::pathByAppendingComponent):
274         (WebCore::makeAllDirectories):
275         (WebCore::fileExists):
276         (WebCore::openFile):
277         (WebCore::closeFile):
278         (WebCore::seekFile):
279         (WebCore::truncateFile):
280         (WebCore::readFromFile):
281         (WebCore::writeToFile):
282         * platform/chromium/LanguageChromium.cpp:
283         (WebCore::platformDefaultLanguage):
284         * platform/chromium/LinkHashChromium.cpp:
285         (WebCore::visitedLinkHash):
286         * platform/chromium/MIMETypeRegistryChromium.cpp:
287         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
288         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
289         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
290         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
291         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
292         * platform/chromium/PasteboardChromium.cpp:
293         (WebCore::Pasteboard::writeSelection):
294         (WebCore::Pasteboard::writePlainText):
295         (WebCore::Pasteboard::writeURL):
296         (WebCore::Pasteboard::writeImage):
297         (WebCore::Pasteboard::canSmartReplace):
298         (WebCore::Pasteboard::plainText):
299         (WebCore::Pasteboard::documentFragment):
300         * platform/chromium/PlatformBridge.h:
301         * platform/chromium/PlatformScreenChromium.cpp:
302         (WebCore::screenDepth):
303         (WebCore::screenDepthPerComponent):
304         (WebCore::screenIsMonochrome):
305         (WebCore::screenRect):
306         (WebCore::screenAvailableRect):
307         * platform/chromium/ReadableDataObject.cpp:
308         (WebCore::ReadableDataObject::getData):
309         (WebCore::ReadableDataObject::urlTitle):
310         (WebCore::ReadableDataObject::htmlBaseUrl):
311         (WebCore::ReadableDataObject::filenames):
312         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
313         * platform/chromium/SSLKeyGeneratorChromium.cpp:
314         (WebCore::signedPublicKeyAndChallengeString):
315         * platform/chromium/ScrollbarThemeChromium.cpp:
316         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
317         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
318         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
319         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
320         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
321         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
322         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
323         * platform/chromium/ScrollbarThemeChromiumMac.mm:
324         (WebCore::scrollbarStateToThemeState):
325         (WebCore::ScrollbarThemeChromiumMac::paint):
326         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
327         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
328         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
329         (WebCore::ScrollbarThemeChromiumWin::paintButton):
330         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
331         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
332         * platform/chromium/SharedTimerChromium.cpp:
333         (WebCore::setSharedTimerFiredFunction):
334         (WebCore::setSharedTimerFireTime):
335         (WebCore::stopSharedTimer):
336         * platform/chromium/SuddenTerminationChromium.cpp:
337         (WebCore::disableSuddenTermination):
338         (WebCore::enableSuddenTermination):
339         * platform/chromium/SystemTimeChromium.cpp:
340         (WebCore::currentTime):
341         * platform/chromium/WritableDataObject.cpp:
342         (WebCore::WritableDataObject::setData):
343         * platform/graphics/chromium/CrossProcessFontLoading.mm:
344         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
345         (WebCore::fontContainsCharacter):
346         (WebCore::FillLogFont):
347         * platform/graphics/chromium/FontCacheLinux.cpp:
348         (WebCore::FontCache::getFontDataForCharacters):
349         * platform/graphics/chromium/FontChromiumWin.cpp:
350         (WebCore::Font::drawGlyphs):
351         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
352         (WebCore::FontPlatformData::scriptFontProperties):
353         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
354         (WebCore::FontPlatformData::querySystemForRenderStyle):
355         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
356         (WebCore::fillBMPGlyphs):
357         * platform/graphics/chromium/ImageChromium.cpp:
358         (WebCore::Image::loadPlatformResource):
359         * platform/graphics/chromium/ImageChromiumMac.mm:
360         (WebCore::Image::loadPlatformResource):
361         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
362         (WebCore::SimpleFontData::platformInit):
363         (WebCore::SimpleFontData::determinePitch):
364         (WebCore::SimpleFontData::platformWidthForGlyph):
365         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
366         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
367         * platform/graphics/skia/FontCustomPlatformData.cpp:
368         (WebCore::FontCustomPlatformData::fontPlatformData):
369         * platform/network/chromium/CookieJarChromium.cpp:
370         (WebCore::setCookies):
371         (WebCore::cookies):
372         (WebCore::cookieRequestHeaderFieldValue):
373         (WebCore::cookiesEnabled):
374         (WebCore::getRawCookies):
375         (WebCore::deleteCookie):
376         * platform/network/chromium/DNSChromium.cpp:
377         (WebCore::prefetchDNS):
378         * platform/qt/PlatformBridge.h:
379         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
380         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
381         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
382         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
383         (chromiumOpen):
384         (chromiumDelete):
385         (chromiumAccess):
386         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
387         * plugins/chromium/PluginDataChromium.cpp:
388         (WebCore::PluginCache::plugins):
389         * rendering/RenderThemeChromiumMac.mm:
390         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
391         * rendering/RenderThemeChromiumSkia.cpp:
392         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
393         * rendering/RenderThemeChromiumWin.cpp:
394         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
395         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
396         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
397         (WebCore::RenderThemeChromiumWin::systemColor):
398         (WebCore::RenderThemeChromiumWin::paintButton):
399         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
400         (WebCore::menuListButtonWidth):
401         (WebCore::RenderThemeChromiumWin::paintMenuList):
402         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
403         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
404         (WebCore::RenderThemeChromiumWin::paintProgressBar):
405         * storage/chromium/IDBFactoryBackendInterface.cpp:
406         (WebCore::IDBFactoryBackendInterface::create):
407         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
408         * storage/chromium/IDBKeyPathBackendImpl.cpp:
409         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
410
411 2011-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
412
413         Unreviewed, rolling out r76335.
414         http://trac.webkit.org/changeset/76335
415         https://bugs.webkit.org/show_bug.cgi?id=52875
416
417         profiler tests were broken (Requested by loislo on #webkit).
418
419         * inspector/InspectorController.cpp:
420         (WebCore::InspectorController::addProfile):
421         (WebCore::InspectorController::getCurrentUserInitiatedProfileName):
422         * inspector/InspectorController.h:
423         * inspector/InspectorInstrumentation.cpp:
424         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
425         * inspector/InspectorInstrumentation.h:
426         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
427         (WebCore::InspectorInstrumentation::inspectorControllerWithFrontendForPage):
428         * page/Console.cpp:
429         (WebCore::Console::profile):
430         (WebCore::Console::profileEnd):
431
432 2011-01-21  Ilya Tikhonovsky  <loislo@chromium.org>
433
434         Reviewed by Yury Semikhatsky.
435
436         Web Inspector: switch page/Console implementation from InspectorController to InspectorInstrumentation.
437
438         There are some places in WebCore where we still using direct InspectorController calls.
439         The idea is to pass all the Inspector related calls via InspectorInstrumentaion which is the
440         Inspector facade for WebCore.
441
442         https://bugs.webkit.org/show_bug.cgi?id=52869
443
444         * inspector/InspectorController.cpp:
445         * inspector/InspectorController.h:
446         * inspector/InspectorInstrumentation.cpp:
447         (WebCore::InspectorInstrumentation::addProfileImpl):
448         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
449         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
450         * inspector/InspectorInstrumentation.h:
451         (WebCore::InspectorInstrumentation::addProfile):
452         (WebCore::InspectorInstrumentation::profilerEnabled):
453         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
454         * page/Console.cpp:
455         (WebCore::Console::profile):
456         (WebCore::Console::profileEnd):
457
458 2011-01-20  Sam Weinig  <sam@webkit.org>
459
460         Reviewed by Gavin Barraclough.
461
462         Fix failing tests from r76291.
463
464         * platform/ScrollView.cpp:
465         (WebCore::ScrollView::scrollPosition):
466         (WebCore::ScrollView::updateScrollbars):
467         Take the scroll origin into account in more places.
468
469 2011-01-20  Kent Tamura  <tkent@chromium.org>
470
471         Unreviewed, sorting an Xcode project file.
472
473         * WebCore.xcodeproj/project.pbxproj:
474
475 2011-01-20  Ben Vanik  <ben.vanik@gmail.com>
476
477         Reviewed by Kenneth Russell.
478
479         Implementation of the OES_standard_derivatives WebGL extension.
480         https://bugs.webkit.org/show_bug.cgi?id=51678
481
482         Changes are modeled off of the existing OESTextureFloat extension. New files,
483         extension retrieval, etc all match the existing code.
484
485         Changed ANGLEWebKitBridge to allow for multiple sets of the ANGLE shader compiler
486         options. This supports the enabling of the standard derivatives flag when the
487         extension is enabled. Refactored the cleanup code to make the destruction of the
488         compilers (if they had been created) cleaner.
489
490         Tested with the WebGL conformance test:
491         https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/oes-standard-derivatives.html
492         Passes on WebKit/OSX, Chromium/OSX, and Chromium/Windows.
493
494         * CMakeLists.txt:
495         * DerivedSources.make:
496         * GNUmakefile.am:
497         * WebCore.gypi:
498         * WebCore.pri:
499         * WebCore.pro:
500         * WebCore.xcodeproj/project.pbxproj:
501         * bindings/js/JSWebGLRenderingContextCustom.cpp:
502         (WebCore::toJS):
503         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
504         (WebCore::toV8Object):
505         * html/canvas/OESStandardDerivatives.cpp: Added.
506         (WebCore::OESStandardDerivatives::OESStandardDerivatives):
507         (WebCore::OESStandardDerivatives::~OESStandardDerivatives):
508         (WebCore::OESStandardDerivatives::getName):
509         (WebCore::OESStandardDerivatives::create):
510         * html/canvas/OESStandardDerivatives.h: Added.
511         * html/canvas/OESStandardDerivatives.idl: Added.
512         * html/canvas/WebGLExtension.h:
513         * html/canvas/WebGLRenderingContext.cpp:
514         (WebCore::WebGLRenderingContext::getExtension): Enable and return the new extension.
515         (WebCore::WebGLRenderingContext::getParameter): Support extension enum when enabled.
516         (WebCore::WebGLRenderingContext::getSupportedExtensions): 
517         (WebCore::WebGLRenderingContext::hint): Validate extension enum when enabled.
518         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
519         (WebCore::WebGLRenderingContext::getExtensionNumber):
520         * html/canvas/WebGLRenderingContext.h:
521         * platform/graphics/ANGLEWebKitBridge.cpp:
522         (WebCore::ANGLEWebKitBridge::~ANGLEWebKitBridge): Cleaned up compiler cleanup.
523         (WebCore::ANGLEWebKitBridge::cleanupCompilers): Destruct compilers.
524         (WebCore::ANGLEWebKitBridge::setResources): Cleanup existing compilers when changing
525         ANGLE settings.
526         (WebCore::ANGLEWebKitBridge::validateShaderSource): Cleaned up compiler cleanup on error.
527         * platform/graphics/ANGLEWebKitBridge.h:
528         (WebCore::ANGLEWebKitBridge::getResources):
529         * platform/graphics/Extensions3D.h: Added enumeration for the extension.
530         * platform/graphics/GraphicsContext3D.h: lumbing for GraphicsContext3D.
531         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
532         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Plumbed through a pointer to the
533         GraphicsContext3D to handle resetting the shader compilers.
534         (WebCore::Extensions3DOpenGL::supports): Desktop GL always supports this extension,
535         so always return true.
536         (WebCore::Extensions3DOpenGL::ensureEnabled): Reset shader compilers as required.
537         * platform/graphics/opengl/Extensions3DOpenGL.h: Plumbing for GraphicsContext3D.
538         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
539         (WebCore::GraphicsContext3D::getExtensions): Plumbing for GraphicsContext3D to
540         Extensions3DOpenGL.
541
542 2011-01-20  Xiaomei Ji  <xji@chromium.org>
543
544         Reviewed by Dan Bernstein.
545
546         Fix regression(r71566): PDF in RTL block might messes up text directionality.
547         https://bugs.webkit.org/show_bug.cgi?id=52776
548
549         Test: fast/dom/52776.html
550
551         * platform/text/BidiResolver.h:
552         (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
553         (WebCore::::lowerExplicitEmbeddingLevel):
554         (WebCore::::raiseExplicitEmbeddingLevel):
555         (WebCore::::createBidiRunsForLine):
556
557 2011-01-20  Beth Dakin  <bdakin@apple.com>
558
559         Reviewed by Anders Carlsson.
560
561         Follow-on for <rdar://problem/8890255>
562
563         This fixes a painting error with ScrollbarPainter scrollers
564         and the new drawing area code path.
565         * platform/mac/ScrollbarThemeMac.mm:
566         (WebCore::updateArrowPlacement):
567
568 2011-01-20  Levi Weintraub  <leviw@chromium.org>
569
570         Unreviewed.
571
572         Fixing build breakage.
573
574         * editing/SelectionController.cpp:
575         (WebCore::SelectionController::willBeModified):
576
577 2011-01-20  Levi Weintraub  <leviw@chromium.org>
578
579         Reviewed by Ryosuke Niwa.
580
581         RTL: Caret goes to the opposite direction when pressing an arrow key after selection is made
582         https://bugs.webkit.org/show_bug.cgi?id=49511
583
584         Test: editing/selection/rtl-move-selection-right-left.html
585
586         * editing/SelectionController.cpp:
587         (WebCore::SelectionController::willBeModified):
588         Respecting the direction of the containing block when switching selection base and extent in
589         RTL content.
590
591         (WebCore::SelectionController::modifyMovingRight):
592         (WebCore::SelectionController::modifyMovingLeft):
593         Using directionOfEnclosingBlock when deciding to use the selection start or end to do the
594         correct thing for RTL.
595
596 2011-01-20  Nate Chapin  <japhet@chromium.org>
597
598         Reviewed by Adam Barth.
599
600         Null-check m_frame in DOMWindow::setLocation(), since it's
601         possible to reach this point without it having been checked
602         already.
603         https://bugs.webkit.org/show_bug.cgi?id=52769
604
605         Test: fast/dom/Window/Location/set-location-after-close.html
606
607         * page/DOMWindow.cpp:
608         (WebCore::DOMWindow::setLocation):
609
610 2011-01-20  Chang Shu  <chang.shu@nokia.com>
611
612         Reviewed by Darin Adler.
613
614         setContentEditable with invalid string should throw exception.
615         https://bugs.webkit.org/show_bug.cgi?id=52057
616
617         Implemented exception throwing for setContentEditable according to the following spec:
618         http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#attr-contenteditable
619         Related quotas: "On setting, if the new value is an ASCII case-insensitive match for the 
620         string 'inherit' then the content attribute must be removed, if the new value is an ASCII 
621         case-insensitive match for the string 'true' then the content attribute must be set to the 
622         string 'true', if the new value is an ASCII case-insensitive match for the string 'false' 
623         then the content attribute must be set to the string 'false', and otherwise the attribute 
624         setter must raise a SYNTAX_ERR exception."
625
626         * html/HTMLElement.cpp:
627         (WebCore::HTMLElement::setContentEditable): Throw exception on invalid input strings; Make setting values case-insensitive and also convert them to lower cases according to the spec.
628         * html/HTMLElement.h: Add additional parameter ExceptionCode& for function setContentEditable.
629         * html/HTMLElement.idl: Add exception throwing support for contentEditable setter.
630
631 2011-01-19  Adrienne Walker  <enne@google.com>
632
633         Reviewed by James Robinson.
634
635         [chromium] Composited render surfaces should allow writes to alpha channel.
636         https://bugs.webkit.org/show_bug.cgi?id=52766
637
638         Test: LayoutTests/platform/chromium/compositing
639
640         * platform/graphics/chromium/LayerRendererChromium.cpp:
641         (WebCore::LayerRendererChromium::drawLayers):
642
643 2011-01-14  Jer Noble  <jer.noble@apple.com>
644
645         Reviewed by Eric Carlson.
646
647         REGRESSION (r71842): Compass video is not playing in Safari welcome page
648         https://bugs.webkit.org/show_bug.cgi?id=52506
649
650         New test: LayoutTests/media/video-currentTime-delay.html
651
652         Call invalidateCachedTime() every time one of the cached property dependencies changes,
653         i.e. m_paused and m_playbackRate.
654
655         * html/HTMLMediaElement.cpp:
656         (WebCore::HTMLMediaElement::prepareForLoad):
657         (WebCore::HTMLMediaElement::setReadyState):
658         (WebCore::HTMLMediaElement::setPlaybackRate):
659         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
660
661 2011-01-20  Beth Dakin  <bdakin@apple.com>
662
663         Reviewed by Geoffrey Garen.
664
665         Fix for <rdar://problem/8890255>
666
667         Allow WebKitSystemInterface to draw scrollbars 
668         when appropriate.
669         * WebCore.exp.in:
670         * platform/mac/ScrollbarThemeMac.mm:
671         (WebCore::scrollbarMap):
672         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
673         (WebCore::ScrollbarThemeMac::registerScrollbar):
674         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
675         (WebCore::ScrollbarThemeMac::paint):
676         * platform/mac/WebCoreSystemInterface.h:
677         * platform/mac/WebCoreSystemInterface.mm:
678
679 2011-01-20  Sam Weinig  <sam@webkit.org>
680
681         Reviewed by Dave Hyatt.
682
683         Cleanup Scrollbar/ScrollbarClient relationship
684         https://bugs.webkit.org/show_bug.cgi?id=52779
685
686         Pipe all scrolling through the ScrollbarClient/ScrollAnimator
687         rather than through the Scrollbar. The Scrollbar now is just
688         a "view" on the scroll position of the scrollable area it is
689         attached to.
690
691         There are now two ways to scroll a scrollable area:
692         - ScrollbarClient::scroll()
693         - ScrollbarClient::scrollToOffsetWithoutAnimation()
694
695         Both of these go through the ScrollAnimator (updating its state
696         or starting an animation). The ScrollAnimator, in turn, now calls
697         ScrollbarClient::setScrollOffsetFromAnimation, which tells the
698         Scrollbars to pull a new offset (via Scrollbar::offsetDidChange)
699         and tells the class that derives from ScrollbarClient to scroll
700         its contents (via ScrollbarClient::setScrollOffset).
701
702         * WebCore.xcodeproj/project.pbxproj:
703         Move Scrollbar.cpp to the right place.
704
705         * accessibility/AccessibilityScrollbar.cpp:
706         (WebCore::AccessibilityScrollbar::setValue):
707         Initiate the scroll through the scrollbar client, rather than the
708         scrollbar itself.
709
710         * page/FrameView.cpp:
711         (WebCore::FrameView::scrollTo):
712         * page/FrameView.h:
713         Condense the two valueChanged overrides to a single override of the
714         scrollTo function.
715
716         * platform/ScrollAnimator.cpp:
717         (WebCore::ScrollAnimator::scroll):
718         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
719         (WebCore::ScrollAnimator::currentPosition):
720         (WebCore::ScrollAnimator::notityPositionChanged):
721         * platform/ScrollAnimator.h:
722         * platform/ScrollAnimatorWin.cpp:
723         (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation):
724         (WebCore::ScrollAnimatorWin::animateScroll):
725         * platform/ScrollAnimatorWin.h:
726         * platform/mac/ScrollAnimatorMac.h:
727         * platform/mac/ScrollAnimatorMac.mm:
728         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
729         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
730         Change setScrollPositionAndStopAnimation to scrollToOffsetWithoutAnimation
731         and bottleneck all client notification of changed position through a new
732         notityPositionChanged() function.
733
734         * platform/ScrollView.cpp:
735         (WebCore::ScrollView::setScrollOffset):
736         (WebCore::ScrollView::scrollTo):
737         (WebCore::ScrollView::scrollPosition):
738         (WebCore::ScrollView::scroll):
739         (WebCore::ScrollView::updateScrollbars):
740         (WebCore::ScrollView::wheelEvent):
741         * platform/ScrollView.h:
742         (WebCore::ScrollView::horizontalScrollbar):
743         (WebCore::ScrollView::verticalScrollbar):
744         Update to scroll via the ScrollbarClient rather than the Scrollbar.
745
746         * platform/Scrollbar.cpp:
747         (WebCore::Scrollbar::offsetDidChange):
748         (WebCore::Scrollbar::autoscrollPressedPart):
749         (WebCore::Scrollbar::moveThumb):
750         (WebCore::Scrollbar::mouseMoved):
751         * platform/Scrollbar.h:
752         (WebCore::Scrollbar::setPressedPos):
753         Change the scrollbar to only updates its offset in response to
754         an offsetDidChange call.
755
756         * platform/ScrollbarClient.cpp:
757         (WebCore::ScrollbarClient::scroll):
758         (WebCore::ScrollbarClient::scrollToOffsetWithoutAnimation):
759         (WebCore::ScrollbarClient::scrollToXOffsetWithoutAnimation):
760         (WebCore::ScrollbarClient::scrollToYOffsetWithoutAnimation):
761         (WebCore::ScrollbarClient::setScrollOffsetFromAnimation):
762         * platform/ScrollbarClient.h:
763         (WebCore::ScrollbarClient::horizontalScrollbar):
764         (WebCore::ScrollbarClient::verticalScrollbar):
765         Make the increasingly misnamed ScrollbarClient responsible for
766         scrolling.
767
768         * platform/efl/ScrollbarEfl.cpp:
769         (scrollbarEflEdjeMessage):
770         * platform/gtk/MainFrameScrollbarGtk.cpp:
771         (MainFrameScrollbarGtk::gtkValueChanged):
772         * platform/qt/ScrollbarQt.cpp:
773         (WebCore::Scrollbar::contextMenu):
774         Update to move scrolling through the client.
775
776         * platform/win/PopupMenuWin.cpp:
777         (WebCore::PopupMenuWin::scrollToRevealSelection):
778         (WebCore::PopupMenuWin::scrollPosition):
779         (WebCore::PopupMenuWin::setScrollOffset):
780         (WebCore::PopupMenuWin::scrollTo):
781         (WebCore::PopupMenuWin::wndProc):
782         * platform/win/PopupMenuWin.h:
783         (WebCore::PopupMenuWin::verticalScrollbar):
784         * rendering/RenderLayer.cpp:
785         (WebCore::RenderLayer::scrollToOffset):
786         (WebCore::RenderLayer::scrollTo):
787         (WebCore::RenderLayer::setScrollOffset):
788         (WebCore::RenderLayer::scrollPosition):
789         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
790         (WebCore::RenderLayer::scroll):
791         * rendering/RenderLayer.h:
792         * rendering/RenderListBox.cpp:
793         (WebCore::RenderListBox::scrollToRevealElementAtListIndex):
794         (WebCore::RenderListBox::scroll):
795         (WebCore::RenderListBox::logicalScroll):
796         (WebCore::RenderListBox::scrollPosition):
797         (WebCore::RenderListBox::setScrollOffset):
798         (WebCore::RenderListBox::scrollTo):
799         (WebCore::RenderListBox::setScrollTop):
800         * rendering/RenderListBox.h:
801         (WebCore::RenderListBox::verticalScrollbar):
802         Update to scroll via the ScrollbarClient rather than the Scrollbar.
803
804         * rendering/RenderMarquee.cpp:
805         (WebCore::RenderMarquee::start):
806         Simplify initial paint to just do an immediate scroll to the position.
807
808 2011-01-20  Patrick Gansterer  <paroga@webkit.org>
809
810         Unreviewed WinCE build fix for r76170.
811
812         * platform/graphics/wince/FontWinCE.cpp: Added a missing include.
813         * platform/graphics/wince/ImageBufferData.h: Added a missing include and fixed style.
814
815 2011-01-20  James Robinson  <jamesr@chromium.org>
816
817         Reviewed by Darin Fisher.
818
819         Implement mozilla's requestAnimationFrame API
820         https://bugs.webkit.org/show_bug.cgi?id=51218
821
822         This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
823         an author driving an animation from script could use window.requestAnimationFrame(callback)
824         instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
825         decide when to update the animations.  This avoids doing unnecessary work when the page content
826         is offscreen or is being displayed at a different framerate than what the page author expects.
827
828         Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
829         This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
830         following changes:
831         *) Only the callback syntax is supported, there is no before paint event
832         *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
833             what content they intend to animate.  That way if the page is being displayed but the element
834             in question is offscreen, we can avoid invoking the callback.
835         *) No timestamp is provided to the caller and there is no window.animationStartTime property
836             (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
837         *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
838             using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
839
840         The implementation depends on the embedder scheduling the callbacks since the callback invocation
841         depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
842         to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
843         called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
844         Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
845         embedder has to rate limit callbacks and may not be able to tie the callback directly to the
846         rendering loop.
847
848         Tests: fast/animation/request-animation-frame-cancel.html
849                fast/animation/request-animation-frame-cancel2.html
850                fast/animation/request-animation-frame-display.html
851                fast/animation/request-animation-frame-within-callback.html
852                fast/animation/request-animation-frame.html
853
854         * WebCore.gypi:
855         * dom/Document.cpp:
856         (WebCore::Document::Document):
857         (WebCore::Document::webkitRequestAnimationFrame):
858         (WebCore::Document::webkitCancelRequestAnimationFrame):
859         (WebCore::Document::serviceScriptedAnimations):
860         * dom/Document.h:
861         * dom/RequestAnimationFrameCallback.h: Added.
862         (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
863         * dom/RequestAnimationFrameCallback.idl: Added.
864         * loader/EmptyClients.h:
865         (WebCore::EmptyChromeClient::scheduleAnimation):
866         * page/Chrome.cpp:
867         (WebCore::Chrome::scheduleAnimation):
868         * page/Chrome.h:
869         * page/ChromeClient.h:
870         * page/DOMWindow.cpp:
871         (WebCore::DOMWindow::webkitRequestAnimationFrame):
872         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
873         * page/DOMWindow.h:
874         * page/DOMWindow.idl:
875         * page/FrameView.cpp:
876         (WebCore::FrameView::scheduleAnimation):
877         (WebCore::FrameView::serviceScriptedAnimations):
878         * page/FrameView.h:
879         * platform/HostWindow.h:
880
881 2011-01-20  James Robinson  <jamesr@chromium.org>
882
883         Reviewed by Nate Chapin.
884
885         [v8] CodeGeneratorV8 generates incorrect code for callbacks with no parameters
886         https://bugs.webkit.org/show_bug.cgi?id=52837
887
888         When generating code to invoke a callback with no parameters CodeGeneratorV8.pm was generating the following:
889         v8::Handle<v8::Value> argv[] = {}; which does not compile in visual studio.  Instead, if the argument count
890         is 0, we can just pass a NULL pointer for the argv parameter.
891
892         Test added to bindings/scripts/test/TestCallback.idl and covered by run-bindings-tests.  This
893         patch also includes some spurious changes to the bindings tests golden files (mostly GObject)
894         because the old golden files were out of date.
895
896         * bindings/scripts/CodeGeneratorV8.pm:
897         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
898         (WebDOMTestCallback::callbackWithNoParam):
899         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
900         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
901         (webkit_dom_test_callback_callback_with_no_param):
902         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
903         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
904         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
905         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
906         * bindings/scripts/test/JS/JSTestCallback.cpp:
907         (WebCore::JSTestCallback::callbackWithNoParam):
908         * bindings/scripts/test/JS/JSTestCallback.h:
909         * bindings/scripts/test/JS/JSTestInterface.cpp:
910         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
911         * bindings/scripts/test/JS/JSTestObj.cpp:
912         * bindings/scripts/test/ObjC/DOMTestCallback.h:
913         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
914         (-[DOMTestCallback callbackWithNoParam]):
915         * bindings/scripts/test/TestCallback.idl:
916         * bindings/scripts/test/V8/V8TestCallback.cpp:
917         (WebCore::V8TestCallback::callbackWithNoParam):
918         * bindings/scripts/test/V8/V8TestCallback.h:
919         * bindings/scripts/test/V8/V8TestObj.cpp:
920         (WebCore::TestObjInternal::reflectedUnsignedIntegralAttrAttrGetter):
921
922 2011-01-20  James Robinson  <jamesr@chromium.org>
923
924         Reviewed by Eric "Baller" Seidel.
925
926         RenderTableSection's setNeedsCellRecalc needs to null check table()
927         https://bugs.webkit.org/show_bug.cgi?id=52770
928
929         Null checks table() before deferencing it in RenderTableSection::setNeedsCellRecalc.
930         This can be null during detach().  Test constructed by Eric Seidel.
931
932         Test: fast/css-generated-content/table-with-scrollbar-corner.html
933
934         * rendering/RenderTableSection.cpp:
935         (WebCore::RenderTableSection::setNeedsCellRecalc):
936         * rendering/RenderTableSection.h:
937
938 2011-01-20  Dirk Schulze  <krit@webkit.org>
939
940         Reviewed by Rob Buis.
941
942         SVG Pattern doesn't take preserveAspectRatio of references Pattern
943         https://bugs.webkit.org/show_bug.cgi?id=52802
944
945         SVGPattern didn't take preserveAspectRatio of a referenced SVGPattern into account. Store preserveAspectRatio
946         in PatternAttributes as well, if the attribute was set on the referenced SVGPattern element.
947
948         Test: svg/custom/pattern-referencing-preserve-aspect-ratio.svg
949
950         * rendering/svg/RenderSVGResourcePattern.cpp:
951         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
952         * svg/PatternAttributes.h:
953         (WebCore::PatternAttributes::PatternAttributes):
954         (WebCore::PatternAttributes::preserveAspectRatio):
955         (WebCore::PatternAttributes::setPreserveAspectRatio):
956         (WebCore::PatternAttributes::hasPreserveAspectRatio):
957         * svg/SVGPatternElement.cpp:
958         (WebCore::SVGPatternElement::collectPatternAttributes):
959
960 2011-01-20  Dan Bernstein  <mitz@apple.com>
961
962         Reviewed by Adele Peterson.
963
964         <rdar://problem/8765498> REGRESSION (r72141): Cannot order prints with Aperture 3.1
965
966         <rdar://problem/8884648> REGRESSION (r72141): Safari hangs when visiting a page on www.bfmtv.com
967         https://bugs.webkit.org/show_bug.cgi?id=52765
968
969         <rdar://problem/8890909> REGRESSION (r72141): Very Slow Rendering With Certain Markup
970         https://bugs.webkit.org/show_bug.cgi?id=52265
971
972         Test: fast/block/line-layout/negative-max-height.html
973
974         Integer overflow detection led to a block having a huge height. This manifested as broken layout
975         in the first bug and as extreme slowness in the latter bugs because of
976         https://bugs.webkit.org/show_bug.cgi?id=52832
977
978         * rendering/RootInlineBox.cpp:
979         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Clamp maxHeight to 0 so the next line
980         cannot start above this line. The negative maxHeight also caused the integer overflow detection
981         logic to give the block a huge height.
982
983 2011-01-20  Yi Shen  <yi.4.shen@nokia.com>
984
985         Reviewed by Eric Carlson.
986
987         Clean up the Media Controls CSS for Qt
988         https://bugs.webkit.org/show_bug.cgi?id=52822
989
990         Split the audio::-webkit-media-xxx and video::-webkit-media-xxx rules 
991         in mediaControlsQt.css, and remove the duplicate audio::-webkit-media-xxx
992         rules from mediaControlsQtFullscreen.css.
993
994         * css/mediaControlsQt.css:
995         (audio::-webkit-media-controls-panel):
996         (video::-webkit-media-controls-panel):
997         (audio::-webkit-media-controls-mute-button):
998         (video::-webkit-media-controls-mute-button):
999         (audio::-webkit-media-controls-play-button):
1000         (video::-webkit-media-controls-play-button):
1001         (audio::-webkit-media-controls-timeline-container):
1002         (video::-webkit-media-controls-timeline-container):
1003         (audio::-webkit-media-controls-current-time-display):
1004         (video::-webkit-media-controls-current-time-display):
1005         (audio::-webkit-media-controls-time-remaining-display):
1006         (video::-webkit-media-controls-time-remaining-display):
1007         (audio::-webkit-media-controls-timeline):
1008         (video::-webkit-media-controls-timeline):
1009         (audio::-webkit-media-controls-volume-slider-container):
1010         (video::-webkit-media-controls-volume-slider-container):
1011         (audio::-webkit-media-controls-volume-slider):
1012         (video::-webkit-media-controls-volume-slider):
1013         (audio::-webkit-media-controls-seek-back-button):
1014         (video::-webkit-media-controls-seek-back-button):
1015         (audio::-webkit-media-controls-seek-forward-button):
1016         (video::-webkit-media-controls-seek-forward-button):
1017         (audio::-webkit-media-controls-fullscreen-button):
1018         (video::-webkit-media-controls-fullscreen-button):
1019         (audio::-webkit-media-controls-rewind-button):
1020         (video::-webkit-media-controls-rewind-button):
1021         (audio::-webkit-media-controls-return-to-realtime-button):
1022         (video::-webkit-media-controls-return-to-realtime-button):
1023         (audio::-webkit-media-controls-toggle-closed-captions-button):
1024         (video::-webkit-media-controls-toggle-closed-captions-button):
1025         * css/mediaControlsQtFullscreen.css:
1026         (video::-webkit-media-controls-time-remaining-display):
1027         (video::-webkit-media-controls-seek-back-button):
1028         (video::-webkit-media-controls-seek-forward-button):
1029         (video::-webkit-media-controls-rewind-button):
1030         (video::-webkit-media-controls-return-to-realtime-button):
1031         (video::-webkit-media-controls-toggle-closed-captions-button):
1032
1033 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
1034
1035         Reviewed by Pavel Feldman.
1036
1037         Web Inspector: [REGRESSION] Canceling of CSS numeric values increment/decrement is broken
1038         https://bugs.webkit.org/show_bug.cgi?id=52816
1039
1040         * inspector/front-end/StylesSidebarPane.js:
1041         (WebInspector.StylePropertyTreeElement.prototype):
1042
1043 2011-01-20  Dawit Alemayehu  <adawit@kde.org>
1044
1045         Reviewed by Andreas Kling.
1046
1047         [Qt] Fix Layering violation in MediaPlayerPrivateQt.
1048         https://bugs.webkit.org/show_bug.cgi?id=52733
1049
1050         No new tests. no behavioral change.
1051
1052        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1053         (WebCore::MediaPlayerPrivateQt::commitLoad):
1054
1055 2011-01-20  Nate Chapin  <japhet@chromium.org>
1056
1057         Reviewed by Darin Fisher.
1058
1059         [V8] Call malloc and memcpy directly instead of
1060         of strdup in convertV8ObjectToNPVariant() when
1061         converting strings. If there is a null character
1062         in the string, our use of strdup causes us to allocate
1063         too little memory, leading to out of bounds reads.
1064
1065         https://bugs.webkit.org/show_bug.cgi?id=52631
1066
1067         * bindings/v8/V8NPUtils.cpp:
1068         (WebCore::convertV8ObjectToNPVariant):
1069
1070 2011-01-20  Andreas Kling  <kling@webkit.org>
1071
1072         Reviewed by Ariya Hidayat.
1073
1074         [Qt] Fill shadow scratch buffer with proper transparent pixels
1075
1076         QImage::fill() has no Qt::GlobalColor overload in Qt 4.7 (coming in 4.8)
1077         so doing QImage::fill(Qt::transparent) will actually fill all pixels with
1078         the RGBA value 0x00000013.
1079
1080         * platform/graphics/qt/ContextShadowQt.cpp:
1081         (WebCore::ShadowBuffer::scratchImage):
1082
1083 2011-01-19  Adam Roben  <aroben@apple.com>
1084
1085         Remove WKCACFContextFlusher
1086
1087         It wasn't doing anything.
1088
1089         Fixes <http://webkit.org/b/52752> WKCACFContextFlusher is unused
1090
1091         Reviewed by Simon Fraser.
1092
1093         * WebCore.vcproj/WebCore.vcproj: Removed WKCACFContextFlusher. Also let VS have its way with
1094         the file.
1095
1096         * platform/graphics/win/WKCACFContextFlusher.cpp: Removed.
1097         * platform/graphics/win/WKCACFContextFlusher.h: Removed.
1098
1099         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1100         (WebCore::WKCACFLayerRenderer::~WKCACFLayerRenderer):
1101         (WebCore::WKCACFLayerRenderer::layerTreeDidChange):
1102         Stop telling WKCACFContextFlusher about our context, since it never did anything with it.
1103
1104 2011-01-19  Adam Roben  <aroben@apple.com>
1105
1106         Only flush our own context when we get resized
1107
1108         Fixes <http://webkit.org/b/52751> All WKCACFContexts with uncommitted
1109         changes get flushed whenever any composited page is resized
1110
1111         Reviewed by Simon Fraser.
1112
1113         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1114         (WebCore::WKCACFLayerRenderer::resize): Just flush our own context, not all contexts
1115         WKCACFContextFlusher knows about. After all, ours is the only one that just got resized!
1116
1117 2011-01-19  Adam Roben  <aroben@apple.com>
1118
1119         Make WKCACFLayerRenderer ref-counted
1120
1121         This will be needed to handle cases where the client might release its reference to us while
1122         we're calling out to it.
1123
1124         WKCACFLayerRenderer now has a setClient function, which is used rather than passing the
1125         client to create(). This allows clients to null out the client pointer when they're done
1126         with the renderer.
1127
1128         Fixes <http://webkit.org/b/52749> WKCACFLayerRenderer should be
1129         ref-counted
1130
1131         Reviewed by Simon Fraser.
1132
1133         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
1134         (WebCore::MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow):
1135         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
1136         Updated for WKCACFLayerRenderer changes.
1137
1138         * platform/graphics/win/WKCACFLayerRenderer.cpp:
1139         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable): Updated for changes to
1140         create().
1141         (WebCore::WKCACFLayerRenderer::create): No longer takes a WKCACFLayerRendererClient. Now
1142         returns a PassOwnPtr.
1143         (WebCore::WKCACFLayerRenderer::WKCACFLayerRenderer): No longer takes a
1144         WKCACFLayerRendererClient.
1145
1146         * platform/graphics/win/WKCACFLayerRenderer.h: Made WKCACFLayerRenderer inherit from
1147         RefCounted.
1148         (WebCore::WKCACFLayerRenderer::setClient): Added this simple setter.
1149
1150 2011-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1151
1152         [Qt][V8] Unreviewed buildfix after r76248.
1153
1154         * bindings/v8/ScriptCachedFrameData.h: Add missing include.
1155
1156 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
1157
1158         Reviewed by Yury Semikhatsky.
1159
1160         Web Inspector: enable resource agent upon request.
1161         https://bugs.webkit.org/show_bug.cgi?id=52815
1162
1163         We should not send network-related notifications unless front-end
1164         is interested.
1165
1166         * inspector/Inspector.idl:
1167         * inspector/InspectorController.cpp:
1168         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1169         (WebCore::InspectorController::connectFrontend):
1170         (WebCore::InspectorController::resourceAgent):
1171         * inspector/InspectorController.h:
1172         (WebCore::InspectorController::consoleAgent):
1173         (WebCore::InspectorController::cssAgent):
1174         (WebCore::InspectorController::domAgent):
1175         (WebCore::InspectorController::injectedScriptAgent):
1176         (WebCore::InspectorController::runtimeAgent):
1177         (WebCore::InspectorController::databaseAgent):
1178         (WebCore::InspectorController::domStorageAgent):
1179         (WebCore::InspectorController::fileSystemAgent):
1180         * inspector/InspectorInstrumentation.cpp:
1181         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
1182         * inspector/InspectorResourceAgent.cpp:
1183         (WebCore::InspectorResourceAgent::restore):
1184         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
1185         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
1186         * inspector/InspectorResourceAgent.h:
1187         (WebCore::InspectorResourceAgent::create):
1188         * inspector/InspectorState.cpp:
1189         (WebCore::InspectorState::InspectorState):
1190         * inspector/InspectorState.h:
1191
1192 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
1193
1194         Reviewed by Csaba Osztrogonác.
1195
1196         Refactoring of the custom allocation framework
1197         https://bugs.webkit.org/show_bug.cgi?id=49897
1198
1199         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
1200         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
1201         equivalent macro implementation at the necessary places.
1202
1203 2011-01-20  Mikhail Naganov  <mnaganov@chromium.org>
1204
1205         Reviewed by Pavel Feldman.
1206
1207         Web Inspector: [Chromium] CPU Profiles are cleared when navigating back and forth.
1208
1209         Profiles are now not cleared unless renderer instance was changed.
1210
1211         https://bugs.webkit.org/show_bug.cgi?id=52807
1212
1213         * inspector/InspectorController.cpp:
1214         (WebCore::InspectorController::restoreProfiler):
1215         * inspector/InspectorProfilerAgent.cpp:
1216         (WebCore::InspectorProfilerAgent::resetState):
1217         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
1218         * inspector/InspectorProfilerAgent.h:
1219
1220 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
1221
1222         Unreviewed, add new JS file refs missing from r76116.
1223
1224         * WebCore.gypi:
1225         * WebCore.vcproj/WebCore.vcproj:
1226         * inspector/front-end/WebKit.qrc:
1227
1228 2011-01-20  Alexander Pavlov  <apavlov@chromium.org>
1229
1230         Reviewed by Pavel Feldman.
1231
1232         Web Inspector: Crash when adding a rule for an ImageDocument
1233         https://bugs.webkit.org/show_bug.cgi?id=52811
1234
1235         * inspector/InspectorCSSAgent.cpp:
1236         (WebCore::InspectorCSSAgent::addRule2):
1237         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1238
1239 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
1240
1241         Reviewed by Pavel Feldman.
1242
1243         Web Inspector: cleanup InspectorController's friends list.
1244         We have a plan to extract InspectorAgent from InspectorController.
1245         InspectorAgent will be accessible only from InspectorController.
1246         As result we can simply made some methods public and remove long
1247         friends list.
1248
1249         https://bugs.webkit.org/show_bug.cgi?id=52806
1250
1251         * inspector/InjectedScriptHost.cpp:
1252         (WebCore::InjectedScriptHost::databaseForId):
1253         (WebCore::InjectedScriptHost::selectDatabase):
1254         (WebCore::InjectedScriptHost::selectDOMStorage):
1255         (WebCore::InjectedScriptHost::inspectorDOMAgent):
1256         (WebCore::InjectedScriptHost::frontend):
1257         * inspector/InspectorBrowserDebuggerAgent.cpp:
1258         (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
1259         (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
1260         (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
1261         (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
1262         (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
1263         (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
1264         (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
1265         (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
1266         * inspector/InspectorController.h:
1267         (WebCore::InspectorController::frontend):
1268         * inspector/InspectorInstrumentation.cpp:
1269         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1270         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
1271         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1272         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
1273         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1274         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
1275         (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
1276         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1277         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1278         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
1279         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
1280         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
1281         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1282         (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
1283         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
1284         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
1285
1286 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
1287
1288         Reviewed by Yury Semikhatsky.
1289
1290         Web Inspector: implement JavaScriptBreakpointsSidebarPane based on events from debugger model.
1291         https://bugs.webkit.org/show_bug.cgi?id=52723
1292
1293         Extract all breakpoints-related presentation code from debugger model to JavaScriptBreakpointSidebarPane.
1294
1295         * inspector/front-end/Breakpoint.js:
1296         (WebInspector.Breakpoint):
1297         (WebInspector.Breakpoint.prototype.get data):
1298         (WebInspector.Breakpoint.prototype.remove):
1299         * inspector/front-end/BreakpointsSidebarPane.js:
1300         (WebInspector.JavaScriptBreakpointsSidebarPane):
1301         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
1302         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved):
1303         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointEnableChanged):
1304         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointItemCheckboxClicked):
1305         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenuEventFired):
1306         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerPaused):
1307         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._debuggerResumed):
1308         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._addListElement):
1309         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeListElement):
1310         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._projectChanged):
1311         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compare):
1312         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
1313         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement.didGetSourceLine):
1314         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
1315         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointIdForDebuggerPausedEvent):
1316         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setBreakpointEnabled):
1317         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._removeBreakpoint):
1318         (WebInspector.NativeBreakpointsSidebarPane):
1319         (WebInspector.XHRBreakpointsSidebarPane.prototype.addBreakpointItem):
1320         * inspector/front-end/DebuggerModel.js:
1321         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
1322         (WebInspector.DebuggerModel.prototype.breakpointForId):
1323         (WebInspector.DebuggerModel.prototype._pausedScript):
1324         (WebInspector.DebuggerModel.prototype._resumedScript):
1325         * inspector/front-end/ScriptsPanel.js:
1326         (WebInspector.ScriptsPanel):
1327         * inspector/front-end/inspector.js:
1328
1329 2011-01-20  Dirk Schulze  <krit@webkit.org>
1330
1331         Reviewed by Andreas Kling.
1332
1333         SVG Pattern doesn't take the viewBox of a referenced Pattern
1334         https://bugs.webkit.org/show_bug.cgi?id=52804
1335         
1336         SVGPattern element didn't use the viewBox of another SVGPattern element, referenced
1337         by xlink:href. Modified PatternAttributes, to take the value of the viewBox of the
1338         SVGPattern element as well, if the attribute was set.
1339         This gets checked by a W3C SVG test case.        
1340
1341         Test: svg/W3C-SVG-1.1-SE/pservers-pattern-04-f.svg
1342
1343         * rendering/svg/RenderSVGResourcePattern.cpp:
1344         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
1345         * svg/PatternAttributes.h:
1346         (WebCore::PatternAttributes::PatternAttributes):
1347         (WebCore::PatternAttributes::viewBox):
1348         (WebCore::PatternAttributes::setViewBox):
1349         (WebCore::PatternAttributes::hasViewBox):
1350         * svg/SVGPatternElement.cpp:
1351         (WebCore::SVGPatternElement::collectPatternAttributes):
1352
1353 2011-01-19  Stephen White  <senorblanco@chromium.org>
1354
1355         [Re-land of r76159 with a compile fix for the Chromium linux shlib
1356         build.]
1357
1358         Reviewed by James Robinson.
1359
1360         Implement accelerated path drawing and clipping for the Canvas2D GPU
1361         path.
1362         https://bugs.webkit.org/show_bug.cgi?id=52627
1363         
1364         This is done with a simple curve interpolator and the GLU tesselator,
1365         which is good enough for a 3-5X speedup on
1366         http://ie.microsoft.com/testdrive/Performance/Galactic/Default.html.
1367
1368         Covered by canvas/philip/2d.path.clip.basic.html, and many, many more.
1369         All tests canvas/philip and fast/canvas paths pass with no
1370         regressions, although two have minor pixel differences which require
1371         rebaselining.
1372
1373         * WebCore.gyp/WebCore.gyp:
1374         Add internal_glu include path to chromium build.
1375         * WebCore.gypi:
1376         Add internal_glu files to chromium build.
1377         * html/canvas/CanvasRenderingContext2D.cpp:
1378         (WebCore::CanvasRenderingContext2D::reset):
1379         (WebCore::CanvasRenderingContext2D::platformLayer):
1380         Make CanvasRenderingContext2D more robust against failure to create
1381         a DrawingBuffer.
1382         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1383         (WebCore::DrawingBuffer::DrawingBuffer):
1384         As in DrawingBufferMac.cpp, call reset() from the constructor.
1385         Also initialize size to (-1, -1), so reset() doesn't early-out.
1386         Add initializers for depthBuffer and stencilBuffer, and remove
1387         multisampleDepthStencilBuffer.
1388         * platform/graphics/chromium/GLES2Canvas.cpp:
1389         Remove some unused #includes.
1390         (WebCore::GLES2Canvas::State::State):
1391         Add clipping state, and implement save/restore via the copy constructor.
1392         (WebCore::operator*):
1393         (WebCore::Quadratic::Quadratic):
1394         (WebCore::Quadratic::fromBezier):
1395         (WebCore::Quadratic::evaluate):
1396         Quadratic Bezier curve class.
1397         (WebCore::Cubic::Cubic):
1398         (WebCore::Cubic::fromBezier):
1399         (WebCore::Cubic::evaluate):
1400         Cubic Bezier curve class.
1401         (WebCore::GLES2Canvas::clearRect):
1402         Add clipping support to clearRect().
1403         (WebCore::GLES2Canvas::fillPath):
1404         Implement fillPath().
1405         (WebCore::GLES2Canvas::fillRect):
1406         Add clipping support to fillRect().
1407         (WebCore::GLES2Canvas::clipPath):
1408         Implement clipPath().
1409         (WebCore::GLES2Canvas::clipOut):
1410         Stub out clipOut() (not called by Canvas 2D).
1411         (WebCore::GLES2Canvas::restore):
1412         When restoring, draw any remaining clipping paths to the stencil buffer.
1413         (WebCore::GLES2Canvas::drawTexturedRect):
1414         Add clipping support.
1415         (WebCore::interpolateQuadratic):
1416         (WebCore::interpolateCubic):
1417         Simple curve interpolation, using the Cubic and Quadratic classes.
1418         (WebCore::PolygonData::PolygonData):
1419         A struct to hold the tesselation data for callbacks.
1420         (WebCore::beginData):
1421         (WebCore::edgeFlagData):
1422         (WebCore::vertexData):
1423         (WebCore::endData):
1424         (WebCore::combineData):
1425         internal_glu tesselation callbacks.
1426         (WebCore::GLES2Canvas::createVertexBufferFromPath):
1427         Build an interpolated, tesselated vertex buffer and element array buffer from a given path, suitable for filling.
1428         (WebCore::GLES2Canvas::beginStencilDraw):
1429         Enable stencilling, and disable draws to the color buffer.
1430         (WebCore::GLES2Canvas::applyClipping):
1431         If clipping is enabled, set the appropriate GL state.
1432         * platform/graphics/chromium/GLES2Canvas.h:
1433         Document the flavours of drawTexturedRect() a bit, so I don't get confused.
1434         * platform/graphics/gpu/DrawingBuffer.cpp:
1435         (WebCore::DrawingBuffer::clear):
1436         (WebCore::DrawingBuffer::createSecondaryBuffers):
1437         (WebCore::DrawingBuffer::resizeDepthStencil):
1438         (WebCore::DrawingBuffer::reset):
1439         * platform/graphics/gpu/DrawingBuffer.h:
1440         Unify m_multisampleDepthStencilBuffer with m_depthStencilBuffer. 
1441         Implement separate depth and stencil buffers for when
1442         OES_packed_depth_stencil is not available.  Refactor creation of
1443         multisampled and non-multisampled depth and stencil buffers into
1444         resizeDepthStencil().
1445         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1446         (WebCore::SharedGraphicsContext3D::create):
1447         Turn on stencil, turn off depth, turn off antialiasing (for now).
1448         (WebCore::SharedGraphicsContext3D::enableStencil):
1449         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1450         Implement stencil enable/disable.
1451         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
1452         (WebCore::DrawingBuffer::DrawingBuffer):
1453         Remove m_multisampleDepthStencilBuffer.  Set the size to (-1, -1)
1454         on creation, so reset() doesn't early-out.  Initialize m_depthBuffer
1455         and m_stencilBuffer.
1456         * platform/graphics/skia/GraphicsContextSkia.cpp:
1457         (WebCore::GraphicsContext::canvasClip):
1458         (WebCore::GraphicsContext::clipOut):
1459         (WebCore::GraphicsContext::clipPath):
1460         (WebCore::GraphicsContext::fillPath):
1461         Put in GPU hooks for path clipping, and path drawing.
1462         * platform/graphics/skia/PlatformContextSkia.cpp:
1463         (WebCore::PlatformContextSkia::canAccelerate):
1464         Don't check for clipping paths in canAccelerate() (since we can
1465         now accelerate them).
1466         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
1467         Don't do clipping when uploading software draws to hardware.
1468         * thirdparty/glu/README.webkit:
1469         * thirdparty/glu/gluos.h:
1470         #undef MIN and MAX, to fix warnings-as-errors in Chrome/Mac build.
1471         * thirdparty/glu/libtess/geom.c:
1472         * thirdparty/glu/libtess/priorityq.c:
1473         * thirdparty/glu/libtess/render.c:
1474         Use do{}while(0) instead of if(1)else construct in macro.
1475         * thirdparty/glu/libtess/sweep.c:
1476         (IsWindingInside):
1477         (DoneEdgeDict):
1478         Fix some warnings treated as errors for the Linux Release build.
1479
1480
1481 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
1482
1483         Web Inspector: move releaseObjectGroup to the new Runtime agent.
1484         https://bugs.webkit.org/show_bug.cgi?id=52803
1485         (accedentally landed as r76231)
1486
1487         * inspector/InspectorContorller.h:
1488         * inspector/InspectorContorller.cpp:
1489         * inspector/InspectorRuntimeAgent.h:
1490         * inspector/InspectorRuntimeAgent.cpp:
1491
1492 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
1493
1494         Not reviewed: build fix.
1495
1496         * inspector/InspectorState.h:
1497         (WebCore::InspectorState::setBoolean):
1498         (WebCore::InspectorState::setString):
1499         (WebCore::InspectorState::setLong):
1500
1501 2011-01-20  Pavel Feldman  <pfeldman@chromium.org>
1502
1503         Reviewed by Yury Semikhatsky.
1504
1505         Web Inspector: further simplify InspectorState.
1506         https://bugs.webkit.org/show_bug.cgi?id=52731
1507
1508         This change moves XHR logging flag into console agent,
1509         removes InspectorState pushing to the front-end.
1510
1511         * inspector/Inspector.idl:
1512         * inspector/InspectorConsoleAgent.cpp:
1513         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
1514         (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
1515         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
1516         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
1517         (WebCore::InspectorConsoleAgent::addConsoleMessage):
1518         * inspector/InspectorConsoleAgent.h:
1519         * inspector/InspectorController.cpp:
1520         (WebCore::InspectorController::InspectorController):
1521         * inspector/InspectorController.h:
1522         (WebCore::InspectorController::state):
1523         (WebCore::InspectorController::settings):
1524         * inspector/InspectorState.cpp:
1525         (WebCore::InspectorState::InspectorState):
1526         (WebCore::InspectorState::registerBoolean):
1527         (WebCore::InspectorState::registerString):
1528         (WebCore::InspectorState::registerLong):
1529         (WebCore::InspectorState::registerObject):
1530         (WebCore::InspectorState::Property::create):
1531         * inspector/InspectorState.h:
1532         * inspector/front-end/ConsoleView.js:
1533         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
1534         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
1535         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
1536         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
1537         * inspector/front-end/inspector.js:
1538
1539 2011-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1540
1541         Unreviewed buildfix.
1542
1543         [Qt][V8] Remove unnecessary files after r76224.
1544
1545         * WebCore.pro:
1546
1547 2011-01-20  Ilya Tikhonovsky  <loislo@chromium.org>
1548
1549         Reviewed by Yury Semikhatsky.
1550
1551         Web Inspector: prepare for extracting InspectorAgent from InspectorController.
1552         https://bugs.webkit.org/show_bug.cgi?id=52797
1553
1554         * inspector/CodeGeneratorInspector.pm:
1555         * inspector/InspectorController.h:
1556         (WebCore::InspectorController::inspectorAgent):
1557         (WebCore::InspectorController::cssAgent):
1558         (WebCore::InspectorController::injectedScriptAgent):
1559         (WebCore::InspectorController::resourceAgent):
1560         (WebCore::InspectorController::runtimeAgent):
1561         (WebCore::InspectorController::timelineAgent):
1562         (WebCore::InspectorController::databaseAgent):
1563         (WebCore::InspectorController::domStorageAgent):
1564         (WebCore::InspectorController::fileSystemAgent):
1565         (WebCore::InspectorController::browserDebuggerAgent):
1566         (WebCore::InspectorController::debuggerAgent):
1567         (WebCore::InspectorController::profilerAgent):
1568         (WebCore::InspectorController::applicationCacheAgent):
1569
1570 2011-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1571
1572         Unreviewed, rolling out r76215.
1573         http://trac.webkit.org/changeset/76215
1574         https://bugs.webkit.org/show_bug.cgi?id=52799
1575
1576         Caused regressions in Chromium; morrita is going to look at it
1577         tomrorow (Requested by jorlow on #webkit).
1578
1579         * dom/TextEvent.h:
1580         * dom/TextEventInputType.h:
1581         * editing/CompositeEditCommand.cpp:
1582         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
1583         * editing/CompositeEditCommand.h:
1584         * editing/Editor.cpp:
1585         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1586         (WebCore::Editor::confirmComposition):
1587         (WebCore::Editor::setComposition):
1588         * editing/Editor.h:
1589         * editing/InsertTextCommand.cpp:
1590         (WebCore::InsertTextCommand::input):
1591         * editing/InsertTextCommand.h:
1592         * editing/TypingCommand.cpp:
1593         (WebCore::TypingCommand::TypingCommand):
1594         (WebCore::TypingCommand::insertText):
1595         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
1596         * editing/TypingCommand.h:
1597         (WebCore::TypingCommand::create):
1598
1599 2010-12-14  Yury Semikhatsky  <yurys@chromium.org>
1600
1601         Reviewed by Adam Barth.
1602
1603         [V8] Get rid of delayed exception reporting in V8ConsoleMessage.cpp
1604         https://bugs.webkit.org/show_bug.cgi?id=51044
1605
1606         * WebCore.gypi:
1607         * bindings/v8/V8ConsoleMessage.cpp: Removed.
1608         * bindings/v8/V8ConsoleMessage.h: Removed.
1609         * bindings/v8/V8DOMWindowShell.cpp:
1610         (WebCore::v8UncaughtExceptionHandler):
1611         (WebCore::reportUnsafeJavaScriptAccess):
1612         (WebCore::V8DOMWindowShell::initContextIfNeeded):
1613         * bindings/v8/V8Proxy.cpp:
1614         (WebCore::addMessageToConsole):
1615         (WebCore::logInfo):
1616         (WebCore::V8Proxy::reportUnsafeAccessTo):
1617         (WebCore::V8Proxy::runScript):
1618         (WebCore::V8Proxy::callFunction):
1619         (WebCore::V8Proxy::newInstance):
1620         * bindings/v8/V8Proxy.h:
1621         * bindings/v8/WorkerContextExecutionProxy.cpp:
1622         * bindings/v8/specialization/V8BindingState.cpp:
1623         (WebCore::::immediatelyReportUnsafeAccessTo):
1624
1625 2011-01-19  MORITA Hajime  <morrita@google.com>
1626
1627         Reviewed by Eric Seidel.
1628
1629         ShadowElement::m_shadowParent should be removed
1630         https://bugs.webkit.org/show_bug.cgi?id=52558
1631
1632         No new tests. No behavioral change.
1633
1634         * rendering/ShadowElement.h:
1635         (WebCore::ShadowElement::ShadowElement):
1636
1637 2011-01-20  Hans Wennborg  <hans@chromium.org>
1638
1639         Reviewed by Jeremy Orlow.
1640
1641         IndexedDB: IDBObjectStore.get should fire onsuccess rather than onerror
1642         https://bugs.webkit.org/show_bug.cgi?id=52725
1643
1644         Let IDBObjectStore.get() fire the onsuccess handler with the value
1645         'undefined' for when an object does not exist in the store.
1646
1647         Update SerializedScriptValue to provide such an undefined value.
1648
1649         * bindings/v8/SerializedScriptValue.cpp:
1650         (WebCore::SerializedScriptValue::nullValue):
1651         (WebCore::SerializedScriptValue::undefinedValue):
1652         * bindings/v8/SerializedScriptValue.h:
1653         * storage/IDBObjectStoreBackendImpl.cpp:
1654         (WebCore::IDBObjectStoreBackendImpl::getInternal):
1655
1656 2010-12-27  Yury Semikhatsky  <yurys@chromium.org>
1657
1658         Reviewed by Pavel Feldman.
1659
1660         WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown
1661         https://bugs.webkit.org/show_bug.cgi?id=8519
1662
1663         Uncaught exceptions are propagated to window.onerror hander if one is present.
1664         The handler is expected to be a function accepting three arguments: error message,
1665         resource url and line number where the exception occured.
1666
1667         It was decided to dispatch ErrorEvent to all listeners/handlers no matter if they
1668         were created in the same isolated world where the exception occured or not.
1669
1670         Tests: fast/events/window-onerror1.html
1671                fast/events/window-onerror10.html
1672                fast/events/window-onerror11.html
1673                fast/events/window-onerror12.html
1674                fast/events/window-onerror2.html
1675                fast/events/window-onerror3.html
1676                fast/events/window-onerror4.html
1677                fast/events/window-onerror5.html
1678                fast/events/window-onerror6.html
1679                fast/events/window-onerror7.html
1680                fast/events/window-onerror8.html
1681                fast/events/window-onerror9.html
1682                http/tests/security/window-onerror-exception-in-iframe.html
1683                userscripts/window-onerror-for-isolated-world-1.html
1684                userscripts/window-onerror-for-isolated-world-2.html
1685
1686         * Android.jscbindings.mk:
1687         * CMakeLists.txt:
1688         * GNUmakefile.am:
1689         * WebCore.gypi:
1690         * WebCore.order:
1691         * WebCore.pro:
1692         * WebCore.vcproj/WebCore.vcproj:
1693         * WebCore.xcodeproj/project.pbxproj:
1694         * bindings/js/JSBindingsAllInOne.cpp:
1695         * bindings/js/JSDOMBinding.cpp:
1696         (WebCore::reportException):
1697         * bindings/js/JSErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.cpp.
1698         (WebCore::JSErrorHandler::JSErrorHandler):
1699         (WebCore::JSErrorHandler::~JSErrorHandler):
1700         (WebCore::JSErrorHandler::handleEvent):
1701         * bindings/js/JSErrorHandler.h: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
1702         (WebCore::JSErrorHandler::create):
1703         (WebCore::createJSErrorHandler):
1704         * bindings/js/JSEventListener.h:
1705         * bindings/scripts/CodeGeneratorJS.pm:
1706         * bindings/scripts/CodeGeneratorV8.pm:
1707         * bindings/v8/V8ConsoleMessage.cpp:
1708         (WebCore::V8ConsoleMessage::dispatchNow):
1709         (WebCore::V8ConsoleMessage::handler): the method was changed to use generic WebCore exception
1710         reporting mechanism which is also used by JSC bindings.
1711         * bindings/v8/V8ConsoleMessage.h:
1712         * bindings/v8/V8EventListener.h:
1713         * bindings/v8/V8WindowErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
1714         (WebCore::V8WindowErrorHandler::V8WindowErrorHandler):
1715         (WebCore::V8WindowErrorHandler::callListenerFunction):
1716         * bindings/v8/V8WindowErrorHandler.h: Copied from WebCore/dom/ErrorEvent.cpp.
1717         (WebCore::V8WindowErrorHandler::create):
1718         * bindings/v8/WorkerContextExecutionProxy.cpp:
1719         (WebCore::v8MessageHandler):
1720         * bindings/v8/WorkerScriptController.cpp:
1721         (WebCore::WorkerScriptController::evaluate):
1722         * dom/Document.cpp:
1723         (WebCore::Document::errorEventTarget):
1724         (WebCore::Document::logExceptionToConsole):
1725         (WebCore::Document::addMessage):
1726         * dom/Document.h:
1727         * dom/ErrorEvent.cpp:
1728         * dom/ErrorEvent.h:
1729         * dom/Event.cpp:
1730         (WebCore::Event::isErrorEvent):
1731         * dom/Event.h:
1732         * dom/ScriptExecutionContext.cpp:
1733         (WebCore::ScriptExecutionContext::PendingException::PendingException):
1734         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
1735         (WebCore::ScriptExecutionContext::reportException): this method is not virtual anymore to
1736         ensure that error event dispatching algorithm is the same in WorkerContext and in Document.
1737         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
1738         * dom/ScriptExecutionContext.h:
1739         * websockets/WebSocket.cpp:
1740         (WebCore::WebSocket::connect):
1741         * websockets/WebSocketChannel.cpp:
1742         (WebCore::WebSocketChannel::didOpen):
1743         (WebCore::WebSocketChannel::didFail):
1744         (WebCore::WebSocketChannel::appendToBuffer):
1745         * websockets/WebSocketHandshake.cpp:
1746         (WebCore::WebSocketHandshake::readServerHandshake):
1747         (WebCore::WebSocketHandshake::readStatusLine):
1748         (WebCore::WebSocketHandshake::readHTTPHeaders):
1749         (WebCore::WebSocketHandshake::checkResponseHeaders):
1750         * workers/DefaultSharedWorkerRepository.cpp:
1751         (WebCore::postExceptionTask):
1752         (WebCore::postConsoleMessageTask):
1753         * workers/WorkerContext.cpp:
1754         (WebCore::WorkerContext::WorkerContext):
1755         (WebCore::WorkerContext::errorEventTarget):
1756         (WebCore::WorkerContext::logExceptionToConsole):
1757         (WebCore::WorkerContext::addMessage):
1758         * workers/WorkerContext.h:
1759         * workers/WorkerMessagingProxy.cpp:
1760         (WebCore::WorkerExceptionTask::performTask):
1761         (WebCore::postConsoleMessageTask):
1762         * xml/XMLHttpRequest.cpp:
1763         (WebCore::reportUnsafeUsage):
1764
1765 2011-01-19  MORITA Hajime  <morrita@google.com>
1766
1767         Reviewed by Ryosuke Niwa.
1768
1769         Space and tab characters "sent" by an input method give totally different results than typing them directly
1770         https://bugs.webkit.org/show_bug.cgi?id=5241
1771         
1772         * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to 
1773           distinguish text input which is originated by composition.
1774         * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing 
1775           range of string on text node, instead of surrounding part of that.
1776
1777         Test: editing/inserting/insert-composition-whitespace.html
1778
1779         * dom/TextEvent.h:
1780         (WebCore::TextEvent::isComposition):
1781         * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
1782         * editing/CompositeEditCommand.cpp:
1783         (WebCore::containsOnlyWhitespace):
1784         (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
1785         (WebCore::CompositeEditCommand::canRebalance):
1786         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
1787         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
1788         * editing/CompositeEditCommand.h:
1789         * editing/Editor.cpp:
1790         (WebCore::Editor::insertTextForConfirmedComposition): Added.
1791         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1792         (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
1793         (WebCore::Editor::setComposition):
1794         * editing/Editor.h:
1795         * editing/InsertTextCommand.cpp:
1796         (WebCore::InsertTextCommand::input):
1797         * editing/InsertTextCommand.h:
1798         * editing/TypingCommand.cpp:
1799         (WebCore::TypingCommand::TypingCommand):
1800         (WebCore::TypingCommand::insertText):
1801         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
1802         * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
1803         (WebCore::TypingCommand::setCompositionType): Added.
1804         (WebCore::TypingCommand::create):
1805
1806 2011-01-19  Dominic Cooney  <dominicc@google.com>
1807
1808         Reviewed by Kent Tamura.
1809
1810         Make <keygen> no longer appear to be a <select> element to script.
1811         https://bugs.webkit.org/show_bug.cgi?id=52557
1812
1813         The intent is to put <keygen> options into shadow DOM. This change
1814         takes the first step by hiding the <select> element from
1815         JavaScript.
1816
1817         Test: fast/dom/HTMLKeygenElement/keygen.html
1818
1819         * CMakeLists.txt: Adds new IDL-derived wrapper.
1820         * DerivedSources.cpp:
1821         * DerivedSources.make:
1822         * GNUmakefile.am:
1823         * WebCore.gypi:
1824         * WebCore.pri:
1825         * WebCore.vcproj/WebCore.vcproj:
1826         * WebCore.xcodeproj/project.pbxproj:
1827         * bindings/gobject/GNUmakefile.am:
1828         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
1829         (WebKit::createKeygenWrapper):
1830         (WebKit::createHTMLElementWrapper):
1831         * bindings/objc/DOM.mm:
1832         (WebCore::createElementClassMap): Keygen no longer DOMHTMLSelectElement
1833         * html/HTMLKeygenElement.h:
1834         (WebCore::HTMLKeygenElement::willValidate): Now public.
1835         * html/HTMLKeygenElement.idl: Added.
1836         * html/HTMLTagNames.in: Keygen's wrapper is HTMLKeygenElement.
1837         * page/DOMWindow.idl: Add HTMLKeygenElement constructor.
1838
1839 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1840
1841         Unreviewed, rolling out r76203.
1842         http://trac.webkit.org/changeset/76203
1843         https://bugs.webkit.org/show_bug.cgi?id=52784
1844
1845         Broke Win compile on Chromium bots (Requested by dimich on
1846         #webkit).
1847
1848         * WebCore.gypi:
1849         * bindings/v8/V8DOMWindowShell.cpp:
1850         (WebCore::reportFatalErrorInV8):
1851         * page/PageGroup.cpp:
1852         (WebCore::PageGroup::isLinkVisited):
1853         * platform/android/PlatformBridge.h:
1854         * platform/audio/chromium/AudioBusChromium.cpp:
1855         (WebCore::createBusFromInMemoryAudioFile):
1856         * platform/chromium/ChromiumBridge.h: Added.
1857         * platform/chromium/ChromiumDataObjectLegacy.cpp:
1858         (WebCore::ChromiumDataObjectLegacy::getData):
1859         * platform/chromium/DragDataChromium.cpp:
1860         (WebCore::DragData::asURL):
1861         * platform/chromium/FileSystemChromium.cpp:
1862         (WebCore::deleteFile):
1863         (WebCore::deleteEmptyDirectory):
1864         (WebCore::getFileSize):
1865         (WebCore::getFileModificationTime):
1866         (WebCore::revealFolderInOS):
1867         (WebCore::directoryName):
1868         (WebCore::pathByAppendingComponent):
1869         (WebCore::makeAllDirectories):
1870         (WebCore::fileExists):
1871         (WebCore::openFile):
1872         (WebCore::closeFile):
1873         (WebCore::seekFile):
1874         (WebCore::truncateFile):
1875         (WebCore::readFromFile):
1876         (WebCore::writeToFile):
1877         * platform/chromium/LanguageChromium.cpp:
1878         (WebCore::platformDefaultLanguage):
1879         * platform/chromium/LinkHashChromium.cpp:
1880         (WebCore::visitedLinkHash):
1881         * platform/chromium/MIMETypeRegistryChromium.cpp:
1882         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1883         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1884         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
1885         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
1886         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
1887         * platform/chromium/PasteboardChromium.cpp:
1888         (WebCore::Pasteboard::writeSelection):
1889         (WebCore::Pasteboard::writePlainText):
1890         (WebCore::Pasteboard::writeURL):
1891         (WebCore::Pasteboard::writeImage):
1892         (WebCore::Pasteboard::canSmartReplace):
1893         (WebCore::Pasteboard::plainText):
1894         (WebCore::Pasteboard::documentFragment):
1895         * platform/chromium/PlatformBridge.h:
1896         * platform/chromium/PlatformScreenChromium.cpp:
1897         (WebCore::screenDepth):
1898         (WebCore::screenDepthPerComponent):
1899         (WebCore::screenIsMonochrome):
1900         (WebCore::screenRect):
1901         (WebCore::screenAvailableRect):
1902         * platform/chromium/ReadableDataObject.cpp:
1903         (WebCore::ReadableDataObject::getData):
1904         (WebCore::ReadableDataObject::urlTitle):
1905         (WebCore::ReadableDataObject::htmlBaseUrl):
1906         (WebCore::ReadableDataObject::filenames):
1907         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
1908         * platform/chromium/SSLKeyGeneratorChromium.cpp:
1909         (WebCore::signedPublicKeyAndChallengeString):
1910         * platform/chromium/ScrollbarThemeChromium.cpp:
1911         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1912         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1913         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1914         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1915         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1916         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1917         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1918         * platform/chromium/ScrollbarThemeChromiumMac.mm:
1919         (WebCore::scrollbarStateToThemeState):
1920         (WebCore::ScrollbarThemeChromiumMac::paint):
1921         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1922         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
1923         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1924         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1925         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
1926         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
1927         * platform/chromium/SharedTimerChromium.cpp:
1928         (WebCore::setSharedTimerFiredFunction):
1929         (WebCore::setSharedTimerFireTime):
1930         (WebCore::stopSharedTimer):
1931         * platform/chromium/SuddenTerminationChromium.cpp:
1932         (WebCore::disableSuddenTermination):
1933         (WebCore::enableSuddenTermination):
1934         * platform/chromium/SystemTimeChromium.cpp:
1935         (WebCore::currentTime):
1936         * platform/chromium/WritableDataObject.cpp:
1937         (WebCore::WritableDataObject::setData):
1938         * platform/graphics/chromium/CrossProcessFontLoading.mm:
1939         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1940         (WebCore::fontContainsCharacter):
1941         (WebCore::FillLogFont):
1942         * platform/graphics/chromium/FontCacheLinux.cpp:
1943         (WebCore::FontCache::getFontDataForCharacters):
1944         * platform/graphics/chromium/FontChromiumWin.cpp:
1945         (WebCore::Font::drawGlyphs):
1946         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
1947         (WebCore::FontPlatformData::scriptFontProperties):
1948         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1949         (WebCore::FontPlatformData::querySystemForRenderStyle):
1950         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
1951         (WebCore::fillBMPGlyphs):
1952         * platform/graphics/chromium/ImageChromium.cpp:
1953         (WebCore::Image::loadPlatformResource):
1954         * platform/graphics/chromium/ImageChromiumMac.mm:
1955         (WebCore::Image::loadPlatformResource):
1956         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1957         (WebCore::SimpleFontData::platformInit):
1958         (WebCore::SimpleFontData::determinePitch):
1959         (WebCore::SimpleFontData::platformWidthForGlyph):
1960         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
1961         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
1962         * platform/graphics/skia/FontCustomPlatformData.cpp:
1963         (WebCore::FontCustomPlatformData::fontPlatformData):
1964         * platform/network/chromium/CookieJarChromium.cpp:
1965         (WebCore::setCookies):
1966         (WebCore::cookies):
1967         (WebCore::cookieRequestHeaderFieldValue):
1968         (WebCore::cookiesEnabled):
1969         (WebCore::getRawCookies):
1970         (WebCore::deleteCookie):
1971         * platform/network/chromium/DNSChromium.cpp:
1972         (WebCore::prefetchDNS):
1973         * platform/qt/PlatformBridge.h:
1974         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
1975         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
1976         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
1977         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
1978         (chromiumOpen):
1979         (chromiumDelete):
1980         (chromiumAccess):
1981         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
1982         * plugins/chromium/PluginDataChromium.cpp:
1983         (WebCore::PluginCache::plugins):
1984         * rendering/RenderThemeChromiumMac.mm:
1985         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
1986         * rendering/RenderThemeChromiumSkia.cpp:
1987         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
1988         * rendering/RenderThemeChromiumWin.cpp:
1989         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
1990         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
1991         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
1992         (WebCore::RenderThemeChromiumWin::systemColor):
1993         (WebCore::RenderThemeChromiumWin::paintButton):
1994         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1995         (WebCore::menuListButtonWidth):
1996         (WebCore::RenderThemeChromiumWin::paintMenuList):
1997         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
1998         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
1999         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2000         * storage/chromium/IDBFactoryBackendInterface.cpp:
2001         (WebCore::IDBFactoryBackendInterface::create):
2002         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
2003         * storage/chromium/IDBKeyPathBackendImpl.cpp:
2004         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2005
2006 2011-01-19  Helder Correia  <helder@sencha.com>
2007
2008         Reviewed by Andreas Kling.
2009
2010         [Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
2011         https://bugs.webkit.org/show_bug.cgi?id=52705
2012
2013         This is related to bug 52611. The shadow color alpha must be multiplied
2014         by the context pen alpha. Fixing this results in correct behavior for
2015         Canvas path stroke() and strokeRect() [which relies on stroke()].
2016
2017         Tests: fast/canvas/canvas-strokePath-alpha-shadow.html
2018                fast/canvas/canvas-strokeRect-alpha-shadow.html
2019
2020         * platform/graphics/qt/GraphicsContextQt.cpp:
2021         (WebCore::GraphicsContext::strokePath):
2022
2023 2011-01-19  Darin Fisher  <darin@chromium.org>
2024
2025         Reviewed by Mihai Parparita.
2026
2027         Re-initialize the HistoryItem fully when navigating to a HistoryItem,
2028         or replacing a HistoryItem, results in a different URL.
2029
2030         https://bugs.webkit.org/show_bug.cgi?id=49654
2031
2032         This patch also forces all HistoryItems to record the post-redirect
2033         URL.  Previously, frames would remember the pre-redirect URL.  This is
2034         problematic since other members of the HistoryItem correspond to the
2035         post-redirect URL.
2036
2037         Tests: fast/history/history-replace-updates-current-item.html
2038                http/tests/navigation/redirect-on-back-updates-history-item.html
2039                http/tests/navigation/redirect-on-reload-updates-history-item.html
2040
2041         * history/HistoryItem.cpp:
2042         (WebCore::HistoryItem::HistoryItem):
2043         (WebCore::HistoryItem::reset):
2044         * history/HistoryItem.h:
2045         * loader/HistoryController.cpp:
2046         (WebCore::HistoryController::updateForBackForwardNavigation):
2047         (WebCore::HistoryController::updateForReload):
2048         (WebCore::HistoryController::updateForStandardLoad):
2049         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2050         (WebCore::HistoryController::initializeItem):
2051         (WebCore::HistoryController::createItem):
2052         (WebCore::HistoryController::createItemTree):
2053         (WebCore::HistoryController::updateCurrentItem):
2054         * loader/HistoryController.h:
2055
2056 2011-01-19  Adam Klein  <adamk@chromium.org>
2057
2058         Reviewed by Darin Fisher.
2059
2060         [chromium] Rename ChromiumBridge to PlatformBridge
2061         https://bugs.webkit.org/show_bug.cgi?id=52471
2062
2063         No tests added as this is a rename; no change in behavior.
2064
2065         * WebCore.gypi:
2066         * bindings/v8/V8DOMWindowShell.cpp:
2067         (WebCore::reportFatalErrorInV8):
2068         * page/PageGroup.cpp:
2069         (WebCore::PageGroup::isLinkVisited):
2070         * platform/android/PlatformBridge.h:
2071         * platform/audio/chromium/AudioBusChromium.cpp:
2072         (WebCore::createBusFromInMemoryAudioFile):
2073         * platform/chromium/ChromiumBridge.h: Removed.
2074         * platform/chromium/ChromiumDataObjectLegacy.cpp:
2075         (WebCore::ChromiumDataObjectLegacy::getData):
2076         * platform/chromium/DragDataChromium.cpp:
2077         (WebCore::DragData::asURL):
2078         * platform/chromium/FileSystemChromium.cpp:
2079         (WebCore::deleteFile):
2080         (WebCore::deleteEmptyDirectory):
2081         (WebCore::getFileSize):
2082         (WebCore::getFileModificationTime):
2083         (WebCore::revealFolderInOS):
2084         (WebCore::directoryName):
2085         (WebCore::pathByAppendingComponent):
2086         (WebCore::makeAllDirectories):
2087         (WebCore::fileExists):
2088         (WebCore::openFile):
2089         (WebCore::closeFile):
2090         (WebCore::seekFile):
2091         (WebCore::truncateFile):
2092         (WebCore::readFromFile):
2093         (WebCore::writeToFile):
2094         * platform/chromium/LanguageChromium.cpp:
2095         (WebCore::platformDefaultLanguage):
2096         * platform/chromium/LinkHashChromium.cpp:
2097         (WebCore::visitedLinkHash):
2098         * platform/chromium/MIMETypeRegistryChromium.cpp:
2099         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2100         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2101         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2102         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
2103         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
2104         * platform/chromium/PasteboardChromium.cpp:
2105         (WebCore::Pasteboard::writeSelection):
2106         (WebCore::Pasteboard::writePlainText):
2107         (WebCore::Pasteboard::writeURL):
2108         (WebCore::Pasteboard::writeImage):
2109         (WebCore::Pasteboard::canSmartReplace):
2110         (WebCore::Pasteboard::plainText):
2111         (WebCore::Pasteboard::documentFragment):
2112         * platform/chromium/PlatformBridge.h:
2113         * platform/chromium/PlatformScreenChromium.cpp:
2114         (WebCore::screenDepth):
2115         (WebCore::screenDepthPerComponent):
2116         (WebCore::screenIsMonochrome):
2117         (WebCore::screenRect):
2118         (WebCore::screenAvailableRect):
2119         * platform/chromium/ReadableDataObject.cpp:
2120         (WebCore::ReadableDataObject::getData):
2121         (WebCore::ReadableDataObject::urlTitle):
2122         (WebCore::ReadableDataObject::htmlBaseUrl):
2123         (WebCore::ReadableDataObject::filenames):
2124         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
2125         * platform/chromium/SSLKeyGeneratorChromium.cpp:
2126         (WebCore::signedPublicKeyAndChallengeString):
2127         * platform/chromium/ScrollbarThemeChromium.cpp:
2128         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2129         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
2130         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
2131         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
2132         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
2133         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
2134         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
2135         * platform/chromium/ScrollbarThemeChromiumMac.mm:
2136         (WebCore::scrollbarStateToThemeState):
2137         (WebCore::ScrollbarThemeChromiumMac::paint):
2138         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2139         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
2140         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2141         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2142         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
2143         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
2144         * platform/chromium/SharedTimerChromium.cpp:
2145         (WebCore::setSharedTimerFiredFunction):
2146         (WebCore::setSharedTimerFireTime):
2147         (WebCore::stopSharedTimer):
2148         * platform/chromium/SuddenTerminationChromium.cpp:
2149         (WebCore::disableSuddenTermination):
2150         (WebCore::enableSuddenTermination):
2151         * platform/chromium/SystemTimeChromium.cpp:
2152         (WebCore::currentTime):
2153         * platform/chromium/WritableDataObject.cpp:
2154         (WebCore::WritableDataObject::setData):
2155         * platform/graphics/chromium/CrossProcessFontLoading.mm:
2156         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2157         (WebCore::fontContainsCharacter):
2158         (WebCore::FillLogFont):
2159         * platform/graphics/chromium/FontCacheLinux.cpp:
2160         (WebCore::FontCache::getFontDataForCharacters):
2161         * platform/graphics/chromium/FontChromiumWin.cpp:
2162         (WebCore::Font::drawGlyphs):
2163         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2164         (WebCore::FontPlatformData::scriptFontProperties):
2165         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2166         (WebCore::FontPlatformData::querySystemForRenderStyle):
2167         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
2168         (WebCore::fillBMPGlyphs):
2169         * platform/graphics/chromium/ImageChromium.cpp:
2170         (WebCore::Image::loadPlatformResource):
2171         * platform/graphics/chromium/ImageChromiumMac.mm:
2172         (WebCore::Image::loadPlatformResource):
2173         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
2174         (WebCore::SimpleFontData::platformInit):
2175         (WebCore::SimpleFontData::determinePitch):
2176         (WebCore::SimpleFontData::platformWidthForGlyph):
2177         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
2178         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
2179         * platform/graphics/skia/FontCustomPlatformData.cpp:
2180         (WebCore::FontCustomPlatformData::fontPlatformData):
2181         * platform/network/chromium/CookieJarChromium.cpp:
2182         (WebCore::setCookies):
2183         (WebCore::cookies):
2184         (WebCore::cookieRequestHeaderFieldValue):
2185         (WebCore::cookiesEnabled):
2186         (WebCore::getRawCookies):
2187         (WebCore::deleteCookie):
2188         * platform/network/chromium/DNSChromium.cpp:
2189         (WebCore::prefetchDNS):
2190         * platform/qt/PlatformBridge.h:
2191         * platform/sql/chromium/SQLiteFileSystemChromium.cpp:
2192         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
2193         (WebCore::SQLiteFileSystem::getDatabaseFileSize):
2194         * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
2195         (chromiumOpen):
2196         (chromiumDelete):
2197         (chromiumAccess):
2198         * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp:
2199         * plugins/chromium/PluginDataChromium.cpp:
2200         (WebCore::PluginCache::plugins):
2201         * rendering/RenderThemeChromiumMac.mm:
2202         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
2203         * rendering/RenderThemeChromiumSkia.cpp:
2204         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2205         * rendering/RenderThemeChromiumWin.cpp:
2206         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
2207         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
2208         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
2209         (WebCore::RenderThemeChromiumWin::systemColor):
2210         (WebCore::RenderThemeChromiumWin::paintButton):
2211         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2212         (WebCore::menuListButtonWidth):
2213         (WebCore::RenderThemeChromiumWin::paintMenuList):
2214         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2215         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2216         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2217         * storage/chromium/IDBFactoryBackendInterface.cpp:
2218         (WebCore::IDBFactoryBackendInterface::create):
2219         (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface):
2220         * storage/chromium/IDBKeyPathBackendImpl.cpp:
2221         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2222
2223 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2224
2225         Unreviewed, rolling out r76187.
2226         http://trac.webkit.org/changeset/76187
2227         https://bugs.webkit.org/show_bug.cgi?id=52778
2228
2229         Broke caret-showing tests on SnowLeopard and Chromium
2230         (Requested by dimich on #webkit).
2231
2232         * rendering/RenderText.cpp:
2233         (WebCore::RenderText::localCaretRect):
2234
2235 2011-01-19  Yuzo Fujishima  <yuzo@google.com>
2236
2237         Reviewed by Kent Tamura.
2238
2239         Fix for Bug 52279 - WebCore::RenderBlock::updateFirstLetter crashes for anonymous blocks
2240         https://bugs.webkit.org/show_bug.cgi?id=52279
2241
2242         In constructing text fragments to handle first-letter rule, first add
2243         the text for the non-first letters and then remove the original text,
2244         rather than the other way around. Otherwise, the text can be added to
2245         an anoymous block that is different from the original one. This breaks
2246         the assumption that a first letter render object has a non-null sibling
2247         for the non-first letters and causes a crash.
2248
2249         Test: fast/css/first-letter-anonymous-block-crash.html
2250
2251         * rendering/RenderBlock.cpp:
2252         (WebCore::RenderBlock::updateFirstLetter):
2253
2254 2011-01-19  James Robinson  <jamesr@chromium.org>
2255
2256         Unreviewed, rolling out r76194.
2257         http://trac.webkit.org/changeset/76194
2258         https://bugs.webkit.org/show_bug.cgi?id=51218
2259
2260         Caused mysterious compile failure on the chromium win
2261         build.webkit.org bots
2262
2263         * WebCore.gypi:
2264         * dom/Document.cpp:
2265         (WebCore::Document::Document):
2266         * dom/Document.h:
2267         * dom/RequestAnimationFrameCallback.h: Removed.
2268         * dom/RequestAnimationFrameCallback.idl: Removed.
2269         * loader/EmptyClients.h:
2270         * page/Chrome.cpp:
2271         * page/Chrome.h:
2272         * page/ChromeClient.h:
2273         * page/DOMWindow.cpp:
2274         * page/DOMWindow.h:
2275         * page/DOMWindow.idl:
2276         * page/FrameView.cpp:
2277         * page/FrameView.h:
2278         * platform/HostWindow.h:
2279
2280 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
2281
2282         Reviewed by Sam Weinig.
2283
2284         GraphicsLayers in subframes can get sync'd multiple times
2285         https://bugs.webkit.org/show_bug.cgi?id=52489
2286
2287         Some cleanup that will work towards fixing this bug.
2288         
2289         Tested by existing iframe compositing tests.
2290
2291         * WebCore.exp.in: syncCompositingStateRecursive()
2292         was renamed to syncCompositingStateIncludingSubframes().
2293
2294         * page/FrameView.h:
2295         * page/FrameView.cpp:
2296         (WebCore::FrameView::syncCompositingStateForThisFrame): Some
2297         code cleanup: do all the word we need to do for this frame,
2298         including the needsLayout() check.
2299         (WebCore::FrameView::syncCompositingStateIncludingSubframes):
2300         This is no longer recursive; instead, it iterates over descendant
2301         frames via the frame tree, calling syncCompositingStateForThisFrame()
2302         on each Frame's view.
2303
2304         * rendering/RenderLayerCompositor.h:
2305         (WebCore::RenderLayerCompositor::isFlushingLayers): Getter for the flag.
2306         * rendering/RenderLayerCompositor.cpp: 
2307         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2308         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Maintain
2309         a flag to say if we're flushing, which allows us to assert on re-entrant flushes.
2310         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
2311         Add the ability to get the rootmost compositor that is in the middle
2312         of a flush.
2313
2314 2011-01-19  James Robinson  <jamesr@chromium.org>
2315
2316         Reviewed by Darin Fisher.
2317
2318         Implement mozilla's requestAnimationFrame API
2319         https://bugs.webkit.org/show_bug.cgi?id=51218
2320
2321         This implements mozilla's proposed requestAnimationFrame API.  The idea with this API is that
2322         an author driving an animation from script could use window.requestAnimationFrame(callback)
2323         instead of window.setTimeout(callback, 0) to schedule their update logic and let the browser
2324         decide when to update the animations.  This avoids doing unnecessary work when the page content
2325         is offscreen or is being displayed at a different framerate than what the page author expects.
2326
2327         Mozilla's proposal is here: https://developer.mozilla.org/en/DOM/window.mozRequestAnimationFrame
2328         This implements window.mozRequestAnimationFrame as window.webkitRequestAnimationFrame with the
2329         following changes:
2330         *) Only the callback syntax is supported, there is no before paint event
2331         *) webkitRequestAnimationFrame supports a second parameter Element to let the author indicate
2332             what content they intend to animate.  That way if the page is being displayed but the element
2333             in question is offscreen, we can avoid invoking the callback.
2334         *) No timestamp is provided to the caller and there is no window.animationStartTime property
2335             (see https://bugs.webkit.org/show_bug.cgi?id=51952 for discussion of this property)
2336         *) window.webkitRequestAnimationFrame returns a numerical id that can be used to cancel the callback
2337             using window.cancelWebkitRequestAnimationFrame, to parallel window.setTimeout()/window.clearTime().
2338
2339         The implementation depends on the embedder scheduling the callbacks since the callback invocation
2340         depends on the page's visibility and the embedder's paint scheduling, neither of which are exposed
2341         to WebCore.  The expectation for the embedder is that at some point Chrome::scheduleAnimation() is
2342         called FrameView::serviceScriptedAnimations() should be called for the associated Page's main frame.
2343         Ideally serviceScriptedAnimations() would be called prior to rendering - although in practice the
2344         embedder has to rate limit callbacks and may not be able to tie the callback directly to the
2345         rendering loop.
2346
2347         Tests: fast/animation/request-animation-frame-cancel.html
2348                fast/animation/request-animation-frame-cancel2.html
2349                fast/animation/request-animation-frame-display.html
2350                fast/animation/request-animation-frame-within-callback.html
2351                fast/animation/request-animation-frame.html
2352
2353         * WebCore.gypi:
2354         * dom/Document.cpp:
2355         (WebCore::Document::Document):
2356         (WebCore::Document::webkitRequestAnimationFrame):
2357         (WebCore::Document::webkitCancelRequestAnimationFrame):
2358         (WebCore::Document::serviceScriptedAnimations):
2359         * dom/Document.h:
2360         * dom/RequestAnimationFrameCallback.h: Added.
2361         (WebCore::RequestAnimationFrameCallback::~RequestAnimationFrameCallback):
2362         * dom/RequestAnimationFrameCallback.idl: Added.
2363         * loader/EmptyClients.h:
2364         (WebCore::EmptyChromeClient::scheduleAnimation):
2365         * page/Chrome.cpp:
2366         (WebCore::Chrome::scheduleAnimation):
2367         * page/Chrome.h:
2368         * page/ChromeClient.h:
2369         * page/DOMWindow.cpp:
2370         (WebCore::DOMWindow::webkitRequestAnimationFrame):
2371         (WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
2372         * page/DOMWindow.h:
2373         * page/DOMWindow.idl:
2374         * page/FrameView.cpp:
2375         (WebCore::FrameView::scheduleAnimation):
2376         (WebCore::FrameView::serviceScriptedAnimations):
2377         * page/FrameView.h:
2378         * platform/HostWindow.h:
2379
2380 2011-01-13  Martin Robinson  <mrobinson@igalia.com>
2381
2382         Reviewed by Daniel Bates.
2383
2384         [GTK] Move progress bar painting out of gtk2drawing.c
2385         https://bugs.webkit.org/show_bug.cgi?id=52385
2386
2387         Move progress bar painting to RenderThemeGtk2 and share some animation
2388         logic between the GTK+ 2.x and GTK+ 3.x port.
2389
2390         No new tests. This should not change functionality.
2391
2392         * platform/gtk/RenderThemeGtk.cpp:
2393         (WebCore::RenderThemeGtk::animationRepeatIntervalForProgressBar): Moved from RenderThemeGtk3.
2394         (WebCore::RenderThemeGtk::animationDurationForProgressBar): Ditto.
2395         (WebCore::RenderThemeGtk::calculateProgressRect): Calculate the proper rectangle for the
2396         progress indicator given the rect for the maximum size of the indicator.
2397         * platform/gtk/RenderThemeGtk.h: Added calculateProgressRect declaration and
2398         a new widget member for GTK+ 2.x
2399         * platform/gtk/RenderThemeGtk2.cpp:
2400         (WebCore::RenderThemeGtk::platformInit): Added initialization for the new widget member.
2401         (WebCore::RenderThemeGtk::paintProgressBar): Paint the progress bar manually instead of
2402         calling the old Mozilla code.
2403         (WebCore::RenderThemeGtk::gtkProgressBar): Added.
2404         * platform/gtk/RenderThemeGtk3.cpp:
2405         (WebCore::RenderThemeGtk::paintProgressBar): Call calculateProgressRect now to get
2406         the area of the progress indicator.
2407         * platform/gtk/gtk2drawing.c: Remove unused code.
2408         (moz_gtk_get_widget_border):
2409         (moz_gtk_widget_paint):
2410         * platform/gtk/gtkdrawing.h: Ditto.
2411
2412 2011-01-19  Dmitry Titov  <dimich@chromium.org>
2413
2414         [Chromium] Not reviewed, reverts the following changes:
2415         http://trac.webkit.org/changeset/76164 (build fix)
2416         http://trac.webkit.org/changeset/76159 (main change)
2417
2418         The change broke Chromium Linux-shlib build.
2419
2420         Original issue:
2421         Accelerated canvas2D has bad clipping performance.
2422         https://bugs.webkit.org/show_bug.cgi?id=52627
2423
2424         * WebCore.gyp/WebCore.gyp:
2425         * WebCore.gypi:
2426         * html/canvas/CanvasRenderingContext2D.cpp:
2427         (WebCore::CanvasRenderingContext2D::reset):
2428         (WebCore::CanvasRenderingContext2D::platformLayer):
2429         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2430         (WebCore::DrawingBuffer::DrawingBuffer):
2431         * platform/graphics/chromium/GLES2Canvas.cpp:
2432         (WebCore::GLES2Canvas::State::State):
2433         (WebCore::GLES2Canvas::clearRect):
2434         (WebCore::GLES2Canvas::fillRect):
2435         (WebCore::GLES2Canvas::restore):
2436         (WebCore::GLES2Canvas::drawTexturedRect):
2437         * platform/graphics/chromium/GLES2Canvas.h:
2438         * platform/graphics/gpu/DrawingBuffer.cpp:
2439         (WebCore::DrawingBuffer::clear):
2440         (WebCore::DrawingBuffer::createSecondaryBuffers):
2441         (WebCore::DrawingBuffer::reset):
2442         * platform/graphics/gpu/DrawingBuffer.h:
2443         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2444         (WebCore::SharedGraphicsContext3D::create):
2445         * platform/graphics/gpu/SharedGraphicsContext3D.h:
2446         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2447         (WebCore::DrawingBuffer::DrawingBuffer):
2448         * platform/graphics/skia/GraphicsContextSkia.cpp:
2449         (WebCore::GraphicsContext::canvasClip):
2450         (WebCore::GraphicsContext::clipOut):
2451         (WebCore::GraphicsContext::clipPath):
2452         (WebCore::GraphicsContext::fillPath):
2453         * platform/graphics/skia/PlatformContextSkia.cpp:
2454         (WebCore::PlatformContextSkia::canAccelerate):
2455         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
2456         * thirdparty/glu/README.webkit:
2457         * thirdparty/glu/gluos.h:
2458         * thirdparty/glu/libtess/geom.c:
2459         * thirdparty/glu/libtess/priorityq.c:
2460         * thirdparty/glu/libtess/render.c:
2461         * thirdparty/glu/libtess/sweep.c:
2462         (IsWindingInside):
2463         (DoneEdgeDict):
2464
2465 2011-01-19  Levi Weintraub  <leviw@google.com>
2466
2467         Reviewed by Darin Adler.
2468
2469         Re-committing this with the proper expected results.
2470
2471         Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
2472         logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
2473         resulted in the caret being placed incorrectly in overflowing editable IFrame content.
2474
2475         Long lines in non-white-space-pre editable documents show cursor in wrong place
2476         https://bugs.webkit.org/show_bug.cgi?id=48132
2477
2478         Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
2479
2480         * rendering/RenderText.cpp:
2481         (WebCore::RenderText::localCaretRect):
2482
2483 2011-01-18 MORITA Hajime <morrita@google.com>
2484
2485         Reviewed by David Levin.
2486
2487         ElementRareData::m_shadowRoot should not be RefPtr.
2488         https://bugs.webkit.org/show_bug.cgi?id=51914
2489
2490         Makes ElementRareData::m_shadowRoot a raw pointer because
2491         ElementRareData::m_shadowRoot should be like a
2492         ContaineNode::m_firstChild, which is also a raw pointer.
2493         pointer. Which also means that both the shadow root and the shadow
2494         host reference each other as a parent-and-child relationship, via
2495         a raw pointer.
2496         
2497         Note that it is safe not to manipulate the ref-count of
2498         m_shadowRoot because Node::m_parent of the shadow root points its
2499         shadow host, and the object isn't deleted even if the refcount is
2500         zero, as long as the node has non-null m_parent. (See TreeShared.)
2501         
2502         The shadow root node is finally destroyed inside
2503         removeShadowRoot(), where we store the root node into a local
2504         RefPtr, then make the node's m_parent null, which results the
2505         destroy the node, at the end of the function, by RefPtr::~RefPtr.
2506         
2507         No new tests. No behavioral change.
2508
2509         * dom/Element.cpp:
2510         (WebCore::Element::~Element):
2511         (WebCore::Element::shadowRoot):
2512         (WebCore::Element::setShadowRoot):
2513         (WebCore::Element::removeShadowRoot):
2514         * dom/ElementRareData.h:
2515         (WebCore::ElementRareData::ElementRareData):
2516         (WebCore::ElementRareData::~ElementRareData):
2517
2518 2011-01-12  Martin Robinson  <mrobinson@igalia.com>
2519
2520         Reviewed by Gustavo Noronha Silva.
2521
2522         [GTK] Move text field painting out of gtk2drawing.c
2523         https://bugs.webkit.org/show_bug.cgi?id=52327
2524
2525         No new tests. This should not change behavior.
2526
2527         * platform/gtk/RenderThemeGtk2.cpp:
2528         (WebCore::RenderThemeGtk::paintButton): Use the setWidgetHasFocus helper.
2529         (WebCore::RenderThemeGtk::paintTextField): Do this manually now instead
2530         of calling into the Mozilla code.
2531         * platform/gtk/WidgetRenderingContext.cpp: Added a couple more wrappers
2532         for GTK+ theme functions.
2533         (WebCore::WidgetRenderingContext::gtkPaintFlatBox):
2534         (WebCore::WidgetRenderingContext::gtkPaintShadow):
2535         * platform/gtk/WidgetRenderingContext.h: Added new method declarations.
2536         * platform/gtk/gtk2drawing.c: Remove unused code.
2537         (moz_gtk_get_widget_border):
2538         (moz_gtk_widget_paint):
2539         * platform/gtk/gtkdrawing.h:
2540
2541 2011-01-19  Antti Koivisto  <antti@apple.com>
2542
2543         Reviewed by Oliver Hunt.
2544
2545         Cache function offsets to speed up javascript parsing
2546         https://bugs.webkit.org/show_bug.cgi?id=52622
2547         
2548         Use cache to save function offsets and some other info.
2549         This avoids quite a bit of work when reparsing the source.
2550
2551         * bindings/js/CachedScriptSourceProvider.h:
2552         (WebCore::CachedScriptSourceProvider::cache):
2553         (WebCore::CachedScriptSourceProvider::cacheSizeChanged):
2554         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
2555         * bindings/js/ScriptSourceProvider.h:
2556         (WebCore::ScriptSourceProvider::ScriptSourceProvider):
2557         * loader/cache/CachedScript.cpp:
2558         (WebCore::CachedScript::destroyDecodedData):
2559         (WebCore::CachedScript::sourceProviderCache):
2560         (WebCore::CachedScript::sourceProviderCacheSizeChanged):
2561         * loader/cache/CachedScript.h:
2562
2563 2011-01-11  Martin Robinson  <mrobinson@igalia.com>
2564
2565         Reviewed by Gustavo Noronha Silva.
2566
2567         [GTK] Move toggle button rendering out of gtk2drawing.c
2568         https://bugs.webkit.org/show_bug.cgi?id=52258
2569
2570         * platform/gtk/RenderThemeGtk.h:
2571         * platform/gtk/RenderThemeGtk2.cpp:
2572         (WebCore::RenderThemeGtk::platformInit): Initialize new button members.
2573         (WebCore::adjustRectForFocus): Added this function which inflates a rect based
2574         on a widget's exterior focus.
2575         (WebCore::RenderThemeGtk::adjustRepaintRect): Account for exterior focus.
2576         (WebCore::setToggleSize): Only listen to indicator-size to properly size
2577         checkboxes and radio buttons.
2578         (WebCore::RenderThemeGtk::setCheckboxSize): Call new setToggleSize properly.
2579         (WebCore::paintToggle): Added.
2580         (WebCore::RenderThemeGtk::paintCheckbox): Call paintToggle.
2581         (WebCore::RenderThemeGtk::setRadioSize): Call new setToggleSize properly.
2582         (WebCore::RenderThemeGtk::paintRadio): Call paintToggle.
2583         (WebCore::RenderThemeGtk::gtkRadioButton): Added.
2584         (WebCore::RenderThemeGtk::gtkCheckButton): Added.
2585         * platform/gtk/WidgetRenderingContext.cpp:
2586         (WebCore::WidgetRenderingContext::WidgetRenderingContext): Use a static extra space
2587         variable. This is good enough for all themes that I've tested and prevents having to
2588         pass information from RenderThemeGtk about every single type of widget.
2589         (WebCore::WidgetRenderingContext::gtkPaintFocus): Use the paintRect
2590         to draw instead of m_paintRect. This is important when we're painting
2591         something that isn't the size of the total rect.
2592         (WebCore::WidgetRenderingContext::gtkPaintCheck): Added.
2593         (WebCore::WidgetRenderingContext::gtkPaintOption): Added.
2594         * platform/gtk/WidgetRenderingContext.h: Updated to reflect new methods.
2595         * platform/gtk/gtkdrawing.h: Remove newly unused code.
2596         * platform/gtk/gtk2drawing.c: Ditto.
2597
2598 2011-01-19  Tony Gentilcore  <tonyg@chromium.org>
2599
2600         Unreviewed build fix.
2601
2602         Build fix for r76170
2603         https://bugs.webkit.org/show_bug.cgi?id=52758
2604
2605         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
2606
2607 2011-01-19  David D. Kilzer  <ddkilzer@apple.com>
2608
2609         <http://webkit.org/b/52687> Clean up FrameLoader methods for PLUGIN_PROXY_FOR_VIDEO
2610
2611         Reviewed by Eric Carlson.
2612
2613         * loader/FrameLoader.cpp: Declare the methods here.
2614         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
2615         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
2616         * loader/FrameLoader.cpp: Moved methods to here...
2617         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
2618         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
2619         * loader/SubframeLoader.cpp: ...from here.
2620         (WebCore::FrameLoader::hideMediaPlayerProxyPlugin):
2621         (WebCore::FrameLoader::showMediaPlayerProxyPlugin):
2622
2623 2011-01-19  Tony Gentilcore  <tonyg@chromium.org>
2624
2625         Reviewed by Mihai Parparita.
2626
2627         Perform some forward declaration
2628         https://bugs.webkit.org/show_bug.cgi?id=52522
2629
2630         No new tests because no new functionality.
2631
2632         * accessibility/AccessibilityObject.h:
2633         * css/WebKitCSSMatrix.cpp:
2634         * html/HTMLAreaElement.cpp:
2635         * html/canvas/CanvasRenderingContext2D.cpp:
2636         * inspector/InspectorController.cpp:
2637         * platform/graphics/FloatPoint.cpp:
2638         * platform/graphics/Font.cpp:
2639         * platform/graphics/Font.h:
2640         * platform/graphics/FontFastPath.cpp:
2641         * platform/graphics/GraphicsContext.cpp:
2642         * platform/graphics/ImageBuffer.h:
2643         * platform/graphics/StringTruncator.cpp:
2644         * platform/graphics/WidthIterator.cpp:
2645         * platform/graphics/mac/ComplexTextController.cpp:
2646         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
2647         * platform/graphics/mac/FontComplexTextMac.cpp:
2648         * platform/graphics/transforms/TransformationMatrix.cpp:
2649         * platform/graphics/transforms/TransformationMatrix.h:
2650         * rendering/EllipsisBox.cpp:
2651         * rendering/InlineTextBox.cpp:
2652         * rendering/RenderBlock.cpp:
2653         * rendering/RenderBlockLineLayout.cpp:
2654         * rendering/RenderEmbeddedObject.cpp:
2655         * rendering/RenderFileUploadControl.cpp:
2656         * rendering/RenderFlexibleBox.cpp:
2657         * rendering/RenderImage.cpp:
2658         * rendering/RenderListBox.cpp:
2659         * rendering/RenderListMarker.cpp:
2660         * rendering/RenderMenuList.cpp:
2661         * rendering/RenderObject.h:
2662         * rendering/RenderText.cpp:
2663         * rendering/RenderTextControl.cpp:
2664         * rendering/svg/SVGInlineTextBox.cpp:
2665         * rendering/svg/SVGMarkerLayoutInfo.h:
2666         * rendering/svg/SVGTextMetrics.cpp:
2667         * svg/SVGFont.cpp:
2668
2669 2011-01-19  Adrienne Walker  <enne@google.com>
2670
2671         Reviewed by Kenneth Russell.
2672
2673         [chromium] Tiled compositor should use texture manager
2674         https://bugs.webkit.org/show_bug.cgi?id=52418
2675
2676         Test: compositing/
2677
2678         * platform/graphics/chromium/LayerRendererChromium.cpp:
2679         (WebCore::LayerRendererChromium::~LayerRendererChromium):
2680         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2681         * platform/graphics/chromium/LayerTilerChromium.cpp:
2682         (WebCore::LayerTilerChromium::LayerTilerChromium):
2683         (WebCore::LayerTilerChromium::reset):
2684         (WebCore::LayerTilerChromium::createTile):
2685         (WebCore::LayerTilerChromium::update):
2686         (WebCore::LayerTilerChromium::draw):
2687         * platform/graphics/chromium/LayerTilerChromium.h:
2688         (WebCore::LayerTilerChromium::Tile::Tile):
2689         (WebCore::LayerTilerChromium::Tile::texture):
2690
2691 2011-01-19  Stephen White  <senorblanco@chromium.org>
2692
2693         Unreviewed; build fix for chromium.
2694
2695         * platform/graphics/chromium/GLES2Canvas.cpp:
2696         (WebCore::GLES2Canvas::fillPath):
2697
2698 2011-01-18  Stephen White  <senorblanco@chromium.org>
2699
2700         Reviewed by James Robinson.
2701
2702         Implement accelerated path drawing and clipping for the Canvas2D GPU
2703         path.
2704         https://bugs.webkit.org/show_bug.cgi?id=52627
2705         
2706         This is done with a simple curve interpolator and the GLU tesselator,
2707         which is good enough for a 3-5X speedup on
2708         http://ie.microsoft.com/testdrive/Performance/Galactic/Default.html.
2709
2710         Covered by canvas/philip/2d.path.clip.basic.html, and many, many more.
2711         All tests canvas/philip and fast/canvas paths pass with no
2712         regressions, although two have minor pixel differences which require
2713         rebaselining.
2714
2715         * WebCore.gyp/WebCore.gyp:
2716         Add internal_glu include path to chromium build.
2717         * WebCore.gypi:
2718         Add internal_glu files to chromium build.
2719         * html/canvas/CanvasRenderingContext2D.cpp:
2720         (WebCore::CanvasRenderingContext2D::reset):
2721         (WebCore::CanvasRenderingContext2D::platformLayer):
2722         Make CanvasRenderingContext2D more robust against failure to create
2723         a DrawingBuffer.
2724         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2725         (WebCore::DrawingBuffer::DrawingBuffer):
2726         As in DrawingBufferMac.cpp, call reset() from the constructor.
2727         Also initialize size to (-1, -1), so reset() doesn't early-out.
2728         Add initializers for depthBuffer and stencilBuffer, and remove
2729         multisampleDepthStencilBuffer.
2730         * platform/graphics/chromium/GLES2Canvas.cpp:
2731         Remove some unused #includes.
2732         (WebCore::GLES2Canvas::State::State):
2733         Add clipping state, and implement save/restore via the copy constructor.
2734         (WebCore::operator*):
2735         (WebCore::Quadratic::Quadratic):
2736         (WebCore::Quadratic::fromBezier):
2737         (WebCore::Quadratic::evaluate):
2738         Quadratic Bezier curve class.
2739         (WebCore::Cubic::Cubic):
2740         (WebCore::Cubic::fromBezier):
2741         (WebCore::Cubic::evaluate):
2742         Cubic Bezier curve class.
2743         (WebCore::GLES2Canvas::clearRect):
2744         Add clipping support to clearRect().
2745         (WebCore::GLES2Canvas::fillPath):
2746         Implement fillPath().
2747         (WebCore::GLES2Canvas::fillRect):
2748         Add clipping support to fillRect().
2749         (WebCore::GLES2Canvas::clipPath):
2750         Implement clipPath().
2751         (WebCore::GLES2Canvas::clipOut):
2752         Stub out clipOut() (not called by Canvas 2D).
2753         (WebCore::GLES2Canvas::restore):
2754         When restoring, draw any remaining clipping paths to the stencil buffer.
2755         (WebCore::GLES2Canvas::drawTexturedRect):
2756         Add clipping support.
2757         (WebCore::interpolateQuadratic):
2758         (WebCore::interpolateCubic):
2759         Simple curve interpolation, using the Cubic and Quadratic classes.
2760         (WebCore::PolygonData::PolygonData):
2761         A struct to hold the tesselation data for callbacks.
2762         (WebCore::beginData):
2763         (WebCore::edgeFlagData):
2764         (WebCore::vertexData):
2765         (WebCore::endData):
2766         (WebCore::combineData):
2767         internal_glu tesselation callbacks.
2768         (WebCore::GLES2Canvas::createVertexBufferFromPath):
2769         Build an interpolated, tesselated vertex buffer and element array buffer from a given path, suitable for filling.
2770         (WebCore::GLES2Canvas::beginStencilDraw):
2771         Enable stencilling, and disable draws to the color buffer.
2772         (WebCore::GLES2Canvas::applyClipping):
2773         If clipping is enabled, set the appropriate GL state.
2774         * platform/graphics/chromium/GLES2Canvas.h:
2775         Document the flavours of drawTexturedRect() a bit, so I don't get confused.
2776         * platform/graphics/gpu/DrawingBuffer.cpp:
2777         (WebCore::DrawingBuffer::clear):
2778         (WebCore::DrawingBuffer::createSecondaryBuffers):
2779         (WebCore::DrawingBuffer::resizeDepthStencil):
2780         (WebCore::DrawingBuffer::reset):
2781         * platform/graphics/gpu/DrawingBuffer.h:
2782         Unify m_multisampleDepthStencilBuffer with m_depthStencilBuffer. 
2783         Implement separate depth and stencil buffers for when
2784         OES_packed_depth_stencil is not available.  Refactor creation of
2785         multisampled and non-multisampled depth and stencil buffers into
2786         resizeDepthStencil().
2787         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2788         (WebCore::SharedGraphicsContext3D::create):
2789         Turn on stencil, turn off depth, turn off antialiasing (for now).
2790         (WebCore::SharedGraphicsContext3D::enableStencil):
2791         * platform/graphics/gpu/SharedGraphicsContext3D.h:
2792         Implement stencil enable/disable.
2793         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2794         (WebCore::DrawingBuffer::DrawingBuffer):
2795         Remove m_multisampleDepthStencilBuffer.  Set the size to (-1, -1)
2796         on creation, so reset() doesn't early-out.  Initialize m_depthBuffer
2797         and m_stencilBuffer.
2798         * platform/graphics/skia/GraphicsContextSkia.cpp:
2799         (WebCore::GraphicsContext::canvasClip):
2800         (WebCore::GraphicsContext::clipOut):
2801         (WebCore::GraphicsContext::clipPath):
2802         (WebCore::GraphicsContext::fillPath):
2803         Put in GPU hooks for path clipping, and path drawing.
2804         * platform/graphics/skia/PlatformContextSkia.cpp:
2805         (WebCore::PlatformContextSkia::canAccelerate):
2806         Don't check for clipping paths in canAccelerate() (since we can
2807         now accelerate them).
2808         (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
2809         Don't do clipping when uploading software draws to hardware.
2810         * thirdparty/glu/README.webkit:
2811         * thirdparty/glu/gluos.h:
2812         #undef MIN and MAX, to fix warnings-as-errors in Chrome/Mac build.
2813         * thirdparty/glu/libtess/geom.c:
2814         * thirdparty/glu/libtess/priorityq.c:
2815         * thirdparty/glu/libtess/render.c:
2816         Use do{}while(0) instead of if(1)else construct in macro.
2817         * thirdparty/glu/libtess/sweep.c:
2818         (IsWindingInside):
2819         (DoneEdgeDict):
2820         Fix some warnings treated as errors for the Linux Release build.
2821
2822 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2823
2824         Unreviewed, rolling out r76144.
2825         http://trac.webkit.org/changeset/76144
2826         https://bugs.webkit.org/show_bug.cgi?id=52737
2827
2828         Broke tests on multiple bots, mostly Chromium Canaries
2829         (Requested by dimich on #webkit).
2830
2831         * rendering/RenderText.cpp:
2832         (WebCore::RenderText::localCaretRect):
2833
2834 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
2835
2836         Reviewed by Adam Roben.
2837
2838         [CSS Gradients] Crash due to out-of-memory with repeating-linear-gradient and latter stop positioned before former
2839         https://bugs.webkit.org/show_bug.cgi?id=52732
2840         
2841         When repeating gradient stops, make sure that the first and last stops are not at the same
2842         place, otherwise we'll add stops indefinitely and run out of memory.
2843
2844         Test: fast/gradients/zero-range-repeating-gradient-hang.html
2845
2846         * css/CSSGradientValue.cpp:
2847         (WebCore::CSSGradientValue::addStops):
2848
2849 2011-01-14  Dimitri Glazkov  <dglazkov@chromium.org>
2850
2851         Reviewed by Darin Adler.
2852
2853         Remove event forwarding logic from input[type=range], simplify event flow and thumb positioning logic.
2854         https://bugs.webkit.org/show_bug.cgi?id=52464
2855
2856         This change has two parts:
2857
2858         1) Utilize shadow DOM event retargeting to get rid of forwarding events
2859            via render tree;
2860         2) Move thumb positioning logic from RenderSlider to SliderThumbElement.
2861
2862         These two are highly co-dependent. It looked ugly when I tried to
2863         separate them.
2864
2865         No change in behavior, covered by existing tests.
2866
2867         * html/HTMLInputElement.cpp:
2868         (WebCore::HTMLInputElement::defaultEventHandler): Added invocation of
2869             InputType::handleMouseDownEvent.
2870         * html/InputType.cpp:
2871         (WebCore::InputType::handleMouseDownEvent): Added empty decl.
2872         * html/InputType.h: Added def.
2873         * html/RangeInputType.cpp:
2874         (WebCore::RangeInputType::handleMouseDownEvent): Added to handle the case
2875             when the user clicks on the track of the slider. Also removed the
2876             forwardEvent method.
2877         * html/RangeInputType.h: Added/removed defs.
2878         * html/shadow/SliderThumbElement.cpp:
2879         (WebCore::SliderThumbElement::dragFrom): Added a helper method to start
2880             dragging from any position.
2881         (WebCore::SliderThumbElement::dragTo): Added a helper method to drag to
2882             specified position.
2883         (WebCore::SliderThumbElement::setPosition): Collapsed most of the positioning
2884             logic in RenderSlider into this method, which is now a simple calculation
2885             and adjusting of thumb position based on supplied coordinates.
2886         (WebCore::SliderThumbElement::startDragging): Added.
2887         (WebCore::SliderThumbElement::stopDragging): Added.
2888         (WebCore::SliderThumbElement::defaultEventHandler): Removed most of the
2889             old position-sniffing logic and replaced with simple calls to start,
2890             stop, and drag the thumb.
2891         * html/shadow/SliderThumbElement.h: Added defs.
2892         * rendering/RenderSlider.cpp: Removed a bunch of code that is no longer
2893             necessary.
2894         * rendering/RenderSlider.h: Removed defs, removed now-unnecessary friendliness.
2895
2896 2011-01-19  Shane Stephens  <shanestephens@google.com>
2897
2898         Reviewed by Chris Marrin.
2899
2900         Make AffineTransform and TransformationMatrix do matrix multiplication in the correct order (Column Major)
2901         https://bugs.webkit.org/show_bug.cgi?id=48031
2902
2903         Fixed reversal, renamed matrix methods to be clearer, found all examples of operator* and
2904         operator*= usage and switched operand order.
2905
2906         No new tests as this refactor doesn't add functionality.
2907
2908         * html/HTMLCanvasElement.cpp:
2909         (WebCore::HTMLCanvasElement::baseTransform):
2910         * html/canvas/CanvasRenderingContext2D.cpp:
2911         (WebCore::CanvasRenderingContext2D::transform):
2912         (WebCore::CanvasRenderingContext2D::setTransform):
2913         * platform/graphics/cg/PatternCG.cpp:
2914         (WebCore::Pattern::createPlatformPattern):
2915         * platform/graphics/chromium/GLES2Canvas.cpp:
2916         (WebCore::GLES2Canvas::fillRect):
2917         (WebCore::GLES2Canvas::concatCTM):
2918         (WebCore::GLES2Canvas::drawQuad):
2919         * platform/graphics/chromium/TransparencyWin.cpp:
2920         (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
2921         (WebCore::TransparencyWin::setupTransformForKeepTransform):
2922         * platform/graphics/transforms/AffineTransform.cpp:
2923         (WebCore::AffineTransform::multiply):
2924         (WebCore::AffineTransform::rotate):
2925         * platform/graphics/transforms/AffineTransform.h:
2926         (WebCore::AffineTransform::operator*=):
2927         (WebCore::AffineTransform::operator*):
2928         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2929         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
2930         * platform/graphics/wince/SharedBitmap.cpp:
2931         (WebCore::SharedBitmap::drawPattern):
2932         * rendering/svg/RenderSVGResourceContainer.cpp:
2933         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
2934         * rendering/svg/RenderSVGResourceGradient.cpp:
2935         (WebCore::clipToTextMask):
2936         (WebCore::RenderSVGResourceGradient::applyResource):
2937         * rendering/svg/RenderSVGResourcePattern.cpp:
2938         (WebCore::RenderSVGResourcePattern::applyResource):
2939         * rendering/svg/RenderSVGRoot.cpp:
2940         (WebCore::RenderSVGRoot::localToBorderBoxTransform):
2941         * rendering/svg/SVGImageBufferTools.cpp:
2942         (WebCore::SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem):
2943         (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer):
2944         * rendering/svg/SVGTextLayoutEngine.cpp:
2945         (WebCore::SVGTextLayoutEngine::finalizeTransformMatrices):
2946         * svg/SVGLocatable.cpp:
2947         (WebCore::SVGLocatable::computeCTM):
2948         (WebCore::SVGLocatable::getTransformToElement):
2949         * svg/SVGMatrix.h:
2950         (WebCore::SVGMatrix::multiply):
2951         * svg/SVGSVGElement.cpp:
2952         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2953         (WebCore::SVGSVGElement::viewBoxToViewTransform):
2954         * svg/SVGStyledTransformableElement.cpp:
2955         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
2956         * svg/SVGTextElement.cpp:
2957         (WebCore::SVGTextElement::animatedLocalTransform):
2958         * svg/SVGTransformList.cpp:
2959         (WebCore::SVGTransformList::concatenate):
2960
2961 2011-01-19  Chang Shu  <chang.shu@nokia.com>
2962
2963         Reviewed by Darin Adler.
2964
2965         The return value of contentEditable() function should depend on the DOM attribute
2966         instead of render style userModify. The code change fixed test cases in the bug
2967         and partially fixed test cases in other contentEditable bugs;
2968
2969         https://bugs.webkit.org/show_bug.cgi?id=52056
2970
2971         * html/HTMLElement.cpp:
2972         (WebCore::HTMLElement::contentEditable):
2973
2974 2011-01-19  Levi Weintraub  <leviw@chromium.org>
2975
2976         Reviewed by Darin Adler.
2977
2978         Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
2979         logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
2980         resulted in the caret being placed incorrectly in overflowing editable IFrame content.
2981
2982         Long lines in non-white-space-pre editable documents show cursor in wrong place
2983         https://bugs.webkit.org/show_bug.cgi?id=48132
2984
2985         Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
2986
2987         * rendering/RenderText.cpp:
2988         (WebCore::RenderText::localCaretRect):
2989
2990 2011-01-19  Chris Marrin  <cmarrin@apple.com>
2991
2992         Reviewed by Simon Fraser.
2993
2994         WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
2995         https://bugs.webkit.org/show_bug.cgi?id=52695
2996
2997         Added ASSERTs to the places we assume a non-null superlayer.
2998
2999         * platform/graphics/ca/GraphicsLayerCA.cpp:
3000         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3001         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3002
3003 2011-01-18  Beth Dakin  <bdakin@apple.com>
3004
3005         Reviewed by Maciej Stachowiak.
3006
3007         Fix for <rdar://problem/8882916> Overlay scrollers require 
3008         content to layout underneath the scrollbar area
3009
3010         The render tree should not include scrollbar size for
3011         overlay scrollers. This patch will allow scrollers on
3012         the WebView to behave like overflow:overlay.
3013
3014         Treat overlay scrollers the same way as the !includeScrollbars
3015         case.
3016         * platform/ScrollView.cpp:
3017         (WebCore::ScrollView::visibleContentRect):
3018
3019         No corner rect for overlay scrollers.
3020         (WebCore::ScrollView::scrollCornerRect):
3021
3022         usesOverlayScrollbars() currently always returns no.
3023         * platform/ScrollbarTheme.h:
3024         (WebCore::ScrollbarTheme::usesOverlayScrollbars):
3025         * platform/mac/ScrollbarThemeMac.h:
3026         * platform/mac/ScrollbarThemeMac.mm:
3027         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
3028
3029         includeVerticalScrollbarSize() and includeHorizontalScrollbarSize()
3030         should return false for overlay scrollers. They already return
3031         false for overflow:overlay.
3032         * rendering/RenderBox.cpp:
3033         (WebCore::RenderBox::includeVerticalScrollbarSize):
3034         (WebCore::RenderBox::includeHorizontalScrollbarSize):
3035         * rendering/RenderBox.h:
3036
3037         In the render tree, always treat overlay scrollers like
3038         they have a width and height of 0.
3039         * rendering/RenderLayer.cpp:
3040         (WebCore::RenderLayer::verticalScrollbarWidth):
3041         (WebCore::RenderLayer::horizontalScrollbarHeight):
3042         * rendering/RenderListBox.cpp:
3043         (WebCore::RenderListBox::verticalScrollbarWidth):
3044
3045 2011-01-18  Evan Martin  <evan@chromium.org>
3046
3047         Reviewed by Tony Chang.
3048
3049         [chromium] simplify complex text code, fixing a handful of layout tests
3050         https://bugs.webkit.org/show_bug.cgi?id=52661
3051
3052         Change ComplexTextControllerLinux to lay out RTL text to the left from
3053         the starting point.  (Previously it always went to the right.)  This allows
3054         us to map pixel offsets more directly into offsets within the text runs,
3055         simplifying a few of the text-fiddling functions (they no longer need to
3056         track the current position, as ComplexTextController now does it).
3057
3058         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
3059         (WebCore::ComplexTextController::ComplexTextController):
3060         (WebCore::ComplexTextController::reset):
3061         (WebCore::ComplexTextController::setGlyphXPositions):
3062         * platform/graphics/chromium/ComplexTextControllerLinux.h:
3063         (WebCore::ComplexTextController::offsetX):
3064         * platform/graphics/chromium/FontLinux.cpp:
3065         (WebCore::Font::drawComplexText):
3066         (WebCore::Font::floatWidthForComplexText):
3067         (WebCore::glyphIndexForXPositionInScriptRun):
3068         (WebCore::Font::offsetForPositionForComplexText):
3069         (WebCore::Font::selectionRectForComplexText):
3070
3071 2011-01-19  Pavel Feldman  <pfeldman@chromium.org>
3072
3073         Reviewed by Yury Semikhatsky.
3074
3075         Web Inspector: move methods from InjectedScript domain into DOM,
3076         Runtime and Debugger domains. Introduce InspectorRuntimeAgent.
3077         https://bugs.webkit.org/show_bug.cgi?id=52717
3078
3079         * CMakeLists.txt:
3080         * GNUmakefile.am:
3081         * WebCore.gypi:
3082         * WebCore.pro:
3083         * WebCore.vcproj/WebCore.vcproj:
3084         * WebCore.xcodeproj/project.pbxproj:
3085         * inspector/CodeGeneratorInspector.pm:
3086         * inspector/InjectedScript.cpp:
3087         (WebCore::InjectedScript::evaluateOnCallFrame):
3088         (WebCore::InjectedScript::getCompletions):
3089         (WebCore::InjectedScript::getCompletionsOnCallFrame):
3090         * inspector/InjectedScript.h:
3091         * inspector/InjectedScriptHost.cpp:
3092         (WebCore::InjectedScriptHost::injectedScriptForMainWorld):
3093         * inspector/InjectedScriptHost.h:
3094         * inspector/InjectedScriptSource.js:
3095         (.):
3096         ():
3097         * inspector/Inspector.idl:
3098         * inspector/InspectorController.cpp:
3099         (WebCore::InspectorController::connectFrontend):
3100         (WebCore::InspectorController::releaseFrontendLifetimeAgents):
3101         * inspector/InspectorController.h:
3102         * inspector/InspectorDOMAgent.cpp:
3103         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
3104         (WebCore::InspectorDOMAgent::resolveNode):
3105         (WebCore::InspectorDOMAgent::getNodeProperties):
3106         (WebCore::InspectorDOMAgent::getNodePrototypes):
3107         (WebCore::InspectorDOMAgent::injectedScriptForNodeId):
3108         * inspector/InspectorDOMAgent.h:
3109         (WebCore::EventListenerInfo::EventListenerInfo):
3110         (WebCore::InspectorDOMAgent::DOMListener::~DOMListener):
3111         (WebCore::InspectorDOMAgent::create):
3112         (WebCore::InspectorDOMAgent::cast):
3113         (WebCore::InspectorDOMAgent::documents):
3114         * inspector/InspectorDebuggerAgent.cpp:
3115         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
3116         (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
3117         (WebCore::InspectorDebuggerAgent::injectedScriptForCallFrameId):
3118         * inspector/InspectorDebuggerAgent.h:
3119         * inspector/InspectorRuntimeAgent.cpp: Added.
3120         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
3121         (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent):
3122         (WebCore::InspectorRuntimeAgent::evaluate):
3123         (WebCore::InspectorRuntimeAgent::getCompletions):
3124         (WebCore::InspectorRuntimeAgent::getProperties):
3125         (WebCore::InspectorRuntimeAgent::setPropertyValue):
3126         (WebCore::InspectorRuntimeAgent::pushNodeToFrontend):
3127         (WebCore::InspectorRuntimeAgent::injectedScriptForObjectId):
3128         * inspector/InspectorRuntimeAgent.h: Copied from Source/WebCore/inspector/InjectedScript.h.
3129         (WebCore::InspectorRuntimeAgent::create):
3130         * inspector/front-end/ConsoleView.js:
3131         (WebInspector.ConsoleView.prototype.completions):
3132         * inspector/front-end/ScriptsPanel.js:
3133         (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
3134
3135 2011-01-18  Pavel Podivilov  <podivilov@chromium.org>
3136
3137         Reviewed by Yury Semikhatsky.
3138
3139         Web Inspector: add UglifyJS parser and formatter files
3140         https://bugs.webkit.org/show_bug.cgi?id=51702
3141
3142         * WebCore.gypi:
3143         * WebCore.vcproj/WebCore.vcproj:
3144         * inspector/front-end/ScriptFormatter.js:
3145         (WebInspector.ScriptFormatter.positionToLocation):
3146         (WebInspector.ScriptFormatter.prototype.format.messageHandler):
3147         (WebInspector.ScriptFormatter.prototype.format):
3148         (WebInspector.ScriptFormatter.prototype._buildMapping):
3149         (WebInspector.ScriptFormatter.prototype._convertPosition):
3150         * inspector/front-end/SourceFrame.js:
3151         (WebInspector.SourceFrame.prototype.formatSource.didFormat):
3152         (WebInspector.SourceFrame.prototype.formatSource):
3153         * inspector/front-end/WebKit.qrc:
3154         * inspector/front-end/parse-js.js: Added. UglifyJS parser.
3155         * inspector/front-end/process.js: Added. UglifyJS formatter.
3156         * inspector/front-end/scriptFormatterWorker.js: Added. Worker script that wraps UglifyJS code.
3157         (onmessage):
3158         (beautify):
3159         (loadModule):
3160         (require):
3161         * inspector/front-end/utilities.js:
3162         ():
3163
3164 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
3165
3166         Reviewed by Yury Semikhatsky.
3167
3168         Web Inspector: [JSC] scripts have incorrect starting line (always 1).
3169         https://bugs.webkit.org/show_bug.cgi?id=52721
3170
3171         Test: inspector/debugger-scripts.html
3172
3173         * bindings/js/ScriptDebugServer.cpp:
3174         (WebCore::ScriptDebugServer::dispatchDidParseSource):
3175         (WebCore::ScriptDebugServer::dispatchFailedToParseSource):
3176         (WebCore::ScriptDebugServer::sourceParsed):
3177         * bindings/js/ScriptDebugServer.h:
3178         * bindings/js/ScriptSourceCode.h:
3179         (WebCore::ScriptSourceCode::ScriptSourceCode):
3180         * bindings/js/StringSourceProvider.h:
3181         (WebCore::StringSourceProvider::create):
3182         (WebCore::StringSourceProvider::startPosition):
3183         (WebCore::StringSourceProvider::StringSourceProvider):
3184
3185 2011-01-19  Satish Sampath  <satish@chromium.org>
3186
3187         Reviewed by Jeremy Orlow.
3188
3189         Send origin/url as part of speech input requests to the embedder.
3190         https://bugs.webkit.org/show_bug.cgi?id=52718
3191
3192         * page/SpeechInput.cpp:
3193         (WebCore::SpeechInput::startRecognition): Pass up additional origin parameter.
3194         * page/SpeechInput.h:
3195         * page/SpeechInputClient.h:
3196         * platform/mock/SpeechInputClientMock.cpp:
3197         (WebCore::SpeechInputClientMock::startRecognition): Updated prototype.
3198         * platform/mock/SpeechInputClientMock.h:
3199         * rendering/TextControlInnerElements.cpp:
3200         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Pass the frame origin to speech input request.
3201
3202 2011-01-19  Hans Wennborg  <hans@chromium.org>
3203
3204         Reviewed by Jeremy Orlow.
3205
3206         IndexedDB: Support auto-increment keys
3207         https://bugs.webkit.org/show_bug.cgi?id=52576
3208
3209         Add support for auto-increment keys.
3210
3211         Test: storage/indexeddb/objectstore-autoincrement.html
3212
3213         * storage/IDBDatabase.cpp:
3214         (WebCore::IDBDatabase::createObjectStore):
3215         * storage/IDBObjectStoreBackendImpl.cpp:
3216         (WebCore::genAutoIncrementKey):
3217         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3218
3219 2011-01-19  Csaba Osztrogonác  <ossy@webkit.org>
3220
3221         Reviewed by Laszlo Gombos and Tor Arne Vestbø.
3222
3223         [Qt] Remove unnecessary "../Source" from paths
3224         after moving source files into Source is finished.
3225
3226         * WebCore.pri:
3227         * WebCore.pro:
3228
3229 2011-01-19  Alexander Pavlov  <apavlov@chromium.org>
3230
3231         Reviewed by Pavel Feldman.
3232
3233         Web Inspector: Employ TextPrompt for CSS property name/value autocompletion
3234         https://bugs.webkit.org/show_bug.cgi?id=52212
3235
3236         WebInspector.CSSKeywordCompletions contains a hand-written list of accepted CSS property value keywords
3237         for each property. WebInspector.TextPrompt is used to suggest both the name and value keywords while
3238         editing styles, in place of the old custom suggestion code.
3239
3240         * inspector/front-end/CSSCompletions.js:
3241         (WebInspector.CSSCompletions.prototype.startsWith): Fix array-out-of-bounds error.
3242         * inspector/front-end/CSSKeywordCompletions.js: Added.
3243         (WebInspector.CSSKeywordCompletions.forProperty):
3244         * inspector/front-end/StylesSidebarPane.js:
3245         (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
3246         (WebInspector.StylePropertyTreeElement.prototype):
3247         ():
3248         * inspector/front-end/TextPrompt.js:
3249         (WebInspector.TextPrompt):
3250         (WebInspector.TextPrompt.prototype.removeFromElement):
3251         (WebInspector.TextPrompt.prototype._onKeyDown):
3252         (WebInspector.TextPrompt.prototype.tabKeyPressed):
3253         (WebInspector.TextPrompt.prototype.upKeyPressed):
3254         (WebInspector.TextPrompt.prototype.downKeyPressed):
3255         (WebInspector.TextPrompt.prototype._moveBackInHistory):
3256         (WebInspector.TextPrompt.prototype._moveForwardInHistory):
3257         * inspector/front-end/inspector.css:
3258         (.auto-complete-text, .editing .auto-complete-text):
3259         * inspector/front-end/inspector.html:
3260
3261 2011-01-19  Dai Mikurube  <dmikurube@google.com>
3262
3263         Reviewed by Kent Tamura.
3264
3265         Implement onformchange and onforminput event handlers
3266         https://bugs.webkit.org/show_bug.cgi?id=26141
3267
3268         Tests: fast/forms/formchange-event.html
3269                fast/forms/forminput-event.html
3270
3271         * bindings/scripts/CodeGeneratorGObject.pm: Added event names.
3272         * dom/Document.h: Added event definitions.
3273         * dom/Document.idl: Added event definitions.
3274         * dom/Element.h: Added event definitions.
3275         * dom/Element.idl: Added event definitions.
3276         * dom/Event.cpp:
3277         (WebCore::Event::fromUserGesture): Added a condition for a formchange event in handling user gestures.
3278         * dom/EventNames.h: Added event definitions.
3279         * dom/InputElement.cpp:
3280         (WebCore::InputElement::setValueFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents(), a virtual function which broadcasts forminput events for HTML elements.
3281         * dom/Node.cpp:
3282         (WebCore::Node::dispatchInputEvents): Defined basic dispatchInputEvents() described above.
3283         (WebCore::Node::dispatchChangeEvents): Defined basic dispatchChangeEvents() described above.
3284         (WebCore::Node::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().
3285         * dom/Node.h:
3286         * html/FormAssociatedElement.h: Added isResettable() to check the element is resettable or not.
3287         * html/HTMLAttributeNames.in: Added event names.
3288         * html/HTMLElement.cpp:
3289         (WebCore::HTMLElement::parseMappedAttribute): Added event handling.
3290         (WebCore::HTMLElement::shadowAncestorOwnerForm): Added to get an ancestor <form> element from a shadow element.
3291         (WebCore::HTMLElement::dispatchChangeEvents): Defined dispatchChangeEvents() for HTML elements described above.
3292         (WebCore::HTMLElement::dispatchInputEvents): Defined dispatchInputEvents() for HTML elements described above.
3293         * html/HTMLElement.h:
3294         * html/HTMLFormControlElement.cpp:
3295         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent): Added calling dispatchFormChange() to broadcast formchange events.
3296         (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): Defined newly to dispatch an input event with broadcasting forminput events.
3297         * html/HTMLFormControlElement.h: Added isResettable().
3298         * html/HTMLFormElement.cpp:
3299         (WebCore::HTMLFormElement::broadcastFormEvent): Added to broadcast forminput or formchange events.
3300         (WebCore::HTMLFormElement::dispatchFormInput): Defined newly to broadcast forminput events.
3301         (WebCore::HTMLFormElement::dispatchFormChange): Defined newly to broadcast formchange events.
3302         * html/HTMLFormElement.h:
3303         * html/HTMLFormElement.idl: Added dispatchFormInput() and dispatchFormChange() DOM API definitions.
3304         * html/HTMLInputElement.cpp:
3305         (WebCore::HTMLInputElement::stepUpFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents().
3306         * html/HTMLInputElement.h: Added isResettable().
3307         * html/HTMLKeygenElement.h: Added isResettable().
3308         * html/HTMLObjectElement.h: Added isResettable().
3309         * html/HTMLOutputElement.h: Added isResettable().
3310         * html/HTMLSelectElement.h: Added isResettable().
3311         * html/HTMLTextAreaElement.h: Added isResettable().
3312         * page/DOMWindow.h: Added event definitions.
3313         * page/DOMWindow.idl: Added event definitions.
3314         * rendering/TextControlInnerElements.cpp:
3315         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().
3316
3317 2011-01-19  Andrey Kosyakov  <caseq@chromium.org>
3318
3319         Reviewed by Pavel Feldman.
3320
3321         Web Inspector: [Extensions API] delete pending callback from callback map before invoking it
3322         https://bugs.webkit.org/show_bug.cgi?id=52707
3323
3324         * inspector/front-end/ExtensionAPI.js:
3325         (WebInspector.injectedExtensionAPI.ExtensionServerClient.prototype._onCallback):
3326
3327 2011-01-19  Levi Weintraub  <leviw@google.com>
3328
3329         Reviewed by Ryosuke Niwa.
3330
3331         Replaced rangeCompliantEquivalent with Position::parentAnchoredEquivalent
3332         and simplified the logic a bit. Unfortunately, Tables and some legacy
3333         editing positions still need to be handled specifically.
3334
3335         remove rangeCompliantEquivalent and replace it with Position methods
3336         https://bugs.webkit.org/show_bug.cgi?id=25057
3337
3338         No new tests as this is a refactor that doesn't change behavior.
3339
3340         * WebCore.exp.in:
3341         * dom/Document.cpp:
3342         (WebCore::Document::caretRangeFromPoint):
3343         * dom/Position.cpp:
3344         (WebCore::Position::parentAnchoredEquivalent):
3345         * dom/Position.h:
3346         * editing/ApplyStyleCommand.cpp:
3347         (WebCore::ApplyStyleCommand::applyBlockStyle):
3348         * editing/CompositeEditCommand.cpp:
3349         (WebCore::CompositeEditCommand::insertNodeAt):
3350         (WebCore::CompositeEditCommand::moveParagraphs):
3351         * editing/DeleteSelectionCommand.cpp:
3352         (WebCore::DeleteSelectionCommand::initializePositionData):
3353         (WebCore::DeleteSelectionCommand::mergeParagraphs):
3354         * editing/Editor.cpp:
3355         (WebCore::Editor::textDirectionForSelection):
3356         (WebCore::Editor::advanceToNextMisspelling):
3357         * editing/InsertLineBreakCommand.cpp:
3358         (WebCore::InsertLineBreakCommand::shouldUseBreakElement):
3359         * editing/InsertParagraphSeparatorCommand.cpp:
3360         (WebCore::InsertParagraphSeparatorCommand::doApply):
3361         * editing/ReplaceSelectionCommand.cpp:
3362         (WebCore::handleStyleSpansBeforeInsertion):
3363         * editing/VisiblePosition.cpp:
3364         (WebCore::makeRange):
3365         (WebCore::setStart):
3366         (WebCore::setEnd):
3367         * editing/VisibleSelection.cpp:
3368         (WebCore::VisibleSelection::firstRange):
3369         (WebCore::VisibleSelection::toNormalizedRange):
3370         (WebCore::makeSearchRange):
3371         * editing/htmlediting.cpp:
3372         (WebCore::indexForVisiblePosition):
3373         * editing/htmlediting.h:
3374         * editing/visible_units.cpp:
3375         (WebCore::previousBoundary):
3376         (WebCore::nextBoundary):
3377         * page/DOMSelection.cpp:
3378         (WebCore::anchorPosition):
3379         (WebCore::focusPosition):
3380         (WebCore::basePosition):
3381         (WebCore::extentPosition):
3382
3383 2011-01-19  Peter Rybin  <peter.rybin@gmail.com>
3384
3385         Reviewed by Yury Semikhatsky.
3386
3387         Web Inspector: script column offset is incorrect
3388         https://bugs.webkit.org/show_bug.cgi?id=52580
3389
3390         Column is updated in 3 places, 2 less probable places contained error.
3391         Fixed now.
3392
3393         * platform/text/SegmentedString.cpp:
3394         (WebCore::SegmentedString::advanceSlowCase):
3395         * platform/text/SegmentedString.h:
3396         (WebCore::SegmentedString::advancePastNewline):
3397
3398 2011-01-18  Pavel Feldman  <pfeldman@chromium.org>
3399
3400         Reviewed by Yury Semikhatsky.
3401
3402         Web Inspector: make InjectedScriptAccess API a part of Web Inspector protocol.
3403         https://bugs.webkit.org/show_bug.cgi?id=52652
3404
3405         Calls served by the InjectedScript should be first class protocol
3406         citizens, not dispatched via single protocol message.
3407
3408         * WebCore.gypi:
3409         * WebCore.vcproj/WebCore.vcproj:
3410         * inspector/CodeGeneratorInspector.pm:
3411         * inspector/InjectedScript.cpp:
3412         (WebCore::InjectedScript::evaluate):
3413         (WebCore::InjectedScript::evaluateInCallFrame):
3414         (WebCore::InjectedScript::evaluateOnSelf):
3415         (WebCore::InjectedScript::getCompletions):
3416         (WebCore::InjectedScript::getProperties):
3417         (WebCore::InjectedScript::pushNodeToFrontend):
3418         (WebCore::InjectedScript::resolveNode):
3419         (WebCore::InjectedScript::getNodeProperties):
3420         (WebCore::InjectedScript::getNodePrototypes):
3421         (WebCore::InjectedScript::setPropertyValue):
3422         (WebCore::InjectedScript::makeCall):
3423         * inspector/InjectedScript.h:
3424         * inspector/InjectedScriptHost.cpp:
3425         (WebCore::InjectedScriptHost::evaluate):
3426         (WebCore::InjectedScriptHost::evaluateInCallFrame):
3427         (WebCore::InjectedScriptHost::evaluateOnSelf):
3428         (WebCore::InjectedScriptHost::getCompletions):
3429         (WebCore::InjectedScriptHost::getProperties):
3430         (WebCore::InjectedScriptHost::pushNodeToFrontend):
3431         (WebCore::InjectedScriptHost::resolveNode):
3432         (WebCore::InjectedScriptHost::getNodeProperties):
3433         (WebCore::InjectedScriptHost::getNodePrototypes):
3434         (WebCore::InjectedScriptHost::setPropertyValue):
3435         (WebCore::InjectedScriptHost::injectedScriptForObjectId):
3436         (WebCore::InjectedScriptHost::injectedScriptForNodeId):
3437         (WebCore::InjectedScriptHost::injectedScriptForMainWorld):
3438         * inspector/InjectedScriptHost.h:
3439         * inspector/InjectedScriptSource.js:
3440         (.):
3441         * inspector/Inspector.idl:
3442         * inspector/InspectorController.cpp:
3443         * inspector/InspectorController.h:
3444         * inspector/InspectorValues.cpp:
3445         (WebCore::InspectorObject::getNumber):
3446         * inspector/InspectorValues.h:
3447         * inspector/front-end/AuditRules.js:
3448         (WebInspector.AuditRules.evaluateInTargetWindow):
3449         * inspector/front-end/ConsoleView.js:
3450         (WebInspector.ConsoleView.prototype.completions):
3451         (WebInspector.ConsoleView.prototype.doEvalInWindow):
3452         * inspector/front-end/ElementsTreeOutline.js:
3453         (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
3454         * inspector/front-end/ExtensionPanel.js:
3455         (WebInspector.ExtensionWatchSidebarPane.prototype.setExpression):
3456         * inspector/front-end/ExtensionServer.js:
3457         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
3458         * inspector/front-end/InjectedScriptAccess.js: Removed.
3459         * inspector/front-end/PropertiesSidebarPane.js:
3460         (WebInspector.PropertiesSidebarPane.prototype.update.callback):
3461         (WebInspector.PropertiesSidebarPane.prototype.update):
3462         * inspector/front-end/RemoteObject.js:
3463         (WebInspector.RemoteObject.resolveNode):
3464         (WebInspector.RemoteObject.prototype.getProperties):
3465         (WebInspector.RemoteObject.prototype.setPropertyValue):
3466         (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
3467         * inspector/front-end/ScriptsPanel.js:
3468         (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame):
3469         * inspector/front-end/WebKit.qrc:
3470         * inspector/front-end/inspector.html:
3471
3472 2011-01-18  Anton Muhin  <antonm@chromium.org>
3473
3474         Reviewed by Adam Barth.
3475
3476         [v8] Minor cleanup: make 2nd argument of removeIfPresnt accept only a value type stored in the DOM map
3477         https://bugs.webkit.org/show_bug.cgi?id=51683
3478
3479         Covered by the existing tests.
3480
3481         * bindings/v8/DOMDataStore.cpp:
3482         (WebCore::DOMDataStore::weakNodeCallback):
3483         (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::removeIfPresent):
3484         * bindings/v8/DOMDataStore.h:
3485         * bindings/v8/V8DOMMap.h:
3486         (WebCore::WeakReferenceMap::removeIfPresent):
3487
3488 2011-01-18 MORITA Hajime  <morrita@google.com>
3489
3490         Reviewed by Ryosuke Niwa.
3491         
3492         Refactoring: EventHandler::handleTextInputEvent should accept an enum instead of bools.
3493         https://bugs.webkit.org/show_bug.cgi?id=52608
3494
3495         No new tests. no behavioral change.
3496
3497         * GNUmakefile.am:
3498         * WebCore.gypi:
3499         * WebCore.pro:
3500         * WebCore.vcproj/WebCore.vcproj:
3501         * WebCore.xcodeproj/project.pbxproj:
3502         * dom/TextEvent.cpp:
3503         (WebCore::TextEvent::create):
3504         (WebCore::TextEvent::createForDrop):
3505         (WebCore::TextEvent::TextEvent):
3506         * dom/TextEvent.h:
3507         (WebCore::TextEvent::isLineBreak):
3508         (WebCore::TextEvent::isBackTab):
3509         (WebCore::TextEvent::isPaste):
3510         (WebCore::TextEvent::isDrop):
3511         * dom/TextEventInputType.h: Added. Extracted from TextEvent::TextInputType.
3512         * editing/EditorCommand.cpp:
3513         (WebCore::executeInsertBacktab):
3514         (WebCore::executeInsertLineBreak):
3515         (WebCore::executeInsertNewline):
3516         (WebCore::executeInsertTab):
3517         * page/EventHandler.cpp:
3518         (WebCore::EventHandler::handleTextInputEvent):
3519         * page/EventHandler.h:
3520
3521 2011-01-18  Ben Vanik  <ben.vanik@gmail.com>
3522
3523         Reviewed by Kenneth Russell.
3524
3525         Updating ANGLE in WebKit to r533.
3526         https://bugs.webkit.org/show_bug.cgi?id=47194
3527
3528         * platform/graphics/ANGLEWebKitBridge.cpp:
3529         (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
3530         (WebCore::ANGLEWebKitBridge::~ANGLEWebKitBridge):
3531         (WebCore::ANGLEWebKitBridge::validateShaderSource):
3532         Update to new ANGLE API for shader validation.
3533         * platform/graphics/ANGLEWebKitBridge.h:
3534         (WebCore::ANGLEWebKitBridge::setResources): 
3535         Renaming types to new names.
3536         * platform/graphics/mac/GraphicsContext3DMac.mm:
3537         (WebCore::GraphicsContext3D::GraphicsContext3D):
3538         Initialize ANGLEResources with ANGLE init call to prevent uninitialized variables.
3539
3540 2011-01-18  MORITA Hajime  <morrita@google.com>
3541
3542         Reviewed by Simon Fraser.
3543
3544         Refactoring: Extract RoundedIntRect class
3545         https://bugs.webkit.org/show_bug.cgi?id=51664
3546
3547         RoundedIntRect is a pair of rect and four IntSize objects which represent
3548         corner radii of the rectangle. IntSize is grouped into RoundedIntRect::Radii.
3549         Now RenderStyle::getRoundedBorderFor() and RenderStyle::getRoundedInnerBorderWithBorderWidths()
3550         return RoundedIntRect and GraphicsContext::addRoundedRectClip(), GraphicsContext::fillRoundedRect()
3551         and other functions accept RoundedIntRect as an argument.
3552
3553         * Android.mk:
3554         * CMakeLists.txt:
3555         * GNUmakefile.am:
3556         * WebCore.gypi:
3557         * WebCore.pro:
3558         * WebCore.vcproj/WebCore.vcproj:
3559         * WebCore.xcodeproj/project.pbxproj:
3560         * platform/graphics/GraphicsContext.cpp:
3561         (WebCore::GraphicsContext::addRoundedRectClip):
3562         (WebCore::GraphicsContext::clipOutRoundedRect):
3563         (WebCore::GraphicsContext::fillRoundedRect):
3564         * platform/graphics/GraphicsContext.h:
3565         * platform/graphics/RoundedIntRect.cpp: Added.
3566         (WebCore::RoundedIntRect::Radii::isZero):
3567         (WebCore::RoundedIntRect::Radii::scale):
3568         (WebCore::RoundedIntRect::Radii::expand):
3569         (WebCore::RoundedIntRect::Radii::includeLogicalEdges):
3570         (WebCore::RoundedIntRect::Radii::excludeLogicalEdges):
3571         (WebCore::RoundedIntRect::RoundedIntRect):
3572         (WebCore::RoundedIntRect::includeLogicalEdges):
3573         (WebCore::RoundedIntRect::excludeLogicalEdges):
3574         * platform/graphics/RoundedIntRect.h: Added.
3575         (WebCore::RoundedIntRect::Radii::Radii):
3576         (WebCore::RoundedIntRect::Radii::setTopLeft):
3577         (WebCore::RoundedIntRect::Radii::setTopRight):
3578         (WebCore::RoundedIntRect::Radii::setBottomLeft):
3579         (WebCore::RoundedIntRect::Radii::setBottomRight):
3580         (WebCore::RoundedIntRect::Radii::topLeft):
3581         (WebCore::RoundedIntRect::Radii::topRight):
3582         (WebCore::RoundedIntRect::Radii::bottomLeft):
3583         (WebCore::RoundedIntRect::Radii::bottomRight):
3584         (WebCore::RoundedIntRect::Radii::expand):
3585         (WebCore::RoundedIntRect::Radii::shrink):
3586         (WebCore::RoundedIntRect::rect):
3587         (WebCore::RoundedIntRect::radii):
3588         (WebCore::RoundedIntRect::isRounded):
3589         (WebCore::RoundedIntRect::isEmpty):
3590         (WebCore::RoundedIntRect::setRect):
3591         (WebCore::RoundedIntRect::setRadii):
3592         (WebCore::RoundedIntRect::move):
3593         (WebCore::RoundedIntRect::inflate):
3594         (WebCore::RoundedIntRect::inflateWithRadii):
3595         (WebCore::RoundedIntRect::expandRadii):
3596         (WebCore::RoundedIntRect::shrinkRadii):
3597         * rendering/RenderBox.cpp:
3598         (WebCore::RenderBox::pushContentsClip):
3599         * rendering/RenderBoxModelObject.cpp:
3600         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3601         (WebCore::RenderBoxModelObject::paintBorder):
3602         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
3603         (WebCore::RenderBoxModelObject::paintBoxShadow):
3604         * rendering/RenderBoxModelObject.h:
3605         * rendering/RenderObject.cpp:
3606         (WebCore::RenderObject::drawBoxSideFromPath):
3607         * rendering/RenderReplaced.cpp:
3608         (WebCore::RenderReplaced::paint):
3609         * rendering/RenderThemeChromiumWin.cpp:
3610         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
3611         * rendering/RenderThemeMac.mm:
3612         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
3613         (WebCore::RenderThemeMac::paintSliderTrack):
3614         * rendering/RenderThemeSafari.cpp:
3615         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
3616         (WebCore::RenderThemeSafari::paintSliderTrack):
3617         * rendering/RenderThemeWinCE.cpp:
3618         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3619         * rendering/RenderWidget.cpp:
3620         (WebCore::RenderWidget::paint):
3621         * rendering/style/BorderData.h:
3622         * rendering/style/RenderStyle.cpp:
3623         (WebCore::calcRadiiFor):
3624         (WebCore::calcConstraintScaleFor):
3625         (WebCore::RenderStyle::getRoundedBorderFor):
3626         (WebCore::RenderStyle::getRoundedInnerBorderWithBorderWidths):
3627         * rendering/style/RenderStyle.h:
3628         (WebCore::InheritedFlags::setBorderRadius):
3629
3630 2011-01-18  MORITA Hajime  <morrita@google.com>
3631
3632         Reviewed by Simon Fraser.
3633
3634         Refactoring: Extract RoundedIntRect class
3635         https://bugs.webkit.org/show_bug.cgi?id=51664
3636
3637         RoundedIntRect is a pair of rect and four IntSize objects which represent
3638         corner radii of the rectangle. IntSize is grouped into RoundedIntRect::Radii.
3639         Now RenderStyle::getRoundedBorderFor() and RenderStyle::getRoundedInnerBorderWithBorderWidths()
3640         return RoundedIntRect and GraphicsContext::addRoundedRectClip(), GraphicsContext::fillRoundedRect()
3641         and other functions accept RoundedIntRect as an argument.
3642
3643         No new tests. No behavioral change.
3644
3645         * Android.mk:
3646         * CMakeLists.txt:
3647         * WebCore.gypi:
3648         * WebCore.pro:
3649         * WebCore.xcodeproj/project.pbxproj:
3650         * platform/graphics/GraphicsContext.cpp:
3651         (WebCore::GraphicsContext::addRoundedRectClip):
3652         (WebCore::GraphicsContext::clipOutRoundedRect):
3653         (WebCore::GraphicsContext::fillRoundedRect):
3654         * platform/graphics/GraphicsContext.h:
3655         * platform/graphics/RoundedIntRect.cpp: Added.
3656         (WebCore::RoundedIntRect::Radii::isZero):
3657         (WebCore::RoundedIntRect::Radii::scale):
3658         (WebCore::RoundedIntRect::Radii::expand):
3659         (WebCore::RoundedIntRect::Radii::includeLogicalEdges):
3660         (WebCore::RoundedIntRect::Radii::excludeLogicalEdges):
3661         (WebCore::RoundedIntRect::RoundedIntRect):
3662         (WebCore::RoundedIntRect::includeLogicalEdges):
3663         (WebCore::RoundedIntRect::excludeLogicalEdges):
3664         * platform/graphics/RoundedIntRect.h: Added.
3665         (WebCore::RoundedIntRect::Radii::Radii):
3666         (WebCore::RoundedIntRect::Radii::setTopLeft):
3667         (WebCore::RoundedIntRect::Radii::setTopRight):
3668         (WebCore::RoundedIntRect::Radii::setBottomLeft):
3669         (WebCore::RoundedIntRect::Radii::setBottomRight):
3670         (WebCore::RoundedIntRect::Radii::topLeft):
3671         (WebCore::RoundedIntRect::Radii::topRight):
3672         (WebCore::RoundedIntRect::Radii::bottomLeft):
3673         (WebCore::RoundedIntRect::Radii::bottomRight):
3674         (WebCore::RoundedIntRect::Radii::expand):
3675         (WebCore::RoundedIntRect::Radii::shrink):
3676         (WebCore::RoundedIntRect::rect):
3677         (WebCore::RoundedIntRect::radii):
3678         (WebCore::RoundedIntRect::isRounded):
3679         (WebCore::RoundedIntRect::isEmpty):
3680         (WebCore::RoundedIntRect::setRect):
3681         (WebCore::RoundedIntRect::setRadii):
3682         (WebCore::RoundedIntRect::move):
3683         (WebCore::RoundedIntRect::inflate):
3684         (WebCore::RoundedIntRect::inflateWithRadii):
3685         (WebCore::RoundedIntRect::expandRadii):
3686         (WebCore::RoundedIntRect::shrinkRadii):
3687         * rendering/RenderBox.cpp:
3688         (WebCore::RenderBox::pushContentsClip):
3689         * rendering/RenderBoxModelObject.cpp:
3690         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3691         (WebCore::RenderBoxModelObject::paintBorder):
3692         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
3693         (WebCore::RenderBoxModelObject::paintBoxShadow):
3694         * rendering/RenderBoxModelObject.h:
3695         * rendering/RenderObject.cpp:
3696         (WebCore::RenderObject::drawBoxSideFromPath):
3697         * rendering/RenderReplaced.cpp:
3698         (WebCore::RenderReplaced::paint):
3699         * rendering/RenderThemeChromiumWin.cpp:
3700         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
3701         * rendering/RenderThemeMac.mm:
3702         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
3703         (WebCore::RenderThemeMac::paintSliderTrack):
3704         * rendering/RenderThemeSafari.cpp:
3705         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
3706         (WebCore::RenderThemeSafari::paintSliderTrack):
3707         * rendering/RenderThemeWinCE.cpp:
3708         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3709         * rendering/RenderWidget.cpp:
3710         (WebCore::RenderWidget::paint):
3711         * rendering/style/BorderData.h:
3712         * rendering/style/RenderStyle.cpp:
3713         (WebCore::calcRadiiFor):
3714         (WebCore::calcConstraintScaleFor):
3715         (WebCore::RenderStyle::getRoundedBorderFor):
3716         (WebCore::RenderStyle::getRoundedInnerBorderWithBorderWidths):
3717         * rendering/style/RenderStyle.h:
3718         (WebCore::InheritedFlags::setBorderRadius):
3719
3720 2011-01-18  Victoria Kirst  <vrk@chromium.org>
3721
3722         Reviewed by Kenneth Russell.
3723
3724         [chromium] Adding support for YV16 video frame formats.
3725         https://bugs.webkit.org/show_bug.cgi?id=52345
3726
3727         * platform/graphics/chromium/VideoLayerChromium.cpp:
3728         (WebCore::VideoLayerChromium::determineTextureFormat):
3729         (WebCore::VideoLayerChromium::draw):
3730
3731 2011-01-18  David Hyatt  <hyatt@apple.com>
3732
3733         Reviewed by Dan Bernstein.
3734
3735         <rdar://problem/8479998> REGRESSION (r67660): broken button layout at devforums.apple.com
3736         
3737         Exclude floating objects from shrinking to avoid floats.  They should never do this.  Timing-related bugs could
3738         occur as a result of this mistake, and the change to rewrite pagination to defer layout of floats until they
3739         got encountered on the correct line exposed this issue.
3740
3741         Added /fast/block/float/float-overflow-hidden-containing-block-width.html.
3742
3743         * rendering/RenderBox.cpp:
3744         (WebCore::RenderBox::shrinkToAvoidFloats):
3745
3746 2011-01-18  Zhenyao Mo  <zmo@google.com>
3747
3748         Reviewed by Kenneth Russell.
3749
3750         Make CheckedInt<long> and CheckedInt<unsigned long> work
3751         https://bugs.webkit.org/show_bug.cgi?id=52401
3752
3753         * html/canvas/CheckedInt.h:
3754         (WebCore::CheckedInt::CheckedInt): Merge with the patch provided by Benoit Jacob.
3755         * html/canvas/WebGLBuffer.cpp:
3756         (WebCore::WebGLBuffer::associateBufferDataImpl): Use CheckedInt<long> instead of CheckedInt<int>.
3757         (WebCore::WebGLBuffer::associateBufferSubDataImpl): Ditto.
3758
3759 2011-01-18  Kenneth Russell  <kbr@google.com>
3760
3761         Reviewed by David Levin.
3762
3763         Must strip comments from WebGL shaders before enforcing character set
3764         https://bugs.webkit.org/show_bug.cgi?id=52390
3765
3766         Strip comments from incoming shaders, preserving line numbers,
3767         before validating that they conform to the ESSL character set.
3768         Revert changes from http://trac.webkit.org/changeset/75735 which
3769         allowed invalid characters to be passed to certain APIs.
3770
3771         Tested with WebGL layout tests, conformance test suite and several
3772         WebGL demos in both Safari and Chromium.
3773
3774         * html/canvas/WebGLRenderingContext.cpp:
3775         (WebCore::StripComments::StripComments::process):
3776         (WebCore::WebGLRenderingContext::shaderSource):
3777
3778 2011-01-18  Ryosuke Niwa  <rniwa@webkit.org>
3779
3780         Reviewed by Eric Seidel.
3781
3782         Stop instantiating legacy editing positions in DeleteSelectionCommand, IndentOudentCommand,
3783         InsertLineBreakCommand, InsertListCOmmand.cpp, InsertParagraphSeparatorCommand, and htmlediting.cpp
3784         https://bugs.webkit.org/show_bug.cgi?id=52644
3785
3786         This is a cleanup to stop instantiating legacy editing positions in the following tests.
3787         firstDeepEditingPositionForNode and lastDeepEditingPositionForNode in htmlediting.h are not updated
3788         because doing so requires significant code changes. They are tracked on the bug 52642.
3789
3790         * editing/DeleteSelectionCommand.cpp:
3791         (WebCore::DeleteSelectionCommand::initializeStartEnd):
3792         (WebCore::updatePositionForNodeRemoval):
3793         (WebCore::DeleteSelectionCommand::removeNode):
3794         (WebCore::updatePositionForTextRemoval):
3795         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3796         * editing/IndentOutdentCommand.cpp:
3797         (WebCore::IndentOutdentCommand::outdentParagraph):
3798         * editing/InsertLineBreakCommand.cpp:
3799         (WebCore::InsertLineBreakCommand::doApply):
3800         * editing/InsertListCommand.cpp:
3801         (WebCore::InsertListCommand::doApplyForSingleParagraph):
3802         (WebCore::InsertListCommand::unlistifyParagraph):
3803         (WebCore::InsertListCommand::listifyParagraph):
3804         * editing/InsertParagraphSeparatorCommand.cpp:
3805         (WebCore::InsertParagraphSeparatorCommand::doApply):
3806         * editing/htmlediting.cpp:
3807         (WebCore::enclosingBlock):
3808         (WebCore::enclosingList):
3809         (WebCore::enclosingListChild):
3810         (WebCore::indexForVisiblePosition):
3811         (WebCore::isNodeVisiblyContainedWithin):
3812         (WebCore::avoidIntersectionWithNode):
3813
3814 2011-01-18  Benjamin Kalman  <kalman@chromium.org>
3815
3816         Reviewed by Ryosuke Niwa.
3817
3818         Tweak style in visible_units.cpp and TextIterator.cpp in preparation for another patch
3819         https://bugs.webkit.org/show_bug.cgi?id=52610
3820
3821         This is a purely aesthetic change.
3822
3823         * editing/TextIterator.cpp:
3824         (WebCore::SimplifiedBackwardsTextIterator::advance):
3825         * editing/visible_units.cpp:
3826         (WebCore::previousBoundary):
3827
3828 2011-01-18  Adam Klein  <adamk@chromium.org>
3829
3830         Reviewed by Darin Fisher.
3831
3832         [Chromium] Replace ChromiumBridge::widgetSetCursor with ChromeClient::setCursor
3833         https://bugs.webkit.org/show_bug.cgi?id=42236
3834
3835         * platform/chromium/ChromiumBridge.h:
3836         * platform/chromium/WidgetChromium.cpp:
3837         (WebCore::Widget::setCursor):
3838
3839 2011-01-18  Chris Fleizach  <cfleizach@apple.com>
3840
3841         Reviewed by Darin Adler.
3842
3843         REGRESSION: A problem with Voiceover and finding links
3844         https://bugs.webkit.org/show_bug.cgi?id=52324
3845
3846         Fallout from recent change to make WebCore return its own scroll view.
3847            1) There were two scroll views in the hierarchy, one which no needed to be ignored.
3848            2) Hit tests for sub frames needed to be offset.
3849            3) The check for whether an attachment is ignored must happen earlier than using
3850               the helpText to determine if an element should be ignored.
3851
3852         Test: platform/mac/accessibility/iframe-with-title-correct-hierarchy.html
3853
3854         * accessibility/AccessibilityObject.cpp:
3855         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
3856         * accessibility/AccessibilityRenderObject.cpp:
3857         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3858         * accessibility/mac/AccessibilityObjectWrapper.mm:
3859         (-[AccessibilityObjectWrapper scrollViewParent]):
3860
3861 2011-01-18  Adam Roben  <aroben@apple.com>
3862
3863         Call alternate CFHTTPCookie functions if available
3864
3865         Fixes <http://webkit.org/b/52637> <rdar://problem/8878984>.
3866
3867         Reviewed by Darin Adler.
3868
3869         * platform/network/cf/CookieJarCFNet.cpp: Added soft-linking macros to
3870         pull in the alternate CFHTTPCookie functions.
3871
3872         (WebCore::cookieDomain):
3873         (WebCore::cookieExpirationTime):
3874         (WebCore::cookieName):
3875         (WebCore::cookiePath):
3876         (WebCore::cookieValue):
3877         Added these wrappers around the CFHTTPCookie functions. We call the
3878         alternate functions if they exist, otherwise fall back to the current
3879         functions.
3880
3881         (WebCore::filterCookies):
3882         (WebCore::getRawCookies):
3883         (WebCore::deleteCookie):
3884         Changed to use the wrapper functions.
3885
3886 2011-01-18  Martin Robinson  <mrobinson@igalia.com>
3887
3888         Reviewed by Eric Seidel.
3889
3890         [GTK] Filenames are converted to URLs during edit drags
3891         https://bugs.webkit.org/show_bug.cgi?id=52096
3892
3893         * platform/gtk/DragDataGtk.cpp: Only advertise and deliver filenames as URLs if the
3894         conversion policy allows it.
3895         (WebCore::DragData::containsURL): Ditto.
3896         (WebCore::DragData::asURL): Ditto.
3897
3898 2011-01-18  Helder Correia  <helder@sencha.com>
3899
3900         Reviewed by Kenneth Rohde Christiansen.
3901
3902         [Qt] Incorrect shadow alpha with semi-transparent solid fillStyle
3903         https://bugs.webkit.org/show_bug.cgi?id=52611
3904
3905         This is related to bug 52559. The shadow color alpha must be multiplied
3906         by the context brush alpha.
3907
3908         Test: fast/canvas/canvas-fillPath-alpha-shadow.html
3909
3910         * platform/graphics/qt/GraphicsContextQt.cpp:
3911         (WebCore::GraphicsContext::fillPath):
3912
3913 2011-01-18  Andrey Kosyakov  <caseq@chromium.org>
3914
3915         Reviewed by Yury Semikhatsky.
3916
3917         Web Inspector: fail resource.requestContent() immediately for WebSocket resources
3918         https://bugs.webkit.org/show_bug.cgi?id=52628
3919
3920         * English.lproj/localizedStrings.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)
3921         * inspector/front-end/ExtensionServer.js: Do not expose webInspector.resources.Types in extensions API (obsolete)
3922         (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
3923         * inspector/front-end/Resource.js:
3924         (WebInspector.Resource.Type.toUIString): Remove ResourceType.Media as it's not used.
3925         (WebInspector.Resource.Type.toString): ditto.
3926         (WebInspector.Resource.prototype.requestContent): Fail immediately for WebSocket resources.
3927         * inspector/front-end/inspector.js: Rename WebSocket -> WebSockets in resource catetegories (rest are in plural, too)
3928
3929 2011-01-18  Helder Correia  <helder@sencha.com>
3930
3931         Reviewed by Dirk Schulze.
3932
3933         REGRESSION(75139): SVG gradients are not applied to texts
3934         https://bugs.webkit.org/show_bug.cgi?id=52531
3935
3936         r75139 caused a problem with filling and stroking text with a gradient
3937         fill in SVG. The order of CGContextConcatCTM and CGContextClipToRect
3938         was mixed up.
3939
3940         Test: svg/css/text-gradient-shadow.svg
3941
3942         * platform/graphics/cg/GraphicsContextCG.cpp:
3943         (WebCore::GraphicsContext::fillRect):
3944
3945 2011-01-18  Leo Yang  <leo.yang@torchmobile.com.cn>
3946
3947         Reviewed by Nikolas Zimmermann.
3948
3949         Unable to indirectly animate visibility of SVGUseElement
3950         https://bugs.webkit.org/show_bug.cgi?id=50240
3951
3952         SVGUseElement::recalcStyle should take care of its shadow
3953         tree's style recalculation when it is called with change >= Inherit
3954         or when childNeedsStyleRecalc() is true because in these two
3955         cases needStyleRecalc() may not be true.
3956
3957         Test: svg/custom/use-inherit-style.svg
3958
3959         * svg/SVGUseElement.cpp:
3960         (WebCore::SVGUseElement::recalcStyle):
3961
3962 2011-01-18  Pavel Podivilov  <podivilov@chromium.org>
3963
3964         Reviewed by Yury Semikhatsky.
3965
3966         Web Inspector: provide script length to frontend.
3967         https://bugs.webkit.org/show_bug.cgi?id=52620
3968
3969         * inspector/Inspector.idl:
3970         * inspector/InspectorDebuggerAgent.cpp:
3971         (WebCore::InspectorDebuggerAgent::didParseSource):
3972         * inspector/front-end/DebuggerModel.js:
3973         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
3974         (WebInspector.DebuggerDispatcher.prototype.parsedScriptSource):
3975         * inspector/front-end/Script.js:
3976         (WebInspector.Script):
3977
3978 2011-01-18  Zoltan Herczeg  <zherczeg@webkit.org>
3979
3980         Rubber-stamped by Csaba Osztrogonác
3981
3982         Fixing ChangeLog
3983
3984         Removing a line introduced by
3985         http://trac.webkit.org/changeset/75743/trunk/Source/WebCore/ChangeLog
3986         Removing an unnecessary space before a time stamp.
3987
3988 2011-01-17  Andrey Kosyakov  <caseq@chromium.org>
3989
3990         Reviewed by Yury Semikhatsky.
3991
3992         Web Inspector: [refactoring] use events to notify NetworkManager clients
3993         https://bugs.webkit.org/show_bug.cgi?id=52588
3994
3995         * inspector/front-end/AuditLauncherView.js:
3996         (WebInspector.AuditLauncherView): Do not expose public interface to resource count. Do not reset resource count upon reset().
3997         (WebInspector.AuditLauncherView.prototype._resetResourceCount):
3998         (WebInspector.AuditLauncherView.prototype._onResourceStarted):
3999         (WebInspector.AuditLauncherView.prototype._onResourceFinished):
4000         * inspector/front-end/AuditsPanel.js: Do not expose public interface to resource start/finish events.
4001         * inspector/front-end/ExtensionServer.js:
4002         (WebInspector.ExtensionServer):
4003         (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
4004         (WebInspector.ExtensionServer.prototype.initExtensions):
4005         * inspector/front-end/NetworkManager.js: Dispatch events rather than directly call clients.
4006         (WebInspector.NetworkManager):
4007         (WebInspector.NetworkManager.prototype.willSendRequest):
4008         (WebInspector.NetworkManager.prototype.markResourceAsCached):
4009         (WebInspector.NetworkManager.prototype.didReceiveResponse):
4010         (WebInspector.NetworkManager.prototype.didReceiveContentLength):
4011         (WebInspector.NetworkManager.prototype.setInitialContent):