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