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