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