f34b2d9c4fb772dbfdb3ad7dc389893b38c70077
[WebKit-https.git] / WebCore / ChangeLog
1 2010-12-15  Andrey Kosyakov  <caseq@chromium.org>
2
3         Reviewed by Pavel Feldman.
4
5         Web Inspector: [Extension API] add support for adding/overriding HTTP request headers
6         https://bugs.webkit.org/show_bug.cgi?id=50493
7
8         Test: http/tests/inspector/extensions-headers.html
9
10         * inspector/Inspector.idl:
11         * inspector/InspectorController.cpp:
12         (WebCore::InspectorController::willSendRequest): Apply extra headers.
13         (WebCore::InspectorController::setExtraHeaders):
14         * inspector/InspectorController.h:
15         * inspector/front-end/ExtensionAPI.js:
16         (WebInspector.injectedExtensionAPI.Resources.prototype.getHAR):
17         (WebInspector.injectedExtensionAPI.Resources.prototype.addRequestHeaders):
18         * inspector/front-end/ExtensionServer.js:
19         (WebInspector.ExtensionServer):
20         (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
21
22 2010-12-16  Koan-Sin Tan  <koansin.tan@gmail.com>
23
24         Reviewed by Kent Tamura.
25
26         Glyphs in vertical text tests are rotated 90 degrees clockwise on Chromium Linux
27         https://bugs.webkit.org/show_bug.cgi?id=50365
28
29         No new tests. But this makes Chromimium Linux show
30         fast/blockflow/japanese-*-text.html and other vertical
31         writing text correctly as on WebKit and Chromimum for Mac.
32
33         * platform/graphics/chromium/FontCacheLinux.cpp:
34         (WebCore::FontCache::createFontPlatformData):
35         * platform/graphics/chromium/FontLinux.cpp:
36         (WebCore::Font::drawGlyphs):
37         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
38         (WebCore::FontPlatformData::FontPlatformData):
39         (WebCore::FontPlatformData::operator=):
40         (WebCore::FontPlatformData::operator==):
41         (WebCore::FontPlatformData::hash):
42         * platform/graphics/chromium/FontPlatformDataLinux.h:
43         (WebCore::FontPlatformData::FontPlatformData):
44         (WebCore::FontPlatformData::orientation):
45         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
46         (WebCore::SimpleFontData::platformInit):
47         * platform/graphics/skia/FontCustomPlatformData.cpp:
48         (WebCore::FontCustomPlatformData::fontPlatformData):
49         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
50         (WebCore::substituteWithVerticalGlyphs):
51         (WebCore::GlyphPage::fill):
52
53 2010-12-16  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbo <tor.arne.vestbo@nokia.com>
54
55         Reviewed by Eric Carlson.
56
57         Provide an interface to require using fullscreen mediaplayer
58         https://bugs.webkit.org/show_bug.cgi?id=51133
59
60         Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit
61         to launch fullscreen video player for playing the html5 video. The 
62         idea is that a browser vendor can specify this behavior through the
63         platform plugin or something else by using this interface.
64
65         No new tests because no client implements requiresFullscreenForVideoPlayback yet.
66
67         * html/HTMLMediaElement.cpp:
68         (WebCore::HTMLMediaElement::updatePlayState):
69         (WebCore::HTMLMediaElement::exitFullscreen):
70         * page/Chrome.cpp:
71         (WebCore::Chrome::requiresFullscreenForVideoPlayback):
72         * page/Chrome.h:
73         * page/ChromeClient.h:
74         (WebCore::ChromeClient::requiresFullscreenForVideoPlayback):
75
76 2010-12-16  Steve Block  <steveblock@google.com>
77
78         Reviewed by Steve Block.
79
80         GeolocationPositionCache needs refactoring
81         https://bugs.webkit.org/show_bug.cgi?id=50826
82
83         No new tests, refactoring only.
84
85         * page/Geolocation.cpp:
86         (WebCore::Geolocation::Geolocation):
87         (WebCore::Geolocation::makeCachedPositionCallbacks):
88         (WebCore::Geolocation::haveSuitableCachedPosition):
89         (WebCore::Geolocation::positionChangedInternal):
90         * page/Geolocation.h:
91         * page/GeolocationPositionCache.cpp:
92         (WebCore::GeolocationPositionCache::instance):
93         (WebCore::GeolocationPositionCache::GeolocationPositionCache):
94         (WebCore::GeolocationPositionCache::addUser):
95         (WebCore::GeolocationPositionCache::removeUser):
96         (WebCore::GeolocationPositionCache::setDatabasePath):
97         (WebCore::GeolocationPositionCache::setCachedPosition):
98         (WebCore::GeolocationPositionCache::cachedPosition):
99         (WebCore::GeolocationPositionCache::readFromDatabase):
100         (WebCore::GeolocationPositionCache::writeToDatabase):
101         * page/GeolocationPositionCache.h:
102         (WebCore::GeolocationPositionCacheWrapper::GeolocationPositionCacheWrapper):
103         (WebCore::GeolocationPositionCacheWrapper::~GeolocationPositionCacheWrapper):
104         (WebCore::GeolocationPositionCacheWrapper::setCachedPosition):
105         (WebCore::GeolocationPositionCacheWrapper::cachedPosition):
106
107 2010-12-16  Ariya Hidayat  <ariya@sencha.com>
108
109         Reviewed by Andreas Kling.
110
111         [Qt] GraphicsContext should respect QWebView render hints
112         https://bugs.webkit.org/show_bug.cgi?id=51208
113
114         GraphicsContext does not override SmoothPixmapTransform (see also
115         r62762). To keep the same behavior, canvas default image interpolation
116         quality is set to medium and QWebView's render hints by default also
117         include SmoothPixmapTransform.
118
119         * html/HTMLCanvasElement.h:
120         * platform/graphics/qt/GraphicsContextQt.cpp:
121         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
122
123 2010-12-16  Daniel Bates  <dbates@rim.com>
124
125         Formatting fix; un-indent one level all lines in [2793, 2808] (with respect to r74217)
126         so as to be consistent with the formatting of the rest of this file.
127
128         Also, add an empty line between the win32* and wince* conditional include blocks.
129
130         * WebCore.pro:
131
132 2010-12-16  Daniel Bates  <dbates@rim.com>
133
134         Reviewed by Antonio Gomes.
135
136         [Qt] Only include ScrollAnimatorWin.h and compile ScrollAnimatorWin.cpp
137         on Windows if ENABLE_SMOOTH_SCROLLING=1
138         https://bugs.webkit.org/show_bug.cgi?id=51215
139
140         Conditionally include the files ScrollAnimatorWin.h and ScrollAnimatorWin.cpp when building
141         the Qt Windows with smooth scrolling enabled.
142
143         No change in functionality since these files are guarded by ENABLE(SMOOTH_SCROLLING).
144
145         * WebCore.pro:
146
147 2010-12-16  Ryosuke Niwa  <rniwa@webkit.org>
148
149         Reviewed by Darin Adler.
150
151         execCommand('JustifyCenter') adds extra BR
152         https://bugs.webkit.org/show_bug.cgi?id=51082
153
154         The bug was caused by moveParagraphContentsToNewBlockIfNecessary's adding a placeholder br
155         to new block and not removing it later. Fixed the bug by removing it when the paragraph
156         moved into the block didn't have a br at the end.
157
158         Test: editing/execCommand/justify.html
159
160         * editing/CompositeEditCommand.cpp:
161         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
162
163 2010-12-16  Jian Li  <jianli@chromium.org>
164
165         Unreviewed. Fixed chromium build break caused by r74207.
166
167         * platform/ContextMenuItem.h:
168
169 2010-12-16  Leandro Pereira  <leandro@profusion.mobi>
170
171         [EFL] Unreviewed build fix.
172
173         Disable ContextMenu support for now while support for
174         CROSS_PLATFORM_MENUS is written.
175
176         * CMakeListsEfl.txt:
177         * platform/ContextMenu.h:
178         * platform/ContextMenuItem.h:
179         * platform/efl/ContextMenuEfl.cpp:
180         (WebCore::ContextMenu::ContextMenu):
181         (WebCore::ContextMenu::getContextMenuItems):
182         (WebCore::ContextMenu::createNativeMenuFromItems):
183         (WebCore::ContextMenu::nativeMenu):
184         * platform/efl/ContextMenuItemEfl.cpp:
185         (WebCore::ContextMenuItem::ContextMenuItem):
186         (WebCore::ContextMenuItem::~ContextMenuItem):
187         (WebCore::ContextMenuItem::nativeMenuItem):
188         (WebCore::ContextMenuItem::type):
189         (WebCore::ContextMenuItem::setAction):
190         (WebCore::ContextMenuItem::action):
191         (WebCore::ContextMenuItem::setChecked):
192         (WebCore::ContextMenuItem::checked):
193         (WebCore::ContextMenuItem::setEnabled):
194         (WebCore::ContextMenuItem::enabled):
195         (WebCore::ContextMenuItem::setSubMenu):
196
197 2010-12-16  Ryosuke Niwa  <rniwa@webkit.org>
198
199         Reviewed by Darin Adler.
200
201         execCommand('styleWithCSS') is ignored when selection isn't inside a contenteditable area
202         https://bugs.webkit.org/show_bug.cgi?id=51164
203
204         Fixed the bug by always enabling the StyleWithCSS command.
205
206         Test: editing/style/stylewithcss-without-selection.html
207
208         * editing/EditorCommand.cpp:
209         (WebCore::createCommandMap): StyleWithCSS is enabled rather than enabledInRichlyEditableText.
210
211 2010-12-16  Anders Carlsson  <andersca@apple.com>
212
213         Reviewed by Darin Adler.
214
215         Save the manual plug-in stream data and redeliver it when the plug-in is initialized
216         https://bugs.webkit.org/show_bug.cgi?id=51201
217
218         Export SharedBuffer related symbols.
219
220         * WebCore.exp.in:
221
222 2010-12-16  Pavel Feldman  <pfeldman@chromium.org>
223
224         Reviewed by Yury Semikhatsky.
225
226         Web Inspector: timeline records should only operate WebCore time.
227         https://bugs.webkit.org/show_bug.cgi?id=51127
228
229         * inspector/InspectorTimelineAgent.cpp:
230         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
231         * inspector/TimelineRecordFactory.cpp:
232         (WebCore::TimelineRecordFactory::createResourceFinishData):
233         * inspector/TimelineRecordFactory.h:
234
235 2010-12-15  Alexey Proskuryakov  <ap@apple.com>
236
237         Reviewed by Darin Adler.
238
239         https://bugs.webkit.org/show_bug.cgi?id=50996
240         <rdar://problem/8098862> Consider disabling DNS prefetch when proxy is used
241
242         No new tests, cannot test DNS.
243
244         * platform/network/cf/DNSCFNet.cpp:
245         (WebCore::proxyIsEnabledInSystemPreferences): Check if accessing example.com is going to use
246         a proxy. This is only an estimate - even with a proxy is configured in system preferences, an
247         actual request can go directly to the host if a PAC script says so.
248         (WebCore::DNSResolveQueue::add): Check if proxy is enabled when sending immediate requests.
249         (WebCore::DNSResolveQueue::fired): Ditto when sending queued ones.
250
251 2010-12-16  Yury Semikhatsky  <yurys@chromium.org>
252
253         Reviewed by Pavel Feldman.
254
255         Web Inspector: Console always scroll to the bottom on new events
256         https://bugs.webkit.org/show_bug.cgi?id=51189
257
258         When new messages are added to the console it will auto scroll
259         only if it was already scrolled down to the last record.
260
261         * inspector/front-end/ConsoleView.js:
262         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
263         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
264         (WebInspector.ConsoleView.prototype._isScrolledToLastMessage):
265         (WebInspector.ConsoleView.prototype.addMessage):
266
267 2010-12-16  Pavel Podivilov  <podivilov@chromium.org>
268
269         Reviewed by Yury Semikhatsky.
270
271         Web Inspector: update CallStackSidebarPane placards and status message in the same event handler.
272         https://bugs.webkit.org/show_bug.cgi?id=51174
273
274         * inspector/front-end/BreakpointManager.js:
275         (WebInspector.BreakpointManager.prototype.breakpointViewForEventData):
276         (WebInspector.BreakpointManager.prototype._debuggerPaused):
277         (WebInspector.BreakpointManager.prototype._debuggerResumed):
278         * inspector/front-end/CallStackSidebarPane.js:
279         (WebInspector.CallStackSidebarPane):
280         (WebInspector.CallStackSidebarPane.prototype.update):
281         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
282         * inspector/front-end/DebuggerModel.js:
283         (WebInspector.DebuggerModel.prototype.pausedScript):
284         * inspector/front-end/ScriptsPanel.js:
285         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
286
287 2010-12-16  Hans Wennborg  <hans@chromium.org>
288
289         Reviewed by Jeremy Orlow.
290
291         IndexedDB: Fix IDBDatabaseError code offset bug
292         https://bugs.webkit.org/show_bug.cgi?id=51177
293
294         IDBDatabaseError::code() needs to return the error code without
295         offset. But when the IDBDatabaseError is created, the code comes with
296         an offset (it gets passed a IDBDatabaseException::IDBDatabaseExceptionCode).
297
298         However, in Chromium, IDBDatabaseErrors are sometimes also created via
299         WebIDBDatabaseError when they are sent across IPC, and then the error
300         code comes *without* offset. Provide a second create() function for
301         this case.
302
303         * storage/IDBDatabaseError.h:
304         (WebCore::IDBDatabaseError::create):
305         (WebCore::IDBDatabaseError::createWithoutOffset):
306         (WebCore::IDBDatabaseError::code):
307
308 2010-12-16  Sheriff Bot  <webkit.review.bot@gmail.com>
309
310         Unreviewed, rolling out r74162.
311         http://trac.webkit.org/changeset/74162
312         https://bugs.webkit.org/show_bug.cgi?id=51185
313
314         More breakage in GTK+ (Requested by xan_ on #webkit).
315
316         * platform/text/TextCodecUTF16.cpp:
317         (WebCore::TextCodecUTF16::registerEncodingNames):
318
319 2010-12-16  Alexander Pavlov  <apavlov@chromium.org>
320
321         Reviewed by Pavel Feldman.
322
323         Web Inspector: Up/Down/PageUp/PageDown on a CSS property numeric value commit the value editor
324         https://bugs.webkit.org/show_bug.cgi?id=51114
325
326         The r74038 regressed the behaviour. This patch additionally ensures that both Metrics and Styles panes
327         are updated once a stylesheet is reverted.
328
329         * inspector/front-end/ElementsPanel.js:
330         (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
331         (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
332         (WebInspector.ElementsPanel.prototype._styleSheetChanged):
333
334 2010-12-16  Yury Semikhatsky  <yurys@chromium.org>
335
336         Unreviewed. Fix Chromium Mac Debug Clang compilation.
337
338         * platform/graphics/FontFastPath.cpp:
339         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
340
341 2010-12-16  Alejandro G. Castro  <alex@igalia.com>
342
343         Unreviewed. Fix GTK3 compilation after 74129.
344
345         * platform/gtk/WidgetRenderingContextGtk3.cpp:
346
347 2010-12-16  Yury Semikhatsky  <yurys@chromium.org>
348
349         Unreviewed. Fix Chromium Debug compilation after r74177 
350
351         * platform/graphics/filters/FEComposite.cpp:
352         (WebCore::arithmetic):
353
354 2010-12-16  Kent Tamura  <tkent@chromium.org>
355
356         Unreviewed, build fix.
357
358         Fix a warning on 32-bit Mac.
359
360         * platform/graphics/mac/SimpleFontDataMac.mm:
361         (WebCore::SimpleFontData::emphasisMarkFontData): 0.5 -> 0.5f
362
363 2010-12-16  Zoltan Herczeg  <zherczeg@webkit.org>
364
365         Reviewed by Dirk Schulze.
366
367         Improve feArithmeticFilter
368         https://bugs.webkit.org/show_bug.cgi?id=51105
369
370         In case of the arithmetic operator on feComposite filter, we could use
371         different result passing modes depend on its type. Furthermore, the
372         number of executed multiplications is reduced if k1 or k4 argument is zero.
373
374         2% speedup on WebCore/manual-tests/svg-filter-animation.svg
375
376         * platform/graphics/filters/FEComposite.cpp:
377         (WebCore::computeArithmeticPixels):
378         (WebCore::arithmetic):
379         (WebCore::FEComposite::apply):
380
381 2010-12-15  Brian Weinstein  <bweinstein@apple.com>
382
383         Reviewed by Jon Honeycutt.
384
385         WebKit2 should exit auto scrolling mode when losing focus
386         https://bugs.webkit.org/show_bug.cgi?id=49209
387         
388         When a page loses focus, make sure that we stop the autoscroll timer, which exits pan scrolling mode. We
389         don't want to automatically scroll when a page doesn't have focus.
390
391         Updated manual-tests/autoscroll.html with instructions to test this bug.
392
393         * manual-tests/autoscroll.html:
394         * page/FocusController.cpp:
395         (WebCore::FocusController::setFocused):
396
397 2010-12-15  Dan Bernstein  <mitz@apple.com>
398
399         Reviewed by Darin Adler.
400
401         Font support for the text-emphasis CSS property
402         Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
403         https://bugs.webkit.org/show_bug.cgi?id=48539
404
405         * platform/graphics/Font.cpp:
406         (WebCore::Font::drawEmphasisMarks): Added. Calls through to drawEmphasisMarksFor{Simple,Complex}Text.
407         (WebCore::Font::canReceiveTextEmphasis): Added. For simple text, checks if the character should
408         have an emphasis mark.
409
410         * platform/graphics/Font.h:
411
412         * platform/graphics/FontFastPath.cpp:
413         (WebCore::Font::glyphDataForCharacter): Replaced the forceSmallCaps boolean with a FontDataVariant
414         parameter and made this function work with other variants.
415         (WebCore::Font::getEmphasisMarkGlyphData): Added. Returns glyph data for the first character of
416         the emphasis mark. This function may not work if the emphasis mark uses a complex script, but none
417         of the standard emphasis marks do so.
418         (WebCore::Font::emphasisMarkAscent): Added.
419         (WebCore::Font::emphasisMarkDescent): Added.
420         (WebCore::Font::emphasisMarkHeight): Added.
421         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Moved much of the logic from drawSimpleText()
422         into this new function, which also has a ForTextEmphasis parameter, which is passed along to the
423         WidthIterator.
424         (WebCore::Font::drawSimpleText): Left the drawing part here.
425         (WebCore::Font::drawEmphasisMarksForSimpleText): Added.
426         (WebCore::Font::drawGlyphBuffer): Removed the unused TextRun parameter.
427         (WebCore::offsetToMiddleOfGlyph): Added this helper.
428         (WebCore::offsetToMiddleOfGlyphAtIndex): Added this other helper.
429         (WebCore::Font::drawEmphasisMarks): Added. Draws emphasis marks for a given glyph buffer by placing
430         one mark centered above each glyph. Zero glyphs in the buffer indicate that no mark should be drawn.
431
432         * platform/graphics/GraphicsContext.cpp:
433         (WebCore::GraphicsContext::drawEmphasisMarks): Added. Calls through to Font::drawEmphasisMarks().
434
435         * platform/graphics/GraphicsContext.h:
436
437         * platform/graphics/SimpleFontData.cpp:
438         (WebCore::SimpleFontData::SimpleFontData): Removed initialization of deleted members.
439         (WebCore::SimpleFontData::~SimpleFontData): Removed derived font data cleanup, which now happens
440         in ~DerivedFontData.
441         (WebCore::SimpleFontData::brokenIdeographFontData): Changed to use m_derivedFontData.
442         (WebCore::SimpleFontData::DerivedFontData::DerivedFontData): Added. This lazily-allocated struct
443         contains the SimpleFontData for small caps, broken ideograph and emphasis mark.
444         (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData): Added.
445
446         * platform/graphics/SimpleFontData.h:
447         (WebCore::SimpleFontData::variantFontData): Added. This is used by Font::glyphDataForCharacter().
448
449         * platform/graphics/WidthIterator.cpp:
450         (WebCore::WidthIterator::WidthIterator): Added forTextEmphasis parameter.
451         (WebCore::WidthIterator::advance): When used for text emphasis, replace glyphs with the zero glyph
452         if they should not receive an emphasis mark.
453
454         * platform/graphics/WidthIterator.h:
455
456         * platform/graphics/chromium/FontChromiumWin.cpp:
457         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
458
459         * platform/graphics/chromium/FontLinux.cpp:
460         (WebCore::TextRunWalker::nextScriptRun): Updated for change to Font::glyphDataForCharacter().
461         (WebCore::TextRunWalker::setupFontForScriptRun): Ditto.
462         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
463
464         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
465         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
466         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
467         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
468
469         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
470         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
471         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
472         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
473
474         * platform/graphics/efl/FontEfl.cpp:
475         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
476
477         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
478         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
479         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
480         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
481
482         * platform/graphics/gtk/FontGtk.cpp:
483         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
484
485         * platform/graphics/haiku/FontHaiku.cpp:
486         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
487
488         * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
489         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
490         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
491         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
492
493         * platform/graphics/mac/ComplexTextController.cpp:
494         (WebCore::ComplexTextController::ComplexTextController): Added forTextEmphasis parameter.
495         (WebCore::ComplexTextController::collectComplexTextRuns): Updated for change to Font::glyphDataForCharacter().
496         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): When used for text emphasis, replace glyphs with the zero glyph
497         if they should not receive an emphasis mark.
498
499         * platform/graphics/mac/ComplexTextController.h:
500
501         * platform/graphics/mac/FontComplexTextMac.cpp:
502         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Moved much of the logic from drawComplexText()
503         into this new function, which also has a ForTextEmphasis parameter, which is passed along to the
504         ComplexTextController.
505         (WebCore::Font::drawComplexText): Left the drawing part here.
506         (WebCore::Font::drawEmphasisMarksForComplexText): Added.
507
508         * platform/graphics/mac/SimpleFontDataMac.mm:
509         (WebCore::SimpleFontData::platformDestroy): Adopted m_derivedFontData.
510         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
511         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
512         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
513
514         * platform/graphics/pango/SimpleFontDataPango.cpp:
515         (WebCore::SimpleFontData::platformDestroy): Removed redundant clearing of derived font.
516         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
517         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
518         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
519
520         * platform/graphics/qt/FontQt.cpp:
521         (WebCore::Font::emphasisMarkAscent): Added stub.
522         (WebCore::Font::emphasisMarkDescent): Ditto.
523         (WebCore::Font::emphasisMarkHeight): Ditto.
524         (WebCore::Font::drawEmphasisMarksForSimpleText): Ditto.
525         (WebCore::Font::drawEmphasisMarksForComplexText): Ditto.
526
527         * platform/graphics/win/FontWin.cpp:
528         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Moved much of the logic from drawComplexText()
529         into this new function, which also has a ForTextEmphasis parameter. Currently returns an empty
530         glyph buffer for text emphasis.
531         (WebCore::Font::drawComplexText): Left the drawing part here.
532         (WebCore::Font::drawEmphasisMarksForComplexText): Added.
533
534         * platform/graphics/win/SimpleFontDataWin.cpp:
535         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
536         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
537         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
538
539         * platform/graphics/win/UniscribeController.cpp:
540         (WebCore::UniscribeController::advance): Updated for change to Font::glyphDataForCharacter().
541
542         * platform/graphics/wince/FontWinCE.cpp:
543         (WebCore::Font::drawEmphasisMarksForComplexText): Added stub.
544
545         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
546         (WebCore::SimpleFontData::platformDestroy): Removed redundant clearing of derived font.
547         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
548         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
549         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
550
551         * platform/graphics/wx/FontWx.cpp:
552         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Added stub.
553         (WebCore::Font::drawComplexText): Updated for removal of unused TextRun parameter to drawGlyphBuffer().
554         (WebCore::Font::drawEmphasisMarksForComplexText): Added.
555
556         * platform/graphics/wx/SimpleFontDataWx.cpp:
557         (WebCore::SimpleFontData::scaledFontData): Moved code from smallCapsFontData() here and generalized.
558         (WebCore::SimpleFontData::smallCapsFontData): Adopted m_derivedFontData and scaledFontData().
559         (WebCore::SimpleFontData::emphasisMarkFontData): Added.
560
561         * platform/text/CharacterNames.h: Added characters used in Font::canReceiveTextEmphasis().
562
563 2010-12-15  Beth Dakin  <bdakin@apple.com>
564
565         Reviewed by Darin Adler.
566
567         Fix for https://bugs.webkit.org/show_bug.cgi?id=51150 WebView's 
568         _scaleWebView SPI doesn't work on pages with compositing layers
569         -and corresponding-
570         <rdar://problem/8604713>
571
572         paintingGoesToWindow() should return false if the owning layer has 
573         a transform.
574         * rendering/RenderLayerBacking.cpp:
575         (WebCore::RenderLayerBacking::paintingGoesToWindow):
576
577         Use docWidth() and docHeight() instead of rightLayoutOverflow() and 
578         bottomLayoutOverflow() since docWidth/Height are now the preferred 
579         way to query physical dimensions of the document.
580         * rendering/RenderLayerCompositor.cpp:
581         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
582
583 2010-12-15  Alex Bredariol Grilo  <abgrilo@profusion.mobi>
584
585         Reviewed by Eric Seidel.
586
587         [EFL] Fix timer calling time in SharedTimerEfl
588
589         No new features, so no tests added.
590
591         The usage of ecore_timer_loop_add instead of ecore_timer_add corrects
592         the problem that the timer is not called at the correct time. Since this
593         code runs in a single thread, all multiple thread operations were
594         removed.
595
596         * platform/efl/SharedTimerEfl.cpp:
597         (WebCore::stopSharedTimer):
598         (WebCore::addNewTimer):
599
600 2010-12-15  Andreas Kling  <andreas.kling@nokia.com>
601
602         Reviewed by Ariya Hidayat.
603
604         [Qt] StillImage::draw() shouldn't call setCompositionMode() unless the QPaintEngine has Porter-Duff composition
605         https://bugs.webkit.org/show_bug.cgi?id=49918
606
607         Go through GraphicsContext::setCompositeOperation() which does the check for us.
608
609         * platform/graphics/qt/StillImageQt.cpp:
610         (WebCore::StillImage::draw):
611
612 2010-12-15  Yong Li  <yoli@rim.com>
613
614         Reviewed by Darin Adler.
615
616         UTF-16 and its variants should be treated as Big Endian when BOM
617         is absent.
618         https://bugs.webkit.org/show_bug.cgi?id=51035
619
620         Test: fast/encoding/char-decoding.html (changed)
621
622         * platform/text/TextCodecUTF16.cpp:
623         (WebCore::TextCodecUTF16::registerEncodingNames):
624
625 2010-12-15  Simon Fraser  <simon.fraser@apple.com>
626
627         Reviewed by Chris Marrin.
628
629         Percentage Z values in 3d transform functions and transform-origin should cause the property to be invalid
630         https://bugs.webkit.org/show_bug.cgi?id=51070
631         
632         Treat as inavlid -webkit-transform values that include a percentage value in translateZ()
633         or in the third parameter to translate3d().
634
635         Test: transforms/3d/general/3dtransform-values.html
636
637         * css/CSSParser.cpp:
638         (WebCore::CSSParser::parseTransform):
639         (WebCore::CSSParser::parseTransformOrigin): Whitespace change.
640
641 2010-12-15  Simon Fraser  <simon.fraser@apple.com>
642
643         Reviewed by Chris Marrin.
644
645         Reflection does not render properly when -webkit-transform is toggled, untoggled, and retoggled
646         https://bugs.webkit.org/show_bug.cgi?id=50967
647         
648         If a reflection on a compositied, transformed element is toggled on, off and on,
649         then we pick up a cached layer clone that has the wrong transform set on it.
650         
651         The fix is to reset those properties on the layer clones that get changed
652         when the GraphicsLayer gains a structural layer (for reflection flattening).
653
654         Test: compositing/reflections/remove-add-reflection.html
655
656         * platform/graphics/ca/GraphicsLayerCA.cpp:
657         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
658
659 2010-12-15  Timothy Hatcher  <timothy@apple.com>
660
661         Fix a regression where the Web Inspector console would be empty
662         if the Inspector is localized.
663
664         https://bugs.webkit.org/show_bug.cgi?id=51145
665
666         Reviewed by Joseph Pecoraro.
667
668         * inspector/front-end/ConsoleView.js:
669         (WebInspector.ConsoleView.createFilterElement): Add a label argument so the UI string
670         is separate from the classname. Code clean up.
671         (WebInspector.ConsoleView.prototype.filter): Remove toLowerCase and use string compare.
672         (WebInspector.ConsoleView): Pass separate classnames and labels to createFilterElement.
673
674 2010-12-15  Simon Fraser  <simon.fraser@apple.com>
675
676         Reviewed by Adele Peterson.
677
678         WebKit2 in compositing mode no longer has font smoothing
679         https://bugs.webkit.org/show_bug.cgi?id=50733
680
681         Only turn off font smoothing for layers whose contents are
682         not opaque. This allows the root GraphicsLayer in WebKit2 to
683         set the opaque flag, and get smoothed text.
684
685         * platform/graphics/mac/WebLayer.mm:
686         (drawLayerContents):
687
688 2010-12-15  Simon Fraser  <simon.fraser@apple.com>
689
690         Reviewed by Dan Bernstein.
691
692         Allow disabling of font smoothing in compositing layers to be overridden by style
693         https://bugs.webkit.org/show_bug.cgi?id=50732
694
695         Add methods to GraphicsContext to get and set font smoothing,
696         and have them be part of the graphics state.
697         
698         Fix Font::drawGlyphs() to allow the font's smoothing mode (from style)
699         to override the current smoothing mode of the context. The global
700         shouldUseSmoothing() still has final say.
701         
702         Turn off smoothing in compositing layers with this, rather than
703         the non-stateful 'allow' method.
704         
705         * manual-tests/compositing/font-smoothing.html: Added.
706         Manual test because DRT disables font smoothing.
707         
708         * platform/graphics/GraphicsContext.cpp:
709         (WebCore::GraphicsContext::setShouldSmoothFonts):
710         (WebCore::GraphicsContext::shouldSmoothFonts):
711         (WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
712         * platform/graphics/GraphicsContext.h:
713         (WebCore::GraphicsContextState::GraphicsContextState):
714         * platform/graphics/cg/GraphicsContextCG.cpp:
715         (WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
716         * platform/graphics/mac/FontMac.mm:
717         (WebCore::Font::drawGlyphs):
718         * platform/graphics/mac/WebLayer.mm:
719         (drawLayerContents):
720
721 2010-12-15  Matthew Delaney  <mdelaney@apple.com>
722
723         Reviewed by Simon Fraser.
724
725         IOSurface bounds checks on bytesPerRow and allocSize are incorrect
726         https://bugs.webkit.org/show_bug.cgi?id=51137
727
728         No new tests added. For those using this new functionality, many current canvas layout tests will now pass.
729
730         * platform/graphics/cg/ImageBufferCG.cpp:
731
732 2010-12-15  Kenneth Russell  <kbr@google.com>
733
734         Reviewed by James Robinson.
735
736         Web Audio API: port FFTFrame to MKL
737         https://bugs.webkit.org/show_bug.cgi?id=50986
738
739         Ported FFTFrame to Intel's MKL. This patch contains the port and
740         initial, though not complete, build system changes. Tested so far
741         with a unit test by Chris Rogers (which requires code changes to
742         AudioContext.cpp and is not being checked in). Further testing to
743         follow once layout tests are available for the Web Audio API.
744
745         * WebCore.gyp/WebCore.gyp:
746         * WebCore.gypi:
747         * platform/audio/FFTFrame.h:
748         * platform/audio/mkl: Added.
749         * platform/audio/mkl/FFTFrameMKL.cpp: Added.
750         (WebCore::FFTFrame::FFTFrame):
751         (WebCore::FFTFrame::~FFTFrame):
752         (WebCore::FFTFrame::multiply):
753         (WebCore::FFTFrame::doFFT):
754         (WebCore::FFTFrame::doInverseFFT):
755         (WebCore::FFTFrame::cleanup):
756         (WebCore::FFTFrame::realData):
757         (WebCore::FFTFrame::imagData):
758         (WebCore::FFTFrame::getUpToDateComplexData):
759         (WebCore::FFTFrame::descriptorHandleForSize):
760
761 2010-12-15  Yong Li  <yoli@rim.com>
762
763         Reviewed by Darin Adler.
764
765         Fix stack overflow when there are too many sibling inline boxes by using
766         a loop to traverse children instead of calling each sibling from the first child.
767         https://bugs.webkit.org/show_bug.cgi?id=48255
768
769         Test: fast/overflow/lots-of-sibling-inline-boxes.html
770
771         * rendering/InlineBox.h:
772         (WebCore::InlineBox::setConstructed):
773         (WebCore::InlineBox::next):
774         * rendering/InlineFlowBox.h:
775         (WebCore::InlineFlowBox::setConstructed):
776
777 2010-12-15  Sam Weinig  <sam@webkit.org>
778
779         Reviewed by Anders Carlsson.
780
781         WebKit2: Can't add files to an <input type=file>
782         https://bugs.webkit.org/show_bug.cgi?id=51087
783
784         Add exported function.
785
786         * WebCore.exp.in:
787
788 2010-12-15  Andreas Kling  <andreas.kling@nokia.com>
789
790         Reviewed by Antonio Gomes.
791
792         [Qt] screenIsMonochrome() is broken
793         https://bugs.webkit.org/show_bug.cgi?id=49957
794
795         * platform/qt/PlatformScreenQt.cpp:
796         (WebCore::screenIsMonochrome):
797
798 2010-12-15  Martin Robinson  <mrobinson@igalia.com>
799
800         Reviewed by Gustavo Noronha Silva.
801
802         [GTK] Move button rendering from gtk{2,3}drawing.cpp to RenderThemeGtk
803         https://bugs.webkit.org/show_bug.cgi?id=48486
804
805         Implement button rendering in RenderThemeGtk. The implementation
806         from gtk{2,3}drawing.cpp will be removed once menu list button rendering
807         is implemented in RenderThemeGtk as well.
808
809         No new tests, as this should not change functionality.
810
811         * platform/gtk/RenderThemeGtk.cpp:
812         (WebCore::RenderThemeGtk::paintButton): Add an implementation of button
813         rendering that uses WidgetRenderingContext.
814
815 2010-10-18  Martin Robinson  <mrobinson@igalia.com>
816
817         Reviewed by Gustavo Noronha Silva.
818
819         [GTK] Move input type=range rendering to RenderThemeGtk
820         https://bugs.webkit.org/show_bug.cgi?id=47836
821
822         Begin moving widget rendering out of the old Mozilla theme drawing code,
823         which should remove many lines of code when completed. WidgetRenderingContext
824         now hides the GTK+ 2 vs. 3 API differences, so that RenderThemeGtk can stay
825         version agnostic.
826
827         No new tests as this patch does not change functionality.
828
829         * platform/gtk/RenderThemeGtk.cpp:
830         (WebCore::RenderThemeGtk::RenderThemeGtk): gtkContainer() now returns a
831         GtkWidget, so update the cast here.
832         (WebCore::RenderThemeGtk::getGtkStateType): Added this helper which
833         converts a RenderObject state into a GtkStateType.
834         (WebCore::RenderThemeGtk::paintRenderObject): Removed work-arounds for
835         scale painting, as it's not handled by this method any longer.
836         (WebCore::RenderThemeGtk::paintSliderTrack): Updated to use
837         WidgetRenderingContext.
838         (WebCore::RenderThemeGtk::paintSliderThumb): Ditto.
839         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Get the size
840         properties directly from the widget now instead of asking the Mozilla code.
841         (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Added this
842         helper which reduces the amount of code quite a bit.
843         (WebCore::RenderThemeGtk::gtkContainer): Updated to use helper.
844         (WebCore::RenderThemeGtk::gtkButton): Ditto.
845         (WebCore::RenderThemeGtk::gtkEntry): Ditto.
846         (WebCore::RenderThemeGtk::gtkTreeView): Ditto.
847         (WebCore::RenderThemeGtk::gtkVScale): Added.
848         (WebCore::RenderThemeGtk::gtkHScale): Added.
849         (WebCore::RenderThemeGtk::platformColorsDidChange): Removed
850         GTK_CONTAINER cast.
851         * platform/gtk/RenderThemeGtk.h: Updated to add new GtkHScale and
852          GtkVScale members.
853         * platform/gtk/WidgetRenderingContext.h: Aded new methods to proxy
854         gtk_paint_box, gtk_paint_focus and gtk_paint_slider.
855         * platform/gtk/WidgetRenderingContextGtk2.cpp:
856         (WebCore::WidgetRenderingContext::gtkPaintBox): Added.
857         (WebCore::WidgetRenderingContext::gtkPaintFocus): Ditto.
858         (WebCore::WidgetRenderingContext::gtkPaintSlider): Ditto.
859         * platform/gtk/WidgetRenderingContextGtk3.cpp:
860         (WebCore::WidgetRenderingContext::gtkPaintBox): Ditto.
861         (WebCore::WidgetRenderingContext::gtkPaintFocus): Ditto.
862         (WebCore::WidgetRenderingContext::gtkPaintSlider): Ditto.
863         * platform/gtk/gtk2drawing.c: Removed defunct code!
864         (moz_gtk_get_widget_border):
865         (moz_gtk_widget_paint):
866         * platform/gtk/gtk3drawing.c: Ditto.
867         (moz_gtk_get_widget_border):
868         (moz_gtk_widget_paint):
869         * platform/gtk/gtkdrawing.h:
870
871 2010-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
872
873         Unreviewed, rolling out r74117.
874         http://trac.webkit.org/changeset/74117
875         https://bugs.webkit.org/show_bug.cgi?id=51113
876
877         This broke the GTK1 build. (Requested by mrobinson on
878         #webkit).
879
880         * GNUmakefile.am:
881         * platform/network/soup/cache/webkit/soup-cache.h:
882
883 2010-12-15  Jian Li  <jianli@chromium.org>
884
885         Unreviewed. Fixed a clang compiling error by making the forward
886         declaration of MediaPlayerFactory be consistent with the definition.
887
888         * platform/graphics/MediaPlayer.h:
889
890 2010-12-15  David Hyatt  <hyatt@apple.com>
891
892         Reviewed by Simon Fraser.
893
894         Rename pageY to pageLogicalOffset, since for vertical writing modes it is an x-position rather than a
895         y-position.
896
897         * rendering/LayoutState.cpp:
898         (WebCore::LayoutState::pageLogicalOffset):
899         (WebCore::LayoutState::addForcedColumnBreak):
900         * rendering/LayoutState.h:
901         * rendering/RenderBlock.cpp:
902         (WebCore::RenderBlock::layoutBlock):
903         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
904         (WebCore::RenderBlock::layoutColumns):
905         (WebCore::RenderBlock::setPageLogicalOffset):
906         * rendering/RenderBlock.h:
907         (WebCore::RenderBlock::pageLogicalOffset):
908         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
909         * rendering/RenderFlexibleBox.cpp:
910         (WebCore::RenderFlexibleBox::layoutBlock):
911         * rendering/RenderTable.cpp:
912         (WebCore::RenderTable::layout):
913         * rendering/RenderTableRow.cpp:
914         (WebCore::RenderTableRow::layout):
915         * rendering/RenderTableSection.cpp:
916         (WebCore::RenderTableSection::layoutRows):
917
918 2010-12-13  Pavel Podivilov  <podivilov@chromium.org>
919
920         Reviewed by Pavel Feldman.
921
922         Web Inspector: move scripts storage from ScriptsPanel to DebuggerModel.
923         https://bugs.webkit.org/show_bug.cgi?id=50908
924
925         * inspector/front-end/BreakpointManager.js:
926         (WebInspector.BreakpointManager):
927         (WebInspector.BreakpointManager.prototype._debuggerPaused):
928         * inspector/front-end/CallStackSidebarPane.js:
929         (WebInspector.CallStackSidebarPane):
930         (WebInspector.CallStackSidebarPane.prototype.update):
931         * inspector/front-end/DebuggerModel.js:
932         (WebInspector.DebuggerModel):
933         (WebInspector.DebuggerModel.prototype.setBreakpoint):
934         (WebInspector.DebuggerModel.prototype._setBreakpoint):
935         (WebInspector.DebuggerModel.prototype.scriptForSourceID):
936         (WebInspector.DebuggerModel.prototype.scriptsForURL):
937         (WebInspector.DebuggerModel.prototype.queryScripts):
938         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
939         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
940         (WebInspector.DebuggerModel.prototype.breakpointRestored):
941         (WebInspector.DebuggerModel.prototype.debuggerPaused):
942         (WebInspector.DebuggerModel.prototype.debuggerResumed):
943         * inspector/front-end/Resource.js:
944         * inspector/front-end/ScriptsPanel.js:
945         (WebInspector.ScriptsPanel): eliminate sourceIDMap
946         * inspector/front-end/SourceFrame.js:
947         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
948         (WebInspector.SourceFrame.prototype._setBreakpoint):
949         * inspector/front-end/SourceView.js:
950         (WebInspector.SourceView):
951         * inspector/front-end/inspector.js:
952         (WebInspector.createJSBreakpointsSidebarPane):
953         (WebInspector.parsedScriptSource):
954         (WebInspector.failedToParseScriptSource):
955
956 2010-12-15  Eric Carlson  <eric.carlson@apple.com>
957
958         Reviewed by Darin Adler.
959
960         MediaPlayer should try all installed media engines
961         https://bugs.webkit.org/show_bug.cgi?id=50209
962
963         * platform/graphics/MediaPlayer.cpp:
964         (WebCore::bestMediaEngineForTypeAndCodecs): Rename from chooseBestEngineForTypeAndCodecs. Take optional
965         parameter for current engine. 
966         (WebCore::nextMediaEngine): New, return the next media engine in the list.
967         (WebCore::MediaPlayer::MediaPlayer): Initialize reload timer.
968         (WebCore::MediaPlayer::load): Store url, mime type, and codecs parameter in member variables.
969         (WebCore::MediaPlayer::loadWithNextMediaEngine): New, initiate loading with the next media engine.
970         (WebCore::MediaPlayer::supportsType): Make contentType parameter const.
971         (WebCore::MediaPlayer::reloadTimerFired): New, call loadWithNextMediaEngine.
972         (WebCore::MediaPlayer::networkStateChanged): If network state signals a failure and the file's
973         metadata has not loaded, give the next installed engine a try.
974         * platform/graphics/MediaPlayer.h:
975
976 2010-12-15  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
977
978         Reviewed by Martin Robinson.
979
980         Changes to enable building WebKit2 for Gtk port
981         (https://bugs.webkit.org/show_bug.cgi?id=37369)
982
983         No new functionality added or deleted. Only makefile change. Hence, no tests added.
984
985         * GNUmakefile.am: Removed bindings/gobject from webcore_sources & webcore_cppflags and added them to WebKit/gtk/GNUmakefile.am
986         * platform/network/soup/cache/webkit/soup-cache.h: Remove include <webkit/webkitdefines.h> and declare WEBKIT_API directly
987
988 2010-12-15  Jarred Nicholls  <jarred@sencha.com>
989
990         Reviewed by Andreas Kling.
991
992         [Qt] Implement the File API spec
993         https://bugs.webkit.org/show_bug.cgi?id=49839
994
995         No new tests. fast/files tests work when manually operated.
996         They do not automatically work due to Qt's inability to handle multi-file
997         inputs (https://bugs.webkit.org/show_bug.cgi?id=22048) as well as Qt's DRT
998         is missing an eventSender.beginDragWithFiles implementation.
999
1000         * WebCore.pri:
1001         * WebCore.pro:
1002         * features.pri:
1003         * platform/qt/FileSystemQt.cpp:
1004         (WebCore::directoryName):
1005         (WebCore::readFromFile):
1006         (WebCore::seekFile):
1007
1008 2010-12-14  Antti Koivisto  <antti@apple.com>
1009
1010         Reviewed by Alexey Proskuryakov.
1011
1012         https://bugs.webkit.org/show_bug.cgi?id=49548
1013         WebCore cache stores duplicate copies of subresources with URL fragments
1014         
1015         - Strip fragment identifiers from HTTP and file URLs for the memory cache.
1016         - Changed some CachedResourceLoader and MemoryCache interfaces to use KURLs
1017           instead of strings to reduce repeated URL parsing.
1018
1019         Test: http/tests/cache/subresource-fragment-identifier.html
1020
1021         * inspector/InspectorResourceAgent.cpp:
1022         (WebCore::InspectorResourceAgent::cachedResource):
1023         * loader/FrameLoader.cpp:
1024         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
1025         * loader/cache/CachedResource.cpp:
1026         (WebCore::CachedResource::~CachedResource):
1027         * loader/cache/CachedResourceLoader.cpp:
1028         (WebCore::CachedResourceLoader::cachedResource):
1029         (WebCore::CachedResourceLoader::checkForReload):
1030         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1031         (WebCore::CachedResourceLoader::requestResource):
1032         * loader/cache/CachedResourceLoader.h:
1033         * loader/cache/MemoryCache.cpp:
1034         (WebCore::MemoryCache::requestResource):
1035         (WebCore::MemoryCache::requestUserCSSStyleSheet):
1036         (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
1037         (WebCore::MemoryCache::resourceForURL):
1038         * loader/cache/MemoryCache.h:
1039
1040 2010-12-15  Anton Muhin  <antonm@chromium.org>
1041
1042         Reviewed by David Levin.
1043
1044         [v8] Next round of CSS GC story: proper grouping of CSSStyleDeclarations
1045         https://bugs.webkit.org/show_bug.cgi?id=50965
1046
1047         * bindings/v8/V8GCController.cpp:
1048         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
1049         (WebCore::DOMObjectGrouperVisitor::addAllItems):
1050
1051 2010-12-13  Pavel Podivilov  <podivilov@chromium.org>
1052
1053         Reviewed by Yury Semikhatsky.
1054
1055         Web Inspector: push persistent breakpoints into backend state cookie so they hit on navigation.
1056         https://bugs.webkit.org/show_bug.cgi?id=48858
1057
1058         BreakpointManager pushes all persistent breakpoints to backend when loaded.
1059         InspectorController restores sticky breakpoints from cookie on navigation.
1060
1061         * inspector/Inspector.idl:
1062         * inspector/InspectorController.cpp:
1063         (WebCore::InspectorController::InspectorController):
1064         (WebCore::InspectorController::disconnectFrontend):
1065         (WebCore::InspectorController::didCommitLoad):
1066         (WebCore::InspectorController::setStickyBreakpoints):
1067         (WebCore::InspectorController::restoreStickyBreakpoints):
1068         (WebCore::InspectorController::restoreStickyBreakpoint):
1069         * inspector/InspectorController.h:
1070         * inspector/InspectorState.cpp:
1071         (WebCore::InspectorState::InspectorState):
1072         (WebCore::InspectorState::getObject):
1073         (WebCore::InspectorState::setObject):
1074         (WebCore::InspectorState::registerObject):
1075         * inspector/InspectorState.h:
1076         * inspector/front-end/BreakpointManager.js:
1077         (WebInspector.BreakpointManager):
1078         * inspector/front-end/BreakpointsSidebarPane.js:
1079         (WebInspector.BreakpointsSidebarPane):
1080         (WebInspector.BreakpointsSidebarPane.prototype._removeListElement):
1081         (WebInspector.BreakpointsSidebarPane.prototype._projectChanged):
1082         (WebInspector.EventListenerBreakpointsSidebarPane):
1083         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
1084         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._breakpointAdded):
1085         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._projectChanged):
1086         * inspector/front-end/CallStackSidebarPane.js:
1087         (WebInspector.CallStackSidebarPane):
1088         * inspector/front-end/ElementsPanel.js:
1089         (WebInspector.ElementsPanel.prototype.reset):
1090         * inspector/front-end/ScriptsPanel.js:
1091         (WebInspector.ScriptsPanel.prototype.reset):
1092         * inspector/front-end/Settings.js:
1093         (WebInspector.Settings.prototype.inspectedURLChanged):
1094         (WebInspector.Settings.prototype.get projectId):
1095         (WebInspector.Settings.prototype.findSettingForAllProjects):
1096         (WebInspector.Settings.prototype._formatProjectKey):
1097         * inspector/front-end/inspector.js:
1098         (WebInspector.createDOMBreakpointsSidebarPane):
1099         (WebInspector.createXHRBreakpointsSidebarPane):
1100         (WebInspector.reset):
1101         (WebInspector.inspectedURLChanged):
1102
1103 2010-12-15  Mario Sanchez Prada  <msanchez@igalia.com>
1104
1105         Unreviewed, fix compilation warnings after r74066.
1106
1107         * rendering/RenderBox.cpp:
1108         (WebCore::layersUseImage): Place this static function between the
1109         same if-def region used in the only place where it's called from.
1110
1111 2010-12-15  Emil Eklund  <eae@chromium.org>
1112
1113         Reviewed by Adam Barth.
1114
1115         Change ContainerNode::willRemoveChildren to not fire mutation events for children
1116         added as a result of a mutation event, thereby avoiding an infinite loop.
1117         https://bugs.webkit.org/show_bug.cgi?id=51079
1118
1119         Test: fast/dom/containerNode.html
1120
1121         * dom/ContainerNode.cpp:
1122         (WebCore::willRemoveChildren): Don't fire mutation events for children added during a mutation event.
1123
1124 2010-12-14  Dan Bernstein  <mitz@apple.com>
1125
1126         Reviewed by Maciej Stachowiak.
1127
1128         <rdar://problem/8767193> REGRESSION (r60822): caps-lock-indicator is accepted as a -webkit-appearance value
1129         https://bugs.webkit.org/show_bug.cgi?id=51096
1130
1131         Test: fast/css/appearance-caps-lock-indicator.html
1132
1133         * css/CSSValueKeywords.in: Moved caps-lock-indicator outside the range of values that should be
1134         accepted by the parser, and added comments about maintaining the list of appearance values.
1135         * platform/ThemeTypes.h: Moved CapsLockIndicatorPart to the end of the ControlPart enum.
1136
1137 2010-12-14  takano takumi  <takano@apple.com>
1138
1139         Reviewed by Dan Bernstein.
1140
1141         text-combine value names have been changed in the css3 proposal.
1142         https://bugs.webkit.org/show_bug.cgi?id=51089
1143
1144         Changed text-combine's value names from "none|cluster|upright" to "none|horizontal".
1145
1146         * css/CSSParser.cpp: Changed value name.
1147         (WebCore::CSSParser::parseValue):
1148         * css/CSSPrimitiveValueMappings.h: Changed value name.
1149         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1150         (WebCore::CSSPrimitiveValue::operator TextCombine):
1151         * css/CSSValueKeywords.in: No more text-combine specific values needed since
1152         "horizontal" is already there.
1153         * rendering/style/RenderStyleConstants.h: Changed value name.
1154         * rendering/style/StyleRareNonInheritedData.h: Changed textCombine field size.
1155
1156 2010-12-14  Koan-Sin Tan  <koansin.tan@gmail.com>
1157
1158         Reviewed by Alexey Proskuryakov.
1159
1160         Kana should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
1161         https://bugs.webkit.org/show_bug.cgi?id=51012
1162
1163         Kana should be displayed correctly in vertical text with broken font.
1164
1165         Test: fast/blockflow/japanese-rl-text-with-broken-font.html
1166
1167         * platform/graphics/Font.cpp:
1168         (WebCore::Font::isCJKIdeographOrSymbol): add katakana, hiraganna, and Halfwidth and Fullwidth Forms
1169
1170 2010-12-14  Dan Bernstein  <mitz@apple.com>
1171
1172         Reviewed by Sam Weinig.
1173
1174         Additional RenderStyle support for the text-emphasis CSS property
1175         Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
1176         https://bugs.webkit.org/show_bug.cgi?id=48539
1177
1178         No test possible, since this is just adding a function to be used by upcoming patches.
1179
1180         * platform/text/CharacterNames.h: Added characters used as emphasis marks.
1181         * rendering/style/RenderStyle.cpp:
1182         (WebCore::RenderStyle::textEmphasisMarkString): Added. Returns a string containing the
1183         emphasis mark, or the null AtomicString if there is none.
1184         * rendering/style/RenderStyle.h:
1185
1186 2010-12-14  Anton D'Auria  <adauria@apple.com>
1187
1188         Reviewed by Darin Adler.
1189
1190         Do not allow access to existing HTML5 databases in private browsing
1191         mode https://bugs.webkit.org/show_bug.cgi?id=49332
1192
1193         Test: storage/private-browsing-noread-nowrite.html
1194
1195         Previously, read-only transactions and private browsing mode were
1196         represented by the same SQLStatement and DatabaseAuthorizer states.
1197         This patch removes the m_readOnly member variable from SQLStatement and
1198         DatabaseAuthorizer, and replaces it with m_permissions whose bit fields
1199         are initialized by a DatabaseAuthorizer enum Permissions (ReadWrite,
1200         ReadOnly, NoAccess). A read-only transaction sets permissions to
1201         ReadOnly, and if !m_database->scriptExecutionContext()->allowDatabaseAccess(),
1202         then permissions also set to NoAccess.
1203
1204         * dom/Document.cpp:
1205         (WebCore::Document::allowDatabaseAccess): this method was previously
1206         called isDatabaseReadOnly. It checks if private browsing preference is
1207         set. This method is renamed because it is used to check if private
1208         browsing restricts access to databases.
1209         * dom/Document.h:
1210         * dom/ScriptExecutionContext.h:
1211         * storage/AbstractDatabase.cpp:
1212         (WebCore::AbstractDatabase::setAuthorizerPermissions):
1213         * storage/AbstractDatabase.h:
1214         * storage/DatabaseAuthorizer.cpp:
1215         (WebCore::DatabaseAuthorizer::reset):
1216         (WebCore::DatabaseAuthorizer::createTable):
1217         (WebCore::DatabaseAuthorizer::createTempTable):
1218         (WebCore::DatabaseAuthorizer::dropTable):
1219         (WebCore::DatabaseAuthorizer::dropTempTable):
1220         (WebCore::DatabaseAuthorizer::allowAlterTable):
1221         (WebCore::DatabaseAuthorizer::createIndex):
1222         (WebCore::DatabaseAuthorizer::createTempIndex):
1223         (WebCore::DatabaseAuthorizer::dropIndex):
1224         (WebCore::DatabaseAuthorizer::dropTempIndex):
1225         (WebCore::DatabaseAuthorizer::createTrigger):
1226         (WebCore::DatabaseAuthorizer::createTempTrigger):
1227         (WebCore::DatabaseAuthorizer::dropTrigger):
1228         (WebCore::DatabaseAuthorizer::dropTempTrigger):
1229         (WebCore::DatabaseAuthorizer::createView):
1230         (WebCore::DatabaseAuthorizer::createTempView):
1231         (WebCore::DatabaseAuthorizer::dropView):
1232         (WebCore::DatabaseAuthorizer::dropTempView):
1233         (WebCore::DatabaseAuthorizer::createVTable):
1234         (WebCore::DatabaseAuthorizer::dropVTable):
1235         (WebCore::DatabaseAuthorizer::allowDelete):
1236         (WebCore::DatabaseAuthorizer::allowInsert):
1237         (WebCore::DatabaseAuthorizer::allowUpdate):
1238         (WebCore::DatabaseAuthorizer::allowRead):
1239         (WebCore::DatabaseAuthorizer::allowReindex):
1240         (WebCore::DatabaseAuthorizer::allowWrite): a new private method that
1241         checks if DatabaseAuthorizer is enabled and if it is in ReadOnly or
1242         NoAccess mode.
1243         (WebCore::DatabaseAuthorizer::setReadOnly):
1244         (WebCore::DatabaseAuthorizer::setPermissions):
1245         * storage/DatabaseAuthorizer.h:
1246         * storage/SQLStatement.cpp:
1247         (WebCore::SQLStatement::create):
1248         (WebCore::SQLStatement::SQLStatement):
1249         (WebCore::SQLStatement::execute):
1250         * storage/SQLStatement.h:
1251         * storage/SQLStatementSync.cpp:
1252         (WebCore::SQLStatementSync::SQLStatementSync):
1253         (WebCore::SQLStatementSync::execute):
1254         * storage/SQLStatementSync.h:
1255         * storage/SQLTransaction.cpp:
1256         (WebCore::SQLTransaction::executeSQL):
1257         * storage/SQLTransactionSync.cpp:
1258         (WebCore::SQLTransactionSync::executeSQL):
1259         * workers/WorkerContext.h:
1260         (WebCore::WorkerContext::allowDatabaseAccess):
1261
1262 2010-12-02  MORITA Hajime  <morrita@google.com>
1263
1264         Reviewed by Dimitri Glazkov.
1265
1266         [chromium] Fix drawing of inset box shadows
1267         https://bugs.webkit.org/show_bug.cgi?id=41576
1268
1269         When clearing outside clipped path, the context contains unexpected transform.
1270         Fixed to restore original state before the clear.
1271
1272         * platform/graphics/skia/PlatformContextSkia.cpp:
1273         (WebCore::PlatformContextSkia::clipPathAntiAliased):
1274         (WebCore::PlatformContextSkia::applyAntiAliasedClipPaths):
1275
1276 2010-12-14  Anders Carlsson  <andersca@apple.com>
1277
1278         Reviewed by Sam Weinig.
1279
1280         Mouse Events Not Received in Run Applet in their Own Process Mode
1281         https://bugs.webkit.org/show_bug.cgi?id=51078
1282         <rdar://problem/8333491>
1283
1284         Make sure that Widget::handleEvent is called for applets as well.
1285
1286         * html/HTMLAppletElement.cpp:
1287         (WebCore::HTMLAppletElement::defaultEventHandler):
1288         * html/HTMLAppletElement.h:
1289
1290 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
1291
1292         Reviewed by Chris Marrin.
1293
1294         Parts of page disappear
1295         https://bugs.webkit.org/show_bug.cgi?id=41701
1296         
1297         The page has text-indent: -1000000px on an element that becomes
1298         compositing, causing a huge tiled layer to get created.
1299         
1300         r63452 aimed to fix this by clamping layer bounds to the viewport,
1301         but did not do so for pages running accelerated animations (since
1302         we don't want to clamp for transform animations). However, this
1303         page only has an opacity animation.
1304         
1305         So refine the logic added for r63452 to only call setCompositingConsultsOverlap(false)
1306         for transform animations.
1307
1308         Test: compositing/geometry/limit-layer-bounds-opacity-transition.html
1309
1310         * rendering/RenderLayerBacking.cpp:
1311         (WebCore::RenderLayerBacking::startAnimation): call didStartAcceleratedAnimation()
1312         with the appropriate properties, and clean up confusing logic that was used to
1313         compute the return value. We want to return true if either property is accelerated.
1314
1315         (WebCore::RenderLayerBacking::startTransition): Call didStartAcceleratedAnimation()
1316         with the appropriate property.
1317         
1318         * rendering/RenderLayerCompositor.h:
1319         * rendering/RenderLayerCompositor.cpp:
1320         (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation): Pass the property in,
1321         and only turn off overlap testing if we see a transform animation.
1322
1323 2010-12-14  Brady Eidson  <beidson@apple.com>
1324
1325         Reviewed by Alexey Proskuryakov.
1326
1327         <rdar://problem/8225016> and https://bugs.webkit.org/show_bug.cgi?id=40138
1328         Authorization header is sent from an HTTP Auth protected site on redirect
1329         Test: http/tests/misc/authentication-sent-to-redirect.html
1330
1331         Add helper to clear the Auth headers from a resource request:
1332         * platform/network/ResourceRequestBase.cpp:
1333         (WebCore::ResourceRequestBase::clearHTTPAuthorization):
1334         * platform/network/ResourceRequestBase.h:
1335
1336         Only Mac and Windows CFNetwork ports seem to have this problem, so plug it for them:
1337         * platform/network/cf/ResourceHandleCFNet.cpp:
1338         (WebCore::ResourceHandle::willSendRequest):
1339         * platform/network/mac/ResourceHandleMac.mm:
1340         (WebCore::ResourceHandle::willSendRequest):
1341
1342 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
1343
1344         Reviewed by Chris Marrin.
1345
1346         Crash in WebCore::GraphicsLayer::paintGraphicsLayerContents() loading this URL
1347         https://bugs.webkit.org/show_bug.cgi?id=51072
1348
1349         Fix a crash when painting a layer whose PlatformCALayer has been deleted,
1350         by clearing the PlatformCALayer value on the CALayer when the PlatformCALayer
1351         is destroyed.
1352         
1353         I was not able to reduce the page to a simple testcase.
1354
1355         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1356         (PlatformCALayer::~PlatformCALayer):
1357
1358 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1359
1360         Unreviewed, build fix.
1361
1362         [Qt] Fix the list of header files in WebCore.pro after r74049.
1363
1364         No new tests as there is no new functionality.
1365
1366         * WebCore.pro:
1367
1368 2010-12-14  Yael Aharon  <yael.aharon@nokia.com>
1369
1370         Reviewed by Andreas Kling.
1371
1372         [Qt] Focus rings are ugly, rects should be united instead of drawn individually
1373         https://bugs.webkit.org/show_bug.cgi?id=49953
1374
1375         Create a QPainterPath and add to it the focus rects, one at a time.
1376         Combine the 2 drawFocusRing functions into one function drawFocusRingForPath.
1377
1378         Tests: fast/css/focus-ring-detached.html
1379                fast/css/focus-ring-multiline.html
1380
1381         * platform/graphics/qt/GraphicsContextQt.cpp:
1382         (WebCore::drawFocusRingForPath):
1383         (WebCore::GraphicsContext::drawFocusRing):
1384
1385 2010-12-14  Mark Rowe  <mrowe@apple.com>
1386
1387         Fix the Qt build.
1388
1389         * xml/XSLTProcessorQt.cpp:
1390         (WebCore::XSLTProcessor::transformToString): Make the conversion to QString explicit
1391         since QVariant can be constructed from either a QString or a bool.
1392
1393 2010-12-14  Simon Fraser  <simon.fraser@apple.com>
1394
1395         Reviewed by Dan Bernstein.
1396
1397         compositing/masks/simple-composited-mask.html failure
1398         https://bugs.webkit.org/show_bug.cgi?id=49746
1399
1400         Geometry of composited layers with a mask depends on the loading
1401         of the mask image, since maskClipRect() is used for the layer bounds.
1402         
1403         So when RenderBox::imageChanged() is called for an image used by
1404         a mask on a layer with a composited mask, call the newly-renamed
1405         layer->contentsChanged() method. This percolates down into RenderLayerBacking,
1406         ending in a layer geometry update.
1407         
1408         Renamed RenderLayer::rendereContentsChanged() to contentsChanged() and added
1409         an enum to say what changed, for somewhat more efficient updating.
1410         
1411         Also, when the mask layer gets resized, make sure we mark it as needing
1412         display.
1413         
1414         Tested by pixel result of compositing/masks/simple-composited-mask.html
1415
1416         * html/canvas/CanvasRenderingContext2D.cpp:
1417         (WebCore::CanvasRenderingContext2D::didDraw):
1418         * html/canvas/WebGLRenderingContext.cpp:
1419         (WebCore::WebGLRenderingContext::markContextChanged):
1420         (WebCore::WebGLRenderingContext::reshape):
1421         * rendering/RenderBox.cpp:
1422         (WebCore::layersUseImage):
1423         (WebCore::RenderBox::imageChanged):
1424         * rendering/RenderImage.cpp:
1425         (WebCore::RenderImage::imageDimensionsChanged):
1426         (WebCore::RenderImage::notifyFinished):
1427         * rendering/RenderLayer.cpp:
1428         (WebCore::RenderLayer::contentChanged):
1429         * rendering/RenderLayer.h:
1430         * rendering/RenderLayerBacking.cpp:
1431         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1432         (WebCore::RenderLayerBacking::contentChanged):
1433         * rendering/RenderLayerBacking.h:
1434         * rendering/RenderVideo.cpp:
1435         (WebCore::RenderVideo::updatePlayer):
1436
1437 2010-12-14  Mark Rowe  <mrowe@apple.com>
1438
1439         Reviewed by Sam Weinig.
1440
1441         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
1442
1443         We were crashing inside MediaPlayerPrivateQTKit::createQTMovie as we were passing a null URL in
1444         to CFNetworkCopyProxiesForURL. This happened because we were null-checking the URL incorrectly.
1445
1446         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1447         (WebCore::MediaPlayerPrivateQTKit::resumeLoad): Explicitly test for a null string.
1448
1449 2010-12-14  David Hyatt  <hyatt@apple.com>
1450
1451         Reviewed by Dan Bernstein.
1452
1453         https://bugs.webkit.org/show_bug.cgi?id=50970
1454         
1455         It's arguably a bug, but we don't let inline flow layers paint floating
1456         descendants.  The containing block of the inline flow paints them instead.
1457         However our shouldPaint logic has always been flawed and has turned off propagation
1458         of painting when an inline flow layer is enclosing the float.
1459         
1460         Change enclosingSelfPaintingLayer to enclosingFloatPaintingLayer to be more precise
1461         and for now limit it to RenderBoxes. 
1462         
1463         Added fast/block/float/floatstack.html
1464
1465         * rendering/RenderBlock.cpp:
1466         (WebCore::RenderBlock::addOverhangingFloats):
1467         * rendering/RenderBox.cpp:
1468         (WebCore::RenderBox::enclosingFloatPaintingLayer):
1469         * rendering/RenderBox.h:
1470         * rendering/RenderObject.cpp:
1471         * rendering/RenderObject.h:
1472
1473 2010-12-14  Mihai Parparita  <mihaip@chromium.org>
1474
1475         Reviewed by Dimitri Glazkov.
1476
1477         Move asynchronous event dispatching out of Document
1478         https://bugs.webkit.org/show_bug.cgi?id=49785
1479         
1480         Move asynchonous event code out of Document and into a standalone
1481         EventQueue class (which supports async events for both regular nodes
1482         and the window object).
1483
1484         No new tests necessary, since no new functionality is exposed (existing
1485         layout tests pass).
1486
1487         * Android.mk:
1488         * CMakeLists.txt:
1489         * GNUmakefile.am:
1490         * WebCore.gypi:
1491         * WebCore.pro:
1492         * WebCore.vcproj/WebCore.vcproj:
1493         * WebCore.xcodeproj/project.pbxproj:
1494         * dom/Document.cpp:
1495         (WebCore::Document::Document):
1496         (WebCore::Document::enqueueWindowEvent):
1497         (WebCore::Document::enqueueHashchangeEvent):
1498         * dom/DOMAllInOne.cpp:
1499         (WebCore::Document::eventQueue):
1500         * dom/Document.h:
1501         * dom/EventQueue.cpp: Added.
1502         (WebCore::EventQueue::EventQueue):
1503         (WebCore::EventQueue::enqueueEvent):
1504         (WebCore::EventQueue::pendingEventTimerFired):
1505         (WebCore::EventQueue::dispatchEvent):
1506         * dom/EventQueue.h: Added.
1507         * storage/StorageEventDispatcher.cpp:
1508         (WebCore::StorageEventDispatcher::dispatch):
1509
1510 2010-12-14  Kyounga Ra  <kyounga.ra@gmail.com>
1511
1512         Reviewed by Adam Barth.
1513
1514         <noscript> is rendered with enabled XHTMLMP.
1515         https://bugs.webkit.org/show_bug.cgi?id=48493
1516
1517         * html/HTMLElement.cpp:
1518         (WebCore::HTMLElement::rendererIsNeeded):
1519
1520 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1521
1522         Reviewed by Eric Seidel.
1523
1524         [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
1525         https://bugs.webkit.org/show_bug.cgi?id=50231
1526
1527         No new tests as there is no new functionality.
1528
1529         Guard CONFIG+=link_pkgconfig with !symbian.
1530
1531         * WebCore.pro:
1532
1533 2010-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1534
1535         Unreviewed, rolling out r74040.
1536         http://trac.webkit.org/changeset/74040
1537         https://bugs.webkit.org/show_bug.cgi?id=51050
1538
1539         Breaks 2d.shadow.canvas.transparent.2 and
1540         2d.shadow.image.transparent.2 (Requested by helder on
1541         #webkit).
1542
1543         * platform/graphics/ContextShadow.cpp:
1544         (WebCore::ContextShadow::ContextShadow):
1545         (WebCore::ContextShadow::calculateLayerBoundingRect):
1546         * platform/graphics/ContextShadow.h:
1547         (WebCore::ContextShadow::offset):
1548         * platform/graphics/qt/ContextShadowQt.cpp:
1549         (WebCore::ContextShadow::beginShadowLayer):
1550         (WebCore::ContextShadow::endShadowLayer):
1551         * platform/graphics/qt/GraphicsContextQt.cpp:
1552         (WebCore::GraphicsContext::fillPath):
1553         (WebCore::GraphicsContext::strokePath):
1554         (WebCore::GraphicsContext::fillRect):
1555         (WebCore::GraphicsContext::fillRoundedRect):
1556         (WebCore::GraphicsContext::setPlatformShadow):
1557
1558 2010-12-14  Nate Chapin  <japhet@chromium.org>
1559
1560         Unreviewed, fixing qt (hopefully for real this time).
1561
1562         Remove a couple more references to loader.h.
1563
1564         * xml/XSLStyleSheetQt.cpp:
1565         * xml/XSLTProcessorQt.cpp:
1566
1567 2010-12-14  Nate Chapin  <japhet@chromium.org>
1568
1569         Unreviewed, fix mac and qt builds.
1570
1571         Missed a couple of references to loader.h and
1572         improperly added CachedResourceRequest.h to
1573         WebCore.xcodeproj.
1574
1575         * WebCore.xcodeproj/project.pbxproj:
1576         * platform/android/TemporaryLinkStubs.cpp:
1577         * platform/qt/TemporaryLinkStubsQt.cpp:
1578
1579 2010-12-14  Nate Chapin  <japhet@chromium.org>
1580
1581         Reviewed by Adam Barth.
1582
1583         Rename Loader to CachedResourceRequest.
1584         https://bugs.webkit.org/show_bug.cgi?id=50848
1585
1586         No new tests, rename only.
1587
1588         * Android.mk:
1589         * CMakeLists.txt:
1590         * GNUmakefile.am:
1591         * WebCore.gypi:
1592         * WebCore.pro:
1593         * WebCore.vcproj/WebCore.vcproj:
1594         * WebCore.xcodeproj/project.pbxproj:
1595         * css/CSSStyleSelector.cpp:
1596         * loader/cache/CachedCSSStyleSheet.cpp:
1597         * loader/cache/CachedFont.cpp:
1598         * loader/cache/CachedResource.cpp:
1599         (WebCore::CachedResource::setRequest):
1600         * loader/cache/CachedResource.h:
1601         * loader/cache/CachedResourceLoader.cpp:
1602         (WebCore::CachedResourceLoader::load):
1603         (WebCore::CachedResourceLoader::loadDone):
1604         (WebCore::CachedResourceLoader::cancelRequests):
1605         * loader/cache/CachedResourceLoader.h:
1606         * loader/cache/CachedResourceRequest.cpp: Copied from WebCore/loader/loader.cpp.
1607         * loader/cache/CachedResourceRequest.h: Copied from WebCore/loader/loader.h.
1608         * loader/loader.cpp: Removed.
1609         * loader/loader.h: Removed.
1610         * xml/XSLStyleSheetLibxslt.cpp:
1611         * xml/XSLTProcessor.cpp:
1612         * xml/XSLTProcessorLibxslt.cpp:
1613
1614 2010-12-14  David Hyatt  <hyatt@apple.com>
1615
1616         Reviewed by Tim Hatcher.
1617
1618         https://bugs.webkit.org/show_bug.cgi?id=46422
1619
1620         Rename pageHeight variables and members in WebCore to pageLogicalHeight in preparation for
1621         making printing and pagination work with vertical writing modes.
1622
1623         * page/FrameView.cpp:
1624         (WebCore::FrameView::forceLayoutForPagination):
1625         * rendering/LayoutState.cpp:
1626         (WebCore::LayoutState::LayoutState):
1627         (WebCore::LayoutState::clearPaginationInformation):
1628         * rendering/LayoutState.h:
1629         (WebCore::LayoutState::LayoutState):
1630         (WebCore::LayoutState::isPaginated):
1631         (WebCore::LayoutState::pageLogicalHeight):
1632         (WebCore::LayoutState::pageLogicalHeightChanged):
1633         * rendering/RenderBlock.cpp:
1634         (WebCore::RenderBlock::layoutBlock):
1635         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
1636         (WebCore::RenderBlock::insertFloatingObject):
1637         (WebCore::RenderBlock::layoutColumns):
1638         (WebCore::RenderBlock::nextPageTop):
1639         (WebCore::RenderBlock::applyBeforeBreak):
1640         (WebCore::RenderBlock::applyAfterBreak):
1641         (WebCore::RenderBlock::adjustForUnsplittableChild):
1642         (WebCore::RenderBlock::adjustLinePositionForPagination):
1643         * rendering/RenderBlock.h:
1644         * rendering/RenderBox.cpp:
1645         (WebCore::RenderBox::computeLogicalHeight):
1646         * rendering/RenderFlexibleBox.cpp:
1647         (WebCore::RenderFlexibleBox::layoutBlock):
1648         * rendering/RenderTable.cpp:
1649         (WebCore::RenderTable::layout):
1650         * rendering/RenderTableRow.cpp:
1651         (WebCore::RenderTableRow::layout):
1652         * rendering/RenderTableSection.cpp:
1653         (WebCore::RenderTableSection::layoutRows):
1654         * rendering/RenderView.cpp:
1655         (WebCore::RenderView::RenderView):
1656         (WebCore::RenderView::layout):
1657         * rendering/RenderView.h:
1658         (WebCore::RenderView::pageLogicalHeight):
1659         (WebCore::RenderView::setPageLogicalHeight):
1660
1661 2010-12-14  Dimitri Glazkov  <dglazkov@chromium.org>
1662
1663         Fix GTK build by adding source files that were accidentally skipped in
1664         r74044. Sorry!
1665
1666         * GNUmakefile.am: Added SliderThumbElement.
1667
1668 2010-12-14  Beth Dakin  <bdakin@apple.com>
1669
1670         Reviewed by Darin Adler.
1671
1672         Fix for https://bugs.webkit.org/show_bug.cgi?id=50974 
1673         getComputedStyle() returns wrong values for zoomed elements when 
1674         display is none
1675         -and corresponding-
1676         <rdar://problem/8522731>
1677
1678         If there is no renderer but the RenderStyle's value is a fixed 
1679         length, send it through zoomAdjustedPixelValue(). There's not much 
1680         we can do for other length types without a renderer.
1681         * css/CSSComputedStyleDeclaration.cpp:
1682         (WebCore::zoomAdjustedPixelValueForLength):
1683         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1684
1685 2010-12-13  Dimitri Glazkov  <dglazkov@chromium.org>
1686
1687         Reviewed by David Levin.
1688
1689         Move SliderThumbElement into its own file.
1690         https://bugs.webkit.org/show_bug.cgi?id=50973
1691
1692         No change in behavior, so no tests.
1693
1694         * Android.mk: Added SliderThumbElement.
1695         * CMakeLists.txt: Ditto.
1696         * WebCore.gyp/WebCore.gyp: Ditto.
1697         * WebCore.gypi: Ditto.
1698         * WebCore.pro: Ditto.
1699         * WebCore.vcproj/WebCore.vcproj: Ditto.
1700         * WebCore.xcodeproj/project.pbxproj: Ditto,
1701         * html/shadow/SliderThumbElement.cpp: Added.
1702         * html/shadow/SliderThumbElement.h: Added.
1703         * rendering/RenderSlider.cpp: Removed code that was moved into
1704             SliderThumbElement.
1705
1706 2010-12-13  Alexey Proskuryakov  <ap@apple.com>
1707
1708         Reviewed by Adam Barth.
1709
1710         https://bugs.webkit.org/show_bug.cgi?id=50953
1711         DNS Prefetch should be an opt-in feature
1712
1713         No new tests, can't test DNS.
1714
1715         * dom/Document.h: Made initDNSPrefetch public, since Page now calls it.
1716
1717         * page/Page.cpp: (WebCore::Page::dnsPrefetchingStateChanged):
1718         * page/Page.h:
1719         Documents cache the value of this setting, so they need to be notified of changes. In particular,
1720         the first document in a page is created before settings are applied.
1721
1722         * page/Settings.cpp:
1723         (WebCore::Settings::Settings): Changed default to false.
1724         (WebCore::Settings::setDNSPrefetchingEnabled): Notify the page about the change.
1725
1726 2010-12-14  Helder Correia  <helder@sencha.com>
1727
1728         Reviewed by Ariya Hidayat.
1729
1730         [Qt] Canvas shadow offset should not be affected by any transformation
1731         https://bugs.webkit.org/show_bug.cgi?id=50422
1732
1733         On a canvas context, shadows are currently affected by all
1734         transformations except scaling. According to the spec:
1735         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows
1736
1737         "The shadowOffsetX and shadowOffsetY attributes specify the distance
1738         that the shadow will be offset in the positive horizontal and positive
1739         vertical distance respectively. Their values are in coordinate space
1740         units. They are not affected by the current transformation matrix."
1741
1742         NOTE: this applies only to canvas, not to box shadows.
1743
1744         Test: fast/canvas/canvas-transforms-fillRect-shadow.html
1745
1746         * platform/graphics/ContextShadow.cpp:
1747         (WebCore::ContextShadow::ContextShadow):
1748         (WebCore::ContextShadow::calculateLayerBoundingRect):
1749         * platform/graphics/ContextShadow.h:
1750         (WebCore::ContextShadow::setShadowsIgnoreTransforms):
1751         (WebCore::ContextShadow::shadowsIgnoreTransforms):
1752         (WebCore::ContextShadow::offset):
1753         * platform/graphics/qt/ContextShadowQt.cpp:
1754         (WebCore::ContextShadow::beginShadowLayer):
1755         (WebCore::ContextShadow::endShadowLayer):
1756         * platform/graphics/qt/GraphicsContextQt.cpp:
1757         (WebCore::mustUseContextShadow):
1758         (WebCore::GraphicsContext::fillPath):
1759         (WebCore::GraphicsContext::strokePath):
1760         (WebCore::GraphicsContext::fillRect):
1761         (WebCore::GraphicsContext::fillRoundedRect):
1762         (WebCore::GraphicsContext::setPlatformShadow):
1763
1764 2010-12-14  Alexander Pavlov  <apavlov@chromium.org>
1765
1766         Reviewed by Yury Semikhatsky.
1767
1768         Web Inspector: Rule data not updated in Styles pane after stylesheet gets reverted
1769         https://bugs.webkit.org/show_bug.cgi?id=51034
1770
1771         * inspector/front-end/CSSStyleModel.js:
1772         (WebInspector.CSSStyleModel.prototype._onRevert):
1773         * inspector/front-end/ElementsPanel.js:
1774         (WebInspector.ElementsPanel):
1775         (WebInspector.ElementsPanel.prototype._metricsPaneEdited):
1776         (WebInspector.ElementsPanel.prototype._stylesPaneEdited):
1777         (WebInspector.ElementsPanel.prototype._styleSheetChanged):
1778
1779 2010-12-14  Andreas Kling  <andreas.kling@nokia.com>
1780
1781         Reviewed by Kenneth Rohde Christiansen.
1782
1783         [Qt] Avoid GraphicsContext save/restore in Image::drawPattern()
1784         https://bugs.webkit.org/show_bug.cgi?id=51037
1785
1786         It's enough to restore the CompositeOperator after drawing.
1787
1788         * platform/graphics/qt/ImageQt.cpp:
1789         (WebCore::Image::drawPattern):
1790
1791 2010-12-14  Eric Carlson  <eric.carlson@apple.com>
1792
1793         Reviewed by Dan Bernstein.
1794
1795         <rdar://problem/8763862>
1796         r72017 used incorrect compiler conditional.
1797
1798         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1799         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
1800
1801 2010-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1802
1803         Reviewed by Martin Robinson.
1804
1805         [GTK] Simplify context-menu handling code
1806         https://bugs.webkit.org/show_bug.cgi?id=49658
1807
1808         * platform/ContextMenuItem.h:
1809         * platform/gtk/ContextMenuGtk.cpp:
1810         (WebCore::ContextMenu::appendItem):
1811         * platform/gtk/ContextMenuItemGtk.cpp:
1812         (WebCore::ContextMenuItem::ContextMenuItem):
1813         (WebCore::ContextMenuItem::~ContextMenuItem):
1814         (WebCore::ContextMenuItem::releasePlatformDescription):
1815         (WebCore::ContextMenuItem::type):
1816         (WebCore::ContextMenuItem::setType):
1817         (WebCore::ContextMenuItem::action):
1818         (WebCore::ContextMenuItem::setAction):
1819         (WebCore::ContextMenuItem::title):
1820         (WebCore::ContextMenuItem::setTitle):
1821         (WebCore::ContextMenuItem::platformSubMenu):
1822         (WebCore::ContextMenuItem::setSubMenu):
1823         (WebCore::ContextMenuItem::setChecked):
1824         (WebCore::ContextMenuItem::setEnabled):
1825
1826 2010-12-14  Mario Sanchez Prada  <msanchez@igalia.com>
1827
1828         Reviewed by Xan Lopez.
1829
1830         [Gtk] Implement STATE_FOCUSED, STATE_FOCUSABLE, and corresponding events for text objects
1831         https://bugs.webkit.org/show_bug.cgi?id=27048
1832
1833         Handle focus change for text objects based in caret changes.
1834
1835         As text objects (such as paragraphs) seem not to accept focus in
1836         WebCore in the same way other objects (text controls) do, a
1837         Gtk-specific workaround is needed to expose this states and the
1838         related events to ATK-based assistive technologies.
1839
1840         Test: platform/gtk/accessibility/caret-browsing-text-focus.html
1841
1842         Ensure that text objects are exposed with the ATK_STATE_FOCUSABLE
1843         state, and that the ATK_STATE_FOCUSED state is added to those
1844         text objects containing the currently active caret selection.
1845
1846         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1847         (selectionBelongsToObject): Moved upwards to use it from
1848         the new isTextWithCaret() function.
1849         (isTextWithCaret): New, checks whether an accessibility object
1850         represents a text object with the current caret selection on it.
1851         (setAtkStateSetFromCoreObject): Add the ATK_STATE_FOCUSED state
1852         when also when isTextWithCaret(coreObject) returns true.
1853         (webkit_accessible_ref_state_set): Add the ATK_STATE_FOCUSABLE
1854         state to text objects and those with the ATK_ROLE_PARAGRAPH role.
1855         (webkit_accessible_text_get_n_selections): Optimize return expression.
1856
1857         Make sure the proper events associated to a change of focus are
1858         emitted, based on caret changes across different accessibility
1859         objects. Also, refactored the code in more manageable and
1860         understandable helper functions.
1861
1862         * editing/gtk/SelectionControllerGtk.cpp:
1863         (WebCore::emitTextSelectionChange): New, includes the specific
1864         code formerly placed in notifyAccessibilityForSelectionChange() to
1865         emit the 'text-caret-moved' and 'text-selection-change' signals.
1866         (WebCore::maybeEmitTextFocusChange): New, takes care of emitting
1867         the 'focus-event' and 'state-changed::focused' signals when
1868         needed, that is, when a change in the selection happens across
1869         different accessible objects.
1870         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
1871         Refactored some code here, by using the new helper functions.
1872
1873 2010-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
1874
1875         Reviewed by Pavel Feldman.
1876
1877         Web Inspector: regroup Inspector.idl entries.
1878         Just for better visibility.
1879
1880         https://bugs.webkit.org/show_bug.cgi?id=51025
1881
1882         * inspector/Inspector.idl:
1883
1884 2010-12-14  Alexander Pavlov  <apavlov@chromium.org>
1885
1886         Reviewed by Yury Semikhatsky.
1887
1888         Web Inspector: Reverted stylesheet breaks style data
1889         https://bugs.webkit.org/show_bug.cgi?id=51030
1890
1891         * inspector/InspectorStyleSheet.cpp:
1892         (WebCore::InspectorStyleSheet::reparseStyleSheet):
1893
1894 2010-12-14  Mads Ager  <ager@chromium.org>
1895
1896         Reviewed by Pavel Feldman.
1897
1898         [V8] Reflected unsigned attributes should be in the range [0, 2^31)
1899         https://bugs.webkit.org/show_bug.cgi?id=51023
1900
1901         Follow the changes made to CodeGeneratorJS.pm to return 0 for
1902         reflected unsigned attributes that are outside the allowed range.
1903         See https://bugs.webkit.org/show_bug.cgi?id=50472
1904
1905         * bindings/scripts/CodeGeneratorV8.pm:
1906
1907 2010-12-14  Charlie Reis  <creis@chromium.org>
1908
1909         Reviewed by Darin Adler.
1910
1911         Remove stale include of Document.h in V8DOMWrapper.h
1912         https://bugs.webkit.org/show_bug.cgi?id=50607
1913
1914         We no longer need to include Document.h or V8DOMMap.h in
1915         V8DOMWrapper.  Removing them to avoid dependencies.
1916
1917         * bindings/v8/V8DOMWrapper.h:
1918
1919 2010-12-14  Julien Chaffraix  <jchaffraix@codeaurora.org>
1920
1921         Reviewed by Darin Adler.
1922
1923         Test for: EventSource fails to connect if Content-Type header has a charset attribute
1924         https://bugs.webkit.org/show_bug.cgi?id=45372
1925
1926         Tests: http/tests/eventsource/eventsource-content-type-charset.html
1927                http/tests/eventsource/eventsource-content-type-text-event-stream-foobar.html
1928
1929         * page/EventSource.cpp:
1930         (WebCore::EventSource::didReceiveResponse): Use the mimeType instead of the Content-Type
1931         header directly. This makes the detection of the "text/stream" mimeType more accurate.
1932
1933 2010-12-14  Pieter Senster  <psenster@google.com>
1934
1935         Reviewed by Dirk Schulze.
1936
1937         Incorporate the channel offsets from the ColorMatrix filter in the filter calculation
1938         https://bugs.webkit.org/show_bug.cgi?id=50682
1939
1940         Test: svg/filters/feColorMatrix-offset.svg
1941
1942         * platform/graphics/filters/FEColorMatrix.cpp:
1943         (WebCore::matrix):
1944
1945 2010-12-14  Jarred Nicholls  <jarred@sencha.com>
1946
1947         Reviewed by Kenneth Rohde Christiansen.
1948
1949         Qt's Clipboard::files() implementation for HTML5 Drag/Drop (DataTransfer)
1950
1951         No new tests. Run tests manually until DRT is updated w/ beginDragWithFiles.
1952
1953         * platform/qt/ClipboardQt.cpp:
1954         (WebCore::ClipboardQt::files):
1955
1956 2010-12-13  Antonio Gomes  <agomes@rim.com>
1957
1958         Rubber stamped by Daniel Bates.
1959
1960         Spatial Navigation: code clean up (part V)
1961         https://bugs.webkit.org/show_bug.cgi?id=50666
1962
1963         No new tests needed.
1964
1965         * page/SpatialNavigation.cpp:
1966         (WebCore::distanceDataForNode): Made 'FocusCandidate current' const since it is not
1967         supposed to change within this function.
1968         * page/SpatialNavigation.h: Ditto.
1969
1970 2010-12-13  takano takumi  <takano@apple.com>
1971
1972         Reviewed by Dan Bernstein.
1973
1974         GlyphPage::fill() is slow on vertical writing (Mac)
1975         https://bugs.webkit.org/show_bug.cgi?id=50865
1976
1977         No test. Just a performance improvement.
1978
1979         * platform/graphics/Font.cpp:
1980         (WebCore::Font::isCJKIdeograph): Now this only checks pure ideographs (Hanji).
1981         (WebCore::Font::isCJKIdeographOrSymbol): Added this for Hanji and Hanji related symbols.
1982         * platform/graphics/Font.h:
1983         * platform/graphics/FontFastPath.cpp:
1984         (WebCore::Font::glyphDataForCharacter): Changed to call isCJKIdeographOrSymbol() instead of isCJKIdeograph().
1985         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1986         (WebCore::shouldUseCoreText): This tests if GlyphPage::fill() should use CoreText or not.
1987         For vertical writing, if the current page contains only ideographs, we go CG path.
1988         (WebCore::GlyphPage::fill): Made to call shouldUseCoreText() and switch code path.
1989
1990 2010-12-13  Antonio Gomes  <agomes@rim.com>
1991
1992         Reviewed by Daniel Bates.
1993
1994         Spatial Navigation: code clean up (part IV)
1995         https://bugs.webkit.org/show_bug.cgi?id=50666
1996
1997         Avoid calling canScrollInDirection more than necessary.
1998
1999         No new tests needed.
2000
2001         * page/FocusController.cpp:
2002         (WebCore::FocusController::advanceFocusDirectionallyInContainer): Moved the call to canScrollInDirection()
2003         to within the scrollInDirection().
2004         * page/SpatialNavigation.cpp: Removed the assertion to canScrollingDirection function.
2005         (WebCore::scrollInDirection):
2006
2007 2010-12-13  Antonio Gomes  <agomes@rim.com>
2008
2009         Reviewed by Daniel Bates.
2010
2011         Spatial Navigation: code clean up (part III)
2012         https://bugs.webkit.org/show_bug.cgi?id=50666
2013
2014         No new tests needed.
2015
2016         * page/SpatialNavigation.h: Added FocusCandidate::isFrameOwnerElement and
2017         WebCore::frameOwnerElement helper functions.
2018         (WebCore::FocusCandidate::isFrameOwnerElement): Returns true if the Node pointer
2019         wrapped by FocusCandidate is an instance of HTMLFrameOwnerElement. Returns false
2020         otherwise.
2021         * page/SpatialNavigation.cpp:
2022         (WebCore::frameOwnerElement): Returns the HTMLFrameOwnerElement associated with
2023         the FocusCandidate if appropriate.
2024         * page/FocusController.cpp:
2025         (WebCore::updateFocusCandidateIfNeeded): Make use of newly added frameOwnerElement() helper.
2026         (WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto.
2027
2028 2010-12-13  Mike Lawther  <mikelawther@chromium.org>
2029
2030         Reviewed by Daniel Bates.
2031
2032         [skia] ignore transform for canvas shadows
2033         https://bugs.webkit.org/show_bug.cgi?id=50437
2034
2035         * platform/graphics/skia/GraphicsContextSkia.cpp:
2036         (WebCore::GraphicsContext::setPlatformShadow):
2037
2038 2010-12-13  Dai Mikurube  <dmikurube@google.com>
2039
2040         Reviewed by Kent Tamura.
2041
2042         ValidityState's exposed functions should check if willValidate() is true before all
2043         https://bugs.webkit.org/show_bug.cgi?id=50617
2044
2045         Added checking willValidate() to exposed functions. And modified willValidate() behavior
2046         for <button type="submit"> and <input type="submit"> to return true if not disabled and
2047         not readonly.
2048
2049         * html/HTMLButtonElement.cpp:
2050         (WebCore::HTMLButtonElement::parseMappedAttribute): Added calling setNeedsWillValidateCheck() to refresh willValidate() after changing its type.
2051         (WebCore::HTMLButtonElement::recalcWillValidate): Added to return true if not disabled and not readonly when type="submit". It's to be compliant to the spec.
2052         * html/HTMLButtonElement.h:
2053         * html/SubmitInputType.cpp:
2054         (WebCore::SubmitInputType::supportsValidation): Removed it to enable willValidate() for <input> when type="submit". It's to be compliant to the spec.
2055         (WebCore::SubmitInputType::supportsRequired): Added it to reject required attributes though validation is available.
2056         * html/SubmitInputType.h:
2057         * html/ValidityState.cpp: Added checking willValidate().
2058         (WebCore::ValidityState::typeMismatch):
2059         (WebCore::ValidityState::patternMismatch):
2060         (WebCore::ValidityState::tooLong):
2061         (WebCore::ValidityState::rangeUnderflow):
2062         (WebCore::ValidityState::rangeOverflow):
2063         (WebCore::ValidityState::stepMismatch):
2064         (WebCore::ValidityState::customError):
2065         * html/ValidityState.h:
2066
2067 2010-12-13  Noel Gordon  <noel.gordon@gmail.com>
2068
2069         Reviewed by David Levin.
2070
2071         [chromium] Upstream skia/ImageBuffer.cpp routine mulDiv255Ceil()
2072         https://bugs.webkit.org/show_bug.cgi?id=50545
2073
2074         Skia has rolled, replace uses of mulDiv255Ceil with SkMulDiv255Ceiling.
2075
2076         No new tests, no change in behaviour.
2077
2078         * platform/graphics/skia/ImageBufferSkia.cpp:
2079         (WebCore::putImageData):
2080
2081 2010-12-13  Gavin Peters  <gavinp@chromium.org>
2082
2083         Reviewed by Adam Barth.
2084
2085         Re land Purpose after bad merge
2086         https://bugs.webkit.org/show_bug.cgi?id=51000
2087
2088         * loader/loader.cpp:
2089         (WebCore::Loader::load):
2090
2091 2010-12-13  Dan Bernstein  <mitz@apple.com>
2092
2093         Reviewed by Simon Fraser.
2094
2095         <rdar://problem/8763696> REGRESSION (r72173): Fallback fonts’ vertical metrics aren’t accounted for even when line-height is unspecified
2096         https://bugs.webkit.org/show_bug.cgi?id=50979
2097
2098         Many test results updated.
2099
2100         * rendering/InlineFlowBox.cpp: Reinstated the code that updates affectsAscent and
2101         affectsDescent in the used-fonts code path. Renamed variables for clarity. Added
2102         a check whether usedFonts is empty (which it might be if there is glyph overflow
2103         but no fallback) as an optimization.
2104
2105 2010-12-13  Mark Rowe  <mrowe@apple.com>
2106
2107         Rubber-stamped by Jon Honeycutt.
2108
2109         Remove unnecessary include of Switch module.
2110
2111         There are no switch statements in this file.
2112
2113         * dom/make_names.pl:
2114
2115 2010-12-13  Emil Eklund  <eae@chromium.org>
2116
2117         Reviewed by Dimitri Glazkov.
2118
2119         Change SelectionController::setFocusedNodeIfNeeded to traverse the DOM
2120         tree instead of the render tree.
2121         https://bugs.webkit.org/show_bug.cgi?id=50989
2122
2123         * editing/SelectionController.cpp:
2124         (WebCore::SelectionController::setFocusedNodeIfNeeded):
2125         Walk up DOM/hosted tree rather than render tree and remove FIXME comment
2126         that does't apply (SelectionController and EventHandler needs different
2127         checks).
2128
2129 2010-12-13  Chris Fleizach  <cfleizach@apple.com>
2130
2131         Reviewed by Beth Dakin.
2132
2133         AX: aria-invalid should be supported.
2134         https://bugs.webkit.org/show_bug.cgi?id=50573
2135
2136         Test: platform/mac/accessibility/aria-invalid.html
2137
2138         * accessibility/AXObjectCache.h:
2139         * accessibility/AccessibilityObject.cpp:
2140         (WebCore::AccessibilityObject::invalidStatus):
2141         * accessibility/AccessibilityObject.h:
2142         * accessibility/chromium/AXObjectCacheChromium.cpp
2143         (WebCore::AXObjectCache::postPlatformNotification):
2144         * accessibility/mac/AXObjectCacheMac.mm:
2145         (WebCore::AXObjectCache::postPlatformNotification):
2146         * accessibility/mac/AccessibilityObjectWrapper.mm:
2147         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2148         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2149         * dom/Element.cpp:
2150         (WebCore::Element::updateAfterAttributeChanged):
2151         * html/HTMLAttributeNames.in:
2152
2153 2010-12-13  Joone Hur  <joone@kldp.org>
2154
2155         Reviewed by Eric Seidel.
2156
2157         WebKit fails to compile when building with WML support enabled
2158         https://bugs.webkit.org/show_bug.cgi?id=42943
2159
2160         Use TextPosition instead of lineNumber() and columNumber().
2161
2162         No new tests are added, because this is just a build fix.
2163
2164         * dom/XMLDocumentParser.h: Make lineNumber() private.
2165         * wml/WMLErrorHandling.cpp:
2166         (WebCore::reportWMLError): Use TextPosition instead of lineNumber() and columnNumber().
2167
2168 2010-12-13  Chris Fleizach  <cfleizach@apple.com>
2169
2170         Reviewed by Beth Dakin.
2171
2172         AX: lists and list boxes need different attributes
2173         https://bugs.webkit.org/show_bug.cgi?id=50978
2174
2175         Separate out the attributes being returned for lists (<ul>) and listboxes (<select multiple>).
2176
2177         * accessibility/mac/AccessibilityObjectWrapper.mm:
2178         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
2179
2180 2010-12-13  David Hyatt  <hyatt@apple.com>
2181
2182         Reviewed by Sam Weinig.
2183
2184         https://bugs.webkit.org/show_bug.cgi?id=50963
2185
2186         REGRESSION: Scrolling nested iframes is messed up on platforms that use the cross-platform ScrollView.
2187        
2188         The selfClipRect and childrenClipRect methods of RenderLayer were incorrectly relying on the bounding box
2189         of the root layer.  This bounding box was only coincidentally incorporating overflow as part of the 
2190         RenderLayer's bounds.  Since I fixed the RenderLayer bounds to not include layout overflow any longer,
2191         this check is now exposed as incorrect.  Use the entire document size  when computing layer clip
2192         rects.
2193
2194         * rendering/RenderLayer.cpp:
2195         (WebCore::RenderLayer::childrenClipRect):
2196         (WebCore::RenderLayer::selfClipRect):
2197         * rendering/RenderView.h:
2198         (WebCore::RenderView::documentRect):
2199
2200 2010-12-13  Simon Fraser  <simon.fraser@apple.com>
2201
2202         GraphicsContextPrivate.h was removed. Nuke it from the project.
2203         
2204         * WebCore.xcodeproj/project.pbxproj:
2205
2206 2010-12-13  Eric Carlson  <eric.carlson@apple.com>
2207
2208         Reviewed by Antti Koivisto.
2209
2210         HTMLMediaElement::endedPlayback should not return true if duration is zero
2211         https://bugs.webkit.org/show_bug.cgi?id=50962
2212
2213         (WebCore::HTMLMediaElement::endedPlayback): Don't return true when duration is zero because a 
2214         media file can't play if it has no duration, therefore it can't have ended playback.
2215
2216 2010-12-13  Brent Fulgham  <bfulgham@webkit.org>
2217
2218         Unreviewed build fix after r73840.
2219
2220         * WebCore.vcproj/WebCoreGeneratedCairo.vsprops: Update property file
2221         to pass three arguments to build-generated-files.sh, just like
2222         the official Apple port.
2223
2224 2010-12-13  David Hyatt  <hyatt@apple.com>
2225
2226         Reviewed by Adam Roben.
2227
2228         Make sure the defaultSpaceEventHandler does logical scrolling.
2229
2230         * page/EventHandler.cpp:
2231         (WebCore::EventHandler::defaultSpaceEventHandler):
2232
2233 2010-12-13  Matthew Delaney  <mdelaney@apple.com>
2234
2235         Reviewed by Simon Fraser.
2236
2237         https://bugs.webkit.org/show_bug.cgi?id=50591 Adopt new CG API for canvas
2238
2239         No new tests necessary.
2240
2241         * Configurations/WebCore.xcconfig: Added IOSurface framework link.
2242         * html/canvas/CanvasRenderingContext2D.cpp: Used IOSurface def. instead.
2243         * platform/graphics/ImageBuffer.h: Pushed renderingMode down into ctor.
2244         * platform/graphics/cairo/ImageBufferCairo.cpp:
2245         * platform/graphics/cg/ImageBufferCG.cpp:
2246         * platform/graphics/haiku/ImageBufferHaiku.cpp:
2247         * platform/graphics/qt/ImageBufferQt.cpp:
2248         * platform/graphics/skia/ImageBufferSkia.cpp:
2249         * platform/graphics/wince/ImageBufferWinCE.cpp:
2250         * platform/graphics/wx/ImageBufferWx.cpp:
2251
2252 2010-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2253
2254         Unreviewed, rolling out r73923.
2255         http://trac.webkit.org/changeset/73923
2256         https://bugs.webkit.org/show_bug.cgi?id=50944
2257
2258         Broke editing/selection/extend-selection-home-end.html on non-
2259         mac platforms. Looks like a real bug. (Requested by ojan on
2260         #webkit).
2261
2262         * editing/SelectionController.cpp:
2263         (WebCore::SelectionController::positionForPlatform):
2264         (WebCore::SelectionController::modifyExtendingForward):
2265
2266 2010-12-13  David Hyatt  <hyatt@apple.com>
2267
2268         Reviewed by Sam Weinig.
2269
2270         https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. 
2271
2272         Add logical scrolling to WebCore.  It basically mirrors physical scrolling but works in abstract logical
2273         directions and only converts to physical when it's time to attempt the scroll.
2274         
2275         Also fixed bugs in scrollRecursively and logicalScrollRecursively where overflow sections in containing
2276         frames got skipped over.
2277         
2278         Made the resetting of the inline axis scroll position on Home/End Mac-specific for overflow sections.
2279         
2280         * WebCore.exp.in:
2281         * page/EventHandler.cpp:
2282         (WebCore::EventHandler::logicalScrollOverflow):
2283         (WebCore::EventHandler::scrollRecursively):
2284         (WebCore::EventHandler::logicalScrollRecursively):
2285         * page/EventHandler.h:
2286         * page/FrameView.cpp:
2287         (WebCore::FrameView::isVerticalDocument):
2288         (WebCore::FrameView::isFlippedDocument):
2289         * page/FrameView.h:
2290         * platform/ScrollTypes.h:
2291         (WebCore::logicalToPhysical):
2292         * platform/ScrollView.cpp:
2293         (WebCore::ScrollView::scroll):
2294         (WebCore::ScrollView::logicalScroll):
2295         * platform/ScrollView.h:
2296         (WebCore::ScrollView::isVerticalDocument):
2297         (WebCore::ScrollView::isFlippedDocument):
2298         * rendering/RenderBox.cpp:
2299         (WebCore::RenderBox::logicalScroll):
2300         * rendering/RenderBox.h:
2301         * rendering/RenderLayer.cpp:
2302         (WebCore::RenderLayer::scroll):
2303         * rendering/RenderListBox.cpp:
2304         (WebCore::RenderListBox::logicalScroll):
2305         * rendering/RenderListBox.h:
2306         * rendering/RenderTextControlSingleLine.cpp:
2307         (WebCore::RenderTextControlSingleLine::logicalScroll):
2308         * rendering/RenderTextControlSingleLine.h:
2309
2310 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
2311
2312         Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.
2313
2314         REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
2315         https://bugs.webkit.org/show_bug.cgi?id=50950
2316
2317         * Android.jscbindings.mk:
2318         * CMakeLists.txt:
2319         * GNUmakefile.am:
2320         * WebCore.gypi:
2321         * WebCore.order:
2322         * WebCore.pro:
2323         * WebCore.vcproj/WebCore.vcproj:
2324         * WebCore.xcodeproj/project.pbxproj:
2325         * bindings/js/JSBindingsAllInOne.cpp:
2326         * bindings/js/JSDOMBinding.cpp:
2327         (WebCore::reportException):
2328         * bindings/js/JSWorkerContextErrorHandler.cpp: Renamed from WebCore/bindings/js/JSErrorHandler.cpp.
2329         (WebCore::JSWorkerContextErrorHandler::JSWorkerContextErrorHandler):
2330         (WebCore::JSWorkerContextErrorHandler::~JSWorkerContextErrorHandler):
2331         (WebCore::JSWorkerContextErrorHandler::handleEvent):
2332         * bindings/js/JSWorkerContextErrorHandler.h: Renamed from WebCore/bindings/js/JSErrorHandler.h.
2333         (WebCore::JSWorkerContextErrorHandler::create):
2334         (WebCore::createJSWorkerContextErrorHandler):
2335         * bindings/scripts/CodeGeneratorJS.pm:
2336         * bindings/scripts/CodeGeneratorV8.pm:
2337         * bindings/v8/V8ConsoleMessage.cpp:
2338         (WebCore::V8ConsoleMessage::dispatchNow):
2339         (WebCore::V8ConsoleMessage::handler):
2340         * bindings/v8/V8ConsoleMessage.h:
2341         * bindings/v8/V8WindowErrorHandler.cpp: Removed.
2342         * bindings/v8/V8WindowErrorHandler.h: Removed.
2343         * bindings/v8/WorkerContextExecutionProxy.cpp:
2344         (WebCore::v8MessageHandler):
2345         * bindings/v8/WorkerScriptController.cpp:
2346         (WebCore::WorkerScriptController::evaluate):
2347         * dom/Document.cpp:
2348         (WebCore::Document::reportException):
2349         (WebCore::Document::addMessage):
2350         * dom/Document.h:
2351         * dom/ErrorEvent.cpp:
2352         * dom/ErrorEvent.h:
2353         * dom/Event.cpp:
2354         * dom/Event.h:
2355         * dom/ScriptExecutionContext.cpp:
2356         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2357         * dom/ScriptExecutionContext.h:
2358         * websockets/WebSocket.cpp:
2359         (WebCore::WebSocket::connect):
2360         * websockets/WebSocketChannel.cpp:
2361         (WebCore::WebSocketChannel::didOpen):
2362         (WebCore::WebSocketChannel::appendToBuffer):
2363         * websockets/WebSocketHandshake.cpp:
2364         (WebCore::WebSocketHandshake::readServerHandshake):
2365         (WebCore::WebSocketHandshake::readStatusLine):
2366         (WebCore::WebSocketHandshake::readHTTPHeaders):
2367         (WebCore::WebSocketHandshake::checkResponseHeaders):
2368         * workers/DefaultSharedWorkerRepository.cpp:
2369         (WebCore::postExceptionTask):
2370         (WebCore::postConsoleMessageTask):
2371         * workers/WorkerContext.cpp:
2372         (WebCore::WorkerContext::WorkerContext):
2373         (WebCore::WorkerContext::reportException):
2374         (WebCore::WorkerContext::addMessage):
2375         * workers/WorkerContext.h:
2376         * workers/WorkerMessagingProxy.cpp:
2377         (WebCore::WorkerExceptionTask::performTask):
2378         (WebCore::postConsoleMessageTask):
2379         * xml/XMLHttpRequest.cpp:
2380         (WebCore::reportUnsafeUsage):
2381
2382 2010-12-13  Antti Koivisto  <antti@apple.com>
2383
2384         Reviewed by Alexey Proskuryakov.
2385
2386         https://bugs.webkit.org/show_bug.cgi?id=50758
2387         <rdar://problem/8722094> 
2388         Defer loading print stylesheets
2389         
2390         - Make preload scanner skip stylesheets with non-screen media types.
2391         - Make it possible to specify non-default load priority from the client.
2392         - Use this mechanism to load print stylesheets using very low priority so they get loaded after everything else.
2393         - Move default priority code from Loader to CachedResource.
2394         - Move ResourceLoadScheduler::Priority enum to a separate file (as ResourceLoadPriority).
2395         - Add a way to make ResourceLoadScheduler load resources one at the time so the above functionality can be tested reliably.
2396
2397         Tests: http/tests/local/link-stylesheet-load-order-preload.html
2398                http/tests/local/link-stylesheet-load-order.html
2399
2400         * WebCore.exp.in:
2401         * WebCore.gypi:
2402         * WebCore.pro:
2403         * WebCore.vcproj/WebCore.vcproj:
2404         * WebCore.xcodeproj/project.pbxproj:
2405         * css/CSSImageValue.cpp:
2406         (WebCore::CSSImageValue::cachedImage):
2407         * html/HTMLLinkElement.cpp:
2408         (WebCore::HTMLLinkElement::process):
2409         * html/parser/HTMLPreloadScanner.cpp:
2410         (WebCore::HTMLNames::PreloadTask::PreloadTask):
2411         (WebCore::HTMLNames::PreloadTask::processAttributes):
2412         (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
2413         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
2414         (WebCore::HTMLNames::PreloadTask::preload):
2415         * loader/DocumentThreadableLoader.cpp:
2416         (WebCore::DocumentThreadableLoader::loadRequest):
2417         * loader/ResourceLoadPriority.h: Added.
2418         * loader/ResourceLoadScheduler.cpp:
2419         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
2420         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
2421         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
2422         (WebCore::ResourceLoadScheduler::scheduleLoad):
2423         (WebCore::ResourceLoadScheduler::servePendingRequests):
2424         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
2425         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
2426         (WebCore::ResourceLoadScheduler::HostInformation::remove):
2427         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
2428         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
2429         * loader/ResourceLoadScheduler.h:
2430         (WebCore::ResourceLoadScheduler::isSerialLoadingEnabled):
2431         (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled):
2432         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
2433         * loader/cache/CachedResource.cpp:
2434         (WebCore::defaultPriorityForResourceType):
2435         (WebCore::CachedResource::CachedResource):
2436         * loader/cache/CachedResource.h:
2437         (WebCore::CachedResource::loadPriority):
2438         (WebCore::CachedResource::setLoadPriority):
2439         * loader/cache/CachedResourceLoader.cpp:
2440         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2441         (WebCore::CachedResourceLoader::requestResource):
2442         (WebCore::CachedResourceLoader::requestPreload):
2443         * loader/cache/CachedResourceLoader.h:
2444         * loader/cache/MemoryCache.cpp:
2445         (WebCore::MemoryCache::requestResource):
2446         * loader/cache/MemoryCache.h:
2447         * loader/loader.cpp:
2448         (WebCore::Loader::load):
2449
2450 2010-12-13  Justin Schuh  <jschuh@chromium.org>
2451
2452         Reviewed by Dimitri Glazkov.
2453
2454         Build fix for r73927
2455         https://bugs.webkit.org/show_bug.cgi?id=50946
2456
2457         Reverting CSSCanvasValue::canvasDestroyed to its code before r73927
2458         because it's breaking the build and I changed it only because it
2459         appeared redunudant after r73927.
2460
2461         No behavior changed so no new tests needed.
2462
2463         * css/CSSCanvasValue.cpp:
2464         (WebCore::CSSCanvasValue::canvasDestroyed):
2465
2466 2010-12-13  Matthew Delaney  <mdelaney@apple.com>
2467
2468         Reviewed by nobody, build fix.
2469
2470         Unlinking IOSurface framework from xcodeproj.
2471
2472         * WebCore.xcodeproj/project.pbxproj:
2473
2474 2010-12-13  Justin Schuh  <jschuh@chromium.org>
2475
2476         Reviewed by Dimitri Glazkov.
2477
2478         HTMLCanvasElement should handle multiple observers.
2479         https://bugs.webkit.org/show_bug.cgi?id=50899
2480
2481         Test: fast/canvas/canvas-bg-multiple-removal.html
2482
2483         * css/CSSCanvasValue.cpp:
2484         (WebCore::CSSCanvasValue::~CSSCanvasValue):
2485         (WebCore::CSSCanvasValue::canvasDestroyed):
2486         (WebCore::CSSCanvasValue::element):
2487         * html/HTMLCanvasElement.cpp:
2488         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2489         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
2490         (WebCore::HTMLCanvasElement::addObserver):
2491         (WebCore::HTMLCanvasElement::removeObserver):
2492         (WebCore::HTMLCanvasElement::didDraw):
2493         (WebCore::HTMLCanvasElement::reset):
2494         * html/HTMLCanvasElement.h:
2495
2496 2010-12-13  Mihai Parparita  <mihaip@chromium.org>
2497
2498         Reviewed by Adam Barth.
2499
2500         [Chromium] canvas/philip/tests/2d.missingargs.html hangs on Snow Leopard
2501         https://bugs.webkit.org/show_bug.cgi?id=50841
2502
2503         Test: fast/canvas/strokeText-missing-args.html
2504         
2505         We didn't have isfinite checks for the x and y coordinates that are
2506         passed to strokeText/drawTextInternal (unlike all the other methods,
2507         which got checks in r50910 and r59447).
2508
2509         * html/canvas/CanvasRenderingContext2D.cpp:
2510         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2511
2512 2010-12-09  Matthew Delaney  <mdelaney@apple.com>
2513
2514         Reviewed by Simon Fraser.
2515
2516         Adopt new CG API for canvas
2517         https://bugs.webkit.org/show_bug.cgi?id=50591
2518
2519         No new tests. All current layout tests are sufficient.
2520
2521         * html/HTMLCanvasElement.cpp: Add in accelerateRendering flag for imagebuffer creation.
2522         * html/canvas/CanvasRenderingContext2D.cpp:
2523         (WebCore::CanvasRenderingContext2D::isAccelerated): Always return true if using CA on new platforms.
2524         (WebCore::CanvasRenderingContext2D::drawTextInternal): Use accelerateRendering for imagebuffer.
2525         * platform/graphics/ImageBuffer.h:
2526         (WebCore::ImageBuffer::create): Plumb through new flag.
2527         * platform/graphics/cairo/ImageBufferCairo.cpp: Update method sig.
2528         * platform/graphics/cg/ImageBufferCG.cpp: Switch off of accelerateRendering flag for new accelerated paths.
2529         * platform/graphics/cg/ImageBufferData.h: Add in surface ref
2530         * platform/graphics/haiku/ImageBufferHaiku.cpp: Update method sig.
2531         * platform/graphics/qt/ImageBufferQt.cpp: ^^
2532         * platform/graphics/skia/ImageBufferSkia.cpp: ^^
2533         * platform/graphics/wince/ImageBufferWinCE.cpp: ^^
2534         * platform/graphics/wx/ImageBufferWx.cpp: ^^
2535         * platform/mac/WebCoreSystemInterface.h: Add new method sigs
2536         * platform/mac/WebCoreSystemInterface.mm: ^^
2537         * rendering/RenderLayerBacking.cpp:
2538         * rendering/RenderLayerCompositor.cpp: Set acceleratesDrawing for canvas backings.
2539
2540 2010-12-13  Benjamin Kalman  <kalman@chromium.org>
2541
2542         Reviewed by Ojan Vafai.
2543
2544         Shift-End does not select to the end of the line
2545         https://bugs.webkit.org/show_bug.cgi?id=50610
2546
2547         Test: editing/selection/extend-to-line-boundary.html
2548
2549         * editing/SelectionController.cpp:
2550         (WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than
2551         start/end.
2552         (WebCore::SelectionController::modifyExtendingForward):
2553
2554 2010-12-13  Adam Roben  <aroben@apple.com>
2555
2556         Windows build fix after r73914
2557
2558         * WebCore.vcproj/WebCore.vcproj: Fix malformed XML.
2559
2560 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
2561
2562         Unreviewed. Qt build fix.
2563
2564         * dom/ScriptExecutionContext.cpp:
2565         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2566         * dom/ScriptExecutionContext.h:
2567
2568 2010-12-13  Mario Sanchez Prada  <msanchez@igalia.com>
2569
2570         Reviewed by Xan Lopez.
2571
2572         [Gtk] Additional support is needed for caret browsing
2573         https://bugs.webkit.org/show_bug.cgi?id=25526
2574
2575         Enable "MoveTo{Beginninng|End}OfDocument" commands when caret
2576         browsing is enabled.
2577
2578         This change impacts the GTK-port only as caret browsing is a
2579         feature only used in that platform so far.
2580
2581         Test: platform/gtk/editing/selection/caret-mode-document-begin-end.html
2582
2583         * editing/EditorCommand.cpp:
2584         (WebCore::createCommandMap): Enable the commads when in caret browsing.
2585
2586 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
2587
2588         Unreviewed. Qt build fix.
2589
2590         * dom/Event.cpp:
2591         (WebCore::Event::isErrorEvent):
2592         * dom/Event.h: remove ENABLE(WORKERS) guard since ErrorEvent is now used not
2593         only in workers.
2594
2595 2010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
2596
2597         Reviewed by Yury Semikhatsky.
2598
2599         Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
2600
2601         Debugger and Resources related notification functions of Inspector.idl were
2602         marked as such with help of "domain" attribute. The other changes in js files
2603         are reflecting this change. Some wrappers in WebInspector namespace were dropped,
2604         the others were moved to DebuggerModel class.
2605
2606         https://bugs.webkit.org/show_bug.cgi?id=50906
2607
2608         * inspector/Inspector.idl:
2609         * inspector/InspectorDebuggerAgent.cpp:
2610         (WebCore::InspectorDebuggerAgent::didParseSource):
2611         * inspector/InspectorProfilerAgent.cpp:
2612         (WebCore::InspectorProfilerAgent::resetState):
2613         * inspector/front-end/DOMAgent.js:
2614         (WebInspector.DOMAgent.prototype.didCommitLoad):
2615         * inspector/front-end/Database.js:
2616         * inspector/front-end/DebuggerModel.js:
2617         (WebInspector.DebuggerModel):
2618         (WebInspector.DebuggerModel.prototype.pausedScript):
2619         (WebInspector.DebuggerModel.prototype.resumedScript):
2620         (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
2621         (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
2622         (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
2623         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
2624         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
2625         (WebInspector.DebuggerModel.prototype.didCreateWorker):
2626         (WebInspector.DebuggerModel.prototype.didDestroyWorker):
2627         * inspector/front-end/ProfilesPanel.js:
2628         (WebInspector.ProfilesPanel):
2629         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2630         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
2631         * inspector/front-end/ResourceManager.js:
2632         (WebInspector.ResourceManager):
2633         (WebInspector.ResourceManager.prototype._unbindResourceURL):
2634         (WebInspector.ResourceManager.prototype.updateDOMStorage):
2635         (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
2636         (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
2637         (WebInspector.ResourceManager.prototype.didGetFileSystemError):
2638         (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
2639         (WebInspector.ResourceManager.prototype.updateNetworkState):
2640         (WebInspector.ResourceManager.prototype.addDOMStorage):
2641         (WebInspector.ResourceManager.prototype.selectDOMStorage):
2642         (WebInspector.ResourceManager.prototype.addDatabase):
2643         (WebInspector.ResourceManager.prototype.selectDatabase):
2644         (WebInspector.ResourceManager.prototype.sqlTransactionSucceeded):
2645         (WebInspector.ResourceManager.prototype.sqlTransactionFailed):
2646         * inspector/front-end/WorkersSidebarPane.js:
2647         (WebInspector.Worker):
2648         * inspector/front-end/inspector.js:
2649
2650 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
2651
2652         Unreviewed. Qt build fix. 
2653
2654         * dom/ErrorEvent.cpp:
2655         * dom/ErrorEvent.h: remove ENABLE(WORKERS) guard since ErrorEvent is now used not
2656         only in workers.
2657
2658 2010-12-13  Yury Semikhatsky  <yurys@chromium.org>
2659
2660         Reviewed by Adam Barth.
2661
2662         WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown
2663         https://bugs.webkit.org/show_bug.cgi?id=8519
2664
2665         Uncaught exceptions are propagated to window.onerror hander if one is present.
2666         The handler is expected to be a function accepting three arguments: error message,
2667         resource url and line number where the exception occured.
2668
2669         It was decided to dispatch ErrorEvent to all listeners/handlers no matter if they
2670         were created in the same isolated world where the exception occured or not.
2671
2672         Tests: fast/events/window-onerror1.html
2673                fast/events/window-onerror10.html
2674                fast/events/window-onerror11.html
2675                fast/events/window-onerror2.html
2676                fast/events/window-onerror3.html
2677                fast/events/window-onerror4.html
2678                fast/events/window-onerror5.html
2679                fast/events/window-onerror6.html
2680                fast/events/window-onerror7.html
2681                fast/events/window-onerror8.html
2682                fast/events/window-onerror9.html
2683                http/tests/security/window-onerror-exception-in-iframe.html
2684                userscripts/window-onerror-for-isolated-world-1.html
2685                userscripts/window-onerror-for-isolated-world-2.html
2686
2687         * Android.jscbindings.mk:
2688         * CMakeLists.txt:
2689         * GNUmakefile.am:
2690         * WebCore.gypi:
2691         * WebCore.order:
2692         * WebCore.pro:
2693         * WebCore.vcproj/WebCore.vcproj:
2694         * WebCore.xcodeproj/project.pbxproj:
2695         * bindings/js/JSBindingsAllInOne.cpp:
2696         * bindings/js/JSDOMBinding.cpp:
2697         (WebCore::reportException):
2698         * bindings/js/JSErrorHandler.cpp: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.cpp.
2699         (WebCore::JSErrorHandler::JSErrorHandler):
2700         (WebCore::JSErrorHandler::~JSErrorHandler):
2701         (WebCore::JSErrorHandler::handleEvent):
2702         * bindings/js/JSErrorHandler.h: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
2703         (WebCore::JSErrorHandler::create):
2704         (WebCore::createJSErrorHandler):
2705         * bindings/scripts/CodeGeneratorJS.pm:
2706         * bindings/scripts/CodeGeneratorV8.pm:
2707         * bindings/v8/V8ConsoleMessage.cpp:
2708         (WebCore::V8ConsoleMessage::dispatchNow):
2709         (WebCore::V8ConsoleMessage::handler): the method was changed to use generic WebCore exception
2710         reporting mechanism which is also used by JSC bindings.
2711         * bindings/v8/V8ConsoleMessage.h:
2712         * bindings/v8/V8WindowErrorHandler.cpp: Copied from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
2713         (WebCore::V8WindowErrorHandler::V8WindowErrorHandler):
2714         (WebCore::V8WindowErrorHandler::callListenerFunction):
2715         * bindings/v8/V8WindowErrorHandler.h: Renamed from WebCore/bindings/js/JSWorkerContextErrorHandler.h.
2716         (WebCore::V8WindowErrorHandler::create):
2717         * bindings/v8/WorkerContextExecutionProxy.cpp:
2718         (WebCore::v8MessageHandler):
2719         * bindings/v8/WorkerScriptController.cpp:
2720         (WebCore::WorkerScriptController::evaluate):
2721         * dom/Document.cpp:
2722         (WebCore::Document::errorEventTarget):
2723         (WebCore::Document::logExceptionToConsole):
2724         * dom/Document.h:
2725         * dom/ScriptExecutionContext.cpp:
2726         (WebCore::ScriptExecutionContext::PendingException::PendingException):
2727         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2728         (WebCore::ScriptExecutionContext::reportException): this method is not virtual anymore to
2729         ensure that error event dispatching algorithm is the same in WorkerContext and in Document.
2730         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
2731         * dom/ScriptExecutionContext.h:
2732         * workers/DefaultSharedWorkerRepository.cpp:
2733         (WebCore::postExceptionTask):
2734         * workers/WorkerContext.cpp:
2735         (WebCore::WorkerContext::WorkerContext):
2736         (WebCore::WorkerContext::errorEventTarget):
2737         (WebCore::WorkerContext::logExceptionToConsole):
2738         * workers/WorkerContext.h:
2739         * workers/WorkerMessagingProxy.cpp:
2740         (WebCore::WorkerExceptionTask::performTask):
2741
2742 2010-12-08  Alexander Pavlov  <apavlov@chromium.org>
2743
2744         Reviewed by Joseph Pecoraro.
2745
2746         Web Inspector: Enable CSS property editing name/value-wise (like Firebug does)
2747         https://bugs.webkit.org/show_bug.cgi?id=50565
2748
2749         For CSS property editing, the property name and value have become two fields separated
2750         by a colon (rather than one field containing the full property text.) A user can tab
2751         between the name and value fields forward and backward. A colon typed in the name field
2752         and a semicolon in the value field (unless found inside a string) act as a Tab and focus
2753         the next editable field (while applying the entire property value.)
2754
2755         Now a user can tab through all editable styles for an element, even across rule boundaries.
2756
2757         * inspector/front-end/BreakpointsSidebarPane.js:
2758         (WebInspector.XHRBreakpointsSidebarPane.prototype._startEditingBreakpoint):
2759         * inspector/front-end/DataGrid.js:
2760         (WebInspector.DataGrid.prototype._startEditingColumnOfDataGridNode):
2761         (WebInspector.DataGrid.prototype._startEditing):
2762         * inspector/front-end/ElementsTreeOutline.js:
2763         (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
2764         (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
2765         (WebInspector.ElementsTreeElement.prototype._startEditingTagName):
2766         (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
2767         * inspector/front-end/MetricsSidebarPane.js:
2768         (WebInspector.MetricsSidebarPane.prototype.startEditing):
2769         * inspector/front-end/ObjectPropertiesSection.js:
2770         (WebInspector.ObjectPropertyTreeElement.prototype.startEditing):
2771         * inspector/front-end/Section.js:
2772         (WebInspector.Section):
2773         (WebInspector.Section.prototype.get subtitleAsTextForTest):
2774         (WebInspector.Section.prototype.get nextSibling):
2775         (WebInspector.Section.prototype.get previousSibling):
2776         * inspector/front-end/SourceFrame.js:
2777         (WebInspector.SourceFrame.prototype._editBreakpointCondition):
2778         * inspector/front-end/StylesSidebarPane.js:
2779         (WebInspector.StylePropertiesSection.prototype.nextEditableSibling):
2780         (WebInspector.StylePropertiesSection.prototype.previousEditableSibling):
2781         (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
2782         (WebInspector.StylePropertiesSection.prototype.startEditingSelector):
2783         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
2784         (WebInspector.StylePropertyTreeElement.prototype.):
2785         (WebInspector.StylePropertyTreeElement.prototype):
2786         * inspector/front-end/TextViewer.js:
2787         (WebInspector.TextViewer.prototype._handleDoubleClick):
2788         * inspector/front-end/WatchExpressionsSidebarPane.js:
2789         (WebInspector.WatchExpressionTreeElement.prototype.startEditing):
2790         * inspector/front-end/inspector.css:
2791         (.child-editing):
2792         * inspector/front-end/inspector.js:
2793         (WebInspector.startEditing.defaultFinishHandler):
2794         (WebInspector.startEditing):
2795         * inspector/front-end/treeoutline.js:
2796         (TreeElement.prototype.select):
2797
2798 2010-12-13  Yael Aharon  <yael.aharon@nokia.com>
2799
2800         Unreviewed.
2801
2802         Added svn propery eol-style. Patches to this file fail to apply on Windows EWS bot.
2803
2804         * accessibility/AccessibilityAllInOne.cpp: Added property svn:eol-style.
2805
2806 2010-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2807
2808         Unreviewed, rolling out r73898.
2809         http://trac.webkit.org/changeset/73898
2810         https://bugs.webkit.org/show_bug.cgi?id=50919
2811
2812         FileSystem and Database API's were broken (Requested by loislo
2813         on #webkit).
2814
2815         * inspector/Inspector.idl:
2816         * inspector/InspectorDebuggerAgent.cpp:
2817         (WebCore::InspectorDebuggerAgent::didParseSource):
2818         * inspector/InspectorProfilerAgent.cpp:
2819         (WebCore::InspectorProfilerAgent::resetState):
2820         * inspector/front-end/DOMAgent.js:
2821         * inspector/front-end/DebuggerModel.js:
2822         (WebInspector.DebuggerModel):
2823         (WebInspector.DebuggerModel.prototype.debuggerPaused):
2824         (WebInspector.DebuggerModel.prototype.debuggerResumed):
2825         * inspector/front-end/ProfilesPanel.js:
2826         (WebInspector.ProfilesPanel):
2827         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2828         * inspector/front-end/ResourceManager.js:
2829         (WebInspector.ResourceManager):
2830         (WebInspector.ResourceManager.prototype._registerNotifyHandlers):
2831         (WebInspector.ResourceManager.prototype._unbindResourceURL):
2832         * inspector/front-end/inspector.js:
2833         (WebInspector.addDatabase):
2834         (WebInspector.addDOMStorage):
2835         (WebInspector.updateDOMStorage):
2836         (WebInspector.updateApplicationCacheStatus):
2837         (WebInspector.didGetFileSystemPath):
2838         (WebInspector.didGetFileSystemError):
2839         (WebInspector.didGetFileSystemDisabled):
2840         (WebInspector.updateNetworkState):
2841         (WebInspector.attachDebuggerWhenShown):
2842         (WebInspector.debuggerWasEnabled):
2843         (WebInspector.debuggerWasDisabled):
2844         (WebInspector.profilerWasEnabled):
2845         (WebInspector.profilerWasDisabled):
2846         (WebInspector.parsedScriptSource):
2847         (WebInspector.restoredBreakpoint):
2848         (WebInspector.failedToParseScriptSource):
2849         (WebInspector.pausedScript):
2850         (WebInspector.resumedScript):
2851         (WebInspector.resetProfilesPanel):
2852         (WebInspector.didCommitLoad):
2853         (WebInspector.addProfileHeader):
2854         (WebInspector.setRecordingProfile):
2855         (WebInspector.addHeapSnapshotChunk):
2856         (WebInspector.finishHeapSnapshot):
2857
2858 2010-12-13  Anton Muhin  <antonm@chromium.org>
2859
2860         Reviewed by Pavel Feldman.
2861
2862         [v8] More CSS wrappers GC work: keep document's style sheets, style sheet and css rule lists' items in proper object groups
2863         https://bugs.webkit.org/show_bug.cgi?id=50828
2864
2865         * bindings/v8/DOMData.h:
2866         (WebCore::DOMData::WrapperMapObjectRemover::visitDOMWrapper):
2867         (WebCore::DOMData::removeObjectsFromWrapperMap):
2868         * bindings/v8/DOMDataStore.h:
2869         (WebCore::ChunkedTable::visit):
2870         (WebCore::ChunkedTable::visitEntries):
2871         (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::visit):
2872         (WebCore::DOMDataStore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit):
2873         * bindings/v8/V8DOMMap.cpp:
2874         (WebCore::removeAllDOMObjectsInCurrentThread):
2875         (WebCore::visitDOMNodesInCurrentThread):
2876         (WebCore::visitDOMObjectsInCurrentThread):
2877         (WebCore::visitActiveDOMObjectsInCurrentThread):
2878         (WebCore::visitDOMSVGElementInstancesInCurrentThread):
2879         * bindings/v8/V8DOMMap.h:
2880         (WebCore::WeakReferenceMap::visit):
2881         * bindings/v8/V8GCController.cpp:
2882         (WebCore::DOMObjectVisitor::visitDOMWrapper):
2883         (WebCore::EnsureWeakDOMNodeVisitor::visitDOMWrapper):
2884         (WebCore::GCPrologueVisitor::visitDOMWrapper):
2885         (WebCore::NodeGrouperVisitor::visitDOMWrapper):
2886         (WebCore::NodeGrouperVisitor::applyGrouping):
2887         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
2888         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
2889
2890 2010-12-13  Zoltan Herczeg  <zherczeg@webkit.org>
2891
2892         Unreviewed build fix for r73894.
2893
2894         SVGFEImage should also check its hasResult() in its apply().
2895
2896         * svg/graphics/filters/SVGFEImage.cpp:
2897         (WebCore::FEImage::apply):
2898
2899 2010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
2900
2901         Reviewed by Yury Semikhatsky.
2902
2903         Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
2904
2905         Debugger and Resources related notification functions of Inspector.idl were
2906         marked as such with help of "domain" attribute. The other changes in js files
2907         are reflecting this change. Some wrappers in WebInspector namespace were dropped,
2908         the others were moved to DebuggerModel class.
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=50906
2911
2912         * inspector/Inspector.idl:
2913         * inspector/InspectorDebuggerAgent.cpp:
2914         (WebCore::InspectorDebuggerAgent::didParseSource):
2915         * inspector/InspectorProfilerAgent.cpp:
2916         (WebCore::InspectorProfilerAgent::resetState):
2917         * inspector/front-end/DOMAgent.js:
2918         (WebInspector.DOMAgent.prototype.didCommitLoad):
2919         * inspector/front-end/DebuggerModel.js:
2920         (WebInspector.DebuggerModel):
2921         (WebInspector.DebuggerModel.prototype.pausedScript):
2922         (WebInspector.DebuggerModel.prototype.resumedScript):
2923         (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
2924         (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
2925         (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
2926         (WebInspector.DebuggerModel.prototype.parsedScriptSource):
2927         (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
2928         * inspector/front-end/ProfilesPanel.js:
2929         (WebInspector.ProfilesPanel):
2930         (WebInspector.ProfilesPanel.prototype.addHeapSnapshots):
2931         (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
2932         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
2933         * inspector/front-end/ResourceManager.js:
2934         (WebInspector.ResourceManager):
2935         (WebInspector.ResourceManager.prototype._unbindResourceURL):
2936         (WebInspector.ResourceManager.prototype.updateDOMStorage):
2937         (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
2938         (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
2939         (WebInspector.ResourceManager.prototype.didGetFileSystemError):
2940         (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
2941         (WebInspector.ResourceManager.prototype.updateNetworkState):
2942         (WebInspector.ResourceManager.prototype.addDatabase):
2943         (WebInspector.ResourceManager.prototype.addDOMStorage):
2944         * inspector/front-end/inspector.js:
2945
2946 2010-12-13  Zoltan Herczeg  <zherczeg@webkit.org>
2947
2948         Reviewed by Dirk Schulze.
2949
2950         Better result passing in filter primitives
2951         https://bugs.webkit.org/show_bug.cgi?id=49907
2952
2953         SVG filter primitives can use the output of other filters. The
2954         input and output format of a filter can be a premultiplied or
2955         unmultiplied RGBA array, or an image buffer. All filter
2956         primitive results were converted to image buffers before, which
2957         could be an unecessary (and really costly) operation, if
2958         a filter expects its input in the same format as the output
2959         of the input filter primitive. This overhead is removed by
2960         this patch. All apply() methods are updated according to this
2961         new filter primitive interface.
2962
2963         Filters do not generate their results twice (or more) anymore,
2964         when their apply() called multiple times.
2965
2966         The existing tests cover this feature.
2967
2968         * manual-tests/svg-filter-animation.svg: Added.
2969         * platform/graphics/filters/FEBlend.cpp:
2970         (WebCore::FEBlend::apply):
2971         * platform/graphics/filters/FEColorMatrix.cpp:
2972         (WebCore::FEColorMatrix::apply):
2973         * platform/graphics/filters/FEComponentTransfer.cpp:
2974         (WebCore::FEComponentTransfer::apply):
2975         * platform/graphics/filters/FEComposite.cpp:
2976         (WebCore::FEComposite::apply):
2977         * platform/graphics/filters/FEConvolveMatrix.cpp:
2978         (WebCore::FEConvolveMatrix::apply):
2979         * platform/graphics/filters/FEDisplacementMap.cpp:
2980         (WebCore::FEDisplacementMap::apply):
2981         * platform/graphics/filters/FEFlood.cpp:
2982         (WebCore::FEFlood::apply):
2983         * platform/graphics/filters/FEGaussianBlur.cpp:
2984         (WebCore::FEGaussianBlur::apply):
2985         * platform/graphics/filters/FELighting.cpp:
2986         (WebCore::FELighting::apply):
2987         * platform/graphics/filters/FEMerge.cpp:
2988         (WebCore::FEMerge::apply):
2989         * platform/graphics/filters/FEMerge.h:
2990         * platform/graphics/filters/FEMorphology.cpp:
2991         (WebCore::FEMorphology::apply):
2992         * platform/graphics/filters/FEOffset.cpp:
2993         (WebCore::FEOffset::apply):
2994         * platform/graphics/filters/FETile.cpp:
2995         (WebCore::FETile::apply):
2996         * platform/graphics/filters/FETurbulence.cpp:
2997         (WebCore::FETurbulence::apply):
2998         * platform/graphics/filters/FilterEffect.cpp:
2999         (WebCore::FilterEffect::requestedRegionOfInputImageData):
3000         (WebCore::FilterEffect::asImageBuffer):
3001         (WebCore::FilterEffect::asUnmultipliedImage):
3002         (WebCore::FilterEffect::asPremultipliedImage):
3003         (WebCore::FilterEffect::copyImageBytes):
3004         (WebCore::FilterEffect::copyUnmultipliedImage):
3005         (WebCore::FilterEffect::copyPremultipliedImage):
3006         (WebCore::FilterEffect::createImageBufferResult):
3007         (WebCore::FilterEffect::createUnmultipliedImageResult):
3008         (WebCore::FilterEffect::createPremultipliedImageResult):
3009         * platform/graphics/filters/FilterEffect.h:
3010         (WebCore::FilterEffect::hasResult):
3011         * platform/graphics/filters/SourceAlpha.cpp:
3012         (WebCore::SourceAlpha::apply):
3013         * platform/graphics/filters/SourceGraphic.cpp:
3014         (WebCore::SourceGraphic::apply):
3015         * platform/graphics/filters/SourceGraphic.h:
3016         * rendering/RenderSVGResourceFilter.cpp:
3017         (WebCore::RenderSVGResourceFilter::postApplyResource):
3018         * svg/graphics/filters/SVGFEImage.cpp:
3019         (WebCore::FEImage::apply):
3020
3021 2010-12-13  Csaba Osztrogonác  <ossy@webkit.org>
3022
3023         Unreviewed.
3024
3025         * WebCore.pro: Remove non-existant loader/Request.h from build system.
3026
3027 2010-12-13  Noel Gordon  <noel.gordon@gmail.com>
3028
3029         Reviewed by Eric Seidel.
3030
3031         [chromium] Reduce canvas.toDataURL("image/jpeg") run-time cost by 10%
3032         https://bugs.webkit.org/show_bug.cgi?id=50804
3033
3034         Follow on from r73173, unroll the SkUnPreMultiply::PMColorToColor() call
3035         viz., compute the unpremultiplatcion in-place. This reduces the run-time
3036         cost of jpeg encoding by 10-15% for my image test set.
3037
3038         No new tests: canvas.toDataURL() is covered by existing tests.
3039
3040         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
3041         (WebCore::preMultipliedBGRAtoRGB):
3042
3043 2010-12-13  Helder Correia  <helder@sencha.com>
3044
3045         Reviewed by Eric Seidel.
3046
3047         [Qt] StillImage::draw() should use ContextShadow
3048         https://bugs.webkit.org/show_bug.cgi?id=50849
3049
3050         The branch that checks for a shadow requirement in StillImage::draw()
3051         is executed when drawing a canvas onto a canvas with
3052         ctx1.drawImage(canvas2, x, y). The current implementation supports
3053         solid shadows only. And if transformations are present, the offset gets
3054         transformed as well. Thus, ContextShadow must be used instead in order
3055         to support blur and correct offset transformations.
3056
3057         Test: fast/canvas/canvas-draw-canvas-on-canvas-shadow.html
3058
3059         * platform/graphics/qt/StillImageQt.cpp:
3060         (WebCore::StillImage::draw):
3061
3062 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
3063
3064         Unreviewed build fix.
3065
3066         * editing/EditingAllInOne.cpp:
3067         Add new file to the all-in-one.
3068
3069 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
3070
3071         Unreviewed build fix.
3072
3073         * WebCore.vcproj/WebCore.vcproj:
3074         Remove accidentally-committed conflict marker.
3075
3076 2010-10-28  MORITA Hajime  <morrita@google.com>
3077
3078         Reviewed by Ojan Vafai.
3079
3080         spellcheck does not check pasted text
3081         https://bugs.webkit.org/show_bug.cgi?id=40092
3082
3083         - Introduced SpellChecker class to encapsulate asynchronous spell
3084           checker state: sequence id, requesting text and target node.
3085           This is also the first step to decompose spell-check related
3086           code to a separate class.
3087         - Added EditorClient::isAsynchronousSpellCheckingEnabled() 
3088           to use async spellcheck API on the platform.
3089           These APIs are touched by SpellChecker.
3090         - Used SpellChecker to check a pasted test. Text to check is
3091           collected from the subtree under the editingRoot.
3092         - Added Setting::m_asynchronousSpellCheckingEnabled to control
3093           async spell checking.
3094
3095         Test: editing/spelling/spellcheck-paste.html
3096
3097         * CMakeLists.txt:
3098         * GNUmakefile.am:
3099         * WebCore.exp.in:
3100         * WebCore.gypi:
3101         * WebCore.pro:
3102         * WebCore.vcproj/WebCore.vcproj:
3103         * WebCore.xcodeproj/project.pbxproj:
3104         * dom/DocumentMarkerController.cpp:
3105         (WebCore::DocumentMarkerController::showMarkers):
3106         (showDocumentMarkers):
3107         * dom/DocumentMarkerController.h:
3108         * dom/PositionIterator.cpp:
3109         (WebCore::PositionIterator::setOffsetInLeafNode):
3110         * dom/PositionIterator.h:
3111         * editing/Editor.cpp:
3112         (WebCore::Editor::replaceSelectionWithFragment):
3113         (WebCore::Editor::Editor):
3114         (WebCore::findFirstMarkable):
3115         (WebCore::Editor::selectionStartHasSpellingMarkerFor):
3116         * editing/Editor.h:
3117         (WebCore::Editor::spellChecker):
3118         * editing/SpellChecker.cpp: Added.
3119         (WebCore::SpellChecker::SpellChecker):
3120         (WebCore::SpellChecker::~SpellChecker):
3121         (WebCore::SpellChecker::initRequest):
3122         (WebCore::SpellChecker::clearRequest):
3123         (WebCore::SpellChecker::isAsynchronousEnabled):
3124         (WebCore::SpellChecker::canCheckAsynchronously):
3125         (WebCore::SpellChecker::isBusy):
3126         (WebCore::SpellChecker::isValid):
3127         (WebCore::SpellChecker::isCheckable):
3128         (WebCore::SpellChecker::requestCheckingFor):
3129         (WebCore::forwardIterator):
3130         (WebCore::SpellChecker::didCheck):
3131         * editing/SpellChecker.h: Added.
3132         (WebCore::SpellCheckingResult::SpellCheckingResult):
3133         (WebCore::SpellCheckingResult::type):
3134         (WebCore::SpellCheckingResult::location):
3135         (WebCore::SpellCheckingResult::length):
3136         * loader/EmptyClients.h:
3137         (WebCore::EmptyEditorClient::requestCheckingOfString):
3138         * page/EditorClient.h:
3139         * page/Settings.cpp:
3140         (WebCore::Settings::Settings):
3141         * page/Settings.h:
3142         (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
3143         (WebCore::Settings::asynchronousSpellCheckingEnabled):
3144
3145 2010-12-09  Antonio Gomes  <agomes@rim.com>
3146
3147         Reviewed by Daniel Bates.
3148
3149         Spatial Navigation: code clean up (part II)
3150         https://bugs.webkit.org/show_bug.cgi?id=50666
3151
3152         No new tests needed.
3153
3154         * page/FocusController.cpp: Removed static declaration of updateFocusCandidateIfNeeded() from
3155         the top of FocusController.cpp, and added the 'static' keyword where the function is implemented;
3156         * page/SpatialNavigation.cpp: In FocusCandidate constructor, renamed 'n' to 'node', and added an assert to it;
3157         (WebCore::FocusCandidate::FocusCandidate):
3158         (WebCore::virtualRectForAreaElementAndDirection): Added an assert to 'node';
3159         * page/SpatialNavigation.h:I reordered the declaration of some methods in order to group related ones;
3160         Removed isScrollableContainerNode() function declaration since it is not used outside SpatialNavigation.cpp;
3161         And removed the declaration of isNodeDeepDescendantOfDocument() since it does not exist anymore.
3162
3163 2010-12-12  Philippe Normand  <pnormand@igalia.com>
3164
3165         Reviewed by Xan Lopez.
3166
3167         build-webkit --gtk --minimal fails
3168         https://bugs.webkit.org/show_bug.cgi?id=46267
3169
3170         No new tests, build fix only.
3171
3172         * GNUmakefile.am: Include some JS bindings generated headers in
3173         the build even if their corresponding feature is disabled. They
3174         are needed to make the DOM bindings build.
3175
3176 2010-12-12  Sam Magnuson  <smagnuso@gmail.com>
3177
3178         Reviewed by Eric Seidel.
3179
3180         [Qt] Compile with QT_NO_QUUID_STRING.
3181         https://bugs.webkit.org/show_bug.cgi?id=49745
3182
3183         * platform/UUID.cpp:
3184         (WebCore::createCanonicalUUIDString):
3185
3186 2010-12-12  Ragner Magalhaes  <ragner.magalhaes@openbossa.org>
3187
3188         Reviewed by Eric Seidel.
3189
3190         [Qt] Missing style for date pickers on Qt Mobile theme
3191         https://bugs.webkit.org/show_bug.cgi?id=50628
3192
3193         * css/themeQtMobile.css:
3194
3195 2010-12-11  Alice Liu  <alice.liu@apple.com>
3196
3197         Mac build fix.
3198
3199         * platform/network/mac/ResourceResponseMac.mm:
3200         (WebCore::ResourceResponse::platformLazyInit):
3201         Resolve string[0] ambiguity by passing 0U.
3202
3203 2010-12-11  Adam Barth  <abarth@webkit.org>
3204
3205         Reviewed by Sam Weinig.
3206
3207         [V8] Move to DOMWindow::setLocation
3208         https://bugs.webkit.org/show_bug.cgi?id=50876
3209
3210         Recently, JavaScriptCore moved to implementing setLocation in WebCore.
3211         This patch change V8 to use that common code path.  I haven't removed
3212         the old code path because it's still used for other things (like
3213         assigning window.location.href), but I'll move the rest over in a
3214         future patch.
3215
3216         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3217         (WebCore::V8DOMWindow::locationAccessorSetter):
3218         * bindings/v8/specialization/V8BindingState.cpp:
3219         (WebCore::::getFirstWindow):
3220         * bindings/v8/specialization/V8BindingState.h:
3221
3222 2010-10-11  Diego Gonzalez  <diegohcg@webkit.org>
3223
3224         Reviewed by Kenneth Rohde Christiansen.
3225
3226         [Qt] Mock DeviceOrientation client for DRT
3227         https://bugs.webkit.org/show_bug.cgi?id=47490
3228
3229         * WebCore.pro:
3230
3231 2010-12-11  Joone Hur  <joone@kldp.org>
3232
3233         Reviewed by Alexey Proskuryakov.
3234
3235         enumeration value ‘ResponseTypeArrayBuffer’ not handled in switch
3236         https://bugs.webkit.org/show_bug.cgi?id=50871
3237
3238         Fix the warning which occurs when enumeration value is not handled in switch.
3239
3240         No new tests, no change in behavior.
3241
3242         * bindings/js/JSXMLHttpRequestCustom.cpp:
3243         (WebCore::JSXMLHttpRequest::response):
3244
3245 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
3246
3247         Reviewed by Darin Adler.
3248
3249         Add an overload to makeString for Vector<char>
3250         https://bugs.webkit.org/show_bug.cgi?id=50123
3251
3252         This also contains a segfault fix for ImageBuffer::toDataURL of the Haiku port.
3253
3254         * platform/graphics/cg/ImageBufferCG.cpp:
3255         (WebCore::ImageBuffer::toDataURL):
3256         * platform/graphics/gtk/ImageBufferGtk.cpp:
3257         (WebCore::ImageBuffer::toDataURL):
3258         * platform/graphics/haiku/ImageBufferHaiku.cpp:
3259         (WebCore::ImageBuffer::toDataURL):
3260         * platform/graphics/skia/ImageBufferSkia.cpp:
3261         (WebCore::ImageBuffer::toDataURL):
3262
3263 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
3264
3265         Mac build fix.
3266
3267         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
3268         Resolve string[0] ambiguity by passing 0U.
3269
3270 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
3271
3272         Windows production build fix.
3273         
3274         Only the vsprops are indirected through WebKitVSPropsRedirectionDir, not the scripts in WebKitLibraries/win/tools/scripts.
3275
3276         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
3277         * WebCore.vcproj/build-generated-files.sh:
3278
3279 2010-12-10  John Knottenbelt  <jknotten@chromium.org>
3280
3281         Reviewed by Eric Seidel.
3282
3283         Remove WebCore/platform/mac/GeolocationService.{h,mm}
3284         https://bugs.webkit.org/show_bug.cgi?id=50074
3285
3286         Remove unused non-client-based geolocation code.
3287
3288         * platform/mac/GeolocationServiceMac.h: Removed.
3289         * platform/mac/GeolocationServiceMac.mm: Removed.
3290
3291 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
3292
3293         Reviewed by Darin Adler.
3294
3295         https://bugs.webkit.org/show_bug.cgi?id=46573
3296         <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
3297
3298         Test: http/tests/mime/quoted-charset.php
3299
3300         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
3301         * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
3302         Work around a CFNetwork issue, strip quotes if they are present.
3303
3304 2010-12-10  Vincent Scheib  <scheib@chromium.org>
3305
3306         Reviewed by James Robinson.
3307
3308         Shader::loadShader() must initialize variable passed to getShaderiv
3309         https://bugs.webkit.org/show_bug.cgi?id=50842
3310
3311         Test: fast/canvas/canvas-largedraws.html
3312
3313         * platform/graphics/gpu/Shader.cpp:
3314         (WebCore::Shader::loadShader):
3315
3316 2010-12-10  Vincent Scheib  <scheib@chromium.org>
3317
3318         Reviewed by James Robinson.
3319
3320         Texture::updateSubRect should pass IntRect by reference
3321         https://bugs.webkit.org/show_bug.cgi?id=50845
3322
3323         No test, changing to pass by ref.
3324
3325         * platform/graphics/gpu/Texture.cpp:
3326         (WebCore::Texture::updateSubRect):
3327         * platform/graphics/gpu/Texture.h:
3328
3329 2010-12-10  Darin Adler  <darin@apple.com>
3330
3331         Reviewed by Sam Weinig.
3332
3333         Move open and showModalDialog implementations from bindings into DOM class DOMWindow
3334         https://bugs.webkit.org/show_bug.cgi?id=50836
3335
3336         * bindings/js/JSDOMWindowCustom.cpp:
3337         (WebCore::JSDOMWindow::open): Removed most of the code and changed to call
3338         DOMWindow::open.
3339         (WebCore::DialogHandler::DialogHandler): Added. Object is used to handle the
3340         arguments and return value in showModalDialog.
3341         (WebCore::DialogHandler::dialogCreated): Ditto.
3342         (WebCore::DialogHandler::returnValue): Ditto.
3343         (WebCore::setUpDialog): Added. Function passed to showModalDialog that just
3344         casts pointer to DialogHandler can calls dialogCreated.
3345         (WebCore::JSDOMWindow::showModalDialog): Removed most of the code and changed
3346         to call DOMWindow::showModalDialog.
3347         (WebCore::JSDOMWindow::postMessage): Made style match the rest of the file by
3348         renaming local variables and getting rid of a needless ones.
3349
3350         * page/DOMWindow.cpp:
3351         (WebCore::DOMWindow::parseModalDialogFeatures): Moved body of this function
3352         to the WindowFeatures class.
3353         (WebCore::DOMWindow::allowPopUp): Renamed argument from activeFrame to firstFrame,
3354         because that's the frame we pass in here. Also added an overload so this can be
3355         called on a window rather than a frame.
3356         (WebCore::DOMWindow::setLocation): Renamed a couple variables so the names are
3357         the same as in open and showModalDialog. Factored the JavaScript security check
3358         into a new function named isInsecureScriptAccess.
3359         (WebCore::DOMWindow::isInsecureScriptAccess): Here is the new function.
3360         (WebCore::DOMWindow::createWindow): Added. Contains logic shared by open and
3361         showModalDialog just as the function named createWindow in JSDOMWindowCustom.cpp
3362         used to.
3363         (WebCore::DOMWindow::open): Added. Code from JSDOMWindowCustom without the
3364         JavaScript language binding part, and with a bit of refactoring to share code
3365         with the rest of the DOMWindow class.
3366         (WebCore::DOMWindow::showModalDialog): Ditto.
3367
3368         * page/DOMWindow.h: Moved conditional parts of the file into separate paragraphs
3369         in alphabetical order so they are not scattered thorugh the file. Removed redundant
3370         includes. Added some blank lines for clarity. Added an open function and a
3371         showModalDialog function. Added private createWindow and isInsecureScriptAccess
3372         functions.
3373
3374         * page/WindowFeatures.cpp:
3375         (WebCore::isWindowFeaturesSeparator): Renamed from isSeparator for clarity.
3376         (WebCore::WindowFeatures::WindowFeatures): Updated for name change. Used isEmpty
3377         instead of checking length. Added a new constructor for use when making dialogs,
3378         with code from the showModalDialog function.
3379         (WebCore::WindowFeatures::boolFeature): Use DialogFeaturesMap typedef.
3380         (WebCore::WindowFeatures::floatFeature): Use DialogFeaturesMap typedef.
3381         Renamed a local variable and tweaked the comments a bit.
3382         (WebCore::WindowFeatures::parseDialogFeatures): Added. Code moved here from
3383         DOMWindow::parseDialogFeatures and refactored a bit.
3384
3385         * page/WindowFeatures.h: Added new constructor, new parseDialogFeatures
3386         function, DialogFeaturesMap typedef, and made setWindowFeature function private.
3387
3388 2010-12-10  Chris Fleizach  <cfleizach@apple.com>
3389
3390         Reviewed by Darin Adler.
3391
3392         AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
3393         https://bugs.webkit.org/show_bug.cgi?id=50574
3394
3395         Refactors accessibility hit testing to allow for a more flexible model when handling elements
3396         with fake sub-elements (like sliders or list boxes).
3397
3398         Renamed doAccessibilityHitTest -> accessibilityHitTest, which is called on the root
3399         accessibility render object. Then subclassers are able to override 
3400         elementAccessibilityHitTest to return their own specific elements.
3401
3402         * accessibility/AccessibilityListBox.cpp:
3403         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
3404         * accessibility/AccessibilityListBox.h:
3405         * accessibility/AccessibilityObject.h:
3406         (WebCore::AccessibilityObject::accessibilityHitTest):
3407         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
3408         * accessibility/AccessibilityRenderObject.cpp:
3409         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
3410         * accessibility/AccessibilityRenderObject.h:
3411         * accessibility/AccessibilitySlider.cpp:
3412         (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
3413         * accessibility/AccessibilitySlider.h:
3414         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3415         (webkit_accessible_component_ref_accessible_at_point):
3416         * accessibility/mac/AccessibilityObjectWrapper.mm:
3417         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
3418
3419 2010-12-10  Kenneth Russell  <kbr@google.com>
3420
3421         Reviewed by Darin Adler.
3422
3423         Clean up assertion in Extensions3DOpenGL.cpp
3424         https://bugs.webkit.org/show_bug.cgi?id=50852
3425
3426         Built Release mode to test. No functionality change.
3427
3428         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3429         (WebCore::Extensions3DOpenGL::ensureEnabled):
3430
3431 2010-12-10  Cosmin Truta  <ctruta@chromium.org>
3432
3433         Reviewed by Eric Seidel.
3434
3435         Crash while processing ill-formed <textPath> ouside of <text>
3436         https://bugs.webkit.org/show_bug.cgi?id=47759
3437
3438         Renderers within a <text> subtree are created only when their corresponding elements
3439         satisfy the content model.
3440
3441         Test: svg/custom/invalid-text-content.svg
3442
3443         * svg/SVGTRefElement.cpp:
3444         (WebCore::SVGTRefElement::childShouldCreateRenderer): Fixed to comply with the content model.
3445         (WebCore::SVGTRefElement::rendererIsNeeded): Added.
3446         * svg/SVGTRefElement.h:
3447         * svg/SVGTSpanElement.cpp:
3448         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Fixed to comply with the content model.
3449         (WebCore::SVGTSpanElement::rendererIsNeeded): Added.
3450         * svg/SVGTSpanElement.h: Changed indentation.
3451         * svg/SVGTextElement.cpp:
3452         (WebCore::SVGTextElement::childShouldCreateRenderer): Reformatted.
3453         * svg/SVGTextPathElement.cpp:
3454         (WebCore::SVGTextPathElement::childShouldCreateRenderer): Fixed to comply with the content model.
3455         (WebCore::SVGTextPathElement::rendererIsNeeded): Added.
3456         * svg/SVGTextPathElement.h:
3457
3458 2010-12-10  Zhenyao Mo  <zmo@google.com>
3459
3460         Reviewed by Adam Barth.
3461
3462         Use enums instead of booleans in ImageSource/ImageDecoder constructors
3463         https://bugs.webkit.org/show_bug.cgi?id=50818
3464
3465         This patch basically defines two enum type in ImageSource: AlphaOption
3466         and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
3467         constructor parameters instead of boolean typs.
3468
3469         * platform/graphics/ImageSource.cpp:
3470         (WebCore::ImageSource::ImageSource):
3471         (WebCore::ImageSource::setData):
3472         * platform/graphics/ImageSource.h: Define the two enum types.
3473         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3474         (WebCore::GraphicsContext3D::getImageData):
3475         * platform/graphics/cg/ImageSourceCG.cpp:
3476         (WebCore::ImageSource::ImageSource):
3477         * platform/graphics/qt/ImageDecoderQt.cpp:
3478         (WebCore::ImageDecoder::create):
3479         (WebCore::ImageDecoderQt::ImageDecoderQt):
3480         * platform/graphics/qt/ImageDecoderQt.h:
3481         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3482         (WebCore::GraphicsContext3D::getImageData):
3483         * platform/image-decoders/ImageDecoder.cpp:
3484         (WebCore::ImageDecoder::create):
3485         * platform/image-decoders/ImageDecoder.h:
3486         (WebCore::ImageDecoder::ImageDecoder):
3487         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
3488         (WebCore::BMPImageDecoder::BMPImageDecoder):
3489         * platform/image-decoders/bmp/BMPImageDecoder.h:
3490         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3491         (WebCore::GIFImageDecoder::GIFImageDecoder):
3492         * platform/image-decoders/gif/GIFImageDecoder.h:
3493         * platform/image-decoders/ico/ICOImageDecoder.cpp:
3494         (WebCore::ICOImageDecoder::ICOImageDecoder):
3495         (WebCore::ICOImageDecoder::decodeAtIndex):
3496         * platform/image-decoders/ico/ICOImageDecoder.h:
3497         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3498         (WebCore::JPEGImageDecoder::JPEGImageDecoder):
3499         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3500         * platform/image-decoders/png/PNGImageDecoder.cpp:
3501         (WebCore::PNGImageDecoder::PNGImageDecoder):
3502         * platform/image-decoders/png/PNGImageDecoder.h:
3503         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
3504         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
3505         * platform/image-decoders/webp/WEBPImageDecoder.h:
3506
3507 2010-12-10  Ryosuke Niwa  <rniwa@webkit.org>
3508
3509         Reviewed by Darin Adler.
3510
3511         REGRESSION(r73799): editing/execCommand/4920488.html fails
3512         https://bugs.webkit.org/show_bug.cgi?id=50854
3513
3514         The regression was caused by Range::processContents's not extracting
3515         m_end.container()->firstChild(). Fixed the bug by always adding the first child.
3516
3517         * dom/Range.cpp:
3518         (WebCore::Range::processContents):
3519
3520 2010-12-10  Adam Barth  <abarth@webkit.org>
3521
3522         Reviewed by Eric Seidel.
3523
3524         REGRESSION: Infinite redirect on developer.apple.com
3525         https://bugs.webkit.org/show_bug.cgi?id=45627
3526
3527         Tests: fast/loader/form-submit-aborts-parsing.html
3528                fast/loader/location-change-aborts-parsing.html
3529
3530         This patch is not pretty, but it fixes the bug.  I stole this approach
3531         from the old HTML parser (as suggested by Eric Seidel).  The other
3532         approaches that folks tried for this bug are better, but it's inclear
3533         how to get them to work correctly.  I've added a large FIXME comment.
3534
3535         * html/parser/HTMLDocumentParser.cpp:
3536         (WebCore::HTMLDocumentParser::pumpTokenizer):
3537         * html/parser/HTMLTreeBuilder.h:
3538         (WebCore::HTMLTreeBuilder::isParsingFragment):
3539
3540 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
3541
3542         Reviewed by Ada Chan.
3543
3544         When we are creating a ContextMenuItem, only call setSubMenu if we have
3545         a subMenu to set.
3546
3547         * platform/ContextMenuItem.cpp:
3548         (WebCore::ContextMenuItem::ContextMenuItem):
3549
3550 2010-12-10  Kenneth Russell  <kbr@google.com>
3551
3552         Unreviewed, another build fix. #include <wtf/UnusedParam.h> needed
3553         for Release builds.
3554
3555         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3556
3557 2010-12-10  Kenneth Russell  <kbr@google.com>
3558
3559         Unreviewed, build fix. Change #ifndef NDEBUG to #ifdef NDEBUG.
3560
3561         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3562         (WebCore::Extensions3DOpenGL::ensureEnabled):
3563
3564 2010-12-10  Kenneth Russell  <kbr@google.com>
3565
3566         Reviewed by James Robinson.
3567
3568         Implement extension entry points and remove EXTENSIONS enum
3569         https://bugs.webkit.org/show_bug.cgi?id=40316
3570
3571         Implemented WebGLRenderingContext's getSupportedExtensions and
3572         getExtensions entry points, and, to verify them, added support for
3573         the first specified WebGL extension, OES_texture_float. This
3574         extension is now advertised in the Chromium and WebKit ports when
3575         the underlying hardware supports it.
3576
3577         The new OES_texture_float test in the WebGL conformance suite
3578         verifies the allocation and population of floating point textures,
3579         and their use as render targets. However, because this extension
3580         is optional, it is not easily testable with a layout test; there
3581         is only one set of expectations for a given test, and two would be
3582         needed, one when the extension is available and one when it is not.
3583
3584         Tested with the oes-texture-float.html WebGL conformance test in
3585         Chromium and WebKit on Mac OS X on hardware that supports the
3586         extension. Also verified with a configuration that does not
3587         advertise the extension that this same test passes.
3588
3589         * CMakeLists.txt:
3590         * DerivedSources.make:
3591         * GNUmakefile.am:
3592         * WebCore.gypi:
3593         * WebCore.pri:
3594         * WebCore.pro:
3595         * WebCore.xcodeproj/project.pbxproj:
3596         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3597         (WebCore::toJS):
3598         (WebCore::JSWebGLRenderingContext::markChildren):
3599         (WebCore::JSWebGLRenderingContext::getExtension):
3600         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
3601         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3602         (WebCore::toV8Object):
3603         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
3604         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
3605         * html/canvas/OESTextureFloat.cpp: Added.
3606         (WebCore::OESTextureFloat::OESTextureFloat):
3607         (WebCore::OESTextureFloat::~OESTextureFloat):
3608         (WebCore::OESTextureFloat::getName):
3609         (WebCore::OESTextureFloat::create):
3610         * html/canvas/OESTextureFloat.h: Added.
3611         * html/canvas/OESTextureFloat.idl: Added.
3612         * html/canvas/WebGLExtension.cpp: Added.
3613         (WebCore::WebGLExtension::WebGLExtension):
3614         (WebCore::WebGLExtension::~WebGLExtension):
3615         * html/canvas/WebGLExtension.h: Added.
3616         * html/canvas/WebGLRenderingContext.cpp:
3617         (WebCore::WebGLRenderingContext::getExtension):
3618         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3619         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
3620         (WebCore::WebGLRenderingContext::validateTexFuncData):
3621         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
3622         (WebCore::WebGLRenderingContext::getExtensionNumber):
3623         * html/canvas/WebGLRenderingContext.h:
3624         * html/canvas/WebGLRenderingContext.idl:
3625         * platform/graphics/Extensions3D.h:
3626         * platform/graphics/GraphicsContext3D.cpp:
3627         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
3628         (WebCore::GraphicsContext3D::extractTextureData):
3629         (WebCore::doUnpackingAndPacking):
3630         (WebCore::doPacking):
3631         (WebCore::doFloatingPointPacking):
3632         (WebCore::GraphicsContext3D::packPixels):
3633         * platform/graphics/GraphicsContext3D.h:
3634         * platform/graphics/chromium/Extensions3DChromium.h:
3635         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3636         (WebCore::Extensions3DOpenGL::supports):
3637         (WebCore::Extensions3DOpenGL::ensureEnabled):
3638         * platform/graphics/opengl/Extensions3DOpenGL.h:
3639         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3640         (WebCore::GraphicsContext3D::texImage2D):
3641         * platform/graphics/qt/Extensions3DQt.cpp:
3642         (WebCore::Extensions3DQt::ensureEnabled):
3643         * platform/graphics/qt/Extensions3DQt.h:
3644
3645 2010-12-10  Darin Adler  <darin@apple.com>
3646
3647         Try to fix Windows build.
3648
3649         * dom/Range.cpp:
3650         (WebCore::Range::processContents): Put typedef of NodeVector inside the function
3651         instead of at the top of the file, since the use is restricted to this function.
3652         There's another NodeVector in ContainerNode.cpp.
3653
3654 2010-12-09  Brian Weinstein  <bweinstein@apple.com>
3655
3656         Reviewed by Adam Roben.
3657
3658         Prep for WebKit2: Context menu support on Windows
3659         https://bugs.webkit.org/show_bug.cgi?id=50514
3660         
3661         Before this patch ContextMenu on Windows were backed by HMENUs, and ContextMenuItems
3662         were backed by MENUITEMINFOs. This meant they couldn't be copied, and they needed to
3663         be to work in WebKit2.
3664         
3665         This patch adds a new USE flag - CROSS_PLATFORM_CONTEXT_MENUS that are for a cross-platform
3666         representation of context menus. This patch also has Windows adopt them.
3667         
3668         Cross-platform context menus change the API of context menus and the ContextMenuClient. There
3669         is no more idea of a PlatformMenuDescription or a PlatformMenuItemDescription. Menus are backed
3670         by a Vector of ContextMenuItems, and menu items are backed by the variables they need (enabled, checked
3671         title, action, type, and submenu).
3672         
3673         This patch also refactors the ContextMenuClient interface to use a variation on the getCustomMenuFromDefaultItems
3674         function to allow for customization of the context menu.
3675         
3676         For other ports to use CROSS_PLATFORM_CONTEXT_MENUS, all they need to do is write conversion functions from
3677         a ContextMenu <-> native menu type, and ContextMenuItem <-> native menu item type. For Windows, this is done
3678         in ContextMenuWin.cpp and ContextMenuItemWin.cpp.
3679
3680         No new tests, no change in behavior.
3681
3682         * WebCore.vcproj/WebCore.vcproj: Add new files (only needed on Windows for now).
3683         * loader/EmptyClients.h:
3684         (WebCore::EmptyContextMenuClient::customizeMenu): Define this function if CROSS_PLATFORM_CONTEXT_MENUS
3685             is on.
3686         * page/ContextMenuClient.h: Ditto. 
3687         * page/ContextMenuController.cpp:
3688         (WebCore::ContextMenuController::showContextMenu): Call customizeMenu instead of 
3689             getCustomMenuFromDefaultItems if CROSS_PLATFORM_CONTEXT_MENUS is on.
3690         * platform/ContextMenu.cpp: Added.
3691         (WebCore::ContextMenu::ContextMenu): Empty constructor.
3692         (WebCore::ContextMenu::setItems): Sets the items in the menu.
3693         (WebCore::ContextMenu::items): Returns the items in the menu.
3694         (WebCore::ContextMenu::itemAtIndex):
3695         (WebCore::itemWithActionInMenu): Returns the item with the correct action, recursively descending
3696             into submenus.
3697         (WebCore::ContextMenu::itemWithAction): Calls through to itemWithActionInMenu.
3698         * platform/ContextMenu.h: Added a new set of functions and member variables that are defined for
3699             CROSS_PLATFORM_CONTEXT_MENUS.
3700         (WebCore::ContextMenu::appendItem): Appends an item to the menu.
3701         * platform/ContextMenuItem.cpp: Added.
3702         (WebCore::ContextMenuItem::ContextMenuItem):
3703         (WebCore::ContextMenuItem::~ContextMenuItem):
3704         (WebCore::ContextMenuItem::setSubMenu):
3705         * platform/ContextMenuItem.h:
3706         (WebCore::ContextMenuItem::type): Returns the type.
3707         (WebCore::ContextMenuItem::setType): Sets the type.
3708         (WebCore::ContextMenuItem::action): Returns the action.
3709         (WebCore::ContextMenuItem::setAction): Sets the action.
3710         (WebCore::ContextMenuItem::title): Returns the title.
3711         (WebCore::ContextMenuItem::setTitle): Sets the title.
3712         (WebCore::ContextMenuItem::checked): Returns whether or not the menu item is checked.
3713         (WebCore::ContextMenuItem::setChecked): Sets whether ot not the menu item is checked.
3714         (WebCore::ContextMenuItem::enabled): Returns whether or not the menu item is enabled.
3715         (WebCore::ContextMenuItem::setEnabled): Sets whether or not the menu item is enabled.
3716         (WebCore::ContextMenuItem::submenu): Returns the submenu.
3717         * platform/PlatformMenuDescription.h: Remove the idea if a PlatformMenuDescription if 
3718             CROSS_PLATFORM_CONTEXT_MENUS is on.
3719         * platform/win/ContextMenuItemWin.cpp:
3720         (WebCore::ContextMenuItem::ContextMenuItem): Creates a ContextMenuItem from a MENUITEMINFO.
3721         (WebCore::ContextMenuItem::nativeMenuItem): Creates and returns a MENUITEMINFO.
3722         * platform/win/ContextMenuWin.cpp:
3723         (WebCore::ContextMenu::ContextMenu): Creates a ContextMenu from an HMENU.
3724         (WebCore::ContextMenu::nativeMenu): Creates and returns an HMENU.
3725
3726 2010-12-10  Emil Eklund  <eae@chromium.org>
3727
3728         Reviewed by Adam Barth.
3729
3730         Fix crash in ReplaceSelectionCommand::doApply when selection is modified
3731         during execution.
3732         https://bugs.webkit.org/show_bug.cgi?id=50840
3733
3734         Test: editing/execCommand/insertHTML-mutation-crash.html
3735
3736         * editing/ReplaceSelectionCommand.cpp:
3737         (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
3738         Replaced raw node pointer with RefPtr.
3739         
3740         (WebCore::ReplaceSelectionCommand::doApply):
3741         Replaced raw node pointer with RefPtr and added null check.
3742
3743 2010-12-10  Emil Eklund  <eae@chromium.org>
3744
3745         Reviewed by Adam Barth.
3746
3747         Fix crash in Range::processContents when modified during mutation event.
3748         https://bugs.webkit.org/show_bug.cgi?id=50710
3749
3750         Test: fast/dom/Range/range-extractContents.html
3751
3752         * dom/Range.cpp:
3753         (WebCore::Range::processContents):
3754         Replace raw pointers with RefPtrs and add checks.
3755
3756 2010-12-09  Enrica Casucci  <enrica@apple.com>
3757
3758         Reviewed by Alexey Proskuryakov.
3759
3760         Implement IME support for Mac.
3761         <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
3762         https://bugs.webkit.org/show_bug.cgi?id=50788
3763
3764         * dom/KeyboardEvent.h:
3765         (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
3766         since it is now used for more than one command.
3767
3768 2010-12-10  Jessie Berlin  <jberlin@apple.com>
3769
3770         Windows build fix. Unreviewed.
3771
3772         * WebCore.vcproj/WebCore.vcproj:
3773         Remove duplicate </File> tag.
3774
3775 2010-12-09  Jenn Braithwaite  <jennb@chromium.org>
3776
3777         Reviewed by Adam Barth.
3778
3779         TextResourceDecoder::checkForHeadCharset can look way past the limit.
3780         https://bugs.webkit.org/show_bug.cgi?id=47397
3781
3782         Replaced charset detection algorithm with real parser.
3783         Added tests for parser bugs mentioned in the thread for this bug report.
3784         Converted hixie's encoding parsing tests to a layout test.
3785
3786         Tests: fast/encoding/bracket-in-script.html
3787                fast/encoding/bracket-in-tag.html
3788                fast/encoding/escaped-bracket.html
3789                fast/encoding/meta-in-body.html
3790                fast/encoding/meta-in-script.html
3791                fast/encoding/meta-in-title.html
3792                fast/encoding/mismatched-end-tag.html
3793                fast/encoding/namespace-meta.html
3794                fast/encoding/not-http-equiv-content.html
3795                fast/encoding/parser-tests.html
3796                fast/encoding/quotes-in-title.html
3797                fast/encoding/tag-name-digit.html
3798                http/tests/misc/charset-sniffer-end-sniffing.html
3799
3800         * Android.mk:
3801         * CMakeLists.txt:
3802         * GNUmakefile.am:
3803         * WebCore.gypi:
3804         * WebCore.pro:
3805         * WebCore.vcproj/WebCore.vcproj:
3806         * WebCore.xcodeproj/project.pbxproj:
3807         * html/parser/HTMLMetaCharsetParser.cpp: Added.
3808         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
3809         (WebCore::HTMLMetaCharsetParser::~HTMLMetaCharsetParser):
3810         (WebCore::HTMLMetaCharsetParser::extractCharset):
3811         (WebCore::HTMLMetaCharsetParser::processMeta):
3812         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
3813         * html/parser/HTMLMetaCharsetParser.h: Added.
3814         (WebCore::HTMLMetaCharsetParser::create):
3815         (WebCore::HTMLMetaCharsetParser::encoding):
3816         * loader/TextResourceDecoder.cpp:
3817         (WebCore::TextResourceDecoder::checkForHeadCharset):
3818         (WebCore::TextResourceDecoder::checkForMetaCharset):
3819         * loader/TextResourceDecoder.h:
3820
3821 2010-12-10 Nate Chapin  <japhet@chromium.org>
3822
3823         Reviewed by Antti Koivisto.
3824
3825         Merge Loader and Request. Currently, Loader is a singleton attached
3826         to MemoryCache. Our goal is to remove knowledge of the loading process
3827         from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
3828         Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
3829         which removes the main reason for Request existing as a separate class (to store per-request
3830         state that Loader couldn't).
3831
3832         Loader will be given a more descriptive name in a later patch.
3833
3834         https://bugs.webkit.org/show_bug.cgi?id=49837
3835
3836         Refactor only, no new tests.
3837
3838         * Android.mk:
3839         * CMakeLists.txt:
3840         * GNUmakefile.am:
3841         * WebCore.gypi:
3842         * WebCore.pro:
3843         * loader/FrameLoader.cpp:
3844         * loader/Request.cpp:
3845         * loader/Request.h:
3846         * loader/cache/CachedFont.cpp:
3847         * loader/cache/CachedImage.cpp:
3848         * loader/cache/CachedResource.cpp:
3849         * loader/cache/CachedResource.h:
3850         * loader/cache/CachedResourceLoader.cpp:
3851         (WebCore::CachedResourceLoader::CachedResourceLoader):
3852         (WebCore::CachedResourceLoader::~CachedResourceLoader):
3853         (WebCore::CachedResourceLoader::requestImage):
3854         (WebCore::CachedResourceLoader::setAutoLoadImages):
3855         (WebCore::CachedResourceLoader::load):
3856         (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
3857             plus other CachedResourceLoader cleanup that had been handled in Loader.
3858         (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
3859         (WebCore::CachedResourceLoader::requestCount):
3860         * loader/cache/CachedResourceLoader.h:
3861         (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
3862         * loader/cache/MemoryCache.h:
3863         * loader/loader.cpp:
3864         (WebCore::Loader::Loader):
3865         (WebCore::Loader::~Loader):
3866         (WebCore::Loader::load):
3867         (WebCore::Loader::willSendRequest):
3868         (WebCore::Loader::didFinishLoading):
3869         (WebCore::Loader::didFail):
3870         (WebCore::Loader::didReceiveResponse):
3871         (WebCore::Loader::didReceiveData):
3872         (WebCore::Loader::didReceiveCachedMetadata):
3873         * loader/loader.h:
3874         (WebCore::Loader::cachedResourceLoader):
3875
3876 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
3877
3878         Unreviewed, rolling out r73703.
3879         http://trac.webkit.org/changeset/73703
3880         https://bugs.webkit.org/show_bug.cgi?id=49658
3881
3882         This patch is causing crashes on the GTK+ bots.
3883
3884         * platform/ContextMenuItem.h:
3885         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
3886         * platform/gtk/ContextMenuGtk.cpp:
3887         (WebCore::ContextMenu::appendItem):
3888         * platform/gtk/ContextMenuItemGtk.cpp:
3889         (WebCore::ContextMenuItem::ContextMenuItem):
3890         (WebCore::ContextMenuItem::~ContextMenuItem):
3891         (WebCore::ContextMenuItem::createNativeMenuItem):
3892         (WebCore::ContextMenuItem::releasePlatformDescription):
3893         (WebCore::ContextMenuItem::type):
3894         (WebCore::ContextMenuItem::setType):
3895         (WebCore::ContextMenuItem::action):
3896         (WebCore::ContextMenuItem::setAction):
3897         (WebCore::ContextMenuItem::title):
3898         (WebCore::ContextMenuItem::setTitle):
3899         (WebCore::ContextMenuItem::platformSubMenu):
3900         (WebCore::ContextMenuItem::setSubMenu):
3901         (WebCore::ContextMenuItem::setChecked):
3902         (WebCore::ContextMenuItem::setEnabled):
3903
3904 2010-12-08  Mihai Parparita  <mihaip@chromium.org>
3905
3906         Reviewed by Darin Adler.
3907
3908         fast/canvas/canvas-getImageData-negative-source.html fails on Mac
3909         https://bugs.webkit.org/show_bug.cgi?id=47901
3910
3911         Test: fast/canvas/canvas-getImageData-rounding.html
3912         
3913         static_cast<unsigned> is generally not what we want in
3914         convertLogicalToDevice. It produces inconsistent results when compiling
3915         for 32-bit vs. 64-bit, and in any case we weren't getting correct
3916         rounding behavior for source rectangles (e.g. we should get a source rect
3917         of width 2 if the source X is 0.9 and the source width is 0.2, but we
3918         were getting only one of width 1).
3919
3920         * html/HTMLCanvasElement.cpp:
3921         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
3922         (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
3923         * html/HTMLCanvasElement.h:
3924
3925 2010-12-10  Hironori Bono  <hbono@chromium.org>
3926
3927         Reviewed by Ojan Vafai.
3928
3929         [Chromium] Use libjpeg-turbo instead of libjpeg
3930         https://bugs.webkit.org/show_bug.cgi?id=50054
3931
3932         This change replaces the hard-coded path to the GYP files of the JPEG
3933         library with a 'libjpeg_gyp_path' variable, which is added by Chromium
3934         r68453. (When building WebKit Chromium, this change sets its value to
3935         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp' to avoid changing
3936         the current behavior.)
3937
3938         No new tests since this does not change the code at all.
3939
3940         * WebCore.gyp/WebCore.gyp:
3941
3942 2010-12-10  Chris Marrin  <cmarrin@apple.com>
3943
3944         Reviewed by Simon Fraser.
3945
3946         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
3947         https://bugs.webkit.org/show_bug.cgi?id=49388
3948
3949         Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
3950         the implementation.
3951
3952         * platform/graphics/ca/GraphicsLayerCA.cpp:
3953         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
3954         * platform/graphics/ca/PlatformCAAnimation.h:
3955         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3956         (hasNonZeroBeginTimeFlag):
3957         (setNonZeroBeginTimeFlag):
3958         (PlatformCAAnimation::PlatformCAAnimation):
3959         (PlatformCAAnimation::setBeginTime):
3960
3961 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
3962
3963         Reviewed by Pavel Feldman.
3964
3965         Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor.
3966         https://bugs.webkit.org/show_bug.cgi?id=50679
3967
3968         * inspector/front-end/Script.js:
3969         * inspector/front-end/ScriptView.js:
3970         (WebInspector.ScriptView):
3971         * inspector/front-end/ScriptsPanel.js:
3972         (WebInspector.ScriptsPanel.prototype.reset):
3973         * inspector/front-end/SourceFrame.js:
3974         (WebInspector.SourceFrame):
3975         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
3976         (WebInspector.SourceFrame.prototype._breakpointAdded):
3977         (WebInspector.SourceFrame.prototype._doEditLine):
3978         (WebInspector.SourceFrame.prototype._commitEditLine):
3979         (WebInspector.SourceFrame.prototype._breakpoints):
3980         (WebInspector.SourceFrame.prototype._sourceIDForLine):
3981         * inspector/front-end/SourceView.js:
3982         (WebInspector.SourceView):
3983
3984 2010-12-10  Andreas Kling  <kling@webkit.org>
3985
3986         Reviewed by Eric Seidel.
3987
3988         Don't do GraphicsContext save/restore just to preserve the CompositeOperator
3989         https://bugs.webkit.org/show_bug.cgi?id=50070
3990
3991         Add GraphicsContext::compositeOperation() so we don't have to do a full
3992         save/restore if the only context-tainting call is setCompositeOperation().
3993
3994         GraphicsContext::setCompositeOperation() now stores the op in its state
3995         and calls a port-specific setPlatformCompositeOperation().
3996
3997         No new tests, this is an optimization.
3998
3999         * platform/graphics/GraphicsContext.cpp:
4000         (WebCore::GraphicsContext::setCompositeOperation):
4001         (WebCore::GraphicsContext::compositeOperation):
4002         * platform/graphics/GraphicsContext.h:
4003         * platform/graphics/GraphicsContextPrivate.h:
4004         (WebCore::GraphicsContextState::GraphicsContextState):
4005         * platform/graphics/Image.cpp:
4006         (WebCore::Image::fillWithSolidColor):
4007         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4008         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4009         * platform/graphics/cg/GraphicsContextCG.cpp:
4010         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4011         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
4012         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4013         * platform/graphics/mac/GraphicsContextMac.mm:
4014         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4015         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
4016         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4017         * platform/graphics/qt/GraphicsContextQt.cpp:
4018         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4019         * platform/graphics/skia/GraphicsContextSkia.cpp:
4020         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4021         * platform/graphics/skia/SkiaUtils.cpp:
4022         (WebCore::WebCoreCompositeToSkiaComposite):
4023         * platform/graphics/wince/GraphicsContextWinCE.cpp:
4024         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4025         * platform/graphics/wx/GraphicsContextWx.cpp:
4026         (WebCore::GraphicsContext::setPlatformCompositeOperation):
4027         * rendering/RenderBoxModelObject.cpp:
4028         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
4029         * rendering/RenderView.cpp:
4030         (WebCore::RenderView::paintBoxDecorations):
4031
4032 2010-12-10  Renata Hodovan  <reni@webkit.org>
4033
4034         Reviewed by Andreas Kling.
4035
4036         GraphicsContext: Merge m_common and m_data
4037         https://bugs.webkit.org/show_bug.cgi?id=49914
4038
4039         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
4040         and m_common became unnecessary. They are removed.
4041         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
4042         make the constructor of GraphicsContext clearer.
4043         Besides add a getter to the private GraphicsContext::m_state member, because some inline
4044         functions in cairo need it.
4045
4046         No new test is needed, because this is a refactoring.
4047
4048         * WebCore.xcodeproj/project.pbxproj:
4049         * platform/graphics/GraphicsContext.cpp:
4050         (WebCore::GraphicsContext::GraphicsContext):
4051         (WebCore::GraphicsContext::~GraphicsContext):
4052         (WebCore::GraphicsContext::save):
4053         (WebCore::GraphicsContext::restore):
4054         (WebCore::GraphicsContext::setStrokeThickness):
4055         (WebCore::GraphicsContext::setStrokeStyle):
4056         (WebCore::GraphicsContext::setStrokeColor):
4057         (WebCore::GraphicsContext::setShadow):
4058         (WebCore::GraphicsContext::clearShadow):
4059         (WebCore::GraphicsContext::getShadow):
4060         (WebCore::GraphicsContext::strokeThickness):
4061         (WebCore::GraphicsContext::strokeStyle):
4062         (WebCore::GraphicsContext::strokeColor):
4063         (WebCore::GraphicsContext::strokeColorSpace):
4064         (WebCore::GraphicsContext::fillRule):
4065         (WebCore::GraphicsContext::setFillRule):
4066         (WebCore::GraphicsContext::setFillColor):
4067         (WebCore::GraphicsContext::fillColor):
4068         (WebCore::GraphicsContext::fillColorSpace):
4069         (WebCore::GraphicsContext::setShouldAntialias):
4070         (WebCore::GraphicsContext::shouldAntialias):
4071         (WebCore::GraphicsContext::state):
4072         (WebCore::GraphicsContext::setStrokePattern):
4073         (WebCore::GraphicsContext::setFillPattern):
4074         (WebCore::GraphicsContext::setStrokeGradient):
4075         (WebCore::GraphicsContext::setFillGradient):
4076         (WebCore::GraphicsContext::fillGradient):
4077         (WebCore::GraphicsContext::strokeGradient):
4078         (WebCore::GraphicsContext::fillPattern):
4079         (WebCore::GraphicsContext::strokePattern):
4080         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
4081         (WebCore::GraphicsContext::updatingControlTints):
4082         (WebCore::GraphicsContext::setUpdatingControlTints):
4083         (WebCore::GraphicsContext::setPaintingDisabled):
4084         (WebCore::GraphicsContext::paintingDisabled):
4085         (WebCore::GraphicsContext::textDrawingMode):
4086         (WebCore::GraphicsContext::setTextDrawingMode):
4087         * platform/graphics/GraphicsContext.h:
4088         (WebCore::GraphicsContextState::GraphicsContextState):
4089         * platform/graphics/GraphicsContextPrivate.h: Removed.
4090         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4091         (WebCore::setPlatformFill):
4092         (WebCore::setPlatformStroke):
4093         (WebCore::drawPathShadow):
4094         (WebCore::fillCurrentCairoPath):
4095         (WebCore::strokeCurrentCairoPath):
4096         (WebCore::GraphicsContext::platformInit):
4097         (WebCore::GraphicsContext::platformDestroy):
4098         (WebCore::GraphicsContext::fillPath):
4099         (WebCore::GraphicsContext::strokePath):
4100         (WebCore::GraphicsContext::fillRect):
4101         (WebCore::GraphicsContext::setPlatformShadow):
4102         (WebCore::GraphicsContext::strokeRect):
4103         (WebCore::GraphicsContext::setAlpha):
4104         (WebCore::GraphicsContext::getAlpha):
4105         * platform/graphics/cg/GraphicsContextCG.cpp:
4106         (WebCore::GraphicsContext::platformInit):
4107         (WebCore::GraphicsContext::platformDestroy):
4108         (WebCore::GraphicsContext::applyStrokePattern):
4109         (WebCore::GraphicsContext::applyFillPattern):
4110         (WebCore::GraphicsContext::drawPath):
4111         (WebCore::GraphicsContext::fillPath):
4112         (WebCore::GraphicsContext::strokePath):
4113         (WebCore::GraphicsContext::fillRect):
4114         (WebCore::GraphicsContext::setPlatformShadow):
4115         (WebCore::GraphicsContext::strokeRect):
4116         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
4117         (WebCore::GraphicsContext::platformInit):
4118         (WebCore::GraphicsContext::platformDestroy):
4119         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
4120         (WebCore::GraphicsContext::platformInit):
4121         (WebCore::GraphicsContext::platformDestroy):
4122         (WebCore::GraphicsContext::fillPath):
4123         (WebCore::GraphicsContext::strokePath):
4124         (WebCore::GraphicsContext::clip):
4125         (WebCore::GraphicsContext::clipOut):
4126         (WebCore::GraphicsContext::addInnerRoundedRectClip):
4127         * platform/graphics/qt/GraphicsContextQt.cpp:
4128         (WebCore::GraphicsContext::platformInit):
4129         (WebCore::GraphicsContext::platformDestroy):
4130         (WebCore::GraphicsContext::fillPath):
4131         (WebCore::GraphicsContext::strokePath):
4132         (WebCore::GraphicsContext::fillRect):
4133         (WebCore::GraphicsContext::setPlatformShadow):
4134         * platform/graphics/skia/GraphicsContextSkia.cpp:
4135         (WebCore::GraphicsContext::platformInit):
4136         (WebCore::GraphicsContext::platformDestroy):
4137         (WebCore::GraphicsContext::fillPath):
4138         (WebCore::GraphicsContext::setPlatformShadow):
4139         * platform/graphics/win/GraphicsContextCGWin.cpp:
4140         (WebCore::GraphicsContext::GraphicsContext):
4141         (WebCore::GraphicsContext::platformInit):
4142         * platform/graphics/win/GraphicsContextCairoWin.cpp:
4143         (WebCore::GraphicsContext::GraphicsContext):
4144         (WebCore::GraphicsContext::platformInit):
4145         * platform/graphics/wince/GraphicsContextWinCE.cpp:
4146         (WebCore::GraphicsContext::platformInit):
4147         (WebCore::GraphicsContext::platformDestroy):
4148         (WebCore::GraphicsContext::fillPath):
4149         (WebCore::GraphicsContext::fillRect):
4150         * platform/graphics/wx/GraphicsContextWx.cpp:
4151         (WebCore::GraphicsContext::platformInit):
4152         (WebCore::GraphicsContext::platformDestroy):
4153
4154 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
4155
4156         Reviewed by Yury Semikhatsky.
4157
4158         Web Inspector: introduce a pair of set/remove methods for each breakpoint type.
4159         https://bugs.webkit.org/show_bug.cgi?id=50809
4160
4161         * inspector/Inspector.idl:
4162         * inspector/InspectorController.cpp:
4163         (WebCore::InspectorController::InspectorController):
4164         (WebCore::InspectorController::setEventListenerBreakpoint):
4165         (WebCore::InspectorController::removeEventListenerBreakpoint):
4166         (WebCore::InspectorController::hasEventListenerBreakpoint):
4167         (WebCore::InspectorController::setXHRBreakpoint):
4168         (WebCore::InspectorController::removeXHRBreakpoint):
4169         (WebCore::InspectorController::hasXHRBreakpoint):
4170         (WebCore::InspectorController::clearNativeBreakpoints):
4171         * inspector/InspectorController.h:
4172         * inspector/InspectorDOMAgent.cpp:
4173         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
4174         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
4175         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
4176         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
4177         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
4178         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
4179         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
4180         * inspector/InspectorDOMAgent.h:
4181         * inspector/InspectorInstrumentation.cpp:
4182         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
4183         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
4184         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
4185         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
4186         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
4187         * inspector/front-end/BreakpointManager.js:
4188         (WebInspector.BreakpointManager):
4189         (WebInspector.NativeBreakpoint):
4190         (WebInspector.DOMBreakpoint):
4191         (WebInspector.EventListenerBreakpoint):
4192         (WebInspector.XHRBreakpoint):
4193         * inspector/front-end/CallStackSidebarPane.js:
4194         (WebInspector.CallStackSidebarPane):
4195         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
4196         * inspector/front-end/DebuggerModel.js:
4197         (WebInspector.DebuggerModel.prototype.debuggerPaused):
4198
4199 2010-12-10  Adam Roben  <aroben@apple.com>